:root {
  --bg: #0a0a0f; --panel: #12121a; --panel2: #191924; --panel3: #21212e; --line: #282837; --line2: #343446;
  --text: #ececf2; --muted: #a0a0b4; --dim: #6c6c80;
  --accent: #e11d48; --accent-d: #be123c; --blue: #2563eb;
  --green: #22c55e; --amber: #f59e0b; --sky: #38bdf8; --violet: #a78bfa; --red: #ef4444; --gray: #71717a;
  --r: 10px; --r-s: 7px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 14px/1.45 "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--sky); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 12px; }
.mono { font-family: "Cascadia Mono", Consolas, monospace; font-size: 12.5px; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.right { margin-left: auto; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- header ---- */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px;
  height: 58px; padding: 0 16px; background: rgba(12, 12, 18, 0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent) 0 50%, var(--blue) 50% 100%);
}
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.mark { display: flex; gap: 3px; }
.mark i { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.mark i + i { background: var(--blue); box-shadow: 0 0 10px var(--blue); }
.brand b { font-size: 15px; }
.brand span { color: var(--muted); font-size: 13px; }
.nav { display: flex; gap: 2px; height: 100%; }
.nav a {
  display: flex; align-items: center; padding: 0 12px; color: var(--muted); font-weight: 550;
  border-bottom: 2px solid transparent; text-decoration: none;
}
.nav a:hover { color: var(--text); }
.nav a.on { color: var(--text); border-bottom-color: var(--accent); }
.duty { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.callsign { font-weight: 700; }
.who { display: flex; align-items: center; gap: 8px; padding-left: 12px; border-left: 1px solid var(--line); }
.gamedot { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.gamedot i { width: 8px; height: 8px; border-radius: 50%; background: var(--gray); }
.gamedot.on i { background: var(--green); box-shadow: 0 0 8px var(--green); }

/* ---- alerts strip ---- */
.alerts { position: sticky; top: 58px; z-index: 19; }
.alert {
  display: flex; align-items: center; gap: 12px; padding: 9px 16px; font-weight: 600;
  border-bottom: 1px solid rgba(0, 0, 0, 0.4);
}
.alert.panic { background: #7f1d1d; animation: flash 1s steps(2, start) infinite; }
.alert.priority { background: #78350f; }
.alert .when { font-weight: 400; opacity: 0.8; font-size: 12px; }
@keyframes flash { 50% { background: #b91c1c; } }

/* ---- layout ---- */
main { padding: 16px; }
.cols { display: grid; gap: 14px; align-items: start; }
.cols.dispatch { grid-template-columns: 300px minmax(0, 1fr) 320px; }
.cols.mdt { grid-template-columns: minmax(0, 1fr) 360px; }
.cols.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.cols.side { grid-template-columns: 300px minmax(0, 1fr); }
.cols.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1250px) { .cols.dispatch { grid-template-columns: 280px minmax(0, 1fr); } .cols.dispatch > :last-child { grid-column: 1 / -1; } }
@media (max-width: 900px) { .cols.dispatch, .cols.mdt, .cols.two, .cols.side, .cols.three { grid-template-columns: 1fr; } .nav a { padding: 0 8px; } .brand span { display: none; } }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.card + .card { margin-top: 14px; }
.card-h { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-bottom: 1px solid var(--line); min-height: 46px; }
.card-h h2 { font-size: 14px; }
.card-h .count { color: var(--dim); font-weight: 500; }
.card-b { padding: 14px; }
.card-b.flush { padding: 0; }
.empty { padding: 22px 14px; text-align: center; color: var(--dim); }

/* ---- controls ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px;
  border-radius: var(--r-s); border: 1px solid var(--line2); background: var(--panel3); cursor: pointer;
  font-weight: 550; white-space: nowrap; transition: background 0.12s, border-color 0.12s;
}
.btn:hover { background: #2a2a3a; border-color: #44445a; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-d); }
.btn.blue { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.danger { color: #fca5a5; border-color: #7f1d1d; background: #2a1215; }
.btn.danger:hover { background: #3b1519; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--panel3); }
.btn.sm { height: 26px; padding: 0 9px; font-size: 12.5px; }
.btn.lg { height: 40px; padding: 0 18px; font-size: 15px; }
.btn.panic { background: #991b1b; border-color: #dc2626; color: #fff; font-weight: 750; letter-spacing: 0.04em; }
.btn.panic:hover { background: #b91c1c; }
.btn.on { outline: 2px solid var(--text); outline-offset: -2px; }

input[type=text], input[type=search], input[type=date], input[type=number], select, textarea {
  width: 100%; height: 34px; padding: 0 10px; border-radius: var(--r-s); border: 1px solid var(--line2);
  background: var(--bg); outline: none; transition: border-color 0.12s;
}
textarea { height: auto; min-height: 80px; padding: 8px 10px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); }
.row > input[type=text], .row > input[type=search], .row > select { width: auto; flex: 1 1 140px; }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 550; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.fields .wide { grid-column: 1 / -1; }
.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; }
.check input { accent-color: var(--accent); width: 15px; height: 15px; }

.tabs { display: flex; gap: 4px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: 0; padding: 6px 10px; border-radius: 6px; color: var(--muted); cursor: pointer; font-weight: 600; }
.tabs button.on { background: var(--panel3); color: var(--text); }
.tabs button .n { margin-left: 5px; color: var(--dim); }
.tabs button.alarm .n { color: #fff; background: var(--accent); border-radius: 9px; padding: 0 6px; }

/* ---- pills and badges ---- */
.pill { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 10px; font-size: 11.5px; font-weight: 650; white-space: nowrap; background: var(--panel3); color: var(--muted); }
.pill.available { background: rgba(34, 197, 94, 0.14); color: #4ade80; }
.pill.enroute { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.pill.onscene { background: rgba(56, 189, 248, 0.14); color: #7dd3fc; }
.pill.busy { background: rgba(167, 139, 250, 0.15); color: #c4b5fd; }
.pill.unavailable { background: rgba(113, 113, 122, 0.2); color: #a1a1aa; }
.pill.red { background: rgba(239, 68, 68, 0.16); color: #fca5a5; }
.pill.amber { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.pill.green { background: rgba(34, 197, 94, 0.14); color: #4ade80; }
.pill.blue { background: rgba(37, 99, 235, 0.2); color: #93c5fd; }
.pri { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 20px; border-radius: 5px; font-size: 11.5px; font-weight: 800; }
.pri.p1 { background: var(--red); color: #fff; }
.pri.p2 { background: var(--amber); color: #1a1205; }
.pri.p3 { background: var(--gray); color: #fff; }
.dept { font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; background: var(--panel3); color: var(--muted); }
.dept.police { background: rgba(37, 99, 235, 0.22); color: #93c5fd; }
.dept.fire { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }
.dept.ems { background: rgba(250, 204, 21, 0.16); color: #fde047; }
.dept.dot { background: rgba(249, 115, 22, 0.18); color: #fdba74; }
.dept.dispatch { background: rgba(167, 139, 250, 0.18); color: #c4b5fd; }
.dept.civilian { background: rgba(113, 113, 122, 0.22); color: #d4d4d8; }
.flag { display: inline-block; padding: 1px 7px; border-radius: 4px; background: rgba(239, 68, 68, 0.16); color: #fca5a5; font-size: 12px; font-weight: 600; margin: 0 4px 4px 0; }

/* ---- lists ---- */
.list > * { border-bottom: 1px solid var(--line); }
.list > *:last-child { border-bottom: 0; }
.item { display: flex; align-items: center; gap: 10px; padding: 9px 14px; cursor: pointer; }
.item:hover { background: var(--panel2); }
.item.sel { background: #1d1d2b; box-shadow: inset 3px 0 0 var(--accent); }
.item .title { font-weight: 600; }
.item .sub { color: var(--muted); font-size: 12.5px; }
.group-h { padding: 7px 14px; font-size: 11px; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); background: var(--bg); }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--gray); }
.dot.available { background: var(--green); } .dot.enroute { background: var(--amber); } .dot.onscene { background: var(--sky); }
.dot.busy { background: var(--violet); } .dot.unavailable { background: var(--gray); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 4px 0 10px; border-radius: 13px; background: var(--panel3); border: 1px solid var(--line2); font-weight: 600; font-size: 12.5px; }
.chip button { border: 0; background: none; color: var(--dim); cursor: pointer; width: 20px; height: 20px; border-radius: 50%; }
.chip button:hover { color: var(--text); background: var(--line2); }
table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-size: 11.5px; font-weight: 700; color: var(--dim); text-transform: uppercase; letter-spacing: 0.05em; padding: 8px 14px; border-bottom: 1px solid var(--line); }
table.t td { padding: 9px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: var(--panel2); }

/* ---- call detail ---- */
.timeline { display: flex; flex-direction: column; gap: 2px; max-height: 340px; overflow: auto; padding: 6px 0; }
.note { display: flex; gap: 10px; padding: 5px 14px; font-size: 13px; }
.note .t { color: var(--dim); font-size: 12px; min-width: 44px; padding-top: 1px; }
.note.system { color: var(--muted); font-style: italic; }
.note b { font-weight: 650; }
.note-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.section-title { font-size: 12px; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); margin: 4px 0 6px; }
.card > .section-title { padding: 0 14px; }
.statusbar { display: flex; gap: 6px; flex-wrap: wrap; }
.statusbar .btn { flex: 1; min-width: 92px; }
.big-unit { display: flex; align-items: center; gap: 12px; }
.big-unit .callsign { font-size: 22px; }

/* ---- sign-in ---- */
.signin { min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(800px 500px at 0% 0%, rgba(225, 29, 72, 0.22), transparent 70%), radial-gradient(800px 500px at 100% 100%, rgba(37, 99, 235, 0.2), transparent 70%), var(--bg); }
.signin .box { width: min(440px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 30px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); }
.signin h1 { font-size: 26px; margin: 18px 0 4px; }
.signin p { color: var(--muted); margin: 0 0 22px; }
.steam-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 46px; border-radius: 9px; background: #171a21; border: 1px solid #2a475e; color: #fff; font-weight: 650; font-size: 15px; text-decoration: none; }
.steam-btn:hover { background: #1b2838; text-decoration: none; }
.err { background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.3); color: #fca5a5; padding: 9px 12px; border-radius: 8px; margin-bottom: 14px; }

/* ---- modal + toasts ---- */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.6); display: grid; place-items: center; padding: 20px; animation: fade 0.12s; }
.modal { width: min(560px, 100%); max-height: 90vh; overflow: auto; background: var(--panel); border: 1px solid var(--line2); border-radius: 12px; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6); }
.modal.wide { width: min(860px, 100%); }
.modal .card-h { position: sticky; top: 0; background: var(--panel); z-index: 1; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); }
@keyframes fade { from { opacity: 0; } }
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--panel2); border: 1px solid var(--line2); border-left: 3px solid var(--blue); padding: 10px 14px; border-radius: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); max-width: 380px; animation: fade 0.15s; }
.toast.bad { border-left-color: var(--red); }
.toast.good { border-left-color: var(--green); }

/* ---- printing a report ---- */
@media print {
  .top, .alerts, .noprint, .toasts { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .modal { border: 0; background: #fff; box-shadow: none; }
  .overlay { position: static; background: none; }
}

/* ---- live map ---- */
.map-page { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; height: calc(100vh - 58px - 32px); }
.map-view { position: relative; overflow: hidden; border-radius: var(--r); border: 1px solid var(--line); background: #0c0f14; cursor: grab; touch-action: none; user-select: none; }
.map-view:active { cursor: grabbing; }
.map-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.map-world img { position: absolute; max-width: none; pointer-events: none; }
.map-world.grid { background-color: #0f131a; background-image: linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px); background-size: 100px 100px; }
.map-marks { position: absolute; inset: 0; pointer-events: none; }
.map-side { overflow: auto; }
.map-side .card + .card { margin-top: 12px; }
.map-coords { position: absolute; left: 10px; bottom: 8px; font: 12px "Cascadia Mono", Consolas, monospace; color: var(--muted); background: rgba(0,0,0,0.55); padding: 2px 7px; border-radius: 5px; pointer-events: none; }
.map-zoom { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 4px; }
.map-zoom .btn { width: 34px; padding: 0; }
.map-banner { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); display: flex; gap: 10px; align-items: center; background: rgba(12,12,18,0.92); border: 1px solid var(--line2); padding: 7px 12px; border-radius: 8px; max-width: 80%; font-size: 13px; }
.mk { position: absolute; left: 0; top: 0; pointer-events: auto; cursor: pointer; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.mk span { font-size: 11.5px; font-weight: 700; padding: 1px 5px; border-radius: 4px; background: rgba(8,8,12,0.82); color: #fff; margin-left: 4px; }
.mk.unit b { width: 0; height: 0; margin: -9px 0 0 -7px; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 18px solid var(--gray); filter: drop-shadow(0 0 2px #000); transform-origin: 7px 9px; }
.mk.unit.police b { border-bottom-color: #3b82f6; } .mk.unit.fire b { border-bottom-color: #ef4444; }
.mk.unit.ems b { border-bottom-color: #facc15; } .mk.unit.dot b { border-bottom-color: #f97316; } .mk.unit.civilian b { border-bottom-color: #a1a1aa; }
.mk.unit.off { opacity: 0.55; }
.mk.unit.off span { font-weight: 500; }
.mk.unit.on span { box-shadow: inset 0 -2px 0 var(--gray); }
.mk.unit.available span { box-shadow: inset 0 -2px 0 var(--green); } .mk.unit.enroute span { box-shadow: inset 0 -2px 0 var(--amber); }
.mk.unit.onscene span { box-shadow: inset 0 -2px 0 var(--sky); } .mk.unit.busy span { box-shadow: inset 0 -2px 0 var(--violet); }
.mk.call i { width: 16px; height: 16px; margin: -8px 0 0 -8px; transform: rotate(45deg); border: 2px solid #fff; background: var(--gray); box-shadow: 0 0 0 2px rgba(0,0,0,0.6); }
.mk.call.p1 i { background: var(--red); } .mk.call.p2 i { background: var(--amber); }
.mk.call.pending i { animation: pin 1s ease-in-out infinite; }
.mk.sel span { outline: 2px solid #fff; }
@keyframes pin { 50% { box-shadow: 0 0 0 8px rgba(239,68,68,0.35); } }
@media (max-width: 900px) { .map-page { grid-template-columns: 1fr; height: auto; } .map-view { height: 70vh; } }

/* ---- live map: smooth markers, lights and siren, AI traffic ---- */
.mk { will-change: transform; }
.mk.unit.siren b { animation: lightbar 0.5s steps(2, start) infinite; }
.mk.unit.lights b { animation: lightbar 1s steps(2, start) infinite; }
@keyframes lightbar { 0% { filter: drop-shadow(0 0 5px #ef4444) drop-shadow(0 0 2px #000); } 50% { filter: drop-shadow(0 0 5px #3b82f6) drop-shadow(0 0 2px #000); } }
.mk.ai b { width: 0; height: 0; margin: -5px 0 0 -4px; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 10px solid #6b7280; transform-origin: 4px 5px; filter: drop-shadow(0 0 1px #000); }
.mk.ai.stolen b { border-bottom-color: #ef4444; filter: drop-shadow(0 0 4px #ef4444); }
.mk.ai.wanted b { border-bottom-color: #f59e0b; }
.mk.ai.sel b, .mk.ped.sel { outline: 2px solid #fff; outline-offset: 2px; }
.mk.ped { width: 7px; height: 7px; margin: -3px 0 0 -3px; border-radius: 50%; background: #9ca3af; box-shadow: 0 0 0 1px #000; }
.mk.ped.wanted { background: #f59e0b; box-shadow: 0 0 0 1px #000, 0 0 6px #f59e0b; }
.legend { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.legend .lg { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 6px; }
.legend .lg:first-child { margin-left: 0; }
.legend .lg.siren { background: linear-gradient(90deg, #ef4444 50%, #3b82f6 50%); }
.legend .lg.stolen { background: #ef4444; }
.legend .lg.wanted { background: #f59e0b; }
.mono.big { font-size: 17px; font-weight: 700; letter-spacing: 0.04em; }

/* ---- drag a unit onto a call ---- */
.unit-row[draggable=true] { cursor: grab; }
.dragging-unit .droppable { outline: 1px dashed var(--line2); outline-offset: -3px; }
.drop, .dragging-unit .card.drop { outline: 2px solid var(--sky) !important; outline-offset: -2px; background: rgba(56, 189, 248, 0.08) !important; }

/* ---- lookups: what the game sees ---- */
.item.live { cursor: default; }
.item.live.hot { box-shadow: inset 3px 0 0 var(--red); }

/* ---- alerts ---- */
.alert.bolo { background: #713f12; }
.btn.muted-on { color: var(--amber); }

/* ---- radio dock ---- */
.radio-dock { position: fixed; left: 16px; bottom: 16px; z-index: 40; width: 330px; max-width: calc(100vw - 32px); }
.radio-tab { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 17px; border: 1px solid var(--line2);
  background: rgba(18, 18, 26, 0.96); font-weight: 650; cursor: pointer; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); }
.radio-tab i { width: 9px; height: 9px; border-radius: 50%; background: var(--gray); }
.radio-tab i.on { background: var(--green); box-shadow: 0 0 8px var(--green); }
.radio-tab i.live { background: var(--red); box-shadow: 0 0 10px var(--red); animation: flash 0.8s steps(2, start) infinite; }
.radio-dock.open .radio-tab { border-radius: 10px 10px 0 0; border-bottom-color: transparent; }
.radio-body { display: none; }
.radio-dock.open .radio-body { display: flex; flex-direction: column; gap: 10px; padding: 12px; background: rgba(18, 18, 26, 0.97);
  border: 1px solid var(--line2); border-radius: 0 10px 10px 10px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55); }
.radio-note { color: var(--muted); font-size: 13px; }
.radio-chs { display: flex; flex-direction: column; gap: 4px; }
.radio-ch { display: grid; grid-template-columns: 22px 70px auto 1fr 20px; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 7px; background: var(--panel2); border: 1px solid transparent; font-size: 13px; }
.radio-ch .name { font-weight: 650; }
.radio-ch .who { color: var(--muted); font-size: 12px; }
.radio-ch .tag { font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: 0.05em; color: var(--dim); border: 1px solid var(--line2); border-radius: 4px; padding: 0 4px; }
.radio-ch .tag.on { color: #86efac; border-color: rgba(34, 197, 94, 0.4); }
.radio-ch.busy { border-color: rgba(239, 68, 68, 0.55); background: rgba(127, 29, 29, 0.35); }
.radio-ch.busy .who { color: #fecaca; }
.radio-ch input[type=radio] { accent-color: var(--accent); }
.ptt { height: 52px; border-radius: 10px; border: 1px solid var(--line2); background: linear-gradient(180deg, #23232f, #1a1a24); font-weight: 750; font-size: 14px;
  letter-spacing: 0.02em; cursor: pointer; user-select: none; touch-action: none; }
.ptt:hover { border-color: #55556c; }
.ptt.on { background: linear-gradient(180deg, #b91c1c, #7f1d1d); border-color: #ef4444; box-shadow: 0 0 18px rgba(239, 68, 68, 0.45); }
.ptt:disabled { opacity: 0.5; cursor: default; }
.radio-body input[type=range] { flex: 1; accent-color: var(--accent); }
@media (max-width: 900px) { .radio-dock { left: 8px; bottom: 8px; } }

/* ---- header on narrow screens ---- */
.nav { min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.duty { flex-shrink: 0; }
.nav { flex: 1 1 auto; }
@media (max-width: 1150px) { .who > .muted { display: none; } .duty .btn.ghost.sm { padding: 0 6px; } }
@media (max-width: 1000px) { .gamedot { font-size: 0; gap: 0; } .duty select { width: 112px !important; } }

/* ---- the hosting server's front page (home.html) ---- */
a.brand { color: inherit; }
a.brand:hover { text-decoration: none; }
.home { max-width: 980px; margin: 0 auto; padding: 22px 16px 40px; display: flex; flex-direction: column; gap: 14px; }
.home .card + .card { margin-top: 0; }
.home .cols.two { gap: 14px; }
.home-intro { width: min(520px, 100%) !important; }
.comm-list { display: flex; flex-direction: column; }
.comm { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); color: inherit; }
.comm:first-child { border-top: 0; }
.comm:hover { background: var(--panel2); text-decoration: none; }
.comm-name { font-weight: 650; font-size: 15px; margin-bottom: 3px; }
.scroll-x { overflow-x: auto; }
@media (max-width: 720px) { .home .cols.two { grid-template-columns: minmax(0, 1fr); } }
.home .gamedot { font-size: 12px; gap: 6px; }

/* ---- rosters, codes, applications, owner tools ---- */
.cols.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .cols.five { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
tr.me td { background: rgba(37, 99, 235, 0.08); }
.codes { display: flex; flex-direction: column; max-height: 60vh; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r-s); }
.code-row { display: grid; grid-template-columns: 90px 1fr; gap: 10px; padding: 7px 12px; border-top: 1px solid var(--line); font-size: 13.5px; }
.code-row:first-child { border-top: 0; }
.signin .box.wide-box { width: min(620px, 100%); }
.signin .box.wide-box .card { text-align: left; }
.item.app { align-items: flex-start; cursor: default; }
.item.app .row input[type=text] { flex: 1 1 200px; }
.flhost-offer { border: 1px solid var(--line2); background: var(--panel2); border-radius: var(--r-s); padding: 12px 14px; }
.flhost-offer p { margin: 0; }

/* FL:Host staff panel, downloads, and the Discord step for new community owners */
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--panel2); }
.chatlog { max-height: 420px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; background: var(--panel2); border: 1px solid var(--line); border-radius: var(--r); }
.discord-step { padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel2); }
.row > input.num-sm, input.num-sm { width: 90px; flex: 0 0 90px; }
