/* ============================================================
   卓一的工作台 · Stellar Workbench
   设计语言：奶油纸张 + 深海军蓝星空 + 珊瑚橙 / 金色 / 青绿
   ============================================================ */

/* ---------------- Design tokens ---------------- */
:root {
  --paper: #f6f0e2;
  --paper-2: #fbf7ee;
  --card: #fffdf7;
  --card-soft: #fdf9f0;
  --ink: #1e2a44;
  --ink-2: #384663;
  --muted: #6d7186;
  --muted-2: #8b8ea1;
  --line: #e4dac6;
  --line-strong: #d5c7ad;
  --navy: #1b2740;
  --navy-2: #243651;
  --navy-3: #2d4364;
  --cream: #f9f1df;
  --cream-2: #efe3c9;
  --coral: #ef674b;
  --coral-deep: #d94f33;
  --coral-soft: #fbe8e2;
  --gold: #f2b33d;
  --gold-deep: #c98a16;
  --gold-soft: #fbf0d2;
  --teal: #1e9e8f;
  --teal-deep: #147b6f;
  --teal-soft: #e3f4ef;
  --blue: #2e6ba8;
  --blue-soft: #e7f0f9;
  --violet: #5b5bb5;
  --violet-soft: #eeedfa;
  --green: #1d866b;
  --green-soft: #e4f4ee;
  --danger: #c24a3a;
  --danger-soft: #fbe9e5;
  --shadow-sm: 0 2px 8px rgba(30, 42, 68, 0.05);
  --shadow-md: 0 16px 36px -22px rgba(30, 42, 68, 0.38);
  --shadow-lg: 0 30px 60px -30px rgba(30, 42, 68, 0.45);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-xl: 34px;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-display: "Yuanti SC", "Hiragino Sans GB", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-hand: "Hannotate SC", "Kaiti SC", "STKaiti", "KaiTi", "Songti SC", serif;
  --font-number: "Avenir Next", "DIN Alternate", "Futura", "SF Pro Rounded", "PingFang SC", sans-serif;
  --ease: cubic-bezier(0.22, 0.8, 0.28, 1);
  --page: 1240px;
}

/* ---------------- Reset ---------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  background:
    radial-gradient(1100px 620px at 88% -12%, rgba(242, 179, 61, 0.17), transparent 62%),
    radial-gradient(900px 560px at -8% 16%, rgba(30, 158, 143, 0.1), transparent 58%),
    radial-gradient(700px 500px at 108% 58%, rgba(239, 103, 75, 0.09), transparent 60%),
    var(--paper);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  border: 0;
  background: none;
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
img,
svg {
  display: block;
  max-width: 100%;
}
svg.icon {
  width: 18px;
  height: 18px;
  flex: none;
}
ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
table {
  border-collapse: collapse;
  width: 100%;
}
::selection {
  background: rgba(242, 179, 61, 0.35);
}
:focus-visible {
  outline: 3px solid rgba(239, 103, 75, 0.55);
  outline-offset: 3px;
  border-radius: 6px;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 5000;
  background: var(--navy);
  color: var(--cream);
  padding: 10px 16px;
  border-radius: 999px;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 14px;
}
.num {
  font-family: var(--font-number);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* ---------------- Atmosphere ---------------- */
.paper-grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
}
.sky-decor {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.sky-decor::before {
  content: "";
  position: absolute;
  top: 90px;
  right: -80px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  border: 1px solid rgba(30, 42, 68, 0.08);
  box-shadow:
    0 0 0 44px rgba(30, 42, 68, 0.025),
    0 0 0 88px rgba(30, 42, 68, 0.018);
}
.sky-decor::after {
  content: "";
  position: absolute;
  left: -140px;
  bottom: 8%;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(30, 158, 143, 0.09), transparent 68%);
}
.sky-orbit {
  position: absolute;
  border: 1px dashed rgba(30, 42, 68, 0.1);
  border-radius: 50%;
  transform: rotate(-24deg);
}
.sky-orbit-a {
  width: 240px;
  height: 90px;
  right: 46px;
  top: 220px;
}
.sky-orbit-b {
  width: 150px;
  height: 56px;
  left: 12%;
  top: 340px;
}
.sky-star {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.55;
}
.sky-star::before,
.sky-star::after {
  content: "";
  position: absolute;
  background: currentColor;
  opacity: 0.55;
}
.sky-star::before {
  left: 2px;
  top: -7px;
  width: 1px;
  height: 19px;
}
.sky-star::after {
  top: 2px;
  left: -7px;
  width: 19px;
  height: 1px;
}
.sky-star-a {
  color: var(--gold);
  top: 16%;
  left: 4%;
}
.sky-star-b {
  color: var(--coral);
  top: 46%;
  right: 6%;
  transform: scale(0.8);
}
.sky-star-c {
  color: var(--teal);
  bottom: 16%;
  left: 9%;
  transform: scale(0.65);
}

#app-main:focus {
  outline: none;
}
#app {
  position: relative;
  z-index: 1;
  animation: app-in 0.55s var(--ease) both;
}
@keyframes app-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ---------------- Boot screen ---------------- */
#boot-screen {
  position: fixed;
  inset: 0;
  z-index: 6000;
  display: grid;
  place-items: center;
  background: var(--paper);
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
#boot-screen.is-out {
  opacity: 0;
  visibility: hidden;
}
.boot-inner {
  text-align: center;
  padding: 24px;
}
.boot-mark {
  width: 92px;
  height: 92px;
  margin: 0 auto 20px;
  border-radius: 30px;
  background: var(--navy);
  color: var(--gold);
  display: grid;
  place-items: center;
  box-shadow: 0 22px 50px -20px rgba(30, 42, 68, 0.55);
  animation: boot-float 2.4s ease-in-out infinite;
}
.boot-mark svg {
  width: 58px;
  height: 58px;
}
@keyframes boot-float {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-8px) rotate(2deg);
  }
}
.boot-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.boot-sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}
.boot-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 18px;
}
.boot-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: boot-dot 1.1s ease-in-out infinite;
}
.boot-dots i:nth-child(2) {
  animation-delay: 0.15s;
}
.boot-dots i:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes boot-dot {
  0%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-4px);
  }
}

/* ---------------- Layout ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  transition: background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  border-bottom: 1px solid transparent;
}
.topbar.is-scrolled {
  background: rgba(246, 240, 226, 0.9);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom-color: rgba(213, 199, 173, 0.7);
  box-shadow: 0 10px 30px -24px rgba(30, 42, 68, 0.5);
}
.topbar-inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  gap: 22px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
  border-radius: var(--radius-md);
}
.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: var(--navy);
  color: var(--gold);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px -10px rgba(30, 42, 68, 0.7);
  transform: rotate(-3deg);
  transition: transform 0.3s var(--ease);
}
.brand:hover .brand-mark {
  transform: rotate(4deg) translateY(-2px);
}
.brand-mark svg {
  width: 30px;
  height: 30px;
}
.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-copy b {
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: 0.02em;
}
.brand-copy span {
  margin-top: 4px;
  color: var(--muted-2);
  font-family: var(--font-number);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
}
.mainnav {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  margin: 0 auto;
  border: 1px solid rgba(213, 199, 173, 0.7);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.55);
  box-shadow: var(--shadow-sm);
}
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-2);
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.nav-link svg {
  width: 15px;
  height: 15px;
  opacity: 0.75;
}
.nav-link:hover {
  background: rgba(255, 253, 247, 0.9);
  transform: translateY(-1px);
}
.nav-link.is-active {
  background: var(--navy);
  color: var(--cream);
  box-shadow: 0 6px 16px -8px rgba(30, 42, 68, 0.65);
}
.nav-link.is-active svg {
  opacity: 1;
}
.nav-dot {
  position: absolute;
  top: 4px;
  right: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 2px var(--paper);
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
}
.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 38px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 12px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-pill svg {
  width: 16px;
  height: 16px;
}
.stat-pill b {
  font-family: var(--font-number);
  font-size: 17px;
  line-height: 1;
}
.stat-pill span {
  color: var(--muted);
  font-size: 10px;
}
.stat-pill.star {
  border-color: rgba(201, 138, 22, 0.3);
  background: var(--gold-soft);
}
.stat-pill.star svg {
  color: var(--gold-deep);
}
.stat-pill.streak {
  border-color: rgba(239, 103, 75, 0.22);
  background: var(--coral-soft);
}
.stat-pill.streak svg {
  color: var(--coral-deep);
}
.stat-pill:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.parent-entry,
.parent-mode-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 247, 0.55);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  transition: 0.2s ease;
}
.parent-entry svg,
.parent-mode-chip svg {
  width: 15px;
  height: 15px;
}
.parent-entry:hover {
  color: var(--ink);
  background: var(--card);
}
.parent-mode-chip {
  color: var(--gold-deep);
  border-color: rgba(201, 138, 22, 0.35);
  background: var(--gold-soft);
}
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  border: 2px solid var(--card);
  box-shadow: 0 0 0 1px var(--line), 0 6px 14px -8px rgba(30, 42, 68, 0.55);
  flex: none;
}
.app-main {
  max-width: var(--page);
  margin: 0 auto;
  padding: 22px 32px 40px;
}
.parent-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  padding: 10px 16px;
  border: 1px solid rgba(201, 138, 22, 0.3);
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(251, 240, 210, 0.95), rgba(255, 253, 247, 0.9));
  color: var(--gold-deep);
  font-size: 12.5px;
  font-weight: 700;
}
.parent-banner svg {
  width: 16px;
  height: 16px;
  flex: none;
}
.parent-banner .p-banner-text {
  flex: 1;
  min-width: 0;
}
.parent-banner .p-banner-text span {
  color: var(--muted);
  font-weight: 500;
}
.parent-banner .btn {
  flex: none;
}
.app-footer {
  max-width: var(--page);
  margin: 0 auto;
  padding: 8px 32px 100px;
  color: var(--muted-2);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-sign {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.footer-sign svg {
  width: 14px;
  height: 14px;
  color: var(--gold-deep);
}
.footer-note {
  opacity: 0.8;
}

/* ---------------- Shared bits ---------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-number);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: "✦";
  font-size: 11px;
  letter-spacing: 0;
  color: var(--gold-deep);
}
.hero .eyebrow {
  color: rgba(249, 241, 223, 0.58);
}
.hero .eyebrow::before {
  color: var(--gold);
}
.section-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.section-title h2 {
  font-family: var(--font-display);
  font-size: 23px;
  line-height: 1.2;
  letter-spacing: 0.01em;
}
.section-title .count {
  color: var(--muted);
  font-family: var(--font-number);
  font-size: 12px;
  font-weight: 700;
}
.section-title .count b {
  color: var(--ink);
}
.panel {
  background: rgba(255, 253, 247, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 9px 17px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s ease, color 0.18s ease;
}
.btn svg {
  width: 16px;
  height: 16px;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0) scale(0.985);
}
.btn.primary {
  background: var(--coral);
  color: #fff;
  box-shadow: 0 12px 22px -12px rgba(217, 79, 51, 0.75);
}
.btn.primary:hover {
  background: var(--coral-deep);
  box-shadow: 0 16px 28px -14px rgba(217, 79, 51, 0.85);
}
.btn.navy {
  background: var(--navy);
  color: var(--cream);
  box-shadow: 0 12px 22px -14px rgba(30, 42, 68, 0.8);
}
.btn.navy:hover {
  background: var(--navy-2);
}
.btn.gold {
  background: var(--gold);
  color: var(--navy);
  box-shadow: 0 12px 22px -12px rgba(201, 138, 22, 0.65);
}
.btn.gold:hover {
  background: #f7c45a;
}
.btn.ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink-2);
}
.btn.ghost:hover {
  background: var(--card);
  border-color: var(--ink-2);
}
.btn.soft {
  background: var(--gold-soft);
  color: var(--gold-deep);
  border-color: rgba(201, 138, 22, 0.2);
}
.btn.danger {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 12px 22px -12px rgba(194, 74, 58, 0.6);
}
.btn.danger-ghost {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(194, 74, 58, 0.2);
}
.btn.small {
  min-height: 32px;
  padding: 6px 12px;
  font-size: 12px;
}
.btn.tiny {
  min-height: 28px;
  padding: 4px 10px;
  font-size: 11.5px;
  gap: 4px;
}
.btn.tiny svg {
  width: 13px;
  height: 13px;
}
.btn[disabled],
.btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}
.btn-block {
  width: 100%;
}
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-2);
  transition: 0.18s ease;
}
.icon-btn svg {
  width: 18px;
  height: 18px;
}
.icon-btn:hover {
  border-color: var(--ink-2);
  transform: translateY(-1px);
}
.icon-btn.small {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}
.icon-btn.small svg {
  width: 15px;
  height: 15px;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 31px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 247, 0.65);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
  transition: 0.18s ease;
}
.chip svg {
  width: 14px;
  height: 14px;
}
.chip .chip-count {
  font-family: var(--font-number);
  font-size: 10.5px;
  color: var(--muted-2);
}
.chip:hover {
  border-color: var(--ink-2);
  background: var(--card);
}
.chip.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--cream);
}
.chip.is-active .chip-count {
  color: rgba(249, 241, 223, 0.65);
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1.5px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.5;
  white-space: nowrap;
}
.tag svg {
  width: 11px;
  height: 11px;
}
.tag.confirm {
  color: var(--gold-deep);
  background: var(--gold-soft);
}
.tag.core {
  color: var(--teal-deep);
  background: var(--teal-soft);
}
.tag.extra {
  color: var(--violet);
  background: var(--violet-soft);
}
.tag.cat {
  color: var(--ink-2);
  background: var(--paper-2);
  border: 1px solid var(--line);
}
.empty-state {
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
}
.empty-state .empty-art {
  width: 88px;
  height: 88px;
  margin: 0 auto 14px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  color: var(--gold-deep);
  background: var(--gold-soft);
  border: 1px solid rgba(201, 138, 22, 0.18);
}
.empty-state .empty-art svg {
  width: 44px;
  height: 44px;
}
.empty-state h3 {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 4px;
}
.empty-state p {
  font-size: 13px;
  max-width: 360px;
  margin: 0 auto;
}
.muted {
  color: var(--muted);
}
.hand {
  font-family: var(--font-hand);
}

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(680px 320px at 78% 20%, rgba(242, 179, 61, 0.16), transparent 63%),
    radial-gradient(520px 300px at 14% 110%, rgba(30, 158, 143, 0.22), transparent 62%),
    linear-gradient(132deg, #18243c 0%, #213451 52%, #2c4565 100%);
  color: var(--cream);
  box-shadow: 0 30px 60px -34px rgba(24, 36, 60, 0.85);
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  grid-template-rows: 1fr auto;
  min-height: 328px;
  padding: 34px 38px 0;
  isolation: isolate;
  margin-bottom: 24px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.55;
  background-image: radial-gradient(rgba(249, 241, 223, 0.3) 0.7px, transparent 0.7px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(100deg, transparent 28%, #000 100%);
  mask-image: linear-gradient(100deg, transparent 28%, #000 100%);
}
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -140px;
  right: -90px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  border: 1px solid rgba(249, 241, 223, 0.09);
  box-shadow:
    0 0 0 34px rgba(249, 241, 223, 0.025),
    0 0 0 76px rgba(249, 241, 223, 0.018);
}
.hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 26px;
  min-width: 0;
}
.hero h1 {
  margin: 12px 0 8px;
  font-family: var(--font-display);
  font-size: clamp(32px, 4.2vw, 53px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0.01em;
}
.hero h1 em {
  font-style: normal;
  color: var(--gold);
}
.hero h1 .period {
  color: var(--coral);
}
.hero-quote {
  font-family: var(--font-hand);
  font-size: 17px;
  line-height: 1.65;
  color: rgba(249, 241, 223, 0.78);
  max-width: 430px;
}
.hero-metrics {
  display: flex;
  gap: 30px;
  margin-top: 23px;
  flex-wrap: wrap;
}
.hero-metric {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.hero-metric span {
  color: rgba(249, 241, 223, 0.5);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.hero-metric b {
  font-family: var(--font-number);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--cream);
}
.hero-metric b small {
  margin-left: 2px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(249, 241, 223, 0.5);
}
.hero-metric b .gold {
  color: var(--gold);
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.hero-actions .btn {
  min-height: 44px;
  padding-inline: 20px;
}
.hero-hint {
  font-size: 11.5px;
  color: rgba(249, 241, 223, 0.55);
  max-width: 230px;
  line-height: 1.5;
}
.hero-art {
  position: relative;
  z-index: 1;
  min-height: 280px;
  align-self: stretch;
}
.orbit-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.orbit-caption {
  position: absolute;
  right: 8px;
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(249, 241, 223, 0.14);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: rgba(249, 241, 223, 0.8);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.orbit-caption b {
  color: var(--gold);
  font-family: var(--font-number);
  font-size: 14px;
}
.hero-level {
  grid-column: 1 / -1;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid rgba(249, 241, 223, 0.12);
  padding: 14px 0 18px;
  margin-top: 4px;
  min-width: 0;
}
.level-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 9px;
  border-radius: 8px;
  background: var(--gold);
  color: var(--navy);
  font-family: var(--font-number);
  font-size: 12px;
  font-weight: 800;
  flex: none;
}
.level-title {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--cream);
  white-space: nowrap;
}
.level-track {
  flex: 1;
  min-width: 60px;
  height: 6px;
  border-radius: 999px;
  background: rgba(249, 241, 223, 0.14);
  overflow: hidden;
}
.level-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), #ffd77f);
  box-shadow: 0 0 12px rgba(242, 179, 61, 0.5);
}
.level-next {
  font-size: 10.5px;
  color: rgba(249, 241, 223, 0.5);
  white-space: nowrap;
}
.level-link {
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.level-link:hover {
  text-decoration: underline;
}

/* ---------------- Today layout ---------------- */
.today-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 338px;
  gap: 24px;
  align-items: start;
}
.board {
  position: relative;
  background: rgba(255, 253, 247, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 24px 26px 26px;
  min-width: 0;
}
.board-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 16px;
}
.board-head .section-title {
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}
.board-head .section-title h2 {
  font-size: 25px;
}
.board-head .section-title h2 span {
  color: var(--muted-2);
  font-family: var(--font-number);
  font-size: 12px;
  font-weight: 700;
  margin-left: 5px;
}
.board-tools {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 9px;
}
.board-tools .filter-row {
  justify-content: flex-end;
}
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.subject-block {
  margin-top: 8px;
}
.subject-block + .subject-block {
  margin-top: 20px;
}
.subject-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 0 0;
}
.subject-symbol {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--soft);
  color: var(--color);
}
.subject-symbol svg {
  width: 18px;
  height: 18px;
}
.subject-head h3 {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.01em;
  color: var(--ink);
  white-space: nowrap;
}
.subject-blurb {
  margin-left: 2px;
  font-size: 10.5px;
  color: var(--muted-2);
  white-space: nowrap;
}
.subject-line {
  flex: 1;
  height: 1px;
  min-width: 16px;
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 4px, transparent 4px 8px);
  opacity: 0.75;
}
.subject-stats {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: none;
  color: var(--muted);
  font-family: var(--font-number);
  font-size: 11px;
  font-weight: 700;
}
.subject-stats b {
  color: var(--color);
}
.subject-stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold-deep);
  font-size: 10.5px;
}
.task-list {
  margin-top: 7px;
}
.task-row {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 13px 8px;
  margin: 0 -8px;
  border-top: 1px dashed rgba(213, 199, 173, 0.7);
  border-radius: 13px;
  transition: background 0.2s ease, opacity 0.2s ease;
}
.task-row:first-child {
  border-top-color: transparent;
}
.task-row:hover {
  background: rgba(246, 240, 226, 0.55);
}
.task-check {
  width: 32px;
  height: 32px;
  margin-top: 1px;
  border-radius: 50%;
  border: 1.7px solid var(--line-strong);
  background: rgba(255, 253, 247, 0.85);
  color: rgba(201, 138, 22, 0.42);
  display: grid;
  place-items: center;
  flex: none;
  transition: transform 0.18s var(--ease), background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.task-check svg {
  width: 17px;
  height: 17px;
}
.task-check:hover {
  border-color: var(--teal);
  color: var(--teal);
  transform: scale(1.06);
}
.task-check.is-passive {
  opacity: 0.45;
  cursor: default;
  transform: none;
}
.task-check.is-passive:hover {
  border-color: var(--line-strong);
  color: rgba(201, 138, 22, 0.42);
  transform: none;
}
.task-main {
  min-width: 0;
}
.task-title {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
}
.task-desc {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.task-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 9px;
  margin-top: 6px;
  color: var(--muted-2);
  font-size: 10.5px;
}
.task-meta .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.task-meta svg {
  width: 12px;
  height: 12px;
}
.meta-sep {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--line-strong);
}
.task-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  padding-top: 1px;
  flex: none;
}
.reward-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold-deep);
  border: 1px solid rgba(201, 138, 22, 0.14);
  font-family: var(--font-number);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.reward-pill svg {
  width: 12px;
  height: 12px;
}
.task-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--color, var(--ink-2));
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.task-link svg {
  width: 11px;
  height: 11px;
}
.task-link:hover {
  text-decoration: underline;
}
.task-actions {
  display: flex;
  gap: 5px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.task-row.is-done {
  background: linear-gradient(90deg, rgba(30, 158, 143, 0.065), transparent 72%);
}
.task-row.is-done:hover {
  background: rgba(30, 158, 143, 0.09);
}
.task-row.is-done .task-check {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
  cursor: default;
}
.task-row.is-done .task-title {
  color: var(--ink-2);
}
.task-row.is-done .task-desc {
  color: var(--muted-2);
}
.done-stamp {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transform: rotate(-4deg);
  padding: 1px 6px;
  border: 1px solid rgba(30, 158, 143, 0.45);
  border-radius: 4px;
  color: var(--teal-deep);
  background: rgba(227, 244, 239, 0.7);
  font-family: var(--font-number);
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 0.16em;
  margin-left: 2px;
}
.done-stamp svg {
  width: 9px;
  height: 9px;
}
.task-row.is-pending {
  background: linear-gradient(90deg, rgba(242, 179, 61, 0.11), transparent 76%);
}
.task-row.is-pending .task-check {
  border-color: var(--gold-deep);
  background: var(--gold-soft);
  color: var(--gold-deep);
  cursor: default;
}
.pending-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold-deep);
  border: 1px solid rgba(201, 138, 22, 0.2);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.pending-chip svg {
  width: 11px;
  height: 11px;
}
.pending-dots::after {
  content: "";
  animation: dots 1.4s steps(4, end) infinite;
}
@keyframes dots {
  0% {
    content: "";
  }
  25% {
    content: ".";
  }
  50% {
    content: "..";
  }
  75% {
    content: "...";
  }
}
.task-row.is-parent-mode .task-check {
  cursor: default;
}
.extra-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 24px 0 2px;
  color: var(--violet);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.extra-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: repeating-linear-gradient(90deg, rgba(91, 91, 181, 0.35) 0 4px, transparent 4px 8px);
}
.extra-divider svg {
  width: 14px;
  height: 14px;
}

/* Chest */
.chest-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  margin-top: 24px;
  padding: 15px 17px;
  border-radius: 19px;
  border: 1px solid rgba(201, 138, 22, 0.28);
  background:
    radial-gradient(320px 130px at 88% 20%, rgba(255, 232, 168, 0.65), transparent 70%),
    linear-gradient(120deg, #fbf0d2, #fff9e8 68%);
}
.chest-art {
  width: 50px;
  height: 50px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: rgba(255, 253, 247, 0.75);
  color: var(--gold-deep);
  border: 1px solid rgba(201, 138, 22, 0.2);
  box-shadow: var(--shadow-sm);
}
.chest-art svg {
  width: 28px;
  height: 28px;
}
.chest-copy {
  min-width: 0;
}
.chest-copy .eyebrow {
  font-size: 8.5px;
  letter-spacing: 0.18em;
}
.chest-copy .eyebrow::before {
  color: var(--gold-deep);
}
.chest-copy h3 {
  margin-top: 1px;
  font-family: var(--font-display);
  font-size: 15.5px;
  color: var(--ink);
}
.chest-copy p {
  margin-top: 1px;
  color: var(--muted);
  font-size: 11.5px;
}
.chest-reward {
  display: flex;
  align-items: baseline;
  gap: 2px;
  color: var(--gold-deep);
  font-family: var(--font-number);
  font-size: 24px;
  font-weight: 900;
}
.chest-reward small {
  font-size: 11px;
  font-weight: 700;
}
.chest-progress {
  grid-column: 2 / -1;
  height: 5px;
  border-radius: 999px;
  background: rgba(201, 138, 22, 0.14);
  overflow: hidden;
  margin-top: -2px;
}
.chest-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--coral));
  transition: width 0.4s var(--ease);
}
.chest-card.is-open {
  border-color: rgba(30, 158, 143, 0.28);
  background:
    radial-gradient(320px 130px at 88% 20%, rgba(178, 238, 224, 0.65), transparent 70%),
    linear-gradient(120deg, #e3f4ef, #fbfff9 68%);
}
.chest-card.is-open .chest-art {
  color: var(--teal-deep);
  border-color: rgba(30, 158, 143, 0.2);
}
.chest-card.is-open .chest-reward {
  color: var(--teal-deep);
}
.chest-card.is-open .chest-progress i {
  background: linear-gradient(90deg, var(--teal), #7dddcb);
}
.chest-open-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--teal-deep);
  font-size: 10.5px;
  font-weight: 800;
}

/* ---------------- Rail ---------------- */
.rail {
  display: flex;
  flex-direction: column;
  gap: 17px;
  min-width: 0;
}
.rail-card {
  background: rgba(255, 253, 247, 0.84);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-md);
  padding: 19px;
  overflow: hidden;
}
.rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.rail-head .rail-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--gold-deep);
  font-size: 10.5px;
  letter-spacing: 0;
  text-transform: none;
}
.rail-head .rail-link:hover {
  text-decoration: underline;
}
.rail-head svg {
  width: 13px;
  height: 13px;
}
.rail-card.level-card {
  background:
    radial-gradient(260px 170px at 100% 0%, rgba(242, 179, 61, 0.22), transparent 72%),
    linear-gradient(135deg, #1a2740, #253a58);
  border-color: rgba(242, 179, 61, 0.18);
  color: var(--cream);
}
.level-card .rail-head {
  color: rgba(249, 241, 223, 0.5);
}
.level-card .rail-head .rail-link {
  color: var(--gold);
}
.level-main {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}
.level-orb {
  position: relative;
  width: 58px;
  height: 58px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 34% 28%, #ffe3a1, var(--gold) 55%, #d69a22);
  color: var(--navy);
  box-shadow:
    inset -5px -7px 14px rgba(120, 69, 1, 0.24),
    0 8px 20px -8px rgba(0, 0, 0, 0.5);
  font-family: var(--font-number);
  font-size: 17px;
  font-weight: 900;
}
.level-orb::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px dashed rgba(249, 241, 223, 0.32);
  transform: rotate(-18deg) scaleY(0.48);
}
.level-main-copy {
  min-width: 0;
}
.level-main-copy h3 {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.2;
  color: var(--cream);
}
.level-main-copy p {
  margin-top: 3px;
  color: rgba(249, 241, 223, 0.55);
  font-family: var(--font-number);
  font-size: 10.5px;
  letter-spacing: 0.03em;
}
.level-bar {
  height: 7px;
  margin-top: 15px;
  background: rgba(249, 241, 223, 0.13);
  border-radius: 999px;
  overflow: hidden;
}
.level-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), #ffe1a0);
  box-shadow: 0 0 12px rgba(242, 179, 61, 0.55);
  transition: width 0.5s var(--ease);
}
.level-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  color: rgba(249, 241, 223, 0.5);
  font-size: 10px;
}
.level-meta b {
  color: var(--cream);
  font-family: var(--font-number);
}
.next-gift {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 15px;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(249, 241, 223, 0.07);
  border: 1px dashed rgba(249, 241, 223, 0.16);
}
.next-gift-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(242, 179, 61, 0.15);
  color: var(--gold);
  display: grid;
  place-items: center;
  flex: none;
}
.next-gift-icon svg {
  width: 17px;
  height: 17px;
}
.next-gift-copy {
  min-width: 0;
}
.next-gift-copy span {
  display: block;
  color: rgba(249, 241, 223, 0.45);
  font-size: 9px;
}
.next-gift-copy b {
  display: block;
  color: var(--cream);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rail-card.streak-card .rail-head b {
  color: var(--ink);
  font-family: var(--font-number);
  font-size: 15px;
  letter-spacing: 0;
}
.streak-summary {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 11px;
}
.streak-flame {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--coral-soft);
  color: var(--coral-deep);
}
.streak-flame svg {
  width: 21px;
  height: 21px;
}
.streak-summary h3 {
  font-family: var(--font-display);
  font-size: 17px;
}
.streak-summary p {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.4;
}
.streak-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  margin-top: 13px;
}
.streak-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--muted-2);
  font-size: 8.5px;
}
.streak-day i {
  width: 100%;
  aspect-ratio: 1;
  max-height: 27px;
  border-radius: 8px;
  border: 1px dashed var(--line-strong);
  background: rgba(246, 240, 226, 0.45);
  display: grid;
  place-items: center;
  font-style: normal;
  color: transparent;
}
.streak-day i svg {
  width: 13px;
  height: 13px;
}
.streak-day.is-done i {
  background: var(--teal-soft);
  border: 1px solid rgba(30, 158, 143, 0.28);
  color: var(--teal-deep);
}
.streak-day.is-partial i {
  background: var(--gold-soft);
  border: 1px solid rgba(201, 138, 22, 0.26);
  color: var(--gold-deep);
}
.streak-day.is-rest i {
  background: repeating-linear-gradient(135deg, rgba(213, 199, 173, 0.2) 0 3px, transparent 3px 6px);
}
.streak-day.is-today span {
  color: var(--coral-deep);
  font-weight: 800;
}
.streak-next {
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 10.5px;
}
.streak-next b {
  color: var(--gold-deep);
}
.site-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 11px;
}
.site-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px;
  margin: 0 -4px;
  border-radius: 11px;
  transition: background 0.18s ease;
}
.site-row:hover {
  background: var(--paper-2);
}
.site-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--soft);
  color: var(--color);
  flex: none;
}
.site-icon svg {
  width: 17px;
  height: 17px;
}
.site-info {
  min-width: 0;
  flex: 1;
}
.site-info b {
  display: block;
  font-size: 12px;
  line-height: 1.3;
}
.site-info small {
  display: block;
  color: var(--muted-2);
  font-size: 9.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-status {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line-strong);
  flex: none;
  box-shadow: 0 0 0 3px rgba(213, 199, 173, 0.18);
}
.site-status.is-up {
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(30, 158, 143, 0.16);
}
.site-status.is-down {
  background: var(--coral);
  box-shadow: 0 0 0 3px rgba(239, 103, 75, 0.12);
}
.site-row > svg {
  width: 13px;
  height: 13px;
  color: var(--muted-2);
  flex: none;
}
.rail-note {
  margin-top: 9px;
  color: var(--muted-2);
  font-size: 9.5px;
  line-height: 1.5;
}
/* 小满农场打通状态（2026-11-06） */
.farm-status {
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 11px;
  background: rgba(31, 167, 154, 0.08);
  border: 1px dashed rgba(31, 167, 154, 0.45);
}
.farm-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: var(--ink);
}
.farm-line > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.farm-line b {
  font-family: var(--font-number);
  font-size: 11px;
  color: var(--teal-deep);
}
.farm-mark {
  width: 16px;
  height: 16px;
  border-radius: 6px;
  background: var(--teal);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.farm-mark svg {
  width: 10px;
  height: 10px;
}
.farm-bar {
  margin-top: 7px;
  height: 5px;
  border-radius: 99px;
  background: rgba(31, 167, 154, 0.16);
  overflow: hidden;
}
.farm-bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--teal), #4cc4b6);
  transition: width 0.5s ease;
}
.farm-state {
  margin-top: 6px;
  font-size: 9.5px;
  line-height: 1.5;
  color: var(--muted-2);
}
.farm-state b {
  color: var(--teal-deep);
}
.farm-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 7px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--teal-deep);
  text-decoration: none;
}
.farm-link svg {
  width: 11px;
  height: 11px;
}
.farm-link:hover {
  text-decoration: underline;
}
.farm-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.mini-rewards {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 11px;
}
.mini-reward {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border-radius: 11px;
  border: 1px solid transparent;
  transition: 0.18s ease;
}
.mini-reward:hover {
  background: var(--paper-2);
  border-color: var(--line);
}
.mini-reward-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--soft);
  color: var(--color);
  flex: none;
}
.mini-reward-icon svg {
  width: 16px;
  height: 16px;
}
.mini-reward-name {
  flex: 1;
  min-width: 0;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.3;
}
.mini-reward-cost {
  color: var(--gold-deep);
  font-family: var(--font-number);
  font-size: 11px;
  font-weight: 800;
  flex: none;
}

/* ---------------- Page head / pages ---------------- */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
  margin: 8px 0 22px;
}
.page-head h1 {
  margin-top: 7px;
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.15;
  letter-spacing: 0.01em;
}
.page-head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  max-width: 580px;
  line-height: 1.6;
}
.page-head.small h1 {
  font-size: clamp(24px, 2.8vw, 32px);
}
.balance-orb {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 174px;
  padding: 14px 18px;
  border-radius: 19px;
  border: 1px solid rgba(201, 138, 22, 0.24);
  background:
    radial-gradient(180px 110px at 100% 0%, rgba(255, 231, 160, 0.7), transparent 70%),
    var(--gold-soft);
  box-shadow: var(--shadow-sm);
}
.balance-orb > span {
  color: var(--gold-deep);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
}
.balance-orb b {
  margin-top: 1px;
  color: var(--gold-deep);
  font-family: var(--font-number);
  font-size: 33px;
  font-weight: 900;
  line-height: 1.1;
}
.balance-orb b small {
  margin-left: 3px;
  font-size: 13px;
}
.balance-orb em {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
  font-style: normal;
}
.page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.page-toolbar h2 {
  font-family: var(--font-display);
  font-size: 22px;
}
.page-toolbar .toolbar-sub {
  color: var(--muted);
  font-size: 11.5px;
}

/* ---------------- Rewards ---------------- */
.reward-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}
.ticket {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  min-height: 226px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: var(--card);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform 0.24s var(--ease), box-shadow 0.24s var(--ease);
}
.ticket::before,
.ticket::after {
  content: "";
  position: absolute;
  right: 95px;
  z-index: 2;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 3px rgba(30, 42, 68, 0.08);
}
.ticket::before {
  top: -10px;
}
.ticket::after {
  bottom: -10px;
}
.ticket:hover {
  transform: translateY(-4px) rotate(-0.35deg);
  box-shadow: var(--shadow-lg);
}
.ticket-body {
  position: relative;
  padding: 17px 17px 15px;
  background:
    radial-gradient(180px 130px at 100% 0%, var(--soft), transparent 72%),
    var(--card);
  border-right: 1.5px dashed var(--line-strong);
  display: flex;
  flex-direction: column;
}
.ticket-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ticket-cat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--color);
  font-size: 9.5px;
  font-weight: 800;
}
.ticket-cat svg {
  width: 11px;
  height: 11px;
}
.ticket-limit {
  color: var(--muted-2);
  font-size: 9.5px;
  white-space: nowrap;
}
.ticket-icon {
  width: 44px;
  height: 44px;
  margin-top: 12px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--soft);
  color: var(--color);
  border: 1px solid rgba(255, 255, 255, 0.65);
}
.ticket-icon svg {
  width: 24px;
  height: 24px;
}
.ticket-body h3 {
  margin-top: 9px;
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.28;
  color: var(--ink);
}
.ticket-body p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.5;
  flex: 1;
}
.ticket-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  color: var(--muted-2);
  font-size: 9.5px;
}
.ticket-meta b {
  color: var(--color);
  font-family: var(--font-number);
}
.ticket-stub {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 9px;
  background: rgba(255, 253, 247, 0.55);
}
.ticket-stub .stub-label {
  color: var(--muted-2);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.ticket-cost {
  color: var(--gold-deep);
  font-family: var(--font-number);
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
}
.ticket-cost small {
  margin-left: 1px;
  font-size: 11px;
}
.ticket-stub .btn {
  width: 100%;
  padding-inline: 7px;
  font-size: 11.5px;
  min-height: 34px;
}
.ticket.is-locked {
  opacity: 0.82;
  filter: saturate(0.85);
}
.ticket.is-locked:hover {
  transform: none;
  box-shadow: var(--shadow-md);
}
.ticket.is-locked .ticket-stub .btn {
  border-color: var(--line);
  background: var(--paper-2);
  color: var(--muted);
}
.wallet-panel {
  margin-top: 28px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 247, 0.76);
  box-shadow: var(--shadow-md);
}
.shop-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin: 2px 2px 10px;
}
.shop-head h2 {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--ink);
}
.shop-head span {
  color: var(--muted);
  font-size: 11.5px;
}
.wallet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 13px;
}
.wallet-head h2 {
  font-family: var(--font-display);
  font-size: 22px;
}
.wallet-head span {
  color: var(--muted);
  font-size: 11.5px;
}
.coupon-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.coupon {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px 16px 14px 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--card);
  overflow: hidden;
}
.coupon::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--color);
  opacity: 0.65;
}
.coupon-head {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.coupon-cat {
  color: var(--color);
  font-size: 9.5px;
  font-weight: 800;
}
.coupon-code {
  color: var(--muted-2);
  font-family: var(--font-number);
  font-size: 8.5px;
  letter-spacing: 0.08em;
}
.coupon h3 {
  margin-top: 3px;
  font-size: 14px;
  line-height: 1.35;
}
.coupon p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.45;
}
.coupon-time {
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 9.5px;
}
.coupon-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
}
.coupon-actions .btn {
  min-height: 31px;
  padding: 5px 11px;
  font-size: 11px;
}
.coupon.is-used {
  opacity: 0.58;
  filter: saturate(0.5);
}
.coupon.is-active {
  border-color: rgba(242, 179, 61, 0.55);
  box-shadow: 0 0 0 3px rgba(242, 179, 61, 0.12);
}
.coupon.is-active .coupon-code {
  color: var(--gold-deep);
}
.timer-live {
  color: var(--gold-deep);
  font-family: var(--font-number);
  font-size: 14px;
  font-weight: 800;
}
.wallet-empty {
  padding: 25px 10px;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
}
.wallet-empty svg {
  width: 30px;
  height: 30px;
  margin: 0 auto 7px;
  color: var(--gold-deep);
}

/* ---------------- 游戏券 · 农场时间兑换（2026-11-16） ---------------- */
.game-exchange {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px dashed rgba(31, 167, 154, 0.45);
  border-radius: 16px;
  background: linear-gradient(120deg, rgba(31, 167, 154, 0.09), rgba(242, 179, 61, 0.09));
}
.game-bank-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}
.game-bank-head b {
  color: var(--teal-deep);
  font-family: var(--font-number);
  font-size: 16px;
}
.game-bar {
  height: 7px;
  margin-top: 8px;
}
.game-hint {
  margin-top: 7px;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.5;
}
.game-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  text-align: right;
}
.game-side .btn {
  min-height: 38px;
  padding: 9px 16px;
  font-size: 12.5px;
  white-space: nowrap;
}
.game-note {
  max-width: 220px;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.45;
}
/* 换不了券时的原因横幅（2026-11-17）：把「为什么换不了 + 下一步」摆到面板最上面，
   以前只有按钮下面一行 10px 小字，孩子看不见，家长以为「有余额却换不了」。 */
.game-block {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 11px 14px;
  border: 1px solid rgba(239, 103, 75, 0.42);
  border-radius: 14px;
  background: rgba(239, 103, 75, 0.08);
}
.game-block > svg {
  flex: none;
  width: 17px;
  height: 17px;
  color: var(--coral);
}
.game-block-text {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.game-block-text b {
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.4;
}
.game-block-text span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.game-block .btn {
  flex: none;
  min-height: 32px;
  padding: 6px 12px;
  font-size: 11.5px;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .game-block {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .game-block .btn {
    margin-left: 27px;
  }
}
.game-coupon .coupon-time {
  font-size: 10px;
}
@media (max-width: 720px) {
  .game-exchange {
    grid-template-columns: minmax(0, 1fr);
  }
  .game-side {
    align-items: stretch;
    text-align: left;
  }
  .game-note {
    max-width: none;
  }
}

/* ---------------- 星星换积分（1 ★ = 2 分，2026-11-16） ---------------- */
.star-swap {
  margin: 0 0 14px;
  padding: 12px 16px;
  border: 1px solid rgba(242, 179, 61, 0.55);
  border-radius: 16px;
  background: linear-gradient(120deg, rgba(242, 179, 61, 0.14), rgba(255, 255, 255, 0.45));
}
.star-swap.is-empty {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.5);
}
.star-swap-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.star-swap-head b {
  font-family: var(--font-display);
  font-size: 14.5px;
  color: var(--ink);
}
.star-swap-head span {
  color: var(--muted);
  font-size: 11px;
}
.star-swap-head .star-swap-balance {
  margin-left: auto;
  color: var(--gold-deep);
  font-family: var(--font-number);
  font-size: 12px;
}
.star-swap-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.star-swap-input {
  width: 72px;
  min-height: 36px;
  padding: 7px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-number);
  font-size: 14px;
  text-align: center;
}
.star-swap-unit {
  color: var(--muted);
  font-family: var(--font-number);
  font-size: 12px;
}
.star-swap-row .btn {
  min-height: 36px;
  padding: 8px 14px;
  font-size: 12.5px;
}
.star-swap-presets {
  display: inline-flex;
  gap: 6px;
}
.star-swap-presets button {
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-family: var(--font-number);
  font-size: 11.5px;
  cursor: pointer;
}
.star-swap-presets button:hover {
  border-color: var(--gold-deep);
  color: var(--gold-deep);
}
.star-swap-hint {
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.5;
}

/* ---------------- Levels ---------------- */
.level-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 240px;
  align-items: center;
  gap: 22px;
  padding: 26px 28px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(380px 220px at 88% 0%, rgba(242, 179, 61, 0.18), transparent 68%),
    linear-gradient(132deg, #18243c, #263c5b);
  color: var(--cream);
  box-shadow: var(--shadow-lg);
  margin-bottom: 24px;
}
.level-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.45;
  background-image: radial-gradient(rgba(249, 241, 223, 0.25) 0.7px, transparent 0.7px);
  background-size: 24px 24px;
  pointer-events: none;
}
.level-big-orb {
  position: relative;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 34% 26%, #ffe7ac, var(--gold) 55%, #c58819);
  color: var(--navy);
  font-family: var(--font-number);
  font-size: 25px;
  font-weight: 900;
  box-shadow: inset -8px -10px 20px rgba(120, 69, 1, 0.24), 0 16px 30px -16px rgba(0, 0, 0, 0.7);
  z-index: 1;
}
.level-big-orb::after {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1px dashed rgba(249, 241, 223, 0.3);
  transform: rotate(-20deg) scaleY(0.42);
}
.level-hero-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}
.level-hero-copy .eyebrow {
  color: rgba(249, 241, 223, 0.5);
}
.level-hero-copy h1 {
  margin-top: 5px;
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
}
.level-hero-copy h1 span {
  color: var(--gold);
}
.level-hero-copy p {
  margin-top: 5px;
  color: rgba(249, 241, 223, 0.62);
  font-size: 12px;
}
.level-hero-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 13px;
}
.level-hero-bar .track {
  flex: 1;
  height: 7px;
  background: rgba(249, 241, 223, 0.13);
  border-radius: 999px;
  overflow: hidden;
}
.level-hero-bar .track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), #ffe2a4);
}
.level-hero-bar b {
  font-family: var(--font-number);
  font-size: 11px;
  color: var(--gold);
  white-space: nowrap;
}
.level-next-card {
  position: relative;
  z-index: 1;
  padding: 13px 14px;
  border-radius: 15px;
  border: 1px dashed rgba(249, 241, 223, 0.2);
  background: rgba(249, 241, 223, 0.06);
}
.level-next-card span {
  color: rgba(249, 241, 223, 0.45);
  font-size: 9.5px;
  letter-spacing: 0.08em;
}
.level-next-card h3 {
  margin-top: 3px;
  color: var(--cream);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 600;
}
.level-next-card small {
  display: block;
  margin-top: 6px;
  color: var(--gold);
  font-family: var(--font-number);
  font-size: 10px;
}
.planet-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
}
.planet-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 17px 13px 15px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.2s ease;
  overflow: hidden;
}
.planet-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.planet-card.is-current {
  border-color: rgba(30, 42, 68, 0.5);
  box-shadow: 0 0 0 3px rgba(30, 42, 68, 0.08), var(--shadow-md);
}
.planet-card.is-locked {
  opacity: 0.55;
  filter: saturate(0.55);
}
.planet-card.is-claimable {
  border-color: rgba(242, 179, 61, 0.7);
  box-shadow: 0 0 0 3px rgba(242, 179, 61, 0.16), var(--shadow-md);
  animation: claimable-glow 2.8s ease-in-out infinite;
}
@keyframes claimable-glow {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(242, 179, 61, 0.14), var(--shadow-md);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(242, 179, 61, 0.24), var(--shadow-md);
  }
}
.planet-badge {
  position: absolute;
  top: 11px;
  left: 11px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
}
.planet-badge.now {
  background: var(--navy);
  color: var(--cream);
}
.planet-visual {
  position: relative;
  width: 62px;
  height: 62px;
  margin-top: 4px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.86), var(--planet) 52%, #1b2740);
  box-shadow: inset -7px -9px 16px rgba(30, 42, 68, 0.24);
  display: grid;
  place-items: center;
  color: rgba(255, 253, 247, 0.92);
}
.planet-visual::after {
  content: "";
  position: absolute;
  left: -13px;
  right: -13px;
  top: 50%;
  height: 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  transform: translateY(-50%) rotate(-16deg);
}
.planet-visual svg {
  width: 22px;
  height: 22px;
  position: relative;
  z-index: 1;
}
.planet-lv {
  margin-top: 9px;
  color: var(--muted);
  font-family: var(--font-number);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
}
.planet-card h3 {
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 15.5px;
  line-height: 1.25;
}
.planet-xp {
  margin-top: 2px;
  color: var(--muted-2);
  font-family: var(--font-number);
  font-size: 9.5px;
}
.planet-gift {
  margin-top: 7px;
  min-height: 30px;
  color: var(--ink-2);
  font-size: 10px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.planet-foot {
  margin-top: auto;
  padding-top: 9px;
  width: 100%;
}
.planet-foot .btn {
  width: 100%;
  min-height: 30px;
  font-size: 10.5px;
  padding: 4px 8px;
}
.planet-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 700;
}
.planet-status.done {
  color: var(--teal-deep);
}
.planet-status.claim {
  color: var(--gold-deep);
}

/* ---------------- Records ---------------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.stat-card {
  padding: 17px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.stat-card .stat-label {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
}
.stat-card .stat-value {
  margin-top: 2px;
  color: var(--ink);
  font-family: var(--font-number);
  font-size: 30px;
  font-weight: 900;
  line-height: 1.15;
}
.stat-card .stat-value small {
  margin-left: 2px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
}
.stat-card .stat-foot {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 9.5px;
}
.stat-card.gold {
  background: var(--gold-soft);
  border-color: rgba(201, 138, 22, 0.22);
}
.stat-card.gold .stat-value {
  color: var(--gold-deep);
}
.stat-card.teal {
  background: var(--teal-soft);
  border-color: rgba(30, 158, 143, 0.18);
}
.stat-card.teal .stat-value {
  color: var(--teal-deep);
}
.records-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 18px;
  align-items: start;
}
.record-panel {
  padding: 21px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 253, 247, 0.8);
  box-shadow: var(--shadow-md);
}
.record-panel h2 {
  font-family: var(--font-display);
  font-size: 21px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.panel-head .panel-sub {
  color: var(--muted);
  font-size: 10.5px;
}
.chart {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 9px;
  align-items: end;
  height: 190px;
  padding-top: 6px;
}
.chart-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  height: 100%;
}
.chart-value {
  color: var(--muted);
  font-family: var(--font-number);
  font-size: 9.5px;
  font-weight: 700;
}
.chart-bar {
  width: 100%;
  max-width: 38px;
  height: 125px;
  display: flex;
  align-items: flex-end;
  border-radius: 9px;
  background: rgba(246, 240, 226, 0.7);
  overflow: hidden;
}
.chart-bar i {
  display: block;
  width: 100%;
  min-height: 4px;
  border-radius: 9px 9px 3px 3px;
  background: linear-gradient(180deg, var(--teal), #5ec9ba);
  transition: height 0.6s var(--ease);
}
.chart-col.is-today .chart-bar {
  background: var(--gold-soft);
  box-shadow: 0 0 0 2px rgba(242, 179, 61, 0.18);
}
.chart-col.is-today .chart-bar i {
  background: linear-gradient(180deg, var(--gold), #f8d27b);
}
.chart-label {
  color: var(--muted);
  font-size: 9.5px;
}
.chart-col.is-today .chart-label {
  color: var(--gold-deep);
  font-weight: 800;
}
.heatmap {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.heat-cell {
  aspect-ratio: 1;
  border-radius: 7px;
  border: 1px solid transparent;
  background: rgba(213, 199, 173, 0.18);
  position: relative;
}
.heat-cell[data-level="1"] {
  background: rgba(30, 158, 143, 0.16);
}
.heat-cell[data-level="2"] {
  background: rgba(30, 158, 143, 0.32);
}
.heat-cell[data-level="3"] {
  background: rgba(30, 158, 143, 0.52);
}
.heat-cell[data-level="4"] {
  background: rgba(30, 158, 143, 0.78);
}
.heat-cell.is-today {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(242, 179, 61, 0.24);
}
.heat-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 11px;
  color: var(--muted-2);
  font-size: 9px;
}
.heat-legend i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: rgba(30, 158, 143, 0.2);
}
.heat-legend i:nth-child(3) {
  background: rgba(30, 158, 143, 0.38);
}
.heat-legend i:nth-child(4) {
  background: rgba(30, 158, 143, 0.6);
}
.heat-legend i:nth-child(5) {
  background: rgba(30, 158, 143, 0.86);
}
.heat-day-labels {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 5px;
  color: var(--muted-2);
  font-size: 8.5px;
  text-align: center;
}
.activity-panel {
  margin-top: 18px;
}
.activity-filters {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.activity-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 4px;
  border-top: 1px dashed var(--line);
}
.activity-row:first-child {
  border-top: 0;
}
.activity-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--paper-2);
  color: var(--muted);
}
.activity-icon svg {
  width: 17px;
  height: 17px;
}
.activity-icon.earn {
  background: var(--teal-soft);
  color: var(--teal-deep);
}
.activity-icon.bonus,
.activity-icon.streak {
  background: var(--gold-soft);
  color: var(--gold-deep);
}
.activity-icon.spend {
  background: var(--coral-soft);
  color: var(--coral-deep);
}
.activity-icon.adjust {
  background: var(--violet-soft);
  color: var(--violet);
}
.activity-copy {
  flex: 1;
  min-width: 0;
}
.activity-copy b {
  display: block;
  font-size: 12.5px;
  line-height: 1.4;
  font-weight: 700;
}
.activity-copy small {
  display: block;
  color: var(--muted-2);
  font-size: 9.5px;
  margin-top: 1px;
}
.activity-amount {
  font-family: var(--font-number);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}
.activity-amount.positive {
  color: var(--teal-deep);
}
.activity-amount.negative {
  color: var(--coral-deep);
}
.activity-amount.neutral {
  color: var(--violet);
}
.load-more {
  display: block;
  margin: 14px auto 0;
}

/* ---------------- Settings ---------------- */
.settings-layout {
  display: grid;
  grid-template-columns: 206px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.settings-nav {
  position: sticky;
  top: 92px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 247, 0.72);
  box-shadow: var(--shadow-sm);
}
.settings-tab {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border-radius: 11px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  text-align: left;
  transition: 0.18s ease;
}
.settings-tab svg {
  width: 16px;
  height: 16px;
  opacity: 0.8;
}
.settings-tab:hover {
  background: var(--paper-2);
  color: var(--ink);
}
.settings-tab.is-active {
  background: var(--navy);
  color: var(--cream);
}
.settings-tab .tab-badge {
  margin-left: auto;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-family: var(--font-number);
  font-size: 9px;
  display: inline-grid;
  place-items: center;
}
.settings-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.settings-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 253, 247, 0.82);
  box-shadow: var(--shadow-md);
}
.settings-card h2 {
  font-family: var(--font-display);
  font-size: 20px;
}
.settings-card .card-desc {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}
.settings-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 13px;
}
.settings-section + .settings-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
}
.settings-section h3 {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 10px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.form-grid .span-2 {
  grid-column: 1 / -1;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.field > label,
.field-label {
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 800;
}
.field .hint {
  color: var(--muted-2);
  font-size: 9.5px;
  line-height: 1.45;
}
.input,
.select,
.textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border: 1.5px solid var(--line);
  border-radius: 11px;
  background: var(--card);
  color: var(--ink);
  font-size: 13px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 3px rgba(242, 179, 61, 0.17);
}
.textarea {
  min-height: 78px;
  resize: vertical;
  line-height: 1.55;
}
.input-compact {
  min-height: 34px;
  padding: 6px 9px;
  font-size: 12px;
  border-radius: 9px;
}
.check-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}
.check-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--ink-2);
  cursor: pointer;
}
.check-label input {
  width: 15px;
  height: 15px;
  accent-color: var(--teal);
}
.day-picker {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.day-toggle {
  position: relative;
}
.day-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.day-toggle span {
  display: inline-flex;
  min-width: 33px;
  height: 30px;
  padding: 0 7px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--card);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.16s ease;
}
.day-toggle input:checked + span {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--cream);
}
.day-toggle input:focus-visible + span {
  outline: 3px solid rgba(239, 103, 75, 0.45);
  outline-offset: 2px;
}
.task-admin-list,
.reward-admin-list,
.approval-list {
  display: flex;
  flex-direction: column;
}
.admin-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 2px;
  border-top: 1px dashed var(--line);
}
.admin-item:first-child {
  border-top: 0;
}
.admin-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
}
.admin-copy {
  flex: 1;
  min-width: 0;
}
.admin-copy b {
  display: block;
  font-size: 12.5px;
  line-height: 1.4;
  font-weight: 700;
}
.admin-copy small {
  display: block;
  color: var(--muted-2);
  font-size: 9.5px;
  margin-top: 1px;
  line-height: 1.45;
}
.admin-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: none;
}
.admin-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 700;
}
.mini-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 7px;
}
.mini-week-day {
  padding: 9px 7px;
  border-radius: 11px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  text-align: center;
}
.mini-week-day span {
  display: block;
  color: var(--muted-2);
  font-size: 9px;
}
.mini-week-day b {
  display: block;
  margin-top: 2px;
  font-family: var(--font-number);
  font-size: 18px;
  color: var(--ink);
  line-height: 1.2;
}
.mini-week-day small {
  display: block;
  margin-top: 1px;
  color: var(--gold-deep);
  font-family: var(--font-number);
  font-size: 9px;
  font-weight: 700;
}
.extra-admin {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px dashed var(--line);
  font-size: 12px;
}
.extra-admin:first-child {
  border-top: 0;
}
.extra-admin b {
  flex: 1;
  font-weight: 600;
}
.level-edit-table {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.level-edit-row {
  display: grid;
  grid-template-columns: 54px 76px minmax(90px, 0.7fr) minmax(140px, 1.3fr);
  gap: 8px;
  align-items: center;
}
.level-edit-row .lvl {
  font-family: var(--font-number);
  font-size: 11px;
  font-weight: 800;
  color: var(--gold-deep);
  text-align: center;
}
.sync-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 11px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  font-size: 11.5px;
}
.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted-2);
  flex: none;
}
.sync-dot.ok {
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(30, 158, 143, 0.14);
}
.sync-dot.local {
  background: var(--gold-deep);
  box-shadow: 0 0 0 3px rgba(201, 138, 22, 0.12);
}
.sync-status b {
  color: var(--ink);
}
.sync-status small {
  color: var(--muted-2);
  margin-left: auto;
  font-size: 9.5px;
}
.danger-zone {
  border-color: rgba(194, 74, 58, 0.26);
  background: linear-gradient(135deg, rgba(251, 233, 229, 0.65), rgba(255, 253, 247, 0.8));
}
.danger-zone h2 {
  color: var(--danger);
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 15px 0;
  border: 0;
}
.kv-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.kv-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11.5px;
  padding: 5px 0;
  border-bottom: 1px dashed var(--line);
}
.kv-row:last-child {
  border-bottom: 0;
}
.kv-row span {
  color: var(--muted);
}
.kv-row b {
  font-weight: 600;
  text-align: right;
}
.tabbar {
  display: none;
}

/* ---------------- Modals ---------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 25, 43, 0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: fade-in 0.2s ease both;
  overflow-y: auto;
}
.modal {
  position: relative;
  width: min(560px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
  padding: 26px;
  border-radius: 26px;
  background:
    radial-gradient(360px 180px at 100% 0%, rgba(242, 179, 61, 0.13), transparent 70%),
    var(--paper-2);
  border: 1px solid rgba(255, 253, 247, 0.7);
  box-shadow: 0 40px 80px -28px rgba(10, 18, 32, 0.65);
  animation: modal-in 0.3s var(--ease) both;
}
.modal.wide {
  width: min(780px, 100%);
}
.modal.compact {
  width: min(430px, 100%);
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.modal-head h2 {
  font-family: var(--font-display);
  font-size: 23px;
  line-height: 1.2;
}
.modal-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
}
.modal-x {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  display: grid;
  place-items: center;
  flex: none;
}
.modal-x:hover {
  color: var(--ink);
  border-color: var(--ink-2);
}
.modal-x svg {
  width: 16px;
  height: 16px;
}
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.modal-actions-split {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.modal .form-grid {
  margin-top: 4px;
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
}
@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* PIN */
.pin-modal {
  text-align: center;
}
.pin-emblem {
  width: 60px;
  height: 60px;
  margin: 0 auto 12px;
  border-radius: 20px;
  background: var(--navy);
  color: var(--gold);
  display: grid;
  place-items: center;
  box-shadow: 0 14px 30px -15px rgba(30, 42, 68, 0.7);
}
.pin-emblem svg {
  width: 28px;
  height: 28px;
}
.pin-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 18px 0 16px;
}
.pin-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--paper-2);
  border: 1.5px solid var(--line-strong);
  transition: 0.18s ease;
}
.pin-dot.is-filled {
  background: var(--gold);
  border-color: var(--gold-deep);
  transform: scale(1.08);
}
.pin-error {
  min-height: 18px;
  color: var(--danger);
  font-size: 11.5px;
  font-weight: 700;
}
.keypad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-width: 270px;
  margin: 0 auto;
}
.keypad button {
  height: 52px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-family: var(--font-number);
  font-size: 19px;
  font-weight: 700;
  transition: 0.14s ease;
}
.keypad button:hover {
  background: var(--paper-2);
  border-color: var(--line-strong);
}
.keypad button:active {
  transform: scale(0.96);
}
.keypad button.ghost-key {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 12px;
}
.pin-hint {
  margin-top: 14px;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.5;
}
.pin-modal.shake {
  animation: shake 0.4s ease;
}
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-7px);
  }
  40% {
    transform: translateX(6px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(3px);
  }
}

/* Celebration modals */
.celebrate-modal {
  text-align: center;
}
.celebrate-art {
  width: 94px;
  height: 94px;
  margin: 0 auto 12px;
  border-radius: 30px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 35% 30%, #ffe7ac, var(--gold) 58%, #cf941c);
  color: var(--navy);
  box-shadow: 0 18px 36px -18px rgba(201, 138, 22, 0.7);
  animation: celebrate-float 2.2s ease-in-out infinite;
}
.celebrate-art svg {
  width: 48px;
  height: 48px;
}
.celebrate-art.teal {
  background: radial-gradient(circle at 35% 30%, #c8f3e9, var(--teal) 58%, #147b6f);
  color: #fff;
}
.celebrate-art.coral {
  background: radial-gradient(circle at 35% 30%, #ffd0c6, var(--coral) 58%, #c9472e);
  color: #fff;
}
@keyframes celebrate-float {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-7px) rotate(2deg);
  }
}
.celebrate-modal .eyebrow {
  justify-content: center;
}
.celebrate-modal h2 {
  margin-top: 5px;
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1.2;
}
.celebrate-modal .celebrate-sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}
.celebrate-reward {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  margin: 14px auto 0;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold-deep);
  font-family: var(--font-number);
  font-size: 28px;
  font-weight: 900;
}
.celebrate-reward small {
  font-size: 12px;
}
.gift-reveal {
  margin-top: 14px;
  padding: 15px;
  border-radius: 15px;
  border: 1px dashed rgba(201, 138, 22, 0.38);
  background: rgba(251, 240, 210, 0.55);
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.6;
}
.gift-reveal b {
  display: block;
  color: var(--gold-deep);
  font-size: 10px;
  letter-spacing: 0.08em;
  margin-bottom: 3px;
}

/* Onboarding */
.onboarding-modal {
  width: min(620px, 100%);
  padding: 0;
  overflow: hidden;
}
.onboard-top {
  position: relative;
  min-height: 180px;
  background:
    radial-gradient(300px 180px at 82% 0%, rgba(242, 179, 61, 0.28), transparent 70%),
    linear-gradient(135deg, #1a2740, #2d4566);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.onboard-top::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image: radial-gradient(rgba(249, 241, 223, 0.35) 0.7px, transparent 0.7px);
  background-size: 22px 22px;
}
.onboard-art {
  position: relative;
  z-index: 1;
  width: 110px;
  height: 110px;
  border-radius: 34px;
  background: rgba(249, 241, 223, 0.1);
  border: 1px solid rgba(249, 241, 223, 0.16);
  display: grid;
  place-items: center;
  color: var(--gold);
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.65);
  transform: rotate(-3deg);
}
.onboard-art svg {
  width: 58px;
  height: 58px;
}
.onboard-body {
  padding: 24px 26px 22px;
}
.onboard-step {
  color: var(--muted-2);
  font-family: var(--font-number);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
}
.onboard-body h2 {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.2;
}
.onboard-body p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}
.onboard-points {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 13px;
}
.onboard-point {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  font-size: 12px;
}
.onboard-point svg {
  width: 16px;
  height: 16px;
  color: var(--teal-deep);
  flex: none;
}
.onboard-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}
.onboard-dots {
  display: flex;
  gap: 5px;
}
.onboard-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-strong);
}
.onboard-dots i.is-active {
  background: var(--coral);
  width: 18px;
  border-radius: 999px;
}
.onboard-actions {
  display: flex;
  gap: 8px;
}

/* Confirm modal */
.confirm-art {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  background: var(--gold-soft);
  color: var(--gold-deep);
}
.confirm-art.danger {
  background: var(--danger-soft);
  color: var(--danger);
}
.confirm-art.teal {
  background: var(--teal-soft);
  color: var(--teal-deep);
}
.confirm-art svg {
  width: 25px;
  height: 25px;
}
.confirm-msg {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}
.confirm-msg b {
  color: var(--ink);
}
.confirm-summary {
  margin-top: 14px;
  padding: 13px;
  border-radius: 13px;
  background: var(--card);
  border: 1px solid var(--line);
}
.confirm-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  font-size: 12px;
}
.confirm-row span {
  color: var(--muted);
}
.confirm-row b {
  font-family: var(--font-number);
  font-weight: 800;
}
.confirm-row.total {
  border-top: 1px dashed var(--line);
  margin-top: 5px;
  padding-top: 8px;
}
.confirm-row.total b {
  color: var(--gold-deep);
}

/* ---------------- Toast ---------------- */
#toast-root {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: max-content;
  max-width: min(92vw, 480px);
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(27, 39, 64, 0.94);
  color: var(--cream);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  box-shadow: 0 18px 35px -18px rgba(10, 18, 32, 0.7);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: toast-in 0.3s var(--ease) both;
}
.toast.is-out {
  animation: toast-out 0.25s ease both;
}
.toast .toast-icon {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(249, 241, 223, 0.14);
  color: var(--gold);
  flex: none;
}
.toast .toast-icon svg {
  width: 11px;
  height: 11px;
}
.toast .toast-action {
  margin-left: 2px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(249, 241, 223, 0.13);
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.toast .toast-action:hover {
  background: rgba(249, 241, 223, 0.22);
}
.toast.success .toast-icon {
  color: var(--teal);
}
.toast.error {
  background: rgba(120, 37, 26, 0.96);
}
.toast.error .toast-icon {
  color: #ffc9bd;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
}
@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
}

/* ---------------- Timer ---------------- */
.timer-screen {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: grid;
  place-items: center;
  padding: 22px;
  color: var(--cream);
  background:
    radial-gradient(700px 480px at 50% 0%, rgba(242, 179, 61, 0.15), transparent 64%),
    radial-gradient(500px 380px at 0% 100%, rgba(30, 158, 143, 0.22), transparent 60%),
    #111b2d;
  overflow: hidden;
}
.timer-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.65;
  background-image: radial-gradient(rgba(249, 241, 223, 0.3) 0.7px, transparent 0.7px);
  background-size: 30px 30px;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 0 36%, transparent 72%);
  mask-image: radial-gradient(circle at 50% 50%, #000 0 36%, transparent 72%);
}
.timer-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 480px;
  width: 100%;
}
.timer-kicker {
  color: rgba(249, 241, 223, 0.5);
  font-family: var(--font-number);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.24em;
}
.timer-title {
  margin-top: 5px;
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 20px;
}
.timer-ring-wrap {
  position: relative;
  width: min(300px, 72vw);
  margin: 18px auto 8px;
}
.timer-ring {
  width: 100%;
  height: auto;
  transform: rotate(-90deg);
}
.timer-ring .ring-bg {
  fill: none;
  stroke: rgba(249, 241, 223, 0.1);
  stroke-width: 8;
}
.timer-ring .ring-fill {
  fill: none;
  stroke: var(--gold);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s linear;
  filter: drop-shadow(0 0 8px rgba(242, 179, 61, 0.45));
}
.timer-digits {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  font-family: var(--font-number);
  font-size: clamp(46px, 12vw, 74px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.timer-hint {
  color: rgba(249, 241, 223, 0.52);
  font-size: 11.5px;
  line-height: 1.7;
  max-width: 300px;
  margin: 0 auto;
}
.timer-actions {
  display: flex;
  justify-content: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.timer-actions .btn {
  min-height: 44px;
  padding-inline: 19px;
}
.timer-actions .btn.ghost {
  color: var(--cream);
  border-color: rgba(249, 241, 223, 0.25);
}
.timer-actions .btn.ghost:hover {
  background: rgba(249, 241, 223, 0.08);
}
.timer-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(249, 241, 223, 0.2);
  color: rgba(249, 241, 223, 0.7);
  display: grid;
  place-items: center;
  background: rgba(249, 241, 223, 0.06);
}
.timer-close:hover {
  color: var(--cream);
  background: rgba(249, 241, 223, 0.12);
}
.timer-close svg {
  width: 17px;
  height: 17px;
}
.timer-end {
  display: none;
}
.timer-screen.is-ended .timer-run {
  display: none;
}
.timer-screen.is-ended .timer-end {
  display: block;
}
.timer-end .timer-big {
  width: 104px;
  height: 104px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(30, 158, 143, 0.18);
  color: #8de3d4;
  border: 1px solid rgba(30, 158, 143, 0.4);
}
.timer-end .timer-big svg {
  width: 48px;
  height: 48px;
}
.timer-end h2 {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--cream);
}
.timer-end p {
  margin-top: 6px;
  color: rgba(249, 241, 223, 0.55);
  font-size: 12px;
  line-height: 1.7;
}
.timer-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 15px 8px 11px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--cream);
  box-shadow: 0 16px 32px -14px rgba(16, 25, 43, 0.65);
  border: 1px solid rgba(249, 241, 223, 0.14);
}
.timer-fab:hover {
  background: var(--navy-2);
}
.timer-fab-icon {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(242, 179, 61, 0.17);
  color: var(--gold);
}
.timer-fab-icon svg {
  width: 14px;
  height: 14px;
}
.timer-fab-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}
.timer-fab-copy span {
  color: rgba(249, 241, 223, 0.5);
  font-size: 8.5px;
}
.timer-fab-copy b {
  color: var(--cream);
  font-family: var(--font-number);
  font-size: 14px;
  letter-spacing: 0.02em;
}
.timer-fab .pause-mini {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(249, 241, 223, 0.18);
  color: var(--cream);
  display: grid;
  place-items: center;
  margin-left: 2px;
}
.timer-fab .pause-mini svg {
  width: 11px;
  height: 11px;
}

/* ---------------- Confetti / misc ---------------- */
#confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4000;
}
.noscript {
  position: fixed;
  inset: 0;
  z-index: 7000;
  display: grid;
  place-items: center;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  text-align: center;
  padding: 24px;
}
.loading-row {
  padding: 30px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.subtle-divider {
  height: 1px;
  background: var(--line);
  margin: 16px 0;
  border: 0;
}
.kbd {
  display: inline-block;
  padding: 1px 5px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--card);
  font-family: var(--font-number);
  font-size: 10px;
  color: var(--ink-2);
}

/* ---------------- Responsive ---------------- */
@media (max-width: 1180px) {
  .topbar-inner,
  .app-main,
  .app-footer {
    padding-left: 24px;
    padding-right: 24px;
  }
  .mainnav {
    margin-inline: 8px;
  }
  .nav-link {
    padding-inline: 11px;
  }
  .brand-copy b {
    font-size: 17px;
  }
  .today-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 18px;
  }
  .reward-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .planet-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .level-hero {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .level-next-card {
    grid-column: 1 / -1;
  }
}
@media (max-width: 980px) {
  .mainnav {
    display: none;
  }
  .topbar-inner {
    justify-content: space-between;
  }
  .brand {
    flex: 1;
    min-width: 0;
  }
  .top-actions {
    margin-left: auto;
  }
  .tabbar {
    position: fixed;
    left: 50%;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 850;
    display: flex;
    align-items: center;
    gap: 2px;
    width: calc(100% - 28px);
    max-width: 460px;
    padding: 6px;
    border: 1px solid rgba(213, 199, 173, 0.75);
    border-radius: 999px;
    background: rgba(255, 253, 247, 0.92);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    backdrop-filter: blur(18px) saturate(1.2);
    box-shadow: 0 18px 40px -16px rgba(30, 42, 68, 0.38);
  }
  .tab-item {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 7px 2px 5px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 9.5px;
    font-weight: 700;
    transition: 0.18s ease;
  }
  .tab-item svg {
    width: 19px;
    height: 19px;
  }
  .tab-item.is-active {
    background: var(--navy);
    color: var(--cream);
  }
  .tab-dot {
    position: absolute;
    top: 3px;
    right: calc(50% - 16px);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--coral);
  }
  .app-footer {
    padding-bottom: 118px;
  }
  .today-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .rail {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .rail-card.level-card,
  .rail-card.streak-card {
    min-height: 100%;
  }
  .rail .site-card {
    grid-column: 1 / -1;
  }
  .rail .rewards-card {
    grid-column: 1 / -1;
  }
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
    padding: 28px 30px 0;
    min-height: 300px;
  }
  .hero-art {
    min-height: 230px;
  }
  .hero h1 {
    font-size: clamp(31px, 5.2vw, 44px);
  }
  .records-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .settings-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .settings-nav {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding: 5px;
    gap: 2px;
    scrollbar-width: none;
  }
  .settings-nav::-webkit-scrollbar {
    display: none;
  }
  .settings-tab {
    white-space: nowrap;
    padding: 8px 11px;
  }
  .settings-tab .tab-badge {
    display: none;
  }
}
@media (max-width: 760px) {
  .topbar-inner {
    padding: 12px 18px;
  }
  .app-main {
    padding: 16px 18px 30px;
  }
  .app-footer {
    padding-inline: 18px;
    font-size: 10px;
  }
  .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 13px;
  }
  .brand-mark svg {
    width: 26px;
    height: 26px;
  }
  .brand-copy b {
    font-size: 16px;
  }
  .brand-copy span {
    font-size: 7.5px;
    letter-spacing: 0.15em;
  }
  .avatar {
    display: none;
  }
  .stat-pill {
    height: 34px;
    padding: 0 10px;
  }
  .stat-pill b {
    font-size: 15px;
  }
  .stat-pill.streak {
    display: none;
  }
  .parent-entry span,
  .parent-mode-chip span {
    display: none;
  }
  .parent-entry,
  .parent-mode-chip {
    width: 34px;
    height: 34px;
    padding: 0;
    justify-content: center;
  }
  .hero {
    grid-template-columns: minmax(0, 1fr);
    padding: 24px 22px 0;
    border-radius: 26px;
  }
  .hero-copy {
    padding-bottom: 4px;
  }
  .hero h1 {
    font-size: clamp(30px, 8.4vw, 40px);
  }
  .hero-quote {
    font-size: 15px;
    max-width: 90%;
  }
  .hero-metrics {
    gap: 22px;
    margin-top: 18px;
  }
  .hero-metric b {
    font-size: 23px;
  }
  .hero-actions {
    margin-top: 18px;
  }
  .hero-art {
    min-height: 165px;
    margin: 0 -10px;
  }
  .orbit-caption {
    right: 2px;
    bottom: 8px;
    font-size: 9.5px;
  }
  .hero-level {
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 12px;
  }
  .level-next {
    order: 4;
    width: 100%;
  }
  .level-link {
    margin-left: auto;
  }
  .board {
    padding: 19px 16px 18px;
    border-radius: 22px;
  }
  .board-head .section-title h2 {
    font-size: 22px;
  }
  .board-tools {
    align-items: stretch;
    width: 100%;
  }
  .board-tools .filter-row {
    justify-content: flex-start;
  }
  .task-row {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 9px;
    padding: 13px 5px;
    margin: 0 -5px;
  }
  .task-row .task-right {
    grid-column: 2;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding-top: 0;
    margin-top: 5px;
    flex-wrap: wrap;
  }
  .task-desc {
    -webkit-line-clamp: 3;
  }
  .task-title {
    font-size: 14px;
  }
  .reward-pill {
    height: 23px;
    font-size: 11px;
  }
  .task-actions {
    justify-content: flex-start;
  }
  .done-stamp {
    display: none;
  }
  .chest-card {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    padding: 13px;
    gap: 10px;
  }
  .chest-art {
    width: 44px;
    height: 44px;
  }
  .chest-art svg {
    width: 24px;
    height: 24px;
  }
  .chest-copy h3 {
    font-size: 14px;
  }
  .chest-reward {
    font-size: 20px;
  }
  .rail {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .rail .site-card,
  .rail .rewards-card {
    grid-column: auto;
  }
  .page-head {
    margin-top: 3px;
    align-items: flex-start;
  }
  .page-head h1 {
    font-size: 29px;
  }
  .page-head p {
    font-size: 12px;
  }
  .balance-orb {
    min-width: 0;
    width: auto;
    padding: 10px 14px;
    align-items: flex-start;
  }
  .balance-orb b {
    font-size: 27px;
  }
  .reward-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .ticket {
    min-height: 196px;
    grid-template-columns: minmax(0, 1fr) 94px;
  }
  .ticket::before,
  .ticket::after {
    right: 85px;
  }
  .ticket-body {
    padding: 14px 14px 13px;
  }
  .ticket-icon {
    width: 38px;
    height: 38px;
    margin-top: 9px;
  }
  .ticket-body h3 {
    font-size: 16px;
  }
  .coupon-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .coupon {
    padding: 12px 13px 12px 16px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat-card .stat-value {
    font-size: 25px;
  }
  .level-hero {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 22px;
  }
  .level-big-orb {
    width: 74px;
    height: 74px;
    font-size: 20px;
  }
  .level-next-card {
    grid-column: auto;
  }
  .planet-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
  }
  .planet-card {
    padding: 15px 10px 13px;
  }
  .planet-visual {
    width: 54px;
    height: 54px;
  }
  .planet-xp {
    font-size: 9px;
  }
  .form-grid,
  .form-grid.three {
    grid-template-columns: minmax(0, 1fr);
  }
  .level-edit-row {
    grid-template-columns: 42px 68px minmax(0, 1fr);
    gap: 6px;
  }
  .level-edit-row .field:last-child {
    grid-column: 1 / -1;
  }
  .mini-week {
    gap: 4px;
  }
  .mini-week-day {
    padding: 7px 3px;
  }
  .mini-week-day b {
    font-size: 15px;
  }
  .settings-card {
    padding: 16px;
  }
  .chart {
    gap: 6px;
    height: 170px;
  }
  .chart-bar {
    height: 108px;
  }
  .modal {
    padding: 20px;
    border-radius: 22px;
    max-height: 92vh;
  }
  .modal-head h2 {
    font-size: 21px;
  }
  .onboard-top {
    min-height: 150px;
  }
  .onboard-art {
    width: 92px;
    height: 92px;
    border-radius: 28px;
  }
  .onboard-art svg {
    width: 48px;
    height: 48px;
  }
  .onboard-body {
    padding: 20px;
  }
  .onboard-body h2 {
    font-size: 23px;
  }
  #toast-root {
    bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  }
  .timer-fab {
    right: 16px;
    bottom: calc(94px + env(safe-area-inset-bottom, 0px));
  }
  .timer-close {
    top: 14px;
    right: 14px;
  }
}
@media (max-width: 480px) {
  .brand-copy span {
    display: none;
  }
  .brand-copy b {
    font-size: 15.5px;
  }
  .stat-pill.star {
    gap: 3px;
    padding: 0 9px;
  }
  .stat-pill.star span {
    display: none;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .hero-hint {
    max-width: 100%;
  }
  .hero-metrics {
    gap: 18px;
  }
  .hero-metric span {
    font-size: 9.5px;
  }
  .hero-metric b {
    font-size: 21px;
  }
  .page-head {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .balance-orb {
    align-items: flex-start;
  }
  .keypad button {
    height: 47px;
  }
  .timer-digits {
    font-size: 48px;
  }
  .onboard-foot {
    flex-direction: column;
    align-items: stretch;
  }
  .onboard-actions {
    justify-content: flex-end;
  }
  .onboard-dots {
    justify-content: center;
  }
  .level-edit-row {
    grid-template-columns: 38px 62px minmax(0, 1fr);
  }
  .settings-nav {
    margin-inline: -4px;
  }
  .chest-reward {
    font-size: 18px;
  }
  .task-row .task-right {
    gap: 6px;
  }
}

/* ---------------- Motion preferences ---------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  #app {
    animation: none;
  }
}

/* ---------------- Print ---------------- */
@media print {
  .topbar,
  .tabbar,
  .app-footer,
  #toast-root,
  .timer-fab,
  .bg-decor {
    display: none !important;
  }
  body {
    background: #fff;
  }
  .hero,
  .rail-card.level-card,
  .level-hero {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* ---------------- Extra runtime bits ---------------- */
body.modal-open,
body.timer-open {
  overflow: hidden;
}
body.modal-open {
  padding-right: var(--scrollbar-comp, 0px);
}
.star-pop {
  position: fixed;
  z-index: 3500;
  color: var(--gold-deep);
  font-family: var(--font-number);
  font-size: 22px;
  font-weight: 900;
  pointer-events: none;
  text-shadow: 0 2px 0 rgba(255, 253, 247, 0.8);
  animation: star-pop 0.95s var(--ease) forwards;
}
@keyframes star-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, 6px) scale(0.7);
  }
  18% {
    opacity: 1;
    transform: translate(-50%, -6px) scale(1.08);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -48px) scale(0.95);
  }
}
.heat-cell.is-empty {
  opacity: 0.25;
  background: transparent;
  border: 1px dashed var(--line);
}
.chart-label small {
  display: block;
  color: var(--muted-2);
  font-family: var(--font-number);
  font-size: 8px;
  font-weight: 500;
}
.chart-value small {
  color: var(--muted-2);
  font-size: 8px;
}
.coupon-history {
  margin-top: 14px;
}
.coupon-history summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 0;
}
.coupon-history summary:hover {
  color: var(--ink);
}
.coupon-history .coupon {
  margin-top: 8px;
}
.settings-grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
@media (max-width: 760px) {
  .settings-grid-two {
    grid-template-columns: minmax(0, 1fr);
  }
}
.tiny-muted {
  color: var(--muted-2);
  font-size: 9.5px;
  line-height: 1.5;
}
.claim-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  border-radius: 13px;
  border: 1px dashed rgba(201, 138, 22, 0.45);
  background: var(--gold-soft);
  color: var(--gold-deep);
  font-size: 11.5px;
  font-weight: 700;
}
.claim-banner svg {
  width: 17px;
  height: 17px;
  flex: none;
}
.claim-banner .btn {
  margin-left: auto;
  flex: none;
}
@media (max-width: 760px) {
  .claim-banner {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .claim-banner .btn {
    margin-left: 0;
  }
}
.sr-data {
  font-family: var(--font-number);
}

@media (min-width: 981px) and (min-height: 900px) {
  .rail {
    position: sticky;
    top: 92px;
  }
}

/* 手机端：余额条更紧凑 */
@media (max-width: 480px) {
  .page-head .balance-orb {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 9px 14px;
    border-radius: 15px;
  }
  .page-head .balance-orb b {
    margin-top: 0;
    font-size: 24px;
  }
  .page-head .balance-orb em {
    display: none;
  }
  .page-head .balance-orb > span {
    letter-spacing: 0.04em;
  }
}

/* ============================================================
   学习站 · Study Stations（2026-11-16）
   语文/数学/英语三站今日得分，和农场时间同一份账本
   ============================================================ */
.stations {
  margin-top: 22px;
  padding: 22px 24px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.stations-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.stations-title h2 {
  margin: 4px 0 6px;
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 0.01em;
}
.stations-title p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.stations-total {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  text-align: right;
}
.stations-total b {
  font-family: var(--font-number);
  font-size: 34px;
  line-height: 1;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.stations-total b small {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 4px;
}
.stations-total > small {
  font-size: 12px;
  color: var(--muted-2);
}
.station-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.station-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--card-soft);
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.station-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}
.station-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--soft, var(--cream));
  color: var(--color, var(--ink));
  flex: none;
}
.station-icon svg {
  width: 20px;
  height: 20px;
}
.station-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}
.station-body b {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.station-body small {
  font-size: 11.5px;
  color: var(--muted);
}
.station-score {
  font-family: var(--font-number);
  font-size: 21px;
  font-weight: 600;
  color: var(--color, var(--ink));
  display: flex;
  align-items: baseline;
  gap: 2px;
  flex: none;
}
.station-score small {
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted);
}
.station-status {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: transparent;
  flex: none;
}
.station-status.is-up {
  background: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
}
.station-status.is-down {
  background: var(--line-strong);
}
.station-card > svg {
  width: 14px;
  height: 14px;
  color: var(--muted-2);
  flex: none;
}
.station-note {
  margin: 12px 2px 0;
  font-size: 11.5px;
  color: var(--muted-2);
  line-height: 1.6;
}
@media (max-width: 860px) {
  .stations {
    padding: 18px 16px 14px;
    border-radius: var(--radius-md);
  }
  .stations-head {
    align-items: flex-start;
  }
  .stations-title h2 {
    font-size: 21px;
  }
  .stations-total {
    align-items: flex-start;
    text-align: left;
  }
  .stations-total b {
    font-size: 28px;
  }
  .station-grid {
    grid-template-columns: 1fr;
    gap: 9px;
    margin-top: 13px;
  }
}


/* ---------------- 游戏厅（#play） ---------------- */
.play-orb {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 174px;
  padding: 14px 18px;
  border-radius: 19px;
  border: 1px solid rgba(30, 158, 143, 0.24);
  background:
    radial-gradient(180px 110px at 100% 0%, rgba(190, 240, 228, 0.75), transparent 70%),
    var(--teal-soft);
  box-shadow: var(--shadow-sm);
}
.play-orb > span {
  color: var(--teal-deep);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
}
.play-orb b {
  margin-top: 1px;
  font-family: var(--font-number);
  font-size: 32px;
  line-height: 1.05;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.play-orb b small {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 3px;
}
.play-orb em {
  margin-top: 3px;
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
}
.play-ticket {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -8px 0 4px;
  padding: 13px 18px;
  border-radius: 18px;
  border: 1px dashed #ead39b;
  background: linear-gradient(120deg, #fffaf0, var(--gold-soft));
  color: var(--ink-2);
  font-size: 13px;
  text-decoration: none;
  transition: border-color 0.18s, transform 0.18s var(--ease);
}
.play-ticket:hover {
  border-color: var(--gold-deep);
  transform: translateY(-1px);
}
.play-ticket svg {
  width: 17px;
  height: 17px;
  flex: none;
  color: var(--gold-deep);
}
.play-ticket svg:last-child {
  margin-left: auto;
  color: var(--muted-2);
}
.play-ticket b {
  color: var(--ink);
}
.play-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
@media (min-width: 1120px) {
  .play-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
.play-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 17px 18px 15px;
  border-radius: 21px;
  border: 1px solid var(--line);
  background: linear-gradient(158deg, var(--card), var(--card-soft));
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.18s var(--ease), border-color 0.18s, box-shadow 0.18s;
}
.play-card::after {
  content: "";
  position: absolute;
  right: -42px;
  bottom: -58px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--soft), transparent 68%);
  opacity: 0.85;
  pointer-events: none;
}
.play-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}
.play-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--soft);
  color: var(--c);
  position: relative;
  z-index: 1;
}
.play-icon svg {
  width: 21px;
  height: 21px;
}
.play-body {
  position: relative;
  z-index: 1;
}
.play-body b {
  display: block;
  font-family: var(--font-display);
  font-size: 16.5px;
  line-height: 1.3;
  color: var(--ink);
}
.play-body small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.play-meta {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--c);
}
.play-card > svg {
  position: absolute;
  top: 17px;
  right: 16px;
  width: 14px;
  height: 14px;
  color: var(--muted-2);
  z-index: 1;
}
.wrong-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.wrong-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--card);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s var(--ease), border-color 0.18s;
}
.wrong-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}
.wrong-num {
  flex: none;
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-family: var(--font-number);
  font-size: 25px;
  line-height: 1;
  color: var(--c);
}
.wrong-num small {
  font-family: var(--font-body);
  font-size: 10.5px;
  color: var(--muted);
}
.wrong-body {
  min-width: 0;
}
.wrong-body b {
  display: block;
  font-family: var(--font-display);
  font-size: 14.5px;
  color: var(--ink);
}
.wrong-body small {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}
.wrong-card > svg {
  margin-left: auto;
  flex: none;
  width: 14px;
  height: 14px;
  color: var(--muted-2);
}
@media (max-width: 480px) {
  .play-orb {
    min-width: 0;
    width: 100%;
    flex-direction: row;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
  }
  .play-orb b {
    font-size: 26px;
  }
  .play-ticket {
    font-size: 12px;
    padding: 12px 14px;
  }
  .play-ticket svg:last-child {
    display: none;
  }
}

