:root {
  --ink: #16221e;
  --ink-soft: #53615c;
  --forest: #183b32;
  --forest-2: #245347;
  --sage: #9dbcae;
  --mint: #dcebe3;
  --cream: #f5f3eb;
  --paper: #fffefa;
  --line: #dedfd8;
  --orange: #e77c4c;
  --yellow: #e6bf59;
  --blue: #6f98aa;
  --violet: #8f84b8;
  --danger: #b64b43;
  --shadow: 0 22px 70px rgba(30, 55, 47, 0.12);
  --radius-lg: 26px;
  --radius-md: 18px;
  --sidebar: 242px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--cream);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
svg { display: block; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: var(--sidebar);
  flex-direction: column;
  padding: 30px 22px 24px;
  background: #122e27;
  color: #fff;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 8px 38px;
  color: inherit;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 13px;
  background: rgba(255,255,255,.08);
}
.brand-mark svg { width: 25px; fill: none; stroke: #c7e0d3; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.brand-copy { display: flex; flex-direction: column; font-family: Georgia, "Times New Roman", serif; font-size: 19px; line-height: .9; letter-spacing: -.3px; }
.brand-copy b:last-child { color: #a9cbbb; font-style: italic; font-weight: 500; }
.nav-list { display: flex; flex-direction: column; gap: 7px; }
.nav-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: rgba(255,255,255,.63);
  cursor: pointer;
  text-align: left;
  transition: .2s ease;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; transform: translateX(2px); }
.nav-item.is-active { background: rgba(204,231,218,.13); color: #eef9f3; }
.nav-item svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-item:first-child svg { fill: currentColor; stroke: none; }
.sidebar-bottom { margin-top: auto; }
.member-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(255,255,255,.09), rgba(255,255,255,.035));
}
.member-card::after { position: absolute; right: -22px; top: -24px; width: 78px; height: 78px; border: 1px solid rgba(185,222,204,.2); border-radius: 50%; content: ""; }
.member-card strong { display: block; margin-top: 7px; font: 600 19px Georgia, serif; }
.member-card p { margin: 8px 0 13px; color: rgba(255,255,255,.56); font-size: 11px; line-height: 1.6; }
.member-card small { color: rgba(255,255,255,.48); font-size: 10px; }
.mini-progress { height: 4px; margin-bottom: 7px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.1); }
.mini-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: #b7d9c8; transition: width .5s ease; }
.profile-button {
  display: grid;
  width: 100%;
  grid-template-columns: 38px 1fr 16px;
  align-items: center;
  gap: 11px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  text-align: left;
}
.avatar { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; overflow: hidden; border-radius: 50%; background: #d5e3db center/cover no-repeat; color: var(--forest); font-weight: 700; font-size: 12px; }
.avatar.has-image { color: transparent; box-shadow: inset 0 0 0 1px rgba(24,53,46,.08); }
.profile-button b, .profile-button small { display: block; }
.profile-button b { margin-bottom: 3px; font-size: 13px; }
.profile-button small { color: rgba(255,255,255,.44); font-size: 10px; }
.profile-button svg { width: 16px; fill: none; stroke: rgba(255,255,255,.5); stroke-width: 1.8; }

.main-content { min-height: 100vh; margin-left: var(--sidebar); padding: 0 4.25vw 64px; }
.topbar {
  position: relative;
  z-index: 25;
  display: flex;
  min-height: 126px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(33,55,48,.1);
}
.topbar-kicker { margin: 0 0 7px; color: var(--ink-soft); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.topbar h1 { margin: 0; font: 500 clamp(22px, 2.1vw, 31px)/1.2 Georgia, "Songti SC", serif; letter-spacing: -.4px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.icon-button, .primary-button, .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: .2s ease;
}
.icon-button { width: 44px; height: 44px; border: 1px solid var(--line); background: rgba(255,255,255,.45); }
.icon-button:hover, .secondary-button:hover { background: #fff; transform: translateY(-1px); }
.icon-button svg, .primary-button svg, .secondary-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.primary-button { min-height: 44px; padding: 0 18px; border: 1px solid var(--forest); background: var(--forest); color: #fff; font-weight: 700; font-size: 13px; box-shadow: 0 9px 24px rgba(24,59,50,.16); }
.primary-button:hover { background: #214b40; transform: translateY(-1px); box-shadow: 0 12px 28px rgba(24,59,50,.23); }
.primary-button.wide { width: 100%; min-height: 52px; }
.secondary-button { min-height: 44px; padding: 0 17px; border: 1px solid var(--line); background: rgba(255,255,255,.4); font-weight: 700; font-size: 12px; }
.text-button { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: transparent; color: var(--forest-2); font-weight: 700; font-size: 11px; cursor: pointer; }
.text-button span { transition: transform .2s ease; }
.text-button:hover span { transform: translateX(3px); }
.text-button.light { color: #d7eadd; }
.text-button.centered { display: flex; margin: 14px auto 0; justify-content: center; }

.view { display: none; padding-top: 34px; animation: viewIn .35s ease both; }
.view.is-visible { display: block; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, .75fr); gap: 20px; }
.index-card { position: relative; min-height: 455px; overflow: hidden; padding: 30px 32px 0; border-radius: var(--radius-lg); background: var(--forest); color: #fff; box-shadow: var(--shadow); }
.index-card::after { position: absolute; top: -160px; right: -150px; width: 390px; height: 390px; border: 1px solid rgba(255,255,255,.075); border-radius: 50%; content: ""; }
.card-head { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.card-head.compact { align-items: center; }
.eyebrow { color: #69766f; font-size: 9px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow.light { color: rgba(226,242,234,.62); }
.index-number-row { display: flex; align-items: center; gap: 14px; margin-top: 9px; }
.index-number { font: 500 57px/1 Georgia, serif; letter-spacing: -2px; }
.delta-pill { display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 99px; font-size: 10px; font-weight: 800; }
.delta-pill.positive { background: rgba(158,213,183,.16); color: #bde3ce; }
.delta-pill.negative { background: rgba(240,143,112,.14); color: #f0a98f; }
.delta-pill.neutral { background: rgba(255,255,255,.09); color: rgba(255,255,255,.65); }
.market-state { display: flex; align-items: center; gap: 7px; padding-top: 8px; color: rgba(255,255,255,.56); font-size: 10px; }
.market-state i { width: 7px; height: 7px; border-radius: 50%; background: #89bda5; box-shadow: 0 0 0 5px rgba(137,189,165,.1); }
.dashboard-chart-toolbar { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; }
.dashboard-range-copy { flex: 0 0 auto; color: rgba(255,255,255,.45); font-size: 9px; font-weight: 700; letter-spacing: .04em; }
.dashboard-period-switch { display: flex; min-width: 0; padding: 3px; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; background: rgba(4,24,19,.2); }
.dashboard-period-switch button { min-height: 27px; padding: 0 9px; border: 0; border-radius: 7px; background: transparent; color: rgba(255,255,255,.45); font-size: 8px; white-space: nowrap; cursor: pointer; transition: color .2s ease, background .2s ease, box-shadow .2s ease, transform .16s ease; }
.dashboard-period-switch button:hover { color: rgba(255,255,255,.82); }
.dashboard-period-switch button:active { transform: scale(.96); }
.dashboard-period-switch button.is-active { background: rgba(236,250,242,.13); color: #effaf4; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 5px 13px rgba(3,17,13,.13); animation: periodSelect .24s cubic-bezier(.16,1,.3,1); }
.chart-wrap { position: relative; }
.dashboard-chart { height: 215px; margin: 4px -32px 0; }
.dashboard-chart svg { position: relative; z-index: 1; width: 100%; height: 100%; overflow: visible; cursor: crosshair; touch-action: pan-y; }
.dashboard-chart svg:focus-visible { outline: 1px solid rgba(205,235,220,.45); outline-offset: -3px; }
.dashboard-chart-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: dashboardLineIn .72s cubic-bezier(.16,1,.3,1) forwards; }
.dashboard-chart-area { opacity: 0; animation: dashboardAreaIn .55s .1s ease forwards; }
.dashboard-chart-marker { opacity: .5; }
.dashboard-chart-last { animation: dashboardPointIn .35s .28s cubic-bezier(.16,1,.3,1) both; }
.dashboard-chart-pulse { transform-box: fill-box; transform-origin: center; animation: dashboardPulse 2.2s .7s ease-out infinite; }
.dashboard-chart-baseline { stroke: rgba(255,255,255,.14); stroke-dasharray: 2 6; }
.dashboard-chart-focus line { stroke: rgba(239,249,244,.34); stroke-dasharray: 3 5; }
.dashboard-chart-focus circle { fill: #f4fff9; stroke: #7dad96; stroke-width: 2; }
.chart-tooltip { position: absolute; z-index: 5; padding: 7px 9px; border: 1px solid rgba(255,255,255,.12); border-radius: 8px; background: rgba(8,27,22,.94); color: #fff; box-shadow: 0 8px 24px rgba(1,14,10,.22); font-size: 10px; font-variant-numeric: tabular-nums; pointer-events: none; transform: translate(-50%, -110%); white-space: nowrap; animation: chartTooltipIn .16s ease both; }
@keyframes periodSelect { from { opacity: .65; transform: scale(.95); } }
@keyframes dashboardLineIn { to { stroke-dashoffset: 0; } }
@keyframes dashboardAreaIn { to { opacity: 1; } }
@keyframes dashboardPointIn { from { opacity: 0; transform: scale(.4); transform-origin: center; } }
@keyframes dashboardPulse { 0% { opacity: .7; transform: scale(.65); } 75%, 100% { opacity: 0; transform: scale(1.55); } }
@keyframes chartTooltipIn { from { opacity: 0; transform: translate(-50%, -96%); } }
.index-footer { position: absolute; right: 0; bottom: 0; left: 0; z-index: 2; display: grid; min-height: 70px; grid-template-columns: repeat(3, 1fr) 1.25fr; align-items: center; gap: 16px; padding: 0 32px; border-top: 1px solid rgba(255,255,255,.1); background: rgba(10,39,32,.4); }
.index-footer > div span, .index-footer > div b { display: block; }
.index-footer > div span { margin-bottom: 4px; color: rgba(255,255,255,.42); font-size: 8px; letter-spacing: .06em; }
.index-footer > div b { font-size: 12px; }
.index-footer .text-button { justify-self: end; }

.insight-card { display: flex; min-height: 405px; flex-direction: column; padding: 30px; border: 1px solid rgba(35,65,56,.1); border-radius: var(--radius-lg); background: var(--paper); box-shadow: 0 15px 42px rgba(31,58,50,.06); }
.insight-card h3 { max-width: 260px; margin: 8px 0 0; font: 500 24px/1.2 Georgia, "Songti SC", serif; }
.insight-icon { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 50%; background: var(--mint); color: var(--forest); font-size: 19px; }
.insight-card > p { margin: 26px 0 20px; color: var(--ink-soft); font-size: 13px; line-height: 1.85; }
.insight-card > small { margin-top: auto; color: #9aa29f; font-size: 9px; }
.insight-signal { margin-bottom: 23px; padding: 15px 16px; border-radius: 13px; background: #f4f5ef; }
.insight-signal > span { display: block; margin-bottom: 12px; color: #7a8580; font-size: 8px; font-weight: 800; letter-spacing: .16em; }
.insight-signal > div { display: flex; height: 30px; align-items: flex-end; gap: 6px; }
.insight-signal i { flex: 1; min-height: 5px; border-radius: 3px 3px 1px 1px; background: #c4d7cd; transition: height .5s ease; }

.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 42px 2px 17px; }
.section-heading h2, .panel-head h2 { margin: 5px 0 0; font: 500 22px/1.25 Georgia, "Songti SC", serif; }
.dimension-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.dimension-card { position: relative; overflow: hidden; min-height: 190px; padding: 21px; border: 1px solid rgba(37,67,58,.09); border-radius: var(--radius-md); background: rgba(255,255,255,.68); transition: .22s ease; }
.dimension-card:hover { background: #fff; transform: translateY(-3px); box-shadow: 0 16px 34px rgba(29,55,47,.08); }
.dimension-card .dimension-top { display: flex; align-items: center; justify-content: space-between; }
.dimension-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; }
.dimension-icon svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dimension-change { font-size: 9px; font-weight: 800; }
.dimension-change.up { color: #548a71; }
.dimension-change.down { color: #c06b50; }
.dimension-card h3 { margin: 18px 0 3px; font-size: 13px; }
.dimension-score { display: flex; align-items: baseline; gap: 5px; }
.dimension-score strong { font: 500 30px Georgia, serif; }
.dimension-score span { color: #8b9590; font-size: 10px; }
.dimension-bar { position: absolute; right: 21px; bottom: 23px; left: 21px; height: 4px; border-radius: 99px; background: #e9e9e3; }
.dimension-bar span { display: block; width: 0; height: 100%; border-radius: inherit; transition: width .6s ease; }
.dimension-card p { margin: 8px 0 25px; color: #8a938f; font-size: 9px; }
.dimension-card.study .dimension-icon { background: #e2ede5; color: #527663; }
.dimension-card.study .dimension-bar span { background: #7aa28d; }
.dimension-card.health .dimension-icon { background: #f4e4dc; color: #c1704d; }
.dimension-card.health .dimension-bar span { background: #df8b66; }
.dimension-card.finance .dimension-icon { background: #f5ebcd; color: #a98128; }
.dimension-card.finance .dimension-bar span { background: #d4ac4f; }
.dimension-card.life .dimension-icon { background: #e5e0ef; color: #796da1; }
.dimension-card.life .dimension-bar span { background: #988aba; }

.lower-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 18px; margin-top: 18px; }
.panel { border: 1px solid rgba(35,65,56,.1); border-radius: var(--radius-lg); background: rgba(255,255,255,.65); }
.action-panel, .rhythm-panel { min-height: 270px; padding: 26px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.date-chip { padding: 6px 9px; border-radius: 99px; background: var(--mint); color: var(--forest); font-size: 9px; font-weight: 800; }
.action-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 21px; }
.action-item { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 12px; padding: 14px; border: 1px solid #e3e4dd; border-radius: 14px; background: #fffefa; }
.action-item { color: var(--ink); cursor: pointer; text-align: left; transition: .2s ease; }
.action-item:hover { border-color: #bdcfc5; transform: translateY(-1px); }
.action-item.is-done { border-color: #c8dbd1; background: #eef4f0; }
.action-item.is-done > span:nth-child(2) { opacity: .6; text-decoration: line-through; }
.action-item > span:first-child { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; background: #eff2eb; color: var(--forest); font-weight: 800; font-size: 11px; }
.action-item b, .action-item small { display: block; }
.action-item b { margin-bottom: 3px; font-size: 11px; }
.action-item small { color: #858f8a; font-size: 9px; }
.action-item em { color: #77817c; font-size: 9px; font-style: normal; }
.completion-copy { color: #77817c; font: 500 18px Georgia, serif; }
.rhythm-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-top: 25px; }
.rhythm-day { position: relative; display: grid; aspect-ratio: 1; place-items: center; border: 1px solid #e0e2dc; border-radius: 9px; color: #8f9894; font-size: 9px; }
.rhythm-day.is-complete { border-color: transparent; background: #cfe1d7; color: #2d5a4c; font-weight: 800; }
.rhythm-day.is-today { box-shadow: inset 0 0 0 1px var(--forest); }
.rhythm-day small { position: absolute; top: -10px; color: #8b9590; font-size: 7px; }
.rhythm-legend { display: flex; gap: 14px; margin-top: 20px; color: #909894; font-size: 8px; }
.rhythm-legend span { display: flex; align-items: center; gap: 5px; }
.rhythm-legend i { width: 7px; height: 7px; border-radius: 2px; background: #cfe1d7; }
.rhythm-legend i.empty { border: 1px solid #d5d8d2; background: transparent; }
.rhythm-legend i.today { border: 1px solid var(--forest); background: transparent; }

.page-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 10px 0 28px; }
.page-title-row h2 { margin: 7px 0 6px; font: 500 clamp(29px, 3.2vw, 43px)/1.1 Georgia, "Songti SC", serif; letter-spacing: -.6px; }
.page-title-row p { margin: 0; color: var(--ink-soft); font-size: 12px; }
.period-switch { display: flex; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.5); }
.period-switch button { min-width: 56px; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: #76807c; font-size: 10px; cursor: pointer; }
.period-switch button.is-active { background: var(--forest); color: #fff; box-shadow: 0 5px 15px rgba(24,59,50,.16); }
.trend-main-panel { padding: 28px; }
.trend-legend { display: flex; flex-wrap: wrap; gap: 8px; }
.legend-button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid #e1e2dc; border-radius: 99px; background: transparent; color: #737c78; font-size: 9px; cursor: pointer; }
.legend-button i { width: 7px; height: 7px; border-radius: 50%; background: var(--legend); }
.legend-button.is-active { border-color: transparent; background: #edf1eb; color: var(--ink); font-weight: 800; }
.trend-chart-wrap { height: 390px; margin-top: 22px; }
.trend-chart-wrap svg { width: 100%; height: 100%; overflow: visible; }
.trend-summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 17px; }
.trend-summary-card { padding: 22px; border: 1px solid rgba(35,65,56,.1); border-radius: 18px; background: rgba(255,255,255,.58); }
.trend-summary-card span { color: #79837e; font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.trend-summary-card strong { display: block; margin: 10px 0 5px; font: 500 25px Georgia, serif; }
.trend-summary-card p { margin: 0; color: #7d8782; font-size: 10px; line-height: 1.6; }

.archive-layout { display: grid; grid-template-columns: 1fr 280px; align-items: start; gap: 18px; }
.archive-list-panel { padding: 14px 26px; }
.archive-list { display: flex; flex-direction: column; }
.archive-entry { display: grid; grid-template-columns: 70px 1fr auto; gap: 20px; padding: 23px 0; border-bottom: 1px solid #e3e3dd; }
.archive-entry:last-child { border-bottom: 0; }
.archive-date { color: #6f7974; font-size: 9px; line-height: 1.6; }
.archive-date b { display: block; color: var(--ink); font: 500 22px Georgia, serif; }
.archive-entry h3 { margin: 0 0 9px; font-size: 12px; }
.archive-entry p { margin: 9px 0 0; color: #7e8883; font-size: 10px; }
.archive-scores { display: flex; flex-wrap: wrap; gap: 6px; }
.archive-scores span { padding: 5px 7px; border-radius: 6px; background: #f1f2ec; color: #69736e; font-size: 8px; }
.archive-scores span b { color: #34483f; font-weight: 700; }
.archive-index { text-align: right; }
.archive-index strong { display: block; font: 500 22px Georgia, serif; }
.archive-index span { color: #6b8a7b; font-size: 9px; font-weight: 800; }
.empty-state { padding: 70px 20px; text-align: center; }
.empty-state span { display: grid; width: 54px; height: 54px; margin: 0 auto 18px; place-items: center; border-radius: 50%; background: var(--mint); color: var(--forest); font: italic 700 17px Georgia, serif; }
.empty-state h3 { margin: 0 0 7px; font: 500 20px Georgia, serif; }
.empty-state p { margin: 0 0 20px; color: #7a8580; font-size: 11px; }
.archive-summary { padding: 27px; }
.big-stat { margin: 22px 0; padding-bottom: 22px; border-bottom: 1px solid #dedfd8; }
.big-stat strong, .big-stat span { display: block; }
.big-stat strong { font: 500 52px Georgia, serif; }
.big-stat span { margin-top: 3px; color: #77817c; font-size: 9px; }
.archive-summary dl { margin: 0; }
.archive-summary dl div { display: flex; justify-content: space-between; padding: 10px 0; font-size: 10px; }
.archive-summary dt { color: #7d8782; }
.archive-summary dd { margin: 0; font-weight: 700; }
.danger-text { width: 100%; margin-top: 22px; padding: 11px; border: 1px solid rgba(182,75,67,.2); border-radius: 10px; background: transparent; color: var(--danger); font-size: 9px; cursor: pointer; }

.mobile-nav { display: none; }
.modal {
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 27px;
  background: transparent;
  color: var(--ink);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translate3d(0, 18px, 0) scale(.985);
  transition: opacity .22s ease, transform .34s cubic-bezier(.16,1,.3,1);
  will-change: opacity, transform;
}
.modal.is-open { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
.modal.is-closing { opacity: 0; pointer-events: none; transform: translate3d(0, 10px, 0) scale(.99); }
.modal::backdrop {
  background: rgba(11,25,21,0);
  backdrop-filter: blur(0);
  transition: background .28s ease, backdrop-filter .32s ease;
}
.modal.is-open::backdrop { background: rgba(11,25,21,.64); backdrop-filter: blur(7px); }
.onboarding-modal { width: min(940px, calc(100vw - 36px)); }
.account-button { display: inline-flex; height: 42px; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid #d9ddd7; border-radius: 12px; background: rgba(255,255,255,.68); color: var(--forest); font-size: 10px; font-weight: 800; cursor: pointer; transition: .2s ease; }
.account-button:hover { border-color: #a7b8af; background: #fff; transform: translateY(-1px); }
.language-toggle { display: inline-flex; height: 42px; align-items: center; gap: 6px; padding: 0 11px; border: 1px solid #d9ddd7; border-radius: 12px; background: rgba(255,255,255,.68); color: var(--forest); cursor: pointer; transition: .2s ease; }
.language-toggle:hover { border-color: #a7b8af; background: #fff; transform: translateY(-1px); }
.language-toggle svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.language-toggle b { min-width: 14px; font-size: 9px; letter-spacing: .04em; text-align: center; }
.layout-control { position: relative; }
.layout-toggle {
  display: inline-flex;
  height: 42px;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid #d9ddd7;
  border-radius: 12px;
  background: rgba(255,255,255,.68);
  color: var(--forest);
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.layout-toggle:hover, .layout-toggle[aria-expanded="true"] { border-color: #a7b8af; background: #fff; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(30,55,47,.08); }
.layout-toggle b { font-size: 9px; letter-spacing: .04em; }
.layout-glyph { display: grid; width: 15px; height: 14px; grid-template: 1fr 1fr / 1.15fr .85fr; gap: 2px; }
.layout-glyph i { border-radius: 2px; background: currentColor; opacity: .72; }
.layout-glyph i:first-child { grid-row: 1 / 3; }
.layout-menu {
  position: absolute;
  top: calc(100% + 11px);
  right: 0;
  z-index: 60;
  width: 310px;
  padding: 15px;
  border: 1px solid rgba(28,61,51,.12);
  border-radius: 18px;
  background: rgba(255,254,250,.97);
  box-shadow: 0 24px 64px rgba(25,52,44,.2);
  backdrop-filter: blur(18px);
  transform-origin: calc(100% - 22px) 0;
}
.layout-menu[hidden] { display: none; }
.layout-menu.is-open { animation: layoutMenuIn .28s cubic-bezier(.16,1,.3,1) both; }
.layout-menu.is-closing { animation: layoutMenuOut .16s ease both; pointer-events: none; }
.layout-menu-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 1px 3px 11px; }
.layout-menu-head b { font: 500 17px Georgia, "Songti SC", serif; }
.layout-menu-head small { color: #8d9691; font-size: 8px; }
.layout-options { display: grid; gap: 7px; }
.layout-option {
  display: grid;
  min-height: 67px;
  grid-template-columns: 57px 1fr 20px;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border: 1px solid #e3e5df;
  border-radius: 13px;
  background: rgba(255,255,255,.7);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: border-color .2s ease, background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.layout-option:hover { border-color: #b8c8bf; background: #fff; transform: translateY(-1px); }
.layout-option.is-active { border-color: #90ad9e; background: #f1f6f2; box-shadow: inset 0 0 0 1px rgba(87,127,107,.08); }
.layout-option > span:nth-child(2) b, .layout-option > span:nth-child(2) small { display: block; }
.layout-option > span:nth-child(2) b { margin-bottom: 4px; font-size: 11px; }
.layout-option > span:nth-child(2) small { color: #89928e; font-size: 8px; }
.layout-option em { display: grid; width: 18px; height: 18px; place-items: center; border-radius: 50%; background: var(--forest); color: #fff; font-size: 9px; font-style: normal; opacity: 0; transform: scale(.6); transition: opacity .2s ease, transform .25s cubic-bezier(.16,1,.3,1); }
.layout-option.is-active em { opacity: 1; transform: scale(1); }
.layout-preview { display: grid; width: 57px; height: 43px; gap: 3px; padding: 4px; border: 1px solid #d7ddd8; border-radius: 7px; background: #eef1ec; }
.layout-preview i { border-radius: 2px; background: #b9ccc1; }
.layout-preview i:first-child { background: #315b4e; }
.layout-preview.balanced { grid-template: 1.25fr .75fr / 1.45fr .75fr; }
.layout-preview.balanced i:first-child { grid-row: 1 / 3; }
.layout-preview.focus { grid-template: 1.5fr .5fr .5fr / 1fr; }
.layout-preview.compact { grid-template: 1.15fr .85fr / repeat(2, 1fr); gap: 2px; }
.layout-preview.compact i:first-child { grid-column: 1 / 3; }
@keyframes layoutMenuIn { from { opacity: 0; transform: translateY(-5px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes layoutMenuOut { to { opacity: 0; transform: translateY(-4px) scale(.975); } }
.account-dot { width: 7px; height: 7px; border-radius: 50%; background: #b3bbb7; box-shadow: 0 0 0 4px rgba(179,187,183,.15); }
.account-button.is-authenticated .account-dot { background: #6aa083; box-shadow: 0 0 0 4px rgba(106,160,131,.15); }

.auth-modal { width: min(970px, calc(100vw - 36px)); }
.auth-card { position: relative; display: grid; min-height: 670px; grid-template-columns: .86fr 1.14fr; overflow: hidden; border-radius: 28px; background: var(--paper); }
.auth-identity { position: relative; display: flex; min-height: 670px; flex-direction: column; justify-content: space-between; padding: 46px; overflow: hidden; background: radial-gradient(circle at 80% 5%, rgba(166,207,186,.2), transparent 32%), linear-gradient(155deg, #1c4438 0%, #102b24 100%); color: #fff; }
.auth-identity::before, .auth-identity::after { position: absolute; border: 1px solid rgba(255,255,255,.07); border-radius: 50%; content: ""; }
.auth-identity::before { top: -180px; right: -190px; width: 500px; height: 500px; }
.auth-identity::after { top: -80px; right: -95px; width: 310px; height: 310px; }
.auth-logo { position: relative; z-index: 1; display: grid; width: 49px; height: 49px; place-items: center; border: 1px solid rgba(255,255,255,.23); border-radius: 14px; font: italic 600 16px Georgia, serif; }
.auth-identity > div { position: relative; z-index: 1; }
.auth-identity > div > span { color: rgba(255,255,255,.46); font-size: 8px; font-weight: 800; letter-spacing: 1.6px; }
.auth-identity strong { display: block; margin: 16px 0 20px; color: #c7e2d5; font: 500 37px Georgia, serif; letter-spacing: 2px; }
.auth-identity p { max-width: 280px; margin: 0; color: rgba(255,255,255,.64); font: 500 18px/1.7 Georgia, "Songti SC", serif; }
.auth-identity > small { position: relative; z-index: 1; color: rgba(255,255,255,.38); font-size: 8px; }
.auth-content { position: relative; align-self: center; max-height: min(820px, calc(100vh - 40px)); padding: 54px 76px; overflow: auto; }
.auth-view h2 { margin: 11px 0 8px; color: var(--ink); font: 500 34px/1.2 Georgia, "Songti SC", serif; }
.auth-intro { margin: 0 0 22px; color: #7c8681; font-size: 10px; line-height: 1.7; }
.social-login-grid { display: grid; gap: 8px; }
.social-login { position: relative; display: grid; min-height: 43px; grid-template-columns: 32px 1fr 32px; align-items: center; padding: 0 12px; border: 1px solid #dfe2dc; border-radius: 11px; background: #fff; color: #3e4b45; font-size: 10px; font-weight: 800; cursor: pointer; transition: .18s ease; }
.social-login:hover:not(:disabled) { border-color: #9bad9f; background: #fbfcf8; transform: translateY(-1px); }
.social-login > span { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 8px; font-weight: 900; }
.social-login.wechat > span { background: #e0f5df; color: #1d9a42; }
.social-login.apple > span { background: #eef0ec; color: #111; }
.social-login.google > span { background: #eef2fb; color: #4285f4; font-family: Arial, sans-serif; }
.social-login em { display: none; justify-self: end; color: #969f9a; font-size: 8px; font-style: normal; font-weight: 500; }
.social-login:disabled { cursor: not-allowed; opacity: .58; }
.social-login:disabled em { display: block; }
.auth-divider { display: flex; align-items: center; gap: 13px; margin: 20px 0 4px; color: #a0a7a3; font-size: 8px; }
.auth-divider::before, .auth-divider::after { height: 1px; flex: 1; background: #e6e7e1; content: ""; }
.auth-form > label { display: block; margin-top: 13px; color: #53605a; font-size: 9px; font-weight: 800; }
.auth-form input:not([type="checkbox"]) { display: block; width: 100%; height: 43px; margin-top: 7px; padding: 0 13px; border: 1px solid #dfe1da; border-radius: 10px; outline: none; background: #fafaf6; color: var(--ink); font-size: 11px; transition: .2s ease; }
.auth-form input:focus { border-color: #759587; background: #fff; box-shadow: 0 0 0 3px rgba(117,149,135,.1); }
.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 55px !important; }
.password-wrap button { position: absolute; top: 50%; right: 7px; padding: 5px 7px; border: 0; background: transparent; color: #7d8882; font-size: 8px; cursor: pointer; transform: translateY(-50%); }
.password-hint { display: block; margin-top: 6px; color: #9aa19d; font-size: 8px; font-weight: 500; line-height: 1.5; }
.auth-form-meta { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 4px; }
.check-label { display: flex !important; align-items: center; gap: 7px; margin: 0 !important; color: #77817c !important; font-size: 8px !important; font-weight: 600 !important; cursor: pointer; }
.check-label input { accent-color: var(--forest); }
.check-label.agreement { margin-top: 15px !important; }
.link-button, .auth-switch button { padding: 0; border: 0; background: transparent; color: var(--forest); font-size: 9px; font-weight: 800; cursor: pointer; }
.auth-submit { margin-top: 12px; }
.auth-submit:disabled { cursor: wait; opacity: .65; }
.auth-message { min-height: 15px; margin: 9px 0 0; color: #b85548; font-size: 8px; line-height: 1.5; }
.auth-message.is-success { color: #4f836a; }
.auth-switch { margin: 17px 0 0; color: #929a96; font-size: 9px; text-align: center; }
.invite-field { margin-top: 13px; color: #6c7771; font-size: 8px; }
.invite-field summary { cursor: pointer; font-weight: 700; }
.invite-field label { display: block; margin-top: 8px; }
.code-input { height: 57px !important; font: 600 24px Georgia, serif !important; letter-spacing: 10px; text-align: center; }
.auth-login-link { margin-top: 8px; }
.account-identity-card { display: flex; align-items: center; gap: 14px; margin: 23px 0; padding: 17px; border: 1px solid #dfe3dc; border-radius: 15px; background: #fafaf6; }
.account-identity-card .avatar { width: 48px; height: 48px; flex: 0 0 auto; }
.account-identity-card strong, .account-identity-card b, .account-identity-card small { display: block; }
.account-identity-card strong { margin-bottom: 4px; font-size: 12px; }
.account-identity-card b { color: #527965; font: 600 14px Georgia, serif; letter-spacing: 1px; }
.account-identity-card small { margin-top: 3px; color: #8b9490; font-size: 8px; }
.linked-providers { display: grid; gap: 7px; }
.provider-row { display: grid; min-height: 45px; grid-template-columns: 1fr auto; align-items: center; padding: 0 13px; border: 1px solid #e2e4de; border-radius: 10px; }
.provider-row span { font-size: 9px; font-weight: 800; }
.provider-row small { display: block; margin-top: 2px; color: #8e9792; font-size: 7px; font-weight: 500; }
.provider-row button { padding: 6px 9px; border: 0; border-radius: 8px; background: #edf2ee; color: var(--forest); font-size: 8px; font-weight: 800; cursor: pointer; }
.provider-row button:disabled { color: #979e9a; cursor: not-allowed; }
.account-data-note { margin: 16px 0; padding: 11px 13px; border-radius: 10px; background: #f0f4f0; color: #6d7b74; font-size: 8px; line-height: 1.6; }
.account-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.account-actions .secondary-button { min-height: 40px; }
.account-actions .danger-text { grid-column: 1 / -1; padding: 8px; text-align: center; }
.onboarding-card { position: relative; display: grid; min-height: 610px; grid-template-columns: .9fr 1.1fr; overflow: hidden; border-radius: 27px; background: var(--paper); }
.onboarding-visual { position: relative; overflow: hidden; min-height: 610px; padding: 44px; background: var(--forest); color: #fff; }
.onboarding-visual::before { position: absolute; inset: 0; background: radial-gradient(circle at 20% 25%, rgba(143,189,168,.2), transparent 40%), linear-gradient(150deg, transparent, rgba(0,0,0,.18)); content: ""; }
.visual-logo { position: relative; z-index: 2; display: grid; width: 47px; height: 47px; place-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 14px; font: italic 600 16px Georgia, serif; }
.onboarding-visual svg { position: absolute; right: -35px; bottom: 115px; left: -10px; z-index: 2; width: calc(100% + 45px); height: 220px; fill: none; stroke: #b8ddca; stroke-width: 2.2; }
.onboarding-visual svg .ghost { stroke: rgba(184,221,202,.2); stroke-width: 1; }
.visual-caption { position: absolute; right: 44px; bottom: 48px; left: 44px; z-index: 3; }
.visual-caption span, .visual-caption b { display: block; }
.visual-caption span { margin-bottom: 5px; color: rgba(255,255,255,.52); font-size: 11px; }
.visual-caption b { font: 500 25px Georgia, "Songti SC", serif; }
.orb { position: absolute; border: 1px solid rgba(255,255,255,.07); border-radius: 50%; }
.orb-one { top: -100px; right: -120px; width: 380px; height: 380px; }
.orb-two { top: 55px; right: -40px; width: 260px; height: 260px; }
.onboarding-content { align-self: center; max-height: calc(100vh - 36px); padding: 56px 70px; overflow: auto; }
.onboarding-content h2 { margin: 14px 0 18px; font: 500 39px/1.22 Georgia, "Songti SC", serif; letter-spacing: -.7px; }
.onboarding-content > p { margin: 0 0 26px; color: #68736e; font-size: 12px; line-height: 1.85; }
.welcome-points { display: flex; gap: 20px; margin: 28px 0; padding: 17px 0; border-top: 1px solid #e2e3dc; border-bottom: 1px solid #e2e3dc; }
.welcome-points span { font-size: 10px; font-weight: 700; }
.welcome-points i { display: block; margin-bottom: 7px; color: #8a9690; font: 500 11px Georgia, serif; }
.privacy-note { display: block; margin-top: 22px; color: #949c98; font-size: 9px; text-align: center; }
.avatar-editor { margin: 16px 0 6px; }
.avatar-select { display: grid; width: 100%; grid-template-columns: 58px 1fr auto; align-items: center; gap: 13px; padding: 10px 12px; border: 1px solid #dfe1da; border-radius: 14px; background: #fafaf6; color: var(--ink); cursor: pointer; text-align: left; transition: .2s ease; }
.avatar-select:hover { border-color: #8da397; background: #fff; }
.avatar-preview { width: 58px; height: 58px; font-size: 16px; }
.avatar-select b, .avatar-select small { display: block; }
.avatar-select b { margin-bottom: 4px; font-size: 10px; }
.avatar-select small { color: #89928d; font-size: 8px; font-weight: 500; line-height: 1.45; }
.avatar-select em { color: #527965; font-size: 8px; font-style: normal; font-weight: 800; }
.avatar-crop-editor { display: grid; grid-template-columns: minmax(150px, 210px) 1fr; align-items: center; gap: 18px; margin-top: 12px; padding: 14px; border-radius: 15px; background: #edf2ee; }
.avatar-crop-editor[hidden] { display: none; }
.avatar-crop-editor canvas { width: 100%; aspect-ratio: 1; border-radius: 50%; background: #d8e2dc; box-shadow: 0 0 0 5px #fff, 0 8px 22px rgba(24,53,46,.14); cursor: grab; touch-action: none; }
.avatar-crop-editor canvas:active { cursor: grabbing; }
.avatar-crop-controls p { margin: 0 0 14px; color: #65716b; font-size: 9px; }
.avatar-crop-controls label { display: grid; gap: 7px; color: #526159; font-size: 8px; font-weight: 800; }
.avatar-crop-controls input { width: 100%; accent-color: var(--forest); }
.avatar-crop-controls > div { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 15px; }
.avatar-crop-controls button { min-height: 36px; padding: 0 10px; }
.avatar-remove { margin: 8px 0 0 71px; padding: 0; border: 0; background: transparent; color: #a05a51; font-size: 8px; font-weight: 800; cursor: pointer; }
.avatar-error { min-height: 13px; margin: 5px 0 0 71px; color: #b85548; font-size: 8px; }
.modal-close { position: absolute; top: 17px; right: 18px; z-index: 9; display: grid; width: 34px; height: 34px; place-items: center; border: 0; border-radius: 50%; background: #f1f2ec; color: #69736e; cursor: pointer; font-size: 22px; line-height: 1; }
.modal-close.static { position: static; flex: 0 0 auto; }
.field-label { position: relative; display: block; margin: 17px 0; color: #53605a; font-size: 10px; font-weight: 800; }
.field-label input, .field-label textarea { display: block; width: 100%; margin-top: 8px; padding: 13px 14px; border: 1px solid #dfe1da; border-radius: 11px; outline: none; background: #fafaf6; color: var(--ink); font-weight: 500; resize: vertical; transition: .2s ease; }
.field-label input:focus, .field-label textarea:focus { border-color: #759587; background: #fff; box-shadow: 0 0 0 3px rgba(117,149,135,.1); }
.choice-field { margin: 18px 0; padding: 0; border: 0; }
.choice-field legend { margin-bottom: 9px; color: #53605a; font-size: 10px; font-weight: 800; }
.choice-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.choice-row.goal-row { grid-template-columns: repeat(4, 1fr); }
.choice-row input { position: absolute; opacity: 0; }
.choice-row span { display: block; padding: 10px 7px; border: 1px solid #dfe1da; border-radius: 9px; color: #77817c; font-size: 9px; text-align: center; cursor: pointer; }
.choice-row input:checked + span { border-color: var(--forest); background: var(--forest); color: #fff; font-weight: 800; }

.record-modal { width: min(760px, calc(100vw - 32px)); }
.record-card { max-height: min(860px, calc(100vh - 30px)); overflow: auto; padding: 35px 40px; border-radius: 27px; background: var(--paper); }
.record-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.record-head h2 { margin: 7px 0 5px; font: 500 29px Georgia, "Songti SC", serif; }
.record-head p { margin: 0; color: #7a847f; font-size: 10px; }
.record-date-row { display: flex; justify-content: space-between; margin: 24px 0 6px; padding: 11px 0; border-top: 1px solid #e1e2dc; border-bottom: 1px solid #e1e2dc; color: #77817c; font-size: 9px; }
.score-section { display: grid; grid-template-columns: 160px 1fr; align-items: center; gap: 20px; padding: 16px 0; border-bottom: 1px solid #e8e8e2; }
.score-label { display: grid; grid-template-columns: 33px 1fr; align-items: center; gap: 10px; }
.score-label > span { display: grid; width: 33px; height: 33px; place-items: center; border-radius: 9px; }
.score-label svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.score-label b, .score-label small { display: block; }
.score-label b { margin-bottom: 3px; font-size: 11px; }
.score-label small { color: #8b9490; font-size: 8px; }
.score-section[data-dimension="study"] .score-label > span { background: #e2ede5; color: #527663; }
.score-section[data-dimension="health"] .score-label > span { background: #f4e4dc; color: #c1704d; }
.score-section[data-dimension="finance"] .score-label > span { background: #f5ebcd; color: #a98128; }
.score-section[data-dimension="life"] .score-label > span { background: #e5e0ef; color: #796da1; }
.score-section[data-dimension="mood"] .score-label > span { background: #f4e6da; color: #b8704f; font-size: 20px; }
.score-options { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.score-options input { position: absolute; opacity: 0; }
.score-options label { cursor: pointer; }
.score-options span { display: grid; min-height: 47px; place-items: center; padding: 6px 2px; border: 1px solid #e0e1da; border-radius: 9px; color: #828b87; font-size: 8px; transition: .15s ease; }
.score-options span b { display: block; color: #5b6761; font-size: 12px; }
.score-options input:checked + span { border-color: var(--forest); background: var(--forest); color: rgba(255,255,255,.7); box-shadow: 0 7px 15px rgba(24,59,50,.13); }
.score-options input:checked + span b { color: #fff; }
.note-field { margin-top: 20px; }
.note-field > span { color: #9aa29e; font-weight: 500; }
.note-field small { position: absolute; right: 10px; bottom: 9px; color: #a0a7a4; font-size: 8px; }
.record-submit-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 22px; }
.record-submit-row p { display: flex; align-items: center; gap: 6px; margin: 0; color: #84908a; font-size: 8px; }
.record-submit-row p i { width: 6px; height: 6px; border-radius: 50%; background: #8ab39f; }

.method-modal { width: min(650px, calc(100vw - 32px)); }
.method-card { position: relative; padding: 42px; border-radius: 25px; background: var(--paper); }
.method-card h2 { margin: 10px 0 12px; font: 500 31px Georgia, "Songti SC", serif; }
.method-card > p { color: #6c7771; font-size: 11px; line-height: 1.8; }
.formula { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 25px 0; padding: 18px; border-radius: 13px; background: var(--forest); color: #d8e8df; font-size: 9px; }
.formula b { color: #88aa9b; }
.method-card ul { margin: 0 0 25px; padding: 0; list-style: none; }
.method-card li { display: grid; grid-template-columns: 90px 1fr; gap: 15px; padding: 11px 0; border-bottom: 1px solid #e5e5df; font-size: 10px; }
.method-card li b { color: var(--forest); }
.method-card li span { color: #77817c; }
.confirm-modal { width: min(410px, calc(100vw - 32px)); }
.confirm-card { padding: 34px; border-radius: 24px; background: var(--paper); text-align: center; }
.confirm-icon { display: grid; width: 46px; height: 46px; margin: 0 auto 16px; place-items: center; border-radius: 50%; background: #f5dfda; color: var(--danger); font-weight: 800; }
.confirm-card h2 { margin: 0 0 8px; font: 500 25px Georgia, serif; }
.confirm-card p { color: #78827d; font-size: 10px; line-height: 1.7; }
.confirm-card > div { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 22px; }
.danger-button { border: 0; border-radius: 11px; background: var(--danger); color: #fff; font-weight: 700; font-size: 11px; cursor: pointer; }
.toast { position: fixed; right: 25px; bottom: 25px; z-index: 100; display: flex; min-width: 270px; align-items: center; gap: 12px; padding: 14px 17px; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; background: #18352e; color: #fff; box-shadow: 0 20px 55px rgba(15,34,28,.25); opacity: 0; pointer-events: none; transform: translateY(20px); transition: .3s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast > span { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: rgba(181,219,201,.18); color: #b6dbc8; }
.toast b, .toast small { display: block; }
.toast b { margin-bottom: 2px; font-size: 11px; }
.toast small { color: rgba(255,255,255,.55); font-size: 8px; }

/* Motion polish: dialog content, controls, and tactile selections. */
.auth-view.is-entering,
#onboarding-step-welcome.is-entering,
#onboarding-step-profile.is-entering {
  animation: contentReveal .34s cubic-bezier(.16,1,.3,1) both;
}
@keyframes contentReveal {
  from { opacity: 0; transform: translate3d(0, 10px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
button:not(:disabled) { -webkit-tap-highlight-color: transparent; }
.icon-button:not(:disabled):active,
.primary-button:not(:disabled):active,
.secondary-button:not(:disabled):active,
.account-button:not(:disabled):active,
.nav-item:not(:disabled):active,
.mobile-nav button:not(:disabled):active,
.modal-close:not(:disabled):active {
  transform: translateY(1px) scale(.975);
  transition-duration: .08s;
}
.choice-row span,
.score-options span { transition: transform .16s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease; }
.choice-row label:active span { transform: scale(.97); }
.score-options label:active span { transform: scale(.96); }
.choice-row input:checked + span,
.score-options input:checked + span { animation: choicePop .22s cubic-bezier(.16,1,.3,1); }
@keyframes choicePop {
  0% { transform: scale(.96); }
  70% { transform: scale(1.025); }
  100% { transform: scale(1); }
}

@media (max-width: 1160px) {
  :root { --sidebar: 205px; }
  .main-content { padding-right: 3vw; padding-left: 3vw; }
  .dashboard-grid { grid-template-columns: 1.45fr .8fr; }
  .index-card { padding-right: 25px; padding-left: 25px; }
  .dashboard-chart { margin-right: -25px; margin-left: -25px; }
  .insight-card { padding: 25px; }
  .dimension-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 880px) {
  :root { --sidebar: 0px; }
  .sidebar { display: none; }
  .main-content { margin: 0; padding: 0 22px 104px; }
  .topbar { min-height: 96px; }
  .topbar h1 { font-size: 23px; }
  .dashboard-grid, .lower-grid { grid-template-columns: 1fr; }
  .insight-card { min-height: 320px; }
  .mobile-nav { position: fixed; right: 12px; bottom: 12px; left: 12px; z-index: 30; display: grid; height: 68px; grid-template-columns: repeat(5, 1fr); align-items: center; padding: 7px; border: 1px solid rgba(255,255,255,.7); border-radius: 20px; background: rgba(255,254,250,.92); box-shadow: 0 15px 45px rgba(30,55,47,.18); backdrop-filter: blur(18px); }
  .mobile-nav button { display: flex; flex-direction: column; align-items: center; gap: 3px; border: 0; background: transparent; color: #87908c; font-size: 8px; cursor: pointer; }
  .mobile-nav button.is-active { color: var(--forest); font-weight: 800; }
  .mobile-nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .mobile-nav button:first-child svg { fill: currentColor; stroke: none; }
  .mobile-nav .record-fab { width: 48px; height: 48px; margin: -25px auto 0; justify-content: center; border-radius: 50%; background: var(--forest); color: #fff; box-shadow: 0 9px 20px rgba(24,59,50,.25); }
  .archive-layout { grid-template-columns: 1fr; }
  .archive-summary { order: -1; }
  .onboarding-card { grid-template-columns: 1fr; }
  .onboarding-visual { display: none; }
  .onboarding-content { padding: 55px 42px 42px; }
  .auth-card { grid-template-columns: 1fr; }
  .auth-identity { display: none; }
  .auth-content { padding: 55px 55px 42px; }
}

@media (max-width: 620px) {
  .main-content { padding-right: 15px; padding-left: 15px; }
  .topbar { min-height: 88px; }
  .topbar h1 { max-width: 250px; font-size: 19px; }
  .topbar-kicker { font-size: 8px; }
  .icon-button { display: none; }
  .account-button { width: 40px; justify-content: center; padding: 0; }
  .account-button #account-button-label { display: none; }
  .language-toggle { width: 40px; justify-content: center; padding: 0; }
  .language-toggle svg { display: none; }
  .primary-button { padding: 0 13px; }
  .topbar .primary-button span { display: none; }
  .view { padding-top: 22px; }
  .dashboard-grid { gap: 13px; }
  .index-card { min-height: 470px; padding: 24px 21px 0; border-radius: 22px; }
  .index-number { font-size: 50px; }
  .market-state { display: none; }
  .dashboard-chart-toolbar { margin-top: 16px; }
  .dashboard-range-copy { display: none; }
  .dashboard-period-switch { width: 100%; }
  .dashboard-period-switch button { flex: 1; padding: 0 5px; font-size: 7px; }
  .dashboard-chart { height: 215px; margin: 5px -21px 0; }
  .index-footer { grid-template-columns: repeat(3, 1fr); padding: 0 20px; }
  .index-footer .text-button { display: none; }
  .index-footer > div span { font-size: 7px; }
  .index-footer > div b { font-size: 10px; }
  .insight-card { min-height: 350px; padding: 24px; border-radius: 22px; }
  .insight-card h3 { font-size: 22px; }
  .section-heading { margin-top: 30px; }
  .section-heading h2 { font-size: 19px; }
  .section-heading .text-button { display: none; }
  .dimension-grid { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .dimension-card { min-height: 178px; padding: 17px; }
  .dimension-card h3 { margin-top: 14px; }
  .dimension-card .dimension-bar { right: 17px; left: 17px; }
  .lower-grid { gap: 12px; }
  .action-panel, .rhythm-panel { padding: 21px; border-radius: 22px; }
  .action-list { grid-template-columns: 1fr; }
  .page-title-row { display: block; }
  .page-title-row h2 { font-size: 31px; }
  .period-switch { width: max-content; margin-top: 20px; }
  .trend-main-panel { padding: 18px 12px; }
  .trend-chart-wrap { height: 310px; }
  .trend-summary-grid { grid-template-columns: 1fr; gap: 10px; }
  .archive-entry { grid-template-columns: 50px 1fr; gap: 10px; }
  .archive-index { grid-column: 2; text-align: left; }
  .archive-list-panel { padding: 8px 17px; }
  .onboarding-content { padding: 50px 25px 30px; }
  .onboarding-content h2 { font-size: 32px; }
  .avatar-crop-editor { grid-template-columns: 1fr; }
  .avatar-crop-editor canvas { width: min(190px, 80%); justify-self: center; }
  .welcome-points { gap: 10px; }
  .auth-modal { width: calc(100vw - 20px); }
  .auth-card { min-height: min(720px, calc(100vh - 20px)); border-radius: 22px; }
  .auth-content { max-height: calc(100vh - 20px); padding: 47px 22px 28px; }
  .auth-view h2 { font-size: 29px; }
  .social-login { min-height: 42px; }
  .account-actions { grid-template-columns: 1fr; }
  .account-actions .danger-text { grid-column: 1; }
  .choice-row, .choice-row.goal-row { grid-template-columns: repeat(2, 1fr); }
  .record-card { padding: 28px 20px; }
  .score-section { grid-template-columns: 1fr; gap: 11px; }
  .score-options { gap: 4px; }
  .score-options span { min-height: 45px; font-size: 7px; }
  .record-submit-row { display: block; }
  .record-submit-row p { margin-bottom: 12px; }
  .record-submit-row .primary-button { width: 100%; }
  .method-card { padding: 34px 23px 23px; }
  .method-card h2 { font-size: 27px; }
  .formula { align-items: flex-start; flex-direction: column; }
  .method-card li { grid-template-columns: 76px 1fr; }
  .toast { right: 15px; bottom: 93px; left: 15px; min-width: 0; }
}

/* Selectable dashboard layouts. The preference changes arrangement only. */
.sidebar, .main-content, .topbar, .view, .dashboard-grid, .index-card, .dashboard-chart, .insight-card, .dimension-grid, .dimension-card, .lower-grid, .panel {
  transition: width .42s cubic-bezier(.16,1,.3,1), margin .42s cubic-bezier(.16,1,.3,1), padding .42s cubic-bezier(.16,1,.3,1), min-height .42s cubic-bezier(.16,1,.3,1), gap .42s cubic-bezier(.16,1,.3,1), border-radius .42s cubic-bezier(.16,1,.3,1), background-color .3s ease, transform .25s ease, opacity .3s ease, filter .3s ease, box-shadow .3s ease;
}
html.is-layout-changing .view.is-visible > * { animation: layoutContentShift .48s cubic-bezier(.16,1,.3,1) both; }
html.is-layout-changing .view.is-visible > *:nth-child(2) { animation-delay: .035s; }
html.is-layout-changing .view.is-visible > *:nth-child(3) { animation-delay: .07s; }
html.is-language-changing .sidebar,
html.is-language-changing .main-content,
html.is-language-changing .mobile-nav { animation: languageContentSwap .42s cubic-bezier(.16,1,.3,1) both; }
html.is-language-changing .language-toggle { animation: languageControlSwap .42s cubic-bezier(.16,1,.3,1) both; }
@keyframes layoutContentShift {
  from { opacity: .62; transform: translate3d(0, 10px, 0) scale(.992); }
  to { opacity: 1; transform: none; }
}
@keyframes languageContentSwap {
  0% { opacity: .5; filter: blur(2px); transform: translate3d(0, 4px, 0); }
  100% { opacity: 1; filter: blur(0); transform: none; }
}
@keyframes languageControlSwap {
  0% { transform: rotateY(0deg) scale(.92); }
  100% { transform: rotateY(360deg) scale(1); }
}

@media (min-width: 881px) {
  html[data-layout="focus"] .main-content { padding-right: max(4.25vw, 44px); padding-left: max(4.25vw, 44px); }
  html[data-layout="focus"] .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  html[data-layout="focus"] .index-card { min-height: 515px; padding-right: 38px; padding-left: 38px; }
  html[data-layout="focus"] .dashboard-chart { height: 260px; margin-right: -38px; margin-left: -38px; }
  html[data-layout="focus"] .insight-card {
    min-height: 230px;
    grid-template: auto auto auto / minmax(260px, .8fr) minmax(340px, 1.2fr);
    grid-template-areas: "head body" "signal body" "foot foot";
    column-gap: 42px;
    padding: 28px 32px;
  }
  html[data-layout="focus"] .insight-card .card-head { grid-area: head; }
  html[data-layout="focus"] .insight-card > p { grid-area: body; align-self: center; margin: 0; font-size: 14px; }
  html[data-layout="focus"] .insight-signal { grid-area: signal; margin: 10px 0 0; }
  html[data-layout="focus"] .insight-card > small { grid-area: foot; margin: 14px 0 0; }
  html[data-layout="focus"] .dimension-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html[data-layout="focus"] .dimension-card { min-height: 165px; }
  html[data-layout="focus"] .lower-grid { grid-template-columns: minmax(0, 1fr); }

  html[data-layout="compact"] { --sidebar: 205px; --radius-lg: 21px; --radius-md: 15px; }
  html[data-layout="compact"] .sidebar { padding: 24px 16px 20px; }
  html[data-layout="compact"] .brand { margin-bottom: 25px; }
  html[data-layout="compact"] .nav-list { gap: 4px; }
  html[data-layout="compact"] .nav-item { padding: 11px 13px; }
  html[data-layout="compact"] .member-card { margin-bottom: 14px; padding: 14px; }
  html[data-layout="compact"] .main-content { padding-right: 2.5vw; padding-bottom: 44px; padding-left: 2.5vw; }
  html[data-layout="compact"] .topbar { min-height: 98px; }
  html[data-layout="compact"] .view { padding-top: 24px; }
  html[data-layout="compact"] .dashboard-grid { grid-template-columns: minmax(0, 1.55fr) minmax(265px, .65fr); gap: 14px; }
  html[data-layout="compact"] .index-card { min-height: 435px; padding: 25px 26px 0; }
  html[data-layout="compact"] .dashboard-chart { height: 190px; margin-right: -26px; margin-left: -26px; }
  html[data-layout="compact"] .index-footer { min-height: 64px; padding-right: 26px; padding-left: 26px; }
  html[data-layout="compact"] .insight-card { min-height: 435px; padding: 24px; }
  html[data-layout="compact"] .insight-card > p { margin: 20px 0 16px; font-size: 12px; }
  html[data-layout="compact"] .section-heading { margin-top: 28px; margin-bottom: 13px; }
  html[data-layout="compact"] .dimension-grid { gap: 10px; }
  html[data-layout="compact"] .dimension-card { min-height: 165px; padding: 18px; }
  html[data-layout="compact"] .dimension-card h3 { margin-top: 13px; }
  html[data-layout="compact"] .dimension-bar { right: 18px; bottom: 18px; left: 18px; }
  html[data-layout="compact"] .lower-grid { gap: 12px; margin-top: 12px; }
  html[data-layout="compact"] .action-panel, html[data-layout="compact"] .rhythm-panel { min-height: 245px; padding: 22px; }
  html[data-layout="compact"] .page-title-row { margin-bottom: 20px; }
  html[data-layout="compact"] .trend-main-panel { padding: 22px; }
  html[data-layout="compact"] .trend-chart-wrap { height: 330px; }
  html[data-layout="compact"] .trend-summary-grid { gap: 11px; margin-top: 12px; }
}

@media (max-width: 1160px) {
  .layout-toggle { width: 44px; justify-content: center; padding: 0; }
  .layout-toggle > b { display: none; }
}

@media (max-width: 880px) {
  html[data-layout="focus"] .index-card { min-height: 495px; }
  html[data-layout="focus"] .dashboard-chart { height: 235px; }
  html[data-layout="focus"] .insight-card { min-height: 325px; }
  html[data-layout="compact"] .main-content { padding-bottom: 96px; }
  html[data-layout="compact"] .topbar { min-height: 82px; }
  html[data-layout="compact"] .view { padding-top: 18px; }
  html[data-layout="compact"] .index-card { min-height: 445px; }
  html[data-layout="compact"] .dashboard-chart { height: 195px; }
  html[data-layout="compact"] .insight-card { min-height: 290px; }
  html[data-layout="compact"] .dimension-card { min-height: 160px; }
  html[data-layout="compact"] .action-panel, html[data-layout="compact"] .rhythm-panel { min-height: 235px; padding: 19px; }
}

@media (max-width: 620px) {
  .topbar { gap: 12px; }
  .topbar-actions { gap: 6px; }
  .topbar h1 { max-width: 185px; }
  .layout-toggle, .language-toggle, .account-button { width: 36px; height: 38px; }
  .topbar .primary-button { min-height: 38px; padding-right: 11px; padding-left: 11px; }
  .layout-menu { position: fixed; top: 72px; right: 15px; width: min(310px, calc(100vw - 30px)); }
  html[data-layout="compact"] .index-card { min-height: 430px; }
  html[data-layout="compact"] .dashboard-chart { height: 185px; }
  html[data-layout="compact"] .insight-card { min-height: 270px; padding: 21px; }
  html[data-layout="compact"] .section-heading { margin-top: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
