/* 布局：一列手机优先，天空是会随太阳高度变化的活背景，内容是叠在上面的深色毛玻璃卡片 */
:root {
  /* 天空（由 JS 根据太阳高度角实时改写） */
  --sky-top: #0B1230;
  --sky-bot: #1B2550;
  --glow: rgba(255, 196, 120, 0);
  --glow-y: 60%;

  /* 墨色：白字压在天空上，单一视觉世界，不分明暗主题 */
  --ink: #FFFFFF;
  --ink-2: rgba(255, 255, 255, 0.84);
  --ink-3: rgba(255, 255, 255, 0.70);
  --hair: rgba(255, 255, 255, 0.16);
  --glass: rgba(8, 18, 44, 0.34);
  --glass-hi: rgba(255, 255, 255, 0.10);
  --sheet: #121A36;
  --field: rgba(255, 255, 255, 0.10);

  /* 状态色：亮度也拉开，色弱也能分辨 */
  --c-night: #9AA8FF;
  --c-red: #FF9A5C;
  --c-mild: #FFD86B;
  --c-vitd: #4FE3AE;
  --c-strong: #FF6B86;
  --sun: #FFC857;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-round: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", system-ui, sans-serif;

  --r-card: 22px;
  --r-ctl: 14px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--sky-top);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--sun); outline-offset: 2px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* —— 天空 —— */
.sky {
  position: fixed; inset: 0; z-index: 0;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bot) 100%);
  transition: background 0.6s linear;
}
.sky-glow {
  position: absolute; left: 50%; top: var(--glow-y);
  width: 140vmax; height: 140vmax; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, var(--glow), transparent 70%);
  transition: top 0.4s var(--ease);
}
.stars { position: absolute; inset: 0; opacity: 0; transition: opacity 0.6s linear; }
.star {
  position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff;
  animation: twinkle var(--d, 4s) ease-in-out var(--delay, 0s) infinite;
}
@keyframes twinkle { 0%, 100% { opacity: .25 } 50% { opacity: 1 } }

/* —— 外框 —— */
.app {
  position: relative; z-index: 1;
  max-width: 520px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 8px calc(96px + env(safe-area-inset-bottom, 0px));
}
.view { display: flex; flex-direction: column; gap: 14px; }
.view.enter > * { animation: rise .55s var(--ease) both; }
.view.enter > *:nth-child(2) { animation-delay: .05s }
.view.enter > *:nth-child(3) { animation-delay: .1s }
.view.enter > *:nth-child(4) { animation-delay: .15s }
.view.enter > *:nth-child(5) { animation-delay: .2s }
.view.enter > *:nth-child(n+6) { animation-delay: .25s }
@keyframes rise { from { transform: translateY(14px) } to { transform: none } }

.card {
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  border: 0.5px solid var(--hair);
  border-radius: var(--r-card);
  padding: 16px;
}
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.card-head h2, .calc h3, .season h3 {
  margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .06em; color: var(--ink-3);
}
.hint { font-size: 12px; color: var(--ink-3); }

/* —— 顶栏 —— */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-block: 10px 4px;
}
.loc-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 6px 0 2px;
  background: none; border: 0; font-size: 17px; font-weight: 600; min-width: 0;
}
.loc-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 52vw; }
.loc-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; flex: none; }
.loc-btn .chev { width: 16px; opacity: .7; }
.pill-btn {
  min-height: 36px; padding: 0 14px; border-radius: 999px; border: 0.5px solid var(--hair);
  background: var(--glass-hi); font-size: 13px; color: var(--ink-2); white-space: nowrap;
  transition: transform .2s var(--spring), background .2s;
}
.pill-btn:active, .loc-btn:active { transform: scale(.96); }

/* —— 主结论 —— */
.hero { display: flex; flex-direction: column; gap: 10px; padding: 10px 2px 6px; }
.time-row { display: flex; align-items: center; gap: 10px; min-height: 30px; }
.time-label { font-size: 15px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.now-btn {
  border: 0; border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600;
  background: var(--ink); color: #14204A; animation: pop .35s var(--spring);
}
@keyframes pop { from { transform: scale(.6); opacity: 0 } to { transform: none; opacity: 1 } }

.badge {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--state, var(--c-mild)) 22%, transparent);
  border: 0.5px solid color-mix(in srgb, var(--state, var(--c-mild)) 55%, transparent);
  font-size: 14px; font-weight: 600; color: var(--ink);
  transition: background .4s, border-color .4s;
}
.glyph { width: 22px; height: 22px; display: inline-grid; place-items: center; color: var(--state, var(--c-mild)); }
.glyph svg { width: 22px; height: 22px; overflow: visible; }
.glyph .rays { transform-origin: 12px 12px; animation: spin 24s linear infinite; }
@keyframes spin { to { transform: rotate(360deg) } }

.headline {
  margin: 2px 0 0; font-family: var(--font-round);
  font-size: clamp(34px, 10vw, 44px); line-height: 1.1; font-weight: 700; letter-spacing: -0.01em;
  text-wrap: balance; text-shadow: 0 1px 18px rgba(0, 10, 40, .25);
}
.advice { margin: 0; font-size: 16px; line-height: 1.6; color: var(--ink-2); max-width: 34em; text-wrap: pretty; }

.dose { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.dose-num {
  font-family: var(--font-round); font-weight: 700; font-size: 54px; line-height: 1;
  font-variant-numeric: tabular-nums; color: var(--state, var(--ink)); letter-spacing: -0.02em;
  transition: color .4s;
}
.dose-num small { font-size: 17px; font-weight: 600; margin-left: 4px; color: var(--ink-2); letter-spacing: 0; }
.dose-cap { font-size: 13px; color: var(--ink-3); padding-bottom: 6px; }

.aqi-warn {
  font-size: 13px; line-height: 1.5; padding: 10px 12px; border-radius: var(--r-ctl);
  background: rgba(255, 107, 134, .16); border: 0.5px solid rgba(255, 107, 134, .5);
}

.chips { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px 0 8px;
  border-radius: 999px; border: 0.5px solid var(--hair); background: var(--glass);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  font-size: 13px; text-decoration: none; color: var(--ink);
  transition: transform .2s var(--spring), opacity .3s;
}
.chip:active { transform: scale(.95); }
.chip .mark {
  width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; font-weight: 800; color: #0B1230;
}
.chip[data-ok="true"] .mark { background: var(--c-vitd); }
.chip[data-ok="some"] .mark { background: var(--c-mild); }
.chip[data-ok="false"] { color: var(--ink-3); }
.chip[data-ok="false"] .mark { background: rgba(255, 255, 255, .22); color: var(--ink); }
.chip .note { color: var(--ink-3); font-size: 12px; }
.chip.risk .mark { background: var(--risk); }

/* —— 肤色引导 —— */
.onboard { display: flex; flex-direction: column; gap: 10px; }
.onboard-q { margin: 0; font-size: 15px; font-weight: 600; }

.seg { display: flex; gap: 4px; padding: 3px; border-radius: 12px; background: var(--field); flex-wrap: wrap; }
.seg button {
  flex: 1 1 0; min-width: 64px; min-height: 36px; border: 0; border-radius: 9px; background: transparent;
  font-size: 14px; color: var(--ink-2); transition: background .25s var(--ease), color .25s;
}
.seg button[aria-pressed="true"] { background: rgba(255, 255, 255, .92); color: #14204A; font-weight: 600; box-shadow: 0 2px 8px rgba(0,0,0,.18); }

/* —— 太阳轨迹 —— */
.arc-wrap { margin: 0 -6px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
#arc { display: block; width: 100%; height: auto; overflow: visible; cursor: grab; }
#arc.dragging { cursor: grabbing; }
#arc .sun-dot { transition: r .25s var(--spring); }
#arc.dragging .sun-dot { r: 12; }
#arc .sun-halo { animation: breathe 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes breathe { 0%, 100% { opacity: .55; transform: scale(1) } 50% { opacity: .9; transform: scale(1.18) } }
.arc-foot { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; text-align: center; }
.arc-foot > div { display: flex; flex-direction: column; gap: 2px; }
.arc-foot .k { font-size: 12px; color: var(--ink-3); }
.arc-foot .v { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* —— 时间线 —— */
.tl-bar { position: relative; height: 12px; border-radius: 6px; overflow: hidden; background: rgba(255,255,255,.08); }
.tl-bar .seg-c { position: absolute; top: 0; bottom: 0; }
.tl-bar .now { position: absolute; top: -2px; bottom: -2px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.25); transition: left .3s var(--ease); }
.tl-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; }
.tl-list li + li { border-top: 0.5px solid var(--hair); }
.tl-item {
  width: 100%; display: grid; grid-template-columns: 12px auto 1fr auto; align-items: center; gap: 10px;
  min-height: 48px; padding: 6px 2px; border: 0; background: none; text-align: left;
  transition: background .2s;
}
.tl-item:active { background: rgba(255,255,255,.06); }
.tl-item .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.tl-item .when { font-variant-numeric: tabular-nums; font-size: 15px; font-weight: 600; }
.tl-item .what { font-size: 14px; color: var(--ink-2); min-width: 0; }
.tl-item .act { font-size: 13px; color: var(--c); font-weight: 600; }
.tl-item[aria-current="true"] .when::after { content: " · 此刻"; color: var(--ink-3); font-weight: 400; font-size: 12px; }

/* —— 数据格 —— */
.metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.metric { display: flex; flex-direction: column; gap: 4px; min-height: 112px; }
.mk { font-size: 12px; color: var(--ink-3); letter-spacing: .04em; }
.mv { font-family: var(--font-round); font-size: 30px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.mv small { font-size: 15px; font-weight: 600; margin-left: 3px; color: var(--ink-2); }
.ms { font-size: 12px; color: var(--ink-3); line-height: 1.4; }
.shadow-viz { width: 100%; height: 40px; margin-top: auto; overflow: visible; }

.source { margin: 4px 2px 0; font-size: 12px; color: var(--ink-3); line-height: 1.6; }

/* —— 指南 —— */
.guide-hero { padding: 14px 2px 4px; display: flex; flex-direction: column; gap: 12px; }
.eyebrow { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .14em; color: var(--sun); }
.guide-title { margin: 0; font-family: var(--font-round); font-size: clamp(26px, 7.4vw, 32px); line-height: 1.25; font-weight: 700; text-wrap: balance; }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.trio-item {
  display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 16px;
  background: color-mix(in srgb, var(--c) 16%, var(--glass)); border: 0.5px solid color-mix(in srgb, var(--c) 45%, transparent);
}
.trio-item b { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.trio-item span { font-family: var(--font-round); font-size: 24px; font-weight: 700; color: var(--c); }
.trio-item small { font-size: 12px; color: var(--ink-2); line-height: 1.4; }

.guide-nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  display: flex; gap: 6px; padding: 8px 16px 14px; margin: 0 -16px; overflow-x: auto; scrollbar-width: none;
  background: linear-gradient(var(--sky-top) 70%, transparent);
}
.guide-nav::-webkit-scrollbar { display: none; }
.guide-nav a {
  flex: none; min-height: 36px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px;
  background: var(--glass); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border: 0.5px solid var(--hair); font-size: 14px; text-decoration: none;
}
.g-sec { display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 64px; padding-top: 8px; }
.g-h { margin: 0; font-size: 22px; font-weight: 700; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.g-h small { font-size: 13px; font-weight: 400; color: var(--ink-3); }
.mech-list { display: flex; flex-direction: column; gap: 10px; }

.mech { padding: 0; overflow: hidden; scroll-margin-top: 64px; }
.mech.flash { animation: flash 1.4s var(--ease); }
@keyframes flash { 0%, 100% { box-shadow: 0 0 0 0 transparent } 30% { box-shadow: 0 0 0 3px var(--sun) } }
.mech-head {
  width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: start;
  padding: 16px; border: 0; background: none; text-align: left;
}
.mech-title { font-size: 17px; font-weight: 700; line-height: 1.35; }
.mech-tags { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 11.5px; padding: 3px 8px; border-radius: 6px; background: var(--field); color: var(--ink-2); }
.tag.ev { font-weight: 700; }
.tag.ev[data-ev="强"] { background: rgba(79, 227, 174, .2); color: #8FF2CC; }
.tag.ev[data-ev="中"] { background: rgba(255, 216, 107, .18); color: #FFE39A; }
.tag.ev[data-ev="初步"] { background: rgba(154, 168, 255, .2); color: #C3CBFF; }
.mech-lead { grid-column: 1 / -1; font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.mech-tog { width: 28px; height: 28px; border-radius: 50%; background: var(--field); display: grid; place-items: center; transition: transform .35s var(--spring); }
.mech-tog svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.2; }
.mech[data-open="true"] .mech-tog { transform: rotate(180deg); }
.mech-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.mech[data-open="true"] .mech-body { grid-template-rows: 1fr; }
.mech-inner { overflow: hidden; min-height: 0; }
.mech-pad { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 14px; }

.chain { list-style: none; margin: 0; padding: 0; position: relative; }
.chain::before {
  content: ""; position: absolute; left: 11px; top: 12px; bottom: 12px; width: 2px;
  background: linear-gradient(var(--mc, var(--sun)), color-mix(in srgb, var(--mc, var(--sun)) 20%, transparent));
  transform-origin: top; transform: scaleY(0); transition: transform .9s var(--ease) .1s;
}
.mech[data-open="true"] .chain::before { transform: scaleY(1); }
.chain li {
  position: relative; display: grid; grid-template-columns: 24px 1fr; gap: 12px; padding: 6px 0;
  opacity: 0; transform: translateX(-6px); transition: opacity .4s var(--ease), transform .4s var(--ease);
  transition-delay: calc(var(--i) * 90ms + 120ms);
}
.mech[data-open="true"] .chain li { opacity: 1; transform: none; }
.chain .node {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; z-index: 1;
  background: var(--sheet); border: 2px solid var(--mc, var(--sun)); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.chain b { display: block; font-size: 15px; line-height: 1.4; }
.chain p { margin: 2px 0 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.6; }

.facts { display: grid; gap: 8px; }
.fact { padding: 12px; border-radius: 14px; background: var(--field); }
.fact b { display: block; font-size: 13px; color: var(--mc, var(--sun)); margin-bottom: 2px; }
.fact p { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--ink-2); }
.mech-refs { font-size: 12px; color: var(--ink-3); line-height: 1.6; }
.mech-refs a { color: var(--ink-2); }

.how-table-wrap { overflow-x: auto; padding: 6px 4px; }
.how-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 320px; }
.how-table th { text-align: left; font-size: 12px; color: var(--ink-3); font-weight: 600; padding: 8px 6px; }
.how-table td { padding: 10px 6px; border-top: 0.5px solid var(--hair); vertical-align: top; line-height: 1.5; }
.how-table td:first-child { font-weight: 600; white-space: nowrap; }
.how-table .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--c); }

.calc { display: flex; flex-direction: column; gap: 14px; }
.calc-row { display: flex; flex-direction: column; gap: 8px; }
.calc-k { font-size: 13px; color: var(--ink-2); }
.calc-k b { font-variant-numeric: tabular-nums; color: var(--ink); margin-left: 4px; }
input[type="range"] { width: 100%; accent-color: var(--sun); height: 28px; }
.link-btn { align-self: flex-start; background: none; border: 0; padding: 6px 0; color: var(--sun); font-size: 14px; font-weight: 600; min-height: 36px; }
.calc-out { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.calc-out > div { display: flex; flex-direction: column; gap: 2px; padding: 12px 10px; border-radius: 14px; background: var(--field); }
.co-k { font-size: 12px; color: var(--ink-3); }
.co-v { font-family: var(--font-round); font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; white-space: nowrap; }
.co-v small { font-size: 12px; font-weight: 600; margin-left: 2px; color: var(--ink-2); }
.co-s { font-size: 11.5px; color: var(--ink-3); }
.calc-note { margin: 0; font-size: 12.5px; color: var(--ink-3); line-height: 1.6; }

.season-sub { margin: 6px 0 4px; font-size: 14px; color: var(--ink-2); line-height: 1.6; }
#seasonChart { width: 100%; height: auto; display: block; }

.rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rules li { padding: 12px 14px; border-radius: 16px; background: var(--glass); border: 0.5px solid var(--hair); font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.rules b { display: block; color: var(--ink); font-size: 15px; }

.factors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.factor { display: flex; flex-direction: column; gap: 4px; padding: 14px; }
.factor .fn { font-size: 13px; color: var(--ink-3); }
.factor .fv { font-family: var(--font-round); font-size: 22px; font-weight: 700; }
.factor[data-dir="up"] .fv { color: var(--c-strong); }
.factor[data-dir="mid"] .fv { color: var(--c-mild); }
.factor[data-dir="down"] .fv { color: var(--c-vitd); }
.factor .fnote { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }

.refs { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 12.5px; color: var(--ink-3); line-height: 1.55; }
.refs a { color: var(--ink-2); word-break: break-word; }
.disclaimer { font-size: 12px; color: var(--ink-3); line-height: 1.6; margin: 8px 0 0; }

/* —— 底部标签栏 —— */
.tabbar {
  position: fixed; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  z-index: 20; display: flex; gap: 4px; padding: 5px; border-radius: 999px;
  background: rgba(14, 22, 50, .55); -webkit-backdrop-filter: blur(28px) saturate(180%); backdrop-filter: blur(28px) saturate(180%);
  border: 0.5px solid var(--hair); box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
}
.tab {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 6px; min-height: 44px; min-width: 104px;
  justify-content: center; padding: 0 18px; border-radius: 999px; text-decoration: none; font-size: 14px; font-weight: 600;
  color: var(--ink-3); transition: color .3s;
}
.tab svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab[aria-current="page"] { color: #14204A; }
.tab-ind {
  position: absolute; top: 5px; bottom: 5px; left: 5px; width: 104px; border-radius: 999px; background: rgba(255, 255, 255, .92);
  transition: transform .45s var(--spring);
}

/* —— 底部弹层 —— */
.sheet {
  width: min(520px, 100%); max-width: 100%; max-height: 82vh; margin: auto auto 0; padding: 8px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  border: 0; border-radius: 26px 26px 0 0; background: var(--sheet); color: var(--ink);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .4); overflow-y: auto;
}
.sheet[open] { animation: sheetUp .42s var(--ease); }
@keyframes sheetUp { from { transform: translateY(100%) } to { transform: none } }
.sheet::backdrop { background: rgba(3, 6, 20, .5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.sheet-grab { width: 38px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.25); margin: 0 auto 8px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.sheet-head h2 { margin: 0; font-size: 18px; }
.sheet-close { background: none; border: 0; color: var(--sun); font-weight: 600; font-size: 16px; min-height: 44px; padding: 0 4px; }
.sheet-sub { margin: 0 0 12px; font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.search input {
  width: 100%; min-height: 42px; border-radius: 12px; border: 0; padding: 0 14px; background: var(--field); font-size: 16px;
}
.row-btn {
  width: 100%; display: flex; align-items: center; gap: 10px; min-height: 50px; margin-top: 10px; padding: 0 12px;
  border: 0; border-radius: 14px; background: var(--field); text-align: left; font-size: 15px;
}
.row-btn svg { width: 18px; height: 18px; fill: none; stroke: var(--sun); stroke-width: 2; stroke-linejoin: round; flex: none; }
.row-btn small { margin-left: auto; font-size: 12px; color: var(--ink-3); text-align: right; }
.city-list { list-style: none; margin: 10px 0 0; padding: 0; }
.city-list li + li { border-top: 0.5px solid var(--hair); }
.city-list button {
  width: 100%; min-height: 50px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  border: 0; background: none; padding: 8px 4px; text-align: left; font-size: 16px;
}
.city-list small { font-size: 12px; color: var(--ink-3); text-align: right; }
.city-list .grp { font-size: 12px; color: var(--ink-3); padding: 14px 4px 4px; }
.skin-list { display: grid; gap: 10px; }
.skin-opt {
  display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: center; padding: 14px; border-radius: 16px;
  background: var(--field); border: 1.5px solid transparent; text-align: left; transition: border-color .2s, transform .2s var(--spring);
}
.skin-opt:active { transform: scale(.98); }
.skin-opt[aria-pressed="true"] { border-color: var(--sun); }
.skin-opt .sw { width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); }
.skin-opt b { display: block; font-size: 16px; }
.skin-opt span { font-size: 13px; color: var(--ink-2); }
.skin-opt em { font-style: normal; font-size: 12px; color: var(--ink-3); }

@media (min-width: 700px) {
  .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .chain li { transition-delay: 0s !important; }
}
