:root {
  --bg: #eef4ff;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-solid: #ffffff;
  --text: #0f1a2a;
  --muted: #5f6f86;
  --line: #d7e0ee;
  --accent: #1363df;
  --accent-soft: #dce8ff;
  --accent-soft-strong: #c8dcff;
  --accent-border: #8eb4ff;
  --accent-ring: #2f64cf;
  --accent-contrast: #f8fbff;
  --bg-spot-a: #f8fbff;
  --bg-spot-b: #e6efff;
  --bg-spot-c: #d9e5ff;
  --menu-pill-bg: #f6faff;
  --menu-pill-border: #c7d7f5;
  --menu-pill-hover-bg: #eef4ff;
  --menu-pill-hover-border: #9fbbef;
  --menu-pill-height: 26px;
  --tile-hover-bg: #f7faff;
  --tile-hover-border: #a9c4f3;
  --app-icon-a: #d9e8ff;
  --app-icon-b: #f3f8ff;
  --app-icon-border: #bdd2f6;
  --app-icon-ink: #1f62d5;
  --dashboard-hero-a: #ffffff;
  --dashboard-hero-b: #e6f1ff;
  --warn: #d14545;
  --ok: #227a3f;
  --shadow: 0 12px 30px rgba(22, 45, 75, 0.12);
  --font-body: "IBM Plex Sans", sans-serif;
  --font-heading: "Space Grotesk", sans-serif;
  --font-body-weight: 400;
  --font-heading-weight: 700;
  --zodiac-bg-a: #0d1224;
  --zodiac-bg-b: #1b3356;
  --zodiac-bg-c: #5082d7;
  --zodiac-ink: #e9f5ff;
  --zodiac-glow: #8dbdff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-weight: var(--font-body-weight);
  color: var(--text);
  background: radial-gradient(circle at 15% 15%, var(--bg-spot-a) 0%, var(--bg-spot-b) 40%, var(--bg-spot-c) 100%);
  padding: 22px;
  overflow-x: hidden;
}

.menu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 90%, var(--accent-soft) 10%);
  box-shadow: var(--shadow);
  padding: 6px 10px;
  margin-bottom: 14px;
  backdrop-filter: blur(8px);
  position: sticky;
  top: 8px;
  z-index: 50;
}

.menu-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 700;
  white-space: nowrap;
  font-size: 0.92rem;
}

.menu-brand-time {
  margin-left: 12px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-heading);
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}

.menu-brand-icon {
  font-size: 0.82rem;
}

.menu-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.menu-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  margin-left: auto;
  flex-wrap: wrap;
}

.menu-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--menu-pill-border);
  border-radius: 999px;
  min-height: var(--menu-pill-height);
  padding: 5px 9px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.8rem;
  background: var(--menu-pill-bg);
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.menu-link:hover {
  border-color: var(--menu-pill-hover-border);
  background: var(--menu-pill-hover-bg);
}

.menu-link.is-active {
  color: var(--accent-contrast);
  border-color: var(--accent);
  background: var(--accent);
}

.menu-link-icon {
  font-size: 0.74rem;
  line-height: 1;
}

.menu-theme {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--menu-pill-border);
  border-radius: 50%;
  padding: 0;
  background: var(--menu-pill-bg);
  height: var(--menu-pill-height);
  width: var(--menu-pill-height);
  justify-content: center;
}

.menu-theme input[type="color"] {
  width: calc(var(--menu-pill-height) - 6px);
  height: calc(var(--menu-pill-height) - 6px);
  border: none;
  border-radius: 50%;
  background: none;
  padding: 0;
  cursor: pointer;
}

.menu-theme input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
  border-radius: 50%;
}

.menu-theme input[type="color"]::-webkit-color-swatch {
  border: 2px solid var(--surface-solid);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--menu-pill-border), 0 4px 8px rgba(16, 35, 61, 0.22);
}

.menu-theme input[type="color"]::-moz-color-swatch {
  border: 2px solid var(--surface-solid);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--menu-pill-border), 0 4px 8px rgba(16, 35, 61, 0.22);
}

.menu-theme input[type="color"]:focus-visible {
  outline: 2px solid var(--accent-ring);
  outline-offset: 2px;
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--menu-pill-border);
  border-radius: 10px;
  padding: 6px 10px;
  background: var(--menu-pill-bg);
  color: var(--text);
  font-family: var(--font-heading);
  font-size: 0.78rem;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.menu-toggle:hover {
  border-color: var(--menu-pill-hover-border);
  background: var(--menu-pill-hover-bg);
}

.menu-toggle:focus-visible {
  outline: 2px solid var(--accent-ring);
  outline-offset: 2px;
}

.home-header {
  margin-bottom: 14px;
}

.home-header p {
  margin: 8px 0 0;
  color: var(--muted);
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 16px;
  width: 100%;
  max-width: 940px;
  margin: 12px auto 0;
}

.app-tile {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  padding: 18px 12px;
  box-shadow: var(--shadow);
  transition:
    transform 260ms ease,
    background-color 260ms ease,
    border-color 260ms ease,
    box-shadow 260ms ease;
}

.app-tile:hover {
  transform: translateY(-4px);
  border-color: var(--tile-hover-border);
  background: var(--tile-hover-bg);
  box-shadow: 0 14px 24px rgba(23, 57, 124, 0.14);
}

.app-tile-dashboard {
  grid-column: 1 / -1;
  background: linear-gradient(140deg, var(--accent-soft), var(--accent-soft-strong));
  border-color: var(--accent-border);
}

.app-tile-dashboard .app-icon {
  background: linear-gradient(145deg, var(--accent-ring), var(--accent));
  border-color: color-mix(in srgb, var(--accent) 80%, #10223f 20%);
}

.app-tile-dashboard .app-icon i {
  color: var(--accent-contrast);
}

.app-tile-dashboard:hover {
  border-color: color-mix(in srgb, var(--accent) 65%, #244d92 35%);
  background: linear-gradient(140deg, var(--accent-soft-strong), color-mix(in srgb, var(--accent-soft) 82%, #ffffff 18%));
  box-shadow: 0 16px 28px rgba(31, 82, 176, 0.26);
}

.app-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.65rem;
  background: linear-gradient(145deg, var(--app-icon-a), var(--app-icon-b));
  border: 1px solid var(--app-icon-border);
}

.app-icon i {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  font-size: 1.58rem;
  line-height: 1;
  color: var(--app-icon-ink);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.app-tile:hover .app-icon i,
.app-tile:focus-visible .app-icon i {
  transform: scale(1.2);
}

.app-name {
  font-family: var(--font-heading);
  font-size: 1rem;
}

.app-sub {
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}




h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(1.45rem, 2.7vw, 2.1rem);
}

#greeting-title {
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  line-height: 1.3;
}

#greeting-title strong {
  font-weight: 800;
}

h2 {
  font-size: 1.1rem;
}

h4 {
  font-size: 1rem;
}

.topbar {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.sub-topbar {
  display: none;
  gap: 16px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 14px;
}

.topbar-main {
  min-width: 0;
}

.topbar-actions {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
}

.control-group {
  display: grid;
  gap: 4px;
}

.control-group label {
  color: var(--muted);
  font-size: 0.8rem;
}

.date-panel {
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  display: grid;
  gap: 8px;
}

#date-primary {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 2.2vw, 1.55rem);
  font-weight: 700;
}

#date-secondary {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.source-note {
  margin: -2px 0 10px;
  color: var(--muted);
  font-size: 0.8rem;
}

.dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}

.single-page {
  max-width: 1100px;
  margin: 0 auto;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 14px;
  backdrop-filter: blur(8px);
}

.card-wide {
  grid-column: span 2;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.dashboard-page {
  padding: clamp(26px, 4.5vw, 58px);
}

.dashboard-page .topbar {
  margin-bottom: 30px;
  gap: 20px;
}

.dashboard-page .topbar-main {
  display: grid;
  gap: 10px;
}

.dashboard-page #greeting-title {
  font-size: clamp(0.86rem, 1.7vw, 1rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.dashboard-page .date-panel p {
  margin: 0;
}

.dashboard-page .date-panel {
  padding: 15px 16px 16px;
  border-color: var(--accent-border);
  background: linear-gradient(
    150deg,
    color-mix(in srgb, var(--surface-solid) 94%, var(--accent-soft) 6%),
    color-mix(in srgb, var(--dashboard-hero-b) 80%, var(--accent-soft) 20%)
  );
}

.dashboard-page #date-secondary {
  display: none;
}

.dashboard-page .dashboard {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 24px;
}

.dashboard-page .card {
  padding: 24px;
  border-radius: 20px;
}

.dashboard-page .card-head {
  margin-bottom: 14px;
}

.dashboard-page .card-head h2,
.dashboard-page .card > h2,
.dashboard-page #todo-card > h4,
.dashboard-page .notes-section h4 {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.dashboard-page .meta {
  font-size: 0.72rem;
}

.dashboard-page .topbar .btn,
.dashboard-page .todo-controls .btn {
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 13px;
}

.dashboard-page .btn span {
  display: none;
}

.dashboard-page .webcam-grid,
.dashboard-page .list,
.dashboard-page .stack {
  gap: 14px;
}

.dashboard-page .todo-controls {
  gap: 12px;
  margin-bottom: 14px;
}

.dashboard-page .notes-section {
  margin-top: 22px;
  padding-top: 20px;
}

.dashboard-page .inline-label,
.dashboard-page .source-note {
  display: none;
}

.meta {
  color: var(--muted);
  font-size: 0.82rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--accent-contrast);
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease;
}

.btn i {
  font-size: 0.85em;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(1px);
}

.btn-subtle {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent-border);
}

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

.webcam-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: color-mix(in srgb, var(--menu-pill-bg) 80%, var(--surface-solid) 20%);
}

.webcam-photo {
  margin: 0;
  aspect-ratio: 16 / 10;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--accent-soft) 60%, var(--surface-solid) 40%),
    color-mix(in srgb, var(--accent-soft-strong) 72%, var(--surface-solid) 28%)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.webcam-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.webcam-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: color-mix(in srgb, var(--menu-pill-bg) 90%, var(--surface-solid) 10%);
}

.webcam-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: color-mix(in srgb, var(--menu-pill-bg) 90%, var(--surface-solid) 10%);
}

.webcam-meta {
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.webcam-meta strong {
  display: block;
  font-size: 0.92rem;
}

.webcam-status {
  display: block;
  margin-top: 2px;
  font-size: 0.72rem;
}

.inline-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.82rem;
}

.inline-link:hover {
  text-decoration: underline;
}

.list,
.stack {
  display: grid;
  gap: 8px;
}

.market-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.market-candle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.market-candle-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  background: var(--surface-solid);
  display: grid;
  gap: 8px;
}

.market-candle-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 0.86rem;
}

.market-candle-price {
  font-family: var(--font-heading);
  font-size: 1.02rem;
}

.market-candle-ohlc {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  font-size: 0.74rem;
  color: var(--muted);
}

.market-candle-ohlc span {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 6px;
  background: var(--tile-hover-bg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.market-candle-canvas {
  width: 100%;
  height: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-solid);
}

.mini-chart {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  background: color-mix(in srgb, var(--tile-hover-bg) 85%, var(--surface-solid) 15%);
}

.mini-chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.mini-chart-head strong {
  font-family: var(--font-heading);
}

.sparkline {
  display: block;
  width: 100%;
  height: 62px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mini-chart-meta {
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.78rem;
}

.row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: color-mix(in srgb, var(--tile-hover-bg) 85%, var(--surface-solid) 15%);
}

.row b {
  font-family: var(--font-heading);
}

.row-transit > span:first-child {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.transit-stop-board {
  border: 1px solid #c7ced8;
  border-radius: 16px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(238, 242, 248, 0.95) 100%),
    linear-gradient(135deg, #fbfdff 0%, #edf2f8 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 8px 16px rgba(25, 38, 58, 0.12);
}

.transit-stop-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.transit-stop-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid #1f8f8a;
  background: #d0bb4d;
  color: #1f857f;
  display: inline-grid;
  place-items: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.32rem;
  line-height: 1;
}

.transit-stop-head h3 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.transit-stop-cols {
  display: grid;
  grid-template-columns: minmax(110px, 0.95fr) minmax(0, 1.8fr) minmax(86px, 0.7fr);
  gap: 10px;
  margin: 0 4px 8px;
  font-size: 0.78rem;
  color: #2e3a4d;
}

.transit-stop-cols span:last-child {
  text-align: right;
}

.transit-stop-led {
  display: grid;
  gap: 8px;
}

.transit-led-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.95fr) minmax(0, 1.8fr) minmax(86px, 0.7fr);
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 3px;
  border: 1px solid #1b2329;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(116, 136, 149, 0.18) 0,
      rgba(116, 136, 149, 0.18) 1px,
      transparent 1px,
      transparent 16px
    ),
    linear-gradient(180deg, #1d252b 0%, #13181d 100%);
}

.transit-led-row.is-cancelled {
  border-color: #40232a;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(136, 95, 104, 0.22) 0,
      rgba(136, 95, 104, 0.22) 1px,
      transparent 1px,
      transparent 16px
    ),
    linear-gradient(180deg, #2a1a1e 0%, #1f1216 100%);
}

.transit-led-row-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.transit-led-row-link:hover {
  border-color: #2b343b;
  box-shadow: 0 0 0 1px rgba(154, 255, 102, 0.12) inset;
}

.transit-led-row-link:focus-visible {
  outline: 2px solid #8ef75f;
  outline-offset: 2px;
}

.transit-led-row-empty {
  min-height: 34px;
  border-color: #1d2328;
  opacity: 0.75;
}

.transit-stop-board-loading .transit-led-row-loading {
  position: relative;
  overflow: hidden;
}

.transit-stop-board-loading .transit-led-row-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(154, 255, 102, 0.1) 45%, transparent 100%);
  transform: translateX(-100%);
  animation: transitScan 1.8s linear infinite;
  pointer-events: none;
}

.transit-led-pixel-strip {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  align-items: center;
  padding: 5px 0;
}

.transit-loading-pixel {
  width: 7px;
  height: 7px;
  border-radius: 1px;
  background: #87e85a;
  box-shadow: 0 0 6px rgba(133, 248, 94, 0.45);
  opacity: 0.22;
  animation: transitPixelBlink 1.25s steps(1, end) infinite;
  animation-delay: var(--delay, 0s);
}

.transit-led-empty-text {
  grid-column: 1 / -1;
  color: #90a1ab;
  font-family: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.transit-led-line,
.transit-led-destination,
.transit-led-minutes {
  color: #8ef75f;
  font-family: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
  font-size: 1.05rem;
  line-height: 1;
  letter-spacing: 0.04em;
  text-shadow: 0 0 8px rgba(123, 255, 95, 0.34);
}

.transit-led-line {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.transit-led-line-link,
.transit-led-line-label {
  display: inline-block;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}

.transit-led-line-link:hover {
  text-decoration: underline;
}

.transit-led-destination {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transit-led-minutes {
  justify-self: end;
  font-weight: 700;
}

.transit-led-minutes.is-now {
  color: #b6ff76;
}

.transit-led-minutes.is-soon {
  color: #9aff66;
}

.transit-led-minutes.is-unknown {
  color: #88a298;
  text-shadow: none;
}

.transit-led-minutes.is-cancelled {
  color: #ff7676;
  text-shadow: 0 0 8px rgba(255, 116, 116, 0.45);
}

@keyframes transitPixelBlink {
  0%,
  100% {
    opacity: 0.14;
    transform: scale(1);
  }
  35% {
    opacity: var(--pulse, 0.9);
    transform: scale(1.1);
  }
  60% {
    opacity: 0.25;
    transform: scale(0.95);
  }
}

@keyframes transitScan {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .transit-stop-board-loading .transit-led-row-loading::after,
  .transit-loading-pixel {
    animation: none;
  }
}

.market-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.market-stat-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: var(--surface-solid);
  display: grid;
  gap: 6px;
}

.market-stat-head {
  font-size: 1.05rem;
}

.market-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.coin-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
}

.coin-bitcoin {
  background: linear-gradient(145deg, #ffcc73, #f7931a);
  color: #fff;
}

.coin-shib {
  background: linear-gradient(145deg, #ff8f62, #e0472d);
  color: #fff;
}

.coin-fx {
  width: 3.3rem;
  height: 2.3rem;
  border-radius: 8px;
  font-size: 0.86rem;
  letter-spacing: 0.03em;
}

.coin-fx-usdeur {
  background: linear-gradient(145deg, #a6c6ff, #5e8de9);
  color: #fff;
}

.coin-fx-eurusd {
  background: linear-gradient(145deg, #85d7bf, #2d9e84);
  color: #fff;
}

.market-stat-value {
  white-space: nowrap;
  line-height: 1.1;
}

.market-stat-value b {
  font-size: clamp(1.15rem, 2vw, 1.65rem);
  font-weight: 800;
}

.market-stat-meta {
  min-height: 1.1rem;
  font-size: 0.82rem;
}

.market-crypto-value b {
  font-size: clamp(1.45rem, 2.6vw, 2.3rem);
  letter-spacing: 0.01em;
}

.market-crypto-meta {
  min-height: 1.35rem;
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  font-weight: 800;
}

.market-crypto-meta .state-ok,
.market-crypto-meta .state-warn {
  font-weight: 800;
}

.market-change-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #bcd0f3;
  padding: 4px 14px;
  font-weight: 900;
  font-size: clamp(1.18rem, 2.1vw, 1.7rem);
  line-height: 1;
  white-space: nowrap;
}

.market-change-up {
  color: #1f6a33;
  border-color: #b9e2c2;
  background: #e9f9ee;
}

.market-change-down {
  color: #8c1a1a;
  border-color: #efb5b5;
  background: #ffe8e8;
}

.market-change-flat {
  color: #705700;
  border-color: #f0df9a;
  background: #fff8da;
}

.market-decimals {
  display: inline-block;
  min-width: 2ch;
}

.market-live-flicker {
  animation: marketLiveFlicker 280ms ease-out;
}

.market-decimals-flash {
  animation: marketDecimalsFlash 360ms ease-out;
}

@keyframes marketLiveFlicker {
  0% {
    opacity: 1;
  }
  45% {
    opacity: 0.9;
  }
  100% {
    opacity: 1;
  }
}

@keyframes marketDecimalsFlash {
  0% {
    opacity: 1;
    filter: brightness(1);
  }
  40% {
    opacity: 0.74;
    filter: brightness(1.1);
  }
  100% {
    opacity: 1;
    filter: brightness(1);
  }
}

.market-tv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.market-tv-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  background: var(--surface-solid);
  display: grid;
  gap: 8px;
}

.market-tv-head {
  font-family: var(--font-heading);
  font-size: 0.86rem;
}

.market-tv-frame {
  width: 100%;
  height: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-solid);
}

.transit-config-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.transit-config-actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.transit-test-results {
  margin: 10px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
  font-size: 0.86rem;
}

.transit-provider-forms-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.transit-provider-form-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--tile-hover-bg) 80%, var(--surface-solid) 20%);
  padding: 8px;
  display: grid;
  gap: 6px;
}

.transit-provider-form-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.transit-provider-form-media {
  margin: 0;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: color-mix(in srgb, var(--accent-soft) 68%, var(--surface-solid) 32%);
}

.transit-provider-form-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: color-mix(in srgb, var(--accent-soft) 68%, var(--surface-solid) 32%);
}

.transit-provider-form-status {
  min-height: 1rem;
  font-size: 0.74rem;
}

.transit-embed-form {
  margin-bottom: 10px;
  display: grid;
  gap: 8px;
}

.transit-embed-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.transit-embed-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: color-mix(in srgb, var(--tile-hover-bg) 90%, var(--surface-solid) 10%);
}

.transit-embed-media {
  margin: 0;
  aspect-ratio: 16 / 10;
  background: color-mix(in srgb, var(--accent-soft) 68%, var(--surface-solid) 32%);
}

.transit-embed-media.is-blocked {
  border-bottom: 1px dashed var(--line);
}

.transit-embed-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: color-mix(in srgb, var(--accent-soft) 68%, var(--surface-solid) 32%);
}

.transit-embed-meta {
  padding: 8px 10px;
  display: grid;
  gap: 3px;
}

.transit-embed-meta strong {
  font-size: 0.92rem;
}

.transit-embed-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.transit-embed-remove {
  padding: 0;
}

.transit-embed-status {
  min-height: 1rem;
  font-size: 0.74rem;
}

.subtle {
  color: var(--muted);
}

.time-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--accent-border);
  padding: 2px 8px;
  background: color-mix(in srgb, var(--accent-soft) 85%, var(--surface-solid) 15%);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.86rem;
  white-space: nowrap;
}

.time-pill-red {
  color: #8c1a1a;
  border-color: #efb5b5;
  background: #ffe8e8;
}

.time-pill-orange {
  color: #8a4f0a;
  border-color: #f2cc9f;
  background: #fff1df;
}

.time-pill-yellow {
  color: #705700;
  border-color: #f0df9a;
  background: #fff8da;
}

.time-pill-green {
  color: #1f6a33;
  border-color: #b9e2c2;
  background: #e9f9ee;
}

.label-tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  padding: 2px 8px;
  background: color-mix(in srgb, var(--accent-soft) 80%, var(--surface-solid) 20%);
  color: color-mix(in srgb, var(--accent) 85%, #10223f 15%);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.stack-group {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  background: color-mix(in srgb, var(--tile-hover-bg) 85%, var(--surface-solid) 15%);
}

.stack-group h3 {
  margin: 0 0 8px;
  font-size: 0.92rem;
  font-family: var(--font-heading);
}

.weather-city-grid {
  grid-template-columns: 1fr;
  gap: 10px;
}

.weather-city {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  background: color-mix(in srgb, var(--tile-hover-bg) 84%, var(--surface-solid) 16%);
}

.weather-city.is-primary {
  border-color: var(--accent-border);
  background: linear-gradient(
    160deg,
    color-mix(in srgb, var(--tile-hover-bg) 88%, var(--surface-solid) 12%) 0%,
    color-mix(in srgb, var(--accent-soft) 62%, var(--surface-solid) 38%) 100%
  );
  box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 22%, transparent);
  padding: 10px;
}

.weather-city-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.weather-city-head h3 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 0.98rem;
}

.weather-city.is-primary .weather-city-head h3 {
  font-size: 1.12rem;
}

.weather-city-now {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.weather-city-webcam {
  margin: 10px 0 14px;
  border: 1px solid var(--line);
  border-radius: 44px;
  overflow: hidden;
  background: var(--surface-solid);
  position: relative;
}

.weather-city-webcam img {
  display: block;
  width: 100%;
  height: auto;
}

.weather-city-webcam-overlay {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 18px;
  border-radius: 33px;
  background: linear-gradient(145deg, rgba(12, 24, 48, 0.25), rgba(8, 14, 24, 0.2));
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(7px);
  font-size: clamp(1rem, 4.6vw, 3rem);
}

.weather-city-webcam-overlay-main {
  top: 12px;
  right: 12px;
}

.weather-city-webcam-overlay-title {
  top: 12px;
  left: 12px;
}

.weather-city-webcam-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  font-size: clamp(1.4rem, 4.6vw, 3.4rem);
  line-height: 1;
  text-shadow: 0 0 14px var(--weather-glow), 0 0 24px var(--weather-glow);
  filter: drop-shadow(0 0 10px var(--weather-glow));
  transform-origin: center;
  animation: weather-webcam-symbol-float 4.2s ease-in-out infinite;
}

.weather-city-webcam-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.weather-city-webcam-title {
  color: #f8fbff;
  font-family: var(--font-heading);
  font-size: clamp(1rem, 4.6vw, 3rem);
  font-weight: 200;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.62);
}

.weather-city-webcam-condition {
  color: #f3f8ff;
  font-weight: 800;
  font-size: clamp(1rem, 2.8vw, 1.5rem);
  line-height: 1.1;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
}

.weather-city-webcam-now-line {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}

.weather-city-webcam-temp {
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 6.8vw, 3.5rem);
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.64);
}

.weather-city-webcam-current {
  color: #d5e6ff;
  font-weight: 700;
  font-size: clamp(0.88rem, 2.4vw, 1.15rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

@keyframes weather-webcam-symbol-float {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-3px) scale(1.03);
  }
}

.weather-city-symbol {
  --weather-glow: #ffd75d;
  display: inline-block;
  font-size: clamp(2.8rem, 4.8vw, 4.2rem);
  line-height: 1;
  text-shadow: 0 0 12px var(--weather-glow), 0 0 24px var(--weather-glow);
  filter: drop-shadow(0 0 8px var(--weather-glow));
  transform-origin: center;
  animation: weather-symbol-float 3.6s ease-in-out infinite;
}

.weather-city.is-primary .weather-city-symbol {
  font-size: clamp(3.2rem, 5.4vw, 4.8rem);
}

.weather-city-now-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.weather-city-condition {
  font-weight: 700;
  line-height: 1.1;
}

.weather-city-now-line {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.weather-city-temp {
  font-family: var(--font-heading);
  font-size: clamp(1.7rem, 2.2vw, 2.05rem);
  line-height: 1;
}

.weather-city.is-primary .weather-city-temp {
  font-size: clamp(1.9rem, 2.6vw, 2.35rem);
}

@keyframes weather-symbol-float {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-2px) scale(1.04);
  }
}

.weather-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 6px;
}

.weather-mini-stat {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.7rem;
  color: var(--muted);
  background: var(--surface-solid);
}

.weather-mini-icon {
  font-size: 1.08em;
  line-height: 1;
}

.weather-mini-value {
  line-height: 1;
}

.weather-days {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(46px, 1fr);
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.weather-day {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 4px;
  text-align: center;
  background: var(--surface-solid);
}

.weather-day-name {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.1;
}

.weather-day-emoji {
  font-size: 0.95rem;
  line-height: 1.2;
  margin-top: 2px;
}

.weather-day-temp {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  line-height: 1.2;
}

.weather-day-rain {
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.2;
}

.inline-label {
  display: block;
  margin: 10px 0 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

input[type="text"],
input[type="url"],
input[type="number"],
input[type="date"],
textarea,
select {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 9px 10px;
  font: inherit;
  background: var(--surface-solid);
}

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

.todo-controls {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  margin-bottom: 10px;
}

.note-controls {
  grid-template-columns: 1fr auto;
  align-items: start;
}

.note-controls textarea {
  min-height: 86px;
  resize: vertical;
}

.notes-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.notes-section h4 {
  margin: 0 0 8px;
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: 1.02rem;
}

.color-picker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}

.color-picker-label {
  font-size: 0.8rem;
  color: var(--muted);
}

.color-option {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.color-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.color-dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #90a9cf;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.color-option input:checked + .color-dot {
  transform: scale(1.1);
  box-shadow: 0 0 0 1px #fff, 0 0 0 3px var(--accent);
}

.color-option input:focus-visible + .color-dot {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.color-green {
  background: #2fa55a;
}

.color-orange {
  background: #e8892f;
}

.color-violet {
  background: #8a64d6;
}

.color-blue {
  background: #3f7ddb;
}

.color-red {
  background: #d14a58;
}

.color-yellow {
  background: #d1af2f;
}

.color-pink {
  background: #d06ca6;
}

.todo-list {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}

.note-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.note-list .subtle {
  grid-column: 1 / -1;
}

.todo-item {
  display: grid;
  grid-template-columns: auto auto 1fr auto auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--item-color, #aac0e5);
  border-radius: 10px;
  padding: 7px 8px;
  background: var(--item-bg, #f8fbff);
}

.note-item {
  grid-template-columns: auto 1fr auto;
  align-items: start;
  min-height: 106px;
  padding: 10px;
}

.note-item .todo-item-text {
  white-space: pre-wrap;
  line-height: 1.35;
}

.item-color-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--dot-color, #90a9cf);
}

.todo-item-time {
  font-size: 0.74rem;
  color: var(--muted);
  white-space: nowrap;
  justify-self: end;
}

.todo-item.done {
  background: color-mix(in srgb, var(--item-bg) 58%, #ffffff);
  border-left-color: color-mix(in srgb, var(--item-color) 48%, #b7c4d9);
}

.todo-item.done .todo-item-text {
  text-decoration: line-through;
  color: var(--muted);
}

.todo-item.done .item-color-dot {
  background: color-mix(in srgb, var(--dot-color) 45%, #b7c4d9);
}

.todo-item.done .todo-item-time {
  color: #8d9cb4;
}

.danger-link {
  background: transparent;
  border: none;
  color: var(--warn);
  cursor: pointer;
  font-weight: 600;
}

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

.state-ok {
  color: var(--ok);
}

.state-warn {
  color: var(--warn);
}

.quick-actions-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(150px, 220px);
  gap: 8px;
  margin-bottom: 10px;
}

.quick-actions-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.quick-action-list {
  display: grid;
  gap: 8px;
}

.quick-action-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  background: color-mix(in srgb, var(--tile-hover-bg) 84%, var(--surface-solid) 16%);
}

.quick-action-link {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.quick-action-link:hover .quick-action-title {
  color: var(--accent);
}

.quick-action-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent-border);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 78%, var(--surface-solid) 22%);
}

.quick-action-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.quick-action-title {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  line-height: 1.15;
  transition: color 140ms ease;
}

.quick-action-url {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.quick-action-tools {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.quick-action-tool {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface-solid);
  color: var(--muted);
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, color 120ms ease;
}

.quick-action-tool:hover {
  transform: translateY(-1px);
  border-color: var(--accent-border);
  color: var(--accent);
}

.quick-action-tool-danger {
  border-color: color-mix(in srgb, var(--warn) 34%, var(--line));
  color: color-mix(in srgb, var(--warn) 82%, #7f2c33 18%);
}

.quick-action-tool-danger:hover {
  border-color: color-mix(in srgb, var(--warn) 44%, #d8a2a2);
  color: var(--warn);
}

.sun-times-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.sun-time-item,
.sun-golden-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  background: color-mix(in srgb, var(--tile-hover-bg) 86%, var(--surface-solid) 14%);
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.8fr);
  column-gap: 14px;
  align-items: stretch;
}

.sun-time-label {
  display: block;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.sun-time-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.sun-time-icon {
  color: var(--accent);
  font-size: clamp(2.6rem, 7vw, 3.8rem);
  line-height: 1;
}

.sun-time-body {
  display: grid;
  align-content: center;
  gap: 6px;
  text-align: left;
}

.sun-time-value,
.sun-golden-item b {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 2.9vw, 2.15rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.sun-golden-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.sun-meta-line {
  margin-top: 16px;
  border-top: 1px dashed var(--line);
  padding-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.84rem;
}

.weather-page {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  scrollbar-gutter: stable both-edges;
  background: linear-gradient(165deg, #cae8ff 0%, #e4f1ff 48%, #f4f9ff 100%);
  color: #0d2037;
  transition: background 520ms ease, color 320ms ease;
}

.weather-ambience {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.weather-3d-layer {
  position: absolute;
  inset: 0;
  opacity: 0.72;
  transition: opacity 300ms ease;
}

.weather-3d-layer canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.weather-cloud {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0) 70%);
  filter: blur(8px);
  opacity: 0.56;
  animation: weather-cloud-drift 24s ease-in-out infinite alternate;
}

.weather-cloud.cloud-a {
  width: 36vw;
  height: 16vw;
  top: 8vh;
  left: -12vw;
}

.weather-cloud.cloud-b {
  width: 44vw;
  height: 18vw;
  top: 18vh;
  right: -18vw;
  animation-duration: 30s;
}

.weather-cloud.cloud-c {
  width: 34vw;
  height: 14vw;
  top: 38vh;
  left: 28vw;
  animation-duration: 26s;
}

.weather-page.weather-theme-sunny .weather-cloud {
  opacity: 0.44;
}

.weather-page.weather-theme-cloudy .weather-cloud {
  opacity: 0.62;
}

.weather-page.weather-theme-rain .weather-cloud,
.weather-page.weather-theme-storm .weather-cloud {
  opacity: 0.56;
}

.weather-page.weather-theme-fog .weather-cloud {
  opacity: 0.82;
}

.weather-page.weather-theme-rain .weather-3d-layer,
.weather-page.weather-theme-storm .weather-3d-layer,
.weather-page.weather-theme-fog .weather-3d-layer {
  opacity: 0.58;
}

.weather-page > :not(.weather-ambience) {
  position: relative;
  z-index: 1;
}


.weather-page .menu,
.weather-page .sub-topbar,
.weather-page .card {
  border-color: rgba(120, 152, 199, 0.38);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 14px 32px rgba(18, 44, 74, 0.14);
}

.weather-page .sub-topbar h1 {
  font-size: clamp(2.35rem, 4.6vw, 3.3rem);
}

.weather-page #weather-card h2 {
  font-size: clamp(1.45rem, 2.6vw, 2.05rem);
}

.weather-page #weather-card .meta {
  font-size: 0.98rem;
}

.weather-page .weather-city-head h3 {
  font-size: 1.3rem;
}

.weather-page .weather-city.is-primary .weather-city-head h3 {
  font-size: 1.55rem;
}

.weather-page .weather-city-condition {
  font-size: 1.12rem;
}

.weather-page .weather-city-symbol {
  font-size: clamp(3.9rem, 7vw, 6rem);
  font-weight: 800;
}

.weather-page .weather-city.is-primary .weather-city-symbol {
  font-size: clamp(4.5rem, 7.8vw, 6.8rem);
  font-weight: 900;
}

.weather-page .weather-city-temp {
  font-size: clamp(2.35rem, 3.8vw, 3.35rem);
  font-weight: 900;
}

.weather-page .weather-city.is-primary .weather-city-temp {
  font-size: clamp(2.6rem, 4.2vw, 3.65rem);
  font-weight: 900;
}

.weather-page .weather-mini-stat {
  font-size: clamp(1.45rem, 2.4vw, 1.95rem);
  font-weight: 900;
  color: #12263f;
  padding: 8px 10px;
  gap: 8px;
}

.weather-page .weather-mini-icon {
  font-size: 1.25em;
}

.weather-page .weather-days {
  grid-auto-columns: minmax(66px, 1fr);
}

.weather-page .weather-day-name {
  font-size: 0.78rem;
}

.weather-page .weather-day-emoji {
  font-size: 1.6rem;
  font-weight: 800;
}

.weather-page .weather-day-temp {
  font-size: 1.02rem;
  font-weight: 800;
}

.weather-page .weather-day-rain {
  font-size: 0.9rem;
  font-weight: 700;
}

.weather-page::before,
.weather-page::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  will-change: transform, opacity;
  transform: translateZ(0);
}

.weather-page::before {
  opacity: 0.78;
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 236, 168, 0.82) 0%, rgba(255, 236, 168, 0) 34%),
    radial-gradient(circle at 88% 14%, rgba(190, 225, 255, 0.52) 0%, rgba(190, 225, 255, 0) 38%),
    linear-gradient(160deg, rgba(122, 183, 255, 0.24), rgba(255, 255, 255, 0.08));
  animation: weather-sky-drift 18s ease-in-out infinite alternate;
  transition: background 420ms ease, opacity 320ms ease;
}

.weather-page::after {
  opacity: 0;
  transition: opacity 300ms ease, background 320ms ease;
}

.weather-page.weather-theme-sunny {
  background: linear-gradient(165deg, #ffe8ab 0%, #ffd9ae 34%, #d4ecff 100%);
}

.weather-page.weather-theme-sunny::before {
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 214, 88, 0.95) 0%, rgba(255, 214, 88, 0) 36%),
    radial-gradient(circle at 82% 16%, rgba(174, 214, 255, 0.55) 0%, rgba(174, 214, 255, 0) 36%),
    linear-gradient(170deg, rgba(255, 248, 222, 0.45), rgba(170, 214, 255, 0.14));
}

.weather-page.weather-theme-cloudy {
  background: linear-gradient(168deg, #cad8ea 0%, #dce6f4 52%, #eef4fb 100%);
}

.weather-page.weather-theme-cloudy::before {
  background:
    radial-gradient(circle at 26% 20%, rgba(204, 220, 239, 0.82) 0%, rgba(204, 220, 239, 0) 38%),
    radial-gradient(circle at 74% 12%, rgba(227, 236, 247, 0.74) 0%, rgba(227, 236, 247, 0) 42%),
    linear-gradient(168deg, rgba(141, 168, 197, 0.3), rgba(240, 246, 255, 0.1));
}

.weather-page.weather-theme-rain {
  background: linear-gradient(168deg, #758dab 0%, #8ea3bb 40%, #aabfd2 100%);
}

.weather-page.weather-theme-rain::before {
  background:
    radial-gradient(circle at 20% 18%, rgba(93, 117, 145, 0.72) 0%, rgba(93, 117, 145, 0) 40%),
    radial-gradient(circle at 74% 11%, rgba(122, 147, 173, 0.52) 0%, rgba(122, 147, 173, 0) 42%),
    linear-gradient(170deg, rgba(60, 84, 111, 0.42), rgba(184, 203, 224, 0.18));
}

.weather-page.weather-theme-rain::after {
  opacity: 0.5;
  background-image: repeating-linear-gradient(
    104deg,
    rgba(204, 228, 255, 0.5) 0px,
    rgba(204, 228, 255, 0.5) 2px,
    transparent 2px,
    transparent 13px
  );
  background-size: 210px 210px;
  animation: weather-rain-fall 0.65s linear infinite;
}

.weather-page.weather-theme-storm {
  background: linear-gradient(170deg, #4d607a 0%, #657995 42%, #879cb7 100%);
}

.weather-page.weather-theme-storm::before {
  background:
    radial-gradient(circle at 20% 16%, rgba(78, 93, 122, 0.8) 0%, rgba(78, 93, 122, 0) 42%),
    radial-gradient(circle at 70% 12%, rgba(111, 128, 154, 0.62) 0%, rgba(111, 128, 154, 0) 44%),
    linear-gradient(168deg, rgba(34, 45, 66, 0.48), rgba(168, 191, 218, 0.22));
  animation: weather-sky-drift 16s ease-in-out infinite alternate, weather-lightning 8s ease-in-out infinite;
}

.weather-page.weather-theme-storm::after {
  opacity: 0.68;
  background-image:
    repeating-linear-gradient(
      104deg,
      rgba(218, 233, 255, 0.62) 0px,
      rgba(218, 233, 255, 0.62) 2px,
      transparent 2px,
      transparent 11px
    ),
    repeating-linear-gradient(
      101deg,
      rgba(171, 196, 228, 0.32) 0px,
      rgba(171, 196, 228, 0.32) 2px,
      transparent 2px,
      transparent 16px
    );
  background-size: 190px 190px, 240px 240px;
  animation: weather-rain-fall 0.45s linear infinite;
}

.weather-page.weather-theme-snow {
  background: linear-gradient(166deg, #d7e8f8 0%, #e8f2fc 45%, #f7fbff 100%);
}

.weather-page.weather-theme-snow::before {
  background:
    radial-gradient(circle at 22% 20%, rgba(213, 230, 248, 0.85) 0%, rgba(213, 230, 248, 0) 40%),
    radial-gradient(circle at 82% 16%, rgba(244, 250, 255, 0.72) 0%, rgba(244, 250, 255, 0) 44%),
    linear-gradient(172deg, rgba(161, 188, 214, 0.25), rgba(245, 251, 255, 0.15));
}

.weather-page.weather-theme-snow::after {
  opacity: 0.56;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.9) 1.4px, transparent 1.7px),
    radial-gradient(circle, rgba(233, 245, 255, 0.75) 1px, transparent 1.4px);
  background-size: 22px 22px, 34px 34px;
  animation: weather-snow-fall 7s linear infinite;
}

.weather-page.weather-theme-fog {
  background: linear-gradient(168deg, #c3ccd6 0%, #d6dde6 44%, #e6edf5 100%);
}

.weather-page.weather-theme-fog::before {
  background:
    radial-gradient(circle at 16% 24%, rgba(209, 217, 227, 0.84) 0%, rgba(209, 217, 227, 0) 48%),
    radial-gradient(circle at 76% 20%, rgba(227, 234, 242, 0.84) 0%, rgba(227, 234, 242, 0) 48%),
    linear-gradient(172deg, rgba(160, 172, 186, 0.32), rgba(226, 235, 245, 0.16));
}

.weather-page.weather-theme-fog::after {
  opacity: 0.34;
  background:
    linear-gradient(0deg, rgba(216, 224, 234, 0.32), rgba(216, 224, 234, 0.32)),
    repeating-linear-gradient(
      0deg,
      rgba(236, 241, 247, 0.2) 0px,
      rgba(236, 241, 247, 0.2) 20px,
      rgba(194, 206, 220, 0.17) 20px,
      rgba(194, 206, 220, 0.17) 52px
    );
  animation: weather-fog-drift 12s ease-in-out infinite;
}

@keyframes weather-sky-drift {
  0% {
    transform: translate3d(-2%, -1%, 0) scale(1);
  }
  100% {
    transform: translate3d(2%, 1%, 0) scale(1.06);
  }
}

@keyframes weather-cloud-drift {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(4vw, -1.2vh, 0);
  }
}

@keyframes weather-rain-fall {
  0% {
    transform: translateY(-14%);
  }
  100% {
    transform: translateY(14%);
  }
}

@keyframes weather-snow-fall {
  0% {
    transform: translate3d(0, -8%, 0);
  }
  100% {
    transform: translate3d(-4%, 10%, 0);
  }
}

@keyframes weather-fog-drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(2%, 0, 0);
  }
}

@keyframes weather-lightning {
  0%,
  85%,
  100% {
    opacity: 0.78;
  }
  86%,
  88% {
    opacity: 0.98;
  }
  87% {
    opacity: 0.34;
  }
}

.moon-page {
  background:
    radial-gradient(circle at 18% -6%, rgba(255, 139, 88, 0.14) 0%, transparent 34%),
    radial-gradient(circle at 84% 10%, rgba(133, 95, 255, 0.2) 0%, transparent 38%),
    radial-gradient(circle at 25% -12%, #1a2555 0%, #090f25 34%, #02050d 100%);
  color: #eef3ff;
}

.moon-page .menu,
.moon-page .sub-topbar,
.moon-page .moon-visual-card {
  border: none;
  background: rgba(10, 16, 34, 0.48);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.36);
}

.moon-page .menu-link {
  color: #e7eeff;
  border: none;
  background: rgba(16, 30, 64, 0.64);
}

.moon-page .menu-link:hover {
  background: rgba(28, 50, 104, 0.8);
}

.moon-page .menu-link.is-active {
  background: linear-gradient(140deg, #5b86ff, #88a7ff);
  color: #051432;
}

.moon-page .sub-topbar h1 {
  font-size: 1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #b5c8ff;
}

.moon-page .control-group label {
  color: #a7b8e8;
}

.moon-page .btn {
  background: #648fff;
  color: #041435;
}

.moon-page .menu,
.moon-page .sub-topbar,
.moon-page .card,
.moon-page .moon-visual-card,
.moon-page .moon-canvas-wrap,
.moon-page .moon-canvas-wrap::before,
.moon-page .moon-canvas-wrap::after {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  filter: none !important;
}

.moon-page .star-layer,
.moon-page .moon-fallback,
.moon-page .moon-fallback * {
  filter: none !important;
}

.moon-layout {
  max-width: none;
}

.moon-visual-card {
  min-height: calc(100vh - 176px);
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 18px;
  align-items: stretch;
}

.moon-content {
  order: 2;
}

.moon-canvas-wrap {
  order: 1;
}

.moon-canvas-wrap {
  position: relative;
  border: none;
  border-radius: 16px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 153, 87, 0.14), transparent 44%),
    radial-gradient(circle at 82% 18%, rgba(154, 98, 255, 0.2), transparent 50%),
    radial-gradient(circle at 50% 52%, rgba(23, 34, 78, 0.78), rgba(3, 7, 18, 0.95));
  height: clamp(360px, 68vh, 820px);
  min-height: 360px;
}

.moon-canvas-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 50%, transparent 41%, rgba(6, 10, 24, 0.32) 100%),
    radial-gradient(circle at 18% 16%, rgba(255, 176, 115, 0.08), transparent 38%),
    radial-gradient(circle at 84% 20%, rgba(168, 121, 255, 0.09), transparent 40%),
    linear-gradient(180deg, rgba(185, 164, 255, 0.05), transparent 40%);
}

.moon-overlay-stats {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  border: none;
  background: rgba(6, 10, 24, 0.68);
  box-shadow: 0 10px 22px rgba(1, 4, 14, 0.5);
  color: #e8edff;
  font-size: 0.86rem;
  letter-spacing: 0.01em;
  text-transform: none;
  pointer-events: none;
}

.moon-overlay-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.moon-overlay-key {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.66rem;
  color: rgba(172, 190, 245, 0.9);
}

.moon-overlay-value {
  font-weight: 600;
  color: #f4f6ff;
}

#moon-scene {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

#moon-scene.is-dragging {
  cursor: grabbing;
}

#moon-scene.is-flying {
  cursor: zoom-in;
}

#moon-scene.is-panning {
  cursor: move;
}

#moon-scene canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.moon-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  padding: 20px;
}

.moon-fallback-orb {
  --phase-shift: 100%;
  position: relative;
  width: clamp(170px, 32vmin, 320px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fff6d5 0%, #f7ddaa 56%, #dbbd80 100%);
  box-shadow:
    0 0 24px rgba(255, 198, 122, 0.34),
    0 0 72px rgba(255, 146, 88, 0.22),
    0 0 92px rgba(149, 107, 255, 0.2);
  overflow: hidden;
}

.moon-fallback-orb::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #11192f 0%, #060c1e 66%, #050913 100%);
  transform: translateX(var(--phase-shift));
}

.moon-fallback-note {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #99b2eb;
}

.moon-content {
  display: grid;
  align-content: center;
  gap: 10px;
}

.moon-stat-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.moon-stat {
  border: none;
  border-radius: 14px;
  padding: 14px 16px;
  background: linear-gradient(130deg, rgba(18, 30, 64, 0.66), rgba(7, 13, 28, 0.84));
  box-shadow: 0 12px 26px rgba(3, 7, 18, 0.38);
}

.moon-stat-label {
  margin: 0;
  color: #9eb3e9;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.moon-stat-value {
  margin: 4px 0 0;
  font-family: var(--font-heading);
  font-size: clamp(1.7rem, 2.6vw, 2.8rem);
  line-height: 1.05;
}

.moon-stat-sub {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #d1defe;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.moon-stat-meta {
  margin: 10px 0 0;
  color: rgba(210, 225, 255, 0.7);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.moon-day {
  border: none;
  background: linear-gradient(140deg, rgba(24, 42, 90, 0.82), rgba(8, 14, 32, 0.92));
}

.moon-day-controls {
  display: inline-flex;
  gap: 6px;
}

.moon-day-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(12, 20, 45, 0.78);
  box-shadow: inset 0 0 0 1px rgba(120, 150, 255, 0.15);
  color: #d2e0ff;
  font-size: 1rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.moon-day-btn:hover {
  box-shadow:
    inset 0 0 0 1px rgba(170, 195, 255, 0.45),
    0 0 12px rgba(132, 165, 255, 0.28);
  transform: translateY(-1px);
}

.moon-day-btn:active {
  transform: translateY(0) scale(0.98);
}

.moon-day-word {
  margin: 6px 0 0;
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 2vw, 2rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d3e0ff;
}

.moon-day-rating {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  border: none;
  background: rgba(10, 18, 38, 0.72);
  box-shadow: inset 0 0 0 1px rgba(120, 150, 255, 0.18);
  animation: moon-rating-pop 520ms ease-out both;
}

.moon-day-rating-text {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c9d7ff;
}

@media (max-width: 720px) {
  .moon-stat-pair {
    grid-template-columns: 1fr;
  }
}

.moon-star {
  width: 16px;
  height: 16px;
  display: inline-block;
  clip-path: polygon(
    50% 0%,
    61% 35%,
    98% 35%,
    68% 57%,
    79% 91%,
    50% 70%,
    21% 91%,
    32% 57%,
    2% 35%,
    39% 35%
  );
  background: rgba(190, 205, 255, 0.2);
  transform: scale(0.6);
  filter: drop-shadow(0 0 0 rgba(255, 220, 160, 0));
  opacity: 0.4;
  animation: moon-star-pop 700ms ease-out var(--star-delay, 0ms) both;
}

.moon-star.is-on {
  background: radial-gradient(circle at 30% 30%, #fff6d8, #ffd47a 45%, #ffb35a 100%);
  filter: drop-shadow(0 0 8px rgba(255, 196, 110, 0.65));
  opacity: 1;
}

.moon-star.is-off {
  background: rgba(160, 178, 230, 0.28);
}

@keyframes moon-star-pop {
  0% {
    transform: scale(0.2);
    opacity: 0;
    filter: drop-shadow(0 0 0 rgba(255, 220, 160, 0));
  }
  60% {
    transform: scale(1.2);
    opacity: 1;
    filter: drop-shadow(0 0 16px rgba(255, 214, 130, 0.7));
  }
  100% {
    transform: scale(1);
    opacity: 1;
    filter: drop-shadow(0 0 10px rgba(255, 204, 120, 0.6));
  }
}

@keyframes moon-rating-pop {
  0% { transform: translateY(6px) scale(0.92); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.moon-sky {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}

.star-layer {
  --star-size-factor: 1;
  position: absolute;
  inset: -20%;
  background-repeat: repeat;
  opacity: 0.65;
}

.star-layer-a {
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 1) 0.38px, transparent 1.02px),
    radial-gradient(circle, rgba(255, 255, 255, 0.98) 0.28px, transparent 0.88px);
  background-size:
    calc(145px * var(--star-size-factor)) calc(145px * var(--star-size-factor)),
    calc(190px * var(--star-size-factor)) calc(190px * var(--star-size-factor));
  animation: twinkle-a 4.1s linear infinite;
}

.star-layer-b {
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.98) 0.3px, transparent 0.92px),
    radial-gradient(circle, rgba(255, 255, 255, 0.94) 0.22px, transparent 0.8px);
  background-size:
    calc(120px * var(--star-size-factor)) calc(120px * var(--star-size-factor)),
    calc(165px * var(--star-size-factor)) calc(165px * var(--star-size-factor));
  animation: twinkle-b 5.3s linear infinite;
}

.star-layer-c {
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.93) 0.24px, transparent 0.72px);
  background-size: calc(210px * var(--star-size-factor)) calc(210px * var(--star-size-factor));
  animation: twinkle-c 6.2s linear infinite;
}

@keyframes twinkle-a {
  0% { opacity: 0.42; transform: translate(0, 0); }
  9% { opacity: 0.76; transform: translate(-1px, 0); }
  19% { opacity: 0.56; transform: translate(-3px, 1px); }
  31% { opacity: 0.91; transform: translate(-4px, 2px); }
  43% { opacity: 0.62; transform: translate(-5px, 2px); }
  58% { opacity: 0.98; transform: translate(-6px, 3px); }
  71% { opacity: 0.52; transform: translate(-5px, 2px); }
  83% { opacity: 0.88; transform: translate(-3px, 1px); }
  100% { opacity: 0.44; transform: translate(0, 0); }
}

@keyframes twinkle-b {
  0% { opacity: 0.32; transform: translate(0, 0); }
  14% { opacity: 0.68; transform: translate(2px, -1px); }
  23% { opacity: 0.4; transform: translate(3px, -2px); }
  37% { opacity: 0.84; transform: translate(5px, -3px); }
  52% { opacity: 0.5; transform: translate(7px, -4px); }
  66% { opacity: 0.78; transform: translate(8px, -4px); }
  79% { opacity: 0.46; transform: translate(7px, -3px); }
  90% { opacity: 0.72; transform: translate(4px, -2px); }
  100% { opacity: 0.34; transform: translate(0, 0); }
}

@keyframes twinkle-c {
  0% { opacity: 0.24; transform: translate(0, 0) scale(1); }
  12% { opacity: 0.44; transform: translate(-1px, 1px) scale(1.01); }
  29% { opacity: 0.3; transform: translate(-2px, 2px) scale(1.006); }
  45% { opacity: 0.58; transform: translate(-3px, 3px) scale(1.02); }
  61% { opacity: 0.26; transform: translate(-4px, 4px) scale(1.008); }
  74% { opacity: 0.51; transform: translate(-3px, 3px) scale(1.015); }
  89% { opacity: 0.33; transform: translate(-2px, 2px) scale(1.008); }
  100% { opacity: 0.25; transform: translate(0, 0) scale(1); }
}

.zodiac-page {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 6%, rgba(141, 189, 255, 0.22) 0%, transparent 40%),
    radial-gradient(circle at 86% 10%, rgba(141, 189, 255, 0.16) 0%, transparent 44%),
    radial-gradient(60% 60% at 52% 110%, rgba(129, 178, 255, 0.18) 0%, rgba(129, 178, 255, 0) 70%),
    conic-gradient(from 210deg at 50% 55%, rgba(115, 170, 255, 0.06) 0deg, rgba(115, 170, 255, 0) 140deg, rgba(175, 212, 255, 0.1) 220deg, rgba(115, 170, 255, 0.04) 320deg, rgba(115, 170, 255, 0.06) 360deg),
    linear-gradient(160deg, #070c1b 0%, #0f1a33 35%, #182a4f 70%, #23406d 100%);
  background-size: 200% 200%, 200% 200%, 170% 170%, 180% 180%, 120% 120%;
  background-blend-mode: screen, screen, normal, soft-light, normal;
  background-attachment: fixed;
  color: var(--zodiac-ink);
  transition: background 620ms ease, color 360ms ease;
  animation: zodiac-gradient-shift 42s ease-in-out infinite;
}

.zodiac-page::before {
  content: "";
  position: fixed;
  inset: -16%;
  z-index: -2;
  pointer-events: none;
  opacity: 0.32;
  mix-blend-mode: screen;
  filter: blur(60px) saturate(114%);
  background:
    radial-gradient(42% 34% at 16% 20%, rgba(177, 208, 255, 0.24) 0%, rgba(177, 208, 255, 0) 74%),
    radial-gradient(48% 40% at 84% 24%, rgba(121, 174, 255, 0.2) 0%, rgba(121, 174, 255, 0) 76%),
    radial-gradient(52% 38% at 56% 82%, rgba(153, 190, 255, 0.16) 0%, rgba(153, 190, 255, 0) 78%),
    radial-gradient(34% 28% at 48% 34%, rgba(224, 241, 255, 0.13) 0%, rgba(224, 241, 255, 0) 72%),
    radial-gradient(30% 24% at 34% 68%, rgba(162, 203, 255, 0.11) 0%, rgba(162, 203, 255, 0) 74%);
  animation: zodiac-mist-drift-a 48s ease-in-out infinite, zodiac-mist-breathe 20s ease-in-out infinite;
}

.zodiac-page::after {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.2;
  mix-blend-mode: soft-light;
  filter: blur(82px) saturate(108%);
  background:
    conic-gradient(from 40deg at 52% 58%, rgba(180, 216, 255, 0.14) 0deg, rgba(180, 216, 255, 0) 120deg, rgba(126, 177, 255, 0.12) 216deg, rgba(180, 216, 255, 0.08) 360deg),
    radial-gradient(48% 36% at 20% 74%, rgba(197, 222, 255, 0.18) 0%, rgba(197, 222, 255, 0) 74%),
    radial-gradient(42% 34% at 78% 66%, rgba(151, 193, 255, 0.2) 0%, rgba(151, 193, 255, 0) 72%),
    radial-gradient(36% 30% at 50% 16%, rgba(132, 176, 250, 0.15) 0%, rgba(132, 176, 250, 0) 70%);
  animation: zodiac-mist-drift-b 62s linear infinite, zodiac-aura-rotate 96s linear infinite;
}

.zodiac-page .menu,
.zodiac-page .sub-topbar,
.zodiac-page .zodiac-hero-card {
  border: none;
  background: rgba(9, 16, 32, 0.56);
  box-shadow: 0 18px 40px rgba(2, 6, 16, 0.42);
  backdrop-filter: blur(14px);
  transition: background 400ms ease, box-shadow 400ms ease;
}

.zodiac-page .menu-brand,
.zodiac-page h1,
.zodiac-page h2 {
  color: var(--zodiac-ink);
}

.zodiac-page .menu-link {
  color: #eaf4ff;
  border: none;
  background: rgba(12, 28, 54, 0.56);
  box-shadow: 0 10px 22px rgba(4, 9, 20, 0.28);
}

.zodiac-page .menu-link:hover {
  background: rgba(20, 40, 74, 0.78);
  box-shadow: 0 12px 26px rgba(4, 9, 20, 0.35);
}

.zodiac-page .menu-link.is-active {
  color: #091932;
  border: none;
  background: linear-gradient(135deg, var(--zodiac-glow), #f7fbff);
  box-shadow: 0 14px 30px rgba(4, 9, 20, 0.32);
}

.zodiac-page .control-group label,
.zodiac-page .inline-label {
  color: #bdd4f3;
}

.zodiac-page .inline-label[for="zodiac-date"],
.zodiac-page #zodiac-date {
  display: none;
}

.zodiac-page input[type="date"],
.zodiac-page select {
  border: none;
  background: rgba(10, 22, 43, 0.68);
  color: var(--zodiac-ink);
  box-shadow: 0 12px 26px rgba(3, 8, 18, 0.38);
  backdrop-filter: blur(12px);
  transition: box-shadow 220ms ease, background 220ms ease;
}

.zodiac-page input[type="date"]:focus-visible,
.zodiac-page select:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--zodiac-glow) 55%, transparent),
    0 12px 26px rgba(3, 8, 18, 0.38);
}

.zodiac-page .btn {
  color: #061127;
  border-color: transparent;
  background: linear-gradient(120deg, var(--zodiac-glow), #f2f8ff);
}

.zodiac-layout {
  max-width: 1200px;
}

.zodiac-topbar {
  justify-content: flex-end;
}

.zodiac-hero-card {
  min-height: calc(100vh - 176px);
  display: grid;
  align-content: center;
  gap: 14px;
  padding: clamp(18px, 3vw, 30px);
}

#zodiac-content {
  margin-top: 8px;
}

.zodiac-list {
  display: grid;
  gap: 14px;
}

.zodiac-line {
  border: none;
  border-radius: 20px;
  background: linear-gradient(140deg, rgba(14, 28, 54, 0.68), rgba(9, 17, 33, 0.58));
  padding: 14px 16px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
  box-shadow: 0 16px 30px rgba(4, 8, 18, 0.4);
  backdrop-filter: blur(12px);
}

.zodiac-line-emoji {
  width: clamp(2.8rem, 7vw, 4.6rem);
  height: clamp(2.8rem, 7vw, 4.6rem);
  display: grid;
  place-items: center;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  line-height: 1;
}

.zodiac-line-copy {
  display: grid;
  gap: 2px;
}

.zodiac-line-name {
  font-family: var(--font-heading);
  font-size: clamp(1.35rem, 3.2vw, 2.35rem);
  line-height: 1.05;
}

.zodiac-line-type {
  color: #aec5e7;
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@keyframes zodiac-gradient-shift {
  0%,
  100% {
    background-position: 0% 0%, 100% 0%, 0% 100%, 0% 40%, 0% 0%;
  }
  25% {
    background-position: 36% 20%, 72% 0%, 24% 96%, 36% 50%, 20% 14%;
  }
  50% {
    background-position: 100% 44%, 0% 100%, 100% 0%, 100% 54%, 100% 100%;
  }
  75% {
    background-position: 74% 72%, 22% 100%, 84% 16%, 78% 62%, 78% 88%;
  }
}

@keyframes zodiac-aurora {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(0, -2.4%, 0) scale(1.03);
  }
}

@keyframes zodiac-mist-drift-a {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1.02);
  }
  40% {
    transform: translate3d(-1.4%, -0.9%, 0) scale(1.06);
  }
  72% {
    transform: translate3d(1.2%, -0.4%, 0) scale(1.04);
  }
}

@keyframes zodiac-mist-drift-b {
  0% {
    transform: translate3d(-0.8%, 0, 0) scale(1.04);
  }
  50% {
    transform: translate3d(1.4%, -0.8%, 0) scale(1.08);
  }
  100% {
    transform: translate3d(-0.8%, 0, 0) scale(1.04);
  }
}

@keyframes zodiac-mist-breathe {
  0%,
  100% {
    opacity: 0.44;
  }
  50% {
    opacity: 0.58;
  }
}

@keyframes zodiac-aura-rotate {
  0% {
    transform: rotate(0deg) scale(1.03);
  }
  50% {
    transform: rotate(180deg) scale(1.09);
  }
  100% {
    transform: rotate(360deg) scale(1.03);
  }
}

@media (prefers-reduced-motion: reduce) {
  .zodiac-page,
  .zodiac-page::before,
  .zodiac-page::after {
    animation: none !important;
  }
}

@media (max-width: 980px) {
  .dashboard-page .dashboard {
    grid-template-columns: 1fr;
  }

  .card-wide {
    grid-column: span 1;
  }

  .transit-config-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-actions-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-actions-controls select {
    grid-column: 1 / -1;
  }

  .moon-visual-card {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .moon-canvas-wrap {
    height: clamp(300px, 58vh, 560px);
    min-height: 300px;
  }

  .zodiac-line {
    gap: 12px;
  }
}

@media (max-width: 680px) {
  :root {
    --menu-pill-height: 22px;
  }

  .dashboard-page {
    padding: 16px;
  }

  .dashboard-page .date-panel {
    padding: 12px 14px;
  }

  body {
    padding: 14px;
  }

  .menu {
    flex-wrap: wrap;
    gap: 8px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .menu-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding-top: 6px;
    margin-left: 0;
    border-top: 1px dashed var(--line);
    display: none;
  }

  .menu.is-open .menu-actions {
    display: flex;
  }

  .menu-links {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
  }

  .menu-link {
    justify-content: center;
    padding: 4px 8px;
    font-size: 0.74rem;
  }

  .menu-theme {
    align-self: flex-start;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .sub-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-actions {
    align-items: stretch;
  }

  .topbar .btn {
    width: 100%;
  }

  .home-grid {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }

  .todo-controls {
    grid-template-columns: 1fr;
  }

  .sun-times-grid {
    grid-template-columns: 1fr;
  }

  .sun-golden-grid {
    grid-template-columns: 1fr;
  }

  .market-charts {
    grid-template-columns: 1fr;
  }

  .market-candle-grid {
    grid-template-columns: 1fr;
  }

  .market-tv-grid {
    grid-template-columns: 1fr;
  }

  .transit-provider-forms-grid {
    grid-template-columns: 1fr;
  }

  .transit-embed-grid {
    grid-template-columns: 1fr;
  }

  .transit-config-grid {
    grid-template-columns: 1fr;
  }

  .transit-config-actions .btn {
    width: 100%;
  }

  .quick-actions-controls {
    grid-template-columns: 1fr;
  }

  .quick-actions-controls select {
    grid-column: auto;
  }

  .quick-actions-actions .btn {
    width: 100%;
  }

  .quick-action-item {
    grid-template-columns: 1fr;
  }

  .quick-action-tools {
    justify-content: flex-end;
  }

  .transit-stop-board {
    padding: 10px;
  }

  .transit-stop-head h3 {
    font-size: 1.05rem;
  }

  .transit-stop-cols,
  .transit-led-row {
    grid-template-columns: minmax(86px, 0.9fr) minmax(0, 1.45fr) minmax(64px, 0.55fr);
    gap: 8px;
  }

  .transit-stop-cols {
    margin: 0 2px 8px;
    font-size: 0.72rem;
  }

  .transit-led-line,
  .transit-led-destination,
  .transit-led-minutes {
    font-size: 0.92rem;
  }

  .market-candle-ohlc {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .webcam-grid {
    grid-template-columns: 1fr;
  }

  .zodiac-hero-card {
    min-height: calc(100vh - 220px);
  }

  .zodiac-line-name {
    font-size: clamp(1.2rem, 6vw, 1.8rem);
  }

  .weather-page .sub-topbar h1 {
    font-size: clamp(1.9rem, 9vw, 2.45rem);
  }

  .weather-page .weather-city-symbol {
    font-size: clamp(3.3rem, 11vw, 4.6rem);
  }

  .weather-page .weather-city.is-primary .weather-city-symbol {
    font-size: clamp(3.6rem, 12vw, 5rem);
  }

  .weather-page .weather-city-temp {
    font-size: clamp(2.1rem, 9vw, 2.8rem);
  }

  .weather-page .weather-city.is-primary .weather-city-temp {
    font-size: clamp(2.3rem, 9.2vw, 3.1rem);
  }
}

@media (max-width: 420px) {
  .home-grid {
    grid-template-columns: 1fr;
  }
}
