:root {
  --bg: #f0eee7;
  --surface: rgba(250, 247, 239, 0.86);
  --surface-strong: #fcfaf5;
  --surface-alt: #f5f1e8;
  --line: rgba(105, 123, 117, 0.18);
  --line-strong: rgba(88, 106, 101, 0.32);
  --text: #22343b;
  --text-soft: #667973;
  --primary: #708983;
  --primary-deep: #516963;
  --primary-soft: #dce6de;
  --success: #72927d;
  --warning: #b0906d;
  --danger: #a97a72;
  --seal: #8a5a50;
  --ink-wash: rgba(88, 106, 101, 0.08);
  --shadow: 0 24px 60px rgba(75, 95, 92, 0.12);
  --shadow-soft: 0 16px 40px rgba(75, 95, 92, 0.08);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --max-width: 430px;
  --font-display: "Iowan Old Style", "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif SC", "SimSun", serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 14% 0%, rgba(182, 198, 191, 0.34), transparent 28%),
    radial-gradient(circle at 100% 10%, rgba(195, 183, 162, 0.18), transparent 28%),
    linear-gradient(180deg, #f5f3ec 0%, #ebe8df 42%, #e8ece5 100%);
  color: var(--text);
  font-family: var(--font-body);
}

body {
  display: flex;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background:
    radial-gradient(circle at 82% 10%, rgba(112, 137, 131, 0.1), transparent 18%),
    radial-gradient(circle at 20% 24%, rgba(138, 90, 80, 0.06), transparent 22%),
    radial-gradient(circle at 70% 82%, rgba(112, 137, 131, 0.08), transparent 24%);
  opacity: 0.9;
}

body::after {
  background-image:
    linear-gradient(115deg, rgba(255, 255, 255, 0.18) 0%, transparent 46%),
    repeating-linear-gradient(0deg, rgba(88, 106, 101, 0.015) 0 1px, transparent 1px 18px);
  mix-blend-mode: multiply;
  opacity: 0.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
  transform: none;
  box-shadow: none;
}

.shell {
  width: min(100%, var(--max-width));
  min-height: 100vh;
  padding: env(safe-area-inset-top) 18px calc(92px + env(safe-area-inset-bottom));
  position: relative;
  isolation: isolate;
}

.shell::before,
.shell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.shell::before {
  background:
    radial-gradient(circle at top right, rgba(112, 137, 131, 0.12), transparent 22%),
    radial-gradient(circle at bottom left, rgba(176, 144, 109, 0.08), transparent 18%);
}

.shell::after {
  inset: 20px 0 auto;
  height: 180px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 88%);
  filter: blur(2px);
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 8px 16px;
  margin-bottom: 6px;
}

.brand-block {
  display: grid;
  gap: 10px;
}

.save-status {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.brand-block::after {
  content: "";
  width: 92px;
  height: 1px;
  background: linear-gradient(90deg, rgba(138, 90, 80, 0.32), rgba(112, 137, 131, 0.18), transparent);
}

.topbar h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0.03em;
  max-width: 280px;
  text-wrap: balance;
}

.eyebrow {
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 8px 13px 8px 15px;
  border-radius: 12px;
  border: 1px solid rgba(138, 90, 80, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(241, 233, 221, 0.8));
  color: var(--seal);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: none;
  box-shadow: var(--shadow-soft);
}

.app {
  display: grid;
  gap: 14px;
}

.panel,
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.panel::before,
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.46), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 78%);
  pointer-events: none;
}

.panel::after,
.card::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: calc(var(--radius-xl) - 10px);
  border: 1px solid rgba(105, 123, 117, 0.08);
  pointer-events: none;
}

.panel {
  padding: 22px 18px;
}

.card {
  padding: 18px 16px;
}

.home-shortcut-grid {
  margin-top: 14px;
}

.quick-entry-card {
  width: 100%;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
  font: inherit;
}

.quick-entry-card strong {
  display: block;
  margin-bottom: 8px;
}

.quick-entry-card p {
  margin: 0;
}

.quick-entry-meta {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.account-entry-card {
  display: grid;
  gap: 14px;
  align-items: center;
  margin-top: 14px;
}

.account-entry-card p {
  margin: 8px 0 0;
}

.hero {
  min-height: calc(100vh - 220px);
  display: grid;
  align-content: center;
  gap: 16px;
  text-align: left;
  padding: 34px 22px;
  background:
    linear-gradient(180deg, rgba(252, 249, 242, 0.92), rgba(244, 240, 231, 0.92)),
    url("./landscape-mist.svg") center bottom / cover no-repeat,
    radial-gradient(circle at top right, rgba(112, 137, 131, 0.16), transparent 28%);
}

.hero-brand {
  display: grid;
  gap: 6px;
  margin-bottom: 2px;
  position: relative;
  z-index: 1;
}

.hero-brand::before {
  content: "";
  position: absolute;
  left: -14px;
  top: -6px;
  width: 168px;
  height: 86px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 26% 34%, rgba(138, 90, 80, 0.12), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(226, 237, 231, 0.12));
  filter: blur(2px);
  opacity: 0.92;
}

.hero-wordmark,
.hero-brand-sub {
  position: relative;
  z-index: 1;
}

.hero-wordmark {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.18em;
  color: var(--seal);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.hero-brand-sub {
  margin: 0;
  padding-left: 0;
  color: var(--primary-deep);
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  flex-wrap: nowrap;
  white-space: nowrap;
  line-height: 1.3;
}

.hero-brand-main {
  font-size: clamp(11px, 2.9vw, 13px);
  letter-spacing: 0.06em;
}

.hero-brand-credit {
  font-size: clamp(10px, 2.35vw, 11px);
  letter-spacing: 0.04em;
  color: var(--text-soft);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.hero::before {
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 52%),
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.34), transparent 18%);
  opacity: 0.9;
}

.hero::after {
  left: -20px;
  right: -20px;
  bottom: -16px;
  height: 120px;
  background:
    linear-gradient(180deg, transparent 0%, rgba(247, 242, 232, 0.88) 76%, rgba(247, 242, 232, 0.96) 100%);
}

.hero h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 31px;
  font-weight: 600;
  line-height: 1.34;
  letter-spacing: 0.03em;
  max-width: 320px;
  text-wrap: balance;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.54);
}

.hero p {
  margin: 0;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.8;
  max-width: 320px;
}

.hero .theory-badge {
  width: fit-content;
}

.hero .chain-note {
  max-width: 320px;
  padding-left: 12px;
  border-left: 2px solid rgba(138, 90, 80, 0.18);
}

.primary-button,
.secondary-button,
.ghost-button,
.pill-button,
.small-button {
  border-radius: 22px;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.pill-button:hover,
.small-button:hover {
  transform: translateY(-1px);
}

.primary-button {
  padding: 18px 22px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(126, 149, 143, 0.98) 0%, rgba(81, 105, 99, 0.98) 100%);
  border: 1px solid rgba(81, 105, 99, 0.32);
  box-shadow: 0 18px 36px rgba(81, 105, 99, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.secondary-button {
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-deep);
  background:
    linear-gradient(180deg, rgba(250, 247, 239, 0.96), rgba(233, 239, 234, 0.94));
  border: 1px solid rgba(105, 123, 117, 0.16);
  box-shadow: var(--shadow-soft);
}

.ghost-button {
  padding: 11px 14px;
  background: rgba(252, 249, 242, 0.86);
  color: var(--primary-deep);
  border: 1px solid var(--line-strong);
  white-space: nowrap;
  box-shadow: var(--shadow-soft);
}

.profile-trigger {
  min-width: 138px;
  display: grid;
  gap: 3px;
  text-align: left;
  justify-items: start;
  padding: 11px 14px 12px;
}

.profile-trigger-label,
.profile-trigger-hint {
  font-size: 11px;
  line-height: 1.3;
  color: var(--muted);
}

.profile-trigger-name {
  font-size: 15px;
  line-height: 1.35;
  color: var(--primary-deep);
  font-weight: 700;
}

.pill-button {
  padding: 10px 14px;
  background: rgba(112, 137, 131, 0.1);
  color: var(--primary-deep);
  border: 1px solid rgba(112, 137, 131, 0.16);
}

.pill-button.is-active {
  background: rgba(112, 137, 131, 0.2);
}

.small-button {
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  background: rgba(252, 249, 242, 0.92);
  color: var(--primary-deep);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.small-button.primary {
  background: rgba(112, 137, 131, 0.16);
  border-color: rgba(112, 137, 131, 0.24);
}

.button-stack {
  display: grid;
  gap: 12px;
}

.hero .button-stack {
  margin-top: 4px;
  max-width: 320px;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(calc(100% - 24px), calc(var(--max-width) - 12px));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 10px;
  background:
    linear-gradient(180deg, rgba(252, 249, 242, 0.92), rgba(239, 238, 231, 0.9));
  border: 1px solid rgba(105, 123, 117, 0.16);
  border-radius: 999px;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.34);
  z-index: 10;
}

.bottom-nav.is-hidden {
  display: none;
}

.nav-button {
  padding: 12px 8px;
  border-radius: 999px;
  background: transparent;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
}

.nav-button.is-active {
  color: var(--primary-deep);
  background: rgba(112, 137, 131, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.section-title,
.step-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0.02em;
}

.section-subtitle,
.step-subtitle,
.muted {
  margin: 6px 0 0;
  color: var(--text-soft);
  line-height: 1.65;
  font-size: 14px;
}

.theory-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 12px 18px 12px 18px;
  background:
    linear-gradient(135deg, rgba(240, 234, 223, 0.92), rgba(226, 237, 231, 0.82));
  color: var(--primary-deep);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid rgba(105, 123, 117, 0.14);
  box-shadow: var(--shadow-soft);
}

.why-box,
.tip-box,
.warning-box,
.soft-box {
  border-radius: var(--radius-lg);
  padding: 14px 15px;
  line-height: 1.7;
}

.why-box {
  background: rgba(220, 232, 242, 0.56);
}

.tip-box {
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed rgba(111, 139, 165, 0.24);
}

.warning-box {
  background: rgba(180, 139, 99, 0.12);
  border: 1px solid rgba(180, 139, 99, 0.2);
}

.soft-box {
  background: rgba(108, 159, 139, 0.12);
  border: 1px solid rgba(108, 159, 139, 0.18);
}

.soft-box strong,
.tip-box strong,
.warning-box strong {
  font-family: var(--font-display);
  font-weight: 600;
}

.grid,
.two-column,
.three-column,
.action-grid,
.stats-grid,
.forest-grid,
.column-board {
  display: grid;
  gap: 12px;
}

.two-column {
  grid-template-columns: 1fr 1fr;
}

.three-column {
  grid-template-columns: repeat(3, 1fr);
}

.action-grid {
  grid-template-columns: 1fr;
}

.stats-grid {
  grid-template-columns: repeat(2, 1fr);
}

.forest-grid {
  grid-template-columns: repeat(3, 1fr);
}

.column-board {
  grid-template-columns: 1fr;
}

.field,
.field-row {
  display: grid;
  gap: 8px;
}

.field label,
.field-row label,
.label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}

.field input,
.field select,
.field textarea,
.field-row input,
.field-row select,
.field-row textarea {
  width: 100%;
  border: 1px solid rgba(105, 123, 117, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(249, 245, 237, 0.96));
  color: var(--text);
  padding: 14px 15px;
  border-radius: var(--radius-md);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.64);
}

.field textarea,
.field-row textarea {
  resize: vertical;
  min-height: 110px;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.field-row input:focus,
.field-row select:focus,
.field-row textarea:focus {
  border-color: rgba(81, 105, 99, 0.42);
  box-shadow: 0 0 0 4px rgba(112, 137, 131, 0.1);
}

.fixed-template,
.output-box,
.report-box,
.archive-card,
.quote-card,
.science-card,
.kanban-card,
.metric-card,
.sop-card,
.tree-card,
.timeline-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(248, 244, 236, 0.92));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 15px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  position: relative;
}

.archive-card::before,
.science-card::before,
.quote-card::before,
.sop-card::before,
.metric-card::before,
.timeline-card::before,
.kanban-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(138, 90, 80, 0.28), rgba(112, 137, 131, 0.36));
}

.fixed-template strong,
.output-box strong,
.report-box strong,
.archive-card strong,
.quote-card strong,
.science-card strong,
.kanban-card strong,
.metric-card strong,
.sop-card strong,
.tree-card strong,
.timeline-card strong {
  color: var(--primary-deep);
}

.archive-card,
.science-card,
.quote-card,
.sop-card,
.timeline-card {
  box-shadow: var(--shadow-soft);
}

.stepper {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.step-dot {
  min-width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(112, 137, 131, 0.1);
  border: 1px solid rgba(105, 123, 117, 0.14);
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.46);
}

.step-dot.is-active,
.step-dot.is-done {
  background: rgba(112, 137, 131, 0.22);
  color: var(--primary-deep);
}

.step-line {
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, rgba(112, 137, 131, 0.14), rgba(176, 144, 109, 0.2));
}

.chain-note {
  margin-top: 12px;
  margin-bottom: 12px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.7;
}

.chain-summary {
  margin-bottom: 16px;
  padding: 14px 15px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(105, 123, 117, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(247, 243, 235, 0.78));
}

.chain-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.chain-summary-slot {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.chain-summary-text {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.7;
}

.breathing-card {
  text-align: center;
  padding: 22px 18px;
}

.breathing-visual {
  width: 180px;
  height: 180px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.96), rgba(223, 232, 224, 0.9)),
    radial-gradient(circle at 70% 70%, rgba(176, 144, 109, 0.08), transparent 48%);
  border: 1px solid rgba(105, 123, 117, 0.14);
  box-shadow: inset 0 0 42px rgba(255, 255, 255, 0.34), 0 20px 42px rgba(81, 105, 99, 0.14);
  display: grid;
  place-items: center;
  transform: scale(0.9);
  transition: transform 1s ease;
}

.breathing-visual.is-inhale {
  transform: scale(1.1);
}

.breathing-visual.is-hold {
  transform: scale(1.06);
}

.breathing-visual.is-exhale {
  transform: scale(0.86);
}

.breathing-phase {
  font-size: 18px;
  font-weight: 700;
}

.breathing-countdown {
  margin-top: 4px;
  font-size: 44px;
  font-weight: 700;
  color: var(--primary-deep);
}

.full-width {
  width: 100%;
}

.actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.report-list,
.plain-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  line-height: 1.7;
}

.report-highlight-grid .metric-card p,
.report-section-card p,
.quote-pin-banner p {
  margin: 0;
}

.report-grid {
  display: grid;
  gap: 12px;
}

.report-section-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(247, 243, 235, 0.94));
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 16px;
  box-shadow: var(--shadow-soft);
}

.report-section-card--full {
  grid-column: 1 / -1;
}

.report-section-head,
.board-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.report-section-head span,
.column-count,
.board-column-note,
.board-card-note {
  color: var(--text-soft);
  font-size: 13px;
}

.report-section-head strong,
.quote-pin-banner strong {
  font-family: var(--font-display);
}

.report-actions,
.toolbar,
.tag-row,
.tab-row,
.toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.deadline-toolbar {
  gap: 8px;
}

.deadline-toolbar .small-button {
  flex: 1 1 calc(50% - 8px);
  text-align: center;
}

.stage-card.locked {
  opacity: 0.6;
  filter: saturate(0.82);
}

.stage-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(246, 242, 234, 0.94));
}

.stage-card:not(.locked) {
  box-shadow: var(--shadow-soft);
}

.progress-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(112, 137, 131, 0.1);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-deep) 72%, rgba(176, 144, 109, 0.92) 100%);
}

.metric-value {
  margin-top: 8px;
  font-size: 30px;
  font-weight: 700;
  color: var(--primary-deep);
  font-family: var(--font-display);
}

.metric-card {
  min-height: 148px;
}

.recall-timer-box {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  padding: 14px 15px;
  border-radius: var(--radius-lg);
  background: rgba(111, 139, 165, 0.12);
  color: var(--primary-deep);
}

.recall-timer-box strong {
  font-size: 36px;
  line-height: 1;
}

.tree-card {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.tree-art {
  width: 64px;
  height: 92px;
  position: relative;
}

.tree-art::before,
.tree-art::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.tree-art::before {
  bottom: 18px;
  width: 18px;
  height: 38px;
  background: linear-gradient(180deg, #9b856f 0%, #7b6654 100%);
  border-radius: 10px;
}

.tree-art::after {
  bottom: 38px;
  width: 52px;
  height: 42px;
  background: radial-gradient(circle at top, #b7d2c2 0%, #7ea48f 100%);
  border-radius: 50%;
}

.tree-card.sapling .tree-art::after {
  width: 42px;
  height: 32px;
}

.tree-card.lush .tree-art::after {
  width: 58px;
  height: 48px;
}

.viewpoint-summary-grid .metric-card {
  min-height: 138px;
}

.board-column {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(248, 244, 236, 0.86));
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 14px;
}

.board-column-note {
  margin: 0 0 12px;
}

.board-column h4,
.card h3,
.panel h3,
.panel h4 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.gauge {
  display: grid;
  gap: 8px;
}

.gauge-track {
  height: 16px;
  border-radius: 999px;
  background: rgba(111, 139, 165, 0.12);
  overflow: hidden;
}

.gauge-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6c9f8b 0%, #90af77 50%, #b48b63 100%);
}

.fault-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fault-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(184, 114, 114, 0.12);
  border: 1px solid rgba(184, 114, 114, 0.14);
  color: #8a5858;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.fault-tag input {
  accent-color: #8a5a50;
}

.fault-tag.is-active {
  background: rgba(184, 114, 114, 0.2);
  border-color: rgba(138, 90, 80, 0.26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.quote-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.quote-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(111, 139, 165, 0.12);
  color: #4c687a;
  font-size: 12px;
  font-weight: 700;
}

.quote-pill--theory {
  background: rgba(176, 144, 109, 0.14);
  color: #8a6a4a;
}

.quote-pin-banner {
  margin-bottom: 14px;
  padding: 16px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(138, 90, 80, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(247, 240, 231, 0.96));
  box-shadow: var(--shadow-soft);
}

.quote-card.is-pinned {
  border-color: rgba(138, 90, 80, 0.26);
  box-shadow: 0 20px 40px rgba(138, 90, 80, 0.12);
}

.sleep-mode {
  background:
    radial-gradient(circle at top, rgba(132, 154, 147, 0.18), transparent 40%),
    linear-gradient(180deg, rgba(31, 46, 52, 0.98) 0%, rgba(49, 67, 73, 0.96) 100%);
  color: rgba(244, 247, 249, 0.92);
}

.sleep-mode .muted,
.sleep-mode .section-subtitle,
.sleep-mode .step-subtitle {
  color: rgba(231, 239, 246, 0.72);
}

.sleep-mode .panel,
.sleep-mode .card {
  background: rgba(48, 67, 73, 0.58);
  border-color: rgba(186, 203, 198, 0.14);
}

.modal-root {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding:
    max(20px, calc(env(safe-area-inset-top) + 14px))
    20px
    max(20px, calc(env(safe-area-inset-bottom) + 14px));
  background: rgba(31, 51, 68, 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  -webkit-overflow-scrolling: touch;
  z-index: 20;
}

.modal-card {
  width: min(100%, 380px);
  max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 244, 236, 0.98));
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 24px 20px;
  box-shadow: var(--shadow);
}

.modal-card-wide {
  width: min(100%, 620px);
}

.modal-card h3 {
  margin: 0 0 8px;
  font-size: 24px;
  font-family: var(--font-display);
  font-weight: 600;
}

.profile-modal-grid {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.modal-section {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(105, 123, 117, 0.14);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(246, 241, 231, 0.84));
}

.modal-section h4 {
  margin: 0;
  font-size: 18px;
  font-family: var(--font-display);
  color: var(--primary-deep);
}

.auth-mode-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-error {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(138, 90, 80, 0.24);
  background: rgba(138, 90, 80, 0.08);
  color: var(--seal);
  line-height: 1.6;
}

.empty-state {
  text-align: center;
  color: var(--text-soft);
  padding: 26px 18px;
}

.footer-note {
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.7;
}

@media (min-width: 760px) {
  .two-column {
    grid-template-columns: 1fr 1fr;
  }

  .report-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .action-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .column-board {
    grid-template-columns: repeat(3, 1fr);
  }

  .profile-modal-grid {
    grid-template-columns: 0.92fr 1.08fr;
  }

  .account-entry-card {
    grid-template-columns: 1fr auto;
  }
}

@media (max-width: 520px) {
  .two-column,
  .three-column,
  .stats-grid,
  .forest-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    padding-top: 16px;
  }

  .topbar h1 {
    font-size: 18px;
    max-width: 220px;
  }

  .modal-root {
    padding:
      max(12px, calc(env(safe-area-inset-top) + 10px))
      12px
      max(12px, calc(env(safe-area-inset-bottom) + 10px));
  }

  .modal-card {
    max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px);
    border-radius: 24px;
    padding: 20px 16px;
  }

  .profile-trigger {
    min-width: 118px;
    padding-inline: 12px;
  }

  .hero {
    min-height: calc(100vh - 240px);
  }

  .hero-wordmark {
    font-size: 48px;
    letter-spacing: 0.14em;
  }

  .hero-brand-sub {
    gap: 4px;
  }

  .hero-brand-main {
    font-size: 11px;
    letter-spacing: 0.04em;
  }

  .hero-brand-credit {
    font-size: 10px;
    letter-spacing: 0.02em;
  }

  .hero-brand::before {
    width: 150px;
    height: 78px;
  }
}
