/* CorseModer: field radio intercept terminal, Nasdara edition */
:root {
  --bg: #0c0f0a;
  --bg2: #12170f;
  --panel: #151b12;
  --panel-2: #1b2316;
  --line: #2c3a24;
  --line-2: #3c4f30;
  --text: #d8e4cc;
  --muted: #8a9a7c;
  --green: #7dff7a;
  --green-dim: #3f8f3b;
  --amber: #ffb547;
  --amber-dim: #8a5f1f;
  --sand: #d9b47a;
  --red: #ff5f4f;
  --blue: #7ac8ff;
  --glow: 0 0 12px rgba(125, 255, 122, .35);
  --glow-amber: 0 0 14px rgba(255, 181, 71, .45);
  --radius: 10px;
  --mono: 'Share Tech Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --stencil: 'Black Ops One', 'Impact', system-ui, sans-serif;
  --sans: 'Rajdhani', 'Segoe UI', system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(217, 180, 122, .10), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(125, 255, 122, .06), transparent 60%),
    repeating-linear-gradient(135deg, rgba(255,255,255,.012) 0 2px, transparent 2px 6px),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.4;
  min-height: 100vh;
}
/* Plain overlay, no blend modes: it has to stay cheap while DayZ is running. */
.scanlines {
  pointer-events: none; position: fixed; inset: 0; z-index: 50;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,.16) 0 1px, transparent 1px 3px);
  opacity: .55;
}
a { color: var(--green); }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px 22px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #1b2316, #0f130c);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 12px; }
/* ---------- tower logo ---------- */
.tower { width: 52px; height: 52px; flex: none; overflow: visible; }
.tower .mast path { fill: none; stroke: var(--sand); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tower .wave { fill: none; stroke: var(--green); stroke-width: 2.4; stroke-linecap: round; opacity: .12; transform-origin: 24px 19px; }
.tower .beacon { fill: var(--amber); }
.tower .beacon-glow { fill: var(--amber); opacity: 0; transform-origin: 24px 19px; }
/* Idle: a slow broadcast ripple and a blinking aviation light. */
.tower .w1 { animation: ripple 2.4s ease-out infinite; }
.tower .w2 { animation: ripple 2.4s ease-out .35s infinite; }
.tower .w3 { animation: ripple 2.4s ease-out .7s infinite; }
.tower .beacon { animation: beacon 2.4s steps(1) infinite; }
@keyframes ripple {
  0% { opacity: .08; transform: scale(.85); }
  25% { opacity: .95; transform: scale(1); filter: drop-shadow(0 0 3px var(--green)); }
  70%, 100% { opacity: .08; transform: scale(1.12); }
}
@keyframes beacon { 0%, 60% { opacity: 1; } 61%, 100% { opacity: .25; } }
/* Listening: the ripple speeds up. */
.brand.on-air .tower .w1, .brand.on-air .tower .w2, .brand.on-air .tower .w3 { animation-duration: 1.3s; }
.brand.on-air .tower .w2 { animation-delay: .18s; }
.brand.on-air .tower .w3 { animation-delay: .36s; }
.brand.on-air .tower .beacon { animation-duration: 1.3s; }
/* Key down: everything flashes with the Morse itself. */
.brand.keying .tower .wave { animation: none; opacity: 1; transform: scale(1); filter: drop-shadow(0 0 4px var(--green)); }
.brand.keying .tower .beacon { animation: none; opacity: 1; }
.brand.keying .tower .beacon-glow { opacity: .45; transform: scale(1.5); }
/* Bunker locked: amber broadcast. */
.brand.lock .tower .wave { stroke: var(--amber); }
.brand.lock .tower .beacon-glow { animation: halo 1.2s ease-out infinite; }
@keyframes halo { 0% { opacity: .6; transform: scale(.8); } 100% { opacity: 0; transform: scale(2.6); } }
.brand.lock h1 span { color: var(--amber); text-shadow: var(--glow-amber); }

/* ---------- newsletter ---------- */
.newsletter { margin: 0 auto 0 8px; display: grid; gap: 4px; min-width: 0; max-width: 380px; flex: 1 1 280px; }
.newsletter label { font-size: 13px; color: var(--muted); line-height: 1.2; }
.newsletter label b { color: var(--sand); font-weight: 700; }
.nl-row { display: flex; gap: 6px; }
.nl-row input { flex: 1; min-width: 0; padding: 6px 10px; font-size: 14px; }
.nl-msg { margin: 0; font-size: 12px; min-height: 0; color: var(--green); }
.nl-msg:empty { display: none; }
.nl-msg.warn { color: var(--amber); }
.newsletter.done .nl-row { display: none; }
@media (max-width: 760px) { .newsletter { order: 3; flex-basis: 100%; max-width: none; margin: 0; } }

/* ---------- donate ---------- */
.donate {
  display: inline-flex; align-items: center; gap: 9px; flex: none; margin-right: auto;
  padding: 7px 14px 7px 10px; border-radius: 10px; text-decoration: none; color: #2a1606;
  background: linear-gradient(180deg, #ffc56a, #f59a2c); border: 1px solid #ffd59a;
  box-shadow: 0 0 0 1px rgba(0,0,0,.4), 0 4px 16px rgba(255,160,60,.25);
  transition: transform .12s, box-shadow .2s, filter .2s;
}
.donate:hover { transform: translateY(-1px) rotate(-1deg); filter: brightness(1.06); box-shadow: 0 0 0 1px rgba(0,0,0,.4), 0 6px 22px rgba(255,160,60,.45); }
.donate:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.donate svg { width: 26px; height: 26px; }
.donate .heart { fill: #c2301f; transform-origin: 10.5px 12px; animation: heartbeat 1.6s ease-in-out infinite; }
.donate .steam { opacity: .6; animation: steam 2.2s ease-in-out infinite; }
.donate span { display: grid; line-height: 1.05; }
.donate b { font-family: var(--stencil); font-weight: 400; font-size: 17px; letter-spacing: 1px; }
.donate small { font-size: 11px; font-weight: 700; opacity: .75; }
@keyframes heartbeat { 0%, 40%, 100% { transform: scale(1); } 15% { transform: scale(1.3); } 28% { transform: scale(1.12); } }
@keyframes steam { 0%, 100% { transform: translateY(0); opacity: .2; } 50% { transform: translateY(-1.5px); opacity: .8; } }
.newsletter:has(+ .donate:not([hidden])) { margin-right: 10px; }
@media (max-width: 760px) { .donate { order: 4; margin: 0; } }
.brand h1 { font-family: var(--stencil); font-weight: 400; font-size: 30px; letter-spacing: 2px; margin: 0; line-height: 1; color: var(--sand); }
.brand h1 span { color: var(--green); text-shadow: var(--glow); }
.tagline { margin: 3px 0 0; font-family: var(--mono); font-size: 12px; letter-spacing: 2px; color: var(--muted); }
.tagline b { color: var(--amber); font-weight: 400; }
.top-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.chip {
  font-family: var(--mono); font-size: 13px; letter-spacing: 2px; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--bg2); color: var(--muted);
}
.chip-live { color: var(--green); border-color: var(--green-dim); box-shadow: var(--glow); }
.chip-signal { color: var(--bg); background: var(--green); border-color: var(--green); }
.chip-locked { color: var(--bg); background: var(--amber); border-color: var(--amber); box-shadow: var(--glow-amber); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(255,181,71,.0), var(--glow-amber); filter: brightness(1.15); } }

.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; color: var(--muted); }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .slider { width: 38px; height: 20px; border-radius: 999px; background: var(--line); position: relative; transition: background .2s; border: 1px solid var(--line-2); }
.switch .slider::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform .2s, background .2s; }
.switch input:checked + .slider { background: var(--green-dim); }
.switch input:checked + .slider::after { transform: translateX(18px); background: var(--green); }
.switch input:focus-visible + .slider { outline: 2px solid var(--amber); outline-offset: 2px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--sans); font-weight: 700; font-size: 15px; letter-spacing: .5px;
  padding: 9px 14px; border-radius: 8px; cursor: pointer; text-decoration: none;
  color: var(--text); background: var(--panel-2); border: 1px solid var(--line-2);
  transition: transform .06s, background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { border-color: var(--green-dim); background: #222c1c; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary { background: linear-gradient(180deg, #2f6b2b, #214d1f); border-color: var(--green-dim); color: #eaffea; }
.btn-primary:hover { background: linear-gradient(180deg, #3a8235, #295f26); box-shadow: var(--glow); }
.btn-danger { background: #3a1a16; border-color: #6b2a22; color: #ffd6d0; }
.btn-danger:hover:not(:disabled) { background: #4a1f1a; border-color: var(--red); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 6px 10px; font-size: 13px; }
.btn.active { border-color: var(--amber); color: var(--amber); }
.link-btn { background: none; border: 0; padding: 2px 0; color: var(--amber); font: inherit; font-size: 12px; cursor: pointer; text-decoration: underline dotted; text-align: left; }

/* ---------- layout ---------- */
.layout {
  display: grid; gap: 18px; padding: 18px 22px 8px;
  grid-template-columns: minmax(300px, 1fr) minmax(340px, 1.25fr) minmax(280px, .9fr);
  grid-template-areas: "rx ix ck" "dir dir dir";
  max-width: 1680px; margin: 0 auto;
}
.receiver { grid-area: rx; }
.intercept { grid-area: ix; }
.clock { grid-area: ck; }
.directory { grid-area: dir; }
@media (max-width: 1180px) {
  .layout { grid-template-columns: 1fr 1fr; grid-template-areas: "ix ix" "rx ck" "dir dir"; }
}
@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; grid-template-areas: "ix" "rx" "ck" "dir"; padding: 12px 16px; gap: 14px; }
  .topbar { padding: 12px 16px; }
  .brand h1 { font-size: 24px; }
}

.panel {
  background: linear-gradient(180deg, var(--panel), #11160e);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 10px 30px rgba(0,0,0,.35);
  position: relative; min-width: 0;
}
.panel::before {
  content: ''; position: absolute; top: 8px; right: 10px; width: 26px; height: 6px;
  background: repeating-linear-gradient(90deg, var(--line-2) 0 3px, transparent 3px 6px); opacity: .7;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.panel h2 {
  font-family: var(--stencil); font-weight: 400; font-size: 20px; letter-spacing: 1.5px; margin: 0;
  color: var(--sand); text-transform: uppercase; display: flex; align-items: center; gap: 10px;
}
.panel-sub { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 1px; margin-right: 34px; }
h3 { font-family: var(--sans); font-size: 16px; letter-spacing: 1px; text-transform: uppercase; color: var(--sand); margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- help ---------- */
.help { margin: 18px 22px 0; max-width: 1636px; }
@media (min-width: 1680px) { .help { margin-left: auto; margin-right: auto; } }
.help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.help ol, .help ul { margin: 0; padding-left: 20px; }
.help li { margin: 4px 0; }
.help b { color: var(--green); font-weight: 600; }

/* ---------- receiver ---------- */
.led { width: 12px; height: 12px; border-radius: 50%; background: #1e2a1a; border: 1px solid var(--line-2); display: inline-block; transition: background .03s, box-shadow .03s; }
.led.on { background: var(--green); box-shadow: 0 0 10px var(--green), 0 0 22px rgba(125,255,122,.5); border-color: var(--green); }
.source-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.device-row { display: flex; gap: 8px; margin-bottom: 10px; }
.device-row select { flex: 1; min-width: 0; }
select, input[type=text], input[type=number], input[type=time], input[type=search], input[type=email], #manualInput {
  background: #0b0e09; color: var(--text); border: 1px solid var(--line-2); border-radius: 7px;
  padding: 8px 10px; font-family: var(--mono); font-size: 15px; min-width: 0;
}
select:focus, input:focus { outline: 2px solid var(--green-dim); outline-offset: 0; border-color: var(--green-dim); }
input[type=time]::-webkit-calendar-picker-indicator { filter: invert(.7) sepia(1) hue-rotate(50deg); }
.notice { margin: 0 0 10px; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--amber-dim); background: rgba(255,181,71,.08); color: var(--amber); font-size: 14px; }
.notice.error { border-color: #6b2a22; background: rgba(255,95,79,.08); color: #ffb3aa; }

.scope { position: relative; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; background: #050805; cursor: crosshair; }
#waterfall { display: block; width: 100%; height: 150px; image-rendering: pixelated; }
.scope-marker { position: absolute; top: 0; bottom: 18px; width: 2px; background: var(--amber); box-shadow: var(--glow-amber); transform: translateX(-1px); pointer-events: none; }
.scope-marker span { position: absolute; top: 4px; left: 6px; font-family: var(--mono); font-size: 12px; color: var(--bg); background: var(--amber); padding: 1px 5px; border-radius: 4px; white-space: nowrap; }
.scope-marker.flip span { left: auto; right: 6px; }
.scope-axis { display: flex; justify-content: space-between; padding: 2px 6px; font-family: var(--mono); font-size: 11px; color: var(--muted); background: #0a0e08; border-top: 1px solid var(--line); height: 18px; }
.scope-hint { position: absolute; inset: 0 0 18px; display: grid; place-items: center; font-family: var(--mono); color: var(--muted); font-size: 13px; letter-spacing: 2px; pointer-events: none; text-transform: uppercase; }

.meter { height: 8px; background: #0a0e08; border: 1px solid var(--line); border-radius: 4px; margin: 10px 0; position: relative; overflow: hidden; }
.meter-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--green-dim), var(--green) 70%, var(--amber)); transition: width .05s linear; }
.meter-thr { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--amber); left: 0; }

.readouts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ro { background: #0b0e09; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; display: grid; grid-template-columns: 1fr auto; align-items: baseline; }
.ro label { grid-column: 1 / -1; font-family: var(--mono); font-size: 11px; letter-spacing: 2px; color: var(--muted); text-transform: uppercase; }
.ro b { font-family: var(--mono); font-weight: 400; font-size: 22px; color: var(--green); text-shadow: var(--glow); }
.ro small { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.ro small.manual { color: var(--amber); }

.tape-wrap, .stream-wrap { margin-top: 12px; }
.tape-label { font-family: var(--mono); font-size: 11px; letter-spacing: 3px; color: var(--muted); margin-bottom: 4px; }
.tape {
  height: 64px; background: repeating-linear-gradient(90deg, #0e130c 0 22px, #0b0f09 22px 44px); border: 1px solid var(--line);
  border-radius: 8px; display: flex; align-items: center; gap: 10px; padding: 0 10px; overflow: hidden; justify-content: flex-end;
  mask-image: linear-gradient(90deg, transparent, #000 18%);
}
.tchar { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: none; animation: slidein .15s ease-out; }
.tchar .syms { display: flex; gap: 3px; align-items: center; height: 10px; }
.tchar .s-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: var(--glow); }
.tchar .s-dash { width: 20px; height: 7px; border-radius: 4px; background: var(--green); box-shadow: var(--glow); }
.tchar .lbl { font-family: var(--mono); font-size: 16px; color: var(--sand); min-width: 1ch; text-align: center; }
.tchar.digit .lbl { color: var(--amber); }
.tchar.pending .syms > * { background: var(--amber); box-shadow: var(--glow-amber); }
.tchar.gap { width: 1px; height: 36px; background: var(--line-2); margin: 0 4px; }
@keyframes slidein { from { transform: translateX(12px); opacity: 0; } }

.digit-stream {
  min-height: 40px; background: #0b0e09; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
  font-family: var(--mono); font-size: 20px; letter-spacing: 3px; color: var(--green); word-break: break-all; line-height: 1.5;
}
.digit-stream .lo { color: var(--amber); }
.digit-stream .unk { color: var(--red); }
.digit-stream .sep { color: var(--line-2); letter-spacing: 0; margin: 0 4px; }
.digit-stream .hit { background: rgba(255,181,71,.16); border-radius: 3px; }
.digit-stream .empty { color: var(--muted); font-size: 14px; letter-spacing: 1px; }

.tuning { margin-top: 12px; }
.tuning summary, .clock-settings summary { cursor: pointer; font-family: var(--mono); font-size: 13px; letter-spacing: 2px; color: var(--muted); text-transform: uppercase; }
.tuning summary:hover, .clock-settings summary:hover { color: var(--green); }
.tuning-grid { display: grid; gap: 10px; padding-top: 10px; }
.tuning-grid label { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.tuning-grid input[type=range] { flex: 1; accent-color: var(--green); }
.tuning-grid output { font-family: var(--mono); color: var(--green); min-width: 48px; }
.tuning-buttons { display: flex; gap: 8px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { accent-color: var(--green); width: 16px; height: 16px; }

/* ---------- intercept ---------- */
.live {
  border: 1px solid var(--line-2); border-radius: 10px; padding: 14px;
  background:
    radial-gradient(circle at 85% 30%, rgba(125,255,122,.07), transparent 40%),
    repeating-radial-gradient(circle at 85% 30%, rgba(125,255,122,.05) 0 1px, transparent 1px 26px),
    #0b0f09;
  position: relative; overflow: hidden;
}
.live.locked { border-color: var(--amber); box-shadow: 0 0 0 1px rgba(255,181,71,.3), 0 0 30px rgba(255,181,71,.15); }
.live-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.live-label { font-family: var(--mono); font-size: 12px; letter-spacing: 3px; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.rec-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.live.active .rec-dot { background: var(--red); box-shadow: 0 0 8px var(--red); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .25; } }
.live-age { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.slots { display: flex; gap: 14px; flex-wrap: wrap; }
.slot-group label { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 2px; color: var(--muted); margin-bottom: 4px; }
.slot-row { display: flex; gap: 4px; }
.slot {
  width: 38px; height: 52px; display: grid; place-items: center; border-radius: 6px;
  background: #060906; border: 1px solid var(--line); font-family: var(--mono); font-size: 34px; color: #24321f;
}
.slot.filled { color: var(--green); text-shadow: var(--glow); border-color: var(--green-dim); animation: pop .18s ease-out; }
.slot.lo { color: var(--amber); border-color: var(--amber-dim); }
.slot.unk { color: var(--red); border-color: #6b2a22; }
.slot-pin .slot { width: 46px; height: 60px; font-size: 40px; }
.slot-pin .slot.filled { color: var(--amber); text-shadow: var(--glow-amber); border-color: var(--amber-dim); }
@keyframes pop { from { transform: scale(1.25); } }
.live-target { margin-top: 14px; min-height: 58px; display: flex; align-items: center; }
.live-wait { color: var(--muted); font-size: 15px; }
.live-wait b { color: var(--amber); }
.live-cands { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--muted); font-size: 14px; }
.live-cands .cand { font-family: var(--mono); border: 1px dashed var(--amber-dim); color: var(--amber); border-radius: 6px; padding: 3px 8px; font-size: 13px; text-decoration: none; }
.live-lock { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; width: 100%; }
.live-lock .tag { font-family: var(--stencil); font-size: 18px; color: var(--bg); background: var(--amber); padding: 4px 8px; border-radius: 6px; }
.live-lock .nm { font-family: var(--stencil); font-size: 24px; color: var(--sand); letter-spacing: 1px; line-height: 1.1; }
.live-lock .wh { font-size: 13px; color: var(--muted); }
.live-lock .grow { flex: 1; min-width: 150px; }

.intercepts-head { display: flex; justify-content: space-between; align-items: center; margin: 18px 0 8px; }
.intercepts-head h3 { margin: 0; }
.intercepts { display: grid; gap: 12px; }
.empty { color: var(--muted); font-size: 14px; margin: 0; padding: 14px; border: 1px dashed var(--line-2); border-radius: 8px; text-align: center; }

.card { border: 1px solid var(--line-2); border-radius: 10px; background: linear-gradient(180deg, #1a2215, #12180f); padding: 12px; position: relative; overflow: hidden; animation: cardin .35s cubic-bezier(.2,.9,.3,1.2); }
@keyframes cardin { from { transform: translateY(-8px) scale(.98); opacity: 0; } }
.card.fresh { border-color: var(--amber); box-shadow: 0 0 24px rgba(255,181,71,.18); }
.card-stamp {
  position: absolute; right: 12px; top: 40px; font-family: var(--stencil); font-size: 26px; color: rgba(255,181,71,.0);
  border: 3px solid rgba(255,181,71,.0); padding: 0 8px; border-radius: 6px; transform: rotate(-12deg); pointer-events: none;
}
.card.fresh .card-stamp { animation: stamp .6s ease-out forwards; }
@keyframes stamp { 0% { transform: rotate(-12deg) scale(2.2); color: rgba(255,181,71,0); border-color: rgba(255,181,71,0); } 60% { transform: rotate(-12deg) scale(.95); color: rgba(255,181,71,.55); border-color: rgba(255,181,71,.55); } 100% { transform: rotate(-12deg) scale(1); color: rgba(255,181,71,.22); border-color: rgba(255,181,71,.22); } }
.card-head { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.card-title h4 { overflow-wrap: anywhere; }
@media (max-width: 520px) { .card-head .badge { order: 3; margin-left: 50px; } .card-title { flex: 1 1 calc(100% - 60px); } .card-title h4 { overflow-wrap: break-word; } }
.card-tag { font-family: var(--stencil); font-size: 15px; background: var(--sand); color: var(--bg); border-radius: 5px; padding: 3px 7px; }
.card-title { flex: 1; min-width: 0; }
.card-title h4 { margin: 0; font-family: var(--stencil); font-weight: 400; font-size: 20px; letter-spacing: 1px; color: var(--text); line-height: 1.1; }
.card-where { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.badge { font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.badge.confirmed { color: var(--bg); background: var(--green); border-color: var(--green); }
.badge.heard { color: var(--amber); border-color: var(--amber-dim); }
.badge.partial, .badge.grid { color: var(--blue); border-color: #2c4c63; }
.card-body { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; margin: 10px 0; }
.card-pin label, .card-info label { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 2px; color: var(--muted); }
/* Nixie tubes: glass envelope, wire mesh, unlit cathode stack behind, warm neon digit. */
.pin-digits { display: flex; gap: 6px; padding: 4px 2px 0; }
.nixie {
  --neon: #ff8a2b;
  position: relative; width: 44px; height: 70px; flex: none;
  border-radius: 22px 22px 7px 7px;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(255,120,40,.22), transparent 62%),
    repeating-linear-gradient(0deg, rgba(150,110,80,.13) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(150,110,80,.13) 0 1px, transparent 1px 4px),
    linear-gradient(180deg, #1d140e, #0b0806 70%);
  border: 1px solid rgba(255,190,140,.22);
  box-shadow: inset 0 0 14px rgba(0,0,0,.9), 0 0 18px rgba(255,110,30,.18);
  display: grid; place-items: center; overflow: hidden;
  animation: nixie-on .55s steps(1) both;
}
/* The unlit cathodes you can see through the glass */
.nixie::before {
  content: '8'; position: absolute; inset: 0; display: grid; place-items: center; padding-bottom: 8px;
  font-family: var(--mono); font-size: 44px; color: transparent;
  -webkit-text-stroke: 1px rgba(160,120,90,.22);
}
/* Socket base with pins */
.nixie::after {
  content: ''; position: absolute; left: -1px; right: -1px; bottom: -1px; height: 9px;
  background: repeating-linear-gradient(90deg, #2a2a2a 0 3px, #111 3px 7px), #151515;
  border-top: 1px solid #3a3a3a; border-radius: 0 0 7px 7px;
}
.nixie b {
  position: relative; z-index: 1; font-family: var(--mono); font-weight: 400; font-size: 44px; line-height: 1; padding-bottom: 8px;
  color: #ffd9b0;
  text-shadow: 0 0 2px #fff1df, 0 0 6px var(--neon), 0 0 14px var(--neon), 0 0 28px rgba(255,90,20,.8), 0 0 44px rgba(255,70,10,.5);
  animation: nixie-flicker 4s ease-in-out infinite;
}
.nixie .glass {
  position: absolute; z-index: 2; inset: 3px 6px auto auto; width: 9px; height: 34px; border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,0)); pointer-events: none;
}
.nixie.off { box-shadow: inset 0 0 14px rgba(0,0,0,.9); animation: none; }
.nixie.off { background:
    repeating-linear-gradient(0deg, rgba(150,110,80,.1) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(150,110,80,.1) 0 1px, transparent 1px 4px),
    linear-gradient(180deg, #17110c, #0a0705 70%); }
@keyframes nixie-on { 0% { filter: brightness(.2); } 20% { filter: brightness(1.3); } 30% { filter: brightness(.4); } 45%, 100% { filter: none; } }
@keyframes nixie-flicker { 0%, 100% { opacity: 1; } 47% { opacity: 1; } 48% { opacity: .82; } 49% { opacity: 1; } 76% { opacity: .93; } 77% { opacity: 1; } }
.card-info { display: grid; grid-template-columns: repeat(3, auto); gap: 4px 14px; justify-content: start; }
.card-info b { font-family: var(--mono); font-weight: 400; font-size: 16px; color: var(--text); white-space: nowrap; }
.card-window.urgent { color: var(--red); animation: blink 1s steps(2) infinite; }
.card-window.closed { color: var(--muted); }
.card-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.card-actions .act-dismiss { margin-left: auto; }
@media (max-width: 520px) {
  .card-body { grid-template-columns: 1fr; }
  .slot { width: 32px; height: 46px; font-size: 28px; }
  .slot-pin .slot { width: 40px; height: 54px; font-size: 34px; }
}

.manual { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.manual label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
#manualInput { width: 100%; font-size: 20px; letter-spacing: 3px; }
.manual-result { margin-top: 8px; font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.manual-result .hitline { color: var(--text); }
.manual-result .hitline b { color: var(--amber); font-family: var(--mono); font-size: 18px; }

/* ---------- clock ---------- */
.clock-face { display: grid; grid-template-columns: 64px 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #0b0f09; }
.sky { grid-row: 1 / 3; width: 64px; height: 64px; border-radius: 50%; position: relative; overflow: hidden; background: radial-gradient(circle at 50% 120%, #e9a95a, #8bb7d9 70%); border: 1px solid var(--line-2); transition: background .6s; }
.sky .sun { position: absolute; width: 26px; height: 26px; border-radius: 50%; background: #ffe38a; box-shadow: 0 0 18px #ffd25e; left: 19px; top: 18px; transition: transform .6s, opacity .6s; }
.sky .moon { position: absolute; width: 24px; height: 24px; border-radius: 50%; left: 20px; top: 19px; box-shadow: inset -7px -2px 0 0 #e8ecff; opacity: 0; transform: translateY(30px); transition: transform .6s, opacity .6s; }
.clock-face.night .sky { background: radial-gradient(circle at 30% 30%, #1b2a4a, #070b16 70%); }
.clock-face.night .sun { opacity: 0; transform: translateY(40px); }
.clock-face.night .moon { opacity: 1; transform: none; }
.clock-time { font-family: var(--mono); font-size: 52px; line-height: 1; color: var(--green); text-shadow: var(--glow); letter-spacing: 2px; }
.clock-time small { font-size: 24px; color: var(--green-dim); }
.clock-phase { font-family: var(--mono); font-size: 12px; letter-spacing: 3px; color: var(--muted); }
.clock-face.night .clock-time { color: var(--blue); text-shadow: 0 0 12px rgba(122,200,255,.4); }
.radio-window { margin: 10px 0; padding: 9px 12px; border-radius: 8px; font-family: var(--mono); font-size: 14px; letter-spacing: 1px; border: 1px solid var(--line-2); color: var(--muted); background: #0b0f09; text-align: center; }
.radio-window.live { color: var(--bg); background: var(--green); border-color: var(--green); box-shadow: var(--glow); }
.radio-window.soon { color: var(--amber); border-color: var(--amber-dim); }
.countdowns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cd { background: #0b0e09; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.cd label { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase; }
.cd b { display: block; font-family: var(--mono); font-weight: 400; font-size: 26px; color: var(--amber); }
.cd small { font-size: 11px; color: var(--muted); }
.daybar { position: relative; height: 26px; margin: 14px 0 22px; border-radius: 6px; background: linear-gradient(90deg, #6b5532, #d9b47a 50%, #6b5532); border: 1px solid var(--line-2); }
.daybar-night { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, #0e1730 0 6px, #111c3a 6px 12px); }
.daybar-needle { position: absolute; top: -5px; bottom: -5px; width: 3px; background: var(--green); box-shadow: var(--glow); transform: translateX(-1px); border-radius: 2px; }
.daybar-ticks { position: absolute; left: 0; right: 0; top: 30px; display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.sync label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.sync-row { display: flex; gap: 8px; }
.sync-row input { flex: 1; font-size: 20px; }
.nudge-row { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.clock-settings { margin-top: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 10px; }
.form-grid.inner { padding-top: 4px; }
.form-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); min-width: 0; }
.form-grid small { font-family: var(--mono); font-size: 10px; color: #5f6e53; }
.form-grid .span2 { grid-column: 1 / -1; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px 10px; margin: 0; }
legend { padding: 0 4px; font-size: 13px; color: var(--muted); }

/* ---------- directory ---------- */
.directory input[type=search] { width: min(320px, 100%); margin-right: 34px; }
.dir-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
table.dir { width: 100%; border-collapse: collapse; font-size: 15px; }
.dir th { text-align: left; font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: 2px; color: var(--muted); padding: 8px 10px; background: #0b0e09; position: sticky; top: 0; }
.dir td { padding: 7px 10px; border-top: 1px solid var(--line); vertical-align: middle; }
.dir tr:hover td { background: rgba(125,255,122,.04); }
.dir tr.hot td { background: rgba(255,181,71,.08); }
.dir .tag { font-family: var(--mono); color: var(--sand); }
.dir .nm { font-weight: 700; }
.dir .gr { font-family: var(--mono); color: var(--green); white-space: nowrap; }
.dir .gr small { color: var(--muted); margin-left: 6px; }
.dir .wh { color: var(--muted); font-size: 14px; }
.dir .mp { white-space: nowrap; }
@media (max-width: 640px) { .dir th:nth-child(4), .dir td:nth-child(4) { display: none; } .dir .gr small { display: block; margin: 0; } }
.dir .mp a { font-size: 14px; margin-right: 10px; }
.cheat { margin-top: 14px; }
.cheat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; }
.cheat-grid div { background: #0b0e09; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); }
.cheat-grid b { color: var(--amber); font-size: 20px; font-weight: 400; }
.cheat-grid span { color: var(--green); letter-spacing: 2px; font-size: 16px; }

.footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 24px; padding: 18px 22px 26px; font-size: 13px; color: #5f6e53; max-width: 1680px; margin: 10px auto 0; border-top: 1px solid var(--line); }
.footer .credit, .footer .legal { display: grid; gap: 3px; }
.footer .legal { text-align: right; }
.footer .made { font-family: var(--stencil); font-size: 17px; letter-spacing: 1px; color: var(--muted); }
.footer .made b { font-weight: 400; color: var(--green); text-shadow: var(--glow); }
@media (max-width: 760px) { .footer { padding: 16px; } .footer .legal { text-align: left; } }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60;
  background: var(--amber); color: var(--bg); font-weight: 700; padding: 10px 16px; border-radius: 8px; box-shadow: var(--glow-amber);
  animation: toast 2.2s ease forwards;
}
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, 10px); } 10%, 80% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .tower .wave { opacity: .7; }
}
