:root {
  --bg: #ffffff;
  --card: #ffffff;
  --tray: rgba(0, 0, 0, 0.035);
  --fg: #171717;
  --muted-fg: #9a9a9a;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.13);
  --primary: #171717;
  --primary-fg: #f5f5f5;
  --info-bg: rgba(59, 130, 246, 0.08);
  --info-fg: #3b82f6;
  --success-bg: rgba(16, 185, 129, 0.09);
  --success-fg: #10b981;
  --warning-bg: rgba(245, 158, 11, 0.10);
  --warning-fg: #f59e0b;
  --radius: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

[data-theme="dark"] {
  --bg: #0c0c0c;
  --card: #171717;
  --tray: rgba(255, 255, 255, 0.04);
  --fg: #f5f5f5;
  --muted-fg: #9a9a9a;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --primary: #f5f5f5;
  --primary-fg: #171717;
  --info-bg: rgba(59, 130, 246, 0.16);
  --info-fg: #3b82f6;
  --success-bg: rgba(16, 185, 129, 0.16);
  --success-fg: #10b981;
  --warning-bg: rgba(245, 158, 11, 0.16);
  --warning-fg: #f59e0b;
}

[hidden] {
  display: none !important;
}

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

html {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 180ms ease, color 180ms ease;
}

::selection {
  background: rgba(59, 130, 246, 0.18);
}

:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select {
  font-family: inherit;
  color: inherit;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.container {
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: 20px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.header-inner {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--primary);
  color: var(--primary-fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13.5px;
  color: var(--muted-fg);
}

.header-nav a:hover {
  color: var(--fg);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* coss/ui Buttons */
.btn {
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease, opacity 150ms ease;
}

.btn-outline {
  background: var(--card);
  border-color: var(--border-strong);
  color: var(--fg);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.03);
}

.btn-outline:hover {
  background: var(--tray);
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-fg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.btn-primary:hover {
  opacity: 0.9;
}

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

.btn-lg {
  height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
}

/* Hero Head */
.observatory {
  padding-top: 26px;
  padding-bottom: 48px;
}

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-fg);
  margin: 0 0 4px;
}

h1 {
  font-size: clamp(26px, 3.2vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 600;
  margin: 0;
  text-wrap: balance;
}

.hero-sub {
  margin: 6px 0 0;
  font-size: 14.5px;
  color: var(--muted-fg);
  max-width: 62ch;
}

.sync-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted-fg);
}

/* Two-Level Weather Taxonomy Toolbar */
.taxonomy-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.seg-scroll {
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.seg-scroll::-webkit-scrollbar {
  display: none;
}

.seg-control {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius);
  background: var(--tray);
  border: 1px solid var(--border);
  gap: 2px;
}

.seg-item {
  height: 30px;
  padding: 0 11px;
  border-radius: 7px;
  border: 0;
  background: transparent;
  color: var(--muted-fg);
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 150ms ease, color 150ms ease;
}

.seg-item:hover {
  color: var(--fg);
}

.seg-item[aria-pressed="true"] {
  background: var(--card);
  color: var(--fg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 0 0 1px var(--border);
}

.seg-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-fg);
}

.subtags-row {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.subtags-row::-webkit-scrollbar {
  display: none;
}

.subtag-pill {
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--fg);
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.subtag-pill:hover {
  background: var(--tray);
  border-color: var(--border-strong);
}

.subtag-pill.is-zero {
  color: var(--muted-fg);
  opacity: 0.72;
}

.subtag-pill[aria-pressed="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-fg);
  opacity: 1;
}

.subtag-pill[aria-pressed="true"] .subtag-count {
  color: var(--primary-fg);
  opacity: 0.85;
}

.subtag-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-fg);
}

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

/* coss/ui Frame Tray + Flanking Side Switch Rails */
.frame {
  background: var(--tray);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 8px;
}

.stage-shell {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 88px;
  gap: 12px;
  align-items: center;
}

.side-switch-btn {
  grid-row: 1;
  width: 100%;
  min-height: 112px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 14px;
  border: 0;
  background: transparent;
  color: var(--muted-fg);
  cursor: pointer;
  padding: 16px 12px;
  box-shadow: none;
  transition: background-color 150ms ease, color 150ms ease, transform 150ms ease, opacity 150ms ease;
}

#prevCamSideBtn {
  grid-column: 1;
}

#nextCamSideBtn {
  grid-column: 3;
}

.side-switch-btn:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.045);
  color: var(--fg);
}

[data-theme="dark"] .side-switch-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
  color: var(--fg);
}

.side-switch-btn:active:not(:disabled) {
  transform: scale(0.96);
}

.side-switch-btn:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}

.side-switch-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: inherit;
}

.mobile-switch-pos {
  display: none;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-fg);
}

.stage {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 580px;
  border-radius: 11px;
  background: #171717;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 680px) {
  .stage-shell {
    grid-template-columns: 1fr auto 1fr;
    gap: 8px;
  }
  .stage {
    grid-column: 1 / -1;
    grid-row: 1;
  }
  #prevCamSideBtn {
    grid-column: 1;
    grid-row: 2;
    flex-direction: row;
    min-height: 44px;
    height: 44px;
    padding: 0 16px;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .mobile-switch-pos {
    display: flex;
    grid-column: 2;
    grid-row: 2;
    padding: 0 8px;
  }
  #nextCamSideBtn {
    grid-column: 3;
    grid-row: 2;
    flex-direction: row-reverse;
    min-height: 44px;
    height: 44px;
    padding: 0 16px;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
}

.stage-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.78;
  transition: opacity 200ms ease, transform 220ms ease, filter 220ms ease;
}

.stage-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(12, 12, 12, 0.22) 0%, rgba(12, 12, 12, 0.62) 100%);
  pointer-events: none;
}

.stage-play-btn {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.95);
  color: #171717;
  border: 0;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.38);
  cursor: pointer;
}

.stage-play-btn:hover {
  transform: translateY(-1px);
  background: #ffffff;
}

.stage-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  background: #0c0c0c;
}

.stage-media iframe,
.stage-media video,
.stage-media img {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  transition: transform 220ms ease, filter 220ms ease;
}

.stage-media video,
.stage-media img {
  object-fit: contain;
  background: #0c0c0c;
}

.stage.is-crisp .stage-poster,
.stage.is-crisp .stage-media iframe {
  filter: contrast(1.06) saturate(1.05) brightness(1.01);
}

.stage.is-crisp .stage-media video,
.stage.is-crisp .stage-media img {
  filter: url(#wg-crisp-filter) contrast(1.06) saturate(1.05) brightness(1.01);
}

/* Unified Control Dock inside Frame: row 1 = what you're watching, row 2 = controls */
.dock {
  margin-top: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "info meta"
    "divider divider"
    "audio controls";
  align-items: center;
  gap: 10px 16px;
  position: relative;
}

.dock-left {
  grid-area: info;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.dock-meta {
  grid-area: meta;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

.dock-meta-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-fg);
}

.dock-divider {
  grid-area: divider;
  height: 1px;
  background: var(--border);
  margin: 0 -14px;
}

.dock-center {
  grid-area: audio;
  justify-self: start;
}

@media (max-width: 860px) {
  .dock {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "info"
      "meta"
      "divider"
      "audio"
      "controls";
  }
  .dock-right {
    justify-content: flex-start;
  }
}

.dock-city {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.badge {
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.badge-info {
  background: var(--info-bg);
  color: var(--info-fg);
}

.badge-success {
  background: var(--success-bg);
  color: var(--success-fg);
}

.badge-warning {
  background: var(--warning-bg);
  color: var(--warning-fg);
}

.badge-secondary {
  background: var(--tray);
  color: var(--muted-fg);
  border: 1px solid var(--border);
}

.dock-center {
  position: relative;
  display: flex;
  align-items: center;
}

.music-group {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-strong);
  background: var(--tray);
  border-radius: 10px;
  height: 40px;
  overflow: hidden;
}

.music-toggle {
  height: 100%;
  padding: 0 14px;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
}

.music-toggle:hover,
.music-gear:hover {
  background: var(--border);
}

.music-gear {
  height: 100%;
  width: 36px;
  border: 0;
  border-left: 1px solid var(--border);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted-fg);
}

.eq-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 11px;
}

.eq-bars span {
  width: 2px;
  border-radius: 1px;
  background: var(--fg);
  height: 4px;
  transition: height 180ms ease;
}

.music-group.is-playing .eq-bars span:nth-child(1) {
  animation: eq1 0.9s ease-in-out infinite;
}

.music-group.is-playing .eq-bars span:nth-child(2) {
  animation: eq2 0.7s ease-in-out infinite;
}

.music-group.is-playing .eq-bars span:nth-child(3) {
  animation: eq3 1.05s ease-in-out infinite;
}

@keyframes eq1 {
  0%, 100% { height: 4px; }
  50% { height: 10px; }
}

@keyframes eq2 {
  0%, 100% { height: 10px; }
  50% { height: 3px; }
}

@keyframes eq3 {
  0%, 100% { height: 6px; }
  50% { height: 11px; }
}

.music-popover {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  width: 308px;
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
  z-index: 20;
}

.detect-box {
  padding: 9px 10px;
  border-radius: 8px;
  background: var(--tray);
  border: 1px solid var(--border);
  margin-bottom: 10px;
}

.detect-meter {
  height: 5px;
  border-radius: 999px;
  background: var(--border-strong);
  overflow: hidden;
  margin-top: 5px;
}

.detect-meter-fill {
  height: 100%;
  width: 0%;
  background: var(--fg);
  transition: width 220ms ease;
}

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

.pop-title {
  font-size: 12.5px;
  font-weight: 600;
}

.pop-field {
  margin-bottom: 10px;
}

.pop-field:last-child {
  margin-bottom: 0;
}

.pop-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted-fg);
  margin-bottom: 4px;
}

.pop-select {
  width: 100%;
  height: 30px;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  padding: 0 8px;
  font-size: 12.5px;
}

.pop-range {
  width: 100%;
  accent-color: var(--fg);
  cursor: pointer;
}

.timer-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.timer-chip {
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--tray);
  font-size: 12px;
  cursor: pointer;
}

.timer-chip[aria-pressed="true"] {
  background: var(--primary);
  color: var(--primary-fg);
  border-color: var(--primary);
}

.dock-right {
  grid-area: controls;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.quality-seg {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 3px;
  border-radius: 10px;
  background: var(--tray);
  border: 1px solid var(--border-strong);
  gap: 2px;
}

.quality-btn {
  height: 32px;
  padding: 0 13px;
  border-radius: 7px;
  border: 0;
  background: transparent;
  color: var(--muted-fg);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 150ms ease, color 150ms ease;
}

.quality-btn:hover {
  color: var(--fg);
}

.quality-btn[aria-pressed="true"] {
  background: var(--primary);
  color: var(--primary-fg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.btn-dock {
  height: 40px;
  padding: 0 15px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  gap: 7px;
}

.btn-outline[aria-pressed="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-fg);
}

.cam-pos-pill {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-fg);
  padding: 0 6px;
}

/* Status Notice */
.filter-notice {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--tray);
  font-size: 13px;
  color: var(--muted-fg);
}

/* Camera Grid */
.grid-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 0 14px;
  flex-wrap: wrap;
}

.grid-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted-fg);
  margin: 0;
}

.grid-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.search-input {
  height: 32px;
  width: 190px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--card);
  font-size: 12.5px;
}

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

@media (max-width: 920px) {
  .cam-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .cam-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.cam-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  width: 100%;
  padding: 5px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.cam-card:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
}

.cam-card.is-active {
  border-color: var(--fg);
  box-shadow: 0 0 0 1px var(--fg);
}

.cam-thumb-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: #171717;
}

.cam-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cam-card-foot {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 6px 4px;
  min-width: 0;
}

.cam-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.cam-card-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 12px;
  color: var(--muted-fg);
  white-space: nowrap;
  overflow: hidden;
}

.cam-card-cond {
  overflow: hidden;
  text-overflow: ellipsis;
}

.cam-q {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
  padding: 0 5px;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
  color: var(--muted-fg);
}

.cam-sound {
  flex-shrink: 0;
  display: inline-flex;
  color: var(--muted-fg);
}

/* Live sync dot */
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.45);
  animation: livePulse 2.4s ease-out infinite;
}

@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.45); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Random weather split button + menu */
.random-split {
  position: relative;
  display: inline-flex;
}

.random-split .split-main {
  height: 37px;
  padding: 0 14px;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  gap: 8px;
}

.random-split .split-caret {
  height: 37px;
  width: 34px;
  padding: 0;
  margin-left: -1px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  color: var(--muted-fg);
}

.random-split .split-caret[aria-expanded="true"] {
  background: var(--tray);
  color: var(--fg);
}

.random-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 300px;
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 6px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
  z-index: 30;
}

.menu-head {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted-fg);
  padding: 8px 10px 6px;
}

.menu-item {
  width: 100%;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--fg);
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.menu-item:hover,
.menu-item:focus-visible {
  background: var(--tray);
  outline: none;
}

.menu-item[aria-checked="true"] {
  background: var(--tray);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

.menu-item .cond-dot {
  width: 8px;
  height: 8px;
}

.menu-sub {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted-fg);
  margin-top: 1px;
}

.menu-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-fg);
}

.menu-item.is-zero .menu-count {
  opacity: 0.6;
}

.menu-sep {
  height: 1px;
  background: var(--border);
  margin: 4px 6px;
}

.menu-foot {
  padding: 8px 10px 4px;
  font-size: 12px;
  color: var(--muted-fg);
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

kbd {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
  background: var(--tray);
  color: var(--fg);
}

/* Popular quick links */
.quick-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 22px;
}

.quick-links-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted-fg);
  margin-right: 4px;
}

.quick-link {
  height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--fg);
  font-size: 12.5px;
  display: inline-flex;
  align-items: center;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.quick-link:hover {
  background: var(--tray);
  border-color: var(--border-strong);
}

.cam-card-name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cam-card-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-fg);
  white-space: nowrap;
}

.cond-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted-fg);
}

.cond-dot.is-rain {
  background: #3b82f6;
}

.cond-dot.is-snow {
  background: #3b82f6;
}

.cond-dot.is-storm {
  background: #f59e0b;
}

.cond-dot.is-clear {
  background: #10b981;
}

.cond-dot.is-fog {
  background: #9a9a9a;
}

.cond-dot.is-night {
  background: #3b82f6;
}

.cond-dot.is-aurora {
  background: #10b981;
}

/* Detail Strip & Editorial Sections */
.section-divider {
  border-top: 1px solid var(--border);
  padding-top: 48px;
  margin-top: 56px;
}

.detail-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--tray);
  flex-wrap: wrap;
}

.detail-summary {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--muted-fg);
  max-width: 66ch;
}

.detail-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-fg);
  margin-top: 8px;
}

.detail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.editorial {
  padding-top: 64px;
  padding-bottom: 64px;
}

.editorial h2 {
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  text-wrap: balance;
}

.editorial p {
  color: var(--muted-fg);
  max-width: 68ch;
  margin: 0 0 16px;
  text-wrap: pretty;
}

.numbered-list {
  margin-top: 32px;
  border-top: 1px solid var(--border);
}

.numbered-item {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

@media (max-width: 600px) {
  .numbered-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.num-idx {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 500;
  color: var(--muted-fg);
}

.numbered-item h3 {
  font-size: 17px;
  line-height: 1.3;
  margin: 0 0 6px;
  letter-spacing: -0.015em;
}

.numbered-item p {
  margin: 0;
}

/* FAQ Accordion */
.faq-section {
  padding-top: 56px;
  border-top: 1px solid var(--border);
}

.faq-list {
  border-top: 1px solid var(--border);
  margin-top: 18px;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item summary {
  list-style: none;
  padding: 16px 0;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-family: var(--font-mono);
  color: var(--muted-fg);
  font-size: 16px;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin: 0 0 18px;
  color: var(--muted-fg);
  max-width: 68ch;
  font-size: 14.5px;
}

/* Ad Support & Pro Status Note */
.ad-note-bar {
  margin-top: 48px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted-fg);
  flex-wrap: wrap;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0 48px;
  font-size: 13.5px;
  color: var(--muted-fg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
}

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

.footer-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  margin: 0 0 10px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-links a:hover {
  color: var(--fg);
}

.footer-bottom {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* Pro Dialog */
dialog.pro-dialog {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  background: var(--card);
  color: var(--fg);
  max-width: 520px;
  width: calc(100% - 32px);
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

dialog.pro-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.dialog-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.02em;
}

.plan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0;
}

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

.plan-box {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plan-price {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 600;
}

.plan-perks {
  margin: 0 0 16px;
  padding-left: 18px;
  color: var(--muted-fg);
  font-size: 13.5px;
}

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--primary);
  color: var(--primary-fg);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);
  z-index: 50;
}

@media (max-width: 680px) {
  .header-nav {
    display: none;
  }
  .music-popover {
    left: 0;
    width: min(308px, calc(100vw - 48px));
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* Brand Icon & Inner Legal/Contact Pages */
.brand svg,
.brand img {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: block;
  flex-shrink: 0;
}

.legal-page {
  max-width: 780px;
  margin: 36px auto 64px;
}

.legal-page h1 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
  color: var(--fg);
}

.legal-page h2 {
  font-size: 19px;
  font-weight: 600;
  margin: 32px 0 12px;
  color: var(--fg);
}

.legal-page h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 22px 0 8px;
  color: var(--fg);
}

.legal-page p,
.legal-page li {
  font-size: 15px;
  line-height: 1.72;
  color: var(--muted-fg);
}

.legal-page ul {
  padding-left: 20px;
  margin: 10px 0 18px;
}

.ticket-box {
  margin-top: 28px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--card);
}

.ticket-form {
  display: grid;
  gap: 14px;
}

.ticket-field {
  display: grid;
  gap: 6px;
}

.ticket-field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
}

.ticket-field input,
.ticket-field select,
.ticket-field textarea {
  width: 100%;
  padding: 9px 12px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--input);
  border-radius: var(--radius-md);
}

.ticket-field textarea {
  min-height: 110px;
  resize: vertical;
}

.ticket-msg {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted-fg);
}

.ticket-msg:empty {
  display: none;
}

.ticket-form[data-gf-done] .ticket-msg {
  color: var(--success-fg);
}

.gf-ticket {
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
}

.gf-ticket[data-gf-unread] {
  border-color: var(--border-strong);
}

.gf-ticket-subject {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
}

.gf-ticket-status {
  display: inline-block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-fg);
}

.gf-ticket-msg {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.gf-ticket-who {
  font-size: 12px;
  color: var(--muted-fg);
}

.gf-ticket-text {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg);
  white-space: pre-wrap;
}

.gf-ticket-reply {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.gf-ticket-reply input,
.gf-ticket-reply textarea {
  flex: 1;
  padding: 8px 10px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--fg);
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
}
