/* Ziggi AI | Neon theme (2026-10-30): the whole site in the TV Ziggi's world. Loads last; tokens first,
   then the spots the older files painted with fixed light colors.
   Layout idea: deep navy room, cyan glow for what you can touch, gold for what's yours, the rasta
   red/yellow/green only as a thin stripe (like Ziggi's beanie), never as fills. */
:root {
  --mist: #060a12;            /* page ground */
  --paper: #0d1624;           /* cards, inputs */
  --card: rgba(13, 22, 36, .9);
  --ink: #e9f3fc;
  --muted: #94abc3;
  --line: rgba(90, 209, 255, .16);
  --plum: #5ad1ff;            /* the old brand color slot = Ziggi cyan */
  --plum-deep: #0b3a57;
  --sage: #7fdca4;
  --rust: #ff6b4a;
  --gold: #f6c544;
  --ok: #3fd16b; --warn: #f6c544; --bad: #ff5a45; --info: #5ad1ff;
  --rasta: linear-gradient(90deg, #e2312b 0 33.3%, #f4c430 33.3% 66.6%, #2fa84f 66.6%);
  --glow: 0 0 0 1px rgba(90, 209, 255, .35), 0 0 24px -8px rgba(90, 209, 255, .55);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 26px -16px rgba(0, 0, 0, .9);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, .45), 0 24px 44px -24px rgba(0, 0, 0, .95);
  --display: "Sora", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}

body {
  background:
    radial-gradient(60rem 38rem at 50% -12%, rgba(40, 110, 200, .22), transparent 62%),
    radial-gradient(40rem 30rem at 110% 40%, rgba(90, 209, 255, .07), transparent 60%),
    radial-gradient(40rem 30rem at -10% 85%, rgba(246, 197, 68, .05), transparent 60%),
    var(--mist);
  color: var(--ink);
}
a { color: var(--plum); }
::selection { background: rgba(90, 209, 255, .35); color: #fff; }
h1, h2, h3, .h-page, .h-sec, .h-sub { color: var(--ink); }

/* circuit traces: faint cyan wiring in the background */
.circuits { opacity: .22; }
.trace { stroke: var(--plum); }
.trace.t2 { stroke: var(--gold); }
.nodes circle { fill: var(--mist); stroke: var(--plum); }
@keyframes pulse { 0%, 100% { transform: scale(1); fill: var(--mist); } 50% { transform: scale(1.35); fill: #1d6c8f; } }

/* ---------- header ---------- */
.topbar { background: rgba(6, 10, 18, .78); border-bottom: 1px solid var(--line); position: sticky; }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--rasta); opacity: .55; }
.nav-brand { color: var(--ink); }
.nav-brand img { width: 42px; height: auto; filter: drop-shadow(0 0 6px rgba(90, 209, 255, .45)); }
.nav-brand span { font-family: var(--display); font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.nav-brand em { font-style: normal; color: var(--plum); }
.nav-link { color: var(--muted); }
.nav-link:hover, .nav-link.on { color: var(--ink); background: rgba(90, 209, 255, .1); }
.nav-toggle { background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.nav-toggle span { background: var(--ink); }
@media (max-width: 760px) {
  .nav-menu { background: rgba(9, 15, 26, .97); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-2); }
}

/* ---------- buttons ---------- */
.btn { color: var(--ink); }
.btn-plum { background: linear-gradient(180deg, #7fdcff, #3fb6ea); color: #04121e; box-shadow: 0 8px 22px -10px rgba(90, 209, 255, .8); }
.btn-plum:hover { background: linear-gradient(180deg, #a3e7ff, #5ad1ff); color: #04121e; }
.btn-sage { background: linear-gradient(180deg, #8ff0b5, #49c27c); color: #03160b; }
.btn-rust { background: linear-gradient(180deg, #ff8a6e, #e5533a); color: #1d0702; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { background: rgba(90, 209, 255, .1); color: var(--ink); }
.btn:focus-visible, .nav-link:focus-visible, .nav-toggle:focus-visible { outline: 3px solid var(--plum); outline-offset: 2px; }

/* ---------- surfaces ---------- */
.panel, .op, .tile, .device, .person, .card, .entry, .block { background: var(--card); color: var(--ink); }
.panel { box-shadow: inset 0 0 0 1px var(--line), var(--shadow-2); }
.tile::before { background: var(--plum); }
code, .code { background: rgba(90, 209, 255, .1); color: #bfe9ff; }
.kv dt, .hint, .updated, .tile-l, .form-note, .empty, .sep { color: var(--muted); }
.eyebrow { color: var(--gold); }

/* forms */
.form input:not([type=checkbox]), .runner textarea, .runner select, .op-row select, .filter select, select, textarea {
  background: #0a1220; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line);
}
.form input:not([type=checkbox]):focus, .runner textarea:focus, .runner select:focus {
  box-shadow: inset 0 0 0 2px var(--plum), 0 0 0 4px rgba(90, 209, 255, .15);
}
.form label, .form legend { color: var(--ink); }
.op-out pre { background: #08101c; color: #cfe6f7; }
input::placeholder, textarea::placeholder { color: #6f88a1; }

/* status colors on dark: tinted glass + bright text */
.alert-err, .alert-bad { background: rgba(255, 90, 69, .12); color: #ffb3a6; }
.alert-ok { background: rgba(63, 209, 107, .12); color: #9ff0bb; }
.alert-warn { background: rgba(246, 197, 68, .12); color: #ffe39a; }
.alert-info { background: rgba(90, 209, 255, .1); color: #bfe9ff; }
.chip { background: rgba(90, 209, 255, .1); color: #bfe9ff; }
.chip-ok, .live-ok { background: rgba(63, 209, 107, .14); color: #9ff0bb !important; }
.chip-warn, .live-warn { background: rgba(246, 197, 68, .14); color: #ffe39a !important; }
.chip-bad, .chip-rust, .live-bad { background: rgba(255, 90, 69, .14); color: #ffb3a6 !important; }
.chip-gold { background: rgba(246, 197, 68, .14); color: #ffe39a; }
.chip-plum { background: rgba(90, 209, 255, .14); color: #bfe9ff; }
.chip-sage { background: rgba(127, 220, 164, .14); color: #b9f2cf; }
.codebox { background: rgba(246, 197, 68, .07); box-shadow: inset 0 0 0 1.5px rgba(246, 197, 68, .4); }
.sync.warn { color: #ffe39a; background: rgba(246, 197, 68, .1); }
.device.needs-you { box-shadow: inset 0 0 0 1.5px rgba(246, 197, 68, .55), var(--shadow-1); }
.op-ic-rust { background: rgba(255, 107, 74, .14); }
.att-warn .att-dot { color: rgba(246, 197, 68, .5); } .att-bad .att-dot { color: rgba(255, 90, 69, .5); }
.file-shot { background: linear-gradient(160deg, #0f1a2b, #0a1220); }

/* tabs (dashboard/admin) */
.tabs-main, .tabs { background: rgba(13, 22, 36, .7); box-shadow: inset 0 0 0 1px var(--line); }
.tabs [data-tab] { color: var(--muted); }
.tabs [data-tab][aria-selected="true"] { color: #04121e; }
.tab-ink { background: linear-gradient(180deg, #7fdcff, #3fb6ea); box-shadow: 0 0 18px -6px rgba(90, 209, 255, .8); }

/* ---------- bottom tab bar + floating button ---------- */
@media (max-width: 760px) {
  .tabbar { background: rgba(6, 10, 18, .88); border-top: 1px solid var(--line); box-shadow: 0 -12px 30px -18px rgba(0, 0, 0, .9); }
  .tabbar-i::before { background: rgba(90, 209, 255, .14); }
  .tabbar-i.on { color: var(--plum); }
}
.fab-btn {
  background: radial-gradient(circle at 30% 25%, #a3e7ff, #3fb6ea 58%, #0b6f9c); color: #04121e;
  box-shadow: 0 16px 30px -12px rgba(0, 0, 0, .9), 0 0 22px -4px rgba(90, 209, 255, .7);
}
.fab-btn::after { border-color: rgba(246, 197, 68, .6); }
.fab-btn:hover { box-shadow: 0 20px 36px -12px rgba(0, 0, 0, .9), 0 0 30px -2px rgba(90, 209, 255, .85); }
.fab-btn:focus-visible { outline-color: var(--gold); }
.fab.open .fab-btn { background: radial-gradient(circle at 30% 25%, #ffe8a0, var(--gold) 60%, #a77d14); }
.fab-item span { background: rgba(9, 15, 26, .95); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-1); }
.fi-plum { background: linear-gradient(135deg, #7fdcff, #2b8fc0); color: #04121e; }
.fi-sage { background: linear-gradient(135deg, #8ff0b5, #2f9e5e); color: #03160b; }
.fi-gold { background: linear-gradient(135deg, #ffe08a, #c99a1e); color: #1d1402; }
.fi-rust { background: linear-gradient(135deg, #ff9a80, #c9442b); color: #1d0702; }
.fab-scrim { background: rgba(2, 5, 10, .62); }
.toast { background: #0f1c2e; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-2); }
.toast-ok { background: #0f2a1c; } .toast-bad { background: #3a1210; }

/* ---------- landing page ---------- */
.hero h1 em { font-style: normal; background: linear-gradient(90deg, #7fdcff, #f6c544); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede, .sub { color: var(--muted); }
.notify input { background: #0a1220; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.notify button { background: linear-gradient(180deg, #7fdcff, #3fb6ea); color: #04121e; }
.form-msg { color: var(--muted); }
.card svg { stroke: var(--plum); }
.c-rust { --c: #ff6b4a; } .c-sage { --c: #3fd16b; } .c-plum { --c: #5ad1ff; } .c-gold { --c: #f6c544; }
.c-rust svg { stroke: #ff8a6e; } .c-sage svg { stroke: #7fdca4; } .c-gold svg { stroke: #f6c544; }

/* the TV on the landing page: Ziggi chatting, in a frame */
.tv-wrap { position: relative; width: 100%; max-width: 640px; justify-self: center; }
.tv {
  position: relative; aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; background: #02040a;
  box-shadow: 0 0 0 10px #0b1220, 0 0 0 11px rgba(90, 209, 255, .25), 0 40px 80px -40px rgba(0, 0, 0, 1), 0 0 90px -30px rgba(90, 209, 255, .6);
}
.tv iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tv-stand { width: 34%; height: 12px; margin: 16px auto 0; border-radius: 0 0 14px 14px; background: linear-gradient(#0f1a2b, #070c16); box-shadow: 0 1px 0 rgba(90, 209, 255, .2); }
.tv-cap { margin: 12px 0 0; text-align: center; font: 600 12px/1.4 var(--label); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

/* ---------- Talk ---------- */
.talk-top { background: linear-gradient(var(--mist) 70%, rgba(6, 10, 18, 0)); }
.room-pick select, .sound { background: var(--paper); color: var(--ink); }
.hello { background: var(--card); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-1); }
.hello .h-hello { color: var(--ink); }
.msg.me { background: rgba(28, 22, 6, .7); color: #fff6dc; box-shadow: inset 0 0 0 1.5px rgba(246, 197, 68, .75), 0 0 16px -6px rgba(246, 197, 68, .5); }
.msg.zig { background: rgba(4, 12, 24, .78); color: var(--ink); box-shadow: inset 0 0 0 1.5px rgba(90, 209, 255, .7), 0 0 16px -6px rgba(90, 209, 255, .5); }
.msg.zig::before { background: #0d1624 url("/static/img/ziggi-head.webp") center / 24px auto no-repeat; box-shadow: inset 0 0 0 1px var(--line); }
.msg .progress { color: var(--muted); }
.dock { background: linear-gradient(rgba(6, 10, 18, 0), var(--mist) 26%); }
.dock-hint { color: var(--plum); }
.typebox { background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line), var(--shadow-1); }
.typebox:focus-within { box-shadow: inset 0 0 0 2px var(--plum), var(--shadow-1); }
.typebox textarea, .typebox input { background: transparent; color: var(--ink); }
.replay { color: var(--plum); }

/* the talk button is Ziggi himself */
.ptt, .ptt:not(:disabled) {
  width: 168px; height: 150px; border-radius: 40%; background: radial-gradient(ellipse at 50% 55%, rgba(40, 110, 200, .35), rgba(6, 10, 18, 0) 70%);
  box-shadow: none; animation: none; color: var(--ink);
}
.ptt:not(:disabled):hover { box-shadow: none; }
.ptt-holder { position: relative; display: grid; place-items: center; }
.ptt-face { position: absolute; left: 50%; top: 50%; width: 200px; height: 180px; transform: translate(-50%, -52%);
  border: 0; pointer-events: none; background: transparent; z-index: 0; }
.ptt { z-index: 1; }
@media (min-width: 761px) { .ptt-face { width: 236px; height: 212px; } }
.ptt > svg, .ptt-wave { display: none; }
.ptt-ring { border-color: var(--gold); border-radius: 50%; }
.ptt.rec { transform: scale(1.04); background: radial-gradient(ellipse at 50% 55%, rgba(246, 197, 68, .28), rgba(6, 10, 18, 0) 70%); }
.ptt.cancel { background: radial-gradient(ellipse at 50% 55%, rgba(255, 90, 69, .35), rgba(6, 10, 18, 0) 70%); box-shadow: none; }
.ptt-time { bottom: -4px; color: var(--gold); }
.ptt:focus-visible { outline: 3px solid var(--plum); outline-offset: 2px; }
.ptt:disabled { opacity: .55; filter: grayscale(.6); }
@media (min-width: 761px) { .ptt, .ptt:not(:disabled) { width: 196px; height: 175px; } }
/* + button on Talk sits above the dock, beside Ziggi */
body.talkpage .fab { bottom: calc(env(safe-area-inset-bottom) + 190px); }
@media (max-width: 760px) { body.talkpage.has-tabbar .fab { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 172px); } }

/* ---------- footer ---------- */
.foot { color: var(--muted); }
.foot img { width: 48px; height: auto; filter: drop-shadow(0 0 8px rgba(90, 209, 255, .4)); }
.foot .domain { color: var(--gold); }

/* the remote page already speaks this language; just let it share the page ground */
.remotepage { background: var(--mist); }
@media (max-width: 820px) { .tv-wrap { order: -1; max-width: 560px; } }
/* sign-in cards: Ziggi instead of the old rainbow badge, a cyan-to-gold top edge */
.auth-card::before { background: linear-gradient(90deg, #5ad1ff, #f6c544); height: 3px; }
.auth-badge { background: none; box-shadow: none; width: auto; height: auto; }
.auth-badge img { width: 72px; height: auto; filter: drop-shadow(0 0 12px rgba(90, 209, 255, .5)); animation: zfloat 4s ease-in-out infinite; }
