/* One Luminous Earth — shared styles. One deliberate night-sky look, used in every theme. */
:root {
  color-scheme: dark;
  --space: #04060c;
  --space-2: #080c18;
  --glass: rgba(10, 14, 26, 0.66);
  --glass-edge: rgba(242, 200, 121, 0.14);
  --line: rgba(255, 255, 255, 0.08);
  --ivory: #ece6d8;
  --muted: #8e95a8;
  --gold: #f2c879;
  --gold-ink: #1a1408;
  --teal: #7fd8d0;
  --danger: #f08a7a;
  --display: "Marcellus", "Cormorant", Georgia, serif;
  --ui: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--space);
  color: var(--ivory);
  font: 15px/1.5 var(--ui);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; text-wrap: balance; margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }

.panel {
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  border-radius: 14px;
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}
.brand { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); text-decoration: none; }
.brand svg { width: 16px; height: 16px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; padding: 10px 18px; border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05); color: var(--ivory); cursor: pointer; font-weight: 500; font-size: 14px;
  text-decoration: none; transition: background .2s, border-color .2s, color .2s;
}
.btn:hover { border-color: rgba(242,200,121,0.5); }
.btn.primary { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
.btn.primary:hover { background: #f6d593; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn:disabled { opacity: 0.5; cursor: default; }

.seg { display: inline-flex; background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button { font: 500 13px var(--ui); color: var(--muted); background: transparent; border: 0; border-radius: 999px; padding: 7px 13px; cursor: pointer; }
.seg button:hover { color: var(--ivory); }
.seg button[aria-pressed="true"] { color: var(--gold-ink); background: var(--gold); }

.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.chip.live { color: var(--gold); border-color: rgba(242,200,121,0.45); }
.chip.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.chip.soon { color: var(--teal); border-color: rgba(127,216,208,0.4); }
.chip.sub { color: var(--ivory); border-color: rgba(236,230,216,0.3); }
.chip.sub::before { content: "✓"; color: var(--teal); font-weight: 600; }
.chip.host { color: var(--gold); border-color: rgba(242,200,121,0.3); border-style: dashed; }

/* Forms and dialogs */
label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
input[type=text], input[type=email], input[type=datetime-local], textarea, select {
  width: 100%; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.12); border-radius: 10px;
  padding: 10px 12px; color: var(--ivory); font-size: 15px;
}
textarea { resize: vertical; min-height: 84px; }
input::placeholder, textarea::placeholder { color: #5f6679; }
dialog {
  border: 1px solid var(--glass-edge); border-radius: 16px; background: #0b1020; color: var(--ivory);
  padding: 24px; width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto;
}
dialog::backdrop { background: rgba(2, 3, 8, 0.7); backdrop-filter: blur(3px); }
dialog h2 { font-size: 24px; margin-bottom: 6px; }
.form { display: grid; gap: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > * { flex: 1 1 140px; }
.actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 6px; }
.error { color: var(--danger); font-size: 13px; margin: 0; }
.error:empty { display: none; }
.note { font-size: 13px; color: var(--muted); }
.devbox { border: 1px dashed rgba(127,216,208,0.4); border-radius: 10px; padding: 12px; font-size: 13px; color: var(--teal); overflow-wrap: anywhere; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
legend { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.radio { display: flex; gap: 10px; align-items: flex-start; color: var(--ivory); font-size: 14px; grid-template-columns: none; }
.radio input { margin-top: 3px; accent-color: var(--gold); }
.radio small { display: block; color: var(--muted); font-size: 12.5px; }

.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 24px); transform: translateX(-50%); z-index: 50;
  background: #10162a; border: 1px solid var(--glass-edge); padding: 10px 16px; border-radius: 999px; font-size: 14px; box-shadow: 0 8px 30px rgba(0,0,0,0.4); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
