@layer measure;

/* ── 分寸 · Measure 中文排版基础层（原样引入，选择器优先级为 0） ── */
@layer measure {
  :where(:lang(zh)) { line-break: strict; font-synthesis-style: none; text-emphasis-position: under right; }
  :where(:lang(zh)) :where(p, li) { line-height: 1.75; }
  :where(:lang(zh)) :where(h1, h2, h3) { line-height: 1.3; }
  .measure-prose { max-width: 36em; }
  @supports (text-autospace: normal) { :where(:lang(zh)) { text-autospace: normal; } }
}

/* ═══════════ 设计变量：默认 = 1 晨雾晴空 ═══════════ */
:root {
  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-head: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-num: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "PingFang SC", sans-serif;
  --temp-weight: 200; --temp-size: 104px; --head-weight: 600;

  --bg-top: #E4E8EC; --bg-bottom: #F3F4F6; --glow: #FFFFFF;
  --surface: rgba(255, 255, 255, 0.58); --surface-solid: #FFFFFF; --surface-2: rgba(255, 255, 255, 0.42);
  --border: rgba(255, 255, 255, 0.85); --hair: rgba(30, 42, 51, 0.10);
  --shadow: 0 1px 2px rgba(30, 42, 51, 0.04), 0 8px 28px rgba(30, 42, 51, 0.06);
  --blur: saturate(1.4) blur(18px);
  --radius: 22px; --radius-sm: 12px; --radius-pill: 999px;
  --ink: #1E2A33; --ink-2: #445260; --ink-3: #56626E;
  --accent: #23607D; --accent-ink: #FFFFFF; --accent-soft: rgba(35, 96, 125, 0.10);
  --now: #E9814A;
  --chart-line: #2C6E8E; --chart-grid: rgba(30, 42, 51, 0.08); --band: rgba(30, 42, 51, 0.035);
  --tone-slate: #8A949F; --tone-mist: #8DB1CE; --tone-pine: #6FA58A; --tone-gold: #E2AE4A;
  --t-0: #8391A0; --t-1: #8DB4D3; --t-2: #A9C6B5; --t-3: #E4C066; --t-4: #EE9659;
  --sun: #F2B33D; --cloud: #E8EDF1; --cloud-edge: rgba(30, 42, 51, 0.26); --rain: #5D8DB8; --bolt: #F2B33D; --fog: #8C97A3;
  --arc-1: #8DB1CE; --arc-2: #85BC98; --arc-3: #EDA45E;
  --icon-outline: 0; --icon-stroke: 2.4;
  --like: #6FA58A; --dislike: #8DB1CE;
  --tab-bg: rgba(255, 255, 255, 0.72); --tab-on: #1E2A33; --tab-on-ink: #FFFFFF;
  --card-title: var(--ink-2);
  color-scheme: light;
}
html[data-sky="sun"]  { --bg-top: #F5E6D3; --bg-bottom: #FBF6EF; --glow: #FFE2BF; }
html[data-sky="cloud"]{ --bg-top: #E3E7EB; --bg-bottom: #F3F4F6; --glow: #FFFFFF; }
html[data-sky="rain"] { --bg-top: #D3E4EC; --bg-bottom: #EEF4F7; --glow: #E4F1F7; }

/* ═══════════ 2 治愈气象站 ═══════════ */
html.theme-nordic {
  --temp-weight: 500; --temp-size: 92px; --head-weight: 650;
  --bg-top: #F4F5F7; --bg-bottom: #F4F5F7;
  --surface: #FFFFFF; --surface-solid: #FFFFFF; --surface-2: #F4F5F7;
  --border: transparent; --hair: #E6E8EC;
  --shadow: 0 1px 2px rgba(34, 39, 46, 0.04), 0 6px 20px rgba(34, 39, 46, 0.05);
  --blur: none; --radius: 28px; --radius-sm: 16px;
  --ink: #22272E; --ink-2: #4C545E; --ink-3: #565E68;
  --accent: #345E4F; --accent-soft: rgba(52, 94, 79, 0.10); --now: #E0913F;
  --chart-line: #4C7D9E; --chart-grid: #ECEEF1; --band: #F6F7F9;
  --tone-slate: #A2AAB4; --tone-mist: #A7C2DA; --tone-pine: #90B497; --tone-gold: #EAC562;
  --t-0: #A2AAB4; --t-1: #A7C2DA; --t-2: #B9D0B3; --t-3: #EAC562; --t-4: #EDA167;
  --sun: #F2C14E; --cloud: #DCE4EC; --cloud-edge: rgba(34, 39, 46, 0.10); --rain: #6F95BF; --bolt: #F2C14E; --fog: #9AA5B1;
  --like: #90B497; --dislike: #A7C2DA;
  --block: #D5E0C9; --block-ink: #22272E;
  --tab-bg: #FFFFFF; --tab-on: #22272E;
}
html.theme-nordic[data-sky="sun"]   { --block: #F6E8B8; }
html.theme-nordic[data-sky="cloud"] { --block: #D8E3CC; }
html.theme-nordic[data-sky="rain"]  { --block: #D3E0EC; }

/* ═══════════ 3 岁时水彩 ═══════════ */
html.theme-watercolor {
  --font-head: "Iowan Old Style", "Source Serif 4", "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --font-num: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", monospace;
  --temp-weight: 300; --temp-size: 88px; --head-weight: 600;
  --bg-top: #FAF8F5; --bg-bottom: #FAF8F5; --glow: #F3C9A1;
  --surface: rgba(255, 253, 249, 0.72); --surface-solid: #FFFDF9; --surface-2: rgba(250, 248, 245, 0.8);
  --border: #E6DED2; --hair: #E9E2D7; --shadow: none; --blur: none;
  --radius: 6px; --radius-sm: 4px;
  --ink: #2B2926; --ink-2: #5B5650; --ink-3: #70695F;
  --accent: #A65A35; --accent-soft: rgba(166, 90, 53, 0.08); --now: #C2553A;
  --chart-line: #4F6E9C; --chart-grid: #ECE5DA; --band: rgba(196, 180, 160, 0.10);
  --tone-slate: #9EA2A6; --tone-mist: #98AFD4; --tone-pine: #8CAB8D; --tone-gold: #DCAA5E;
  --t-0: #9EA2A6; --t-1: #98AFD4; --t-2: #B5C3A8; --t-3: #DCAA5E; --t-4: #D98A5B;
  --sun: #C9803F; --cloud: #FFFDF9; --cloud-edge: #5B5650; --rain: #4F6E9C; --bolt: #C9803F; --fog: #7A736A;
  --arc-1: #98AFD4; --arc-2: #8CAB8D; --arc-3: #D98A5B;
  --icon-outline: 1; --icon-stroke: 1.5;
  --like: #8CAB8D; --dislike: #98AFD4;
  --tab-bg: rgba(255, 253, 249, 0.92); --tab-on: #2B2926;
}
html.theme-watercolor[data-sky="sun"]   { --glow: #F4C79F; --glow-2: #F7DDB8; }
html.theme-watercolor[data-sky="cloud"] { --glow: #DCD6CB; --glow-2: #E9E3D8; }
html.theme-watercolor[data-sky="rain"]  { --glow: #B9C7E8; --glow-2: #D3DCF0; }

/* ═══════════ 4 精密观测台 ═══════════ */
html.theme-instrument {
  --font-num: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", monospace;
  --temp-weight: 300; --temp-size: 96px; --head-weight: 600;
  --bg-top: #090B0E; --bg-bottom: #0B0E12; --glow: #6CC6FF;
  --surface: #11151A; --surface-solid: #11151A; --surface-2: #161B21;
  --border: #222932; --hair: #222932;
  --shadow: none; --blur: none; --radius: 14px; --radius-sm: 8px;
  --ink: #EEF2F6; --ink-2: #A9B3BE; --ink-3: #8994A0;
  --accent: #6CC6FF; --accent-ink: #061018; --accent-soft: rgba(108, 198, 255, 0.12); --now: #FFB547;
  --chart-line: #6CC6FF; --chart-grid: #1D232B; --band: rgba(255, 255, 255, 0.025);
  --tone-slate: #56616E; --tone-mist: #4C7EA8; --tone-pine: #3FA37C; --tone-gold: #E8B04A;
  --t-0: #56616E; --t-1: #4C7EA8; --t-2: #4E9C88; --t-3: #E8B04A; --t-4: #F08A4B;
  --sun: #FFB547; --cloud: #11151A; --cloud-edge: #A9B3BE; --rain: #6CC6FF; --bolt: #FFB547; --fog: #8994A0;
  --arc-1: #4C7EA8; --arc-2: #3FA37C; --arc-3: #E8B04A;
  --icon-outline: 1; --icon-stroke: 1.6;
  --like: #3FA37C; --dislike: #4C7EA8;
  --tab-bg: rgba(17, 21, 26, 0.92); --tab-on: #EEF2F6; --tab-on-ink: #090B0E;
  color-scheme: dark;
}
html.theme-instrument[data-sky="sun"]   { --glow: #FFB547; }
html.theme-instrument[data-sky="rain"]  { --glow: #6CC6FF; }
html.theme-instrument[data-sky="cloud"] { --glow: #A9B3BE; }

/* ═══════════ 基础 ═══════════ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; font-family: var(--font-ui); font-size: 15px; line-height: 1.6; color: var(--ink);
  background: linear-gradient(180deg, var(--bg-top) 0, var(--bg-bottom) 520px) fixed, var(--bg-bottom);
  transition: background-color .5s ease, color .3s ease;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
p { margin: 0; }

/* 顶部天光：晨雾 = 柔光，水彩 = 水彩晕，观测台 = 动态光带 */
.skyband { position: fixed; inset: 0 0 auto 0; height: 420px; pointer-events: none; z-index: 0;
  background: radial-gradient(60% 70% at 78% 0%, var(--glow) 0, transparent 70%); opacity: .55; transition: opacity .5s; }
html.theme-nordic .skyband { display: none; }
html.theme-watercolor .skyband { height: 360px; opacity: .9; filter: blur(14px);
  background:
    radial-gradient(42% 60% at 22% 8%, var(--glow) 0, transparent 70%),
    radial-gradient(36% 55% at 70% 0%, var(--glow-2, var(--glow)) 0, transparent 72%),
    radial-gradient(28% 40% at 92% 22%, var(--glow) 0, transparent 70%); }
html.theme-instrument .skyband { height: 3px; opacity: 1; filter: none;
  background: linear-gradient(90deg, transparent 0, var(--glow) 30%, transparent 60%, var(--glow) 85%, transparent 100%);
  background-size: 200% 100%; animation: band 9s linear infinite; box-shadow: 0 0 24px 2px color-mix(in srgb, var(--glow) 35%, transparent); }
@keyframes band { to { background-position: -200% 0; } }

/* ═══════════ 顶栏：坐标胶囊 + 风格预览 ═══════════ */
.topbar { position: sticky; top: 0; z-index: 30; padding: 12px 16px 10px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg-top) 92%, transparent), color-mix(in srgb, var(--bg-top) 70%, transparent));
  -webkit-backdrop-filter: saturate(1.3) blur(14px); backdrop-filter: saturate(1.3) blur(14px); }
html.theme-instrument .topbar { background: rgba(9, 11, 14, 0.82); border-bottom: 1px solid var(--hair); }
.topbar-in { max-width: 980px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.capsule { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 16px 6px 12px; max-width: 100%;
  border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); text-align: left; }
html.theme-watercolor .capsule { border-color: var(--hair); }
.cap-pin { font-size: 16px; line-height: 1; }
.cap-name { font-weight: 600; white-space: nowrap; }
.cap-meta { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cap-meta::before { content: "·"; margin: 0 6px 0 0; color: var(--ink-3); }
.cap-meta:empty { display: none; }
.cap-caret { color: var(--ink-3); font-size: 12px; }

.styles { margin-left: auto; display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: var(--radius-pill);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
html.theme-watercolor .styles { border-color: var(--hair); }
.styles-label { font-size: 13px; color: var(--ink-3); padding: 0 6px 0 10px; white-space: nowrap; }
.styles button { border: 0; background: transparent; border-radius: var(--radius-pill); padding: 7px 12px; font-size: 13px; color: var(--ink-2); white-space: nowrap; display: inline-flex; gap: 5px; align-items: baseline; }
.styles button b { font-family: var(--font-num); font-weight: 600; font-size: 12px; color: var(--ink-3); }
.styles button[aria-checked="true"] { background: var(--tab-on); color: var(--tab-on-ink, #fff); }
.styles button[aria-checked="true"] b { color: inherit; opacity: .7; }
.styles .short { display: none; }

/* ═══════════ 版式：桌面 Bento X（≥900）/ 手机单栏（<900） ═══════════ */
.wrap { position: relative; z-index: 1; max-width: 1012px; margin: 0 auto; padding: 8px 16px 40px; }
.layout { display: grid; grid-template-columns: minmax(320px, 380px) minmax(0, 560px); gap: clamp(20px, 4vw, 40px); justify-content: center; align-items: start; }
.col-left { display: flex; flex-direction: column; gap: 16px; }
.col-right { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.panel { display: none; flex-direction: column; gap: 16px; }
.panel.on { display: flex; }

.tabs { display: flex; gap: 4px; padding: 4px; border-radius: var(--radius-pill); background: var(--tab-bg); border: 1px solid var(--border); box-shadow: var(--shadow);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
html.theme-watercolor .tabs { border-color: var(--hair); border-radius: 4px; }
.tabs button { flex: 1; border: 0; background: transparent; border-radius: var(--radius-pill); padding: 9px 10px; font-size: 14px; color: var(--ink-2); font-weight: 500; }
html.theme-watercolor .tabs button { border-radius: 3px; }
.tabs button[aria-selected="true"] { background: var(--tab-on); color: var(--tab-on-ink, #fff); }
.tabs .m { display: none; }
.tabs .ti { display: none; }

/* ═══════════ 卡片 ═══════════ */
.card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
html.theme-watercolor .card { border-color: var(--hair); }
.card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.card-t { margin: 0; font-family: var(--font-head); font-size: 16px; font-weight: var(--head-weight); color: var(--ink); }
.card-sub { font-size: 13px; color: var(--ink-3); }
html.theme-instrument .card-t { font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--ink-2); }
html.theme-instrument .card-t::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 1px; background: var(--accent); margin-right: 8px; vertical-align: 2px; }
.note { font-size: 14px; color: var(--ink-3); line-height: 1.7; max-width: 36em; }

/* ═══════════ 按钮 ═══════════ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 16px; border-radius: var(--radius-pill);
  border: 1px solid var(--hair); background: var(--surface-solid); color: var(--ink); font-size: 14px; font-weight: 500; }
.btn:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--hair)); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.sm { min-height: 32px; padding: 5px 12px; font-size: 13px; }
html.theme-watercolor .btn { border-radius: 4px; }
html.theme-instrument .btn { background: var(--surface-2); }
html.theme-instrument .btn.primary { background: var(--accent); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: var(--radius-pill); font-size: 12px; line-height: 20px;
  background: var(--accent-soft); color: var(--ink-2); white-space: nowrap; }
html.theme-watercolor .chip { border-radius: 3px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--radius-pill); background: var(--surface-2); border: 1px solid var(--hair); }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: var(--radius-pill); font-size: 13px; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--surface-solid); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); font-weight: 600; }
html.theme-instrument .seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
html.theme-watercolor .seg, html.theme-watercolor .seg button { border-radius: 3px; }

/* ═══════════ 图标 ═══════════ */
.wx { display: block; overflow: visible; }
.wx .i-sun { fill: var(--sun); }
.wx .i-ray { stroke: var(--sun); stroke-width: var(--icon-stroke); stroke-linecap: round; fill: none; }
.wx .i-cloud { fill: var(--cloud); stroke: var(--cloud-edge); stroke-width: 1.6; }
.wx .i-drop, .wx .i-fog, .wx .i-wind { stroke: var(--rain); stroke-width: var(--icon-stroke); stroke-linecap: round; fill: none; }
.wx .i-fog, .wx .i-wind { stroke: var(--fog); }
.wx .i-bolt { fill: var(--bolt); }
.wx .i-hail { fill: var(--rain); }
.wx .i-arc1, .wx .i-arc2, .wx .i-arc3 { fill: none; stroke-width: calc(var(--icon-stroke) * 1.6); stroke-linecap: round; }
.wx .i-arc1 { stroke: var(--arc-1); } .wx .i-arc2 { stroke: var(--arc-2); } .wx .i-arc3 { stroke: var(--arc-3); }
.wx .g-faint { opacity: .55; }
/* 细线风格：水彩、观测台 */
html.theme-watercolor .wx .i-sun, html.theme-instrument .wx .i-sun { fill: none; stroke: var(--sun); stroke-width: var(--icon-stroke); }
html.theme-watercolor .wx .i-cloud, html.theme-instrument .wx .i-cloud { fill: var(--surface-solid); stroke: var(--cloud-edge); stroke-width: var(--icon-stroke); }
html.theme-watercolor .wx .i-bolt, html.theme-instrument .wx .i-bolt { fill: none; stroke: var(--bolt); stroke-width: var(--icon-stroke); stroke-linejoin: round; }
/* 治愈：几何感更强的粗笔 */
html.theme-nordic .wx .i-cloud { stroke: none; }
html.theme-nordic .hero .wx .i-cloud { fill: #FFFFFF; }
html.theme-nordic .wx .i-ray { stroke-width: 3; }
/* 动态 */
.wx-anim .g-sun { transform-origin: 32px 32px; }
.wx-anim.wx-clear .g-sun .i-ray { transform-origin: 32px 32px; animation: spin 40s linear infinite; }
.wx-anim.wx-breeze .g-sun, .wx-anim.wx-clearing .g-sun { transform-origin: 24px 24px; animation: breathe 5s ease-in-out infinite; }
.wx-anim .g-cloud { animation: drift 7s ease-in-out infinite; }
.wx-anim .g-rain path { animation: fall 1.6s linear infinite; }
.wx-anim .g-bolt { animation: flash 4s ease-in-out infinite; }
.wx-anim .g-fog { animation: slide 6s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { transform: scale(1.06); } }
@keyframes drift { 50% { transform: translateX(2.5px); } }
@keyframes fall { 0% { transform: translateY(-3px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(4px); opacity: 0; } }
@keyframes flash { 0%, 86%, 100% { opacity: 1; } 90% { opacity: .25; } 94% { opacity: 1; } 96% { opacity: .4; } }
@keyframes slide { 50% { transform: translateX(-3px); } }
@media (prefers-reduced-motion: reduce) { .wx-anim *, .skyband { animation: none !important; } }

/* ═══════════ 今日主卡 ═══════════ */
.hero { padding: 22px 22px 20px; overflow: hidden; }
html.theme-nordic .hero { background: var(--block); }
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.hero-date { font-size: 13px; color: var(--ink-2); }
.hero-date b { font-weight: 600; color: var(--ink); margin-right: 6px; }
.channel-pick { position: relative; }
.channel-pick select { appearance: none; -webkit-appearance: none; border: 1px solid var(--hair); background: var(--surface-2); border-radius: var(--radius-pill);
  padding: 5px 28px 5px 12px; font-size: 13px; color: var(--ink-2); }
.channel-pick::after { content: "▾"; position: absolute; right: 11px; top: 50%; transform: translateY(-50%); font-size: 11px; color: var(--ink-3); pointer-events: none; }
html.theme-nordic .channel-pick select { background: rgba(255,255,255,.6); border-color: transparent; }
html.theme-watercolor .channel-pick select { border-radius: 3px; }
.hero-main { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 16px; margin: 14px 0 6px; }
.hero-icon { grid-row: span 2; width: 92px; height: 92px; }
.hero-icon .wx { width: 92px; height: 92px; }
.hero-temp { font-family: var(--font-num); font-weight: var(--temp-weight); font-size: var(--temp-size); line-height: .95; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.hero-temp sup { font-size: .42em; font-weight: inherit; vertical-align: .9em; margin-left: 2px; letter-spacing: 0; }
.hero-temp .feels { font-family: var(--font-ui); font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--ink-3); margin-left: 8px; vertical-align: .5em; }
.hero-name { font-family: var(--font-head); font-size: 20px; font-weight: var(--head-weight); }
.hero-name .tag { margin-left: 8px; vertical-align: 2px; }
.hero-lead { font-size: 12px; color: var(--ink-3); margin-top: 12px; }
.hero-advice { font-size: 16px; line-height: 1.75; margin-top: 4px; }
html.theme-watercolor .hero-advice { font-family: var(--font-head); font-size: 17px; }
.hero-air { font-size: 13px; color: var(--ink-2); margin-top: 8px; line-height: 1.7; }
.micro { display: grid; grid-template-columns: repeat(3, 1fr); margin: 16px 0 14px; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.micro > div { padding: 10px 0 10px 12px; border-left: 1px solid var(--hair); min-width: 0; }
.micro > div:first-child { border-left: 0; padding-left: 0; }
.micro dt { font-size: 12px; color: var(--ink-3); }
.micro dd { margin: 2px 0 0; font-size: 17px; font-weight: 500; white-space: nowrap; }
.micro dd small { font-size: 12px; color: var(--ink-3); font-weight: 400; margin-left: 2px; }
html.theme-nordic .micro { border: 0; gap: 8px; }
html.theme-nordic .micro > div { background: rgba(255,255,255,.55); border: 0; border-radius: 14px; padding: 10px 12px; }
html.theme-instrument .micro > div { font-family: var(--font-num); }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.calibrated { font-size: 12px; color: var(--ink-3); }

.calib-entry { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 14px 18px; text-align: left;
  border-radius: var(--radius); border: 1px dashed color-mix(in srgb, var(--accent) 50%, var(--hair)); background: var(--accent-soft); color: var(--ink); }
.calib-entry b { font-weight: 600; font-size: 15px; }
.calib-entry span { font-size: 13px; color: var(--ink-2); }
.calib-entry .go { font-size: 13px; color: var(--accent); white-space: nowrap; font-weight: 600; }
html.theme-watercolor .calib-entry { border-radius: 6px; }

/* ═══════════ 逐时气压波 ═══════════ */
.wave-box { position: relative; margin: 4px -4px 0; }
.wave-box canvas { display: block; width: 100%; height: 190px; cursor: pointer; touch-action: manipulation; }
.slots { display: grid; grid-template-columns: repeat(12, 1fr); margin: 0 2px; }
.slots button { border: 0; background: transparent; padding: 6px 0 4px; font-family: var(--font-num); font-size: 12px; color: var(--ink-3); border-radius: 8px; min-width: 0; }
.slots button[aria-pressed="true"] { color: var(--ink); font-weight: 700; background: var(--accent-soft); }
.slots button.up { color: var(--accent); font-weight: 600; }
.wave-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink-3); margin: 8px 0 0; }
.wave-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.slot-detail { margin-top: 12px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--hair); }
.slot-detail h4 { margin: 0 0 4px; font-size: 15px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.slot-detail p { font-size: 14px; color: var(--ink-2); }
.slot-detail .btn { margin-top: 10px; }

/* ═══════════ 体感温差校准 ═══════════ */
.feel-q { font-size: 15px; margin-bottom: 12px; }
.feel-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.feel-btns button { border: 1px solid var(--hair); background: var(--surface-solid); border-radius: var(--radius-sm); padding: 10px 6px; font-size: 14px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.feel-btns button small { font-size: 12px; color: var(--ink-3); }
.feel-btns button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
html.theme-instrument .feel-btns button { background: var(--surface-2); }
.feel-dots { display: flex; gap: 5px; margin-top: 12px; align-items: center; flex-wrap: wrap; }
.feel-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--hair); }
.feel-dots i.warm { background: var(--tone-gold); } .feel-dots i.match { background: var(--tone-pine); } .feel-dots i.cool { background: var(--tone-mist); }
.feel-sum { font-size: 13px; color: var(--ink-2); margin-top: 10px; line-height: 1.7; }

/* ═══════════ 精密观测台 ═══════════ */
.gauges { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.gauge { border: 1px solid var(--hair); border-radius: var(--radius-sm); padding: 12px 14px; background: var(--surface-2); min-width: 0; }
.gauge dt { font-size: 12px; color: var(--ink-3); display: flex; justify-content: space-between; gap: 6px; }
.gauge dd { margin: 4px 0 0; font-family: var(--font-num); font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gauge dd small { font-family: var(--font-ui); font-size: 12px; color: var(--ink-3); font-weight: 400; margin-left: 4px; }
.ruler { position: relative; height: 18px; margin-top: 8px;
  background: repeating-linear-gradient(90deg, var(--ink-3) 0 1px, transparent 1px 10%) bottom / 100% 6px no-repeat,
              repeating-linear-gradient(90deg, var(--ink-3) 0 1px, transparent 1px 50%) bottom / 100% 10px no-repeat; opacity: .9; }
.ruler::after { content: ""; position: absolute; bottom: 0; left: var(--pos, 50%); width: 2px; height: 16px; background: var(--accent); border-radius: 1px; transform: translateX(-1px); }
.dims { margin-top: 14px; display: grid; gap: 6px; }
.dim { display: grid; grid-template-columns: 6.6em 1fr 1.6em; align-items: center; gap: 10px; font-size: 13px; }
.dim .bar { position: relative; height: 6px; border-radius: 3px; background: var(--chart-grid); }
.dim .bar i { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.dim .bar::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--ink-3); opacity: .5; }
.dim b { font-weight: 500; text-align: right; color: var(--ink-2); }
details.fold { margin-top: 14px; border-top: 1px solid var(--hair); padding-top: 10px; }
details.fold > summary { cursor: pointer; list-style: none; font-size: 14px; color: var(--ink-2); display: flex; justify-content: space-between; align-items: center; min-height: 32px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: "▾"; font-size: 12px; color: var(--ink-3); transition: transform .2s; }
details.fold[open] > summary::after { transform: rotate(180deg); }
.causes { display: grid; gap: 12px; margin-top: 8px; }
.cause h5 { margin: 0; font-size: 14px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.cause h5 .num { color: var(--ink-3); font-size: 12px; font-weight: 400; }
.cause ul { margin: 4px 0 0; padding-left: 1.1em; font-size: 13px; color: var(--ink-2); }
.cause li { line-height: 1.7; }
.formula { font-family: var(--font-num); font-size: 12px; color: var(--ink-3); line-height: 1.7; word-break: break-word; }

/* ═══════════ 个人气候体质 ═══════════ */
.cons-line { font-size: 15px; line-height: 1.7; margin-bottom: 12px; }
html.theme-watercolor .cons-line { font-family: var(--font-head); }
.cons-rows { display: grid; gap: 8px; }
.cons-row { display: grid; grid-template-columns: 1.4em 5.6em 1fr; align-items: center; gap: 8px; font-size: 13px; }
.cons-row .wx-name { font-weight: 600; font-size: 15px; font-family: var(--font-head); }
.cons-row .what { color: var(--ink-2); white-space: nowrap; }
.cons-row .meter { position: relative; height: 8px; border-radius: 4px; background: var(--chart-grid); }
.cons-row .meter::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--ink-3); opacity: .55; }
.cons-row .meter i { position: absolute; top: 0; bottom: 0; border-radius: 4px; }
.cons-ends { display: grid; grid-template-columns: 1.4em 5.6em 1fr; gap: 8px; font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.cons-ends span:last-child { display: flex; justify-content: space-between; }

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; }
.actions .btn { min-height: 46px; border-radius: var(--radius-sm); }
.menu { position: absolute; z-index: 5; right: 14px; bottom: calc(100% - 6px); min-width: 230px; padding: 6px; border-radius: var(--radius-sm);
  background: var(--surface-solid); border: 1px solid var(--hair); box-shadow: 0 12px 40px rgba(0,0,0,.14); }
.menu button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 10px 12px; border-radius: 8px; font-size: 14px; }
.menu button:hover { background: var(--accent-soft); }
.menu small { display: block; color: var(--ink-3); font-size: 12px; }

/* ═══════════ 近期预报 ═══════════ */
.rec-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.rec-tools .right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.toggle input { accent-color: var(--accent); width: 16px; height: 16px; }
.rows { display: flex; flex-direction: column; }
.row { display: grid; grid-template-columns: 3.4em 2.2em 7.2em 1fr; align-items: center; gap: 10px; padding: 10px 2px; border-top: 1px solid var(--hair); }
.row:first-child { border-top: 0; }
.row.past { opacity: .5; }
.row.today .r-day b { color: var(--accent); }
.r-day { display: flex; flex-direction: column; line-height: 1.3; }
.r-day b { font-size: 15px; font-weight: 600; }
.r-day small { font-size: 12px; color: var(--ink-3); font-family: var(--font-num); }
.r-icon .wx { width: 32px; height: 32px; }
.r-wx { min-width: 0; line-height: 1.35; }
.r-wx b { display: block; font-size: 14px; font-weight: 500; white-space: nowrap; }
.r-wx .chip { margin-top: 3px; font-size: 12px; padding: 0 8px; }
.r-temp { display: grid; grid-template-columns: 2.4em 1fr 2.4em; align-items: center; gap: 8px; font-family: var(--font-num); font-size: 14px; font-variant-numeric: tabular-nums; }
.r-temp .lo { color: var(--ink-3); text-align: right; } .r-temp .hi { text-align: left; }
.track { position: relative; height: 6px; border-radius: 3px; background: var(--chart-grid); }
.track i { position: absolute; top: 0; bottom: 0; border-radius: 3px; min-width: 6px; }
.track .dot { position: absolute; top: 50%; width: 9px; height: 9px; border-radius: 50%; background: var(--surface-solid); border: 2px solid var(--ink); transform: translate(-50%, -50%); }
.rec-foot { margin-top: 12px; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--accent); }

/* ═══════════ 年度气候带 ═══════════ */
.cy-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink-2); margin-bottom: 10px; }
.cy-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cy-legend i { width: 10px; height: 14px; border-radius: 3px; display: inline-block; }
.cy-legend .wx { width: 18px; height: 18px; }
.cy-scroll { position: relative; overflow-x: auto; overflow-y: hidden; margin: 0 -20px; padding: 0 20px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.cy-scroll canvas { display: block; height: 260px; cursor: pointer; }
.cy-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.tip { position: fixed; z-index: 40; pointer-events: none; padding: 8px 10px; border-radius: 10px; font-size: 12px; line-height: 1.5;
  background: var(--surface-solid); color: var(--ink); border: 1px solid var(--hair); box-shadow: 0 8px 24px rgba(0,0,0,.14); max-width: 220px; }
.tip b { font-family: var(--font-num); }
.year-card { margin-top: 14px; padding: 16px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--hair); }
.year-card h4 { margin: 0 0 6px; font-size: 16px; font-family: var(--font-head); display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.year-card p { font-size: 14px; color: var(--ink-2); line-height: 1.75; }
.events { display: grid; gap: 8px; margin-top: 10px; }
.event { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; font-size: 13px; }
.event .wx { width: 28px; height: 28px; }
.event b { font-weight: 600; font-size: 14px; }
.event p { font-size: 13px; color: var(--ink-2); }

/* ═══════════ 首屏建站卡 ═══════════ */
.onboard { max-width: 460px; margin: 6vh auto 0; }
.onboard .card { padding: 28px; }
.ob-icon .wx { width: 64px; height: 64px; }
.ob-t { margin: 12px 0 4px; font-family: var(--font-head); font-size: 24px; font-weight: var(--head-weight); }
.ob-sub { color: var(--ink-2); font-size: 14px; margin-bottom: 18px; }
.ob-alt { margin-top: 12px; text-align: center; }
.ob-alt button { border: 0; background: transparent; color: var(--accent); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.layout.reveal { animation: reveal .5s ease both; }
@keyframes reveal { from { opacity: 0; transform: translateY(10px); } }

/* ═══════════ 表单 ═══════════ */
.form { display: grid; gap: 12px; }
.field { display: grid; gap: 5px; }
.field > span { font-size: 13px; color: var(--ink-2); }
.field input[type="text"], .field input[type="date"], .field input[type="time"], .field select, .field input[list] {
  width: 100%; min-height: 42px; padding: 8px 12px; border-radius: var(--radius-sm); border: 1px solid var(--hair); background: var(--surface-solid); font-size: 15px; }
html.theme-instrument .field input, html.theme-instrument .field select { background: var(--surface-2); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 8px; }
.row3 select { padding-left: 10px; padding-right: 6px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.form details summary { cursor: pointer; font-size: 13px; color: var(--ink-2); }
.form details[open] { display: grid; gap: 10px; }
.err { color: #B24A3A; font-size: 13px; }
html.theme-instrument .err { color: #FF8F7A; }

/* ═══════════ 抽屉、弹层、提示 ═══════════ */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(10, 14, 18, 0.32); animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.drawer { position: fixed; z-index: 51; top: 0; left: 0; bottom: 0; width: min(420px, 100vw); overflow-y: auto; padding: 20px;
  background: var(--surface-solid); color: var(--ink); box-shadow: 0 0 60px rgba(0,0,0,.18); animation: slide-in .26s ease; }
html.theme-instrument .drawer { border-right: 1px solid var(--hair); }
@keyframes slide-in { from { transform: translateX(-24px); opacity: 0; } }
.dr-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.dr-h h2 { margin: 0; font-family: var(--font-head); font-size: 18px; font-weight: var(--head-weight); }
.x { border: 0; background: var(--surface-2); width: 36px; height: 36px; border-radius: 50%; font-size: 18px; line-height: 1; color: var(--ink-2); }
.plist { display: grid; gap: 8px; margin-bottom: 16px; }
.pitem { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--hair); }
.pitem.on { border-color: var(--accent); background: var(--accent-soft); }
.pitem b { font-weight: 600; } .pitem small { display: block; color: var(--ink-3); font-size: 12px; }
.pitem .ops { display: flex; gap: 6px; }
.dr-sec { font-size: 14px; color: var(--ink-3); margin: 18px 0 8px; }

dialog { border: 0; padding: 0; border-radius: var(--radius); background: var(--surface-solid); color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.25);
  width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); }
dialog::backdrop { background: rgba(10, 14, 18, 0.36); }
.dlg { padding: 20px; overflow-y: auto; max-height: calc(100vh - 32px); }
.dlg-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.dlg-h h2 { margin: 0; font-family: var(--font-head); font-size: 18px; font-weight: var(--head-weight); }
.tags { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.tags button { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; align-items: center; text-align: left; padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--hair); background: var(--surface-2); }
.tags button .e { grid-row: span 2; line-height: 0; }
.tags button .e .wx { width: 34px; height: 34px; }
.tags button b { font-size: 14px; font-weight: 600; } .tags button small { font-size: 12px; color: var(--ink-3); }
.tags button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.labels { display: grid; gap: 6px; margin-top: 8px; }
.label-i { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); font-size: 13px; }
.label-i .e { line-height: 0; }
.label-i .e .wx { width: 26px; height: 26px; }
.label-i small { color: var(--ink-3); display: block; }
.result { margin-top: 14px; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--hair); }
.result p { font-size: 14px; line-height: 1.75; }
.result ul { margin: 8px 0 0; padding-left: 1.1em; font-size: 13px; color: var(--ink-2); }
.wtable { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
.wtable th, .wtable td { padding: 6px 4px; border-top: 1px solid var(--hair); text-align: left; }
.wtable th { color: var(--ink-3); font-weight: 400; }
.wtable td.num { font-family: var(--font-num); }
.poster-wrap { display: flex; justify-content: center; }
.poster-wrap canvas { width: min(100%, 360px); height: auto; border-radius: 12px; box-shadow: 0 6px 24px rgba(0,0,0,.12); }
.toast { position: fixed; z-index: 60; left: 50%; bottom: 96px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: .25s ease;
  padding: 10px 16px; border-radius: var(--radius-pill); background: var(--ink); color: var(--surface-solid); font-size: 14px; max-width: calc(100vw - 32px); text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.foot { position: relative; z-index: 1; max-width: 980px; margin: 0 auto; padding: 16px 16px 40px; text-align: center; }
.foot p { font-size: 14px; line-height: 1.7; color: var(--ink-3); max-width: 36em; margin-left: auto; margin-right: auto; }

/* ═══════════ 手机（< 900px）：单栏卡片流 + 底部 3 Tab ═══════════ */
@media (max-width: 899px) {
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .topbar { padding: 10px 12px 8px; }
  .topbar-in { gap: 8px; }
  .capsule { flex: 1 1 100%; justify-content: flex-start; }
  .cap-caret { margin-left: auto; }
  .styles { flex: 1 1 100%; justify-content: space-between; }
  .styles-label { padding: 0 2px 0 8px; }
  .styles button { flex: 1; justify-content: center; padding: 5px 4px; }
  .capsule { min-height: 40px; }
  .styles .full { display: none; } .styles .short { display: inline; }
  .wrap { padding: 4px 12px 24px; }
  .layout { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
  .col-left, .col-right { display: contents; }
  .layout:not([data-tab="today"]) .col-left { display: none; }
  .panel.on { display: contents; }
  .layout > * , .col-left > *, .col-right > *, .panel > * { order: var(--o, 50); }
  .tabs { position: fixed; z-index: 35; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); padding: 5px; order: 99; }
  .tabs button { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 6px 4px; font-size: 13px; }
  .tabs .d { display: none; } .tabs .m { display: inline; }
  .tabs .ti { display: block; font-size: 15px; line-height: 1.2; }
  .card { padding: 16px; }
  .hero { padding: 18px; }
  .cy-scroll { margin: 0 -16px; padding: 0 16px; }
  .toast { bottom: calc(92px + env(safe-area-inset-bottom)); }
  .drawer { top: auto; width: 100vw; max-height: 88vh; border-radius: 20px 20px 0 0; animation: rise .26s ease; }
  @keyframes rise { from { transform: translateY(30px); opacity: 0; } }
}
@media (max-width: 420px) {
  :root { --temp-size: 84px; }
  html.theme-nordic, html.theme-watercolor, html.theme-instrument { --temp-size: 76px; }
  .hero-icon, .hero-icon .wx { width: 76px; height: 76px; }
  .styles-label { display: none; }
  .row { grid-template-columns: 3em 2em 5.2em 1fr; gap: 8px; }
  .r-wx b { font-size: 13px; }
  .r-temp { grid-template-columns: 2.2em 1fr 2.2em; gap: 6px; font-size: 13px; }
  .micro dd { font-size: 15px; }
  .gauges { grid-template-columns: 1fr 1fr; gap: 8px; }
  .gauge dd { font-size: 19px; }
  .actions { grid-template-columns: 1fr; }
  .cons-row { grid-template-columns: 1.4em 4.8em 1fr; }
  .cons-ends { grid-template-columns: 1.4em 4.8em 1fr; }
}

/* ═══════════ 各风格的标志性细节 ═══════════ */
/* 1 晨雾晴空：大面积天色、更通透的玻璃卡 */
html.theme-mist .hero { background: linear-gradient(160deg, rgba(255,255,255,.72), rgba(255,255,255,.42)); }
html.theme-mist .hero-name { font-weight: 500; }

/* 2 治愈气象站：低饱和色块、柔和几何 */
html.theme-nordic .hero-icon { position: relative; }
html.theme-nordic .hero-icon::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; background: rgba(255,255,255,.55); }
html.theme-nordic .hero-icon .wx { position: relative; }
html.theme-nordic .hero::after { content: ""; position: absolute; width: 180px; height: 180px; right: -60px; top: -70px; border-radius: 50%; background: rgba(255,255,255,.35); pointer-events: none; }
html.theme-nordic .card-t { font-size: 17px; }
html.theme-nordic .tabs button[aria-selected="true"], html.theme-nordic .styles button[aria-checked="true"] { background: #3F6F5E; color: #fff; }
html.theme-nordic .calib-entry { border: 0; background: #E3EBDC; }
html.theme-nordic .feel-btns button { border: 0; }
html.theme-nordic .feel-btns button[data-feel="warm"] { background: #F8EFCF; }
html.theme-nordic .feel-btns button[data-feel="match"] { background: #E3EBDC; }
html.theme-nordic .feel-btns button[data-feel="cool"] { background: #E1E9F2; }
html.theme-nordic .feel-btns button[aria-pressed="true"] { box-shadow: inset 0 0 0 2px #3F6F5E; }
html.theme-nordic .gauge, html.theme-nordic .slot-detail, html.theme-nordic .year-card { border: 0; background: #F4F5F7; }
html.theme-nordic .chip { background: rgba(63,111,94,.12); }
html.theme-nordic .hero .chip { background: rgba(255,255,255,.65); }
html.theme-nordic .btn { border-color: transparent; background: #F1F2F4; }
html.theme-nordic .btn.primary { background: #3F6F5E; }

/* 3 岁时水彩：纸纹、晕染边、衬线标题、手账式下划线 Tab */
html.theme-watercolor body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 2; opacity: .55;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .42  0 0 0 0 .36  0 0 0 0 .28  0 0 0 .085 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>"); }
html.theme-watercolor .skyband { filter: url(#wc-edge) blur(10px); opacity: .95; }
html.theme-watercolor .tabs { background: transparent; border: 0; border-bottom: 1px solid var(--hair); border-radius: 0; box-shadow: none; padding: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
html.theme-watercolor .tabs button { border-radius: 0; font-family: var(--font-head); font-size: 15px; padding: 10px 6px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
html.theme-watercolor .tabs button[aria-selected="true"] { background: transparent; color: var(--ink); border-bottom-color: var(--accent); }
html.theme-watercolor .styles button[aria-checked="true"] { background: transparent; color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
html.theme-watercolor .card-t { font-size: 17px; letter-spacing: .02em; }
html.theme-watercolor .card-h { border-bottom: 1px solid var(--hair); padding-bottom: 8px; }
html.theme-watercolor .hero-name { font-size: 22px; letter-spacing: .04em; }
html.theme-watercolor .hero-temp { letter-spacing: -0.06em; }
html.theme-watercolor .calib-entry { background: rgba(166,90,53,.05); }
html.theme-watercolor .micro dd { font-family: var(--font-num); font-weight: 400; }

/* 4 精密观测台：点阵底、顶部动态光带、等宽读数、刻度 */
html.theme-instrument body { background:
  radial-gradient(rgba(255,255,255,.045) 1px, transparent 1.2px) 0 0 / 22px 22px,
  linear-gradient(180deg, var(--bg-top), var(--bg-bottom)) fixed; }
html.theme-instrument .skyband { z-index: 31; }
html.theme-instrument .hero-date, html.theme-instrument .card-sub, html.theme-instrument .hero-lead { font-family: var(--font-num); font-size: 12px; }
html.theme-instrument .hero-name { font-size: 18px; }
html.theme-instrument .micro { border-color: var(--hair); }
html.theme-instrument .micro > div { position: relative; padding-bottom: 16px; }
html.theme-instrument .micro > div::after { content: ""; position: absolute; left: 12px; right: 6px; bottom: 6px; height: 5px;
  background: repeating-linear-gradient(90deg, var(--ink-3) 0 1px, transparent 1px 8px); opacity: .55; }
html.theme-instrument .micro > div:first-child::after { left: 0; }
html.theme-instrument .tabs, html.theme-instrument .styles { border-radius: 10px; }
html.theme-instrument .tabs button, html.theme-instrument .styles button { border-radius: 7px; font-family: var(--font-num); font-size: 13px; }
html.theme-instrument .tabs button[aria-selected="true"], html.theme-instrument .styles button[aria-checked="true"] { background: var(--accent); color: var(--accent-ink); }
html.theme-instrument .calib-entry { border-style: solid; border-color: var(--hair); background: var(--surface); }
html.theme-instrument .gauge dd { color: var(--accent); }
html.theme-instrument .chip { background: rgba(255,255,255,.06); color: var(--ink-2); font-family: var(--font-num); }
html.theme-instrument .hero .chip { color: var(--now); background: rgba(255,181,71,.12); }
@media (max-width: 899px) {
  html.theme-watercolor .tabs { background: var(--tab-bg); border: 1px solid var(--hair); border-radius: 6px; padding: 4px; box-shadow: 0 6px 24px rgba(60, 50, 40, 0.10); }
  html.theme-watercolor .tabs button { border-bottom: 0; margin: 0; border-radius: 4px; font-size: 13px; }
  html.theme-watercolor .tabs button[aria-selected="true"] { background: rgba(166, 90, 53, 0.10); color: var(--accent); }
}
/* 水彩：顶栏不遮住水彩晕 */
html.theme-watercolor .topbar { background: linear-gradient(180deg, rgba(250, 248, 245, 0.62), rgba(250, 248, 245, 0)); -webkit-backdrop-filter: none; backdrop-filter: none; }
html.theme-watercolor .skyband { opacity: 1; height: 400px; }
html.theme-watercolor[data-sky="rain"] { --glow: #A9BBE6; --glow-2: #C6D2EF; }
html.theme-watercolor[data-sky="sun"]  { --glow: #F2BE90; --glow-2: #F6D4A8; }
/* 平板竖屏（600–899）：单栏卡片流居中收窄，不拉满整屏 */
@media (min-width: 600px) and (max-width: 899px) {
  .wrap, .topbar-in, .foot { max-width: 620px; }
  .tabs { left: 50%; right: auto; width: min(596px, calc(100vw - 24px)); transform: translateX(-50%); }
}

/* 嵌入对比页时：隐藏风格切换条与提示 */
html.embed .styles, html.embed .toast { display: none; }

/* ═══════════ v0.31：标记、生活指数、今年、十年段 ═══════════ */
html.no-styles .styles { display: none; }
.flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.flag { display: inline-flex; gap: 6px; align-items: baseline; padding: 4px 10px; border-radius: var(--radius-pill); font-size: 12px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--hair); }
.flag b { font-weight: 600; color: var(--ink); }
html.theme-nordic .hero .flag { background: rgba(255,255,255,.6); border-color: transparent; }
.life-g { display: grid; grid-template-columns: 5.2em 1fr; gap: 8px; align-items: start; padding: 8px 0; border-top: 1px solid var(--hair); }
.life-g:first-of-type { border-top: 0; padding-top: 0; }
.life-k { font-size: 13px; color: var(--ink-3); padding-top: 4px; }
.lchips { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; }
.lchip { display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 12px; border-radius: var(--radius-pill); font-size: 14px; }
.lchip small { font-size: 12px; color: var(--ink-3); }
.lchip.yes { background: color-mix(in srgb, var(--like) 22%, transparent); }
.lchip.slow { background: color-mix(in srgb, var(--dislike) 22%, transparent); }
html.theme-watercolor .lchip { border-radius: 3px; }
.acts { margin: 0; padding-left: 1.1em; font-size: 14px; color: var(--ink-2); }
.acts li { line-height: 1.7; }
.life-flags { margin-top: 8px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--hair); }
.life-flags p { font-size: 14px; color: var(--ink-2); line-height: 1.7; }
.life-flags p + p { margin-top: 6px; }
.rflag { display: block; margin-top: 3px; font-size: 12px; color: var(--ink-3); }
.yr-sum { font-size: 15px; margin: 4px 0 8px; }
.mrow { grid-template-columns: 3.4em 2.2em 7.2em 1fr; }
.mbar { display: grid; gap: 4px; min-width: 0; }
.mbar small { font-size: 12px; color: var(--ink-3); font-family: var(--font-num); }
.themes { display: grid; gap: 10px; margin-top: 14px; }
.theme { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--hair); }
.theme b { font-weight: 600; margin-right: 8px; }
.theme .num { font-size: 13px; color: var(--ink-3); }
.theme p { font-size: 14px; color: var(--ink-2); margin-top: 4px; }
.dec-head { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-bottom: 8px; }
.dec-head b { font-family: var(--font-head); font-size: 17px; font-weight: var(--head-weight); }
.dec-focus { font-size: 15px; line-height: 1.75; margin-bottom: 6px; }
.dec-next { margin: 10px 0 6px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--hair); }
.dec-next p { font-size: 14px; color: var(--ink-2); line-height: 1.7; }
html.theme-nordic .dec-next, html.theme-nordic .theme, html.theme-nordic .life-flags { border: 0; background: #F4F5F7; }
.swap { font-size: 14px; color: var(--ink-2); margin-top: 6px; }
.ev-detail { font-size: 13px; margin-top: 2px; }
.beta { margin-top: 4px; }
@media (max-width: 420px) {
  .mrow { grid-template-columns: 3em 2em 5.2em 1fr; }
  .life-g { grid-template-columns: 4.6em 1fr; }
}
