/* ==========================================================================
   转势 SHIFT — 视觉系统
   方向：古籍仪器。宣纸底、墨色字、朱砂印、极细规则线、等宽数字。
   ========================================================================== */

:root {
  --paper: #f4efe4;
  --paper-2: #ece5d4;
  --paper-3: #e2d8c2;
  --ink: #1b1916;
  --ink-2: #4a4439;
  --ink-3: #8a8171;
  --line: #d8ceb8;
  --line-soft: #e6ddca;
  --cinnabar: #b03a2e;
  --cinnabar-soft: #f1dcd6;
  --jade: #3e6b5c;
  --jade-soft: #dbe7e0;
  --gold: #94711f;
  --gold-soft: #efe3c4;
  --amber: #b97b2a;

  --r-sm: 2px;
  --r-md: 3px;
  --r-lg: 5px;

  --font-display: "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif CJK SC", "SimSun", serif;
  --font-body: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans CJK SC", sans-serif;
  --font-mono: "Cascadia Mono", "Consolas", "SF Mono", "Menlo", "Roboto Mono", monospace;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.75;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.055'/%3E%3C/svg%3E");
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1100px 520px at 88% -8%, rgba(255, 250, 235, .85), transparent 70%),
    radial-gradient(900px 500px at -10% 110%, rgba(224, 212, 186, .5), transparent 70%);
}

::selection { background: var(--cinnabar); color: var(--paper); }

a { color: inherit; text-decoration: none; }

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

:focus-visible { outline: 2px solid var(--cinnabar); outline-offset: 3px; border-radius: 1px; }

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

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

.chips button {
  padding: 5px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-size: 12.5px;
  letter-spacing: .06em;
  cursor: pointer;
  transition: background .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease);
}

.chips button:hover { border-color: var(--ink-3); color: var(--ink); }

.chips button[aria-pressed='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.banner .btn { flex: 0 0 auto; white-space: nowrap; }

.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 10px 14px;
  margin-bottom: 20px;
  border: 1px dashed var(--line);
  border-radius: var(--r-sm);
  background: rgba(239, 227, 196, .4);
  font-size: 12px;
  color: var(--ink-2);
}

/* ---------- 骨架 ---------- */

.shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100vh;
}

.rail {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 36px;
  height: 100vh;
  padding: 30px 24px 26px;
  border-right: 1px solid var(--line-soft);
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand-seal {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--cinnabar);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}

.brand-name {
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: .18em;
  line-height: 1.1;
}

.brand-name em {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 8.5px;
  letter-spacing: .42em;
  color: var(--ink-3);
  margin-top: 5px;
}

.nav { display: flex; flex-direction: column; }

.nav a {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 11px 0;
  color: var(--ink-3);
  font-size: 14px;
  letter-spacing: .12em;
  transition: color .18s var(--ease);
}

.nav a i {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 9.5px;
  letter-spacing: .08em;
  opacity: .8;
}

.nav a::after {
  content: "";
  position: absolute;
  left: -24px;
  top: 50%;
  width: 10px;
  height: 1px;
  background: var(--cinnabar);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s var(--ease);
}

.nav a:hover { color: var(--ink); }

.nav a[aria-current="page"] { color: var(--ink); }

.nav a[aria-current="page"]::after { transform: scaleX(1); }

.rail-foot { margin-top: auto; }

.rail-foot p {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-3);
  letter-spacing: .08em;
}

.rail-foot span { font-size: 9.5px; letter-spacing: .12em; color: var(--ink-3); opacity: .7; }

.view {
  width: 100%;
  max-width: 1020px;
  margin: 0 auto;
  padding: 40px 44px 120px;
}

.tabbar { display: none; }

/* ---------- 页头 ---------- */

.page-head { margin-bottom: 34px; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--cinnabar);
}

.page-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 31px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: .06em;
}

.page-sub {
  margin: 10px 0 0;
  max-width: 46em;
  color: var(--ink-2);
  font-size: 13.5px;
}

.head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* ---------- 卡片 ---------- */

.card {
  position: relative;
  padding: 24px;
  background: rgba(255, 252, 244, .68);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.card--flush { padding: 0; overflow: hidden; }

.card--ink { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.card-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: .14em;
}

.card-note { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .1em; color: var(--ink-3); }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stack { display: grid; gap: 16px; }

hr.rule { height: 1px; border: 0; margin: 26px 0; background: var(--line-soft); }

/* ---------- 主视觉（今日） ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  padding: 30px 32px 30px 26px;
  overflow: hidden;
}

.hero::after {
  content: "势";
  position: absolute;
  right: -14px;
  bottom: -58px;
  font-family: var(--font-display);
  font-size: 240px;
  line-height: 1;
  color: var(--ink);
  opacity: .035;
  pointer-events: none;
}

.gauge { position: relative; display: grid; place-items: center; }

.gauge svg { display: block; width: 246px; height: 246px; transform: rotate(-90deg); }

.gauge-track { fill: none; stroke: var(--line); stroke-width: 2; }

.gauge-arc {
  fill: none;
  stroke: var(--ink);
  stroke-width: 7;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.1s var(--ease), stroke .4s var(--ease);
}

.gauge-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 2px;
  text-align: center;
}

.gauge-score {
  font-family: var(--font-mono);
  font-size: 46px;
  line-height: 1;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}

.gauge-label {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: .4em;
  color: var(--ink-3);
  padding-left: .4em;
}

.gauge-delta { font-family: var(--font-mono); font-size: 10px; color: var(--ink-3); margin-top: 4px; }

.verdict h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 400;
  letter-spacing: .1em;
}

.verdict p { margin: 0 0 14px; color: var(--ink-2); max-width: 34em; }

.meta-row { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12px; color: var(--ink-3); }

.meta-row b { font-family: var(--font-mono); font-weight: 400; color: var(--ink-2); }

/* ---------- 闸门 ---------- */

.gate { display: grid; gap: 0; }

.gate-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 13px 0;
  border-top: 1px solid var(--line-soft);
}

.gate-row:first-child { border-top: 0; }

.gate-key { font-family: var(--font-display); font-size: 13.5px; letter-spacing: .1em; }

.gate-why { font-size: 12px; color: var(--ink-3); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: .08em;
  white-space: nowrap;
}

.pill--ok { color: var(--jade); }
.pill--warn { color: var(--gold); }
.pill--bad { color: var(--cinnabar); }
.pill--mute { color: var(--ink-3); }

/* ---------- 建议 ---------- */

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

.advice-item { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; }

.advice-num {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--cinnabar);
  padding-top: 3px;
  letter-spacing: .04em;
}

.advice-item h4 {
  margin: 0 0 3px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .02em;
}

.advice-item p { margin: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.7; }

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 18px;
  border: 1px solid var(--ink);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink);
  font-size: 12.5px;
  letter-spacing: .12em;
  cursor: pointer;
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}

.btn:hover { background: var(--ink); color: var(--paper); }

.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: var(--cinnabar); border-color: var(--cinnabar); }

.btn--seal { background: var(--cinnabar); border-color: var(--cinnabar); color: var(--paper); }
.btn--seal:hover { background: var(--ink); border-color: var(--ink); }

.btn--ghost { border-color: transparent; color: var(--ink-2); padding-left: 8px; padding-right: 8px; }
.btn--ghost:hover { background: transparent; color: var(--cinnabar); }

.btn--sm { min-height: 32px; padding: 5px 12px; font-size: 11.5px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .4; cursor: not-allowed; }

/* ---------- 表单 ---------- */

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

.field-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  letter-spacing: .06em;
}

.field-label em { font-style: normal; font-size: 11px; color: var(--ink-3); }

.field-hint { font-size: 11.5px; color: var(--ink-3); line-height: 1.6; }

.input, .select, .textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgba(255, 253, 247, .8);
  font-size: 13.5px;
}

.input:focus, .select:focus, .textarea:focus { border-color: var(--ink); outline: none; }

.textarea { min-height: 84px; resize: vertical; line-height: 1.7; }

.range { -webkit-appearance: none; appearance: none; width: 100%; height: 26px; background: transparent; cursor: pointer; }

.range::-webkit-slider-runnable-track {
  height: 2px;
  background: var(--line);
}

.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -7px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  transition: transform .15s var(--ease), background .15s var(--ease);
}

.range:hover::-webkit-slider-thumb { background: var(--cinnabar); border-color: var(--cinnabar); }

.range::-moz-range-track { height: 2px; background: var(--line); }
.range::-moz-range-thumb {
  width: 15px; height: 15px; border: 1.5px solid var(--ink);
  border-radius: 50%; background: var(--paper);
}

.range-scale {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: .04em;
}

.dim-row { padding: 14px 0; border-top: 1px solid var(--line-soft); }
.dim-row:first-child { border-top: 0; padding-top: 0; }

.dim-val {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-2);
  min-width: 2.4em;
  text-align: right;
}

/* ---------- 图表 ---------- */

.chart { position: relative; }

.chart svg { display: block; width: 100%; height: auto; overflow: visible; }

.chart-grid { stroke: var(--line-soft); stroke-width: 1; }
.chart-axis { fill: var(--ink-3); font-family: var(--font-mono); font-size: 9px; }
.chart-line { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.chart-area { fill: url(#areaFill); }
.chart-dot { fill: var(--paper); stroke: var(--ink); stroke-width: 1.4; }
.chart-threshold { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; }
.chart-hit { fill: transparent; cursor: crosshair; }

.chart-tip {
  position: absolute;
  z-index: 3;
  min-width: 120px;
  padding: 8px 10px;
  background: var(--ink);
  color: var(--paper);
  font-size: 11px;
  line-height: 1.6;
  border-radius: var(--r-sm);
  pointer-events: none;
  transform: translate(-50%, -112%);
  white-space: nowrap;
}

.chart-tip b { font-family: var(--font-mono); font-weight: 400; }

.streak-strip { display: flex; gap: 4px; align-items: flex-end; height: 34px; margin-top: 18px; }

.streak-tick { flex: 1; min-width: 6px; height: 34px; border-radius: 2px; background: var(--line); }
.streak-tick--win { background: var(--jade); }
.streak-tick--loss { background: var(--cinnabar); opacity: .75; }
.streak-tick--deal { background: var(--gold); }
.streak-tick--none { background: var(--line-soft); }

.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--ink-3); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; }

/* ---------- 统计 ---------- */

.stat { display: grid; gap: 4px; padding: 16px 0; border-top: 1px solid var(--line-soft); }
.stat:first-child { border-top: 0; padding-top: 0; }

.stat-num { font-family: var(--font-mono); font-size: 26px; line-height: 1.1; letter-spacing: -.02em; }
.stat-label { font-size: 11.5px; color: var(--ink-3); letter-spacing: .08em; }
.stat-foot { font-size: 10.5px; color: var(--ink-3); font-family: var(--font-mono); }

.bar { height: 4px; background: var(--line-soft); border-radius: 2px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--ink); border-radius: 2px; transition: width .8s var(--ease); }

/* ---------- 标签 ---------- */

.tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 10.5px;
  letter-spacing: .06em;
  color: var(--ink-2);
  background: rgba(255, 253, 247, .6);
}

.tag--strong { border-color: var(--jade); color: var(--jade); }
.tag--mid { border-color: var(--gold); color: var(--gold); }
.tag--weak { border-color: var(--ink-3); color: var(--ink-3); }
.tag--bad { border-color: var(--cinnabar); color: var(--cinnabar); }

/* ---------- 记录流 ---------- */

.entry {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line-soft);
}

.entry:first-child { border-top: 0; }

.entry-date { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3); line-height: 1.7; padding-top: 2px; }
.entry-date b { display: block; font-size: 13px; color: var(--ink-2); font-weight: 400; }
.entry-body h4 { margin: 0 0 3px; font-size: 14px; font-weight: 600; }
.entry-body p { margin: 0; font-size: 12.5px; color: var(--ink-2); }
.entry-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

.amount { font-family: var(--font-mono); font-size: 13px; }
.amount--plus { color: var(--jade); }
.amount--minus { color: var(--cinnabar); }

.empty {
  padding: 44px 24px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--r-md);
  color: var(--ink-3);
}

.empty h3 { margin: 0 0 6px; font-family: var(--font-display); font-weight: 400; font-size: 17px; letter-spacing: .1em; color: var(--ink-2); }
.empty p { margin: 0 auto 18px; max-width: 30em; font-size: 12.5px; }

/* ---------- 训练 ---------- */

.phase { display: flex; align-items: center; gap: 12px; margin: 30px 0 12px; }
.phase-line { flex: 1; height: 1px; background: var(--line); }
.phase-name { font-family: var(--font-display); font-size: 12px; letter-spacing: .26em; color: var(--ink-3); }

.task {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(255, 252, 244, .5);
  transition: border-color .2s var(--ease), background .2s var(--ease);
}

.task:hover { border-color: var(--ink-3); background: rgba(255, 252, 244, .85); }

.task-day { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); letter-spacing: .04em; }

.task h4 { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: .02em; }
.task p { margin: 2px 0 0; font-size: 12px; color: var(--ink-3); }

.task--done { opacity: .55; }
.task--done h4 { text-decoration: line-through; text-decoration-thickness: 1px; }
.task--active { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }

.check {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  color: transparent;
}

.check:hover { border-color: var(--ink); }
.check[aria-pressed="true"] { background: var(--jade); border-color: var(--jade); color: var(--paper); }

.ring { transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3; }
.ring .track { stroke: var(--line); }
.ring .bar-c { stroke: var(--cinnabar); stroke-linecap: round; transition: stroke-dashoffset .9s var(--ease); }

/* ---------- 弹层 ---------- */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(27, 25, 22, .38);
  backdrop-filter: blur(2px);
}

.sheet[hidden] { display: none; }

.sheet-panel {
  width: min(560px, 100%);
  max-height: 88vh;
  overflow: auto;
  padding: 28px 28px 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 30px 80px -40px rgba(27, 25, 22, .6);
  animation: rise .28s var(--ease) both;
}

.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.sheet-title { margin: 0; font-family: var(--font-display); font-size: 20px; font-weight: 400; letter-spacing: .12em; }
.sheet-sub { margin: 6px 0 0; font-size: 12px; color: var(--ink-3); }

.x {
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: var(--ink-3);
  cursor: pointer;
  padding: 2px 6px;
}

.x:hover { color: var(--cinnabar); }

.sheet-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 26px; }

/* ---------- 提示 ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 80;
  transform: translateX(-50%);
  padding: 10px 18px;
  background: var(--ink);
  color: var(--paper);
  font-size: 12.5px;
  letter-spacing: .06em;
  border-radius: var(--r-sm);
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .6);
}

.toast[hidden] { display: none; }

/* ---------- 关于 ---------- */

.prose { max-width: 42em; }
.prose h3 { margin: 30px 0 10px; font-family: var(--font-display); font-size: 17px; font-weight: 400; letter-spacing: .12em; }
.prose p { margin: 0 0 14px; color: var(--ink-2); font-size: 13.5px; }
.prose ul { margin: 0 0 16px; padding-left: 1.2em; color: var(--ink-2); font-size: 13.5px; }
.prose li { margin-bottom: 6px; }
.prose a { border-bottom: 1px solid var(--line); transition: border-color .2s; }
.prose a:hover { border-color: var(--cinnabar); color: var(--cinnabar); }

.formula {
  padding: 18px 20px;
  border-left: 2px solid var(--cinnabar);
  background: rgba(255, 252, 244, .7);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 2;
  color: var(--ink-2);
}

/* ---------- 动效 ---------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.stagger > * { animation: rise .5s var(--ease) both; }
.stagger > *:nth-child(1) { animation-delay: .02s; }
.stagger > *:nth-child(2) { animation-delay: .07s; }
.stagger > *:nth-child(3) { animation-delay: .12s; }
.stagger > *:nth-child(4) { animation-delay: .17s; }
.stagger > *:nth-child(5) { animation-delay: .22s; }
.stagger > *:nth-child(6) { animation-delay: .27s; }
.stagger > *:nth-child(n+7) { animation-delay: .3s; }

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

/* ---------- 个人校准 ---------- */

.anchor-box {
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  padding: 16px 16px 18px;
  background: rgba(255, 255, 255, .26);
}

.anchor-box .range { margin-top: 2px; }

.prose-p {
  margin: 0 0 10px;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--ink-2);
}

.prose-p b { color: var(--ink); font-weight: 600; }

/* ---------- 响应式 ---------- */

@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .rail { display: none; }
  .view { padding: 26px 20px 96px; }
  .tabbar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: rgba(244, 239, 228, .94);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(8px);
  }
  .tabbar a {
    display: grid;
    place-items: center;
    min-height: 44px;
    font-size: 11px;
    letter-spacing: .1em;
    color: var(--ink-3);
  }
  .tabbar a[aria-current="page"] { color: var(--cinnabar); }
  .anchor-box { padding: 14px 12px; }
  .hero { grid-template-columns: 1fr; gap: 22px; padding: 24px; }
  .gauge svg { width: 210px; height: 210px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .page-title { font-size: 26px; }
}

@media (max-width: 520px) {
  .view { padding: 22px 16px 96px; }
  .entry { grid-template-columns: 58px minmax(0, 1fr); }
  .entry-side { grid-column: 2; flex-direction: row; align-items: center; }
  .gate-row { grid-template-columns: 80px minmax(0, 1fr); }
  .gate-row .pill { grid-column: 2; justify-self: start; }
  .sheet { padding: 0; place-items: end stretch; }
  .sheet-panel { width: 100%; max-height: 92vh; border-radius: 10px 10px 0 0; }
}
