/* ==========================================================================
   CloudSea Oracle — visual system
   Dark mountain-dawn theme, glass panels, mobile-first responsive.
   ========================================================================== */

:root {
  --ink: #eef5ff;
  --ink-soft: #c9d8ee;
  --muted: #9aafca;
  --muted-2: #7086a4;
  --line: rgba(152, 181, 224, 0.14);
  --line-strong: rgba(164, 193, 236, 0.24);
  --panel: rgba(17, 27, 47, 0.72);
  --panel-strong: rgba(19, 31, 53, 0.9);
  --gold: #ffbd73;
  --gold-2: #ff8b5e;
  --gold-soft: rgba(255, 180, 100, 0.14);
  --cyan: #6ee3ff;
  --mint: #7fe3c0;
  --rose: #ff8b9a;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.38);
  --radius: 24px;
  --radius-sm: 16px;
  --max: 1180px;
  --font: "Segoe UI Variable Display", "Segoe UI", "PingFang SC", "Microsoft YaHei UI",
    "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans SC", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #060a12;
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }

::selection { background: rgba(255, 180, 100, 0.28); color: #fff; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ------------------------------- ambience ------------------------------- */

.ambient {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(1100px 760px at 82% -12%, rgba(255, 148, 86, 0.13), transparent 62%),
    radial-gradient(900px 680px at -8% 8%, rgba(67, 126, 216, 0.12), transparent 58%),
    linear-gradient(180deg, #070b15 0%, #08101e 42%, #05080f 100%);
}

.ambient::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.2px 1.2px at 36px 64px, rgba(235, 245, 255, 0.7), transparent 100%),
    radial-gradient(1px 1px at 180px 150px, rgba(235, 245, 255, 0.5), transparent 100%),
    radial-gradient(1.4px 1.4px at 290px 40px, rgba(235, 245, 255, 0.45), transparent 100%),
    radial-gradient(1px 1px at 120px 240px, rgba(235, 245, 255, 0.35), transparent 100%),
    radial-gradient(1px 1px at 320px 210px, rgba(235, 245, 255, 0.4), transparent 100%);
  background-size: 360px 300px;
  opacity: 0.35;
  mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
}

.ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 55% at 50% 40%, transparent 55%, rgba(0, 0, 0, 0.32));
}

/* ------------------------------- layout ------------------------------- */

.topbar {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 26px 28px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

.brand-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.brand-text h1 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
}

.brand-text p {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 11.5px;
  letter-spacing: 0.14em;
}

.topbar-actions { display: flex; align-items: center; gap: 10px; }

.layout {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.layout > *,
.grid-2 > * { min-width: 0; }

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: 20px;
}

.forecast-grid { align-items: start; }

.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(155deg, rgba(23, 36, 61, 0.78), rgba(10, 17, 31, 0.9));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

@supports not (backdrop-filter: blur(2px)) {
  .card { background: #111c30; }
}

.panel { padding: 24px 26px; }

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

.card-head h2 {
  font-size: 16.5px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

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

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 180, 100, 0.24);
  background: rgba(255, 180, 100, 0.09);
  color: #ffd29b;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.pill.subtle {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-weight: 500;
}

/* ------------------------------- buttons ------------------------------- */

.icon-btn {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink-soft);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.icon-btn:hover { background: rgba(255, 255, 255, 0.075); border-color: var(--line-strong); }
.icon-btn:active { transform: scale(0.96); }
.icon-btn.is-spinning .icon { animation: spin 0.9s linear infinite; }

.install-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  border-radius: 13px;
  border: 1px solid rgba(255, 190, 120, 0.3);
  background: linear-gradient(180deg, rgba(255, 180, 100, 0.16), rgba(255, 140, 80, 0.08));
  color: #ffd6a6;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.2s, background 0.2s;
}

.install-btn:hover { transform: translateY(-1px); background: rgba(255, 180, 100, 0.2); }

.ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink-soft);
  font-size: 12.5px;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.ghost-btn:hover { background: rgba(255, 255, 255, 0.07); border-color: var(--line-strong); }
.ghost-btn:active { transform: scale(0.98); }

.ghost-btn.primary-ghost {
  border-color: rgba(255, 190, 120, 0.2);
  color: #ffd2a0;
  background: rgba(255, 180, 100, 0.06);
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffd08a, #ff9b63);
  color: #26180b;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 26px rgba(255, 150, 80, 0.22);
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.primary-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(255, 150, 80, 0.3); }
.primary-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }
.primary-btn.wide { width: 100%; }

.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  padding: 5px 2px;
  white-space: nowrap;
  transition: color 0.2s;
}
.text-btn:hover { color: var(--gold); }

/* ------------------------------- hero ------------------------------- */

.hero {
  min-height: 520px;
  overflow: hidden;
  isolation: isolate;
}

.hero-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.95;
}

.hero-scene svg { width: 100%; height: 100%; display: block; }

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5, 9, 17, 0.92) 0%, rgba(5, 9, 17, 0.72) 38%, rgba(5, 9, 17, 0.16) 72%, rgba(5, 9, 17, 0.28) 100%),
    linear-gradient(0deg, rgba(5, 9, 17, 0.82) 0%, rgba(5, 9, 17, 0.12) 42%, transparent 70%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-width: 0;
  min-height: 520px;
  padding: 30px 34px 24px;
  display: flex;
  flex-direction: column;
}

.hero-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #d5e2f4;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(127, 227, 192, 0.12), 0 0 12px rgba(127, 227, 192, 0.7);
}

.review-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid rgba(255, 194, 125, 0.24);
  border-radius: 999px;
  background: rgba(255, 184, 96, 0.11);
  color: #ffd9a5;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: none;
  white-space: nowrap;
}
.review-badge[hidden] { display: none; }

.review-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
  padding: 12px 15px;
  border: 1px solid rgba(255, 194, 125, 0.16);
  border-radius: 16px;
  background:
    radial-gradient(450px 180px at 12% 0%, rgba(255, 182, 94, 0.12), transparent 70%),
    rgba(13, 25, 43, 0.72);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.review-banner[hidden] { display: none; }

.review-mark {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 194, 125, 0.2);
  border-radius: 12px;
  background: rgba(255, 184, 96, 0.10);
  color: #ffc87f;
}
.review-mark .icon { width: 18px; height: 18px; }

.review-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.review-kicker {
  color: #e7a45f;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.review-copy b {
  color: #eaf2fb;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.review-copy p {
  color: #8fa5ba;
  font-size: 10.5px;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.review-btn { flex: none; padding: 8px 13px; font-size: 11px; }
.review-btn:disabled { opacity: 0.55; cursor: wait; }

.place-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  padding: 2px 0;
  color: #f2f7ff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 8px;
  transition: color 0.2s;
}

.place-btn:hover { color: var(--gold); }
.place-btn .icon { color: var(--gold); width: 17px; height: 17px; }
.place-btn .chev { color: var(--muted-2); width: 15px; height: 15px; margin-left: 1px; }

.elev {
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.sunrise-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: none;
  padding: 8px 12px;
  border: 1px solid rgba(255, 190, 120, 0.18);
  border-radius: 11px;
  background: rgba(10, 16, 28, 0.48);
  color: #ffd7a4;
  font-size: 11.5px;
  backdrop-filter: blur(10px);
}

.sunrise-chip .icon { width: 15px; height: 15px; color: var(--gold); }
.sunrise-chip b { font-size: 13px; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }

.period-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  width: min(360px, 100%);
  margin-top: 18px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.period-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  text-align: left;
  color: var(--muted);
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.period-btn:hover { background: rgba(255, 255, 255, 0.05); }

.period-btn.is-active {
  border-color: rgba(255, 190, 120, 0.22);
  background: rgba(255, 180, 100, 0.11);
  color: #ffe1b8;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.period-icon {
  width: 27px;
  height: 27px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.period-btn.is-active .period-icon { background: rgba(255, 190, 120, 0.13); color: var(--gold); }
.period-icon.sunset { color: #ff9a6b; }
.period-icon .icon { width: 16px; height: 16px; }

.period-copy { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.period-copy b { font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.period-copy small {
  color: var(--muted-2);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.period-btn.is-active .period-copy small { color: #e2b37c; }

.period-switch + .hero-body { margin-top: 18px; }

.hero-body {
  display: flex;
  align-items: center;
  gap: 46px;
  margin: 26px 0 10px;
}

.prob-wrap { flex: none; display: flex; flex-direction: column; align-items: center; }

.ring {
  position: relative;
  width: 224px;
  height: 224px;
}

.ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  overflow: visible;
}

.ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.075);
  stroke-width: 9;
}

.ring-value {
  fill: none;
  stroke: url(#ringGrad);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 590.62;
  stroke-dashoffset: 590.62;
  filter: drop-shadow(0 0 9px rgba(255, 175, 95, 0.32));
  transition: stroke-dashoffset 1.15s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.4s;
}

.ring[data-tone="low"] .ring-value { stroke: url(#ringGradLow); filter: none; }

.ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.prob-number {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  line-height: 0.95;
  letter-spacing: -0.055em;
  font-variant-numeric: tabular-nums;
}

.prob-number span {
  font-size: 78px;
  font-weight: 700;
  background: linear-gradient(180deg, #ffffff 20%, #ffd7a4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.prob-number small {
  margin: 9px 0 0 3px;
  font-size: 21px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0;
}

.prob-caption {
  margin-top: 9px;
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.16em;
}

.prob-sub {
  margin-top: 9px;
  color: var(--muted-2);
  font-size: 10.5px;
  letter-spacing: 0.08em;
}

.verdict { flex: 1; min-width: 0; }

.verdict-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.verdict-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
}

.tone-great { color: #ffd39b; background: rgba(255, 170, 90, 0.14); border-color: rgba(255, 180, 100, 0.3); }
.tone-good { color: #b6f0d3; background: rgba(100, 220, 170, 0.11); border-color: rgba(110, 225, 180, 0.24); }
.tone-fair { color: #a9d8f5; background: rgba(100, 180, 240, 0.1); border-color: rgba(110, 190, 245, 0.22); }
.tone-low { color: #b6c6dc; background: rgba(150, 170, 195, 0.1); border-color: rgba(160, 180, 205, 0.2); }

.confidence-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11.5px;
}

.confidence-chip .icon { width: 14px; height: 14px; color: var(--muted-2); }

.verdict-text {
  max-width: 620px;
  margin: 14px 0 20px;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.8;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  max-width: 690px;
}

.quick-grid > div {
  padding: 10px 12px 9px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  background: rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(8px);
}

.quick-grid span {
  display: block;
  color: var(--muted-2);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.quick-grid b {
  display: block;
  margin-top: 3px;
  color: #f4f8ff;
  font-size: 14px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hero-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.075);
}

.data-note {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted-2);
  font-size: 10.5px;
  letter-spacing: 0.03em;
}

.data-note > span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-dot {
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px rgba(127, 227, 192, 0.8);
}

.demo-badge {
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(255, 180, 100, 0.14);
  color: var(--gold);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.hero-actions { display: flex; align-items: center; gap: 8px; flex: none; }

.hero-loading,
.hero-error {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  background: rgba(6, 10, 19, 0.74);
  backdrop-filter: blur(8px);
}

.hero-loading { color: var(--muted); font-size: 12px; letter-spacing: 0.06em; }

.spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--gold);
  animation: spin 0.9s linear infinite;
}

.hero-error {
  flex-direction: column;
  text-align: center;
  gap: 14px;
}

.hero-error .error-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 140, 110, 0.1);
  color: #ffb09a;
}

.hero-error b { font-size: 14px; }
.hero-error p { margin-top: 4px; color: var(--muted); font-size: 12px; max-width: 380px; }

/* ------------------------------- timeline ------------------------------- */

.timeline {
  position: relative;
  padding: 38px 0 4px;
}

.timeline-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
}

.hour-col {
  position: relative;
  z-index: 1;
  padding: 8px 3px 7px;
  border-radius: 13px;
  border: 1px solid transparent;
  text-align: center;
  transition: background 0.2s, border-color 0.2s;
}

.hour-col.is-core {
  background: linear-gradient(180deg, rgba(255, 180, 100, 0.085), rgba(255, 180, 100, 0.015));
  border-color: rgba(255, 180, 100, 0.12);
}

.hour-col:not(.is-core) { opacity: 0.52; }
.hour-col:not(.is-core):hover { opacity: 0.8; }

.hour-col.is-peak { border-color: rgba(255, 180, 100, 0.32); }

.hour-p {
  display: block;
  margin-bottom: 5px;
  color: #dbe8fa;
  font-size: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.hour-col.is-core .hour-p { color: #ffd29b; }

.bar-wrap {
  height: 108px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.bar-fill {
  width: 26px;
  max-width: 70%;
  min-height: 3px;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #9be9ff 0%, #4d9dca 100%);
  box-shadow: 0 0 16px rgba(90, 190, 230, 0.16);
  transition: height 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.hour-col.is-high .bar-fill {
  background: linear-gradient(180deg, #ffd79b 0%, #ff8b5e 100%);
  box-shadow: 0 0 22px rgba(255, 150, 80, 0.3);
}

.hour-label {
  display: block;
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.hour-col.is-core .hour-label { color: var(--muted); }

.sunrise-line {
  position: absolute;
  top: 30px;
  bottom: 26px;
  z-index: 0;
  width: 0;
  border-left: 1px dashed rgba(255, 190, 120, 0.42);
  pointer-events: none;
}

.sunrise-line span {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 190, 120, 0.22);
  background: rgba(10, 16, 28, 0.9);
  color: #ffd29b;
  font-size: 9.5px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.timeline-empty {
  grid-column: 1 / -1;
  padding: 28px 0;
  color: var(--muted-2);
  font-size: 12px;
  text-align: center;
}

.timeline-summary {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.028);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.timeline-summary .icon { width: 15px; height: 15px; color: var(--gold); margin-top: 2px; }
.timeline-summary b { color: var(--ink-soft); font-weight: 600; }

/* ------------------------------- phenomena ------------------------------- */

.phenomena { display: flex; flex-direction: column; gap: 12px; }

.phenom {
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.028);
}

.phenom-head { display: flex; align-items: center; gap: 11px; }

.phenom-icon {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(110, 227, 255, 0.09);
  color: var(--cyan);
}

.phenom-icon.rime { background: rgba(160, 215, 255, 0.1); color: #b9e4ff; }
.phenom-icon.sun { background: rgba(255, 190, 120, 0.1); color: var(--gold); }

.phenom-name { min-width: 0; }
.phenom-name b { display: block; font-size: 13px; font-weight: 600; }
.phenom-name small { display: block; margin-top: 1px; color: var(--muted-2); font-size: 10.5px; }

.phenom-value {
  margin-left: auto;
  color: #f2f8ff;
  font-size: 25px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.phenom-value span { margin-left: 1px; font-size: 12px; color: var(--muted-2); font-weight: 500; }

.phenom-bar {
  height: 5px;
  margin: 11px 0 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.07);
}

.phenom-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #5bc9e8, #9af0ff);
  transition: width 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.phenom.rime .phenom-bar i { background: linear-gradient(90deg, #7fb7e8, #c7ecff); }
.phenom.sun .phenom-bar i { background: linear-gradient(90deg, #ffab6a, #ffd79b); }

.phenom-detail { color: var(--muted-2); font-size: 11px; line-height: 1.55; }

/* ------------------------------- factors ------------------------------- */

.factors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 34px;
}

.factor { min-width: 0; }

.factor-head { display: flex; align-items: center; gap: 9px; }

.f-icon {
  width: 27px;
  height: 27px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
}

.factor[data-status="good"] .f-icon { background: rgba(110, 225, 180, 0.09); color: var(--mint); }
.factor[data-status="mid"] .f-icon { background: rgba(255, 190, 110, 0.09); color: var(--gold); }
.factor[data-status="bad"] .f-icon { background: rgba(255, 130, 145, 0.08); color: #ff9fae; }
.f-icon .icon { width: 15px; height: 15px; }

.f-name { font-size: 13px; font-weight: 600; }

.f-weight {
  margin-left: auto;
  color: var(--muted-2);
  font-size: 10px;
  letter-spacing: 0.03em;
}

.f-score {
  min-width: 48px;
  text-align: right;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.f-score small { color: var(--muted-2); font-size: 9.5px; font-weight: 500; }

.f-bar {
  height: 5px;
  margin: 9px 0 7px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.065);
}

.f-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #67d9b7, #a8f0d5);
  transition: width 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.factor[data-status="mid"] .f-bar i { background: linear-gradient(90deg, #e0a85a, #ffd79b); }
.factor[data-status="bad"] .f-bar i { background: linear-gradient(90deg, #a85e6b, #e08b98); }

.factor p {
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.6;
}

.risk-note {
  margin-top: 20px;
  padding: 11px 14px;
  border-radius: 11px;
  border: 1px solid rgba(255, 160, 100, 0.16);
  background: rgba(255, 150, 80, 0.055);
  color: #e6c39c;
  font-size: 11.5px;
  line-height: 1.65;
}

.risk-note b { color: #ffd29b; font-weight: 600; }

/* ------------------------------- forecast ------------------------------- */

.forecast { display: flex; flex-direction: column; gap: 4px; }

.day-row {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) 48px 72px 14px;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 13px;
  text-align: left;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.day-row:hover { background: rgba(255, 255, 255, 0.04); }
.day-row.is-active {
  background: rgba(255, 180, 100, 0.075);
  border-color: rgba(255, 180, 100, 0.18);
}
.day-row:active { transform: scale(0.995); }

.day-date b {
  display: block;
  font-size: 13px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.day-date span { display: block; margin-top: 1px; color: var(--muted-2); font-size: 10px; }

.day-meter {
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.day-meter i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4f91b8, #9ae8ff);
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.day-row.is-high .day-meter i { background: linear-gradient(90deg, #e59a52, #ffd79b); }

.day-p {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.day-p span { color: var(--muted-2); font-size: 9px; font-weight: 500; }

.day-tag {
  justify-self: end;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}

.day-tag.tone-great { color: #ffd39b; background: rgba(255, 170, 90, 0.1); border-color: rgba(255, 180, 100, 0.2); }
.day-tag.tone-good { color: #b6f0d3; background: rgba(100, 220, 170, 0.08); border-color: rgba(110, 225, 180, 0.18); }
.day-tag.tone-fair { color: #a9d8f5; background: rgba(100, 180, 240, 0.07); border-color: rgba(110, 190, 245, 0.16); }
.day-tag.tone-low { color: var(--muted-2); background: rgba(150, 170, 195, 0.06); border-color: rgba(160, 180, 205, 0.12); }

.day-chev { color: var(--muted-2); width: 14px; height: 14px; }
.day-row.is-active .day-chev { color: var(--gold); }

/* ------------------------------- models ------------------------------- */

.models { display: flex; flex-direction: column; gap: 17px; }

.model-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
}

.model-name b { display: block; font-size: 12.5px; font-weight: 650; letter-spacing: 0.03em; }
.model-name small { display: block; margin-top: 1px; color: var(--muted-2); font-size: 9.5px; }

.model-bar {
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.model-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4d94c4, #8ce4ff);
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.model-value {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.model-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 20px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.028);
}

.model-summary div { min-width: 0; }
.model-summary span { display: block; color: var(--muted-2); font-size: 9.5px; letter-spacing: 0.03em; }
.model-summary b { display: block; margin-top: 2px; color: var(--ink-soft); font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; }

.model-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.65;
}

.model-note .icon { width: 14px; height: 14px; margin-top: 1px; flex: none; }

/* ------------------------------- method ------------------------------- */

.method-card {
  border: 1px solid rgba(255, 180, 100, 0.15);
  border-radius: var(--radius);
  background:
    radial-gradient(600px 300px at 80% 0%, rgba(255, 160, 90, 0.07), transparent 65%),
    rgba(15, 24, 42, 0.7);
  padding: 28px 32px;
  animation: rise 0.35s ease both;
}

.method-inner { position: relative; max-width: 980px; margin: 0 auto; }
.method-inner h2 { font-size: 18px; font-weight: 650; margin-bottom: 20px; }

.close-method { position: absolute; top: -6px; right: -6px; width: 34px; height: 34px; border-radius: 10px; }

.method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 32px;
}

.method-grid b { display: block; margin-bottom: 5px; color: #ffd29b; font-size: 12px; letter-spacing: 0.02em; }
.method-grid p { color: var(--muted); font-size: 11.5px; line-height: 1.7; }

.method-disclaimer {
  margin-top: 22px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.7;
}

/* ------------------------------- footer ------------------------------- */

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 4px 0;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.6;
}

.footer-brand { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.footer-brand img { border-radius: 8px; }

/* ------------------------------- offline ------------------------------- */

.offline-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 190, 100, 0.16);
  background: rgba(255, 180, 100, 0.06);
  color: #e6c39c;
  font-size: 11.5px;
}

.offline-bar .icon { width: 15px; height: 15px; flex: none; }

/* ------------------------------- dialog ------------------------------- */

.sheet {
  width: min(560px, calc(100vw - 32px));
  max-height: min(90vh, 860px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  background: transparent;
  color: var(--ink);
  box-shadow: 0 40px 110px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.sheet::backdrop {
  background: rgba(3, 6, 12, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.sheet-form {
  max-height: inherit;
  overflow-y: auto;
  padding: 26px 26px calc(22px + env(safe-area-inset-bottom));
  background:
    radial-gradient(600px 280px at 100% 0%, rgba(255, 160, 90, 0.09), transparent 65%),
    linear-gradient(165deg, #111d32, #0a1220);
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.sheet-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.sheet-head h2 { font-size: 19px; font-weight: 650; line-height: 1.35; }
.sheet-head .icon-btn { width: 34px; height: 34px; border-radius: 10px; flex: none; }

.preset-tools {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0 -4px 10px;
  padding: 8px 4px 10px;
  background: linear-gradient(180deg, rgba(14, 24, 41, 0.99) 68%, rgba(14, 24, 41, 0.92));
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
}

.preset-search {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s;
}

.preset-search:focus-within { border-color: rgba(255, 180, 100, 0.42); }
.preset-search .icon { width: 16px; height: 16px; color: var(--muted-2); flex: none; }
.preset-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12.5px;
}
.preset-search input::placeholder { color: var(--muted-2); }
.preset-search input::-webkit-search-cancel-button { filter: invert(0.8); }

.province-tabs {
  display: flex;
  gap: 6px;
  margin-top: 9px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.province-tabs::-webkit-scrollbar { display: none; }

.province-tab {
  flex: none;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.province-tab small { margin-left: 4px; color: var(--muted-2); font-size: 9px; }
.province-tab:hover { border-color: var(--line-strong); }
.province-tab.is-active {
  border-color: rgba(255, 180, 100, 0.35);
  background: rgba(255, 180, 100, 0.1);
  color: var(--gold);
}

.province-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 14px 2px 7px;
}
.province-head:first-of-type { margin-top: 2px; }
.province-head b { font-size: 12px; font-weight: 650; letter-spacing: 0.08em; }
.province-head small { color: var(--muted-2); font-size: 9.5px; }

.preset-list { display: flex; flex-direction: column; gap: 7px; }

.preset {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 10px 11px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  text-align: left;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.preset:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.05); }
.preset:active { transform: scale(0.995); }
.preset.is-active { border-color: rgba(255, 180, 100, 0.32); background: rgba(255, 180, 100, 0.07); }

.preset-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }

.preset-title { display: flex; align-items: center; gap: 7px; min-width: 0; }
.preset-title b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 650;
}
.preset-hot {
  flex: none;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 180, 100, 0.13);
  color: var(--gold);
  font-size: 8.5px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.preset-sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}
.preset-note {
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted-2);
  font-size: 9.5px;
  line-height: 1.45;
}

.preset-elev {
  flex: none;
  margin-top: 1px;
  padding: 4px 7px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.preset-check {
  flex: none;
  width: 21px;
  height: 21px;
  margin-top: 2px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: transparent;
}

.preset.is-active .preset-check { background: var(--gold); border-color: var(--gold); color: #23170a; }
.preset-check .icon { width: 12px; height: 12px; stroke-width: 2.6; }

.preset-empty {
  padding: 28px 12px;
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.7;
  text-align: center;
}

.wide-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  margin-top: 14px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 550;
  transition: background 0.2s, border-color 0.2s;
}

.wide-btn:hover { background: rgba(255, 255, 255, 0.065); border-color: var(--line-strong); }

.custom-block {
  margin-top: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.custom-block summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 550;
  cursor: pointer;
  list-style: none;
}

.custom-block summary::-webkit-details-marker { display: none; }
.custom-block summary .icon { width: 15px; height: 15px; color: var(--muted-2); transition: transform 0.2s; }
.custom-block[open] summary .icon { transform: rotate(180deg); }

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 14px;
}

.field-grid label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--muted-2);
  font-size: 10px;
  letter-spacing: 0.03em;
}

.field-grid .span-2 { grid-column: 1 / -1; }

.field-grid input {
  height: 38px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.field-grid input:focus { outline: none; border-color: rgba(255, 180, 100, 0.5); }

.custom-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
}

.custom-actions .ghost-btn { height: 38px; font-size: 11.5px; }
.custom-actions .primary-btn { min-height: 38px; font-size: 11.5px; }

.hint {
  padding: 0 14px 12px;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.6;
}

.sheet-note {
  margin-top: 14px;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.65;
}

/* ------------------------------- feedback ------------------------------- */

.feedback-lede {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.feedback-lede b { color: var(--gold); }

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

.feedback-options button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 12px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
}

.feedback-options button:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.05); }
.feedback-options button.is-selected {
  border-color: rgba(255, 180, 100, 0.4);
  background: rgba(255, 180, 100, 0.08);
}

.feedback-options .icon { width: 19px; height: 19px; color: var(--gold); margin-bottom: 3px; }
.feedback-options span { font-size: 12px; font-weight: 600; }
.feedback-options small { color: var(--muted-2); font-size: 9.5px; }

.feedback-note {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
  color: var(--muted-2);
  font-size: 10px;
}

.feedback-note textarea {
  width: 100%;
  resize: vertical;
  min-height: 70px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.6;
}

.feedback-note textarea:focus { outline: none; border-color: rgba(255, 180, 100, 0.45); }
.feedback-sheet .primary-btn { margin-top: 14px; }

/* ------------------------------- install guide ------------------------------- */

.install-status {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 14px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.install-status .status-dot { margin-top: 4px; flex: none; }
.install-status.ok { border-color: rgba(127, 227, 192, 0.22); background: rgba(127, 227, 192, 0.06); color: #b6f0d3; }
.install-status.ok .status-dot { background: var(--mint); box-shadow: 0 0 8px rgba(127, 227, 192, 0.7); }
.install-status.warn { border-color: rgba(255, 190, 100, 0.22); background: rgba(255, 190, 100, 0.06); color: #e8c9a0; }
.install-status.warn .status-dot { background: var(--gold); box-shadow: 0 0 8px rgba(255, 190, 100, 0.6); }
.install-status.bad { border-color: rgba(255, 130, 145, 0.24); background: rgba(255, 130, 145, 0.06); color: #ffb3bd; }
.install-status.bad .status-dot { background: var(--rose); box-shadow: 0 0 8px rgba(255, 130, 145, 0.55); }

.install-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 15px;
}

.install-tab {
  padding: 8px 6px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.install-tab:hover { border-color: var(--line-strong); }
.install-tab.is-active {
  border-color: rgba(255, 180, 100, 0.35);
  background: rgba(255, 180, 100, 0.1);
  color: var(--gold);
}

.install-content h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
}

.install-content h3:not(:first-child) { margin-top: 18px; }

.install-steps {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.8;
}

.install-steps li { margin-bottom: 6px; }
.install-steps li::marker { color: var(--gold); font-weight: 600; }
.install-steps code,
.install-content p code {
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: #dceaff;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 10.5px;
  word-break: break-all;
}

.install-content p {
  margin: 8px 0;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.7;
}

.install-code {
  margin: 9px 0;
  padding: 10px 12px;
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.24);
  color: #dceaff;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.install-note {
  margin-top: 14px !important;
  padding-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.install-content a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------- toast ------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 200;
  max-width: min(440px, calc(100vw - 32px));
  padding: 11px 16px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(18, 29, 49, 0.96);
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.55;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translate(-50%, 14px);
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast[data-tone="warn"] { border-color: rgba(255, 180, 100, 0.3); color: #ffd7a7; }
.toast[data-tone="error"] { border-color: rgba(255, 130, 145, 0.3); color: #ffb3bd; }

/* ------------------------------- motion ------------------------------- */

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero { animation: rise 0.55s 0.02s ease both; }
.grid-2 > .panel:nth-child(1) { animation: rise 0.55s 0.08s ease both; }
.grid-2 > .panel:nth-child(2) { animation: rise 0.55s 0.12s ease both; }
.factors-panel { animation: rise 0.55s 0.16s ease both; }
.forecast-grid > .panel:nth-child(1) { animation: rise 0.55s 0.2s ease both; }
.forecast-grid > .panel:nth-child(2) { animation: rise 0.55s 0.24s ease both; }

/* ------------------------------- responsive ------------------------------- */

@media (max-width: 1080px) {
  .hero-body { gap: 30px; }
  .ring { width: 204px; height: 204px; }
  .prob-number span { font-size: 70px; }
  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .layout { padding: 0 22px 44px; }
  .topbar { padding: 22px 22px 16px; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .hero { min-height: 0; }
  .hero-inner { min-height: 0; }
  .hero-body { flex-direction: column; align-items: stretch; gap: 22px; margin-top: 22px; }
  .prob-wrap { flex-direction: row; justify-content: flex-start; gap: 18px; }
  .ring { width: 190px; height: 190px; }
  .prob-number span { font-size: 64px; }
  .prob-caption { margin-top: 6px; }
  .prob-sub { margin-top: 0; }
  .verdict-text { max-width: none; }
  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .factors { gap: 20px 26px; }
  .hero::after {
    background:
      linear-gradient(180deg, rgba(5, 9, 17, 0.45) 0%, rgba(5, 9, 17, 0.86) 46%, rgba(5, 9, 17, 0.94) 100%);
  }
}

@media (max-width: 760px) {
  .panel { padding: 20px 18px; }
  .card-head { gap: 12px; }
  .card-head p { max-width: 260px; }
  .factors { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .method-grid { grid-template-columns: minmax(0, 1fr); }
  .footer { flex-direction: column; align-items: flex-start; gap: 6px; }
  .hero-inner { padding: 24px 20px 20px; }
  .hero-foot { flex-wrap: wrap; }
  .data-note { flex: 1 1 100%; }
  .hero-actions { width: 100%; justify-content: flex-end; }
  .day-row { grid-template-columns: 60px minmax(0, 1fr) 44px 64px; gap: 10px; }
  .day-chev { display: none; }
  .timeline { padding-top: 34px; }
  .bar-fill { width: 22px; }
  .sunrise-line span { font-size: 9px; }
}

@media (max-width: 560px) {
  body { font-size: 14px; }
  .topbar { padding: 18px 16px 13px; gap: 10px; }
  .brand-icon { width: 40px; height: 40px; border-radius: 12px; }
  .brand-text h1 { font-size: 18px; }
  .brand-text p { font-size: 9.5px; letter-spacing: 0.1em; }
  .install-btn span { display: none; }
  .install-btn { width: 42px; padding: 0; justify-content: center; }
  .icon-btn { width: 40px; height: 40px; }
  .layout { padding: 0 14px 36px; gap: 14px; }
  .grid-2 { gap: 14px; }
  .card { border-radius: 20px; }
  .panel { padding: 18px 15px; }
  .card-head { margin-bottom: 16px; }
  .card-head h2 { font-size: 15px; }
  .card-head p { font-size: 10.5px; max-width: 210px; }
  .pill { font-size: 10px; padding: 4px 9px; }

  .hero-inner { padding: 20px 16px 16px; }
  .hero-scene { opacity: 0.8; }
  .hero::after {
    background:
      linear-gradient(180deg, rgba(5, 9, 17, 0.55) 0%, rgba(5, 9, 17, 0.9) 42%, rgba(5, 9, 17, 0.96) 100%);
  }
  .hero-head { align-items: flex-start; }
  .eyebrow { font-size: 10.5px; letter-spacing: 0.07em; }
  .place-btn { font-size: 13px; }
  .sunrise-chip { padding: 6px 9px; font-size: 10px; gap: 5px; }
  .sunrise-chip b { font-size: 12px; }
  .sunrise-chip .icon { width: 13px; height: 13px; }

  .review-banner {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 11px 12px;
    margin-bottom: 14px;
  }
  .review-mark { width: 34px; height: 34px; }
  .review-copy b { font-size: 12px; }
  .review-copy p { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .review-btn { padding: 8px 10px; font-size: 10.5px; }
  .period-switch { width: 100%; margin-top: 14px; }
  .period-btn { padding: 7px 8px; gap: 7px; }
  .period-copy b { font-size: 11px; }
  .period-copy small { font-size: 9px; }
  .period-icon { width: 25px; height: 25px; }
  .prob-wrap { gap: 14px; }
  .ring { width: 158px; height: 158px; }
  .prob-number span { font-size: 54px; }
  .prob-number small { font-size: 16px; margin-top: 6px; }
  .prob-caption { font-size: 9.5px; letter-spacing: 0.1em; }
  .prob-sub { font-size: 9px; }
  .verdict-top { gap: 8px; }
  .verdict-badge { font-size: 11.5px; padding: 5px 11px; }
  .confidence-chip { font-size: 10.5px; }
  .verdict-text { margin: 11px 0 15px; font-size: 13px; line-height: 1.7; }
  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .quick-grid > div { padding: 8px 10px; }
  .quick-grid span { font-size: 9.5px; }
  .quick-grid b { font-size: 12.5px; }
  .hero-foot { padding-top: 13px; gap: 10px; }
  .ghost-btn { height: 36px; font-size: 11.5px; padding: 0 11px; }

  .timeline-grid { gap: 4px; }
  .hour-col { padding: 6px 1px 6px; border-radius: 10px; }
  .bar-wrap { height: 86px; }
  .bar-fill { width: 17px; }
  .hour-p { font-size: 10.5px; }
  .hour-label { font-size: 9.5px; }
  .timeline-summary { font-size: 11px; padding: 10px 11px; }
  .sunrise-line { top: 27px; bottom: 22px; }

  .phenom { padding: 11px 12px; }
  .phenom-value { font-size: 22px; }
  .phenom-icon { width: 33px; height: 33px; }
  .phenom-detail { font-size: 10px; }

  .f-name { font-size: 12px; }
  .f-weight { font-size: 9px; }
  .f-score { font-size: 12px; }
  .factor p { font-size: 10.5px; }

  .day-row { grid-template-columns: 52px minmax(0, 1fr) 42px 58px; padding: 8px 7px; gap: 8px; }
  .day-date b { font-size: 12px; }
  .day-date span { font-size: 9px; }
  .day-tag { font-size: 8.5px; padding: 3px 5px; }
  .day-p { font-size: 12px; }

  .model-row { grid-template-columns: 96px minmax(0, 1fr) 40px; gap: 9px; }
  .model-name b { font-size: 11.5px; }
  .model-name small { font-size: 8.5px; }

  .sheet { width: 100%; max-width: 100%; max-height: 92vh; margin: auto 0 0; border-radius: 24px 24px 0 0; border-bottom: 0; }
  .sheet-form { padding: 22px 18px calc(20px + env(safe-area-inset-bottom)); }
  .sheet-head h2 { font-size: 17px; }
  .sheet-head .icon-btn { width: 32px; height: 32px; }
  .preset { padding: 11px; }
  .preset-main b { font-size: 12.5px; }
  .preset-elev { font-size: 9px; }
  .custom-actions { flex-direction: column; align-items: stretch; }
  .custom-actions .primary-btn { width: 100%; }
  .feedback-options { grid-template-columns: 1fr 1fr; }
  .method-card { padding: 22px 18px; }
  .toast { bottom: 18px; }
}

@media (max-width: 390px) {
  .quick-grid { grid-template-columns: 1fr 1fr; }
  .day-row { grid-template-columns: 46px minmax(0, 1fr) 38px; }
  .day-tag { display: none; }
  .ring { width: 146px; height: 146px; }
  .prob-number span { font-size: 48px; }
  .sunrise-line span { display: none; }
  .hero-actions .ghost-btn { padding: 0 10px; }
}

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