@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Fraunces:opsz,wght,SOFT@9..144,500..700,50&display=swap");
:root {
  --bg: #f6fbf7;
  --bg-2: #ffffff;
  --surface: rgba(255,255,255,.76);
  --surface-strong: rgba(255,255,255,.92);
  --line: rgba(29,49,40,.09);
  --ink: #1b2c25;
  --muted: #60786e;
  --brand: #2ebd7f;
  --brand-2: #67b6ff;
  --accent: #ffb765;
  --rose: #ff8eb7;
  --shadow: 0 24px 70px rgba(42, 70, 53, .12);
  --radius-xl: 26px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --sans: "Manrope", system-ui, -apple-system, sans-serif;
  --serif: "Fraunces", Georgia, serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(900px 480px at 0% -10%, rgba(255,142,183,.12), transparent 70%),
    radial-gradient(900px 520px at 100% 0%, rgba(255,183,101,.12), transparent 70%),
    radial-gradient(1000px 560px at 50% 110%, rgba(46,189,127,.10), transparent 72%),
    linear-gradient(180deg, #fffef9, #f6fbf7 52%, #eef8f2);
  background-attachment: fixed;
}
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(rgba(30,50,40,.08) .6px, transparent .7px);
  background-size: 12px 12px;
  opacity: .18;
}
body[data-theme="night"] {
  --surface: rgba(18,29,24,.74);
  --surface-strong: rgba(16,27,22,.88);
  --line: rgba(227,243,235,.10);
  --ink: #edf8f1;
  --muted: #b1c9be;
  --shadow: 0 28px 80px rgba(0,0,0,.28);
  background:
    radial-gradient(900px 480px at 0% -10%, rgba(126,129,255,.16), transparent 72%),
    radial-gradient(900px 520px at 100% 0%, rgba(121,90,179,.14), transparent 70%),
    radial-gradient(1000px 560px at 50% 110%, rgba(49,145,100,.14), transparent 72%),
    linear-gradient(180deg, #0d1613, #12201c 52%, #152722);
}
body[data-theme="night"]::before { opacity: .1; }
a { color: inherit; }
img, svg { max-width: 100%; }
.container {
  position: relative;
  z-index: 1;
  width: min(1200px, calc(100vw - 28px));
  margin: 0 auto;
}
.header {
  position: sticky; top: 10px; z-index: 20;
  margin: 12px auto 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, var(--surface-strong), rgba(255,255,255,.48));
  backdrop-filter: blur(14px) saturate(1.05);
  box-shadow: 0 12px 36px rgba(32,52,41,.08);
}
body[data-theme="night"] .header { box-shadow: 0 12px 36px rgba(0,0,0,.2); }
.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  border-radius: 14px;
  padding: 8px 10px;
}
.brand-mark {
  width: 34px; height: 34px; border-radius: 12px;
  display: grid; place-items: center;
  color: white;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.45), transparent 45%),
    linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 8px 18px rgba(46,189,127,.22);
  font-weight: 800;
}
.brand-text { display: grid; line-height: 1.05; }
.brand-text strong { font-size: 14px; letter-spacing: .02em; }
.brand-text span { color: var(--muted); font-size: 11px; font-weight: 700; }
.nav {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
}
.nav a {
  text-decoration: none;
  font-size: 13px; font-weight: 700;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 12px;
  transition: .15s ease;
}
.nav a:hover { color: var(--ink); background: rgba(255,255,255,.35); border-color: var(--line); }
.nav a.is-active {
  color: var(--ink);
  background: linear-gradient(180deg, rgba(255,255,255,.8), rgba(255,255,255,.56));
  border-color: var(--line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 8px 14px rgba(30,50,40,.05);
}
body[data-theme="night"] .nav a:hover,
body[data-theme="night"] .nav a.is-active {
  background: rgba(255,255,255,.04);
  box-shadow: none;
}
.header-tools {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: end;
}
.style-switch {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.style-switch .btn { padding-inline: 10px; }
.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  padding: 8px 11px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex; align-items: center; gap: 7px;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(46,189,127,.12), 0 0 10px rgba(46,189,127,.3);
}
.btn {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(245,250,246,.88));
  color: var(--ink);
  font: 700 13px/1 var(--sans);
  padding: 10px 12px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  box-shadow: 0 8px 16px rgba(30,50,40,.05);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 22px rgba(30,50,40,.08); }
.btn.secondary { background: rgba(255,255,255,.58); box-shadow: none; color: var(--muted); }
.btn.ghost { background: transparent; box-shadow: none; color: var(--muted); }
.btn.ghost:hover { background: rgba(255,255,255,.35); }
.btn.primary {
  background: linear-gradient(135deg, rgba(46,189,127,.16), rgba(103,182,255,.16), rgba(255,183,101,.12));
  border-color: rgba(46,189,127,.22);
}
.btn.active {
  border-color: rgba(103,182,255,.28);
  background: linear-gradient(180deg, rgba(103,182,255,.14), rgba(255,255,255,.92));
}
body[data-theme="night"] .btn,
body[data-theme="night"] .chip {
  background: rgba(255,255,255,.03);
  color: var(--muted);
  box-shadow: none;
}
body[data-theme="night"] .btn.active { background: rgba(103,182,255,.14); color: var(--ink); }
body[data-theme="night"] .btn.primary { background: rgba(46,189,127,.12); }
.hero {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, var(--surface-strong), rgba(255,255,255,.6));
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 14px;
  padding: 18px;
}
.hero-copy {
  padding: 10px;
  display: grid;
  align-content: start;
  gap: 12px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.hero-copy h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 64px);
  line-height: .92;
  letter-spacing: -.03em;
}
.hero-copy h1 .gradient {
  background: linear-gradient(95deg, var(--rose), var(--accent), var(--brand), var(--brand-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 500;
  max-width: 60ch;
}
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
}
.metric {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 12px;
}
.metric .k { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 800; }
.metric .v { margin-top: 5px; font-size: 22px; line-height: 1.05; font-weight: 800; }
.metric .v.small { font-size: 13px; line-height: 1.35; color: var(--muted); font-weight: 700; }
.hero-art {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(247,252,249,.8));
  padding: 12px;
  display: grid;
  align-content: space-between;
  gap: 12px;
}
.hero-illustration {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(167,225,255,.35), rgba(226,245,235,.45));
  min-height: 220px;
  position: relative;
}
.hero-3d-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: .9;
  mix-blend-mode: screen;
}
body[data-theme="night"] .hero-3d-layer { opacity: .95; mix-blend-mode: plus-lighter; }
.hero-3d-layer canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}
.hero-illustration svg { width: 100%; height: 100%; display: block; }
.hero-caption {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 14px;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.grid {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, var(--surface-strong), rgba(255,255,255,.56));
  box-shadow: var(--shadow);
  padding: 16px;
}
.panel h2, .panel h3 {
  margin: 0;
  font-family: var(--serif);
  letter-spacing: -.02em;
}
.panel-head {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 10px;
}
.subtle { color: var(--muted); font-size: 13px; font-weight: 600; }
.feature-card {
  display: grid; gap: 10px; align-content: start;
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface);
  padding: 14px;
}
.feature-card p { margin: 0; color: var(--muted); line-height: 1.45; font-weight: 500; }
.feature-card .icon {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(46,189,127,.15), rgba(103,182,255,.15));
  border: 1px solid rgba(46,189,127,.15);
  font-size: 18px;
}
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 10px;
}
.kpi {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 12px;
}
.kpi .value { font-size: 20px; font-weight: 800; }
.kpi .label { margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
.footer {
  margin: 16px 0 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  padding: 14px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.footer.container {
  width: 100%;
  max-width: none;
  border-left: none;
  border-right: none;
  border-radius: 0;
  margin-left: 0;
  margin-right: 0;
}
.hidden-section.container {
  width: min(1200px, calc(100vw - 24px));
  margin: 8px auto 0;
  border-radius: 16px;
  border: 1px dashed var(--m3-outline);
  background: var(--m3-surface-container);
  color: var(--m3-on-surface-variant);
  box-shadow: none;
}
.hidden-section > summary {
  cursor: pointer;
  list-style: none;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  user-select: none;
}
.hidden-section > summary::-webkit-details-marker { display: none; }
.hidden-section > summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 8px;
  transition: transform .12s ease;
}
.hidden-section[open] > summary::before {
  transform: rotate(90deg);
}
.hidden-section__body {
  padding: 0 12px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hidden-section[open] {
  border-style: solid;
}
.page-hero {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, var(--surface-strong), rgba(255,255,255,.56));
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 14px;
}
.page-hero h1 {
  margin: 6px 0 8px;
  font-family: var(--serif);
  font-size: clamp(30px, 4.4vw, 52px);
  line-height: .94;
  letter-spacing: -.03em;
}
.page-hero p { margin: 0; color: var(--muted); font-weight: 500; line-height: 1.5; }
.switch-group {
  display: inline-flex; gap: 6px; padding: 4px;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface);
}
.weather-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.tile {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 12px;
}
.tile .k { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.tile .v { margin-top: 5px; font-size: 24px; font-weight: 800; }
.tile .v.small { font-size: 13px; line-height: 1.35; color: var(--muted); }
.tile.span-2 { grid-column: span 2; }
.tile.span-3 { grid-column: span 3; }
.chart {
  width: 100%; height: 180px; display: block;
}
.chart.small { height: 140px; }
.axis-labels {
  margin-top: 6px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.axis-labels span { text-align: center; }
.legend {
  display: flex; gap: 10px; flex-wrap: wrap;
  color: var(--muted); font-size: 11px; font-weight: 700; margin-bottom: 6px;
}
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 999px; margin-right: 5px; vertical-align: -1px; }
.forecast-tabs { display: inline-flex; gap: 6px; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.forecast-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.fcard {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 10px;
  display: grid;
  gap: 6px;
  animation: rise .35s ease both;
}
.fcard .day { color: var(--muted); font-size: 12px; font-weight: 700; }
.fcard .icon { font-size: 20px; }
.fcard .temps { font-size: 14px; font-weight: 800; }
.fcard .desc { font-size: 11px; line-height: 1.25; color: var(--muted); min-height: 2.4em; }
.fcard .est {
  width: fit-content;
  border: 1px dashed rgba(255,183,101,.35);
  border-radius: 999px;
  background: rgba(255,183,101,.14);
  color: #8b6527;
  padding: 3px 6px;
  font-size: 10px;
  font-weight: 700;
}
body[data-theme="night"] .fcard .est { color: #ffd89b; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: grid; gap: 6px; }
.field label { color: var(--muted); font-size: 12px; font-weight: 700; }
.field input, .field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  padding: 10px 11px;
  font: 600 13px/1 var(--sans);
}
.result {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 11px 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 600;
}
.result b { color: var(--ink); }
.list { margin: 0; padding-left: 18px; color: var(--muted); display: grid; gap: 8px; }
.list li { line-height: 1.45; font-weight: 500; }
.note {
  border: 1px dashed rgba(255,183,101,.3);
  border-radius: 14px;
  background: rgba(255,183,101,.08);
  color: #6f5726;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 700;
}
body[data-theme="night"] .note { color: #f6d48d; }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
}
.stat-box {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 12px;
}
.stat-box .n { font-size: 21px; font-weight: 800; }
.stat-box .t { margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
.skeleton { color: transparent !important; background: linear-gradient(90deg, rgba(255,255,255,.05), rgba(255,255,255,.15), rgba(255,255,255,.05)); background-size: 220% 100%; animation: shimmer 1.2s linear infinite; border-radius: 8px; }
.hide { display: none !important; }
@keyframes shimmer { from { background-position: 220% 0; } to { background-position: -20% 0; } }
@keyframes rise { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 1050px) {
  .header-inner { grid-template-columns: 1fr; }
  .nav { justify-content: flex-start; }
  .header-tools { justify-content: flex-start; }
  .style-switch { order: 10; width: 100%; justify-content: flex-start; }
  .hero-grid { grid-template-columns: 1fr; }
  .grid.cols-3 { grid-template-columns: 1fr 1fr; }
  .forecast-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .container { width: min(1200px, calc(100vw - 18px)); }
  .hero-metrics, .kpi-strip, .weather-grid, .grid.cols-2, .grid.cols-3, .form-grid, .stat-grid { grid-template-columns: 1fr; }
  .tile.span-2, .tile.span-3 { grid-column: span 1; }
  .forecast-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .axis-labels { grid-template-columns: repeat(4, 1fr); }
  .header { top: 6px; margin-top: 8px; }
  .style-switch { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Glass / depth upgrade */
:root { --mx: 0; --my: 0; }
body::after {
  content: "";
  position: fixed;
  inset: -10%;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(34rem 18rem at calc(8% + var(--mx) * 10px) calc(10% + var(--my) * -8px), rgba(255,255,255,.35), transparent 72%),
    radial-gradient(28rem 16rem at calc(90% + var(--mx) * -8px) calc(8% + var(--my) * 8px), rgba(103,182,255,.16), transparent 72%),
    radial-gradient(34rem 18rem at calc(48% + var(--mx) * 5px) calc(102% + var(--my) * -10px), rgba(46,189,127,.12), transparent 72%);
}
body[data-theme="night"]::after {
  background:
    radial-gradient(36rem 19rem at calc(10% + var(--mx) * 10px) calc(8% + var(--my) * -8px), rgba(116,126,255,.16), transparent 72%),
    radial-gradient(30rem 18rem at calc(92% + var(--mx) * -8px) calc(10% + var(--my) * 8px), rgba(165,103,255,.13), transparent 72%),
    radial-gradient(36rem 20rem at calc(50% + var(--mx) * 5px) calc(104% + var(--my) * -10px), rgba(60,200,150,.10), transparent 72%);
}

.header,
.hero,
.panel,
.metric,
.tile,
.feature-card,
.fcard,
.kpi,
.stat-box,
.result,
.hero-art,
.hero-illustration,
.chip {
  position: relative;
  overflow: hidden;
}

.header::before,
.panel::before,
.metric::before,
.tile::before,
.feature-card::before,
.fcard::before,
.kpi::before,
.stat-box::before,
.result::before,
.hero-art::before,
.hero-illustration::before {
  content: "";
  position: absolute;
  inset: 1px 1px auto 1px;
  height: 46%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.45), rgba(255,255,255,0));
  pointer-events: none;
}
body[data-theme="night"] .header::before,
body[data-theme="night"] .panel::before,
body[data-theme="night"] .metric::before,
body[data-theme="night"] .tile::before,
body[data-theme="night"] .feature-card::before,
body[data-theme="night"] .fcard::before,
body[data-theme="night"] .kpi::before,
body[data-theme="night"] .stat-box::before,
body[data-theme="night"] .result::before,
body[data-theme="night"] .hero-art::before,
body[data-theme="night"] .hero-illustration::before {
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,0));
}

.header {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.75),
    inset 0 -1px 0 rgba(255,255,255,.25),
    0 16px 38px rgba(32,52,41,.10);
}
.chip {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.72),
    inset 0 -1px 0 rgba(255,255,255,.20),
    0 10px 20px rgba(30,50,40,.04);
}
.btn {
  position: relative;
  isolation: isolate;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.80),
    inset 0 -1px 0 rgba(255,255,255,.20),
    0 12px 18px rgba(30,50,40,.06);
}
.btn::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0));
  pointer-events: none;
}
.hero {
  transform-style: preserve-3d;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.80),
    inset 0 -1px 0 rgba(255,255,255,.18),
    0 26px 70px rgba(42,70,53,.14);
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 6% -18px 6%;
  height: 22px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(29,49,40,.12), rgba(29,49,40,0) 72%);
  filter: blur(8px);
  pointer-events: none;
}
.hero-grid { perspective: 1400px; }
.hero-copy { transform: translateZ(14px); }
.hero-art {
  transform-style: preserve-3d;
  transform: perspective(1200px) rotateY(calc(var(--mx) * .9deg)) rotateX(calc(var(--my) * -.8deg)) translateZ(8px);
  transition: transform .22s ease, box-shadow .22s ease;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.78),
    inset 0 -1px 0 rgba(255,255,255,.14),
    0 22px 34px rgba(30,50,40,.09);
}
.hero-caption { transform: translateZ(18px); }
.hero-illustration svg { transform: translateZ(12px) scale(1.01); transform-origin: center; }

.panel,
.metric,
.tile,
.feature-card,
.fcard,
.kpi,
.stat-box,
.result {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.76),
    inset 0 -1px 0 rgba(255,255,255,.16),
    0 14px 24px rgba(30,50,40,.05);
  transform-style: preserve-3d;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.metric .v,
.tile .v,
.kpi .value,
.stat-box .n,
.panel h2,
.panel h3 {
  text-shadow: 0 1px 0 rgba(255,255,255,.5);
}
.panel:hover,
.feature-card:hover,
.tile:hover,
.fcard:hover,
.kpi:hover,
.stat-box:hover {
  transform: translateY(-4px) perspective(1000px) rotateX(.7deg) rotateY(calc(var(--mx) * .45deg));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.80),
    inset 0 -1px 0 rgba(255,255,255,.14),
    0 22px 38px rgba(30,50,40,.10);
}

.hero-illustration::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(255,255,255,.28) 8%, rgba(255,255,255,0) 36%),
    linear-gradient(300deg, rgba(255,255,255,.10), rgba(255,255,255,0) 45%);
  pointer-events: none;
}

.feature-card .icon,
.brand-mark {
  transform: translateZ(16px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.35),
    0 12px 18px rgba(46,189,127,.14);
}

body[data-theme="night"] .header,
body[data-theme="night"] .panel,
body[data-theme="night"] .metric,
body[data-theme="night"] .tile,
body[data-theme="night"] .feature-card,
body[data-theme="night"] .fcard,
body[data-theme="night"] .kpi,
body[data-theme="night"] .stat-box,
body[data-theme="night"] .result,
body[data-theme="night"] .hero,
body[data-theme="night"] .hero-art,
body[data-theme="night"] .hero-illustration,
body[data-theme="night"] .chip {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    inset 0 -1px 0 rgba(255,255,255,.01),
    0 22px 42px rgba(0,0,0,.20);
}
body[data-theme="night"] .btn {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.05),
    inset 0 -1px 0 rgba(255,255,255,.01),
    0 14px 20px rgba(0,0,0,.16);
}
body[data-theme="night"] .metric .v,
body[data-theme="night"] .tile .v,
body[data-theme="night"] .kpi .value,
body[data-theme="night"] .stat-box .n,
body[data-theme="night"] .panel h2,
body[data-theme="night"] .panel h3 {
  text-shadow: 0 1px 0 rgba(0,0,0,.4);
}

/* Material Design performance override */
:root {
  --brand: #1a73e8;
  --brand-2: #4f8df5;
  --accent: #34a853;
  --rose: #ea4335;
  --ink: #202124;
  --muted: #5f6368;
  --line: #e0e3e7;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --shadow: 0 1px 2px rgba(60,64,67,.18), 0 1px 3px 1px rgba(60,64,67,.10);
  --radius-xl: 20px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --sans: Roboto, "Noto Sans", Arial, sans-serif;
  --serif: Roboto, "Noto Sans", Arial, sans-serif;
}
body {
  background: #f8f9fa;
  background-attachment: scroll;
  color: var(--ink);
}
body::before,
body::after {
  display: none;
}
body[data-theme="night"] {
  --ink: #e8eaed;
  --muted: #bdc1c6;
  --line: #3c4043;
  --surface: #202124;
  --surface-strong: #202124;
  --shadow: 0 1px 2px rgba(0,0,0,.38), 0 2px 6px rgba(0,0,0,.26);
  background: #121212;
}
body[data-style] {
  /* disable expensive visual presets for low-resource mode */
}
.style-switch {
  display: none !important;
}
.header {
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.header::before,
.header::after,
.hero::before,
.hero::after,
.panel::before,
.panel::after,
.tile::before,
.tile::after,
.feature-card::before,
.feature-card::after,
.fcard::before,
.fcard::after,
.metric::before,
.metric::after,
.result::before,
.result::after,
.hero-art::before,
.hero-illustration::before,
.hero-illustration::after,
.page-hero-visual::before {
  display: none !important;
  content: none !important;
}
.chip,
.btn,
.hero,
.panel,
.metric,
.tile,
.feature-card,
.fcard,
.kpi,
.stat-box,
.result,
.hero-art,
.hero-illustration,
.page-hero,
.page-hero-visual,
.page-hero-glass-tag {
  background: var(--surface) !important;
  border-color: var(--line) !important;
  box-shadow: var(--shadow) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transform: none !important;
  filter: none !important;
}
.btn {
  font-weight: 500;
  border-radius: 999px;
  padding: 10px 16px;
}
.btn.primary {
  background: var(--brand) !important;
  color: #fff !important;
  border-color: transparent !important;
}
.btn.secondary,
.btn.ghost {
  color: var(--brand);
}
.btn.active {
  background: rgba(26,115,232,.12) !important;
  color: var(--brand) !important;
  border-color: rgba(26,115,232,.16) !important;
}
body[data-theme="night"] .btn.primary {
  background: #8ab4f8 !important;
  color: #202124 !important;
}
body[data-theme="night"] .btn.secondary,
body[data-theme="night"] .btn.ghost {
  color: #8ab4f8;
}
.hero,
.page-hero {
  border-radius: 24px;
}
.hero-grid {
  gap: 12px;
}
.hero-copy h1,
.page-hero h1 {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: -.02em;
}
.hero-copy h1 .gradient {
  color: var(--ink);
  background: none;
}
.eyebrow {
  color: var(--brand);
  letter-spacing: .12em;
}
.brand-mark {
  background: var(--brand) !important;
  box-shadow: none !important;
  color: #fff !important;
}
.brand-mark svg {
  filter: none;
}
.hero-3d-layer,
.page-hero-visual {
  display: none !important;
}
.nav a {
  border-radius: 999px;
  padding: 9px 14px;
}
.nav a.is-active {
  background: rgba(26,115,232,.12);
  color: var(--brand);
  border-color: transparent;
  box-shadow: none;
}
body[data-theme="night"] .nav a.is-active {
  background: rgba(138,180,248,.16);
  color: #8ab4f8;
}
.feature-card .icon {
  background: rgba(26,115,232,.08) !important;
  border-color: rgba(26,115,232,.12) !important;
  box-shadow: none !important;
}
.kpi .value,
.metric .v,
.tile .v,
.stat-box .n {
  text-shadow: none !important;
}
.legend,
.subtle,
.lead,
.tile .v.small,
.metric .v.small,
.page-hero p,
.hero-caption {
  color: var(--muted) !important;
}
.forecast-tabs {
  background: transparent;
  border: none;
  padding: 0;
  gap: 8px;
}
.forecast-grid {
  gap: 12px;
}
.fcard {
  animation: none;
}
.skeleton {
  animation: none;
  background: #eceff1;
}
body[data-theme="night"] .skeleton {
  background: #2a2d31;
}
@media (prefers-reduced-motion: reduce) {
  html.is-leaving body,
  body.page-enter,
  body.page-enter-active {
    opacity: 1 !important;
    filter: none !important;
  }
}

/* Material 3 refinement layer */
:root {
  --m3-primary: #1a73e8;
  --m3-on-primary: #ffffff;
  --m3-primary-container: #d3e3fd;
  --m3-on-primary-container: #041e49;
  --m3-secondary: #00639b;
  --m3-on-secondary: #ffffff;
  --m3-secondary-container: #cfe5ff;
  --m3-tertiary: #146c2e;
  --m3-tertiary-container: #c4eed0;
  --m3-surface: #f8f9fa;
  --m3-surface-container: #f1f3f4;
  --m3-surface-container-high: #eceff1;
  --m3-surface-container-highest: #e8eaed;
  --m3-on-surface: #202124;
  --m3-on-surface-variant: #5f6368;
  --m3-outline: #dadce0;
  --m3-outline-variant: #e8eaed;
  --m3-shadow: rgba(60,64,67,.18);
  --m3-elev-1: 0 1px 2px rgba(60,64,67,.18), 0 1px 3px 1px rgba(60,64,67,.10);
  --m3-elev-2: 0 1px 2px rgba(60,64,67,.20), 0 2px 6px 2px rgba(60,64,67,.12);
  --m3-elev-3: 0 2px 4px rgba(60,64,67,.20), 0 4px 8px 3px rgba(60,64,67,.12);
  --m3-font-sans: "Manrope", "Segoe UI", system-ui, sans-serif;
  --m3-font-display: "Fraunces", Georgia, serif;
}
body[data-theme="night"] {
  --m3-primary: #a8c7fa;
  --m3-on-primary: #062e6f;
  --m3-primary-container: #0842a0;
  --m3-on-primary-container: #d3e3fd;
  --m3-secondary: #85d0ff;
  --m3-secondary-container: #004a77;
  --m3-tertiary: #72d58a;
  --m3-tertiary-container: #0f5225;
  --m3-surface: #131314;
  --m3-surface-container: #1e1f20;
  --m3-surface-container-high: #282a2c;
  --m3-surface-container-highest: #303134;
  --m3-on-surface: #e8eaed;
  --m3-on-surface-variant: #bdc1c6;
  --m3-outline: #5f6368;
  --m3-outline-variant: #3c4043;
  --m3-shadow: rgba(0,0,0,.35);
  --m3-elev-1: 0 1px 2px rgba(0,0,0,.35), 0 1px 3px rgba(0,0,0,.24);
  --m3-elev-2: 0 1px 2px rgba(0,0,0,.40), 0 3px 8px rgba(0,0,0,.26);
  --m3-elev-3: 0 2px 4px rgba(0,0,0,.42), 0 6px 14px rgba(0,0,0,.30);
}

body {
  background: var(--m3-surface);
  color: var(--m3-on-surface);
  padding-bottom: 0;
  font-family: var(--m3-font-sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.container {
  width: min(1200px, calc(100vw - 24px));
}
.header {
  top: 0;
  margin: 0 0 12px;
  width: 100%;
  max-width: none;
  border-left: none;
  border-right: none;
  border-top: none;
  border-radius: 0 0 16px 16px;
  background: color-mix(in oklab, var(--m3-surface) 92%, transparent);
  border-color: var(--m3-outline-variant);
  box-shadow: var(--m3-elev-1);
}
.header.container {
  width: 100%;
}
.header-inner {
  width: min(1200px, calc(100vw - 24px));
  margin: 0 auto;
  min-height: 64px;
}
.brand {
  min-height: 48px;
  padding: 6px 8px;
  border-radius: 24px;
}
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 20px;
  background: var(--m3-primary) !important;
  color: var(--m3-on-primary) !important;
}
.brand-text strong {
  font-size: 15px;
  color: var(--m3-on-surface);
  font-weight: 700;
  letter-spacing: .01em;
}
.brand-text span {
  color: var(--m3-on-surface-variant);
  font-size: 11px;
  letter-spacing: .02em;
}

.nav {
  gap: 4px;
}
.nav a {
  border-radius: 999px;
  min-height: 40px;
  padding: 10px 14px;
  font-weight: 500;
  color: var(--m3-on-surface-variant);
}
.nav a:hover {
  background: var(--m3-surface-container);
  border-color: transparent;
  color: var(--m3-on-surface);
}
.nav a.is-active {
  background: var(--m3-secondary-container);
  color: var(--m3-on-primary-container);
  border-color: transparent;
  box-shadow: none;
}
body[data-theme="night"] .nav a.is-active {
  background: color-mix(in oklab, var(--m3-primary) 22%, transparent);
  color: var(--m3-primary);
}

.header-tools {
  gap: 6px;
}
.chip {
  background: var(--m3-surface-container);
  color: var(--m3-on-surface-variant);
  border: 1px solid var(--m3-outline-variant);
  box-shadow: none !important;
  min-height: 32px;
  padding: 6px 10px;
  font-weight: 500;
}
.dot {
  background: var(--m3-tertiary);
  box-shadow: none;
}

.btn {
  min-height: 40px;
  border-radius: 20px;
  border: 1px solid transparent;
  background: var(--m3-surface-container);
  color: var(--m3-on-surface);
  box-shadow: none !important;
  font-weight: 600;
  font-family: var(--m3-font-sans);
  letter-spacing: .004em;
  transition: background-color .12s ease, color .12s ease;
}
.btn::after { display: none !important; }
.btn:hover {
  transform: none !important;
  background: var(--m3-surface-container-high);
  box-shadow: none !important;
}
.btn.primary {
  background: var(--m3-primary) !important;
  color: var(--m3-on-primary) !important;
}
.btn.primary:hover { background: color-mix(in oklab, var(--m3-primary) 92%, black); }
.btn.secondary,
.btn.ghost {
  background: transparent !important;
  color: var(--m3-primary);
  border-color: transparent;
}
.btn.secondary:hover,
.btn.ghost:hover {
  background: color-mix(in oklab, var(--m3-primary) 10%, transparent) !important;
}
.btn.active {
  background: var(--m3-secondary-container) !important;
  color: var(--m3-on-primary-container) !important;
  border-color: transparent !important;
}
body[data-theme="night"] .btn.secondary,
body[data-theme="night"] .btn.ghost { color: var(--m3-primary); }

.hero,
.page-hero,
.panel,
.metric,
.tile,
.feature-card,
.fcard,
.kpi,
.stat-box,
.result {
  background: var(--m3-surface-container) !important;
  border: 1px solid var(--m3-outline-variant) !important;
  box-shadow: var(--m3-elev-1) !important;
}
.panel,
.page-hero { border-radius: 24px; }
.hero { border-radius: 28px; }
.metric,
.tile,
.feature-card,
.fcard,
.kpi,
.stat-box,
.result { border-radius: 16px; }
.hero-art,
.hero-illustration {
  background: var(--m3-surface-container-high) !important;
  border: 1px solid var(--m3-outline-variant) !important;
  box-shadow: none !important;
}
.hero-caption {
  background: var(--m3-surface-container-high) !important;
  border-color: var(--m3-outline-variant) !important;
  color: var(--m3-on-surface-variant) !important;
  box-shadow: none !important;
}

.eyebrow {
  color: var(--m3-primary);
  font-weight: 600;
  letter-spacing: .1em;
}
.lead,
.subtle,
.tile .v.small,
.metric .v.small,
.list,
.list li,
.note {
  color: var(--m3-on-surface-variant) !important;
}
.hero-copy h1,
.page-hero h1 {
  color: var(--m3-on-surface);
  font-family: var(--m3-font-display);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: .98;
}
.hero-copy h1 .gradient {
  color: var(--m3-on-surface);
  background: none !important;
}
.panel h2,
.panel h3 {
  font-family: var(--m3-font-display);
  color: var(--m3-on-surface);
  letter-spacing: -.012em;
  line-height: 1.08;
}
.panel h2 { font-weight: 600; }
.panel h3 { font-weight: 550; }
.lead,
.page-hero p {
  font-family: var(--m3-font-sans);
  font-weight: 500;
  line-height: 1.55;
}
.subtle,
.chip,
.bottom-nav__label,
.field label {
  font-family: var(--m3-font-sans);
}
.kpi .value,
.metric .v,
.tile .v,
.stat-box .n {
  font-family: var(--m3-font-sans);
  font-weight: 700;
  letter-spacing: -.02em;
}

/* M3 tabs / segmented controls */
.forecast-tabs,
.style-switch {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: var(--m3-surface-container-high);
  border: 1px solid var(--m3-outline-variant);
}
.style-switch {
  display: inline-flex !important;
}
.forecast-tabs .btn,
.style-switch .btn,
.header-tools [data-theme-mode] {
  min-height: 32px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
}
.forecast-tabs .btn.active,
.style-switch .btn.active,
.header-tools [data-theme-mode].active {
  background: var(--m3-secondary-container) !important;
  color: var(--m3-on-primary-container) !important;
}

.kpi-strip {
  gap: 12px;
}
.kpi .label,
.stat-box .t {
  color: var(--m3-on-surface-variant);
}
.feature-card .icon {
  background: var(--m3-primary-container) !important;
  color: var(--m3-on-primary-container);
  border-color: transparent !important;
}
.field label {
  color: var(--m3-on-surface-variant);
  font-size: 12px;
  font-weight: 500;
}
.field input,
.field select {
  min-height: 56px;
  border-radius: 16px;
  border: 1px solid var(--m3-outline);
  background: var(--m3-surface);
  color: var(--m3-on-surface);
  padding: 16px 14px 10px;
  box-shadow: inset 0 0 0 1px transparent;
}
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--m3-primary);
  box-shadow: inset 0 0 0 1px var(--m3-primary);
}
.field input::placeholder {
  color: var(--m3-on-surface-variant);
}
.field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--m3-on-surface-variant) 50%),
    linear-gradient(135deg, var(--m3-on-surface-variant) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) calc(50% - 2px),
    calc(100% - 14px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 34px;
}
.result {
  background: var(--m3-surface-container-high) !important;
}
.result:empty::before {
  content: "Пока пусто";
  color: var(--m3-on-surface-variant);
}
.note {
  border-radius: 16px;
}
.forecast-grid:empty {
  min-height: 140px;
  border-radius: 16px;
  border: 1px dashed var(--m3-outline);
  background:
    linear-gradient(180deg, var(--m3-surface-container-high), var(--m3-surface-container)),
    repeating-linear-gradient(90deg, transparent 0 10px, color-mix(in oklab, var(--m3-outline-variant) 65%, transparent) 10px 11px);
  display: grid;
  place-items: center;
}
.forecast-grid:empty::before {
  content: "Загружаем прогноз по дням…";
  color: var(--m3-on-surface-variant);
  font-size: 13px;
  font-weight: 500;
}
#weatherErrorBox.hide {
  display: none !important;
}
#weatherErrorBox {
  border-radius: 16px;
}
.note {
  background: color-mix(in oklab, var(--m3-tertiary-container) 38%, var(--m3-surface-container));
  border: 1px solid color-mix(in oklab, var(--m3-tertiary) 24%, var(--m3-outline-variant));
  color: var(--m3-on-surface-variant) !important;
}

/* Bottom nav (mobile) */
.bottom-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  background: color-mix(in oklab, var(--m3-surface) 94%, transparent);
  border-top: 1px solid var(--m3-outline-variant);
  box-shadow: 0 -1px 2px rgba(60,64,67,.08);
}
.bottom-nav__item {
  flex: 1;
  display: grid;
  justify-items: center;
  gap: 3px;
  text-decoration: none;
  color: var(--m3-on-surface-variant);
  padding: 4px 6px 6px;
  border-radius: 16px;
  min-width: 0;
}
.bottom-nav__icon {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 24px;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1;
}
.bottom-nav__label {
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.bottom-nav__item.is-active {
  color: var(--m3-on-primary-container);
}
.bottom-nav__item.is-active .bottom-nav__icon {
  background: var(--m3-secondary-container);
}
body[data-theme="night"] .bottom-nav {
  background: color-mix(in oklab, var(--m3-surface) 94%, transparent);
  box-shadow: 0 -1px 2px rgba(0,0,0,.22);
}
body[data-theme="night"] .bottom-nav__item.is-active {
  color: var(--m3-primary);
}
body[data-theme="night"] .bottom-nav__item.is-active .bottom-nav__icon {
  background: color-mix(in oklab, var(--m3-primary) 22%, transparent);
}

/* M3 palette variants */
body[data-style="spring"] {
  --m3-primary: #1a73e8;
  --m3-primary-container: #d3e3fd;
  --m3-on-primary-container: #041e49;
  --m3-tertiary: #188038;
  --m3-tertiary-container: #c4eed0;
}
body[data-style="neon"] {
  --m3-primary: #006aff;
  --m3-primary-container: #d7e3ff;
  --m3-on-primary-container: #001b3f;
  --m3-secondary-container: #d5e3ff;
  --m3-tertiary: #00a56a;
  --m3-tertiary-container: #c7f3e1;
}
body[data-style="minimal"] {
  --m3-primary: #5f6f82;
  --m3-primary-container: #dde4ea;
  --m3-on-primary-container: #1d2935;
  --m3-secondary-container: #e7ebef;
  --m3-tertiary: #65766a;
  --m3-tertiary-container: #e0e8e0;
}
body[data-theme="night"][data-style="minimal"] {
  --m3-primary: #b6c4d1;
  --m3-primary-container: #34414d;
  --m3-on-primary-container: #e7f0f9;
  --m3-secondary-container: #2d3338;
}

/* Mobile app-bar / bottom-nav layout */
@media (max-width: 760px) {
  body {
    padding-bottom: 86px;
  }
  .header {
    border-radius: 0;
    margin-bottom: 10px;
  }
  .header-inner {
    grid-template-columns: auto 1fr;
    gap: 8px;
    min-height: 56px;
    padding: 8px 0;
  }
  .brand-text span {
    display: none;
  }
  .nav {
    display: none;
  }
  .header-tools {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
  }
  .header-tools .chip {
    flex: 1;
    min-width: 0;
    justify-content: center;
  }
  .header-tools [data-theme-mode] {
    min-width: 0;
    padding-inline: 10px;
  }
  .header-tools [data-theme-mode] {
    flex: 0 1 auto;
  }
  .style-switch {
    width: 100%;
    justify-content: center;
    order: 3;
  }
  .forecast-tabs {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .forecast-tabs::-webkit-scrollbar { display: none; }
  .bottom-nav {
    display: flex;
    gap: 8px;
  }
  .footer.container {
    margin-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }
}

/* Quokka mascot */
.brand-mark.brand-quokka {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0;
  overflow: hidden;
}
.brand-mark.brand-quokka img {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: cover;
}
.quokka-mascot-card {
  overflow: hidden;
}
.quokka-mascot-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  align-items: center;
}
.quokka-mascot-art {
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: var(--m3-surface-container-high);
  border: 1px solid var(--m3-outline-variant);
  padding: 10px;
}
.quokka-mascot-art img {
  width: min(220px, 100%);
  height: auto;
  display: block;
}
.quokka-mascot-copy p {
  margin: 0;
  color: var(--m3-on-surface-variant);
  line-height: 1.5;
}
.quokka-tip-box {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}
.quokka-tip-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.quokka-tip-meta .chip {
  min-height: 32px;
}
.quokka-tip-box .result {
  min-height: 56px;
}
.quokka-bubbles {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.quokka-bubble {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--m3-secondary-container);
  color: var(--m3-on-primary-container);
  font-size: 12px;
  font-weight: 500;
}
body[data-theme="night"] .quokka-bubble {
  background: color-mix(in oklab, var(--m3-primary) 22%, transparent);
  color: var(--m3-primary);
}

@media (max-width: 760px) {
  .quokka-mascot-grid {
    grid-template-columns: 1fr;
  }
  .quokka-mascot-art {
    width: 100%;
    max-width: 240px;
    margin: 0 auto;
  }
  .quokka-tip-meta {
    justify-content: space-between;
  }
  .quokka-tip-meta .chip {
    flex: 1;
    min-width: 0;
  }
}

/* Visual style presets */
body[data-style="spring"] {
  --brand: #2ebd7f;
  --brand-2: #67b6ff;
  --accent: #ffb765;
  --rose: #ff8eb7;
}
body[data-style="neon"] {
  --brand: #15e5a8;
  --brand-2: #4ca8ff;
  --accent: #ffd94d;
  --rose: #ff4dd8;
}
body[data-style="neon"] {
  background:
    radial-gradient(900px 480px at 0% -10%, rgba(255,77,216,.10), transparent 70%),
    radial-gradient(900px 520px at 100% 0%, rgba(76,168,255,.11), transparent 70%),
    radial-gradient(1000px 560px at 50% 110%, rgba(21,229,168,.10), transparent 72%),
    linear-gradient(180deg, #f8fcff, #f5fbfa 52%, #eef9fb);
}
body[data-style="neon"] .header,
body[data-style="neon"] .hero,
body[data-style="neon"] .panel {
  border-color: rgba(76,168,255,.16);
}
body[data-style="neon"] .brand-mark {
  box-shadow: 0 10px 24px rgba(76,168,255,.22), 0 0 22px rgba(21,229,168,.14);
}
body[data-style="neon"] .btn.primary {
  background: linear-gradient(135deg, rgba(21,229,168,.16), rgba(76,168,255,.16), rgba(255,77,216,.10));
  border-color: rgba(76,168,255,.22);
}
body[data-style="neon"] .hero-3d-layer { filter: saturate(1.2) hue-rotate(-8deg); }
body[data-theme="night"][data-style="neon"] {
  background:
    radial-gradient(900px 480px at 0% -10%, rgba(255,77,216,.16), transparent 72%),
    radial-gradient(900px 520px at 100% 0%, rgba(76,168,255,.14), transparent 70%),
    radial-gradient(1000px 560px at 50% 110%, rgba(21,229,168,.14), transparent 72%),
    linear-gradient(180deg, #0c1118, #101722 52%, #12201b);
}
body[data-style="minimal"] {
  --brand: #9bb0a6;
  --brand-2: #8ba3b8;
  --accent: #c8b692;
  --rose: #c7a5b8;
}
body[data-style="minimal"] {
  background:
    linear-gradient(180deg, #fbfcfb, #f4f6f4 60%, #eff1ef);
}
body[data-style="minimal"]::before { opacity: .08; }
body[data-style="minimal"]::after { opacity: .45; filter: saturate(.65); }
body[data-style="minimal"] .hero-3d-layer { opacity: .4; filter: grayscale(.25) saturate(.6); }
body[data-style="minimal"] .btn.primary {
  background: linear-gradient(135deg, rgba(155,176,166,.14), rgba(139,163,184,.13), rgba(200,182,146,.10));
}
body[data-style="minimal"] .feature-card .icon {
  background: linear-gradient(135deg, rgba(155,176,166,.12), rgba(139,163,184,.10));
  border-color: rgba(155,176,166,.12);
}

/* Page transitions */
html.is-leaving body {
  opacity: .01;
}
body {
  transition: opacity .24s ease, filter .24s ease;
}
body.page-enter {
  opacity: 0;
  filter: blur(6px) saturate(.96);
}
body.page-enter-active {
  opacity: 1;
  filter: none;
  transition: opacity .28s ease, filter .32s ease;
}
.header, main.container, .footer {
  transition: transform .28s ease, opacity .28s ease;
}
body.page-enter .header,
body.page-enter main.container,
body.page-enter .footer {
  opacity: 0;
  transform: translateY(10px);
}
body.page-enter-active .header,
body.page-enter-active main.container,
body.page-enter-active .footer {
  opacity: 1;
  transform: none;
}

/* Additional hero visuals for weather/balance */
.page-hero {
  position: relative;
  overflow: hidden;
}
.page-hero-visual {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--surface-strong), rgba(255,255,255,.58));
  min-height: 170px;
  position: relative;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.76),
    inset 0 -1px 0 rgba(255,255,255,.12),
    0 16px 28px rgba(30,50,40,.06);
  overflow: hidden;
}
.page-hero-visual::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 16px;
  background:
    radial-gradient(16rem 8rem at 10% 10%, rgba(255,255,255,.24), transparent 72%),
    radial-gradient(16rem 8rem at 90% 0%, rgba(103,182,255,.12), transparent 72%);
  pointer-events: none;
}
.page-hero-glass-tag {
  position: absolute;
  right: 10px;
  bottom: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.65),
    0 10px 18px rgba(30,50,40,.05);
}
body[data-theme="night"] .page-hero-visual,
body[data-theme="night"] .page-hero-glass-tag {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    inset 0 -1px 0 rgba(255,255,255,.01),
    0 18px 30px rgba(0,0,0,.18);
}

/* Custom SVG logo */
.brand-mark {
  color: rgba(255,255,255,.95);
}
.brand-mark svg {
  display: block;
  width: 20px;
  height: 20px;
  filter: drop-shadow(0 1px 0 rgba(255,255,255,.18));
}


/* Anchor target visibility for balance page */
#balance-top,
#restaurant-plan {
  scroll-margin-top: 88px;
}
#balance-top:target,
#restaurant-plan:target {
  outline: 2px solid var(--m3-primary);
  outline-offset: 2px;
  background: color-mix(in oklab, var(--m3-primary) 8%, var(--m3-surface-container)) !important;
}
#restaurant-plan:target {
  box-shadow: var(--m3-elev-2) !important;
}
@media (max-width: 760px) {
  #balance-top,
  #restaurant-plan {
    scroll-margin-top: 72px;
  }
}
