/* ============================================================
   登科AI · 高考陪考智能体 —— 深夜自习室 × 香槟金 设计系统
   ============================================================ */

:root {
  /* 色彩令牌 */
  --bg-0: #06090f;
  --bg-1: #0a1020;
  --bg-2: #0e1730;
  --gold-1: #f6e3a8;
  --gold-2: #d8b45c;
  --gold-3: #b48d3a;
  --gold-dim: rgba(216, 180, 92, 0.35);
  --ice-1: #6ec3ff;
  --ice-2: #3a86c8;
  --txt-1: #ece9df;
  --txt-2: #aab3c5;
  --txt-3: #6b7688;
  --danger: #e07a6b;
  --ok: #7fd6a4;

  /* 玻璃 */
  --glass: rgba(255, 255, 255, 0.045);
  --glass-hi: rgba(255, 255, 255, 0.08);
  --glass-brd: rgba(216, 180, 92, 0.22);
  --glass-brd-hi: rgba(246, 227, 168, 0.45);

  /* 字体 */
  --font-serif: "STZhongsong", "Songti SC", "SimSun", "Noto Serif SC", serif;
  --font-sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;

  /* 几何 */
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --shadow-deep: 0 24px 60px rgba(0, 0, 0, 0.55);
  --shadow-gold: 0 8px 32px rgba(216, 180, 92, 0.18);

  --topbar-h: 64px;
  --tabbar-h: 62px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--txt-1);
  background: var(--bg-0);
  min-height: 100vh;
  overflow-x: hidden;
  letter-spacing: 0.2px;
}

::selection { background: rgba(216, 180, 92, 0.35); color: #fff; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(216, 180, 92, 0.25); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(216, 180, 92, 0.45); }

/* ============ 氛围背景 ============ */
.bg-aurora {
  position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 40% at 70% -10%, rgba(216, 180, 92, 0.13), transparent 60%),
    radial-gradient(ellipse 50% 35% at 10% 0%, rgba(62, 108, 180, 0.16), transparent 65%),
    radial-gradient(ellipse 55% 45% at 85% 110%, rgba(216, 180, 92, 0.06), transparent 60%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 45%, #05070c 100%);
}
.bg-aurora::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 45% 30% at 50% 115%, rgba(110, 195, 255, 0.07), transparent 65%);
  animation: auroraShift 18s ease-in-out infinite alternate;
}
@keyframes auroraShift {
  0% { opacity: 0.5; transform: translateY(0); }
  100% { opacity: 0.9; transform: translateY(-24px); }
}
.bg-stars { position: fixed; inset: 0; z-index: -2; pointer-events: none; }
.star {
  position: absolute; border-radius: 50%;
  background: rgba(246, 227, 168, 0.85);
  animation: twinkle var(--tw, 4s) ease-in-out infinite alternate;
}
@keyframes twinkle { 0% { opacity: 0.12; transform: scale(0.8); } 100% { opacity: 0.85; transform: scale(1.15); } }
.bg-grid {
  position: fixed; inset: 0; z-index: -2; pointer-events: none; opacity: 0.5;
  background-image:
    linear-gradient(rgba(216, 180, 92, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(216, 180, 92, 0.03) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}

/* ============ 顶部导航 ============ */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--topbar-h); z-index: 100;
  display: flex; align-items: center; gap: 28px; padding: 0 clamp(16px, 4vw, 48px);
  background: rgba(8, 12, 22, 0.72);
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  border-bottom: 1px solid rgba(216, 180, 92, 0.14);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center;
  font-family: var(--font-serif); font-size: 20px; font-weight: 700; color: #241a05;
  background: linear-gradient(135deg, var(--gold-1), var(--gold-2) 55%, var(--gold-3));
  border-radius: 11px; box-shadow: var(--shadow-gold), inset 0 1px 0 rgba(255,255,255,0.5);
}
.brand-text { font-family: var(--font-serif); font-size: 21px; font-weight: 700; color: var(--txt-1); letter-spacing: 3px; }
.brand-text em { font-style: normal; font-size: 13px; color: var(--gold-2); margin-left: 2px; letter-spacing: 1px; vertical-align: 4px; }
.brand-sub { font-size: 11.5px; color: var(--txt-2); letter-spacing: 2px; padding-left: 12px; border-left: 1px solid rgba(216,180,92,0.25); }
.topnav { display: flex; gap: 4px; margin-left: auto; }
.topnav a {
  position: relative; padding: 9px 16px; border-radius: 10px; text-decoration: none;
  color: var(--txt-2); font-size: 14.5px; letter-spacing: 1px; transition: all 0.25s ease;
}
.topnav a:hover { color: var(--gold-1); background: rgba(216, 180, 92, 0.08); }
.topnav a.active {
  color: var(--gold-1); background: linear-gradient(180deg, rgba(216,180,92,0.16), rgba(216,180,92,0.06));
  box-shadow: inset 0 0 0 1px rgba(216, 180, 92, 0.3);
}
.countdown-chip {
  display: flex; align-items: baseline; gap: 7px; padding: 7px 16px; border-radius: 999px;
  background: linear-gradient(135deg, rgba(216,180,92,0.14), rgba(216,180,92,0.05));
  border: 1px solid rgba(216,180,92,0.35); font-size: 12px; color: var(--txt-2); letter-spacing: 1px;
  white-space: nowrap;
}
.countdown-chip b { font-family: var(--font-serif); font-size: 17px; color: var(--gold-1); font-weight: 700; }

/* ============ 移动端 Tab ============ */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--tabbar-h); z-index: 100;
  display: none; align-items: stretch;
  background: rgba(8, 12, 22, 0.88);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-top: 1px solid rgba(216, 180, 92, 0.16);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  text-decoration: none; color: var(--txt-3); font-size: 10.5px; letter-spacing: 1px; transition: color 0.2s;
}
.tabbar a.active { color: var(--gold-1); }
.tab-ico svg { width: 22px; height: 22px; }
.tabbar a.active .tab-ico svg { filter: drop-shadow(0 0 6px rgba(246,227,168,0.6)); }

/* ============ 布局 ============ */
.view {
  min-height: 100vh;
  padding: calc(var(--topbar-h) + 28px) clamp(14px, 4vw, 52px) 60px;
  max-width: 1280px; margin: 0 auto;
  animation: pageIn 0.5s ease both;
}
@keyframes pageIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.page-head { margin-bottom: 26px; }
.page-kicker {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: 3px;
  color: var(--gold-2); margin-bottom: 10px; text-transform: uppercase;
}
.page-kicker::before { content: ""; width: 26px; height: 1px; background: linear-gradient(90deg, var(--gold-2), transparent); }
.page-title { font-family: var(--font-serif); font-size: clamp(26px, 4vw, 36px); font-weight: 700; letter-spacing: 2px; }
.page-title .gold { background: linear-gradient(120deg, var(--gold-1), var(--gold-2) 60%, var(--gold-1)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page-desc { margin-top: 10px; color: var(--txt-2); font-size: 14.5px; line-height: 1.8; max-width: 720px; }

/* ============ 玻璃卡片 ============ */
.card {
  position: relative;
  background: linear-gradient(160deg, var(--glass-hi), var(--glass));
  border: 1px solid var(--glass-brd);
  border-radius: var(--r-lg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-deep), inset 0 1px 0 rgba(255,255,255,0.06);
  padding: 24px 26px;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(120deg, transparent 30%, rgba(246, 227, 168, 0.06) 48%, transparent 62%);
  transform: translateX(-120%); transition: transform 0.7s ease;
}
.card.hoverable:hover { transform: translateY(-4px); border-color: var(--glass-brd-hi); box-shadow: 0 30px 70px rgba(0,0,0,0.6), var(--shadow-gold); }
.card.hoverable:hover::before { transform: translateX(120%); }
.card h3 { font-family: var(--font-serif); font-size: 18px; letter-spacing: 1.5px; color: var(--gold-1); margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.card h3 .co { font-size: 12px; color: var(--txt-3); font-family: var(--font-sans); font-weight: 400; letter-spacing: 1px; }
.card p, .card li { color: var(--txt-2); font-size: 14px; line-height: 1.9; }
.card .num {
  font-family: var(--font-serif); font-size: 30px; font-weight: 700;
  background: linear-gradient(120deg, var(--gold-1), var(--gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* 入场交错 */
.stagger > * { animation: fadeUp 0.6s ease both; }
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.12s; }
.stagger > *:nth-child(3) { animation-delay: 0.19s; }
.stagger > *:nth-child(4) { animation-delay: 0.26s; }
.stagger > *:nth-child(5) { animation-delay: 0.33s; }
.stagger > *:nth-child(6) { animation-delay: 0.40s; }
.stagger > *:nth-child(7) { animation-delay: 0.47s; }
.stagger > *:nth-child(8) { animation-delay: 0.54s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ============ 按钮 ============ */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 26px; border-radius: 12px; border: none; cursor: pointer;
  font-family: var(--font-sans); font-size: 14.5px; letter-spacing: 2px;
  transition: all 0.28s ease; overflow: hidden; text-decoration: none; user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn-gold {
  color: #241a05; font-weight: 600;
  background: linear-gradient(135deg, var(--gold-1), var(--gold-2) 55%, var(--gold-3));
  box-shadow: var(--shadow-gold), inset 0 1px 0 rgba(255,255,255,0.55);
}
.btn-gold:hover { box-shadow: 0 12px 44px rgba(216,180,92,0.4), inset 0 1px 0 rgba(255,255,255,0.55); transform: translateY(-2px); }
.btn-gold::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 60px; left: -80px;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.55), transparent);
  transform: skewX(-20deg); transition: left 0.6s ease;
}
.btn-gold:hover::after { left: 130%; }
.btn-ghost {
  color: var(--gold-1); background: rgba(216,180,92,0.06);
  border: 1px solid rgba(216,180,92,0.35);
}
.btn-ghost:hover { background: rgba(216,180,92,0.14); border-color: var(--glass-brd-hi); }
.btn-danger { color: #ffd9d2; background: rgba(224,122,107,0.12); border: 1px solid rgba(224,122,107,0.4); }
.btn-danger:hover { background: rgba(224,122,107,0.22); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn-sm { padding: 8px 18px; font-size: 13px; border-radius: 10px; }

/* ============ 标签 ============ */
.tag {
  display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px;
  font-size: 11.5px; letter-spacing: 1px;
  background: rgba(216,180,92,0.1); border: 1px solid rgba(216,180,92,0.3); color: var(--gold-1);
}
.tag.ice { background: rgba(110,195,255,0.08); border-color: rgba(110,195,255,0.3); color: var(--ice-1); }
.tag.danger { background: rgba(224,122,107,0.1); border-color: rgba(224,122,107,0.35); color: #f0a296; }
.tag.ok { background: rgba(127,214,164,0.1); border-color: rgba(127,214,164,0.3); color: var(--ok); }

/* ============ 首页 · 对话 ============ */
.home-layout { display: grid; grid-template-columns: 300px 1fr; gap: 22px; min-height: calc(100vh - var(--topbar-h) - 100px); }

.hero-strip {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 18px;
  padding: 20px 26px; border-radius: var(--r-lg);
  background: linear-gradient(120deg, rgba(216,180,92,0.1), rgba(216,180,92,0.02) 55%, rgba(110,195,255,0.05));
  border: 1px solid rgba(216,180,92,0.22);
}
.hero-strip .hello { font-family: var(--font-serif); font-size: 20px; letter-spacing: 2px; }
.hero-strip .sub { font-size: 13px; color: var(--txt-2); margin-top: 4px; letter-spacing: 1px; }
.hero-digits { margin-left: auto; display: flex; gap: 26px; }
.hero-digit { text-align: center; }
.hero-digit b { display: block; font-family: var(--font-serif); font-size: 26px; background: linear-gradient(120deg, var(--gold-1), var(--gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-digit span { font-size: 11px; color: var(--txt-3); letter-spacing: 2px; }

.side-col { display: flex; flex-direction: column; gap: 16px; }
.quick-moods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mood-btn {
  display: flex; flex-direction: column; gap: 6px; align-items: flex-start;
  padding: 13px 14px; border-radius: 14px; cursor: pointer; text-align: left;
  background: var(--glass); border: 1px solid rgba(255,255,255,0.08);
  color: var(--txt-1); font-family: var(--font-sans); font-size: 13.5px; letter-spacing: 1px;
  transition: all 0.25s ease;
}
.mood-btn small { color: var(--txt-3); font-size: 11px; }
.mood-btn:hover { border-color: var(--glass-brd-hi); background: var(--glass-hi); transform: translateY(-2px); }
.mood-btn .mood-emoji { font-size: 19px; }

.scene-list { display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow-y: auto; padding-right: 4px; }
.scene-item {
  padding: 11px 14px; border-radius: 12px; cursor: pointer; font-size: 13px; letter-spacing: 0.5px;
  color: var(--txt-2); background: rgba(255,255,255,0.03); border: 1px solid transparent;
  transition: all 0.22s ease; display: flex; align-items: center; gap: 8px;
}
.scene-item:hover { color: var(--gold-1); border-color: rgba(216,180,92,0.3); background: rgba(216,180,92,0.06); }
.scene-item .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold-2); flex-shrink: 0; }

/* 对话主区 */
.chat-shell {
  display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden;
  background: linear-gradient(170deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid var(--glass-brd); box-shadow: var(--shadow-deep);
  min-height: 560px;
}
.chat-top {
  display: flex; align-items: center; gap: 12px; padding: 14px 20px;
  border-bottom: 1px solid rgba(216,180,92,0.14);
  background: rgba(10, 16, 32, 0.5);
}
.chat-avatar {
  width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--gold-1), var(--gold-3));
  font-family: var(--font-serif); font-weight: 700; color: #241a05; font-size: 18px;
  box-shadow: var(--shadow-gold);
}
.chat-top .who b { font-family: var(--font-serif); font-size: 16px; letter-spacing: 2px; display: block; }
.chat-top .who small { color: var(--txt-3); font-size: 11.5px; letter-spacing: 1px; }
.chat-top .chat-actions { margin-left: auto; display: flex; gap: 8px; }

.chat-body { flex: 1; overflow-y: auto; padding: 22px 20px; display: flex; flex-direction: column; gap: 18px; min-height: 340px; max-height: calc(100vh - 420px); }
.msg { display: flex; gap: 12px; max-width: 92%; animation: fadeUp 0.4s ease both; }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg-ava {
  width: 34px; height: 34px; border-radius: 11px; flex-shrink: 0; display: grid; place-items: center;
  font-size: 13px; font-weight: 600;
}
.msg.ai .msg-ava { background: linear-gradient(135deg, var(--gold-1), var(--gold-3)); color: #241a05; font-family: var(--font-serif); }
.msg.user .msg-ava { background: linear-gradient(135deg, #3a5a8c, #22355c); color: #cfe3ff; }
.msg-bubble {
  padding: 13px 17px; border-radius: 16px; font-size: 14.5px; line-height: 1.85; letter-spacing: 0.3px;
  white-space: pre-wrap; word-break: break-word;
}
.msg.ai .msg-bubble {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(216,180,92,0.16);
  border-top-left-radius: 4px; color: var(--txt-1);
}
.msg.user .msg-bubble {
  background: linear-gradient(135deg, rgba(110,195,255,0.16), rgba(58,134,200,0.1));
  border: 1px solid rgba(110,195,255,0.25); border-top-right-radius: 4px; color: #dcecff;
}
.msg-bubble b, .msg-bubble strong { color: var(--gold-1); }
.typing-dots { display: inline-flex; gap: 5px; align-items: center; padding: 4px 0; }
.typing-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold-2); animation: dotJump 1.2s ease infinite; }
.typing-dots i:nth-child(2) { animation-delay: 0.15s; }
.typing-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dotJump { 0%, 60%, 100% { transform: none; opacity: 0.4; } 30% { transform: translateY(-5px); opacity: 1; } }
.stream-cursor { display: inline-block; width: 2px; height: 15px; background: var(--gold-2); margin-left: 2px; vertical-align: -2px; animation: blink 0.8s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

.chat-input-area { padding: 14px 16px; border-top: 1px solid rgba(216,180,92,0.14); background: rgba(10,16,32,0.5); }
.chat-input-wrap { display: flex; gap: 10px; align-items: flex-end; }
.chat-input {
  flex: 1; resize: none; border: 1px solid rgba(255,255,255,0.12); border-radius: 14px;
  background: rgba(255,255,255,0.05); color: var(--txt-1);
  font-family: var(--font-sans); font-size: 14.5px; line-height: 1.6; padding: 12px 16px;
  max-height: 130px; min-height: 46px; outline: none; transition: border-color 0.25s, box-shadow 0.25s;
}
.chat-input:focus { border-color: rgba(216,180,92,0.55); box-shadow: 0 0 0 3px rgba(216,180,92,0.12); }
.chat-send {
  width: 46px; height: 46px; border-radius: 13px; border: none; cursor: pointer; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--gold-1), var(--gold-3)); color: #241a05;
  box-shadow: var(--shadow-gold); transition: all 0.25s ease;
}
.chat-send:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(216,180,92,0.4); }
.chat-send:disabled { opacity: 0.4; transform: none; cursor: not-allowed; }
.chat-input-hint { font-size: 11.5px; color: var(--txt-3); margin-top: 8px; letter-spacing: 0.5px; text-align: center; }

.chat-empty { margin: auto; text-align: center; padding: 40px 20px; }
.chat-empty .big-emoji { font-size: 44px; margin-bottom: 14px; }
.chat-empty h3 { font-family: var(--font-serif); font-size: 22px; letter-spacing: 3px; color: var(--gold-1); margin-bottom: 10px; }
.chat-empty p { color: var(--txt-2); font-size: 13.5px; line-height: 1.9; }

/* ============ 呼吸练习 ============ */
.breath-stage { display: flex; flex-direction: column; align-items: center; padding: 30px 20px 24px; }
.breath-orbit { position: relative; width: 240px; height: 240px; display: grid; place-items: center; }
.breath-halo {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle, rgba(216,180,92,0.22), rgba(216,180,92,0.05) 55%, transparent 72%);
  animation: haloPulse 8s ease-in-out infinite;
}
@keyframes haloPulse { 0%,100% { transform: scale(0.85); opacity: 0.5; } 50% { transform: scale(1.12); opacity: 1; } }
.breath-core {
  position: relative; width: 150px; height: 150px; border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255,255,255,0.5), transparent 42%),
    linear-gradient(135deg, var(--gold-1), var(--gold-2) 52%, var(--gold-3));
  box-shadow: 0 0 60px rgba(216,180,92,0.45), 0 0 120px rgba(216,180,92,0.2), inset 0 -8px 22px rgba(120,80,10,0.35);
  display: grid; place-items: center; transition: transform 4s cubic-bezier(0.4, 0, 0.2, 1);
}
.breath-core.grow { transform: scale(1.35); }
.breath-core.shrink { transform: scale(0.92); }
.breath-core .core-txt { font-family: var(--font-serif); font-size: 21px; letter-spacing: 4px; color: #241a05; font-weight: 700; text-align: center; }
.breath-phase { margin-top: 22px; font-family: var(--font-serif); font-size: 19px; letter-spacing: 5px; color: var(--gold-1); min-height: 30px; }
.breath-count { font-size: 13px; color: var(--txt-3); margin-top: 6px; letter-spacing: 2px; min-height: 20px; }
.breath-bar { width: 100%; max-width: 340px; height: 5px; border-radius: 99px; background: rgba(255,255,255,0.08); margin-top: 20px; overflow: hidden; }
.breath-bar i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--gold-3), var(--gold-1)); border-radius: 99px; transition: width 0.5s linear; }
.breath-done { text-align: center; color: var(--ok); letter-spacing: 2px; margin-top: 16px; min-height: 24px; }

/* ============ 滑块 ============ */
.slider-row { margin: 16px 0; }
.slider-row .slider-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.slider-row .slider-label { font-size: 14px; letter-spacing: 2px; color: var(--txt-1); }
.slider-row .slider-label small { color: var(--txt-3); font-size: 11.5px; margin-left: 8px; letter-spacing: 0.5px; }
.slider-row .slider-val { font-family: var(--font-serif); font-size: 20px; color: var(--gold-1); font-weight: 700; }
input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 99px;
  background: linear-gradient(90deg, var(--gold-2) var(--fill, 50%), rgba(255,255,255,0.1) var(--fill, 50%));
  outline: none; cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-1), var(--gold-3));
  box-shadow: 0 0 0 4px rgba(216,180,92,0.18), 0 4px 14px rgba(0,0,0,0.5);
  border: 2px solid rgba(255,255,255,0.65); cursor: grab;
}
input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-1), var(--gold-3));
  box-shadow: 0 0 0 4px rgba(216,180,92,0.18); border: 2px solid rgba(255,255,255,0.65); cursor: grab;
}

/* ============ 番茄钟 ============ */
.pomo-stage { display: flex; flex-direction: column; align-items: center; padding: 26px 16px 20px; }
.pomo-ring { position: relative; width: 210px; height: 210px; }
.pomo-ring svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.pomo-ring .track { fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 7; }
.pomo-ring .prog {
  fill: none; stroke: url(#goldGrad); stroke-width: 7; stroke-linecap: round;
  filter: drop-shadow(0 0 8px rgba(216,180,92,0.55));
  transition: stroke-dashoffset 1s linear;
}
.pomo-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.pomo-time { font-family: var(--font-serif); font-size: 40px; font-weight: 700; letter-spacing: 2px; color: var(--txt-1); }
.pomo-mode { font-size: 12px; color: var(--txt-3); letter-spacing: 3px; margin-top: 4px; }
.pomo-ctrls { display: flex; gap: 12px; margin-top: 22px; }

/* ============ 时间轴 ============ */
.tl-wrap { position: relative; padding-left: 34px; }
.tl-wrap::before {
  content: ""; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(180deg, transparent, var(--gold-dim) 8%, var(--gold-dim) 92%, transparent);
}
.tl-item { position: relative; margin-bottom: 18px; }
.tl-node {
  position: absolute; left: -34px; top: 22px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg-1); border: 2px solid var(--gold-2); z-index: 1;
  display: grid; place-items: center;
}
.tl-node::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold-1); }
.tl-item.now .tl-node { box-shadow: 0 0 0 5px rgba(216,180,92,0.18), 0 0 18px rgba(216,180,92,0.5); border-color: var(--gold-1); }
.tl-item.now .tl-node::after { animation: nodePulse 2s ease infinite; }
@keyframes nodePulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.5); } }
.tl-item .card { cursor: pointer; }
.tl-item.now .card { border-color: rgba(246,227,168,0.5); background: linear-gradient(160deg, rgba(216,180,92,0.1), var(--glass)); }
.tl-detail { overflow: hidden; max-height: 0; transition: max-height 0.5s ease; }
.tl-detail.open { max-height: 640px; }
.tl-detail-inner { padding: 14px 18px 4px; border-top: 1px dashed rgba(216,180,92,0.2); margin-top: 14px; }
.tl-detail-inner h4 { color: var(--gold-2); font-size: 13px; letter-spacing: 2px; margin: 10px 0 6px; }
.tl-detail-inner p { font-size: 13.5px; }

/* ============ 表单 ============ */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--txt-2); letter-spacing: 2px; margin-bottom: 8px; }
.field input[type="text"], .field input[type="number"], .field textarea, .field select {
  width: 100%; padding: 12px 15px; border-radius: 12px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
  color: var(--txt-1); font-family: var(--font-sans); font-size: 14.5px; outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.field input:focus, .field textarea:focus { border-color: rgba(216,180,92,0.55); box-shadow: 0 0 0 3px rgba(216,180,92,0.12); }
.field .field-err { color: var(--danger); font-size: 12px; margin-top: 6px; min-height: 16px; }

/* 向导步骤 */
.wizard-steps { display: flex; gap: 6px; margin-bottom: 22px; }
.wizard-steps i { flex: 1; height: 4px; border-radius: 99px; background: rgba(255,255,255,0.1); transition: background 0.4s; }
.wizard-steps i.on { background: linear-gradient(90deg, var(--gold-3), var(--gold-1)); box-shadow: 0 0 8px rgba(216,180,92,0.5); }

/* ============ 案例卡 ============ */
.case-card .case-from { display: flex; align-items: center; gap: 12px; margin: 8px 0 12px; }
.case-score { font-family: var(--font-serif); font-size: 25px; font-weight: 700; }
.case-arrow { color: var(--gold-2); font-size: 19px; }
.case-card .case-score.up { color: var(--ok); }
.case-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* ============ 图表 ============ */
.chart-box { width: 100%; overflow-x: auto; }
.chart-svg text { font-family: var(--font-sans); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--txt-2); }
.legend i { width: 16px; height: 3px; border-radius: 2px; }

/* ============ 徽章 ============ */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.badge {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 10px; border-radius: 16px;
  background: var(--glass); border: 1px solid rgba(255,255,255,0.07); text-align: center;
  transition: all 0.25s ease; cursor: default;
}
.badge .badge-ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); font-size: 20px; }
.badge b { font-size: 12.5px; letter-spacing: 1px; color: var(--txt-1); font-weight: 500; }
.badge small { font-size: 10.5px; color: var(--txt-3); line-height: 1.5; }
.badge.unlocked { border-color: rgba(216,180,92,0.4); background: linear-gradient(160deg, rgba(216,180,92,0.1), var(--glass)); }
.badge.unlocked .badge-ico { background: linear-gradient(135deg, var(--gold-1), var(--gold-3)); border: none; box-shadow: 0 0 18px rgba(216,180,92,0.4); }

/* ============ 弹层 ============ */
.modal-mask[hidden] { display: none !important; }
.modal-mask {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px;
  background: rgba(4, 6, 12, 0.78); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  animation: maskIn 0.3s ease both;
}
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: min(480px, 94vw); max-height: 86vh; overflow-y: auto;
  background: linear-gradient(170deg, #131a2e, #0c1120);
  border: 1px solid rgba(216,180,92,0.35); border-radius: 22px;
  box-shadow: 0 40px 100px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.07);
  padding: 30px 28px; animation: modalIn 0.4s cubic-bezier(0.34, 1.4, 0.44, 1) both;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(26px) scale(0.96); } to { opacity: 1; transform: none; } }
.modal h3 { font-family: var(--font-serif); font-size: 19px; letter-spacing: 2px; color: var(--gold-1); margin-bottom: 12px; }
.modal p { color: var(--txt-2); font-size: 13.5px; line-height: 1.9; }
.modal-actions { display: flex; gap: 12px; margin-top: 22px; justify-content: flex-end; }

.crisis-modal { border-color: rgba(224,122,107,0.5); }
.crisis-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.crisis-head h3 { margin: 0; color: #ffd9d2; font-size: 17px; line-height: 1.5; }
.crisis-ring { width: 46px; height: 46px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; color: #f0a296; background: rgba(224,122,107,0.12); border: 1px solid rgba(224,122,107,0.4); }
.crisis-ring svg { width: 24px; height: 24px; }
.crisis-text { margin-bottom: 16px; }
.hotline-list { display: flex; flex-direction: column; gap: 9px; margin-bottom: 16px; }
.hotline {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 14px;
  background: rgba(224,122,107,0.08); border: 1px solid rgba(224,122,107,0.3); text-decoration: none;
  transition: all 0.25s ease;
}
.hotline:hover { background: rgba(224,122,107,0.16); transform: translateX(3px); }
.hotline .hl-info { flex: 1; }
.hotline .hl-name { color: var(--txt-1); font-size: 13.5px; letter-spacing: 1px; }
.hotline .hl-hours { color: var(--txt-3); font-size: 11px; margin-top: 2px; }
.hotline .hl-tel { font-family: var(--font-serif); font-size: 18px; font-weight: 700; color: #f0a296; letter-spacing: 1px; }
.crisis-tip { font-size: 12.5px !important; color: var(--txt-3) !important; }
.crisis-close { width: 100%; margin-top: 6px; }

/* ============ Toast ============ */
.toast[hidden] { display: none !important; }
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 24px); transform: translateX(-50%);
  z-index: 300; padding: 12px 24px; border-radius: 12px; max-width: 86vw;
  background: rgba(19, 26, 46, 0.95); border: 1px solid rgba(216,180,92,0.4);
  color: var(--gold-1); font-size: 13.5px; letter-spacing: 1px; text-align: center;
  box-shadow: 0 16px 48px rgba(0,0,0,0.6); animation: toastIn 0.35s ease both;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ============ 加载 ============ */
.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid rgba(216,180,92,0.2); border-top-color: var(--gold-1);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ 空状态 ============ */
.empty-state { text-align: center; padding: 46px 20px; color: var(--txt-3); }
.empty-state .empty-ico { font-size: 36px; margin-bottom: 12px; opacity: 0.7; }
.empty-state p { font-size: 13.5px; line-height: 1.9; }

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .topnav, .countdown-chip, .brand-sub { display: none; }
  .topbar { justify-content: center; }
  .tabbar { display: flex; }
  .view { padding-top: calc(var(--topbar-h) + 16px); padding-bottom: calc(var(--tabbar-h) + 34px); }
  .home-layout { grid-template-columns: 1fr; }
  .side-col { order: 2; }
  .chat-shell { order: 1; min-height: 66vh; }
  .chat-body { max-height: 52vh; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .hero-digits { margin-left: 0; width: 100%; justify-content: space-between; }
  .toast { bottom: calc(var(--tabbar-h) + 16px); }
  .page-title { letter-spacing: 1px; }
}
@media (max-width: 480px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .card { padding: 19px 18px; }
  .hero-digit b { font-size: 21px; }
}
