/* 汀谷智种 · 手机端 H5
 * 设计基准 390 × 844；桌面端居中手机框，移动端全屏。
 * 无外部字体、无 CSS 框架、无 CDN。
 */

:root {
  --ink: #0C2A23;
  --teal: #16483C;
  --teal-mid: #2E6656;
  --gold: #C8A24A;
  --gold-deep: #9A7827;
  --gold-soft: #F1E5C8;
  --cream: #F7F4EC;
  --paper: #FFFFFF;
  --muted: #6F7F77;
  --muted-2: #8D9A92;
  --line: rgba(12, 42, 35, 0.09);
  --line-strong: rgba(12, 42, 35, 0.16);
  --teal-soft: #E8EFEA;
  --app-h: 100dvh;
  --vv-top: 0px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(1200px 800px at 50% -10%, #F1ECDD 0%, #F7F4EC 46%, #EDE7D8 100%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
}

button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

input {
  margin: 0;
  border: 0;
  font: inherit;
  color: inherit;
}

h1, h2, h3, p {
  margin: 0;
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.ico {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- 舞台与手机框 ---------- */

.stage {
  position: relative;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.stage::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(620px 420px at 18% 14%, rgba(22, 72, 60, 0.10), transparent 70%),
    radial-gradient(520px 360px at 84% 82%, rgba(200, 162, 74, 0.16), transparent 70%);
}

.stage::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image: radial-gradient(rgba(12, 42, 35, 0.065) 0.6px, transparent 0.6px);
  background-size: 10px 10px;
  mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.55), transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.55), transparent 78%);
}

.device {
  position: relative;
  z-index: 1;
  width: 390px;
  height: 844px;
  max-height: calc(100dvh - 48px);
  overflow: hidden;
  overflow: clip;
  border: 1px solid rgba(12, 42, 35, 0.18);
  border-radius: 28px;
  background: var(--cream);
  box-shadow:
    0 34px 80px -34px rgba(12, 42, 35, 0.55),
    0 12px 26px -18px rgba(12, 42, 35, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}

.app {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: var(--cream);
}

/* ---------- 顶部栏 ---------- */

.topbar {
  position: relative;
  z-index: 6;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  color: var(--cream);
  background:
    radial-gradient(120% 180% at 100% 0%, rgba(200, 162, 74, 0.20), transparent 56%),
    linear-gradient(135deg, #0C2A23 0%, #123B31 56%, #16483C 100%);
  box-shadow: inset 0 -1px 0 rgba(200, 162, 74, 0.30);
}

.topbar::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(200, 162, 74, 0.55), rgba(200, 162, 74, 0.06) 62%, transparent);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 10px;
  color: var(--ink);
  background: linear-gradient(145deg, #DBBC6E, #C8A24A 62%, #B08A36);
  box-shadow: 0 3px 10px -4px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.brand-mark .ico {
  width: 21px;
  height: 21px;
  stroke-width: 1.65;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.brand-name {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0.06em;
  line-height: 1.2;
  white-space: nowrap;
}

.brand-sub {
  font-size: 8.5px;
  letter-spacing: 0.16em;
  color: rgba(247, 244, 236, 0.52);
  white-space: nowrap;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: none;
}

.env-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border: 1px solid rgba(200, 162, 74, 0.42);
  border-radius: 999px;
  background: rgba(200, 162, 74, 0.10);
  color: #EAD9A9;
  font-size: 9.5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.env-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(200, 162, 74, 0.14);
}

.clock {
  font-size: 10.5px;
  color: rgba(247, 244, 236, 0.64);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* ---------- 页面容器 ---------- */

.stage-main {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.page {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  min-height: 0;
}

.page.is-active {
  display: flex;
}

.page.is-entering {
  animation: page-in 0.26s ease both;
}

@keyframes page-in {
  from { opacity: 0.35; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 16px calc(18px + var(--safe-b));
  scrollbar-width: none;
  overscroll-behavior: contain;
}

.page-scroll::-webkit-scrollbar,
.chat-scroll::-webkit-scrollbar,
.sheet-body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* ---------- 对话页 ---------- */

.page-chat {
  padding: 0;
}

.chat-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 16px 8px;
  scrollbar-width: none;
  overscroll-behavior: contain;
}

.chat-stream {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: calc(100% - 14px);
  padding-bottom: 6px;
}

.chat-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: auto;
  padding: 16px 0 6px;
  color: var(--muted-2);
  font-size: 9.5px;
  letter-spacing: 0.03em;
}

.chat-hint-rule {
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200, 162, 74, 0.45));
}

.chat-hint-rule:last-child {
  background: linear-gradient(90deg, rgba(200, 162, 74, 0.45), transparent);
}

.welcome {
  position: relative;
  overflow: hidden;
  padding: 17px 16px 15px;
  border-radius: 22px;
  color: var(--cream);
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(200, 162, 74, 0.30), transparent 54%),
    linear-gradient(150deg, #0C2A23 0%, #16483C 58%, #1B5143 100%);
  box-shadow:
    0 16px 32px -22px rgba(12, 42, 35, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.welcome::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -78px;
  top: -92px;
  border-radius: 50%;
  border: 1px solid rgba(200, 162, 74, 0.30);
  box-shadow:
    0 0 0 18px rgba(200, 162, 74, 0.05),
    0 0 0 40px rgba(200, 162, 74, 0.035);
  pointer-events: none;
}

.welcome::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  right: 20px;
  bottom: 18px;
  border-radius: 50%;
  background: rgba(200, 162, 74, 0.55);
  box-shadow: 0 0 0 5px rgba(200, 162, 74, 0.09);
  pointer-events: none;
}

.welcome-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: #E4CE94;
}

.welcome-eyebrow::before {
  content: "";
  width: 14px;
  height: 1px;
  background: var(--gold);
}

.welcome h1 {
  margin: 8px 0 5px;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1.35;
}

.welcome p {
  margin: 0 0 15px;
  max-width: 292px;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(247, 244, 236, 0.72);
}

.suggest-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 10px;
  letter-spacing: 0.05em;
  color: rgba(247, 244, 236, 0.52);
}

.suggest-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.suggest {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 47px;
  padding: 8px 7px;
  text-align: left;
  border: 1px solid rgba(247, 244, 236, 0.13);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(247, 244, 236, 0.94);
  font-size: 11px;
  line-height: 1.45;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.suggest:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(200, 162, 74, 0.50);
}

.suggest:active {
  transform: scale(0.985);
}

.suggest-index {
  flex: none;
  font-size: 8px;
  letter-spacing: 0.02em;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.suggest-text {
  flex: 1;
  min-width: 0;
}

.s-arrow {
  width: 10px;
  height: 10px;
  flex: none;
  color: rgba(247, 244, 236, 0.38);
  transition: transform 0.18s ease, color 0.18s ease;
}

.suggest:hover .s-arrow {
  transform: translateX(2px);
  color: var(--gold);
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.msg {
  display: flex;
  gap: 8px;
  max-width: 100%;
  animation: msg-in 0.3s ease both;
}

@keyframes msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.msg-user {
  justify-content: flex-end;
}

.avatar {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  margin-top: 2px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--teal);
  box-shadow: 0 2px 8px -5px rgba(12, 42, 35, 0.45);
}

.avatar .ico {
  width: 15px;
  height: 15px;
  stroke-width: 1.75;
}

.msg-body {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  max-width: calc(100% - 34px);
}

.msg-user .msg-body {
  align-items: flex-end;
  max-width: 82%;
}

.bubble {
  padding: 9px 12px;
  border: 1px solid rgba(12, 42, 35, 0.065);
  border-radius: 4px 16px 16px 16px;
  background: var(--paper);
  color: #263D35;
  font-size: 12.5px;
  line-height: 1.68;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: 0 3px 12px -9px rgba(12, 42, 35, 0.45);
}

.msg-user .bubble {
  border: 0;
  border-radius: 16px 4px 16px 16px;
  background: linear-gradient(150deg, #1A5143, #0C2A23);
  color: var(--cream);
  box-shadow: 0 8px 18px -14px rgba(12, 42, 35, 0.85);
}

.typing-bubble {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 13px;
}

.typing-label {
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.dots {
  display: inline-flex;
  align-items: center;
  gap: 3.5px;
}

.dots i {
  display: block;
  width: 4.5px;
  height: 4.5px;
  border-radius: 50%;
  background: var(--teal);
  opacity: 0.35;
  animation: dot-blink 1.15s infinite ease-in-out;
}

.dots i:nth-child(2) { animation-delay: 0.16s; }
.dots i:nth-child(3) { animation-delay: 0.32s; }

@keyframes dot-blink {
  0%, 65%, 100% { opacity: 0.28; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2.5px); }
}

/* ---------- 对话卡片 ---------- */

.cards {
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: 100%;
}

.ai-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 12px 12px 11px;
  border: 1px solid rgba(12, 42, 35, 0.085);
  border-radius: 15px;
  background: var(--paper);
  box-shadow: 0 10px 24px -20px rgba(12, 42, 35, 0.55);
}

.ai-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  bottom: 13px;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(180deg, var(--gold), rgba(200, 162, 74, 0));
}

.ai-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}

.ai-card-title {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.4;
  color: var(--ink);
}

.card-ico {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 8px;
  background: var(--teal-soft);
  color: var(--teal);
}

.card-ico .ico {
  width: 14px;
  height: 14px;
}

.chip {
  flex: none;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.chip-pending {
  border: 1px solid #EDD9A8;
  background: #FBF2DC;
  color: #86651B;
}

.chip-done {
  border: 1px solid #C9E0D4;
  background: #E7F1EB;
  color: #1B5B45;
}

.chip-pushed {
  border: 1px solid #D3E1E8;
  background: #EAF0F4;
  color: #2A5366;
}

.chip-muted {
  border: 1px solid #E2E0D8;
  background: #F2F1EC;
  color: #7D847F;
}

.kv {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 10px;
}

.kv-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  font-size: 11px;
  line-height: 1.55;
}

.kv-row span {
  flex: none;
  color: var(--muted);
}

.kv-row b {
  min-width: 0;
  font-weight: 500;
  color: #2B4038;
  text-align: right;
  word-break: break-word;
}

.card-actions {
  display: flex;
  gap: 7px;
  padding-top: 10px;
  border-top: 1px dashed rgba(12, 42, 35, 0.10);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 32px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.btn:active {
  transform: scale(0.97);
}

.card-actions .btn {
  flex: 1;
}

.btn-primary {
  background: linear-gradient(135deg, #16483C, #0C2A23);
  color: var(--cream);
  box-shadow: 0 5px 12px -8px rgba(12, 42, 35, 0.8);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1D5849, #123B31);
}

.btn-ghost {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--teal);
}

.btn-ghost:hover {
  background: rgba(12, 42, 35, 0.04);
}

.btn-soft {
  border: 1px solid rgba(200, 162, 74, 0.38);
  background: #FBF5E7;
  color: var(--gold-deep);
}

.card-resolved {
  padding-top: 9px;
  border-top: 1px dashed rgba(12, 42, 35, 0.10);
  font-size: 10px;
  color: var(--muted-2);
  letter-spacing: 0.02em;
}

/* ---------- 输入栏 ---------- */

.composer {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-top: 1px solid rgba(12, 42, 35, 0.07);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.input-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  height: 42px;
  padding: 0 10px;
  border: 1px solid rgba(12, 42, 35, 0.08);
  border-radius: 14px;
  background: #F3F0E7;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.input-wrap:focus-within {
  border-color: rgba(22, 72, 60, 0.34);
  background: var(--paper);
  box-shadow: 0 0 0 3px rgba(22, 72, 60, 0.06);
}

.input-wrap > .ico {
  width: 15px;
  height: 15px;
  color: #8A988F;
}

#composerInput {
  width: 100%;
  min-width: 0;
  height: 100%;
  background: transparent;
  outline: none;
  font-size: 12.5px;
}

#composerInput::placeholder {
  color: #93A098;
}

.send-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 14px;
  background: linear-gradient(145deg, #16483C, #0C2A23);
  color: var(--gold);
  box-shadow: 0 7px 15px -9px rgba(12, 42, 35, 0.9);
  transition: opacity 0.18s ease, transform 0.15s ease;
}

.send-btn .ico {
  width: 19px;
  height: 19px;
  transform: translateX(-1px);
}

.send-btn:active {
  transform: scale(0.94);
}

.send-btn[disabled] {
  cursor: default;
  opacity: 0.36;
  box-shadow: none;
}

/* ---------- 底部 Tab ---------- */

.tabbar {
  position: relative;
  z-index: 7;
  flex: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  padding: 6px 7px calc(6px + var(--safe-b));
  border-top: 1px solid rgba(12, 42, 35, 0.07);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 -10px 26px -24px rgba(12, 42, 35, 0.55);
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 7px 2px 6px;
  border-radius: 13px;
  color: #8B9891;
  transition: color 0.16s ease, background 0.16s ease;
}

.tab-ico {
  display: grid;
  place-items: center;
  width: 30px;
  height: 23px;
  border-radius: 8px;
  transition: background 0.16s ease, color 0.16s ease;
}

.tab .ico {
  width: 21px;
  height: 21px;
  stroke-width: 1.65;
}

.tab-label {
  font-size: 9.5px;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.tab:hover {
  color: var(--teal);
}

.tab.is-active {
  color: var(--ink);
  background: #F2F0E6;
}

.tab.is-active .tab-ico {
  color: var(--teal);
  background: rgba(200, 162, 74, 0.17);
}

/* ---------- 通用页头 ---------- */

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 2px 13px;
}

.page-kicker {
  margin-bottom: 4px;
  color: var(--gold-deep);
  font-size: 9px;
  letter-spacing: 0.17em;
}

.page-head h1 {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.page-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.5;
}

.demo-chip {
  flex: none;
  margin-top: 2px;
  padding: 4px 7px;
  border: 1px solid rgba(200, 162, 74, 0.42);
  border-radius: 999px;
  background: #FAF3E2;
  color: var(--gold-deep);
  font-size: 9px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.demo-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 0 3px;
  color: var(--muted-2);
  font-size: 9.5px;
  letter-spacing: 0.03em;
  text-align: center;
}

.demo-note::before {
  content: "";
  width: 14px;
  height: 1px;
  background: var(--gold);
  opacity: 0.65;
}

.card {
  padding: 13px;
  border: 1px solid rgba(12, 42, 35, 0.07);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 8px 20px -18px rgba(12, 42, 35, 0.45);
}

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

.section-head h2 {
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.section-head span {
  color: var(--muted-2);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sub-tabs {
  display: flex;
  gap: 3px;
  margin-bottom: 12px;
  padding: 3px;
  border: 1px solid rgba(12, 42, 35, 0.055);
  border-radius: 12px;
  background: #EDEAE0;
}

.sub-tab {
  flex: 1;
  padding: 8px 6px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.sub-tab.is-active {
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 2px 8px -5px rgba(12, 42, 35, 0.45);
}

.panel {
  display: none;
  flex-direction: column;
  gap: 11px;
}

.panel.is-active {
  display: flex;
  animation: panel-in 0.22s ease both;
}

@keyframes panel-in {
  from { opacity: 0.4; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 数据页 ---------- */

.weather {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: relative;
  overflow: hidden;
  padding: 13px;
  border-radius: var(--radius);
  color: var(--cream);
  background:
    radial-gradient(100% 140% at 96% 0%, rgba(200, 162, 74, 0.26), transparent 58%),
    linear-gradient(135deg, #0C2A23, #16483C);
  box-shadow: 0 12px 26px -20px rgba(12, 42, 35, 0.75);
}

.weather::after {
  content: "";
  position: absolute;
  right: -26px;
  bottom: -42px;
  width: 110px;
  height: 110px;
  border: 1px solid rgba(200, 162, 74, 0.18);
  border-radius: 50%;
  pointer-events: none;
}

.weather-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.weather-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--gold);
}

.weather-icon .ico {
  width: 22px;
  height: 22px;
}

.weather-temp {
  font-size: 21px;
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.weather-text {
  margin-top: 3px;
  font-size: 9.5px;
  color: rgba(247, 244, 236, 0.60);
  letter-spacing: 0.02em;
}

.weather-metrics {
  display: flex;
  gap: 16px;
  flex: none;
}

.metric {
  text-align: right;
}

.metric b {
  display: block;
  font-size: 12.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.metric span {
  display: block;
  margin-top: 2px;
  font-size: 8.5px;
  color: rgba(247, 244, 236, 0.52);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.kpi {
  position: relative;
  overflow: hidden;
  padding: 11px 12px 10px;
  border: 1px solid rgba(12, 42, 35, 0.07);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 8px 18px -18px rgba(12, 42, 35, 0.5);
}

.kpi.is-feature {
  border-color: rgba(12, 42, 35, 0.12);
  background:
    radial-gradient(110% 120% at 100% 0%, rgba(200, 162, 74, 0.28), transparent 58%),
    linear-gradient(145deg, #0C2A23, #16483C);
  color: var(--cream);
}

.kpi.is-feature::after {
  content: "";
  position: absolute;
  right: -22px;
  top: -28px;
  width: 74px;
  height: 74px;
  border: 1px solid rgba(200, 162, 74, 0.25);
  border-radius: 50%;
}

.kpi-label {
  display: block;
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.03em;
}

.kpi.is-feature .kpi-label {
  color: rgba(247, 244, 236, 0.62);
}

.kpi-value {
  margin-top: 4px;
  font-size: 23px;
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
}

.kpi-unit {
  margin-left: 3px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0;
}

.kpi.is-feature .kpi-unit {
  color: rgba(247, 244, 236, 0.55);
}

.kpi-foot {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.delta {
  display: inline-flex;
  align-items: center;
  padding: 2px 5px;
  border-radius: 5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.delta-up {
  background: #EAF2EC;
  color: #24614B;
}

.kpi.is-feature .delta-up {
  background: rgba(200, 162, 74, 0.17);
  color: #E8D39C;
}

.delta-down {
  background: #F7ECE6;
  color: #955336;
}

.kpi-foot em {
  font-style: normal;
  color: var(--muted-2);
}

.area-bar {
  display: flex;
  gap: 3px;
  height: 14px;
  padding: 0;
  overflow: hidden;
  border-radius: 7px;
  background: #EEEAE0;
}

.area-seg {
  height: 100%;
  min-width: 2px;
  transition: width 0.5s ease;
}

.area-seg:first-child {
  border-radius: 7px 2px 2px 7px;
}

.area-seg:last-child {
  border-radius: 2px 7px 7px 2px;
}

.area-legend {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 11px;
}

.area-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: var(--muted);
}

.area-item .swatch {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 2px;
}

.area-item b {
  margin-left: auto;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.area-item .pct {
  width: 34px;
  flex: none;
  text-align: right;
  font-size: 9.5px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}

.chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  font-family: inherit;
}

.chart .grid-line {
  stroke: rgba(12, 42, 35, 0.08);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.chart .axis-text {
  fill: #93A098;
  font-size: 8.5px;
  font-family: inherit;
}

.chart .value-text {
  fill: #61746A;
  font-size: 8.5px;
  font-weight: 600;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
}

.chart .chart-line {
  fill: none;
  stroke: #1B5848;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart .chart-dot {
  fill: var(--paper);
  stroke: #1B5848;
  stroke-width: 2;
}

.chart .chart-dot-last {
  fill: var(--gold);
  stroke: var(--paper);
  stroke-width: 2;
}

.batch-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.donut {
  position: relative;
  width: 116px;
  height: 116px;
  flex: none;
}

.donut svg {
  width: 100%;
  height: 100%;
}

.donut-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
}

.donut-center b {
  font-size: 23px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.donut-center span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8.5px;
  letter-spacing: 0.06em;
}

.batch-legend {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 5.5px;
  min-width: 0;
}

.batch-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--muted);
}

.batch-row .swatch {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
}

.batch-row b {
  margin-left: auto;
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.quality {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.q-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
  font-size: 10.5px;
  color: var(--muted);
}

.q-head b {
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.q-track {
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: #EFECE3;
}

.q-fill {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #16483C, #4F8B73);
  transition: width 0.5s ease;
}

.q-fill.is-gold {
  background: linear-gradient(90deg, #C8A24A, #DDC07A);
}

.field-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10.5px;
}

.field-table th {
  padding: 0 0 7px;
  border-bottom: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-align: left;
  white-space: nowrap;
}

.field-table th:nth-child(3),
.field-table td:nth-child(3) {
  text-align: right;
}

.field-table th:last-child,
.field-table td:last-child {
  padding-left: 10px;
  text-align: right;
}

.field-table td {
  padding: 9px 0;
  border-bottom: 1px dashed rgba(12, 42, 35, 0.09);
  vertical-align: middle;
}

.field-table tr:last-child td {
  border-bottom: 0;
  padding-bottom: 1px;
}

.field-id {
  display: block;
  margin-bottom: 1px;
  color: var(--muted-2);
  font-size: 8px;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.field-name {
  color: #2A4037;
  font-size: 10.5px;
  font-weight: 550;
  white-space: nowrap;
}

.field-area {
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.field-area small {
  margin-left: 2px;
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 500;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 6px;
  border-radius: 999px;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.st-teal {
  background: #E7F1EB;
  color: #1D5C46;
}

.st-gold {
  background: #FBF2DC;
  color: #86651B;
}

.st-muted {
  background: #EEF0EB;
  color: #6F7C74;
}

/* ---------- 商城页 ---------- */

.shop-banner {
  position: relative;
  overflow: hidden;
  padding: 14px;
  border-radius: 20px;
  color: var(--cream);
  background:
    radial-gradient(110% 130% at 92% 0%, rgba(200, 162, 74, 0.32), transparent 56%),
    linear-gradient(145deg, #0C2A23 0%, #16483C 62%, #1C5345 100%);
  box-shadow: 0 16px 32px -22px rgba(12, 42, 35, 0.8);
}

.shop-banner::before {
  content: "";
  position: absolute;
  right: -34px;
  top: -46px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(200, 162, 74, 0.26);
  border-radius: 50%;
  box-shadow: 0 0 0 22px rgba(200, 162, 74, 0.045);
  pointer-events: none;
}

.shop-banner::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 42px;
  height: 1px;
  background: linear-gradient(90deg, rgba(200, 162, 74, 0.35), transparent 72%);
  pointer-events: none;
}

.banner-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.banner-eyebrow {
  font-size: 9.5px;
  letter-spacing: 0.13em;
  color: #E6D19A;
}

.banner-chip {
  padding: 3px 7px;
  border: 1px solid rgba(200, 162, 74, 0.35);
  border-radius: 999px;
  background: rgba(200, 162, 74, 0.10);
  color: #E6D19A;
  font-size: 8.5px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.banner-main {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0 14px;
}

.banner-price {
  display: flex;
  align-items: baseline;
  gap: 5px;
  color: #F0DCA8;
}

.price-num {
  font-size: 34px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.price-unit {
  font-size: 11px;
  color: rgba(247, 244, 236, 0.70);
}

.banner-note {
  margin-top: 5px;
  font-size: 9.5px;
  color: rgba(247, 244, 236, 0.55);
  letter-spacing: 0.02em;
}

.banner-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: none;
  height: 36px;
  padding: 0 11px;
  border-radius: 10px;
  background: linear-gradient(145deg, #D8B866, #C8A24A);
  color: #172F27;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
  box-shadow: 0 7px 16px -10px rgba(0, 0, 0, 0.7);
  transition: transform 0.16s ease, filter 0.16s ease;
}

.banner-btn:hover {
  filter: brightness(1.04);
}

.banner-btn:active {
  transform: scale(0.97);
}

.banner-btn .ico {
  width: 13px;
  height: 13px;
}

.banner-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(247, 244, 236, 0.10);
  font-size: 8.5px;
  color: rgba(247, 244, 236, 0.48);
  letter-spacing: 0.02em;
}

.banner-foot span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.banner-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
}

.section-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 17px 2px 9px;
}

.section-title-row h2 {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.section-title-row span {
  color: var(--muted-2);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
}

.product-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.product {
  display: flex;
  gap: 11px;
  padding: 10px;
  border: 1px solid rgba(12, 42, 35, 0.07);
  border-radius: 15px;
  background: var(--paper);
  box-shadow: 0 8px 20px -19px rgba(12, 42, 35, 0.5);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.product:hover {
  border-color: rgba(200, 162, 74, 0.42);
  box-shadow: 0 12px 24px -19px rgba(12, 42, 35, 0.55);
}

.product:active {
  transform: scale(0.994);
}

.product-thumb {
  position: relative;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  flex: none;
  overflow: hidden;
  border-radius: 12px;
}

.product-thumb .ico {
  width: 31px;
  height: 31px;
  stroke-width: 1.45;
}

.product-thumb::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(12, 42, 35, 0.08);
  border-radius: 8px;
  pointer-events: none;
}

.thumb-a {
  background: linear-gradient(145deg, #EEE2C4, #DCC796);
  color: #6F581F;
}

.thumb-b {
  background: linear-gradient(145deg, #E4EDE7, #C9DBD0);
  color: #245C48;
}

.thumb-c {
  background: linear-gradient(145deg, #F2EADB, #E5D6BE);
  color: #7A6132;
}

.thumb-d {
  background: linear-gradient(145deg, #E9EFE5, #D2DFCC);
  color: #3A6141;
}

.thumb-e {
  background: linear-gradient(145deg, #F4E6D7, #E8CFB4);
  color: #85572C;
}

.product-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.product-top {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.product-name {
  display: -webkit-box;
  flex: 1;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-tag {
  flex: none;
  margin-top: 1px;
  padding: 2px 5px;
  border: 1px solid rgba(200, 162, 74, 0.35);
  border-radius: 5px;
  background: #FBF5E8;
  color: var(--gold-deep);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.product-desc {
  display: -webkit-box;
  overflow: hidden;
  margin: 4px 0 auto;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
}

.product-price {
  color: var(--ink);
  font-size: 17px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.product-price small {
  margin-left: 2px;
  color: var(--muted-2);
  font-size: 8.5px;
  font-weight: 500;
}

.add-btn {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 9px;
  background: var(--ink);
  color: var(--gold);
  transition: transform 0.15s ease, background 0.15s ease;
}

.add-btn .ico {
  width: 14px;
  height: 14px;
}

.add-btn:hover {
  background: var(--teal);
}

.add-btn:active {
  transform: scale(0.92);
}

.base-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 11px 12px;
  border: 1px dashed rgba(200, 162, 74, 0.44);
  border-radius: 13px;
  background: rgba(251, 245, 232, 0.55);
}

.base-note-ico {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 9px;
  background: rgba(200, 162, 74, 0.16);
  color: var(--gold-deep);
}

.base-note-ico .ico {
  width: 16px;
  height: 16px;
}

.base-note b {
  display: block;
  color: #5E4B1E;
  font-size: 10.5px;
  font-weight: 650;
}

.base-note p {
  margin-top: 2px;
  color: #8A7849;
  font-size: 9.5px;
  line-height: 1.5;
}

/* ---------- 政策页 ---------- */

.subscribe-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
  padding: 13px;
  border: 1px solid rgba(12, 42, 35, 0.07);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 8px 20px -18px rgba(12, 42, 35, 0.4);
}

.subscribe-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.subscribe-title {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.subscribe-ico {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 10px;
  background: rgba(200, 162, 74, 0.16);
  color: var(--gold-deep);
}

.subscribe-ico .ico {
  width: 17px;
  height: 17px;
}

.subscribe-title h2 {
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.3;
}

.subscribe-title p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
}

.sub-count {
  flex: none;
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.sub-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
}

.sub-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border: 1px solid rgba(12, 42, 35, 0.11);
  border-radius: 999px;
  background: #F7F5EE;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.02em;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.sub-chip::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #C4CCC6;
  transition: background 0.16s ease;
}

.sub-chip:hover {
  border-color: rgba(22, 72, 60, 0.28);
}

.sub-chip.is-on {
  border-color: rgba(22, 72, 60, 0.22);
  background: #E9F0EA;
  color: var(--teal);
  font-weight: 550;
}

.sub-chip.is-on::before {
  background: var(--gold);
}

.policy-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.policy-card {
  position: relative;
  overflow: hidden;
  padding: 13px;
  border: 1px solid rgba(12, 42, 35, 0.07);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 8px 20px -18px rgba(12, 42, 35, 0.42);
}

.policy-card::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -38px;
  width: 96px;
  height: 96px;
  border: 1px solid rgba(200, 162, 74, 0.10);
  border-radius: 50%;
  pointer-events: none;
}

.policy-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.tag-fund {
  background: #FBF2DC;
  color: #84641A;
  border: 1px solid #EFDCAE;
}

.tag-plan {
  background: #E8F0EA;
  color: #205B46;
  border: 1px solid #CEE0D5;
}

.tag-ai {
  background: #EAF0F3;
  color: #2B5366;
  border: 1px solid #D5E2E9;
}

.policy-date {
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
}

.policy-card h3 {
  padding-right: 2px;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.52;
}

.policy-summary {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.policy-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed rgba(12, 42, 35, 0.09);
}

.issuer {
  min-width: 0;
  overflow: hidden;
  color: var(--muted-2);
  font-size: 8.5px;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: none;
  padding: 4px 7px 4px 9px;
  border: 1px solid rgba(22, 72, 60, 0.16);
  border-radius: 999px;
  background: #F5F7F2;
  color: var(--teal);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.link-btn:hover {
  border-color: rgba(200, 162, 74, 0.55);
  background: #FBF6E9;
}

.link-btn .ico {
  width: 11px;
  height: 11px;
}

/* ---------- 更多页 ---------- */

.module-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid rgba(12, 42, 35, 0.07);
  border-radius: 14px;
  background: rgba(12, 42, 35, 0.07);
}

.summary-cell {
  padding: 10px 6px;
  background: var(--paper);
  text-align: center;
}

.summary-cell b {
  display: block;
  color: var(--ink);
  font-size: 17px;
  font-weight: 650;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.summary-cell span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 8.5px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.module-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.module {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 128px;
  padding: 12px;
  text-align: left;
  border: 1px solid rgba(12, 42, 35, 0.07);
  border-radius: 15px;
  background: var(--paper);
  box-shadow: 0 8px 20px -19px rgba(12, 42, 35, 0.45);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.module:hover {
  border-color: rgba(200, 162, 74, 0.48);
  box-shadow: 0 12px 24px -19px rgba(12, 42, 35, 0.5);
}

.module:active {
  transform: scale(0.987);
}

.module-ico {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 9px;
  border-radius: 11px;
  background: #EDF2EC;
  color: var(--teal);
}

.module-ico .ico {
  width: 18px;
  height: 18px;
}

.module.is-built .module-ico {
  background: #E6F0E9;
  color: #1B5B45;
}

.module.is-plan .module-ico {
  background: #FBF3E1;
  color: var(--gold-deep);
}

.module.is-future .module-ico {
  background: #F0EFEA;
  color: #778279;
}

.module h3 {
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.35;
}

.module p {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 3px;
  padding-right: 2px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.module-status {
  margin-top: auto;
  padding: 3px 6px;
  border-radius: 5px;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.status-built {
  background: #E7F1EB;
  color: #1D5C46;
}

.status-plan {
  background: #FBF2DC;
  color: #86651B;
}

.status-future {
  background: #F0EFEA;
  color: #737E76;
}

.more-foot {
  margin-top: 14px;
}

.version-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 2px 2px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: 0.03em;
}

/* ---------- Toast ---------- */

.toast {
  position: absolute;
  left: 50%;
  bottom: calc(84px + var(--safe-b));
  z-index: 45;
  max-width: calc(100% - 44px);
  padding: 9px 14px;
  border: 1px solid rgba(247, 244, 236, 0.08);
  border-radius: 12px;
  background: rgba(12, 42, 35, 0.95);
  color: var(--cream);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  text-align: center;
  box-shadow: 0 14px 30px -18px rgba(0, 0, 0, 0.7);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- 底部弹层 ---------- */

.sheet-layer {
  position: absolute;
  inset: 0;
  z-index: 50;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.24s ease, visibility 0.24s;
}

.sheet-layer.is-open {
  visibility: visible;
  opacity: 1;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  touch-action: none;
  background: rgba(7, 22, 17, 0.48);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  max-height: 80%;
  padding: 8px 18px calc(14px + var(--safe-b));
  border-radius: 22px 22px 0 0;
  background: var(--cream);
  box-shadow: 0 -24px 60px -12px rgba(0, 0, 0, 0.38);
  transform: translateY(104%);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sheet-layer.is-open .sheet {
  transform: translateY(0);
}

.sheet-grip {
  width: 36px;
  height: 4px;
  flex: none;
  margin: 0 auto 12px;
  border-radius: 2px;
  background: rgba(12, 42, 35, 0.16);
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex: none;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.sheet-eyebrow {
  margin-bottom: 4px;
  color: var(--gold-deep);
  font-size: 8.5px;
  letter-spacing: 0.14em;
}

.sheet-head h2 {
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 650;
  line-height: 1.5;
}

.sheet-close {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  background: rgba(12, 42, 35, 0.06);
  color: var(--muted);
  transition: background 0.16s ease;
}

.sheet-close:hover {
  background: rgba(12, 42, 35, 0.11);
}

.sheet-close .ico {
  width: 14px;
  height: 14px;
}

.sheet-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 0 14px;
  color: #33473F;
  font-size: 11.5px;
  line-height: 1.75;
}

.sheet-done {
  flex: none;
  width: 100%;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #16483C, #0C2A23);
  color: var(--cream);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  box-shadow: 0 8px 18px -12px rgba(12, 42, 35, 0.8);
}

.sheet-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.sheet-summary {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.75;
}

.read-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: read;
}

.read-list li {
  position: relative;
  padding: 9px 10px 9px 33px;
  border: 1px solid rgba(12, 42, 35, 0.065);
  border-radius: 11px;
  background: var(--paper);
  color: #33473F;
  font-size: 11px;
  line-height: 1.7;
  counter-increment: read;
}

.read-list li::before {
  content: counter(read, decimal-leading-zero);
  position: absolute;
  left: 11px;
  top: 10px;
  color: var(--gold-deep);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.sheet-disclaimer {
  margin-top: 10px;
  color: var(--muted-2);
  font-size: 9px;
  line-height: 1.6;
}

.sheet-points {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.sheet-points li {
  position: relative;
  padding-left: 15px;
  color: #40544B;
  font-size: 10.5px;
  line-height: 1.65;
}

.sheet-points li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
}

.sheet-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 600;
}

.sheet-module-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 11px;
}

.sheet-module-head .module-ico {
  margin-bottom: 0;
}

.sheet-module-head h3 {
  font-size: 12.5px;
  font-weight: 650;
}

.sheet-module-head p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
}

.sheet-section-label {
  margin: 12px 0 2px;
  color: var(--gold-deep);
  font-size: 8.5px;
  letter-spacing: 0.12em;
}

/* ---------- 移动端全屏 ---------- */

@media (max-width: 639px) {
  body {
    background: var(--cream);
  }

  /* 避免 iOS 聚焦输入框时自动放大页面 */
  #composerInput {
    font-size: 16px;
  }

  .stage {
    display: block;
    min-height: 0;
    padding: 0;
  }

  .stage::before,
  .stage::after {
    display: none;
  }

  .device {
    position: fixed;
    top: var(--vv-top);
    left: 0;
    width: 100%;
    height: var(--app-h);
    max-height: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}

@media (max-height: 700px) and (min-width: 640px) {
  .device {
    max-height: calc(100dvh - 24px);
  }

  .stage {
    padding: 12px;
  }
}

/* ---------- 减少动效 ---------- */

@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;
  }
}