/* =========================================================
   Liquid glass landing — loaded after DaisyUI style.css
   ========================================================= */

:root {
  --bg-a: #070a0e;
  --ink: #eef4f8;
  --muted: #96a8b8;
  --faint: #7f92a3;
  --line: rgba(255, 255, 255, .12);
  --line-strong: rgba(255, 255, 255, .22);
  --glass-a: rgba(255, 255, 255, .085);
  --glass-b: rgba(255, 255, 255, .025);
  --deck: rgba(20, 26, 34, .76);
  --nd: rgba(0, 0, 0, .55);
  --nl: rgba(255, 255, 255, .09);
  --inner: rgba(0, 0, 0, .24);
  --slab: rgba(0, 0, 0, .48);
  --lens: rgba(255, 255, 255, .13);
  --tooltip: rgba(8, 12, 16, .84);
  --shadow: rgba(0, 0, 0, .55);
  --fallback-card: rgba(12, 17, 23, .94);
  --teal: #5eead4;
  --sky: #7dd3fc;
  --violet: #a78bfa;
  --name-a: #f6fafc;
  --name-b: #7dd3fc;
  --name-hi: rgba(255, 255, 255, .1);
  --name-shadow: rgba(0, 0, 0, .45);
  --caret: #7dd3fc;
  --particle-rgb: 238, 244, 248;
  --particle-accent-rgb: 125, 211, 252;
  --rain-rgb: 176, 208, 232;
  --snow-rgb: 224, 238, 250;
  --drop-rgb: 220, 240, 255;
  --cloud-rgb: 150, 175, 200;
  --veil-cloud: rgba(50, 65, 80, .25);
  --veil-rain: rgba(20, 35, 50, .35);
  --veil-storm: rgba(5, 10, 18, .5);
  --veil-fog: rgba(90, 105, 120, .45);
  --veil-snow: rgba(220, 235, 250, .12);
  --veil-haze: rgba(90, 78, 62, .35);
  --veil-meteor: rgba(3, 8, 22, .32);
  --veil-aurora: rgba(3, 12, 26, .28);
  --meteor-rgb: 220, 240, 255;
  --caustic-a: rgba(94, 234, 212, .22);
  --caustic-b: rgba(167, 139, 250, .16);
  --hero-cloud: rgba(200, 220, 240, .12);

  /* pointer glint */
  --spec-core: rgba(255, 255, 255, .12);
  --spec-tint: rgba(125, 211, 252, .05);

  color-scheme: dark;
}

html[data-theme="day"] {
  --bg-a: #eef4f9;
  --ink: #0a1620;
  --muted: #455d70;
  --faint: #5d7385;
  --line: rgba(10, 22, 32, .12);
  --line-strong: rgba(10, 22, 32, .22);
  --glass-a: rgba(255, 255, 255, .58);
  --glass-b: rgba(255, 255, 255, .22);
  --deck: rgba(244, 247, 250, .8);
  --nd: rgba(100, 120, 140, .34);
  --nl: rgba(255, 255, 255, .95);
  --inner: rgba(90, 110, 135, .13);
  --slab: rgba(100, 120, 140, .25);
  --lens: rgba(255, 255, 255, .92);
  --tooltip: rgba(255, 255, 255, .96);
  --shadow: rgba(31, 58, 82, .18);
  --fallback-card: rgba(255, 255, 255, .95);
  --name-a: #0a1620;
  --name-b: #0e7490;
  --name-hi: rgba(255, 255, 255, .7);
  --name-shadow: rgba(20, 50, 75, .2);
  --caret: #0e7490;
  --particle-rgb: 10, 22, 32;
  --particle-accent-rgb: 14, 116, 144;
  --rain-rgb: 40, 75, 110;
  --snow-rgb: 70, 105, 140;
  --drop-rgb: 90, 130, 160;
  --cloud-rgb: 120, 145, 170;
  --veil-cloud: rgba(120, 140, 160, .16);
  --veil-rain: rgba(80, 110, 140, .2);
  --veil-storm: rgba(30, 45, 60, .25);
  --veil-fog: rgba(225, 235, 245, .55);
  --veil-snow: rgba(255, 255, 255, .35);
  --veil-haze: rgba(214, 194, 162, .3);
  --veil-meteor: rgba(70, 95, 120, .12);
  --veil-aurora: rgba(60, 95, 110, .1);
  --meteor-rgb: 20, 60, 100;
  --caustic-a: rgba(14, 165, 233, .2);
  --caustic-b: rgba(139, 92, 246, .12);
  --hero-cloud: rgba(40, 60, 80, .14);

  --spec-core: rgba(255, 255, 255, .55);
  --spec-tint: rgba(14, 165, 233, .12);

  color-scheme: light;
}

* { box-sizing: border-box; }

html {
  background: var(--bg-a);
  transition: background-color .55s ease;
}

html, body { min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .55s ease;
  background:
    radial-gradient(1100px 720px at 12% 6%, rgba(45, 212, 191, .12), transparent 62%),
    radial-gradient(900px 640px at 88% 4%, rgba(139, 92, 246, .13), transparent 60%),
    radial-gradient(900px 700px at 50% 110%, rgba(56, 189, 248, .10), transparent 62%),
    var(--bg-a);
  transition: color .45s ease, background-color .55s ease;
}

/* film grain, background only */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

html[data-theme="day"] body::after {
  opacity: .03;
  mix-blend-mode: multiply;
}

/* ---------- ambient aurora ---------- */
.aurora {
  position: fixed;
  inset: -20vmax;
  z-index: 0;
  pointer-events: none;
  transition: filter .8s ease;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px) saturate(115%);
  will-change: transform;
  transition: filter .8s ease, opacity .8s ease;
}

.b1 {
  width: 58vmax;
  height: 58vmax;
  left: 2%;
  top: -14%;
  opacity: .42;
  background: radial-gradient(circle at 35% 35%, var(--teal), transparent 64%);
  animation: drift-a 26s ease-in-out infinite alternate;
}

.b2 {
  width: 52vmax;
  height: 52vmax;
  right: -4%;
  top: -6%;
  opacity: .38;
  background: radial-gradient(circle at 55% 45%, var(--violet), transparent 64%);
  animation: drift-b 31s ease-in-out infinite alternate;
}

.b3 {
  width: 62vmax;
  height: 62vmax;
  left: 22%;
  bottom: -32%;
  opacity: .34;
  background: radial-gradient(circle at 50% 50%, var(--sky), transparent 62%);
  animation: drift-c 36s ease-in-out infinite alternate;
}

html[data-theme="day"] .blob {
  opacity: .30;
  filter: blur(88px) saturate(120%);
}

@keyframes drift-a { to { transform: translate3d(9vmax, 6vmax, 0) scale(1.12); } }
@keyframes drift-b { to { transform: translate3d(-8vmax, 9vmax, 0) scale(1.08); } }
@keyframes drift-c { to { transform: translate3d(6vmax, -7vmax, 0) scale(1.15); } }

/* ---------- science field ---------- */
.science-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.4s ease;
}

.science-field.in { opacity: .85; }
html[data-theme="day"] .science-field.in { opacity: .72; }

/* ---------- flip clock ---------- */
.flip-clock {
  position: fixed;
  top: 22px;
  left: 24px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  user-select: none;
}

.flip-digit {
  position: relative;
  width: 26px;
  height: 36px;
  border-radius: 7px;
  background: var(--deck);
  box-shadow:
    -2px 2px 5px var(--nd),
    2px -2px 5px var(--nl),
    inset 0 1px 0 rgba(255, 255, 255, .28);
  perspective: 520px;
}

.flip-digit::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  z-index: 6;
  height: 1px;
  background: var(--line);
  opacity: .85;
}

.flip-half {
  position: absolute;
  left: 0;
  right: 0;
  height: 50%;
  overflow: hidden;
  background: var(--deck);
}

.flip-top { top: 0; border-radius: 7px 7px 0 0; }
.flip-bottom { bottom: 0; border-radius: 0 0 7px 7px; }

.flip-pane {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 36px;
  display: grid;
  place-items: center;
}

.flip-bottom .flip-pane,
.flap-back .flip-pane { top: -18px; }

.flip-value {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
}

.flip-flap {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 4;
  height: 50%;
  transform-origin: bottom center;
  transform-style: preserve-3d;
}

.flip-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--deck);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.flap-front { border-radius: 7px 7px 0 0; }

.flap-back {
  border-radius: 0 0 7px 7px;
  transform: rotateX(180deg);
}

.flip-digit.flipping .flip-flap {
  animation: flap-turn .62s cubic-bezier(.45, 0, .55, 1);
}

@keyframes flap-turn {
  to { transform: rotateX(-180deg); }
}

.flip-sep {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 8px;
  height: 36px;
  animation: colon-blink 1s steps(1, end) infinite;
}

.flip-sep i {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink);
  opacity: .78;
  box-shadow: 0 0 8px rgba(125, 211, 252, .35);
}

@keyframes colon-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: .32; }
}

/* ---------- weather ---------- */
.clouds {
  position: fixed;
  inset: -12%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  filter: blur(38px);
  transition: opacity 1.2s ease;
}

.cloud {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(ellipse at 40% 38%,
    rgba(var(--cloud-rgb), .6),
    rgba(var(--cloud-rgb), .24) 52%,
    transparent 72%);
  will-change: transform;
}

.c1 { width: 56vw; height: 28vw; left: 2%; top: 8%; opacity: .8; animation: cloud-a 58s ease-in-out infinite alternate; }
.c2 { width: 46vw; height: 24vw; right: 0%; top: 18%; opacity: .6; animation: cloud-b 72s ease-in-out infinite alternate; }
.c3 { width: 62vw; height: 30vw; left: 18%; bottom: 2%; opacity: .5; animation: cloud-c 82s ease-in-out infinite alternate; }
.c4 { width: 40vw; height: 20vw; right: 14%; bottom: 10%; opacity: .66; animation: cloud-d 66s ease-in-out infinite alternate; }

@keyframes cloud-a { to { transform: translate3d(9vw, 3vw, 0) scale(1.12); } }
@keyframes cloud-b { to { transform: translate3d(-8vw, 5vw, 0) scale(1.08); } }
@keyframes cloud-c { to { transform: translate3d(6vw, -4vw, 0) scale(1.15); } }
@keyframes cloud-d { to { transform: translate3d(-5vw, -3vw, 0) scale(1.1); } }

html[data-weather="partly"] .clouds { opacity: .5; }
html[data-weather="cloudy"] .clouds { opacity: .88; }
html[data-weather="haze"] .clouds { opacity: .22; }
html[data-weather="drizzle"] .clouds { opacity: .62; }
html[data-weather="rain"] .clouds { opacity: .82; }
html[data-weather="storm"] .clouds { opacity: .92; }
html[data-weather="hail"] .clouds { opacity: .86; }
html[data-weather="sleet"] .clouds { opacity: .78; }
html[data-weather="snow"] .clouds { opacity: .68; }
html[data-weather="blizzard"] .clouds { opacity: .95; }
html[data-weather="fog"] .clouds { opacity: .32; }
html[data-weather="rainbow"] .clouds { opacity: .16; }

.rainbow {
  position: fixed;
  left: 100%;
  top: 100%;
  width: 120vmax;
  height: 120vmax;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  filter: blur(4px);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle,
    transparent 0 47.2%,
    rgba(255, 99, 132, .13) 47.7%,
    rgba(255, 205, 86, .13) 49.1%,
    rgba(133, 255, 150, .12) 50.5%,
    rgba(94, 234, 212, .12) 51.9%,
    rgba(125, 211, 252, .12) 53.3%,
    rgba(167, 139, 250, .1) 54.7%,
    transparent 55.5%);
  transition: opacity 1.2s ease;
}

html[data-weather="rainbow"] .rainbow { opacity: .85; }
html[data-theme="night"][data-weather="rainbow"] .rainbow { opacity: .55; }

/* meteor shower */
.meteors {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease;
}

html[data-weather="meteor"] .meteors { opacity: 1; }

.meteors span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--len, 90px);
  height: 1px;
  border-radius: 999px;
  opacity: 0;
  background: linear-gradient(90deg,
    rgba(255, 255, 255, .95),
    rgba(var(--meteor-rgb), .75) 45%,
    transparent);
  box-shadow: 0 0 8px rgba(var(--meteor-rgb), .35);
  transform-origin: right center;
  animation: meteor-fall var(--dur, 6s) linear var(--delay, 0s) infinite;
  will-change: transform, opacity;
}

.meteors span::after {
  content: "";
  position: absolute;
  left: -1px;
  top: -1.5px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 0 10px 2px rgba(var(--meteor-rgb), .55);
}

@keyframes meteor-fall {
  0% { transform: translate3d(0, 0, 0) rotate(-28deg); opacity: 0; }
  7% { opacity: .95; }
  24% { opacity: .85; }
  40%, 100% { transform: translate3d(-42vw, 26vh, 0) rotate(-28deg); opacity: 0; }
}

/* polar lights */
.polar-lights {
  position: fixed;
  inset: -8% -4% 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
  transition: opacity 1.4s ease;
}

html[data-theme="day"] .polar-lights { mix-blend-mode: multiply; }
html[data-weather="aurora"] .polar-lights { opacity: 1; }
html[data-theme="day"][data-weather="aurora"] .polar-lights { opacity: .5; }

.polar {
  position: absolute;
  top: -22%;
  width: 40vw;
  height: 105vh;
  border-radius: 46% 54% 40% 60% / 58% 44% 56% 42%;
  opacity: .62;
  filter: blur(24px) saturate(150%);
  transform: rotate(var(--rot, 8deg));
  transform-origin: top center;
  background:
    repeating-linear-gradient(94deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 16px),
    linear-gradient(180deg,
      transparent 2%,
      rgba(94, 234, 212, .78) 24%,
      rgba(125, 211, 252, .58) 50%,
      rgba(167, 139, 250, .55) 74%,
      transparent 98%);
  animation: polar-sway 18s ease-in-out infinite alternate;
  will-change: transform;
}

.polar.p1 { left: -4%; --rot: 10deg; }

.polar.p2 {
  left: 30%;
  width: 34vw;
  --rot: -9deg;
  opacity: .5;
  animation-duration: 22s;
  animation-delay: -6s;
  background:
    repeating-linear-gradient(96deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 18px),
    linear-gradient(180deg,
      transparent 4%,
      rgba(167, 139, 250, .75) 28%,
      rgba(94, 234, 212, .55) 56%,
      rgba(125, 211, 252, .5) 78%,
      transparent 98%);
}

.polar.p3 {
  right: -6%;
  width: 32vw;
  --rot: 5deg;
  opacity: .45;
  animation-duration: 19s;
  animation-delay: -3s;
  background:
    repeating-linear-gradient(92deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 15px),
    linear-gradient(180deg,
      transparent 3%,
      rgba(125, 211, 252, .75) 24%,
      rgba(94, 234, 212, .52) 54%,
      rgba(167, 139, 250, .55) 76%,
      transparent 98%);
}

@keyframes polar-sway {
  from { transform: rotate(var(--rot, 8deg)) translate3d(0, 0, 0) scaleX(1); }
  to { transform: rotate(calc(var(--rot, 8deg) - 8deg)) translate3d(5vw, 3vh, 0) scaleX(1.12); }
}

html[data-weather="meteor"] .clouds,
html[data-weather="aurora"] .clouds { opacity: .12; }

html[data-weather="meteor"] .celestial { opacity: .35; }
html[data-weather="aurora"] .celestial { opacity: .28; }

html[data-weather="meteor"] .science-field.in,
html[data-weather="aurora"] .science-field.in { opacity: .55; }

html[data-weather="meteor"] .weather-veil {
  opacity: 1;
  background: var(--veil-meteor);
}

html[data-weather="aurora"] .weather-veil {
  opacity: 1;
  background: var(--veil-aurora);
}

.celestial {
  position: fixed;
  z-index: 0;
  right: 7%;
  top: 3%;
  width: min(330px, 42vw);
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle, rgba(255, 220, 150, .34), rgba(255, 220, 150, .1) 38%, transparent 70%);
  filter: blur(14px);
  transition: opacity 1.2s ease;
}

html[data-theme="night"] .celestial {
  background: radial-gradient(circle, rgba(180, 220, 255, .24), rgba(180, 220, 255, .07) 40%, transparent 70%);
}

html[data-weather="clear"] .celestial,
html[data-weather="partly"] .celestial,
html[data-weather="rainbow"] .celestial { opacity: .8; }
html[data-weather="haze"] .celestial { opacity: .35; }
html[data-weather="cloudy"] .celestial { opacity: .18; }
html[data-weather="drizzle"] .celestial,
html[data-weather="rain"] .celestial,
html[data-weather="storm"] .celestial,
html[data-weather="hail"] .celestial,
html[data-weather="sleet"] .celestial,
html[data-weather="snow"] .celestial,
html[data-weather="blizzard"] .celestial,
html[data-weather="fog"] .celestial { opacity: 0; }

.weather-field {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity .8s ease;
}

html[data-weather="drizzle"] .weather-field,
html[data-weather="rain"] .weather-field,
html[data-weather="storm"] .weather-field,
html[data-weather="hail"] .weather-field,
html[data-weather="sleet"] .weather-field,
html[data-weather="snow"] .weather-field,
html[data-weather="blizzard"] .weather-field { opacity: 1; }

.weather-veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1s ease, background .8s ease;
}

html[data-weather="cloudy"] .weather-veil {
  opacity: 1;
  background: var(--veil-cloud);
}

html[data-weather="drizzle"] .weather-veil {
  opacity: .65;
  background: var(--veil-rain);
}

html[data-weather="rain"] .weather-veil {
  opacity: 1;
  background: var(--veil-rain);
}

html[data-weather="storm"] .weather-veil {
  opacity: 1;
  background: var(--veil-storm);
}

html[data-weather="hail"] .weather-veil {
  opacity: .9;
  background: var(--veil-rain);
}

html[data-weather="sleet"] .weather-veil {
  opacity: .8;
  background: var(--veil-rain);
}

html[data-weather="snow"] .weather-veil {
  opacity: 1;
  background: var(--veil-snow);
}

html[data-weather="blizzard"] .weather-veil {
  opacity: 1;
  background: var(--veil-snow);
}

html[data-weather="haze"] .weather-veil {
  opacity: 1;
  background: var(--veil-haze);
  -webkit-backdrop-filter: blur(1.5px);
  backdrop-filter: blur(1.5px);
}

html[data-weather="fog"] .weather-veil {
  opacity: 1;
  background: var(--veil-fog);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.lightning {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
  background: radial-gradient(ellipse at 72% 8%, rgba(220, 235, 255, .9), transparent 55%);
}

.lightning.flash { animation: lightning-flash .7s ease; }

@keyframes lightning-flash {
  0%, 100% { opacity: 0; }
  8% { opacity: .8; }
  14% { opacity: .08; }
  22% { opacity: .62; }
  36% { opacity: 0; }
}

html[data-weather="partly"] .aurora { filter: saturate(.82); }
html[data-weather="cloudy"] .aurora { filter: saturate(.65) brightness(.95); }
html[data-weather="drizzle"] .aurora { filter: saturate(.62) brightness(.92); }
html[data-weather="rain"] .aurora { filter: saturate(.55) brightness(.86); }
html[data-weather="storm"] .aurora { filter: saturate(.45) brightness(.72); }
html[data-weather="hail"] .aurora { filter: saturate(.52) brightness(.78); }
html[data-weather="sleet"] .aurora { filter: saturate(.6) brightness(.94); }
html[data-weather="snow"] .aurora { filter: saturate(.65) brightness(1.06); }
html[data-weather="blizzard"] .aurora { filter: saturate(.5) brightness(1.08); }
html[data-weather="haze"] .aurora { filter: blur(3px) sepia(.18) saturate(.7) brightness(1.04); }
html[data-weather="rainbow"] .aurora { filter: saturate(1.12) brightness(1.02); }
html[data-weather="fog"] .aurora { filter: blur(6px) saturate(.45) brightness(1.04); }

html[data-weather="rain"] .science-field.in,
html[data-weather="storm"] .science-field.in,
html[data-weather="hail"] .science-field.in,
html[data-weather="sleet"] .science-field.in,
html[data-weather="blizzard"] .science-field.in { opacity: .55; }
html[data-weather="drizzle"] .science-field.in { opacity: .7; }
html[data-weather="haze"] .science-field.in { opacity: .52; }
html[data-weather="rainbow"] .science-field.in { opacity: .78; }
html[data-weather="fog"] .science-field.in { opacity: .35; }

/* segmented switches */
.controls {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  right: max(20px, env(safe-area-inset-right));
  z-index: 20;
  display: flex;
  gap: 8px;
}

.seg {
  position: relative;
  display: flex;
  padding: 4px;
  border: 0;
  border-radius: 999px;
  background: var(--deck);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow:
    inset -3px 3px 6px var(--nd),
    inset 3px -3px 6px var(--nl),
    0 1px 0 rgba(255, 255, 255, .12);
  transition: background .4s ease, box-shadow .4s ease;
}

@supports not (backdrop-filter: blur(1px)) {
  .seg { background: var(--fallback-card); }
}

.seg-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  height: 32px;
  border-radius: 999px;
  pointer-events: none;
  background: var(--deck);
  box-shadow:
    -3px 3px 7px var(--nd),
    3px -3px 7px var(--nl),
    inset 0 1px 0 rgba(255, 255, 255, .42);
  transition:
    transform .55s cubic-bezier(.34, 1.4, .64, 1),
    background .5s ease,
    box-shadow .4s ease;
}

.seg-theme { --thumb-w: 32px; }
.seg-lang { --thumb-w: 40px; }
.seg-thumb { width: var(--thumb-w); }

.seg-theme .seg-thumb {
  left: 6px;
  border-radius: 50%;
}

html[data-theme-mode="day"] .seg-theme .seg-thumb {
  transform: translateX(36px);
}

html[data-theme-mode="night"] .seg-theme .seg-thumb {
  transform: translateX(72px);
}

html[data-lang="zh"] .seg-lang .seg-thumb {
  transform: translateX(40px);
}

html[data-lang="de"] .seg-lang .seg-thumb {
  transform: translateX(80px);
}

.seg button {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: color .3s ease, transform .25s cubic-bezier(.34, 1.4, .64, 1);
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
}

.seg-lang button {
  width: 40px;
  padding-top: 1px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .02em;
}

.seg-lang button[data-lang-option="zh"] {
  padding-top: 0;
  font-size: 12px;
}

.seg-lang button[data-lang-option="de"] { font-size: 11px; }

.seg button:active { transform: scale(.9); }
.seg button:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }
.seg button svg { width: 16px; height: 16px; }

html[data-theme-mode="auto"] .seg-theme [data-theme-option="auto"],
html[data-theme-mode="day"] .seg-theme [data-theme-option="day"],
html[data-theme-mode="night"] .seg-theme [data-theme-option="night"],
html[data-lang="en"] .seg-lang [data-lang-option="en"],
html[data-lang="zh"] .seg-lang [data-lang-option="zh"],
html[data-lang="de"] .seg-lang [data-lang-option="de"] {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- layout ---------- */
.stage {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: max(88px, calc(env(safe-area-inset-top) + 64px)) 20px 48px;
}

/* ---------- the glass card ---------- */
.hero {
  position: relative;
  width: min(760px, 100%);
}

.hero.quake {
  animation: hero-quake .6s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes hero-quake {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0); }
  10%, 90% { transform: translate3d(-2px, 1px, 0) rotate(-.15deg); }
  20%, 80% { transform: translate3d(3px, -1px, 0) rotate(.2deg); }
  30%, 50%, 70% { transform: translate3d(-4px, 2px, 0) rotate(-.2deg); }
  40%, 60% { transform: translate3d(4px, -2px, 0) rotate(.2deg); }
}

.card-shadow {
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: -22px;
  height: 48px;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(ellipse at center, var(--caustic-a), var(--caustic-b) 45%, transparent 72%);
  filter: blur(20px);
  opacity: .84;
  transform: translate3d(var(--shx, 0), var(--shy, 0), 0);
  transition: opacity .6s ease, background .6s ease;
}

html[data-weather="drizzle"] .card-shadow { opacity: .7; }
html[data-weather="rain"] .card-shadow,
html[data-weather="storm"] .card-shadow { opacity: .55; }
html[data-weather="hail"] .card-shadow,
html[data-weather="sleet"] .card-shadow,
html[data-weather="blizzard"] .card-shadow { opacity: .55; }
html[data-weather="haze"] .card-shadow { opacity: .7; }
html[data-weather="rainbow"] .card-shadow { opacity: .95; }

.glass-card {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 48px 52px 32px;
  border-radius: 30px;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(150deg,
    var(--glass-a) 0%,
    var(--glass-b) 42%,
    rgba(255, 255, 255, 0) 100%);
  -webkit-backdrop-filter: blur(28px) saturate(165%);
  backdrop-filter: blur(28px) saturate(165%);
  box-shadow:
    0 14px 0 -10px var(--slab),
    0 40px 90px -30px var(--shadow),
    0 12px 26px -18px var(--shadow),
    inset 0 1px 2px var(--nl),
    inset 0 -10px 20px var(--inner);
  animation: card-in .9s cubic-bezier(.22, .8, .28, 1) both;
  transition: background .5s ease, box-shadow .5s ease;
}

@supports not (backdrop-filter: blur(1px)) {
  .glass-card { background: var(--fallback-card); }
}

/* 1px specular edge */
.glass-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(155deg,
    rgba(255, 255, 255, .55),
    rgba(255, 255, 255, .08) 30%,
    rgba(255, 255, 255, 0) 58%,
    rgba(255, 255, 255, .22));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: .9;
}

html[data-theme="day"] .glass-card::before {
  background: linear-gradient(155deg,
    rgba(255, 255, 255, .95),
    rgba(255, 255, 255, .35) 30%,
    rgba(255, 255, 255, 0) 58%,
    rgba(10, 22, 32, .12));
}

/* pointer-following specular: bright core + faint tint + lens ring */
.glass-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity .45s ease;
  background:
    radial-gradient(160px circle at var(--mx, 50%) var(--my, 0%),
      var(--spec-core), transparent 70%),
    radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%),
      var(--spec-tint), transparent 75%);
}

.glass-card:hover::after { opacity: 1; }

@keyframes card-in {
  from { opacity: 0; transform: translateY(18px) scale(.985); filter: blur(8px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

.glass-card > * {
  position: relative;
  z-index: 3;
}

.card-weather {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity .7s ease;
}

html[data-weather="drizzle"] .card-weather { opacity: .55; }
html[data-weather="rain"] .card-weather,
html[data-weather="storm"] .card-weather { opacity: .75; }
html[data-weather="sleet"] .card-weather { opacity: .6; }

.hero-atmosphere {
  position: absolute;
  inset: 0;
  z-index: 6;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity .8s ease, background .8s ease;
}

html[data-weather="fog"] .hero-atmosphere {
  opacity: .74;
  background: linear-gradient(180deg, rgba(240, 246, 250, .64), rgba(215, 228, 238, .34) 55%, rgba(235, 243, 248, .52));
  -webkit-backdrop-filter: blur(2.6px);
  backdrop-filter: blur(2.6px);
}

html[data-theme="night"][data-weather="fog"] .hero-atmosphere {
  background: linear-gradient(180deg, rgba(90, 105, 120, .55), rgba(55, 70, 85, .3) 55%, rgba(90, 105, 120, .45));
}

html[data-weather="haze"] .hero-atmosphere {
  opacity: .52;
  background: linear-gradient(180deg, rgba(235, 215, 185, .4), rgba(210, 190, 160, .16) 62%, rgba(235, 225, 210, .3));
  -webkit-backdrop-filter: blur(1.2px);
  backdrop-filter: blur(1.2px);
}

html[data-theme="night"][data-weather="haze"] .hero-atmosphere {
  background: linear-gradient(180deg, rgba(120, 100, 80, .38), rgba(70, 60, 48, .14) 60%, rgba(110, 95, 78, .3));
}

html[data-weather="cloudy"] .hero-atmosphere,
html[data-weather="partly"] .hero-atmosphere {
  opacity: .65;
  background: linear-gradient(100deg, transparent 4%, var(--hero-cloud) 30%, transparent 54%, var(--hero-cloud) 78%, transparent 96%);
  background-size: 220% 100%;
  animation: hero-cloud 28s ease-in-out infinite alternate;
}

@keyframes hero-cloud {
  to { background-position: 100% 0; }
}

html[data-weather="snow"] .hero-atmosphere,
html[data-weather="blizzard"] .hero-atmosphere {
  opacity: .82;
  background: linear-gradient(180deg, rgba(255, 255, 255, .56), rgba(255, 255, 255, .14) 22%, transparent 48%);
}

html[data-theme="night"][data-weather="snow"] .hero-atmosphere,
html[data-theme="night"][data-weather="blizzard"] .hero-atmosphere {
  background: linear-gradient(180deg, rgba(225, 240, 252, .3), rgba(225, 240, 252, .08) 22%, transparent 48%);
}

html[data-weather="sleet"] .hero-atmosphere {
  opacity: .6;
  background: linear-gradient(180deg, rgba(235, 245, 252, .4), transparent 30%);
}

html[data-weather="hail"] .hero-atmosphere {
  opacity: .38;
  background: linear-gradient(180deg, rgba(215, 232, 245, .25), transparent 26%);
}

html[data-weather="rainbow"] .hero-atmosphere {
  opacity: .55;
  background: linear-gradient(120deg,
    rgba(255, 99, 132, .06),
    rgba(255, 205, 86, .08),
    rgba(94, 234, 212, .07),
    rgba(125, 211, 252, .08),
    rgba(167, 139, 250, .06));
}

.rise { animation: rise .8s cubic-bezier(.22, .8, .28, 1) both; }
.rise-1 { animation-delay: .08s; }
.rise-2 { animation-delay: .16s; }
.rise-3 { animation-delay: .24s; }
.rise-4 { animation-delay: .32s; }

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

/* language wash across the card */
.lang-wash {
  position: absolute;
  inset: 0;
  z-index: 4 !important;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-110%);
  background: linear-gradient(105deg,
    transparent 18%,
    rgba(94, 234, 212, .22) 38%,
    rgba(167, 139, 250, .22) 55%,
    transparent 74%);
}

body.lang-switching .lang-wash {
  animation: lang-wash .8s cubic-bezier(.4, 0, .2, 1);
}

@keyframes lang-wash {
  0% { opacity: 0; transform: translateX(-110%); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translateX(110%); }
}

/* ---------- content ---------- */
h1 {
  width: fit-content;
  margin: 0;
  font-family: "IBM Plex Mono", ui-monospace, "Courier New", monospace;
  font-size: clamp(2.9rem, 7.4vw, 4.7rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.045em;
  background: linear-gradient(105deg, var(--name-a) 6%, var(--name-b) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter:
    drop-shadow(0 1px 0 var(--name-hi))
    drop-shadow(0 10px 20px var(--name-shadow));
}

@supports not ((background-clip: text) or (-webkit-background-clip: text)) {
  h1 {
    color: var(--ink);
    -webkit-text-fill-color: var(--ink);
    background: none;
  }
}

.tagline {
  min-height: 1.5em;
  margin: 16px 0 0;
  font-family: "Instrument Serif", "Songti SC", "STSong", "SimSun", Georgia, serif;
  font-size: clamp(1.4rem, 2.9vw, 1.9rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: .005em;
  color: var(--muted);
  transition: opacity .22s ease;
}

.caret {
  display: inline-block;
  width: 2px;
  height: .95em;
  margin-left: 4px;
  vertical-align: -.08em;
  border-radius: 1px;
  background: var(--caret);
  animation: caret-blink 1.05s steps(1, end) infinite;
}

@keyframes caret-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.caret.done {
  opacity: 0;
  animation: none;
  transition: opacity .4s ease;
}

body.lang-out .tagline { opacity: 0; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.hairline {
  height: 1px;
  margin: 30px 0 22px;
  border: 0;
  background: linear-gradient(90deg, var(--line-strong), var(--line) 40%, transparent);
}

/* ---------- fluid dock ---------- */
.socials {
  position: relative;
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  justify-items: center;
  gap: 4px;
  width: 100%;
  max-width: 100%;
  padding: 6px;
  border: 0;
  border-radius: 20px;
  background: var(--deck);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  box-shadow:
    inset -3px 3px 6px var(--nd),
    inset 3px -3px 6px var(--nl),
    0 12px 24px -20px var(--shadow);
  touch-action: pan-y;
  transition: background .4s ease, box-shadow .4s ease;
}

.hover-lens {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 46px;
  border-radius: 14px;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(180deg, var(--lens), rgba(255, 255, 255, .05));
  border: 0;
  box-shadow:
    -2px 2px 5px var(--nd),
    2px -2px 5px var(--nl),
    inset 0 1px 0 rgba(255, 255, 255, .45);
  transition:
    transform .42s cubic-bezier(.34, 1.45, .64, 1),
    width .42s cubic-bezier(.34, 1.45, .64, 1),
    height .42s cubic-bezier(.34, 1.45, .64, 1),
    background .4s ease,
    opacity .2s ease;
}

.socials a {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  color: var(--muted);
  text-decoration: none;
  font-size: 17px;
  transition: color .25s ease, transform .25s cubic-bezier(.34, 1.45, .64, 1);
  -webkit-tap-highlight-color: transparent;
}

.socials a:hover,
.socials a:focus-visible { color: var(--ink); }

.socials a:hover i,
.socials a:focus-visible i { transform: translateY(-2px) scale(1.1); }

.socials a i { transition: transform .3s cubic-bezier(.34, 1.45, .64, 1); }
.socials a:active { transform: scale(.9); }
.socials a:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }

.dock-label { display: none; }

.socials a::after {
  content: attr(data-label-en);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 13px);
  transform: translate(-50%, 5px);
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--tooltip);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: opacity .18s ease, transform .18s ease;
}

html[data-lang="zh"] .socials a::after { content: attr(data-label-zh); }
html[data-lang="de"] .socials a::after { content: attr(data-label-de); }

.socials a:hover::after,
.socials a:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }

/* ---------- footer ---------- */
.card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 26px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .005em;
  color: var(--faint);
}

.site-stats {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.site-stats > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.site-stats .sep { opacity: .55; }

.site-stats i { font-size: 10px; opacity: .8; }

/* ---------- i18n ---------- */
.i18n > [lang] { display: none; }

html[data-lang="en"] .i18n > [lang="en"],
html[data-lang="zh"] .i18n > [lang="zh"],
html[data-lang="de"] .i18n > [lang="de"] { display: inline; }

.i18n { transition: opacity .22s ease; }
body.lang-out .i18n { opacity: 0; }

/* ---------- weather wheel ---------- */
.weather-fab {
  position: fixed;
  right: 16px;
  top: 50%;
  z-index: 46;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--deck);
  color: var(--muted);
  box-shadow:
    -3px 3px 7px var(--nd),
    3px -3px 7px var(--nl),
    inset 0 1px 0 rgba(255, 255, 255, .32);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background .4s ease, color .3s ease, transform .3s ease, box-shadow .3s ease;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
}

.weather-fab:hover { color: var(--ink); }
.weather-fab:active { transform: translateY(-50%) scale(.93); }
.weather-fab:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; }
.weather-fab i { font-size: 17px; }
.weather-fab .fa-xmark { display: none; }
.weather-fab[aria-expanded="true"] { color: var(--ink); }
.weather-fab[aria-expanded="true"] .fa-cloud-sun { display: none; }
.weather-fab[aria-expanded="true"] .fa-xmark { display: block; }

.weather-wheel {
  position: fixed;
  inset: 0;
  z-index: 44;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, visibility 0s .35s;
}

.weather-wheel.on {
  opacity: 1;
  visibility: visible;
  transition: opacity .35s ease;
  touch-action: none;
}

.weather-wheel.on .weather-node,
.weather-wheel.on .weather-wheel-hit,
.weather-wheel.on .weather-wheel-nodes { touch-action: none; }

.weather-wheel-rim {
  position: fixed;
  right: 0;
  top: 50%;
  width: calc(var(--wheel-r, 220px) * 2);
  height: calc(var(--wheel-r, 220px) * 2);
  border: 1px solid var(--line);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(50%, -50%);
  opacity: .4;
}

.weather-wheel-hit {
  position: fixed;
  right: 0;
  top: 50%;
  width: var(--wheel-r, 220px);
  height: calc(var(--wheel-r, 220px) * 2);
  z-index: 1;
  pointer-events: auto;
  transform: translateY(-50%);
  touch-action: none;
}

.weather-wheel-nodes {
  position: absolute;
  inset: 0;
  z-index: 2;
  transform-origin: 50% 50%;
  transition: transform .55s cubic-bezier(.22, .8, .28, 1);
  will-change: transform;
}

.weather-node {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 78px;
  max-width: 78px;
  padding: 8px 6px 7px;
  border: 0;
  border-radius: 15px;
  background: var(--deck);
  color: var(--muted);
  box-shadow:
    -2px 2px 5px var(--nd),
    2px -2px 5px var(--nl),
    inset 0 1px 0 rgba(255, 255, 255, .28);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 9px;
  font-weight: 500;
  line-height: 1.15;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(.8);
  transition:
    opacity .35s ease,
    transform .55s cubic-bezier(.22, .8, .28, 1),
    color .25s ease,
    box-shadow .25s ease;
}

.weather-wheel.gliding .weather-wheel-nodes { transition-duration: .24s; }
.weather-wheel.gliding .weather-node { transition-duration: .24s; }

.weather-wheel.snapping .weather-wheel-nodes {
  transition: none;
}

.weather-wheel.snapping .weather-node {
  transition:
    opacity .2s ease,
    color .25s ease,
    box-shadow .25s ease;
}

.weather-node i { font-size: 16px; }
.weather-node span { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.weather-node.active {
  color: var(--ink);
  box-shadow:
    -4px 4px 9px var(--nd),
    4px -4px 9px var(--nl),
    inset 0 1px 0 rgba(255, 255, 255, .4),
    0 0 26px -8px var(--caustic-a);
}

/* ---------- weather lab (easter egg) ---------- */
[hidden] { display: none !important; }

.weather-lab {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 45;
  width: min(680px, calc(100% - 24px));
  padding: 14px 16px;
  border-radius: 22px;
  background: var(--deck);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .26),
    inset 0 -8px 18px var(--inner),
    0 24px 60px -24px var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition: opacity .3s ease, transform .4s cubic-bezier(.2, .8, .2, 1);
}

.weather-lab.on {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.weather-lab-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.weather-lab-head b {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
}

.weather-lab-head span {
  margin-right: auto;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 10px;
  color: var(--faint);
}

.weather-lab-close {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font: 400 17px/1 Inter, sans-serif;
  cursor: pointer;
}

.weather-lab-close:hover { color: var(--ink); background: rgba(255, 255, 255, .08); }

.weather-lab-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
  margin-top: 10px;
}

.weather-lab-grid button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 2px 7px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 8.5px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: color .25s ease, background .25s ease, box-shadow .25s ease;
}

.weather-lab-grid button i { font-size: 14px; }

.weather-lab-grid button:hover { color: var(--ink); background: rgba(255, 255, 255, .06); }

.weather-lab-grid button.active {
  color: var(--ink);
  background: var(--glass-a);
  box-shadow:
    inset -2px 2px 4px var(--nd),
    inset 2px -2px 4px var(--nl);
}

.weather-lab-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.weather-lab-foot > span {
  margin-right: auto;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 10px;
  color: var(--faint);
}

.weather-lab-foot button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
}

.weather-lab-foot button i { font-size: 10px; }
.weather-lab-foot button:hover { color: var(--ink); }
.weather-lab-foot button.active {
  color: var(--ink);
  background: var(--glass-a);
  box-shadow: inset -2px 2px 4px var(--nd), inset 2px -2px 4px var(--nl);
}

/* ---------- theme wash ---------- */
.theme-wash {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0;
  background-color: var(--bg-a);
  background-image:
    radial-gradient(620px circle at var(--tx, 50%) var(--ty, 50%),
      rgba(94, 234, 212, .16),
      rgba(167, 139, 250, .1) 38%,
      transparent 68%);
  transition: opacity .38s ease, background-color .45s ease;
}

.theme-wash.on { opacity: .94; pointer-events: auto; }

/* ---------- 404 ---------- */
.stage-404 { padding: 24px; }

.not-found {
  max-width: 520px;
  padding: 46px 40px 40px;
  text-align: center;
}

.not-found-code {
  margin: 0;
  color: var(--muted);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: .32em;
}

.not-found h1 {
  margin: 14px 0 10px;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(2.4rem, 7vw, 3.6rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.1;
}

.not-found p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.not-found-link {
  display: inline-flex;
  align-items: center;
  margin-top: 24px;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--deck);
  color: var(--ink);
  box-shadow:
    -2px 2px 6px var(--nd),
    2px -2px 6px var(--nl),
    inset 0 1px 0 rgba(255, 255, 255, .3);
  font-size: 13px;
  text-decoration: none;
  transition: color .25s ease, box-shadow .25s ease;
}

.not-found-link:hover {
  color: var(--teal);
  box-shadow:
    -3px 3px 8px var(--nd),
    3px -3px 8px var(--nl),
    inset 0 1px 0 rgba(255, 255, 255, .4);
}

.not-found-link:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; }

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  .theme-wash { display: none; }
  .weather-wheel-rim { display: none; }
  .glass-card {
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    backdrop-filter: blur(18px) saturate(150%);
  }
  .blob { filter: blur(60px) saturate(115%); }
  .clouds { filter: blur(26px); }
  .controls {
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    gap: 6px;
  }
  .flip-clock { display: none; }
  .stage { padding: max(96px, calc(env(safe-area-inset-top) + 80px)) 12px 92px; }
  .glass-card { padding: 34px 22px 26px; border-radius: 26px; }
  h1 { font-size: clamp(2.5rem, 11vw, 3.4rem); }
  .tagline { font-size: clamp(1.35rem, 5.8vw, 1.6rem); }
  .socials {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-items: center;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    padding: 10px;
    overflow: visible;
  }
  .socials a {
    width: 100%;
    height: 52px;
    font-size: 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
  }
  .socials a::after { display: none; }
  .dock-label {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: var(--muted);
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    font-size: 8px;
    line-height: 1.1;
    font-weight: 500;
    letter-spacing: .01em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .card-foot { flex-direction: column; align-items: flex-start; }
  .weather-lab {
    bottom: max(12px, env(safe-area-inset-bottom));
    padding: 12px;
  }
  .weather-lab-grid { grid-template-columns: repeat(5, 1fr); }
  .weather-lab-head span { display: none; }
}

@media (max-width: 1079px) {
  .stage { padding-bottom: 110px; }
  .weather-fab {
    top: auto;
    bottom: 16px;
    right: 16px;
    transform: none;
  }
  .weather-fab:active { transform: scale(.93); }

  .weather-wheel-rim {
    right: auto;
    left: 50%;
    top: auto;
    bottom: 0;
    transform: translate(-50%, 50%);
  }

  .weather-wheel-hit {
    right: auto;
    left: 50%;
    top: auto;
    bottom: 0;
    width: calc(var(--wheel-r, 140px) * 2);
    height: calc(var(--wheel-r, 140px) * 1.15);
    transform: translateX(-50%);
  }

  .weather-node { width: 68px; max-width: 68px; font-size: 8.5px; }
}

@media (max-width: 380px) {
  .stage { padding-top: max(90px, calc(env(safe-area-inset-top) + 76px)); }
}

@media (hover: none) {
  .socials a::after { display: none; }
  .glass-card::after { opacity: .75; --mx: 40%; --my: 0%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .blob { animation: none; }
  .caret { display: none; }
  .clouds { animation: none; }
  .weather-field, .card-weather, .lightning, .meteors, .polar-lights { display: none; }
  .hero.quake { animation: none; }
}
