:root,
:root[data-theme="light"] {
  --bg: #eef2f8;
  --bg-grad: radial-gradient(circle at 12% 8%, rgba(29, 78, 216, 0.14), transparent 45%),
    radial-gradient(circle at 88% 18%, rgba(220, 38, 38, 0.08), transparent 42%),
    linear-gradient(180deg, #f6f8fc 0%, #e9eef6 100%);
  --glass: rgba(255, 255, 255, 0.72);
  --glass-strong: rgba(255, 255, 255, 0.88);
  --surface: rgba(255, 255, 255, 0.56);
  --ink: #0c1018;
  --muted: #586174;
  --line: rgba(15, 23, 42, 0.12);
  --line-strong: rgba(15, 23, 42, 0.24);
  --accent: #1d4ed8;
  --accent-soft: rgba(29, 78, 216, 0.12);
  --crimson: #dc2626;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  --font-display: "Space Grotesk", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}

:root[data-theme="dark"] {
  --bg: #090c12;
  --bg-grad: radial-gradient(circle at 15% 10%, rgba(59, 130, 246, 0.18), transparent 46%),
    radial-gradient(circle at 86% 20%, rgba(239, 68, 68, 0.12), transparent 44%),
    linear-gradient(180deg, #0b0f17 0%, #07090e 100%);
  --glass: rgba(18, 24, 38, 0.68);
  --glass-strong: rgba(24, 32, 50, 0.86);
  --surface: rgba(15, 20, 32, 0.58);
  --ink: #f3f6fc;
  --muted: #94a0b8;
  --line: rgba(241, 245, 249, 0.12);
  --line-strong: rgba(241, 245, 249, 0.24);
  --accent: #60a5fa;
  --accent-soft: rgba(96, 165, 250, 0.16);
  --crimson: #f87171;
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.42);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100dvh;
  background: var(--bg);
  background-image: var(--bg-grad);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.page {
  min-height: 100dvh;
  max-width: 680px;
  margin: 0 auto;
  padding: 18px 16px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.glass-panel {
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  flex-wrap: wrap;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
}

.brand-logo-img {
  height: 24px;
  width: auto;
  display: block;
  object-fit: contain;
}

.bird-mark {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}

.brand {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.logo-variant-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.logo-variant-btn:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 24px;
  flex-wrap: wrap;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav {
  display: flex;
  gap: 4px;
  align-items: center;
  background: var(--surface);
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.nav-btn {
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 5px 11px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.18s ease;
}

.nav-btn.is-active {
  color: #ffffff;
  background: var(--accent);
  font-weight: 600;
}

.pill-group {
  display: inline-flex;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 2px;
}

.pill-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}

.pill-btn.is-active {
  background: var(--glass-strong);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero,
.section {
  padding: 20px;
  border-radius: 24px;
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.wx-icon {
  color: var(--accent);
  flex-shrink: 0;
}

.hero-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-city {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0;
}

.hero-temp {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.metric-cell {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 11px 13px;
}

.metric-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.metric-value {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.curve-card {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.curve-svg {
  width: 100%;
  height: 76px;
  display: block;
}

.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.tag {
  font-size: 11px;
  color: var(--ink);
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 4px 11px;
}

.tag.is-blue {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.section-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 5px;
}

.section-sub {
  color: var(--muted);
  font-size: 12px;
  margin: 0 0 14px;
}

.row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  margin-top: 8px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.row-item:first-child {
  margin-top: 0;
}

.row-left {
  display: flex;
  align-items: center;
  gap: 11px;
}

.row-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

.row-detail {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ask-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ask-form .input {
  flex: 1 1 220px;
  max-width: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #ffffff;
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 9px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.14s ease, opacity 0.18s ease;
}

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

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 15px;
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.btn-ghost:hover {
  border-color: var(--line-strong);
}

.btn-ghost.is-selected {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}

.btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 6px;
}

.input {
  width: 100%;
  max-width: 380px;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.textarea {
  max-width: 100%;
  resize: vertical;
  min-height: 76px;
}

.input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--glass-strong);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 12px;
}

.check-row input[type="checkbox"] {
  accent-color: var(--accent);
}

.status-note {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.status-note.is-error {
  color: var(--crimson);
  font-weight: 500;
}

.dot-accent {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.footer {
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.footer-mark {
  color: var(--muted);
  opacity: 0.88;
}