:root {
  --bg: #FAFAF7;
  --surface: #F0F0EA;
  --surface-2: #E6E6DF;
  --ink: #1C1C1E;
  --ink-2: #66666B;
  --ink-3: #A1A1A6;
  --hairline: #E3E3DC;
  --accent: #2F6B4F;
  --accent-soft: #E3EEE7;
  --accent-ink: #FFFFFF;
  --danger-soft: #F6E7E4;
  --r-s: 8px;
  --r-m: 12px;
  --r-l: 20px;
  --r-pill: 999px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
html { color-scheme: light; touch-action: manipulation; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font: 16px/24px -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
}
button, input, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.shell {
  height: var(--app-h, 100dvh);
  width: min(480px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: minmax(0, 1fr);
  background: var(--bg);
  padding-top: env(safe-area-inset-top);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
.top {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 0 16px;
  background: #fff;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 48px;
  min-height: 48px;
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}
.lockup { display: block; width: auto; height: 24px; flex: none; }
.lang { display: flex; align-items: center; align-self: stretch; margin: 0 6px 0 10px; font-size: 15px; line-height: 20px; color: var(--ink-3); white-space: nowrap; }
.lang a, .lang b { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; }
.lang a { color: var(--ink-2); text-decoration: none; font-weight: 400; }
.lang b, .lang a[aria-current] { color: var(--ink); font-weight: 600; }
.lang .sep { padding: 0 4px; color: var(--ink-3); }
.top-actions { display: flex; align-items: center; align-self: stretch; }
.icon-btn {
  width: 48px;
  height: 48px;
  color: var(--ink-2);
  display: grid;
  place-items: center;
}
.icon-btn svg { display: block; }
main {
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  padding: 0 20px;
}
.playtest-chip {
  align-self: center;
  margin: 0 0 8px;
  padding: 2px 10px;
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 14px;
  line-height: 18px;
  font-weight: 500;
}
.progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 24px;
  margin-bottom: 8px;
}
.dots { display: flex; gap: 8px; align-items: center; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--hairline); }
.dot.done { background: var(--accent); }
.dot.now { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink); }
.meta { color: var(--ink-2); font-size: 13px; line-height: 18px; font-weight: 500; }
.stage {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-bottom: 8px;
}
.clue {
  margin: 0 0 24px;
  max-width: 440px;
  font-size: 24px;
  line-height: 32px;
  font-weight: 500;
  text-wrap: balance;
}
.clue.long { font-size: 20px; line-height: 26px; }
.clue-zh {
  margin: -12px 0 20px;
  max-width: 440px;
  font-size: 15px;
  line-height: 22px;
  font-weight: 400;
  color: var(--ink-2);
  text-wrap: balance;
}
.clue.long + .clue-zh { font-size: 14px; line-height: 20px; }
.cells { display: flex; flex-wrap: nowrap; gap: 6px; justify-content: center; width: 100%; }
.cell {
  flex: 1 1 0;
  height: var(--cell-h, 56px);
  max-width: var(--cell-max, 48px);
  min-width: 0;
  aspect-ratio: auto;
  border-radius: var(--r-m);
  background: var(--surface);
  display: grid;
  place-items: center;
  position: relative;
  font-size: var(--letter, 28px);
  line-height: 1;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.cell.cursor::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 8px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}
.cell.hinted, .cell.solved { background: var(--accent-soft); color: var(--accent); }
.cell .leaf {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 6px;
  height: 10px;
  color: var(--accent);
}
.hint .leaf {
  position: static;
  width: 12px;
  height: 20px;
  flex: none;
  color: var(--accent);
}
.hint-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}
.hint {
  min-width: 48px;
  min-height: 48px;
  height: 48px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  border: 0;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 500;
  background: var(--surface);
}
.hint-note { font-size: 13px; line-height: 18px; color: var(--ink-2); font-weight: 500; }
.keys { --gap: 6px; display: flex; flex-direction: column; gap: 10px; padding: 4px 4px max(12px, env(safe-area-inset-bottom)); }
.key-row { --u: calc((100% - 10 * var(--gap)) / 11.5); display: flex; gap: var(--gap); justify-content: center; }
.key {
  flex: 0 0 var(--u);
  min-width: 0;
  height: var(--key-h, 52px);
  border-radius: 8px;
  background: var(--surface);
  display: grid;
  place-items: center;
  font-size: 19px;
  font-weight: 500;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.key.fn { flex-basis: calc(var(--u) * 1.5); }
.key.fn3 { flex-basis: calc(var(--u) * 3 + var(--gap) * 2); }
.key.enter { font-size: 15px; font-weight: 600; }
.key.fn svg { width: 22px; height: 22px; }
.hint-key { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--ink-2); }
.hint-key .leaf { width: 10px; height: 17px; flex: none; color: var(--accent); }
.hint-key .hk { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.hint-key b { font-size: 15px; font-weight: 600; color: var(--ink); }
.hint-key small { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.key:active { background: var(--surface-2); }
.toast {
  position: fixed;
  top: 52px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--r-pill);
  max-width: calc(100vw - 32px);
  padding: 6px 14px;
  font-size: 14px;
  line-height: 20px;
  text-align: center;
  z-index: 7;
}
.sheet-back {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .28);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 6;
}
.sheet {
  width: min(480px, 100%);
  max-height: calc(var(--app-h, 100dvh) - 16px);
  overflow: auto;
  background: var(--bg);
  border-radius: var(--r-l) var(--r-l) 0 0;
  padding: 0 24px max(24px, env(safe-area-inset-bottom));
  text-align: left;
  background: #fff;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, .10);
  overscroll-behavior: contain;
}
.sheet.compact { width: min(400px, 100%); }
.grab-zone { height: 28px; display: flex; align-items: center; justify-content: center; cursor: grab; touch-action: none; margin: 0 -24px; }
.sheet-title { touch-action: none; cursor: grab; text-align: center; }
.sheet .lead { text-align: center; color: var(--ink-2); margin: -6px 0 20px; }
.sheet .center { text-align: center; }
.sheet a { font-size: inherit; min-height: 0; display: inline; }
.sheet .foot-links a { display: inline-flex; min-height: 48px; }
.sheet h3 { margin: 20px 0 10px; font-size: 13px; line-height: 18px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.sheet hr { border: 0; margin: 12px 0 0; }
.btn.block, .btn.primary.block { display: flex; width: 100%; max-width: none; margin: 0 auto; }
.center-link { display: flex; justify-content: center; margin: 4px auto 0; }
.steps { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 14px; }
.sheet .steps li { display: flex; align-items: center; gap: 14px; margin: 0; font-size: 17px; line-height: 24px; }
.steps .num { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--surface); color: var(--ink-2); display: grid; place-items: center; font-size: 15px; font-weight: 600; }
.pair { display: flex; gap: 8px; margin: 0 0 12px; }
.pair .btn { flex: 1; }
.btn.soft { background: var(--surface); color: var(--accent); }
.foot-links { display: flex; justify-content: space-between; gap: 0 12px; margin-top: 4px; }
.group { border-radius: var(--r-m); background: var(--surface); margin: 16px 0 0; overflow: hidden; }
.group > * + * { box-shadow: inset 0 1px 0 var(--hairline); }
.list-row { display: flex; width: 100%; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 16px; font-size: 17px; font-weight: 500; text-align: left; }
.list-row .go { color: var(--accent); font-weight: 600; }
.mini-stats { display: flex; justify-content: center; gap: 28px; margin: 16px 0 0; color: var(--ink-2); font-size: 14px; }
.mini-stats span { display: inline-flex; align-items: baseline; gap: 5px; }
.mini-stats b { color: var(--ink); font-size: 17px; font-weight: 600; }
.sub-head { display: flex; margin: -8px 0 0; }
.back-link { min-height: 40px; font-size: 16px; }
.sheet .key-line { text-align: center; margin: 16px 0 0; font-size: 17px; color: var(--ink-2); }
.key-line b { font-size: 28px; line-height: 34px; font-weight: 700; color: var(--ink); margin-right: 2px; }
.sheet .key-line + .fine { margin-top: 2px; }
.garden-svg { display: block; width: 100%; max-width: 280px; height: auto; max-height: 34vh; margin: 0 auto; }
.sheet h3.center { text-align: center; margin: 24px 0 10px; }
.milestones { list-style: none; display: flex; justify-content: center; gap: 12px; margin: 0; padding: 0; }
.milestones .ms { width: 60px; display: flex; flex-direction: column; align-items: center; padding: 8px 0; border-radius: var(--r-m); background: var(--surface); color: var(--ink-3); font-size: 14px; line-height: 16px; }
.milestones .ms b { font-size: 17px; line-height: 22px; font-weight: 600; color: var(--ink-2); }
.milestones .ms.on { background: var(--accent-soft); color: var(--accent); }
.milestones .ms.on b { color: var(--accent); }
.sheet .foot-links a, .foot-links .linkish { font-size: 15px; }
.danger-link { color: #b42318 !important; }
.sheet .stat-row { justify-content: space-around; margin-bottom: 12px; }
.sheet .stat { text-align: center; flex: 1; }
.sheet p, .sheet li { font-size: 17px; line-height: 24px; }
.sheet .btn { min-height: 50px; font-size: 17px; }
.sheet p.fine { font-size: 14px; line-height: 20px; margin: 14px 0 0; }
.nudge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 20px;
}
.nudge button { color: var(--accent); font-weight: 600; text-align: left; min-width: 48px; min-height: 48px; }
.nudge-x { width: 48px; height: 48px; flex: none; color: var(--ink-2); font-size: 22px; }
.sheet h2 { margin: 4px 0 16px; font-size: 22px; line-height: 28px; font-weight: 700; }
.sheet p, .sheet li { margin: 0 0 8px; }
.sheet ol { margin: 0 0 16px; padding-left: 20px; }
.grab { width: 40px; height: 5px; border-radius: 3px; background: #D1D1CC; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  font-weight: 600;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); width: 100%; max-width: 320px; height: 50px; }
.btn.quiet { color: var(--accent); background: transparent; }
.example { display: flex; gap: 6px; justify-content: center; margin: 0 0 24px; }
.example .cell { max-width: 44px; height: 48px; font-size: 22px; }
.result { width: 100%; max-width: 440px; }
.stack { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 320px; margin: 8px auto 0; }
.stack .btn { width: 100%; }
.result h2 { margin: 0 0 12px; font-size: 28px; line-height: 34px; font-weight: 700; }
.stars { display: flex; gap: 8px; justify-content: center; margin-bottom: 8px; }
.star { width: 22px; height: 22px; }
.star.on { color: var(--accent); }
.star.off { color: var(--hairline); }
.fine { color: var(--ink-2); font-size: 13px; line-height: 18px; margin: 0 0 16px; }
.stat-row { display: flex; justify-content: center; gap: 0; margin-bottom: 16px; }
.stat { padding: 0 16px; }
.stat + .stat { box-shadow: inset 1px 0 0 var(--hairline); }
.stat b { display: block; font-size: 22px; line-height: 26px; font-weight: 600; }
.stat span { color: var(--ink-2); font-size: 13px; }
.answers { width: 100%; text-align: left; margin: 0 0 16px; }
.answer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--hairline);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .04em;
}
.answer-row .side { color: var(--ink-2); font-size: 13px; font-weight: 500; letter-spacing: 0; display: inline-flex; align-items: center; gap: 4px; }
.answer-row .answer-main { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.answer-row .zh-mean { font-size: 13px; line-height: 18px; font-weight: 400; color: var(--ink-2); }
.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.4;
  background: var(--surface);
  border-radius: var(--r-s);
  padding: 12px;
  word-break: break-all;
  white-space: pre-wrap;
  margin: 0 0 8px;
}
.import {
  display: block;
  width: 100%;
  min-height: 64px;
  font-size: 16px;
  resize: none;
  border-radius: var(--r-s);
  border: 1px solid var(--hairline);
  background: #fff;
  padding: 10px 12px;
  margin: 0 0 8px;
}
.ask { white-space: nowrap; }
.confirm-back {
  position: fixed;
  inset: 0;
  z-index: 8;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.confirm {
  width: min(360px, 100%);
  background: var(--bg);
  color: var(--ink);
  border-radius: 18px;
  padding: 20px;
  text-align: left;
}
.confirm p { margin: 0 0 16px; font-size: 17px; line-height: 24px; }
.confirm-actions { display: flex; gap: 8px; }
.confirm-actions .btn { flex: 1; min-width: 48px; min-height: 48px; }
.confirm-actions .btn.primary { width: auto; max-width: none; }
.btn.danger { background: #b42318; color: #fff; }
.linkish, .sheet a {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  background: none;
  font-size: 16px;
  font-weight: 500;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
}
.ask a {
  align-items: flex-end;
  height: 48px;
  vertical-align: baseline;
}
.noscript { padding: 16px 20px; }
.card-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(0, 0, 0, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.card-box {
  width: min(460px, 100%);
  max-height: 94vh;
  overflow: auto;
  background: #fff;
  color: #1d1d1f;
  border-radius: 18px;
  padding: 16px;
}
.card-box img { width: 100%; height: auto; display: block; border-radius: 10px; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.card-actions .btn { min-width: 48px; min-height: 48px; }
.card-actions .btn.primary { background: #1d1d1f; color: #fff; width: auto; flex: 1; }
@media (max-width: 380px) {
  .keys { --gap: 5px; padding-left: 3px; padding-right: 3px; }
  .lang { margin: 0 6px 0 8px; }
  .lockup { height: 21px; }
  .lang { font-size: 14px; }
}
@media (max-width: 360px) {
  .brand { font-size: 13px; gap: 6px; }
  .top { padding-left: 10px; padding-right: 2px; }
}
@media (max-height: 700px) {
  html { --key-h: 48px; }
  .keys { gap: 8px; }
  .sheet { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .sheet h2 { margin-bottom: 12px; }
  .sheet .lead { margin-bottom: 14px; }
  .example { margin-bottom: 16px; }
  .steps { gap: 10px; margin-bottom: 14px; }
  .group, .mini-stats { margin-top: 12px; }
  .garden-svg { max-height: 28vh; }
  .sheet h3.center { margin-top: 16px; }
}
@media (max-height: 640px) {
  html { --cell-h: 48px; --key-h: 48px; --letter: 24px; }
  .clue { margin-bottom: 12px; }
  .clue-zh { margin: -6px 0 12px; }
  .meaning-hint { margin-top: 10px; }
  .hint-row { margin-bottom: 8px; }
  .progress { margin-bottom: 4px; }
}
@media (min-width: 768px) {
  .sheet-back { align-items: center; }
  .sheet { border-radius: var(--r-l); padding-bottom: 24px; }
  .shell { width: min(480px, 100%); }
  .keys { max-width: 480px; margin: 0 auto; }
}
@media (prefers-reduced-motion: no-preference) {
  .cells.shake { animation: shake 300ms linear; }
  .cells.shake .cell { animation: flash 300ms linear; }
  .toast { animation: toast-in 160ms ease-out; }
  .sheet { animation: sheet-in 240ms ease-out; }
}
@keyframes shake {
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
@keyframes flash { 50% { background: var(--danger-soft); } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }
@keyframes sheet-in { from { transform: translateY(16px); } }
.sheet .stat + .stat { box-shadow: none; }
.sheet p.fine a { display: inline; min-height: 0; }

/* One month, one screen. */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 8px; }
.cal-month { font-size: 17px; font-weight: 600; }
.cal-nav { width: 44px; height: 44px; font-size: 30px; font-weight: 400; line-height: 1; color: var(--accent); }
.cal-nav:disabled { opacity: .18; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px 0; touch-action: pan-y; }
.cal-wd { display: grid; place-items: center; height: 24px; font-size: 14px; font-weight: 500; color: var(--ink-3); }
.cal-day { display: grid; place-items: center; justify-self: center; width: 40px; height: 40px; border-radius: 50%; font-size: 17px; line-height: 1; font-variant-numeric: tabular-nums; }
.cal-day.off { color: var(--ink-3); opacity: .28; }
.cal-day.old { color: var(--ink-2); }
.cal-day.recent { box-shadow: inset 0 0 0 1px var(--hairline); }
.cal-day.done { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.cal-day.today { color: var(--accent); font-weight: 700; }
.cal-day.is-today { text-decoration: underline; text-underline-offset: 5px; }
.cal-day:active { background: var(--surface); }
@media (max-width: 380px) {
  .cal-grid { gap: 3px 0; }
  .cal-day { width: 39px; height: 39px; }
}
.sheet.compact .steps { margin-bottom: 24px; }

/* Chinese-version learning layer */
.keys { position: relative; }
.hint-chooser { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); z-index: 5; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px; border-radius: 18px; background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: 0 8px 28px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .06); animation: chooser-in .16s ease-out; }
.hint-chooser button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 58px; padding: 8px 10px; border-radius: 13px; background: var(--surface); color: var(--ink); text-align: center; }
.hint-chooser button b { font-size: 17px; font-weight: 600; line-height: 1.2; }
.hint-chooser button small { font-size: 13px; font-weight: 500; line-height: 1.2; color: var(--ink-2); }
.hint-chooser button small.free { color: var(--accent); }
.hint-chooser button:active { transform: scale(.97); background: var(--hairline); }
@keyframes chooser-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hint-chooser { animation: none; } }
.meaning-hint { margin: 16px 0 0; font-size: 17px; line-height: 24px; color: var(--accent); text-align: center; }
.learn { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 4px; }
.learn-word { display: flex; align-items: center; justify-content: center; gap: 6px; }
.learn-word .sheet-title { margin: 0; font-size: 34px; line-height: 40px; font-weight: 700; letter-spacing: .01em; }
.speak { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; color: var(--accent); }
.speak:active { background: var(--accent-soft); }
.sheet .ipa { margin: 2px 0 0; font-size: 17px; color: var(--ink-2); }
.sheet .zh-mean { margin: 12px 0 0; font-size: 20px; line-height: 28px; font-weight: 600; }
.example-line { width: 100%; margin: 24px 0 0; padding: 20px 0 0; box-shadow: inset 0 1px 0 var(--hairline); text-align: center; }
.sheet .example-line p { margin: 0; }
.sheet .example-line p.fine { margin-top: 4px; }
.learn .btn.primary { width: 100%; max-width: none; margin-top: 32px; }
.word-list { list-style: none; margin: 16px 0 0; padding: 0; max-height: calc(var(--app-h, 100dvh) - 200px); overflow: auto; box-shadow: inset 0 1px 0 var(--hairline), inset 0 -1px 0 var(--hairline); }
.sheet .word-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 64px; padding: 10px 0 10px 4px; }
.word-list li + li { box-shadow: inset 0 1px 0 var(--hairline); }
.word-list li > div { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; min-width: 0; }
.word-list b { font-size: 17px; font-weight: 600; }
.sheet .word-list .ipa { margin: 0; font-size: 15px; }
.sheet .word-list .zh-mean { flex-basis: 100%; margin: 2px 0 0; font-size: 15px; line-height: 20px; font-weight: 400; color: var(--ink-2); }
.list-row .go small { font-size: 15px; font-weight: 500; color: var(--ink-2); margin-right: 4px; }
.sheet .steps li span:last-child { text-wrap: balance; }

/* Round 6: calm header, menu, language toggle, family board */
/* The visible pill is 34px tall; each option keeps a 48px tap target. */
.seg { position: relative; display: inline-flex; padding: 0 2px; }
.seg::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 34px; transform: translateY(-50%); border-radius: var(--r-pill); background: var(--surface); }
.seg a { position: relative; min-width: 48px; min-height: 48px; display: inline-grid; place-items: center; padding: 9px 2px; background-clip: content-box; border-radius: var(--r-pill); font-size: 14px; font-weight: 500; color: var(--ink-3); text-decoration: none; }
.seg a > span { padding: 0 10px; }
.seg a[aria-current] { background-color: #fff; color: var(--ink); font-weight: 700; }
.sheet .seg a { display: inline-grid; min-height: 48px; font-size: 14px; }
.sheet p.fine a.mail-link { display: inline-flex; align-items: center; min-height: 48px; }
.help-lang { display: flex; justify-content: center; margin-top: 16px; }
.menu-group { margin-top: 4px; }
.lang-row { cursor: default; }
.save-head { margin-top: 22px !important; }
.sheet .save-head + .fine { margin: 0 0 12px; }
.center-foot { justify-content: center; }
.fam-sub { margin: -6px 0 0 !important; }
.fam-list { list-style: none; margin: 16px 0 0; padding: 0; max-height: calc(var(--app-h, 100dvh) - 330px); overflow: auto; }
.sheet .fam-row { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 12px; border-radius: var(--r-m); }
.fam-row + .fam-row { box-shadow: inset 0 1px 0 var(--hairline); }
.fam-row.me { background: var(--accent-soft); box-shadow: none; }
.fam-row.me + .fam-row { box-shadow: none; }
.fam-row .rk { width: 18px; flex: none; font-weight: 700; color: var(--accent); text-align: center; }
.fam-row .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fam-row .who b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fam-row .who small { font-size: 13px; line-height: 18px; color: var(--ink-2); }
.fam-row .sc { flex: none; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.fam-row.wait b { color: var(--ink-2); font-weight: 500; }
.fam-row .linkish { min-height: 40px; font-size: 15px; }
.sheet .fam-week { text-align: center; margin: 14px 0 18px; font-size: 15px; color: var(--ink-2); }
.fam-week b { color: var(--ink); }
.fam-name { display: grid; gap: 14px; margin-top: 12px; }
.fam-name input, .fam-paste textarea { width: 100%; min-height: 50px; padding: 12px 14px; border: 0; border-radius: var(--r-m); background: var(--surface); font: inherit; font-size: 17px; color: var(--ink); }
.fam-paste { display: grid; gap: 10px; margin-top: 12px; }
.fam-paste textarea { min-height: 80px; resize: none; }
.sheet .fam-row { border-radius: 0; }
.sheet .fam-row.me { border-radius: var(--r-m); }
.sheet .fam-list + .fam-week, .sheet .fam-list + .btn { margin-top: 14px; }
.sheet .center-link { width: 100%; }
.toggle { position: relative; width: 51px; height: 31px; flex: none; border-radius: 16px; background: var(--surface-2); transition: background .2s; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .15); transition: transform .2s; }
.toggle.on { background: var(--accent); }
.toggle.on::after { transform: translateX(20px); }
.result .compare { margin-top: 6px; color: var(--accent); }
#live-clock { font-variant-numeric: tabular-nums; }
.panda-line { margin: 0 0 10px; font-size: 14px; line-height: 20px; color: var(--ink-2); font-style: italic; }
.result .panda-line { margin: -4px 0 12px; }
button.who { text-align: left; padding: 0; min-height: 44px; justify-content: center; color: inherit; font: inherit; background: none; border: 0; cursor: pointer; }
.sheet .fam-row.pick { min-height: 48px; justify-content: space-between; padding-left: 42px; box-shadow: none; }
.quiet-link { color: var(--ink-2) !important; }
