: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;
  --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-color: var(--bg);
  padding: 22px;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-footer {
  margin-top: auto;
  padding-top: 18px;
  font-size: 0.82rem;
  color: var(--muted);
}

.page-footer-link {
  color: #ffffff;
  opacity: 0.8;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
  transition: border-color 180ms ease, color 180ms ease, opacity 180ms ease;
}

.page-footer-link:hover {
  color: #ffffff;
  opacity: 1;
  border-bottom-color: currentColor;
}

.transit-empty {
  text-align: center;
  font-size: 1.05rem;
}

.bg-cycle {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  pointer-events: none;
}

.bg-cycle-layer {
  position: absolute;
  inset: -6%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 2s ease-in-out;
  animation: bg-drift 90s ease-in-out infinite alternate;
  transform-origin: center;
  will-change: opacity, transform;
}

.bg-cycle-layer:first-child {
  background-image: url("img/bg/background0.jpg");
}

.bg-cycle-layer.is-active {
  opacity: 1;
}

.bg-cycle-layer:nth-child(2) {
  animation-duration: 100s;
  animation-direction: alternate-reverse;
}

@keyframes bg-drift {
  0% {
    transform: scale(1.02) translate3d(-0.6%, -0.4%, 0);
  }
  100% {
    transform: scale(1.05) translate3d(0.6%, 0.8%, 0);
  }
}

@media (max-width: 720px) {
  .bg-cycle-layer {
    inset: -10%;
    background-position: center;
    background-size: cover;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bg-cycle-layer {
    animation: none;
    transition: none;
  }
}

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);
}

.page-title-wrap {
  padding: 18px clamp(20px, 6vw, 64px) 6px;
  display: flex;
  justify-content: center;
}

.page-title {
  font-family: "Sora", "Arial", sans-serif;
  font-size: clamp(2.6rem, 6.9vw, 3.8rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 900;
  margin: 0;
  text-align: center;
  color: white;
  mix-blend-mode: exclusion;
}

#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;
}

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

.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-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: 660px;
  margin: 0 auto;
  padding: 10px;
  width: 100%;
}

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

.card-head {
  display: none;
}

.card-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

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

.source-note, #linz-stop-count {
  display: none;
}

button {
  border: 0;
  border-radius: 999px;
}

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

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

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

.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 0;
  background: var(--surface-solid);
  color: var(--text);
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.icon-button:hover {
  background: var(--accent-soft);
}


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

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(16px, 3vw, 32px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease, visibility 0s linear 180ms;
  z-index: 120;
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 180ms ease;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 26, 42, 0.45);
  backdrop-filter: blur(6px);
}

.modal-panel {
  position: relative;
  width: min(980px, 96vw);
  max-height: 90vh;
  overflow: auto;
  border-radius: 20px;
  transform: translateY(10px) scale(0.98);
  transition: transform 200ms ease;
  z-index: 1;
}

.modal.is-open .modal-panel {
  transform: translateY(0) scale(1);
}

body.modal-open {
  overflow: hidden;
}

.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;
}

.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);
}

.transit-stop-board {
  margin: 20px auto 24px auto;
  width: min(88vw, 400px);
  max-width: 420px;
  aspect-ratio: 3 / 4.2;
  display: flex;
  flex-direction: column;
  gap: 0;
  color: #2a323b;
  filter: drop-shadow(0 14px 22px rgba(18, 28, 40, 0.22));
  perspective: 1200px;
}

.transit-stop-cap {
  position: relative;
  padding: 16px 18px 0;
  border: 1px solid #b6beca;
  border-bottom: none;
  border-radius: 160px 160px 0 0;
  background: linear-gradient(180deg, #f7f8fa 0%, #eef1f4 60%, #e4e8ee 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.9),
    inset 0 -10px 14px rgba(0, 0, 0, 0.08),
    0 12px 16px rgba(18, 28, 40, 0.16);
}

.transit-stop-symbol {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  border: 4px solid #1f8f8a;
  background: #d6bf46;
  color: #1f857f;
  display: grid;
  place-items: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2.1rem;
  line-height: 1;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.6);
}

.transit-stop-symbol-letter {
  transform: translateY(1px);
}

.transit-stop-title {
  margin: 8px 0 12px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  color: #2f3a46;
  text-align: center;
}

.linz-stop-picker {
  margin-top: 4px;
  display: grid;
  gap: 12px;
  padding: 0;
  border-radius: 0;
  border: none;
  background: transparent;
}

.linz-stop-filter-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.linz-stop-controls {
  display: grid;
  gap: 10px;
  justify-items: center;
  margin-top: 10px;
}

.linz-stop-config-row {
  display: flex;
  justify-content: center;
}

.linz-stop-controls:not(.is-mode-open) .linz-stop-config-row {
  padding-top: 8px;
}

.linz-stop-config-row .icon-button {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 18px rgba(12, 24, 42, 0.12);
  backdrop-filter: blur(14px) saturate(150%);
  position: relative;
}

.linz-stop-config-row .icon-button:hover {
  background: rgba(255, 255, 255, 0.45);
}

.linz-stop-config-row .icon-close {
  display: none;
}

.linz-stop-config-row .icon-gear, .linz-stop-config-row .icon-close {
  position: absolute;
  top: 50%;
}

.linz-stop-config-row .icon-gear {
  left: 50%;
  transform: translate(-50%, -50%);
}

.linz-stop-config-row .icon-close {
  left: 50%;
  transform: translate(-50%, -50%);
}

.linz-stop-config-row .icon-button[aria-expanded="true"] .icon-gear {
  display: none;
}

.linz-stop-config-row .icon-button[aria-expanded="true"] .icon-close {
  display: inline-block;
}

#linz-stop-select {
  min-height: 0;
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  border: none;
  background: transparent;
  font-size: 0.98rem;
}

#linz-stop-filter {
  padding: 26px 22px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 15px 10px rgba(12, 24, 42, 0.07);
  backdrop-filter: blur(7px) saturate(150%);
  font-size: 1.35rem;
  text-align: center;
  max-width: 420px;
  box-sizing: border-box;
  margin: 0 auto;
  width: 100%;
  cursor: text;
}

#linz-stop-filter::placeholder {
  color: rgba(255, 255, 255, 0.8);
}

.linz-stop-mode {
  display: flex;
  justify-content: center;
  max-height: 0;
  opacity: 0;
  transform: scale(0.96);
  transform-origin: top center;
  pointer-events: none;
  transition: max-height 280ms ease, opacity 240ms ease, transform 260ms ease;
}

.linz-stop-controls.is-mode-open .linz-stop-mode {
  max-height: 160px;
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.linz-stop-mode-actions {
  display: flex;
  justify-content: center;
  max-height: 0;
  opacity: 0;
  transform: scale(0.96);
  transform-origin: top center;
  pointer-events: none;
  transition: max-height 280ms ease, opacity 240ms ease, transform 260ms ease;
}

.linz-stop-controls.is-mode-open .linz-stop-mode-actions {
  max-height: 80px;
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.linz-stop-mode-actions-track {
  width: 100%;
  max-width: 420px;
  padding: 8px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 15px 10px rgba(12, 24, 42, 0.07);
  backdrop-filter: blur(7px) saturate(150%);
  display: flex;
  justify-content: center;
  gap: 10px;
}

.linz-stop-mode-track {
  width: 100%;
  max-width: 420px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 15px 10px rgba(12, 24, 42, 0.07);
  backdrop-filter: blur(7px) saturate(150%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.linz-stop-mode-title {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 0.76rem;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.02em;
}

.linz-stop-mode-option {
  position: relative;
  cursor: pointer;
}

.linz-stop-mode-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.linz-stop-mode-option span {
  display: block;
  text-align: center;
  padding: 10px 12px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  transition: color 260ms ease, background 300ms ease, box-shadow 300ms ease, transform 260ms ease;
  will-change: transform;
  background: rgba(255, 255, 255, 0.18);
}

.linz-stop-mode-option:hover span {
  color: var(--text);
  background: rgba(255, 255, 255, 0.33);
}

.linz-stop-mode-option input:checked + span {
  color: var(--accent-contrast);
  background: var(--accent);
  box-shadow: 0 10px 16px rgba(19, 99, 223, 0.24);
}

.linz-stop-mode-option input:focus-visible + span {
  outline: 2px solid var(--accent-ring);
  outline-offset: 2px;
}

.linz-stop-mode-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 160ms ease;
}

.linz-stop-mode-action:active {
  transform: translateY(1px);
}

.linz-stop-mode-save {
  background: rgba(255, 255, 255, 0.32);
  color: var(--text);
  box-shadow: 0 10px 14px rgba(12, 24, 42, 0.12);
  backdrop-filter: blur(12px) saturate(150%);
}

.linz-stop-mode-save:hover {
  background: rgba(255, 255, 255, 0.45);
}

.linz-stop-mode-clear {
  background: rgba(233, 92, 92, 0.22);
  color: #9b1f1f;
}

.linz-stop-mode-clear:hover {
  color: #7a1515;
  background: rgba(233, 92, 92, 0.32);
}

.linz-stop-mode-action:focus-visible {
  outline: 2px solid var(--accent-ring);
  outline-offset: 2px;
}

#linz-stop-filter:focus-visible {
  outline: none;
}

#linz-stop-filter:focus, #linz-stop-filter:active {
  outline: none;
}

#linz-stop-filter:focus::placeholder {
  color: rgba(255, 255, 255, 0.44);
}

#linz-stop-filter:focus {
  color: #121212;
}

.linz-stop-dropdown {
  height: 220px;
  background: transparent;
}

.linz-stop-select-wrap {
  display: none;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

#linz-stop-select:focus-visible {
  outline: 2px solid var(--accent-ring);
  outline-offset: 2px;
}

#linz-stop-select option {
  padding: 6px 8px;
}

#linz-stop-select option:checked {
  background: var(--accent);
  color: var(--accent-contrast);
}

.linz-stop-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.small-note {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.7;
}

#linz-stop-add, #linz-stop-replace {
  display: none;
}

.transit-save-row {
  margin-top: 2px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.transit-save-row .meta {
  min-height: 1em;
}

#transit-save-status {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  box-shadow: 0 10px 16px rgba(12, 24, 42, 0.1);
  backdrop-filter: blur(10px) saturate(160%);
  color: #1f5b34;
  font-weight: 700;
}

#transit-save-status:empty {
  display: none;
}

#transit-save-default {
  background: rgba(255, 255, 255, 0.18);
  color: var(--text);
  border: 0;
  box-shadow: 0 10px 18px rgba(12, 24, 42, 0.12);
  backdrop-filter: blur(10px) saturate(160%);
  font-size: 1rem;
  padding: 8px 10px;
  min-width: 44px;
  min-height: 44px;
  width: auto;
  height: auto;
}

#transit-save-default:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.33);
}

.transit-stop-body {
  position: relative;
  border: 1px solid #b6beca;
  border-top: none;
  border-radius: 0 0 16px 16px;
  padding: 16px 18px 18px;
  background: linear-gradient(180deg, #eff2f6 0%, #e7ebf1 55%, #dde3ea 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.85),
    inset 0 -16px 22px rgba(0, 0, 0, 0.12),
    0 16px 20px rgba(18, 28, 40, 0.18);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.transit-stop-cols {
  display: grid;
  grid-template-columns: minmax(64px, 0.8fr) minmax(0, 1.8fr) minmax(72px, 0.7fr);
  gap: 8px;
  margin: 0 4px 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #d1d6dc;
  font-size: 0.72rem;
  color: #4f5a69;
  letter-spacing: 0.02em;
}

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

.transit-stop-led {
  display: grid;
  gap: 6px;
  padding: 0 2px;
  flex: 1;
  align-content: start;
}

.transit-led-row {
  display: grid;
  grid-template-columns: minmax(64px, 0.8fr) minmax(0, 1.8fr) minmax(72px, 0.7fr);
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 0 6px;
  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: 30px;
  border-color: #1d2328;
  opacity: 0.75;
}

.transit-stop-error {
  border-color: #4c2830;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(136, 95, 104, 0.2) 0,
      rgba(136, 95, 104, 0.2) 1px,
      transparent 1px,
      transparent 16px
    ),
    linear-gradient(180deg, #2a1a20 0%, #1a1115 100%);
}

.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.28;
  animation: transitPixelBlink 1.25s steps(1, end) infinite;
  animation-delay: var(--delay, 0s);
}

.transit-loading-pixel-1 {
  --delay: 0.00s; --pulse: 0.70; 
}

.transit-loading-pixel-2 {
  --delay: 0.04s; --pulse: 0.80; 
}

.transit-loading-pixel-3 {
  --delay: 0.09s; --pulse: 0.90; 
}

.transit-loading-pixel-4 {
  --delay: 0.13s; --pulse: 1.00; 
}

.transit-loading-pixel-5 {
  --delay: 0.17s; --pulse: 1.10; 
}

.transit-loading-pixel-6 {
  --delay: 0.21s; --pulse: 1.20; 
}

.transit-loading-pixel-7 {
  --delay: 0.26s; --pulse: 1.30; 
}

.transit-loading-pixel-8 {
  --delay: 0.30s; --pulse: 1.40; 
}

.transit-loading-pixel-9 {
  --delay: 0.34s; --pulse: 0.70; 
}

.transit-loading-pixel-10 {
  --delay: 0.39s; --pulse: 0.80; 
}

.transit-loading-pixel-11 {
  --delay: 0.43s; --pulse: 0.90; 
}

.transit-loading-pixel-12 {
  --delay: 0.47s; --pulse: 1.00; 
}

.transit-loading-pixel-13 {
  --delay: 0.52s; --pulse: 1.10; 
}

.transit-loading-pixel-14 {
  --delay: 0.56s; --pulse: 1.20; 
}

.transit-loading-pixel-15 {
  --delay: 0.60s; --pulse: 1.30; 
}

.transit-loading-pixel-16 {
  --delay: 0.65s; --pulse: 1.40; 
}

.transit-loading-pixel-17 {
  --delay: 0.69s; --pulse: 0.70; 
}

.transit-loading-pixel-18 {
  --delay: 0.73s; --pulse: 0.80; 
}

.transit-loading-pixel-19 {
  --delay: 0.77s; --pulse: 0.90; 
}

.transit-loading-pixel-20 {
  --delay: 0.82s; --pulse: 1.00; 
}

.transit-loading-pixel-21 {
  --delay: 0.86s; --pulse: 1.10; 
}

.transit-loading-pixel-22 {
  --delay: 0.90s; --pulse: 1.20; 
}

.transit-loading-pixel-23 {
  --delay: 0.95s; --pulse: 1.30; 
}

.transit-loading-pixel-24 {
  --delay: 0.99s; --pulse: 1.40; 
}

.transit-loading-pixel-25 {
  --delay: 1.03s; --pulse: 0.70; 
}

.transit-loading-pixel-26 {
  --delay: 1.07s; --pulse: 0.80; 
}

.transit-loading-pixel-27 {
  --delay: 1.12s; --pulse: 0.90; 
}

.transit-loading-pixel-28 {
  --delay: 1.16s; --pulse: 1.00; 
}

.transit-loading-pixel-29 {
  --delay: 1.20s; --pulse: 1.10; 
}

.transit-loading-pixel-30 {
  --delay: 1.25s; --pulse: 1.20; 
}

.transit-loading-pixel-31 {
  --delay: 1.29s; --pulse: 1.30; 
}

.transit-loading-pixel-32 {
  --delay: 1.33s; --pulse: 1.40; 
}

.transit-loading-pixel-33 {
  --delay: 1.38s; --pulse: 0.70; 
}

.transit-loading-pixel-34 {
  --delay: 1.42s; --pulse: 0.80; 
}

.transit-loading-pixel-35 {
  --delay: 1.46s; --pulse: 0.90; 
}

.transit-loading-pixel-36 {
  --delay: 0.01s; --pulse: 1.00; 
}

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

.transit-stop-error .transit-led-empty-text {
  color: #ff9b9b;
  text-shadow: 0 0 6px rgba(255, 132, 132, 0.45);
}

.transit-led-line, .transit-led-destination, .transit-led-minutes {
  color: #8ef75f;
  font-family: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
  font-size: 0.9rem;
  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-icon {
  display: inline-block;
  width: 1.22em;
  margin-right: 3px;
  font-size: 1.06em;
  opacity: 0.84;
  text-align: center;
  color: #63c64a;
}

.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);
}

.transit-stop-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #d1d6dc;
}

@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: 0.82rem;
}

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

.coin-icon {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 0.92rem;
  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: 2rem;
  border-radius: 8px;
  font-size: 0.56rem;
  letter-spacing: 0.02em;
}

.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-icon {
  margin-right: 0.55em;
  margin-left: 3px;
  font-size: 1.1em;
  opacity: 0.85;
  color: #63c64a;
}

.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;
}

.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 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.weather-city {
  --weather-glow: #ffd75d;
  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-glow-sun {
  --weather-glow: #ffd75d;
}

.weather-glow-cloud {
  --weather-glow: #bbcdf4;
}

.weather-glow-fog {
  --weather-glow: #c0cfdd;
}

.weather-glow-rain {
  --weather-glow: #7fc5ff;
}

.weather-glow-snow {
  --weather-glow: #dff2ff;
}

.weather-glow-storm {
  --weather-glow: #b9a2ff;
}

.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: 10px;
  overflow: hidden;
  background: var(--surface-solid);
  position: relative;
}

.weather-city-webcam img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.weather-city-webcam::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 16, 34, 0.08) 32%, rgba(8, 16, 34, 0.74) 100%);
  pointer-events: none;
}

.weather-city-webcam-overlay {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  min-height: clamp(92px, 14vw, 130px);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(12, 24, 48, 0.66), rgba(8, 14, 24, 0.86));
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.32);
}

.weather-city-webcam-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  font-size: clamp(3.2rem, 8.4vw, 5.8rem);
  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(1.84rem, 4.6vw, 2.5rem);
  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 {
  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: none;
  padding: 9px 10px;
  font: inherit;
  font-weight: 200;
  background: var(--surface-solid);
}

input[type="search"]::-webkit-search-cancel-button {
  cursor: pointer;
}

input[type="text"]::placeholder, input[type="search"]::placeholder, input[type="url"]::placeholder, input[type="number"]::placeholder, input[type="date"]::placeholder, textarea::placeholder {
  color: #010101;
  opacity: 1;
}

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

.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;
}

.entry-color-green {
  --item-color: #2fa55a;
  --item-bg: #ecf8f0;
}

.entry-color-orange {
  --item-color: #e8892f;
  --item-bg: #fff3e8;
}

.entry-color-violet {
  --item-color: #8a64d6;
  --item-bg: #f4efff;
}

.entry-color-blue {
  --item-color: #3f7ddb;
  --item-bg: #eaf1ff;
}

.entry-color-red {
  --item-color: #d14a58;
  --item-bg: #ffedf0;
}

.entry-color-yellow {
  --item-color: #d1af2f;
  --item-bg: #fff9e7;
}

.entry-color-pink {
  --item-color: #d06ca6;
  --item-bg: #ffeff8;
}

.todo-item {
  --dot-color: var(--item-color, #90a9cf);
  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-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: 8px;
  margin-bottom: 10px;
}

.sun-time-item, .sun-golden-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: color-mix(in srgb, var(--tile-hover-bg) 86%, var(--surface-solid) 14%);
  display: grid;
  gap: 6px;
}

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

.sun-time-value, .sun-golden-item b {
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  line-height: 1.1;
}

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

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

.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-page > * {
  position: relative;
  z-index: 1;
}

.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 .sub-topbar {
  border-color: rgba(170, 190, 255, 0.28);
  background: rgba(9, 16, 36, 0.5);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
}

.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 .sub-topbar, .moon-page .card {
  -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-illumination {
  --illum-shift: 0%;
  position: absolute;
  top: 18px;
  right: 18px;
  width: 120px;
  height: 120px;
  border-radius: 16px;
  background: rgba(7, 12, 26, 0.6);
  border: 1px solid rgba(140, 170, 255, 0.35);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
  display: grid;
  place-items: center;
  padding: 10px;
  z-index: 2;
}

.moon-illumination-phase {
  position: relative;
  width: 64px;
  height: 64px;
}

.moon-illumination-orb, .moon-illumination-shadow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.moon-illumination-orb {
  background: radial-gradient(circle at 30% 30%, #fff6d8, #ffd47a 52%, #f2a85b 100%);
  box-shadow:
    0 0 18px rgba(255, 204, 120, 0.45),
    0 0 35px rgba(255, 164, 90, 0.35);
}

.moon-illumination-shadow {
  background: radial-gradient(circle at 40% 40%, #11192f 0%, #060c1e 66%, #050913 100%);
  transform: translateX(var(--illum-shift));
  transition: transform 500ms ease;
}

.moon-illumination-label {
  margin-top: 8px;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b6c8ff;
}

#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 {
  border: 1px solid rgba(170, 190, 255, 0.24);
  border-radius: 14px;
  padding: 14px 16px;
  background: linear-gradient(130deg, rgba(19, 34, 72, 0.7), rgba(8, 15, 33, 0.86));
}

.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-day {
  border-color: rgba(120, 150, 255, 0.4);
  background: linear-gradient(140deg, rgba(24, 42, 90, 0.82), rgba(8, 14, 32, 0.92));
}

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

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

.moon-day-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(120, 150, 255, 0.45);
  background: rgba(12, 20, 45, 0.7);
  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 {
  border-color: rgba(170, 195, 255, 0.8);
  box-shadow: 0 0 12px rgba(132, 165, 255, 0.35);
  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: 1px solid rgba(120, 150, 255, 0.35);
  background: rgba(10, 18, 38, 0.65);
  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;
}

.moon-day-rating .moon-star:nth-child(1) {
  --star-delay: 90ms; 
}

.moon-day-rating .moon-star:nth-child(2) {
  --star-delay: 180ms; 
}

.moon-day-rating .moon-star:nth-child(3) {
  --star-delay: 270ms; 
}

.moon-day-rating .moon-star:nth-child(4) {
  --star-delay: 360ms; 
}

.moon-day-rating .moon-star:nth-child(5) {
  --star-delay: 450ms; 
}

.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.82;
}

@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 10% 2%, color-mix(in srgb, var(--zodiac-bg-c) 62%, transparent) 0%, transparent 42%),
    radial-gradient(circle at 88% 8%, color-mix(in srgb, var(--zodiac-glow) 48%, transparent) 0%, transparent 46%),
    radial-gradient(56% 54% at 52% 112%, rgba(129, 178, 255, 0.34) 0%, rgba(129, 178, 255, 0) 72%),
    conic-gradient(from 210deg at 50% 55%, rgba(115, 170, 255, 0.08) 0deg, rgba(115, 170, 255, 0) 120deg, rgba(175, 212, 255, 0.14) 210deg, rgba(115, 170, 255, 0.06) 300deg, rgba(115, 170, 255, 0.08) 360deg),
    linear-gradient(162deg, #060a18 0%, #0b142d 28%, var(--zodiac-bg-a) 50%, var(--zodiac-bg-b) 74%, #4a79c8 100%);
  background-size: 230% 230%, 210% 210%, 180% 180%, 170% 170%, 180% 180%;
  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.5;
  mix-blend-mode: screen;
  filter: blur(54px) saturate(118%);
  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.38;
  mix-blend-mode: soft-light;
  filter: blur(74px) saturate(110%);
  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 .sub-topbar {
  border-color: color-mix(in srgb, var(--zodiac-glow) 35%, transparent);
  background: rgba(10, 18, 38, 0.56);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.42);
  transition: background 400ms ease, border-color 400ms ease, box-shadow 400ms ease;
}

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

.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-color: color-mix(in srgb, var(--zodiac-glow) 50%, #2f4a7f 50%);
  background: rgba(10, 22, 43, 0.82);
  color: var(--zodiac-ink);
}

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

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

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

.zodiac-line {
  border: 1px solid color-mix(in srgb, var(--zodiac-glow) 34%, transparent);
  border-radius: 16px;
  background: rgba(8, 18, 37, 0.64);
  padding: 12px 14px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
}

.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) {
  .transit-config-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 680px) {
  body {
    padding: 14px;
  }

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

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

  .card-head-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .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-action-item {
    grid-template-columns: 1fr;
  }

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

  .transit-stop-board {
    /*width: min(92vw, 420px);*/
    aspect-ratio: 3 / 4.9;
  }

  .transit-stop-cap {
    padding: 14px 14px 0;
    border-radius: 140px 140px 0 0;
  }

  .transit-stop-symbol {
    width: 56px;
    height: 56px;
    font-size: 1.9rem;
  }

  .transit-stop-title {
    font-size: 1.2rem;
  }

  .transit-stop-cols, .transit-led-row {
    grid-template-columns: minmax(58px, 0.8fr) minmax(0, 1.5fr) minmax(60px, 0.6fr);
    gap: 6px;
  }

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

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

  .transit-stop-brand {
    font-size: 1.1rem;
  }

  .transit-stop-brand-sub {
    font-size: 0.64rem;
  }

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

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

  .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);
  }
}
