/* =========================================================
   喵研 · 手机版考研工作台
   奶黄色渐变 · 彩色 pastel · 粗线条小黑猫
   ========================================================= */

:root {
  --ink: #29241f;
  --ink-soft: #51493f;
  --muted: #83786b;
  --muted-2: #a3988a;
  --cream: #fff9e9;
  --cream-deep: #fff3cf;
  --paper: rgba(255, 252, 244, .78);
  --white: #fffdf8;
  --line: rgba(41, 36, 31, .11);
  --line-strong: rgba(41, 36, 31, .22);
  --peach: #ffd7c6;
  --mint: #cfeeda;
  --lilac: #e2d9ff;
  --sky: #cce9ff;
  --butter: #ffe7a8;
  --pink: #ffd5e0;
  --blue: #d3e3ff;
  --sand: #f0e0cc;
  --shadow: 0 18px 44px rgba(127, 96, 42, .10);
  --shadow-sm: 0 8px 20px rgba(127, 96, 42, .08);
  --rail-w: 88px;
  --radius: 26px;
  --radius-sm: 18px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
  --display: "Avenir Next", "Nunito", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", "Songti SC", "STSong", serif;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.65;
  background:
    radial-gradient(900px 620px at 92% -8%, rgba(255, 236, 167, .92) 0%, rgba(255, 236, 167, 0) 62%),
    radial-gradient(780px 560px at -8% 18%, rgba(255, 220, 197, .82) 0%, rgba(255, 220, 197, 0) 62%),
    radial-gradient(900px 600px at 54% 110%, rgba(255, 245, 200, .86) 0%, rgba(255, 245, 200, 0) 66%),
    linear-gradient(135deg, #fffdf7 0%, #fff9e8 44%, #ffefc6 100%);
  background-attachment: fixed;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

body.splash-open { overflow: hidden; }

button, input, textarea, select { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; padding: 0; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--butter); color: var(--ink); }

:focus-visible {
  outline: 3px solid rgba(41, 36, 31, .7);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ---------- background decoration ---------- */
.bg-decor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.blob {
  position: absolute;
  display: block;
  border-radius: 999px;
  filter: blur(2px);
  opacity: .65;
}
.blob-a {
  width: 280px; height: 280px;
  right: 5vw; top: 12vh;
  background: radial-gradient(circle at 35% 35%, rgba(255, 234, 171, .9), rgba(255, 234, 171, 0) 68%);
}
.blob-b {
  width: 380px; height: 380px;
  left: -120px; bottom: 4vh;
  background: radial-gradient(circle at 50% 50%, rgba(255, 213, 193, .6), rgba(255, 213, 193, 0) 70%);
}
.blob-c {
  width: 240px; height: 240px;
  right: 24vw; bottom: -80px;
  background: radial-gradient(circle at 50% 50%, rgba(207, 238, 218, .6), rgba(207, 238, 218, 0) 70%);
}
.grain {
  position: absolute;
  inset: 0;
  opacity: .25;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.11'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* ---------- app shell / rail ---------- */
.app-shell {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100dvh;
}
.rail {
  position: sticky;
  top: 0;
  z-index: 20;
  flex: 0 0 var(--rail-w);
  width: var(--rail-w);
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 13px 8px max(10px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(255, 252, 243, .76), rgba(255, 247, 224, .62));
  border-right: 1px solid rgba(41, 36, 31, .08);
  box-shadow: 8px 0 34px rgba(138, 109, 54, .04);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 2px 0 9px;
  flex: 0 0 auto;
}
.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(145deg, #ffe8a7, #ffd1bb);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6), 0 6px 14px rgba(138, 105, 42, .12);
  transition: transform .25s ease;
}
.brand:hover .brand-mark { transform: rotate(-4deg) translateY(-2px); }
.brand-mark .logo-cat { width: 37px; height: 37px; }
.brand-name {
  font-size: 10px;
  letter-spacing: .18em;
  font-weight: 800;
  color: var(--ink-soft);
  text-indent: .18em;
}
.rail-nav {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 1px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  padding: 2px 0;
}
.rail-nav::-webkit-scrollbar { display: none; }
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 1px;
  border-radius: 18px;
  color: var(--muted);
  transition: color .2s ease, transform .2s ease;
}
.nav-icon {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 15px;
  box-shadow: 0 5px 12px rgba(127, 96, 42, .08);
  transition: transform .22s ease, box-shadow .22s ease;
}
.nav-icon .cat-icon { width: 100%; height: 100%; }
.nav-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.35;
  white-space: nowrap;
}
.nav-item:hover { color: var(--ink); }
.nav-item:hover .nav-icon { transform: translateY(-2px) rotate(-2deg); }
.nav-item.active { color: var(--ink); }
.nav-item.active .nav-icon {
  transform: translateY(-1px) scale(1.035);
  box-shadow: 0 0 0 2.5px var(--ink), 0 9px 16px rgba(67, 49, 20, .16);
}
.nav-item.active .nav-label { font-weight: 900; }
.rail-bottom {
  flex: 0 0 auto;
  padding-top: 5px;
  border-top: 1px dashed rgba(41, 36, 31, .12);
  margin-top: 4px;
}
.rail-tool {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  padding: 4px 0;
  border-radius: 12px;
}
.rail-tool:hover { color: var(--ink); background: rgba(255, 255, 255, .45); }
.rail-tool-icon { width: 19px; height: 19px; }
.rail-tool-icon svg { width: 100%; height: 100%; }

.main {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  width: calc(100% - var(--rail-w));
  min-width: 0;
  padding: 22px clamp(16px, 3.4vw, 46px) 28px;
}
.page {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  outline: none;
  animation: page-in .42s cubic-bezier(.2, .8, .2, 1) both;
}
.page.no-anim { animation: none; }
body.modal-open { overflow: hidden; }
@keyframes page-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.app-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 1120px;
  width: 100%;
  margin: 30px auto 0;
  color: var(--muted-2);
  font-size: 10.5px;
  letter-spacing: .03em;
}
.app-footer button { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.footer-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-2); }

/* ---------- shared page chrome ---------- */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 3px 0 20px;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-family: var(--display);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: 7px;
}
.eyebrow .dot-mark {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 9px 0 0 rgba(41, 36, 31, .22);
  margin-right: 8px;
}
.page-title {
  font-family: var(--display);
  font-size: clamp(27px, 3.6vw, 41px);
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: 1.2;
}
.page-title .highlight {
  position: relative;
  display: inline-block;
  padding: 0 2px;
  border-radius: 5px;
  background: linear-gradient(180deg, transparent 58%, rgba(255, 217, 139, .92) 58%, rgba(255, 217, 139, .92) 94%, transparent 94%);
}
.page-title .highlight::after { display: none; }
.page-sub {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 6px;
  max-width: 560px;
}
.page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 0 0 auto;
}
.date-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(41, 36, 31, .08);
  border-radius: 999px;
  background: rgba(255, 252, 244, .65);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  backdrop-filter: blur(10px);
}
.date-chip .chip-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #8fcba8;
  box-shadow: 0 0 0 3px rgba(143, 203, 168, .18);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 26px 0 12px;
}
.section-head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -.02em;
}
.section-head h2 .h2-mark {
  width: 20px; height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  background: var(--butter);
  font-size: 11px;
}
.section-head .section-note { color: var(--muted); font-size: 11px; }
.section-head .section-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.section-head .section-link:hover { color: var(--ink); }

/* ---------- buttons & pills ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 17px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .01em;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.985); }
.btn svg { width: 16px; height: 16px; }
.btn-primary {
  color: #fff9e8;
  background: var(--ink);
  box-shadow: 0 8px 20px rgba(41, 36, 31, .18);
}
.btn-primary:hover { background: #100e0c; }
.btn-soft {
  background: rgba(255, 252, 244, .72);
  border-color: rgba(41, 36, 31, .10);
  box-shadow: 0 4px 12px rgba(127, 96, 42, .05);
}
.btn-soft:hover { background: #fffdf6; }
.btn-butter { background: var(--butter); border-color: rgba(41, 36, 31, .08); }
.btn-ghost { color: var(--muted); padding-inline: 10px; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 11px; }
.btn-xs { min-height: 28px; padding: 0 10px; font-size: 10px; gap: 4px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; transform: none; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--muted);
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.icon-btn:hover { color: var(--ink); background: rgba(41, 36, 31, .06); }
.icon-btn svg { width: 17px; height: 17px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 25px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(41, 36, 31, .06);
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.chip.peach { background: #ffe6da; }
.chip.mint { background: #dcf4e5; }
.chip.sky { background: #dcefff; }
.chip.lilac { background: #ece5ff; }
.chip.butter { background: #fff0bd; }
.chip.pink { background: #ffe2ea; }
.chip.ink { background: var(--ink); color: var(--cream); }
.chip .chip-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .5; }

/* ---------- cards ---------- */
.card {
  position: relative;
  border: 1px solid rgba(255, 255, 255, .84);
  border-radius: var(--radius);
  background: linear-gradient(155deg, rgba(255, 253, 247, .86), rgba(255, 250, 236, .64));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.card-pad { padding: 20px; }
.card-ink {
  color: #fff8e7;
  background:
    radial-gradient(500px 220px at 100% -20%, rgba(255, 226, 154, .23), transparent 70%),
    linear-gradient(145deg, #302a24, #191612);
  border-color: rgba(255, 255, 255, .08);
  box-shadow: 0 20px 44px rgba(38, 29, 18, .2);
}
.pastel-strip {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, .6);
}
.muted { color: var(--muted); }
.tiny { font-size: 10px; }
.nowrap { white-space: nowrap; }
.hr-dash {
  border: 0;
  border-top: 1px dashed rgba(41, 36, 31, .12);
  margin: 16px 0;
}
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 7px;
  padding: 36px 18px;
  color: var(--muted);
}
.empty-state .empty-cat {
  width: 54px; height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(255, 231, 168, .7);
  margin-bottom: 3px;
}
.empty-state .empty-cat svg { width: 45px; height: 45px; }
.empty-state strong { color: var(--ink-soft); font-size: 13px; }
.empty-state p { font-size: 11px; max-width: 270px; }

/* ---------- progress ---------- */
.progress-track {
  position: relative;
  height: 7px;
  border-radius: 999px;
  background: rgba(41, 36, 31, .08);
  overflow: hidden;
}
.progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ink);
  transition: width .45s cubic-bezier(.2, .8, .2, 1);
}
.progress-fill.mint { background: #72b98e; }
.progress-fill.peach { background: #eaa285; }
.progress-fill.pink { background: #dc8ea4; }
.progress-fill.sky { background: #78aed4; }

.round-progress {
  --p: 0;
  position: relative;
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: conic-gradient(var(--ink) calc(var(--p) * 1%), rgba(41, 36, 31, .09) 0);
  flex: 0 0 auto;
}
.round-progress::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: #fff9e9;
}
.round-progress span {
  position: relative;
  z-index: 1;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 900;
}

/* ---------- home ---------- */
.home-head { align-items: flex-end; }
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(150px, .65fr);
  gap: 12px;
  align-items: stretch;
  position: relative;
  overflow: hidden;
  min-height: 206px;
  padding: 24px 26px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, .8);
  background:
    radial-gradient(420px 240px at 92% 4%, rgba(255, 255, 255, .68), transparent 72%),
    linear-gradient(122deg, #ffe1c4 0%, #ffeec2 46%, #ffe8a8 100%);
  box-shadow: var(--shadow);
}
.home-hero::after {
  content: "";
  position: absolute;
  right: 11%; bottom: -50px;
  width: 200px; height: 200px;
  border: 1px dashed rgba(41, 36, 31, .18);
  border-radius: 50%;
  pointer-events: none;
}
.hero-copy { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; }
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 253, 246, .55);
  font-family: var(--display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.hero-kicker .mini-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.home-hero h2 {
  max-width: 480px;
  margin: 12px 0 5px;
  font-family: var(--display);
  font-size: clamp(24px, 3.5vw, 37px);
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: 1.23;
}
.home-hero .hero-sub { color: rgba(41, 36, 31, .64); font-size: 11.5px; max-width: 400px; }
.hero-progress-wrap { width: 100%; max-width: 340px; margin-top: auto; padding-top: 17px; }
.hero-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  font-size: 10.5px;
  font-weight: 700;
  color: rgba(41, 36, 31, .65);
}
.hero-progress-meta strong { color: var(--ink); font-size: 11px; }
.hero-art {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 160px;
}
.hero-art .mascot-svg { width: min(185px, 100%); height: auto; filter: drop-shadow(0 8px 14px rgba(91, 61, 25, .12)); }
.hero-face { display: none; }
.hero-art .hero-sticker {
  position: absolute;
  right: 0;
  top: 4px;
  transform: rotate(7deg);
  padding: 5px 10px;
  border-radius: 10px;
  background: #fff9e9;
  border: 1.5px solid var(--ink);
  font-size: 9px;
  font-weight: 900;
  box-shadow: 2px 3px 0 rgba(41, 36, 31, .12);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.stat-card {
  position: relative;
  min-height: 166px;
  padding: 17px 16px 15px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .74);
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
}
.stat-card::after {
  content: "";
  position: absolute;
  width: 100px; height: 100px;
  right: -38px; bottom: -48px;
  border-radius: 50%;
  border: 1px dashed rgba(41, 36, 31, .15);
}
.stat-card.peach { background: linear-gradient(145deg, #ffe3d3, #ffd6c4); }
.stat-card.mint { background: linear-gradient(145deg, #ddf3e5, #cfeddb); }
.stat-card.sky { background: linear-gradient(145deg, #dbeeff, #cbe7ff); }
.stat-card.lilac { background: linear-gradient(145deg, #ede5ff, #e1d6ff); }
.stat-card.butter { background: linear-gradient(145deg, #fff0be, #ffe4a0); }
.stat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.stat-head .stat-label {
  font-size: 11px;
  font-weight: 800;
  color: rgba(41, 36, 31, .62);
  letter-spacing: .04em;
}
.stat-icon {
  width: 36px; height: 36px;
  border-radius: 12px;
  overflow: hidden;
  flex: 0 0 auto;
  transform: rotate(3deg);
  box-shadow: 0 5px 10px rgba(127, 96, 42, .10);
}
.stat-icon .cat-icon { width: 100%; height: 100%; }
.stat-main {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 12px;
}
.stat-main strong {
  font-family: var(--display);
  font-size: clamp(30px, 3.1vw, 40px);
  font-weight: 900;
  letter-spacing: -.06em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat-main .stat-unit { font-size: 10px; font-weight: 800; color: rgba(41, 36, 31, .56); }
.stat-sub { margin-top: 5px; font-size: 10px; color: rgba(41, 36, 31, .58); }
.stat-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
  color: rgba(41, 36, 31, .6);
  font-size: 9.5px;
}
.stat-foot b { color: var(--ink); font-weight: 900; }
.stat-mini-week { display: flex; align-items: flex-end; gap: 3px; height: 24px; margin-top: 7px; }
.stat-mini-week i {
  display: block;
  flex: 1;
  min-width: 3px;
  border-radius: 3px 3px 1px 1px;
  background: rgba(41, 36, 31, .18);
}
.stat-mini-week i.on { background: var(--ink); }

.streak-days { display: flex; gap: 4px; margin-top: 9px; }
.streak-days span {
  flex: 1;
  display: grid;
  place-items: center;
  gap: 2px;
  min-width: 0;
  font-size: 8px;
  color: rgba(41, 36, 31, .5);
}
.streak-days i {
  display: grid;
  place-items: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .42);
  color: transparent;
  font-style: normal;
  font-size: 9px;
}
.streak-days i.on { background: var(--ink); color: var(--cream); }
.streak-days i.today { box-shadow: 0 0 0 2px var(--ink); }

.home-lower {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  gap: 12px;
  margin-top: 12px;
}
.today-card { padding: 19px 20px; }
.today-card .card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.card-head h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -.01em;
}
.card-head h3 .head-emoji {
  width: 22px; height: 22px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--butter);
  font-size: 11px;
}
.mini-task-list { display: flex; flex-direction: column; gap: 2px; }
.mini-task {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 5px;
  border-bottom: 1px dashed rgba(41, 36, 31, .09);
  font-size: 11.5px;
}
.mini-task:last-child { border-bottom: 0; }
.mini-task .check-dot {
  width: 17px; height: 17px;
  border-radius: 6px;
  border: 1.5px solid rgba(41, 36, 31, .25);
  flex: 0 0 auto;
  display: grid; place-items: center;
}
.mini-task.done .check-dot { background: var(--ink); border-color: var(--ink); }
.mini-task.done .check-dot::after {
  content: "";
  width: 7px; height: 4px;
  border-left: 1.6px solid var(--cream);
  border-bottom: 1.6px solid var(--cream);
  transform: rotate(-45deg) translateY(-1px);
}
.mini-task.done .mini-task-title { color: var(--muted-2); text-decoration: line-through; }
.mini-task .mini-task-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-task .mini-cat {
  margin-left: auto;
  color: var(--muted-2);
  font-size: 9px;
  flex: 0 0 auto;
}
.rhythm-card { padding: 19px 20px; display: flex; flex-direction: column; }
.rhythm-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 7px;
  flex: 1;
  min-height: 104px;
  margin-top: 6px;
}
.rhythm-bar {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  min-width: 0;
  height: 100%;
  justify-content: flex-end;
}
.rhythm-bar .bar-track {
  position: relative;
  display: flex;
  align-items: flex-end;
  width: 100%;
  max-width: 23px;
  height: 82px;
  border-radius: 999px;
  background: rgba(41, 36, 31, .045);
  overflow: hidden;
}
.rhythm-bar .bar-fill {
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffd18c, #f3b974);
  min-height: 3px;
  transition: height .4s ease;
}
.rhythm-bar.today .bar-fill { background: var(--ink); }
.rhythm-bar span { font-size: 8.5px; color: var(--muted); font-weight: 700; }
.rhythm-total { display: flex; align-items: baseline; gap: 4px; }
.rhythm-total strong { font-family: var(--display); font-size: 21px; font-weight: 900; letter-spacing: -.04em; }
.rhythm-total span { font-size: 9px; color: var(--muted); }

.focus-quote {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 12px;
  padding: 14px 18px;
  border-radius: 20px;
  background: rgba(255, 252, 244, .68);
  border: 1px solid rgba(255, 255, 255, .72);
  color: var(--ink-soft);
  font-size: 11px;
}
.focus-quote .quote-cat {
  width: 32px; height: 32px;
  flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 11px;
  background: var(--lilac);
}
.focus-quote .quote-cat svg { width: 27px; height: 27px; }
.focus-quote span { flex: 1; }
.focus-quote strong { font-weight: 800; }

/* ---------- daily plan ---------- */
.plan-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  border-radius: 24px;
  background: linear-gradient(130deg, #ffe5ce, #ffefbf);
  border: 1px solid rgba(255, 255, 255, .76);
  box-shadow: var(--shadow-sm);
}
.plan-summary .sum-copy h3 { font-family: var(--display); font-size: 16px; font-weight: 900; letter-spacing: -.02em; }
.plan-summary .sum-copy p { color: rgba(41, 36, 31, .6); font-size: 10.5px; margin-top: 2px; }
.plan-summary .sum-progress { width: 100%; max-width: 280px; }
.plan-summary .sum-progress .progress-track { height: 8px; background: rgba(255, 255, 255, .55); }
.plan-summary .sum-progress .progress-fill { background: var(--ink); }
.plan-summary .sum-meta { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-size: 10px; font-weight: 800; color: rgba(41, 36, 31, .63); }
.plan-summary .sum-meta strong { color: var(--ink); }
.plan-summary .sum-actions { display: flex; gap: 7px; align-items: center; }

.carry-banner {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 12px;
  padding: 12px 15px;
  border-radius: 18px;
  background: #fff3cf;
  border: 1px dashed rgba(41, 36, 31, .24);
  font-size: 11px;
}
.carry-banner .carry-icon {
  width: 30px; height: 30px;
  flex: 0 0 auto;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--butter);
}
.carry-banner .carry-icon svg { width: 21px; height: 21px; }
.carry-banner .carry-text { flex: 1; min-width: 0; }
.carry-banner .carry-text strong { display: block; font-size: 11.5px; }
.carry-banner .carry-text span { color: var(--muted); font-size: 10px; }

.plan-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0 10px;
}
.filter-tabs, .segmented {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 252, 244, .64);
  border: 1px solid rgba(41, 36, 31, .07);
  box-shadow: 0 3px 10px rgba(127, 96, 42, .04);
  backdrop-filter: blur(10px);
}
.filter-tabs button, .segmented button {
  min-height: 31px;
  padding: 0 13px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}
.filter-tabs button.active, .segmented button.active {
  color: var(--ink);
  background: #fffdf6;
  box-shadow: 0 3px 9px rgba(127, 96, 42, .1);
}
.segmented { width: 100%; max-width: 500px; padding: 4px; }
.segmented button { flex: 1; min-height: 36px; }
.segmented button.active { background: var(--ink); color: var(--cream); }

.task-list { display: flex; flex-direction: column; gap: 8px; }
.task-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 11px;
  align-items: start;
  padding: 14px 15px;
  border-radius: 19px;
  background: rgba(255, 252, 245, .76);
  border: 1px solid rgba(255, 255, 255, .85);
  box-shadow: 0 4px 13px rgba(127, 96, 42, .045);
  transition: background .2s ease, opacity .2s ease, transform .2s ease;
}
.task-item:hover { background: rgba(255, 254, 250, .94); transform: translateY(-1px); }
.task-item.is-done { opacity: .7; }
.task-check {
  position: relative;
  width: 24px; height: 24px;
  border-radius: 8px;
  border: 2px solid rgba(41, 36, 31, .25);
  background: rgba(255, 255, 255, .45);
  display: grid;
  place-items: center;
  margin-top: 0;
  transition: background .2s ease, border-color .2s ease;
}
.task-check::after { content: ""; position: absolute; inset: -9px; border-radius: 12px; }
.task-check:hover { border-color: var(--ink); }
.task-item.is-done .task-check { background: var(--ink); border-color: var(--ink); }
.task-check svg { width: 13px; height: 13px; color: var(--cream); opacity: 0; }
.task-item.is-done .task-check svg { opacity: 1; }
.task-main { min-width: 0; }
.task-title {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.55;
  word-break: break-word;
}
.task-item.is-done .task-title { text-decoration: line-through; color: var(--muted-2); }
.task-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.priority-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  font-weight: 800;
}
.priority-tag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.priority-high { color: #c7654c; }
.priority-mid { color: #b18a2d; }
.priority-low { color: #779680; }
.task-actions { display: flex; align-items: center; gap: 1px; }
.task-actions .icon-btn { width: 28px; height: 28px; }
.task-actions .icon-btn svg { width: 14px; height: 14px; }
.task-tip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted-2);
  font-size: 9.5px;
}

/* ---------- study module common ---------- */
.study-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: stretch;
  margin-bottom: 14px;
}
.module-statline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  gap: 0;
  padding: 13px 14px;
  border-radius: 20px;
  background: rgba(255, 252, 245, .68);
  border: 1px solid rgba(255, 255, 255, .8);
  box-shadow: var(--shadow-sm);
}
.module-statline .mstat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 0 9px;
  border-right: 1px dashed rgba(41, 36, 31, .12);
  min-width: 0;
}
.module-statline .mstat:first-child { padding-left: 0; }
.module-statline .mstat:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.module-statline .mstat strong {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: 1.2;
  white-space: nowrap;
}
.module-statline .mstat span { font-size: 8.5px; color: var(--muted); line-height: 1.35; }
.study-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.checkin-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid rgba(41, 36, 31, .10);
  background: rgba(255, 252, 244, .7);
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
}
.checkin-pill.is-done { background: #d9f1e2; border-color: rgba(89, 155, 112, .25); color: #376a49; }
.checkin-pill svg { width: 15px; height: 15px; }
.checkin-pill .check-mark { width: 14px; height: 14px; display: grid; place-items: center; }

.timer-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 240px;
  padding: 11px 14px;
  border-radius: 20px;
  color: var(--cream);
  background:
    radial-gradient(180px 90px at 100% 0%, rgba(255, 225, 155, .2), transparent 80%),
    linear-gradient(145deg, #342d25, #191612);
  box-shadow: 0 10px 22px rgba(41, 31, 19, .16);
}
.timer-card.is-running { box-shadow: 0 10px 26px rgba(41, 31, 19, .22), inset 0 0 0 1px rgba(255, 231, 168, .25); }
.timer-info { display: flex; align-items: center; gap: 8px; min-width: 0; }
.timer-dot { width: 7px; height: 7px; border-radius: 50%; background: #ffd77f; flex: 0 0 auto; }
.timer-card.is-running .timer-dot { animation: timer-pulse 1.6s infinite; }
@keyframes timer-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 215, 127, .45); }
  50% { box-shadow: 0 0 0 5px rgba(255, 215, 127, 0); }
}
.timer-label { font-size: 9px; color: rgba(255, 248, 231, .55); letter-spacing: .08em; text-transform: uppercase; }
.timer-clock {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.timer-btns { display: flex; gap: 3px; flex: 0 0 auto; }
.timer-btn {
  min-height: 29px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255, 249, 235, .1);
  color: rgba(255, 249, 235, .84);
  font-size: 9.5px;
  font-weight: 800;
  white-space: nowrap;
}
.timer-btn:hover { background: rgba(255, 249, 235, .18); }
.timer-btn.accent { background: var(--butter); color: var(--ink); }

.tab-content { margin-top: 14px; }

.page-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  padding: 11px 14px;
  border-radius: 15px;
  background: rgba(255, 252, 244, .56);
  border: 1px dashed rgba(41, 36, 31, .15);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}
.page-note strong { color: var(--ink-soft); }
.page-note svg { width: 14px; height: 14px; flex: 0 0 auto; margin-top: 2px; }

.source-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.source-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .48);
  border: 1px solid rgba(41, 36, 31, .07);
  color: var(--muted);
  font-size: 9px;
  transition: color .18s ease, background .18s ease;
}
.source-link:hover { color: var(--ink); background: #fffdf6; }
.source-link svg { width: 10px; height: 10px; }

/* ---------- English ---------- */
.english-stats { background: linear-gradient(140deg, #e4d9ff, #ffe4ce); }
.word-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 17px;
  border-radius: 20px;
  background: linear-gradient(130deg, #d8eeff, #e9e0ff);
  border: 1px solid rgba(255, 255, 255, .72);
  margin-bottom: 12px;
}
.word-progress .wp-copy { flex: 1; min-width: 0; }
.word-progress h3 { font-family: var(--display); font-size: 16px; font-weight: 900; letter-spacing: -.02em; }
.word-progress p { color: rgba(41, 36, 31, .6); font-size: 10px; margin-top: 2px; }
.word-progress .round-progress { width: 56px; height: 56px; }
.word-progress .round-progress::before { inset: 5px; background: #eef3ff; }
.word-progress .round-progress span { font-size: 11px; }
.word-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.word-card {
  display: flex;
  flex-direction: column;
  padding: 15px 15px 13px;
  border-radius: 19px;
  border: 1px solid rgba(255, 255, 255, .86);
  background: rgba(255, 252, 246, .8);
  box-shadow: 0 5px 14px rgba(127, 96, 42, .045);
  transition: transform .2s ease, background .2s ease;
}
.word-card:hover { transform: translateY(-1px); background: #fffdf8; }
.word-card.is-known { background: #eff9f2; border-color: rgba(117, 184, 140, .25); }
.word-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 7px; }
.word-main { min-width: 0; }
.word-text { font-family: var(--display); font-size: 22px; font-weight: 900; letter-spacing: -.03em; line-height: 1.15; }
.word-phonetic { color: var(--muted); font-size: 10px; margin-top: 2px; }
.word-star {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 9px;
  color: var(--muted-2);
  background: rgba(255, 255, 255, .4);
  flex: 0 0 auto;
}
.word-star svg { width: 15px; height: 15px; }
.word-star.on { color: #c48c1f; background: #fff1c4; }
.word-meaning { margin-top: 8px; font-size: 11.5px; font-weight: 700; color: var(--ink-soft); }
.word-example { margin-top: 7px; border-top: 1px dashed rgba(41, 36, 31, .09); padding-top: 7px; }
.word-example summary { cursor: pointer; color: var(--muted); font-size: 9.5px; list-style: none; display: flex; align-items: center; gap: 4px; }
.word-example summary::-webkit-details-marker { display: none; }
.word-example summary::after { content: "+"; margin-left: auto; font-weight: 700; }
.word-example[open] summary::after { content: "−"; }
.word-example p { font-family: var(--serif); font-size: 11px; line-height: 1.6; color: var(--ink-soft); margin-top: 7px; }
.word-example span { display: block; font-family: var(--font); font-size: 9.5px; color: var(--muted); margin-top: 4px; }
.word-actions { display: flex; gap: 5px; margin-top: 10px; }
.word-actions .btn { flex: 1; min-height: 30px; padding: 0 7px; font-size: 9.5px; }
.word-actions .btn.is-known { background: #dff3e6; color: #376a49; }

.reading-card { padding: 22px 24px; }
.reading-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.reading-title { font-family: var(--display); font-size: 23px; font-weight: 900; letter-spacing: -.03em; line-height: 1.3; }
.reading-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.passage {
  margin-top: 17px;
  padding: 18px 20px;
  border-radius: 17px;
  background: rgba(255, 253, 248, .72);
  border: 1px solid rgba(41, 36, 31, .06);
  font-family: var(--serif);
  font-size: 13.5px;
  line-height: 1.9;
  color: #3c352d;
}
.passage p + p { margin-top: 11px; }
.reading-questions { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.reading-q {
  padding: 14px 15px;
  border-radius: 17px;
  background: rgba(255, 252, 246, .7);
  border: 1px solid rgba(255, 255, 255, .8);
}
.reading-q .q-stem { font-size: 11.5px; font-weight: 800; line-height: 1.6; }
.option-list { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.option {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  width: 100%;
  padding: 7px 9px;
  border-radius: 9px;
  border: 1px solid transparent;
  text-align: left;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.55;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.option:hover { background: rgba(255, 255, 255, .64); color: var(--ink-soft); }
.option .opt-letter {
  width: 17px; height: 17px;
  flex: 0 0 auto;
  display: grid; place-items: center;
  border: 1px solid rgba(41, 36, 31, .15);
  border-radius: 6px;
  font-size: 8px;
  font-weight: 900;
  margin-top: 1px;
}
.option.selected { background: #fff6d9; border-color: rgba(41, 36, 31, .1); color: var(--ink); }
.option.selected .opt-letter { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.option.correct { background: #e2f5e9; color: #2f6744; }
.option.correct .opt-letter { background: #4d9268; color: #fff; border-color: #4d9268; }
.option.wrong { background: #ffebe8; color: #9a4f42; }
.option.wrong .opt-letter { background: #c46e5f; color: #fff; border-color: #c46e5f; }
.q-result {
  display: none;
  margin-top: 9px;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(255, 247, 218, .8);
  font-size: 10px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.q-result.show { display: block; }
.q-result strong { color: var(--ink); }
.reading-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 14px; }
.translation-box {
  margin-top: 14px;
  padding: 15px 17px;
  border-radius: 17px;
  background: linear-gradient(130deg, #fff0cb, #ffe5d3);
  border: 1px solid rgba(255, 255, 255, .7);
}
.translation-box .tr-label { display: flex; align-items: center; gap: 6px; font-size: 9.5px; font-weight: 800; color: rgba(41, 36, 31, .55); letter-spacing: .08em; text-transform: uppercase; }
.translation-box .tr-en { margin-top: 7px; font-family: var(--serif); font-size: 13px; line-height: 1.7; }
.translation-box .tr-cn { margin-top: 7px; font-size: 11px; color: var(--ink-soft); padding-top: 7px; border-top: 1px dashed rgba(41, 36, 31, .12); }
.translation-box .grammar-note { margin-top: 7px; font-size: 9.5px; color: var(--muted); line-height: 1.7; }
.reading-side-note { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 11px; color: var(--muted); font-size: 9.5px; }

.reading-archive-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.paper-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.paper-link {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 9px 10px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, .82);
  background: rgba(255, 252, 245, .7);
  color: var(--muted);
  font-size: 9px;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.paper-link:hover { background: #fffdf7; color: var(--ink); transform: translateY(-1px); }
.paper-link svg { width: 11px; height: 11px; flex: 0 0 auto; margin-left: auto; opacity: .55; }
.paper-year {
  flex: 0 0 auto;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -.03em;
}
.paper-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reading-archive {
  text-align: left;
  padding: 11px 12px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, .8);
  background: rgba(255, 252, 245, .65);
  font-size: 10px;
}
.reading-archive strong { display: block; font-size: 10.5px; margin-bottom: 2px; }
.reading-archive span { color: var(--muted); font-size: 9px; }

.writing-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 12px; }
.sentence-list { display: flex; flex-direction: column; gap: 7px; }
.sentence-card {
  padding: 13px 15px;
  border-radius: 16px;
  background: rgba(255, 252, 246, .74);
  border: 1px solid rgba(255, 255, 255, .84);
}
.sentence-en { font-family: var(--serif); font-size: 12.5px; font-weight: 600; color: var(--ink); line-height: 1.6; }
.sentence-cn { color: var(--muted); font-size: 10px; margin-top: 3px; }
.sentence-use { display: inline-block; margin-top: 6px; font-size: 9px; color: var(--muted-2); }
.long-sentence {
  padding: 16px 17px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff2d2, #ffe8d9);
  border: 1px solid rgba(255, 255, 255, .7);
}
.long-sentence .ls-en { font-family: var(--serif); font-size: 13px; line-height: 1.75; font-weight: 600; }
.long-sentence .ls-block { margin-top: 10px; padding-top: 9px; border-top: 1px dashed rgba(41, 36, 31, .12); }
.long-sentence .ls-label { font-size: 9px; font-weight: 800; color: var(--muted); letter-spacing: .06em; }
.long-sentence p { font-size: 10.5px; color: var(--ink-soft); margin-top: 4px; line-height: 1.75; }
.practice-box { margin-top: 9px; }
.practice-box textarea {
  width: 100%;
  min-height: 108px;
  resize: vertical;
  padding: 11px 13px;
  border-radius: 14px;
  border: 1px solid rgba(41, 36, 31, .11);
  background: rgba(255, 253, 247, .8);
  font-size: 11.5px;
  line-height: 1.7;
}
.practice-box textarea:focus { outline: 2px solid rgba(41, 36, 31, .36); outline-offset: 1px; }
.practice-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 7px; color: var(--muted); font-size: 9px; }

.wordbook-box { margin-top: 16px; padding: 16px 18px; border-radius: 18px; background: rgba(255, 251, 240, .68); border: 1px dashed rgba(41, 36, 31, .14); }
.wordbook-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.wordbook-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 7px; background: #fffdf6; border: 1px solid rgba(41, 36, 31, .08); font-size: 9.5px; font-weight: 700; }
.wordbook-chip button { display: grid; place-items: center; width: 12px; height: 12px; color: var(--muted-2); }
.wordbook-chip button svg { width: 10px; height: 10px; }

/* ---------- Math ---------- */
.math-hero {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 17px 19px;
  border-radius: 22px;
  background: linear-gradient(130deg, #ffe2d1, #ffd7e0);
  border: 1px solid rgba(255, 255, 255, .78);
  box-shadow: var(--shadow-sm);
  margin-bottom: 13px;
}
.math-hero .round-progress { width: 58px; height: 58px; }
.math-hero .round-progress::before { inset: 5px; background: #fff0e9; }
.math-hero h3 { font-family: var(--display); font-size: 16px; font-weight: 900; }
.math-hero p { color: rgba(41, 36, 31, .6); font-size: 10px; margin-top: 2px; }
.math-hero .hero-right { margin-left: auto; text-align: right; flex: 0 0 auto; }
.math-hero .hero-right strong { display: block; font-family: var(--display); font-size: 23px; font-weight: 900; line-height: 1; }
.math-hero .hero-right span { font-size: 9px; color: var(--muted); }
.question-group { margin-top: 17px; }
.group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.group-head h3 { font-family: var(--display); font-size: 15px; font-weight: 900; }
.group-head .group-badge {
  display: inline-grid;
  place-items: center;
  min-width: 24px; height: 24px;
  padding: 0 7px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--cream);
  font-size: 9px;
  font-weight: 900;
}
.group-head .group-note { margin-left: auto; color: var(--muted); font-size: 9.5px; }
.question-list { display: flex; flex-direction: column; gap: 8px; }
.question-card {
  position: relative;
  padding: 16px 17px 13px;
  border-radius: 20px;
  background: rgba(255, 252, 245, .78);
  border: 1px solid rgba(255, 255, 255, .87);
  box-shadow: 0 5px 14px rgba(127, 96, 42, .045);
  transition: background .2s ease, border-color .2s ease;
}
.question-card.is-done { background: #f5fbf6; border-color: rgba(128, 180, 143, .22); }
.question-top { display: flex; align-items: flex-start; gap: 9px; }
.q-index {
  width: 25px; height: 25px;
  flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 8px;
  background: rgba(255, 231, 168, .8);
  font-family: var(--display);
  font-size: 11px;
  font-weight: 900;
}
.question-body { flex: 1; min-width: 0; }
.q-tags { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-bottom: 5px; }
.q-source { color: var(--muted-2); font-size: 8.5px; letter-spacing: .02em; }
.q-title { font-size: 10px; color: var(--muted); font-weight: 700; }
.q-content { margin-top: 5px; font-size: 12.5px; line-height: 1.8; color: var(--ink-soft); }
.q-content .math, .formula .math { font-family: var(--serif); font-size: 1.08em; letter-spacing: .01em; }
.q-content sub, .q-content sup, .formula sub, .formula sup { line-height: 0; }
.question-hint { margin-top: 7px; color: var(--muted); font-size: 9.5px; line-height: 1.65; }
.question-hint strong { color: var(--ink-soft); }
.answer-details {
  margin-top: 9px;
  border-top: 1px dashed rgba(41, 36, 31, .12);
  padding-top: 8px;
}
.answer-details summary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 9.5px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}
.answer-details summary::-webkit-details-marker { display: none; }
.answer-details summary::before {
  content: "+";
  display: grid;
  place-items: center;
  width: 15px; height: 15px;
  border-radius: 5px;
  background: rgba(41, 36, 31, .07);
  font-size: 10px;
}
.answer-details[open] summary::before { content: "−"; }
.answer-body {
  margin-top: 8px;
  padding: 11px 12px;
  border-radius: 11px;
  background: rgba(255, 245, 211, .75);
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.8;
}
.answer-body .ans-label { display: inline-block; margin-right: 5px; font-weight: 900; color: var(--ink); }
.question-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.done-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  font-weight: 800;
  color: var(--muted);
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .5);
  border: 1px solid rgba(41, 36, 31, .07);
}
.done-toggle.is-done { color: #3f7b54; background: #e4f5e9; }
.done-toggle svg { width: 12px; height: 12px; }
.formula-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.formula-card {
  padding: 13px 14px;
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(255, 253, 247, .88), rgba(255, 245, 218, .6));
  border: 1px solid rgba(255, 255, 255, .84);
  box-shadow: 0 4px 12px rgba(127, 96, 42, .04);
}
.formula-card .f-chapter { font-size: 8.5px; color: var(--muted-2); font-weight: 800; letter-spacing: .06em; }
.formula-card .f-title { margin-top: 3px; font-size: 11.5px; font-weight: 800; }
.formula-card details { margin-top: 9px; border-top: 1px dashed rgba(41, 36, 31, .1); padding-top: 8px; }
.formula-card summary {
  color: var(--muted);
  font-size: 9px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
}
.formula-card summary::-webkit-details-marker { display: none; }
.formula-card summary::after { content: "翻开 →"; margin-left: auto; font-weight: 800; }
.formula-card details[open] summary::after { content: "收起"; }
.formula { margin-top: 7px; font-family: var(--serif); font-size: 11.5px; line-height: 1.8; font-weight: 600; color: var(--ink); }
.formula-tip { margin-top: 6px; color: var(--muted); font-size: 9px; line-height: 1.65; }

/* ---------- Major ---------- */
.major-hero {
  background: linear-gradient(130deg, #d9f1df, #ffedb5);
}
.major-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); gap: 12px; margin-top: 14px; align-items: start; }
.mcq-card { padding: 17px 18px; }
.mcq-list { display: flex; flex-direction: column; gap: 8px; }
.mcq {
  padding: 13px 14px;
  border-radius: 17px;
  background: rgba(255, 252, 246, .76);
  border: 1px solid rgba(255, 255, 255, .86);
  box-shadow: 0 3px 10px rgba(127, 96, 42, .035);
}
.mcq.is-correct { background: #f2fbf4; border-color: rgba(113, 174, 129, .25); }
.mcq.is-wrong { background: #fff7f4; border-color: rgba(198, 125, 105, .2); }
.mcq-stem { display: flex; align-items: flex-start; gap: 8px; font-size: 11.5px; font-weight: 700; line-height: 1.6; }
.mcq-no {
  flex: 0 0 auto;
  width: 21px; height: 21px;
  display: grid; place-items: center;
  border-radius: 7px;
  background: var(--butter);
  font-family: var(--display);
  font-size: 9.5px;
  font-weight: 900;
}
.mcq-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin-top: 8px; }
.mcq-option {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  min-height: 30px;
  padding: 5px 7px;
  border-radius: 8px;
  border: 1px solid rgba(41, 36, 31, .07);
  background: rgba(255, 255, 255, .42);
  text-align: left;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.mcq-option:hover { background: #fffdf6; color: var(--ink); }
.mcq-option .opt-letter { font-weight: 900; font-size: 8.5px; color: var(--muted-2); line-height: 1.7; }
.mcq-option.correct { background: #def3e4; border-color: #8ebd9b; color: #2f6744; }
.mcq-option.correct .opt-letter { color: #2f6744; }
.mcq-option.wrong { background: #ffe9e5; border-color: #dca899; color: #9a4f42; }
.mcq-explain {
  display: none;
  margin-top: 7px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 247, 218, .8);
  font-size: 9.5px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.mcq-explain.show { display: block; }
.mcq-source { display: block; margin-top: 7px; color: var(--muted-2); font-size: 8.5px; }
.major-side { display: flex; flex-direction: column; gap: 10px; }
.short-list { display: flex; flex-direction: column; gap: 7px; }
.short-card {
  padding: 12px 14px;
  border-radius: 15px;
  background: rgba(255, 252, 246, .75);
  border: 1px solid rgba(255, 255, 255, .84);
}
.short-card .short-q { display: flex; gap: 7px; font-size: 10.5px; font-weight: 800; line-height: 1.6; }
.short-card .short-source { color: var(--muted-2); font-size: 8.5px; margin-top: 4px; }
.short-card .answer-details summary { font-size: 9px; }
.short-card .answer-body { font-size: 9.8px; }
.major-formulas { margin-top: 18px; }
.major-formulas .formula-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- Exercise ---------- */
.exercise-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  padding: 18px 20px;
  border-radius: 24px;
  background: linear-gradient(130deg, #ffe1df, #e7ddff);
  border: 1px solid rgba(255, 255, 255, .78);
  box-shadow: var(--shadow-sm);
}
.exercise-hero h3 { font-family: var(--display); font-size: 17px; font-weight: 900; letter-spacing: -.02em; }
.exercise-hero p { color: rgba(41, 36, 31, .62); font-size: 10px; margin-top: 2px; }
.exercise-hero .round-progress { width: 60px; height: 60px; }
.exercise-hero .round-progress::before { inset: 5px; background: #fbeeff; }
.exercise-hero .ex-stats { display: flex; gap: 15px; text-align: right; flex: 0 0 auto; }
.exercise-hero .ex-stat strong { display: block; font-family: var(--display); font-size: 21px; font-weight: 900; line-height: 1.1; }
.exercise-hero .ex-stat span { color: var(--muted); font-size: 8.5px; }
.exercise-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 12px; margin-top: 14px; align-items: start; }
.workout-card { padding: 19px 20px; }
.workout-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.workout-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 15px;
  background: rgba(255, 252, 246, .7);
  border: 1px solid rgba(255, 255, 255, .8);
}
.workout-item.is-done { background: #eff9f2; }
.workout-check {
  position: relative;
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1.8px solid rgba(41, 36, 31, .2);
  display: grid; place-items: center;
  flex: 0 0 auto;
  color: transparent;
  background: rgba(255, 255, 255, .36);
}
.workout-check::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; }
.workout-item.is-done .workout-check { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.workout-check svg { width: 12px; height: 12px; }
.workout-info { flex: 1; min-width: 0; }
.workout-name { font-size: 11.5px; font-weight: 700; }
.workout-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 3px; color: var(--muted); font-size: 9px; }
.workout-time { font-family: var(--display); font-size: 11px; font-weight: 900; color: var(--muted); flex: 0 0 auto; }
.workout-head-actions { display: flex; align-items: center; gap: 5px; margin-left: auto; }
.workout-empty { padding: 22px 10px; }
.plan-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.plan-item {
  padding: 13px 14px;
  border-radius: 16px;
  background: rgba(255, 252, 246, .75);
  border: 1px solid rgba(255, 255, 255, .84);
}
.plan-item-top { display: flex; align-items: flex-start; gap: 8px; }
.plan-cat-mark {
  width: 30px; height: 30px;
  flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 900;
  border: 1px solid rgba(255, 255, 255, .7);
}
.cat-peach { background: #ffe0d2; }
.cat-mint { background: #d9f2e2; }
.cat-sky { background: #dceeff; }
.cat-lilac { background: #eae3ff; }
.cat-pink { background: #ffe0e9; }
.cat-butter { background: #ffefbf; }
.cat-blue { background: #dce9ff; }
.cat-sand { background: #f1e4d3; }
.plan-info { flex: 1; min-width: 0; }
.plan-name { font-size: 11.5px; font-weight: 800; }
.plan-goal { color: var(--muted); font-size: 9px; margin-top: 2px; }
.plan-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.plan-progress { margin-top: 8px; }
.plan-progress-meta { display: flex; justify-content: space-between; gap: 7px; font-size: 8.5px; color: var(--muted); margin-bottom: 3px; }
.plan-progress .progress-track { height: 4px; }
.plan-actions { display: flex; gap: 2px; align-items: center; }
.plan-actions .icon-btn { width: 25px; height: 25px; }
.plan-actions .icon-btn svg { width: 12px; height: 12px; }
.exercise-review {
  margin-top: 14px;
  padding: 19px 20px;
}
.review-stars { display: flex; gap: 3px; align-items: center; }
.star-btn { width: 23px; height: 23px; display: grid; place-items: center; color: rgba(41, 36, 31, .18); }
.star-btn svg { width: 17px; height: 17px; }
.star-btn.on { color: #d4a02b; }
.star-btn:hover { transform: scale(1.1); }
.exercise-review textarea { min-height: 80px; }
.exercise-review .practice-foot { margin-top: 7px; }

/* ---------- reviews ---------- */
.review-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); gap: 12px; align-items: start; }
.review-form { padding: 21px 22px; }
.review-auto {
  padding: 17px 18px;
  margin-bottom: 14px;
  border-radius: 18px;
  background: linear-gradient(130deg, #fff0c9, #ffe3d2);
  border: 1px solid rgba(255, 255, 255, .72);
}
.review-auto h4 { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 900; }
.review-auto h4 svg { width: 14px; height: 14px; }
.review-auto .auto-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.review-auto .auto-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.review-auto .auto-grid div { background: rgba(255, 255, 255, .4); border-radius: 10px; padding: 8px 9px; }
.review-auto .auto-grid strong { display: block; font-family: var(--display); font-size: 19px; font-weight: 900; line-height: 1.2; }
.review-auto .auto-grid span { color: var(--muted); font-size: 8.5px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 10.5px; font-weight: 800; color: var(--ink-soft); display: flex; align-items: center; gap: 5px; }
.form-field label .label-num {
  width: 17px; height: 17px;
  display: inline-grid; place-items: center;
  border-radius: 6px;
  background: var(--butter);
  font-family: var(--display);
  font-size: 8px;
}
.form-field textarea,
.form-field input {
  width: 100%;
  border: 1px solid rgba(41, 36, 31, .1);
  border-radius: 13px;
  background: rgba(255, 253, 247, .8);
  padding: 10px 12px;
  font-size: 11px;
  line-height: 1.7;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.form-field textarea { min-height: 84px; resize: vertical; }
.form-field textarea.short { min-height: 58px; }
.form-field input { min-height: 38px; }
.form-field textarea:focus,
.form-field input:focus,
.form-field select:focus { outline: none; border-color: rgba(41, 36, 31, .34); box-shadow: 0 0 0 3px rgba(255, 231, 168, .5); }
.form-field select {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(41, 36, 31, .1);
  border-radius: 12px;
  background: rgba(255, 253, 247, .8);
  padding: 0 10px;
  font-size: 11px;
}
.form-hint { color: var(--muted-2); font-size: 8.5px; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 15px; padding-top: 14px; border-top: 1px dashed rgba(41, 36, 31, .1); }
.form-actions .save-state { color: var(--muted); font-size: 9px; }
.review-side { display: flex; flex-direction: column; gap: 12px; }
.archive-card { padding: 18px 19px; }
.archive-list { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; }
.archive-item { border-radius: 14px; background: rgba(255, 252, 246, .72); border: 1px solid rgba(255, 255, 255, .8); overflow: hidden; }
.archive-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 12px;
  cursor: pointer;
}
.archive-item summary::-webkit-details-marker { display: none; }
.archive-item summary .arch-date { font-family: var(--display); font-size: 10px; font-weight: 900; flex: 0 0 auto; }
.archive-item summary .arch-title { min-width: 0; color: var(--muted); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.archive-item summary .arch-arrow { margin-left: auto; color: var(--muted-2); width: 13px; height: 13px; flex: 0 0 auto; }
.archive-item[open] summary .arch-arrow { transform: rotate(90deg); }
.archive-content { padding: 0 12px 12px; font-size: 9.5px; line-height: 1.8; color: var(--ink-soft); }
.archive-content .arch-field { padding: 6px 0; border-top: 1px dashed rgba(41, 36, 31, .09); }
.archive-content .arch-field strong { color: var(--muted); font-size: 8.5px; font-weight: 800; display: block; margin-bottom: 2px; }
.archive-empty { padding: 16px 4px; color: var(--muted); font-size: 10px; }
.review-tip {
  padding: 15px 16px;
  border-radius: 18px;
  background: rgba(255, 252, 244, .62);
  border: 1px dashed rgba(41, 36, 31, .13);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.8;
}
.review-tip strong { color: var(--ink-soft); }
.budget-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-bottom: 12px; }

/* ---------- splash ---------- */
.splash {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: block;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(760px 600px at 93% 10%, rgba(255, 234, 167, .9), transparent 63%),
    radial-gradient(620px 620px at 8% 92%, rgba(255, 213, 190, .74), transparent 63%),
    radial-gradient(520px 480px at 74% 94%, rgba(229, 219, 255, .7), transparent 65%),
    linear-gradient(140deg, #fffdf6 0%, #fff8e2 45%, #ffedc1 100%);
  transition: opacity .5s ease, visibility .5s ease;
}
.splash::before {
  content: "";
  position: absolute;
  width: 420px; height: 420px;
  border: 1px solid rgba(41, 36, 31, .09);
  border-radius: 50%;
  right: -130px; top: -130px;
  box-shadow: 0 0 0 38px rgba(255, 255, 255, .12), 0 0 0 76px rgba(255, 255, 255, .08);
}
.splash::after {
  content: "";
  position: absolute;
  width: 260px; height: 260px;
  border: 1px dashed rgba(41, 36, 31, .12);
  border-radius: 50%;
  left: -100px; bottom: -80px;
}
.splash.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.splash-scroll {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: max(22px, env(safe-area-inset-top)) clamp(18px, 4vw, 58px) max(16px, env(safe-area-inset-bottom));
}
.splash-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(360px, .96fr);
  align-items: center;
  gap: clamp(24px, 4vw, 60px);
  width: min(1160px, 100%);
  margin: 0 auto;
}
.splash-art {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: min(68vh, 610px);
}
.mascot-wrap {
  position: relative;
  z-index: 2;
  width: min(100%, 505px);
  animation: mascot-float 6s ease-in-out infinite;
}
.mascot-wrap svg { width: 100%; height: auto; filter: drop-shadow(0 22px 28px rgba(95, 66, 27, .14)); }
@keyframes mascot-float {
  0%, 100% { transform: translateY(0) rotate(-.4deg); }
  50% { transform: translateY(-9px) rotate(.5deg); }
}
.art-sticker {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 11px;
  border-radius: 10px;
  border: 1.7px solid var(--ink);
  box-shadow: 3px 4px 0 rgba(41, 36, 31, .1);
  background: #fff9e9;
  font-family: var(--display);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .03em;
  animation: sticker-wobble 7s ease-in-out infinite;
}
.art-sticker.sticker-a { left: 7%; top: 17%; transform: rotate(-7deg); background: var(--sky); }
.art-sticker.sticker-b { right: 5%; top: 26%; transform: rotate(6deg); background: var(--mint); animation-delay: -2s; }
.art-sticker.sticker-c { left: 12%; bottom: 19%; transform: rotate(4deg); background: var(--pink); animation-delay: -4s; }
@keyframes sticker-wobble {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -5px; }
}
.art-caption {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: -3px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 252, 243, .72);
  border: 1px solid rgba(255, 255, 255, .8);
  color: var(--muted);
  font-size: 10px;
  backdrop-filter: blur(8px);
}
.tiny-paw {
  position: relative;
  width: 12px; height: 12px;
  display: inline-block;
  border-radius: 50% 50% 45% 45%;
  background: var(--ink);
}
.tiny-paw::before, .tiny-paw::after {
  content: "";
  position: absolute;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--ink);
  top: -3px;
}
.tiny-paw::before { left: 0; }
.tiny-paw::after { right: 0; }

.splash-copy { max-width: 470px; }
.splash-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--display);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .18em;
  color: var(--muted);
}
.kicker-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 4px rgba(41, 36, 31, .08); }
.splash-date { margin-top: 16px; font-size: 12px; font-weight: 700; color: var(--muted); }
.splash-title {
  margin-top: 6px;
  font-family: var(--display);
  font-size: clamp(42px, 5.7vw, 70px);
  font-weight: 900;
  letter-spacing: -.07em;
  line-height: 1.06;
  color: var(--ink);
}
.splash-title em {
  position: relative;
  z-index: 0;
  font-style: normal;
  white-space: nowrap;
}
.splash-title em::after {
  content: "";
  position: absolute;
  left: -4px; right: -2px; bottom: 9px;
  z-index: -1;
  height: 16px;
  border-radius: 999px;
  background: #ffd98e;
  transform: rotate(-1.2deg);
}
.splash-sub {
  max-width: 395px;
  margin-top: 13px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}
.countdown-card {
  margin-top: 22px;
  padding: 15px 18px 13px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .86);
  background: rgba(255, 252, 243, .7);
  box-shadow: 0 10px 24px rgba(127, 96, 42, .07);
  backdrop-filter: blur(12px);
}
.countdown-label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .04em; }
.pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: #e79d79; animation: timer-pulse 2s infinite; }
.countdown-main { display: flex; align-items: baseline; gap: 7px; margin-top: 2px; }
.countdown-main strong {
  font-family: var(--display);
  font-size: clamp(52px, 6.5vw, 74px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.07em;
  font-variant-numeric: tabular-nums;
}
.countdown-unit { font-size: 14px; font-weight: 900; color: var(--ink-soft); }
.countdown-date { margin-left: auto; color: var(--muted); font-family: var(--display); font-size: 10px; font-weight: 800; letter-spacing: .05em; }
.countdown-note { color: var(--muted-2); font-size: 8.5px; margin-top: 2px; }
.quote-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 11px;
  padding: 12px 39px 12px 14px;
  border-radius: 15px;
  background: rgba(255, 243, 205, .72);
  border: 1px dashed rgba(41, 36, 31, .16);
  min-height: 48px;
}
.quote-mark { color: var(--ink); font-family: var(--serif); font-size: 24px; line-height: 1; opacity: .35; margin-top: -3px; }
.quote-card p { font-size: 10.5px; line-height: 1.75; color: var(--ink-soft); transition: opacity .2s ease; }
.quote-card p.fading { opacity: 0; }
.quote-refresh {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  width: 25px; height: 25px;
  display: grid; place-items: center;
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, .42);
}
.quote-refresh:hover { color: var(--ink); background: rgba(255, 255, 255, .7); }
.quote-refresh svg { width: 12px; height: 12px; }
.enter-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  margin-top: 15px;
  padding: 0 9px 0 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .02em;
  box-shadow: 0 14px 28px rgba(41, 30, 17, .2);
  transition: transform .2s ease, box-shadow .2s ease;
}
.enter-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 32px rgba(41, 30, 17, .24); }
.enter-arrow {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--butter);
  color: var(--ink);
  font-size: 18px;
  font-weight: 500;
  transition: transform .2s ease;
}
.enter-btn:hover .enter-arrow { transform: translateX(3px); }
.splash-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 700;
}
.splash-meta i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.splash-foot {
  width: min(1160px, 100%);
  margin: 18px auto 0;
  text-align: center;
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: .04em;
}

/* ---------- modal ---------- */
.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(41, 34, 25, .28);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  backdrop-filter: blur(8px);
  transition: opacity .25s ease, visibility .25s ease;
}
.modal-layer.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.modal {
  width: min(520px, 100%);
  max-height: min(84dvh, 760px);
  overflow-y: auto;
  border-radius: 26px;
  background: linear-gradient(155deg, #fffdf6, #fff8e8);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 30px 70px rgba(52, 37, 18, .24);
  padding: 22px;
  transform: translateY(12px) scale(.98);
  transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}
.modal-layer.is-open .modal { transform: translateY(0) scale(1); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 15px; }
.modal-head h3 { font-family: var(--display); font-size: 20px; font-weight: 900; letter-spacing: -.03em; }
.modal-head p { color: var(--muted); font-size: 10px; margin-top: 3px; }
.modal-close {
  width: 31px; height: 31px;
  flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(41, 36, 31, .06);
}
.modal-close svg { width: 14px; height: 14px; }
.modal-form { display: flex; flex-direction: column; gap: 11px; }
.modal-form .form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.modal-form .form-field textarea { min-height: 78px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 7px; padding-top: 13px; border-top: 1px dashed rgba(41, 36, 31, .12); }
.modal-actions .delete-link { margin-right: auto; color: #a45645; font-size: 10px; font-weight: 800; align-self: center; }
.settings-section { padding: 12px 0; border-top: 1px dashed rgba(41, 36, 31, .12); }
.settings-section:first-of-type { border-top: 0; padding-top: 0; }
.settings-section h4 { font-size: 11px; font-weight: 900; margin-bottom: 5px; }
.settings-section p { color: var(--muted); font-size: 9.5px; line-height: 1.7; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.settings-row label { font-size: 10.5px; font-weight: 700; }
.settings-row input[type="date"] { min-height: 34px; border: 1px solid rgba(41, 36, 31, .1); border-radius: 10px; padding: 0 9px; background: #fffdf7; font-size: 10px; }
.data-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.danger-link { color: #a45645; font-size: 10px; font-weight: 800; }
.about-lines { color: var(--muted); font-size: 9.5px; line-height: 1.8; }

/* ---------- toast / timer fab ---------- */
.toast-stack {
  position: fixed;
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  transform: translateX(-50%);
  width: min(90vw, 380px);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 10px 15px;
  border-radius: 999px;
  color: var(--cream);
  background: rgba(41, 36, 31, .94);
  box-shadow: 0 12px 28px rgba(41, 30, 17, .22);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  animation: toast-in .3s cubic-bezier(.2, .8, .2, 1) both;
  backdrop-filter: blur(10px);
}
.toast::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--butter); flex: 0 0 auto; }
.toast.leaving { animation: toast-out .25s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(9px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px) scale(.98); } }
.timer-fab {
  position: fixed;
  right: 18px;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 120;
  display: none;
  align-items: center;
  gap: 7px;
  padding: 8px 10px 8px 12px;
  border-radius: 999px;
  background: rgba(41, 36, 31, .95);
  color: var(--cream);
  box-shadow: 0 12px 30px rgba(41, 30, 17, .2);
  font-size: 10px;
  backdrop-filter: blur(10px);
}
.timer-fab.is-visible { display: flex; }
.timer-fab-dot { width: 6px; height: 6px; border-radius: 50%; background: #ffd77f; }
.timer-fab-label { color: rgba(255, 248, 231, .56); font-size: 9px; }
.timer-fab strong { font-family: var(--display); font-size: 14px; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.timer-fab button {
  min-height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--butter);
  color: var(--ink);
  font-size: 9px;
  font-weight: 900;
}

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-card { min-height: 150px; }
  .major-layout { grid-template-columns: minmax(0, 1fr); }
  .major-side { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .formula-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .splash-shell { grid-template-columns: minmax(0, .92fr) minmax(340px, 1.08fr); gap: 22px; }
  .splash-art { min-height: 520px; }
}

@media (max-width: 820px) {
  .home-hero { grid-template-columns: minmax(0, 1fr) 150px; padding: 20px; }
  .home-hero h2 { font-size: 27px; }
  .hero-art .mini-mascot { width: 155px; }
  .home-lower { grid-template-columns: minmax(0, 1fr); }
  .word-grid { grid-template-columns: minmax(0, 1fr); }
  .writing-grid { grid-template-columns: minmax(0, 1fr); }
  .review-layout { grid-template-columns: minmax(0, 1fr); }
  .exercise-layout { grid-template-columns: minmax(0, 1fr); }
  .splash-shell { grid-template-columns: minmax(0, 1fr); max-width: 600px; gap: 8px; }
  .splash-art { min-height: auto; padding: 8px 0 22px; }
  .mascot-wrap { width: min(58vw, 330px); }
  .splash-copy { max-width: none; }
  .splash-title { font-size: clamp(40px, 10vw, 58px); }
  .splash-sub { max-width: 520px; }
  .splash-foot { margin-top: 14px; }
  .art-sticker.sticker-a { left: 8%; top: 13%; }
  .art-sticker.sticker-b { right: 8%; top: 22%; }
  .art-sticker.sticker-c { left: 19%; bottom: 17%; }
  .study-topbar { grid-template-columns: minmax(0, 1fr); }
  .timer-card { min-width: 0; }
}

@media (max-width: 680px) {
  :root { --rail-w: 76px; }
  .rail { padding: 10px 6px max(8px, env(safe-area-inset-bottom)); }
  .brand-mark { width: 40px; height: 40px; border-radius: 13px; }
  .brand-mark .logo-cat { width: 34px; height: 34px; }
  .brand-name { font-size: 9px; }
  .nav-icon { width: 41px; height: 41px; border-radius: 14px; }
  .nav-label { font-size: 9px; }
  .main { padding: 17px 13px 24px; }
  .page-head { align-items: flex-start; flex-direction: column; gap: 11px; margin-bottom: 15px; }
  .page-actions { width: 100%; justify-content: flex-start; }
  .page-title { font-size: clamp(26px, 7.4vw, 34px); }
  .page-sub { font-size: 11px; }
  .home-hero { grid-template-columns: minmax(0, 1fr); min-height: 0; padding: 19px 18px 15px; }
  .hero-art { position: absolute; right: 12px; top: 15px; bottom: auto; min-height: 0; width: 56px; opacity: .95; pointer-events: none; }
  .hero-art .mascot-svg { display: none; }
  .hero-art .hero-sticker { display: none; }
  .hero-face { display: block; width: 56px; height: 56px; border-radius: 18px; overflow: hidden; box-shadow: 0 6px 14px rgba(127, 96, 42, .12); transform: rotate(4deg); }
  .hero-face .logo-cat { width: 100%; height: 100%; }
  .hero-copy { min-height: 0; justify-content: flex-start; }
  .home-hero h2 { font-size: 25px; max-width: calc(100% - 58px); }
  .home-hero .hero-sub { max-width: calc(100% - 20px); font-size: 10px; }
  .hero-progress-wrap { max-width: 100%; }
  .stats-grid { gap: 8px; }
  .stat-card { min-height: 146px; padding: 14px 12px 12px; border-radius: 20px; }
  .stat-main strong { font-size: 31px; }
  .stat-head .stat-label { font-size: 9.5px; }
  .stat-icon { width: 29px; height: 29px; border-radius: 9px; flex: 0 0 auto; }
  .stat-sub { font-size: 9px; }
  .stat-foot { font-size: 8px; gap: 3px; }
  .streak-days { gap: 1px; margin-top: 7px; }
  .streak-days span { font-size: 7px; gap: 1px; }
  .streak-days i { width: 15px; height: 15px; font-size: 8px; }
  .today-card, .rhythm-card { padding: 16px 15px; }
  .focus-quote { padding: 12px 13px; font-size: 10px; align-items: flex-start; }
  .plan-summary { grid-template-columns: auto minmax(0, 1fr); gap: 13px; padding: 14px 15px; }
  .plan-summary .sum-actions { grid-column: 1 / -1; width: 100%; }
  .plan-summary .sum-actions .btn { flex: 1; }
  .carry-banner { align-items: flex-start; padding: 11px 12px; }
  .carry-banner .btn { flex: 0 0 auto; }
  .plan-toolbar { align-items: stretch; }
  .filter-tabs { width: 100%; }
  .filter-tabs button { flex: 1; padding: 0 6px; }
  .task-item { grid-template-columns: auto minmax(0, 1fr) auto; padding: 12px 11px; gap: 8px; }
  .task-title { font-size: 11.5px; }
  .segmented { max-width: none; }
  .segmented button { padding: 0 4px; font-size: 10px; min-height: 34px; }
  .study-topbar { gap: 8px; }
  .module-statline { padding: 10px 11px; }
  .module-statline .mstat { padding: 0 6px; }
  .module-statline .mstat strong { font-size: 15px; }
  .module-statline .mstat span { font-size: 8px; }
  .timer-card { padding: 10px 12px; }
  .timer-clock { font-size: 18px; }
  .word-progress { padding: 12px 13px; }
  .word-card { padding: 13px; }
  .reading-card { padding: 17px 15px; }
  .reading-title { font-size: 20px; }
  .passage { padding: 14px 14px; font-size: 12.5px; line-height: 1.85; }
  .math-hero, .exercise-hero { padding: 14px 15px; gap: 11px; }
  .math-hero .hero-right { display: none; }
  .exercise-hero { grid-template-columns: auto minmax(0, 1fr); }
  .exercise-hero .ex-stats { grid-column: 1 / -1; justify-content: flex-start; text-align: left; border-top: 1px dashed rgba(41, 36, 31, .12); padding-top: 9px; gap: 22px; }
  .formula-grid, .major-formulas .formula-grid { grid-template-columns: minmax(0, 1fr); }
  .mcq-options { grid-template-columns: minmax(0, 1fr); }
  .major-side { grid-template-columns: minmax(0, 1fr); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-field.full { grid-column: auto; }
  .review-form { padding: 16px 14px; }
  .budget-row { grid-template-columns: minmax(0, 1fr); }
  .reading-archive-grid { grid-template-columns: minmax(0, 1fr); }
  .paper-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-auto .auto-grid,
  .review-auto .auto-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-auto .auto-grid strong { font-size: 16px; }
  .modal-layer { padding: 0; align-items: flex-end; }
  .modal { width: 100%; max-height: 90dvh; border-radius: 24px 24px 0 0; padding: 19px 16px max(18px, env(safe-area-inset-bottom)); transform: translateY(24px); }
  .modal-layer.is-open .modal { transform: translateY(0); }
  .modal-form .form-row { grid-template-columns: minmax(0, 1fr); }
  .timer-fab { right: 11px; bottom: max(11px, env(safe-area-inset-bottom)); }
  .app-footer { font-size: 9px; margin-top: 22px; padding: 0 5px; }
  .splash-scroll { justify-content: flex-start; padding: max(18px, env(safe-area-inset-top)) 17px max(14px, env(safe-area-inset-bottom)); }
  .splash-art { padding-top: 2px; padding-bottom: 14px; }
  .mascot-wrap { width: min(62vw, 280px); }
  .art-caption { font-size: 9px; padding: 5px 10px; margin-top: -6px; }
  .art-sticker { font-size: 9px; padding: 5px 8px; border-width: 1.4px; }
  .art-sticker.sticker-a { left: 3%; top: 8%; }
  .art-sticker.sticker-b { right: 3%; top: 18%; }
  .art-sticker.sticker-c { left: 11%; bottom: 13%; }
  .splash-copy { padding-top: 1px; }
  .splash-date { margin-top: 9px; font-size: 11px; }
  .splash-title { font-size: clamp(38px, 11.6vw, 51px); }
  .splash-title em::after { bottom: 6px; height: 12px; }
  .splash-sub { font-size: 10.5px; line-height: 1.7; margin-top: 10px; }
  .countdown-card { margin-top: 14px; padding: 12px 14px 10px; }
  .countdown-main strong { font-size: 52px; }
  .countdown-note { font-size: 8px; }
  .quote-card { margin-top: 8px; padding: 10px 36px 10px 12px; }
  .quote-card p { font-size: 9.5px; line-height: 1.65; }
  .enter-btn { min-height: 50px; margin-top: 11px; font-size: 12px; }
  .splash-meta { font-size: 8px; margin-top: 10px; }
  .splash-foot { font-size: 8px; }
}

@media (max-width: 410px) {
  :root { --rail-w: 70px; }
  .rail { padding-inline: 5px; }
  .brand-mark { width: 38px; height: 38px; }
  .nav-icon { width: 39px; height: 39px; border-radius: 13px; }
  .nav-label { font-size: 8.5px; }
  .main { padding: 14px 10px 22px; }
  .home-hero { padding: 17px 15px 13px; }
  .hero-art { width: 50px; right: 10px; top: 13px; }
  .hero-face { width: 50px; height: 50px; border-radius: 16px; }
  .home-hero h2 { font-size: 23px; }
  .hero-progress-wrap { max-width: 100%; }
  .page-title { font-size: 26px; }
  .plan-summary { border-radius: 20px; }
  .word-text { font-size: 20px; }
  .timer-label { display: none; }
  .timer-info { gap: 5px; }
  .timer-btn { padding: 0 7px; font-size: 9px; }
  .splash-title { font-size: 38px; }
  .countdown-main strong { font-size: 47px; }
  .art-sticker.sticker-a { left: 0; }
  .art-sticker.sticker-b { right: 0; }
}

@media (max-width: 370px) {
  .segmented button { font-size: 9px; }
  .timer-clock { font-size: 16px; }
  .timer-btn { padding: 0 6px; }
  .nav-label { font-size: 8px; }
  .app-footer { display: none; }
}

@media (max-width: 348px) {
  .stats-grid { grid-template-columns: minmax(0, 1fr); }
  .stat-card { min-height: 0; }
}

@media (max-height: 760px) and (min-width: 821px) {
  .nav-icon { width: 38px; height: 38px; border-radius: 13px; }
  .nav-item { padding: 2px 0; }
  .nav-label { font-size: 9px; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-name { display: none; }
  .rail { padding-top: 9px; }
  .splash-art { min-height: 470px; }
  .splash-scroll { padding-top: 14px; padding-bottom: 12px; }
  .countdown-card { margin-top: 14px; }
  .splash-title { font-size: 52px; }
}

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