/* ==========================================================================
   Over & Out: light "comms console" theme
   ========================================================================== */

:root {
  --bg: #f5f7fc;
  --grid: rgba(16, 60, 160, 0.07);
  --surface: #ffffff;
  --surface-2: #eef2fb;
  --ink: #0b1b3f;
  --ink-2: #45557a;
  --muted: #8591ad;
  --line: #dbe2f0;
  --brand: #1450f5;
  --brand-2: #00a3ff;
  --brand-soft: #e6edff;
  --live: #12b886;
  --tx: #ff5a36;
  --tx-soft: #ffe8e2;
  --lcd: #dfe9d4;
  --lcd-ink: #26351b;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(11, 27, 63, 0.05), 0 8px 24px -8px rgba(11, 27, 63, 0.12);
  --shadow-lg: 0 2px 4px rgba(11, 27, 63, 0.06), 0 24px 60px -16px rgba(20, 80, 245, 0.28);

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Space Grotesk", var(--font-sans);
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

  color-scheme: light;
}

/* ─── 3310 mode (Konami easter egg) ─────────────────────────────────────── */
html.mode-3310 {
  --bg: #c7dbb4;
  --grid: rgba(38, 53, 27, 0.08);
  --surface: #d6e6c6;
  --surface-2: #c2d6ae;
  --ink: #1d2a13;
  --ink-2: #33462a;
  --muted: #5b6e4c;
  --line: #9fb78a;
  --brand: #26351b;
  --brand-2: #3d5230;
  --brand-soft: #bcd2a6;
  --live: #26351b;
  --tx: #26351b;
  --tx-soft: #bcd2a6;
  --shadow: none;
  --shadow-lg: 0 0 0 2px #26351b;
  --font-sans: "VT323", monospace;
  --font-head: "VT323", monospace;
  --font-mono: "VT323", monospace;
}
html.mode-3310 body { font-size: 1.2rem; }
html.mode-3310 .hero__title { letter-spacing: 0; }

/* ─── Base ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 1px 1px, var(--grid) 1px, transparent 0),
    radial-gradient(1200px 600px at 85% -10%, rgba(0, 163, 255, 0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(20, 80, 245, 0.07), transparent 60%);
  background-size: 22px 22px, auto, auto;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--font-head); line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
a { color: var(--brand); }
button { font: inherit; cursor: pointer; }
.mono { font-family: var(--font-mono); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--brand); color: #fff; }

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.8rem;
  color: var(--brand);
  letter-spacing: 0.02em;
}

.led {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  vertical-align: middle;
}
.led--live { background: var(--live); box-shadow: 0 0 0 3px color-mix(in srgb, var(--live) 25%, transparent); animation: pulse 2s infinite; }
.led--tx { background: var(--tx); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tx) 25%, transparent); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: 0.45; } }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600; font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px -8px var(--brand); }
.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn--sm { padding: 8px 14px; font-size: 0.8rem; font-weight: 500; }
.btn:disabled { opacity: 0.4; pointer-events: none; }

.icon-btn {
  border: 0; background: transparent; color: var(--ink-2);
  width: 32px; height: 32px; border-radius: 8px;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }

/* ─── Boot sequence ─────────────────────────────────────────────────────── */
.boot {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-content: center;
  background: var(--bg);
  transition: opacity 0.9s ease, visibility 0.9s;
  padding: 16px;
}
.boot.is-done { opacity: 0; visibility: hidden; }
.boot__log {
  margin: 0; min-width: min(520px, 90vw); min-height: 11em;
  font-family: var(--font-mono); font-size: clamp(0.72rem, 2.6vw, 0.9rem);
  color: var(--ink-2); white-space: pre-wrap;
}
.boot__log .ok { color: var(--live); font-weight: 700; }
.boot__log .hl { color: var(--brand); }
.boot__hint { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); text-align: center; }
.boot__meter { display: flex; align-items: center; gap: 12px; margin: 24px 0 4px; }
.boot__track { flex: 1; height: 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.boot__fill { display: block; width: 0; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.boot__pct { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 700; color: var(--brand); min-width: 3.5em; text-align: right; }

/* ─── Status bar ────────────────────────────────────────────────────────── */
.statusbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
}
.statusbar__brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; }
.statusbar__nav { display: flex; gap: 4px; font-family: var(--font-mono); }
.statusbar__nav a { color: var(--ink-2); text-decoration: none; padding: 6px 10px; border-radius: 8px; }
.statusbar__nav a:hover { background: var(--brand-soft); color: var(--brand); }
.statusbar__nav a::before { content: "/"; color: var(--muted); }
.statusbar__meta { display: flex; align-items: center; gap: 12px; color: var(--ink-2); }
.net { font-size: 0.7rem; font-weight: 700; color: var(--brand); background: var(--brand-soft); padding: 2px 6px; border-radius: 5px; }
.signal { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.signal i { width: 3px; background: var(--ink); border-radius: 1px; }
.signal i:nth-child(1) { height: 25%; } .signal i:nth-child(2) { height: 50%; }
.signal i:nth-child(3) { height: 75%; } .signal i:nth-child(4) { height: 100%; }
.battery {
  position: relative; width: 26px; height: 13px; padding: 2px;
  border: 1.5px solid var(--ink); border-radius: 3px; background: transparent;
}
.battery::after { content: ""; position: absolute; right: -4px; top: 3px; width: 2px; height: 5px; background: var(--ink); border-radius: 0 1px 1px 0; }
.battery__fill { display: block; height: 100%; background: var(--live); border-radius: 1px; }

@media (max-width: 640px) {
  .statusbar__nav { display: none; }
}

/* ─── Hero ──────────────────────────────────────────────────────────────── */
main { padding: 0 clamp(16px, 4vw, 40px); max-width: 1200px; margin: 0 auto; }

.hero {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(32px, 6vw, 80px);
  align-items: center;
  min-height: calc(100svh - 60px);
  padding: 48px 0;
}
.hero__title {
  font-size: clamp(3.2rem, 11vw, 7.5rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  background: linear-gradient(100deg, var(--ink) 30%, var(--brand) 70%, var(--brand-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__title .cursor { -webkit-text-fill-color: var(--brand); animation: blink 1s steps(1) infinite; font-weight: 400; }
@keyframes blink { 50% { opacity: 0; } }
.hero__subtitle { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--ink-2); max-width: 40em; margin: 24px 0 32px; white-space: pre-line; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__readout {
  display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 8px 32px;
  margin: 40px 0 0; font-size: 0.8rem;
}
.hero__readout dt { color: var(--muted); }
.hero__readout dd { margin: 2px 0 0; font-weight: 700; color: var(--ink); font-size: 0.95rem; }
@media (max-width: 520px) { .hero__readout { grid-template-columns: 1fr 1fr; } }

/* device illustration */
.device { justify-self: center; position: relative; width: min(300px, 80vw); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px) rotate(-1deg); } }
.device__antenna {
  position: absolute; left: 22%; top: -54px; width: 22px; height: 70px;
  background: linear-gradient(90deg, #1b2a4e, #33467a); border-radius: 8px 8px 4px 4px;
}
.device__body {
  position: relative;
  background: linear-gradient(160deg, #22325a, #0b1b3f);
  border-radius: 36px; padding: 22px 22px 30px;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.device__screen {
  background: linear-gradient(180deg, #eaf2ff, #d8e6ff);
  border-radius: 14px; padding: 12px; color: #0b1b3f;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.25);
}
html.mode-3310 .device__screen { background: var(--lcd); color: var(--lcd-ink); }
.device__row { display: flex; justify-content: space-between; font-size: 0.66rem; font-weight: 700; }
.device__marquee { overflow: hidden; white-space: nowrap; margin: 10px 0 6px; font-size: 0.95rem; font-weight: 700; }
.device__marquee span { display: inline-block; padding-left: 100%; animation: marquee 14s linear infinite; }
@keyframes marquee { to { transform: translateX(-100%); } }
.device__wave { display: block; width: 100%; height: 56px; }
.tx-label { color: var(--tx); animation: pulse 1s infinite; }
.device__grill { display: grid; gap: 7px; margin: 22px 26px; }
.device__grill i { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); }
.device__ptt {
  margin: 0 auto; width: 88px; height: 88px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 700; color: #fff; letter-spacing: 0.1em;
  background: radial-gradient(circle at 35% 30%, #ff8a6b, var(--tx) 60%, #d63d1d);
  box-shadow: 0 6px 0 #a82d12, 0 12px 24px -6px rgba(255, 90, 54, 0.6);
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 64px; }
  .device { order: -1; width: min(220px, 60vw); margin-top: 30px; }
  .device__grill, .device__ptt { display: none; }
}

/* ─── Sections ──────────────────────────────────────────────────────────── */
.section { padding: clamp(64px, 10vw, 120px) 0 0; }
.section__head { margin-bottom: 32px; }
.section__head h2 { font-size: clamp(2rem, 5vw, 3.2rem); }
.section__lede { color: var(--ink-2); max-width: 40em; margin: 12px 0 0; font-size: 1.05rem; }
.count { font-size: 0.4em; vertical-align: middle; color: var(--brand); background: var(--brand-soft); padding: 4px 10px; border-radius: 999px; letter-spacing: 0; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panel__bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px; font-size: 0.75rem; color: var(--muted);
  border-bottom: 1px solid var(--line); background: var(--surface-2);
}
.panel__bar > i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.panel__bar > i:nth-child(1) { background: #ff6b5a; } .panel__bar > i:nth-child(2) { background: #ffc53d; } .panel__bar > i:nth-child(3) { background: #3dd68c; }
.panel__bar > span:first-of-type { margin-left: 8px; }

/* ─── Crew grid ─────────────────────────────────────────────────────────── */
.grep {
  display: flex; align-items: center; gap: 10px;
  max-width: 420px; margin-bottom: 28px; padding: 10px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  font-size: 0.9rem;
}
.grep:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.grep__prompt { color: var(--brand); white-space: nowrap; }
.grep input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; color: var(--ink); }

/* group photo band */
.groupshot { margin: 0 0 32px; }
.groupshot__frame {
  position: relative; overflow: hidden;
  border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface-2); box-shadow: var(--shadow);
}
.groupshot__frame img { display: block; width: 100%; max-height: 62svh; object-fit: cover; }
.groupshot__frame::before, .groupshot__frame::after {
  content: ""; position: absolute; width: 26px; height: 26px; z-index: 2;
  border: 2px solid rgba(255, 255, 255, 0.9);
}
.groupshot__frame::before { top: 14px; left: 14px; border-right: 0; border-bottom: 0; border-radius: 5px 0 0 0; }
.groupshot__frame::after { bottom: 14px; right: 14px; border-left: 0; border-top: 0; border-radius: 0 0 5px 0; }
.groupshot__rec {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.88); color: var(--ink);
}
.groupshot__cap { margin: 10px 2px 0; font-size: 0.75rem; color: var(--muted); }

.crew {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px;
}
.card {
  position: relative; height: 100%;
  display: flex; flex-direction: column;
  padding: 16px; width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); color: inherit;
  transition: transform 0.25s cubic-bezier(.2,.8,.2,1), box-shadow 0.25s ease, border-color 0.25s ease;
  animation: rise 0.6s cubic-bezier(.2,.8,.2,1) both;
  animation-delay: calc(var(--i, 0) * 40ms);
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.card:hover, .card:focus-visible { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.card__top { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); margin-bottom: 12px; }
.card__top .live { display: inline-flex; align-items: center; gap: 6px; color: var(--live); font-weight: 700; }
.card__name { font-family: var(--font-head); font-size: 1.2rem; font-weight: 600; margin: 14px 0 2px; }
.card__role { color: var(--ink-2); font-size: 0.88rem; margin: 0; }
.card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.card__tags li { font-family: var(--font-mono); font-size: 0.68rem; color: var(--brand); background: var(--brand-soft); padding: 2px 8px; border-radius: 999px; }
.card__play {
  margin-top: auto; padding-top: 16px;
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 700; color: var(--ink);
}
.card__play .bars { display: inline-flex; align-items: center; gap: 2px; height: 16px; }
.card__play .bars i { width: 3px; height: 30%; background: var(--brand); border-radius: 2px; transition: height 0.2s; }
.card:hover .bars i { animation: eq 0.8s ease-in-out infinite; }
.card .bars i:nth-child(2) { animation-delay: -0.2s; } .card .bars i:nth-child(3) { animation-delay: -0.4s; }
.card .bars i:nth-child(4) { animation-delay: -0.6s; } .card .bars i:nth-child(5) { animation-delay: -0.1s; }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }
.card.is-read .card__play::after { content: "✓ played"; margin-left: auto; color: var(--muted); font-weight: 400; }

/* photo with viewfinder corners */
.photo {
  position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden;
  background: var(--surface-2);
}
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.card:hover .photo img { transform: scale(1.05); }
.photo::before, .photo::after {
  content: ""; position: absolute; width: 18px; height: 18px; z-index: 2; pointer-events: none;
  border: 2px solid rgba(255, 255, 255, 0.9);
}
.photo::before { top: 10px; left: 10px; border-right: 0; border-bottom: 0; border-radius: 4px 0 0 0; }
.photo::after { bottom: 10px; right: 10px; border-left: 0; border-top: 0; border-radius: 0 0 4px 0; }
.photo--empty::before, .photo--empty::after { border-color: color-mix(in srgb, var(--brand) 45%, transparent); }
.photo__placeholder {
  position: absolute; inset: 0;
  display: grid; place-content: center; justify-items: center; gap: 4px;
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(20, 80, 245, 0.035) 3px 4px),
    radial-gradient(circle at 50% 45%, var(--brand-soft), var(--surface-2) 70%);
}
.photo__initials { font-family: var(--font-head); font-size: clamp(2.2rem, 5vw, 3rem); font-weight: 700; color: var(--brand); letter-spacing: -0.03em; }
.photo__nosignal { font-family: var(--font-mono); font-size: 0.62rem; color: var(--muted); letter-spacing: 0.12em; }

.empty { color: var(--muted); text-align: center; padding: 40px 0; }

/* ─── Mission log ───────────────────────────────────────────────────────── */
.log { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr); gap: 32px; align-items: start; }
@media (max-width: 860px) { .log { grid-template-columns: 1fr; } }
.uptime__code { margin: 0; padding: 20px; font-size: 0.88rem; line-height: 1.9; overflow-x: auto; }
.uptime__code .k { color: var(--brand); }
.uptime__code .v { color: var(--tx); font-weight: 700; }
.uptime__code .p { color: var(--muted); }

.card__metric { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); margin: 8px 0 0; }
.modal__metric { font-family: var(--font-mono); font-size: 0.78rem; color: var(--brand); margin: 10px 0 0; }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--brand), var(--brand-2), var(--live)); border-radius: 2px; }
.timeline li { position: relative; padding: 0 0 28px 36px; }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--brand);
}
.timeline li:last-child::before { background: var(--live); border-color: var(--live); box-shadow: 0 0 0 5px color-mix(in srgb, var(--live) 20%, transparent); }
.timeline__meta { font-family: var(--font-mono); font-size: 0.76rem; color: var(--muted); }
.timeline__meta b { color: var(--tx); font-weight: 500; }
.timeline h3 { font-size: 1.15rem; margin: 4px 0; }
.timeline p { margin: 0; color: var(--ink-2); }

/* ─── Transmit console ──────────────────────────────────────────────────── */
.console__status { margin-left: auto; font-weight: 700; color: var(--ink-2); }
.console__status.is-tx { color: var(--tx); }
.console__status.is-ok { color: var(--live); }
.console__status.is-err { color: var(--tx); }
.console__body { display: grid; grid-template-columns: 1.4fr 1fr; }
@media (max-width: 760px) { .console__body { grid-template-columns: 1fr; } }
.console__fields { padding: clamp(18px, 3vw, 32px); display: grid; gap: 20px; }
.console__ptt {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  padding: 32px 20px; background: var(--surface-2); border-left: 1px solid var(--line);
}
@media (max-width: 760px) { .console__ptt { border-left: 0; border-top: 1px solid var(--line); } }

.field { display: grid; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field__label { font-size: 0.78rem; color: var(--ink-2); display: flex; justify-content: space-between; padding: 0; }
.field__label em { font-style: normal; color: var(--muted); }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; font: inherit; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { resize: vertical; min-height: 140px; line-height: 1.55; }
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); background: var(--surface); }
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--tx); box-shadow: 0 0 0 4px var(--tx-soft); }
.vibes { display: flex; flex-wrap: wrap; gap: 8px; }
.vibes label { cursor: pointer; }
.vibes input { position: absolute; opacity: 0; pointer-events: none; }
.vibes span {
  display: grid; place-items: center; width: 44px; height: 44px; font-size: 1.3rem;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg);
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.vibes span:hover { transform: translateY(-2px); }
.vibes input:checked + span { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px var(--brand-soft); }
.vibes input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; }

/* PTT button */
.ptt {
  --p: 0;
  position: relative; width: 168px; height: 168px; border-radius: 50%; border: 0; padding: 0;
  background: radial-gradient(circle at 35% 30%, #ff8a6b, var(--tx) 58%, #d63d1d);
  box-shadow: 0 8px 0 #a82d12, 0 18px 40px -8px rgba(255, 90, 54, 0.55);
  color: #fff; user-select: none; -webkit-user-select: none; touch-action: none;
  transition: transform 0.08s, box-shadow 0.08s;
  -webkit-tap-highlight-color: transparent;
}
html.mode-3310 .ptt { background: var(--ink); box-shadow: 0 6px 0 #0e150a; color: var(--bg); }
.ptt.is-holding { transform: translateY(6px); box-shadow: 0 2px 0 #a82d12, 0 8px 30px -8px rgba(255, 90, 54, 0.8); }
.ptt.is-holding::after {
  content: ""; position: absolute; inset: -14px; border-radius: 50%;
  border: 2px solid var(--tx); animation: ripple 0.9s ease-out infinite;
}
@keyframes ripple { from { opacity: 0.8; transform: scale(0.9); } to { opacity: 0; transform: scale(1.3); } }
.ptt__ring { position: absolute; inset: -12px; width: calc(100% + 24px); height: calc(100% + 24px); transform: rotate(-90deg); pointer-events: none; }
.ptt__track { fill: none; stroke: var(--line); stroke-width: 4; }
.ptt__progress { fill: none; stroke: var(--brand); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 339.3; stroke-dashoffset: calc(339.3 * (1 - var(--p))); }
.ptt__label { position: relative; font-weight: 700; font-size: 0.95rem; letter-spacing: 0.12em; line-height: 1.4; pointer-events: none; }
.ptt:disabled { filter: grayscale(0.6); opacity: 0.7; cursor: wait; }
.ptt__hint { font-size: 0.72rem; color: var(--muted); text-align: center; max-width: 240px; margin: 12px 0 0; }
.console__wave { width: 100%; max-width: 280px; height: 48px; }

/* ─── Footer ────────────────────────────────────────────────────────────── */
.footer { text-align: center; padding: 120px 16px 48px; color: var(--ink-2); font-size: 0.85rem; }
.footer p { margin: 6px 0; }
.footer__eof { background: var(--ink); color: var(--bg); padding: 2px 8px; border-radius: 4px; margin-right: 6px; font-weight: 700; }
.footer__hint { color: var(--muted); font-size: 0.72rem; opacity: 0.7; }

/* ─── Modal ─────────────────────────────────────────────────────────────── */
.modal {
  width: min(860px, calc(100vw - 24px)); max-height: calc(100svh - 24px);
  padding: 0; border: 1px solid var(--line); border-radius: 20px;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg);
}
.modal::backdrop { background: rgba(11, 27, 63, 0.35); backdrop-filter: blur(6px); }
.modal[open] { animation: pop 0.35s cubic-bezier(.2,.9,.3,1.2); }
@keyframes pop { from { opacity: 0; transform: translateY(20px) scale(0.97); } }
.modal__bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--line); font-size: 0.75rem; color: var(--ink-2); background: var(--surface-2); }
.modal__body { display: grid; grid-template-columns: 260px 1fr; gap: 28px; padding: 28px; }
@media (max-width: 680px) {
  .modal__body { grid-template-columns: 1fr; gap: 16px; padding: 18px; }
  .modal__media { max-width: 140px; }
}
.modal__meta { margin: 0; font-size: 0.75rem; color: var(--muted); }
.modal__name { font-size: clamp(1.6rem, 4vw, 2.2rem); }
.modal__role { margin: 4px 0 0; color: var(--ink-2); }
.modal__wave { width: 100%; height: 40px; margin: 16px 0 8px; }
.modal__note { white-space: pre-line; font-size: 1.05rem; line-height: 1.7; margin: 0; min-height: 6em; }
.modal__note.is-typing::after { content: "▋"; color: var(--brand); animation: blink 0.8s steps(1) infinite; margin-left: 2px; }
.modal__sign { margin: 20px 0 0; color: var(--brand); font-size: 0.85rem; opacity: 0; transition: opacity 0.4s; }
.modal__sign.is-visible { opacity: 1; }
.modal__foot { display: flex; justify-content: space-between; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }

.snake { width: auto; }
.snake canvas { display: block; margin: 16px; background: var(--lcd); border-radius: 6px; image-rendering: pixelated; max-width: calc(100vw - 60px); touch-action: none; }
.snake__hint { text-align: center; font-size: 0.75rem; color: var(--muted); margin: 0 0 14px; }

/* ─── Toast & confetti ──────────────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translateX(-50%);
  padding: 10px 18px; border-radius: 999px; font-size: 0.85rem;
  background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg);
  animation: pop 0.3s ease;
  max-width: calc(100vw - 32px);
}
.confetti { position: fixed; top: -20px; z-index: 70; pointer-events: none; font-size: 1.4rem; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

.snake-launch {
  position: fixed; right: 16px; bottom: 16px; z-index: 30;
}

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