/* Nadebanken -- tactics, the 2D round replay and playbooks. Uses the tokens in app.css. */

/* --- main navigation ------------------------------------------------------- */
:root { --radar-t: #e38617; --radar-ct: #687cca; }
.mainnav { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.mainnav a {
  padding: 5px 12px; border-radius: 7px; text-decoration: none;
  color: var(--muted); font-weight: 600; font-size: 13px;
}
.mainnav a:hover { color: var(--text); }
.mainnav a[aria-current="page"] { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }

/* --- tactics list ------------------------------------------------------------ */
.tx-page { max-width: 1320px; margin: 0 auto; padding: 32px 20px 64px; }
.tx-head h1 { margin: 0 0 8px; font: 700 40px/1 var(--display); text-transform: uppercase; letter-spacing: .03em; }
.tx-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 22px; }
.tx-filters select, .newbook select, .newbook input {
  padding: 7px 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2);
}
.tx-count { margin-left: auto; color: var(--muted); font-size: 12.5px; }
.tx-filters .seg button { white-space: nowrap; }
.tx-filters select { width: auto; min-width: 160px; }
.c4 { color: #ff7b7b; font-weight: 600; }
.tx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.tcard {
  display: grid; grid-template-rows: auto 1fr; overflow: hidden;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  text-decoration: none; transition: border-color .15s, transform .15s;
}
.tcard:hover { border-color: var(--brand); transform: translateY(-2px); }
.mini { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #0a0d12; }
svg.mini { height: auto; }
.mini .route { fill: none; stroke: var(--t); stroke-width: 11; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.mini .route-end { fill: var(--t); stroke: #0c0f14; stroke-width: 5; }
.mini.no-radar { background: var(--surface-2); }
.tbody { padding: 12px 14px 14px; }
.tbody h3 { margin: 6px 0 6px; font: 700 21px/1.1 var(--display); letter-spacing: .02em; }
.ttags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag {
  padding: 1px 8px; border-radius: 999px; background: var(--surface-3);
  color: var(--muted); font-size: 11.5px; font-weight: 600;
}
.tag.site { color: var(--brand); }
.tag.fake { color: #ff9dc4; background: rgba(255, 110, 170, .12); }
.call {
  margin: 0 0 8px; padding: 8px 10px; border-left: 3px solid var(--brand); border-radius: 0 8px 8px 0;
  background: rgba(255, 181, 71, .07); font-size: 13px; line-height: 1.45;
}
.tcard .call { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.callmark {
  margin-right: 7px; padding: 0 6px; border-radius: 4px; background: var(--brand); color: var(--brand-ink);
  font: 700 11px/1.6 var(--font); text-transform: uppercase; letter-spacing: .05em;
}
.tmeta { color: var(--faint); font-size: 12px; }

/* --- the round replay ----------------------------------------------------------- */
.rp {
  display: grid; grid-template-columns: 230px minmax(0, 1fr) 400px;
  height: calc(100vh - 56px);
}
.rp-roster { overflow-y: auto; padding: 14px 12px; background: var(--surface); border-right: 1px solid var(--line); }
.rs-head { margin: 10px 4px 6px; font: 700 15px/1 var(--display); letter-spacing: .05em; text-transform: uppercase; }
.rs-head.t { color: var(--t); }
.rs-head.ct { color: var(--ct); }
.rs-list { list-style: none; margin: 0 0 12px; padding: 0; }
.rs-pl {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; width: 100%; position: relative;
  padding: 8px 10px 9px; border: 1px solid transparent; border-radius: 6px 6px 0 0; background: none;
  text-align: left; cursor: pointer;
}
.rs-pl:hover { background: var(--surface-2); }
.rs-pl.on { background: var(--surface-2); border-color: var(--line-strong); }
.rs-pl.dead { opacity: .5; }
.rs-top, .rs-bot { display: flex; align-items: center; gap: 5px; min-width: 0; }
.rs-hpn { color: var(--text); font-size: 13px; font-variant-numeric: tabular-nums; }
.rs-hpn::after { content: '•'; margin-left: 5px; color: #4b5563; }
.rs-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; }
.rs-pl.dead .rs-hpn { display: none; }
.rs-main, .rs-gear, .rs-arm { display: inline-flex; align-items: center; gap: 5px; flex: none; }
.rs-gear { margin-left: auto; }
.rs-money { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.rs-head .tag { margin-left: 4px; font-family: var(--font); text-transform: none; letter-spacing: 0; vertical-align: 2px; }
/* health: a line under the row in the team's colour */
.rs-hp { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--surface-3); }
.rs-hp i { display: block; height: 100%; transition: width .15s; }
.rs-list.t .rs-hp i { background: var(--radar-t); }
.rs-list.ct .rs-hp i { background: var(--radar-ct); }
.rs-list li + li { margin-top: 3px; }
.rs-role { color: var(--brand); font-size: 11.5px; }
/* icons: white, what they hold lit */
.wi { flex: none; fill: #fff; opacity: .5; }
.wi.main { opacity: .8; }
.wi.on { opacity: 1; }
.wi.arm { opacity: .6; fill: #c9d1dc; }
.wi.kit { opacity: .9; fill: #9fb4ff; }
.wi.c4 { fill: #ff7a6e; opacity: .9; }

.rp-stage { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.rp-wrap {
  position: relative; flex: 1; min-height: 0; display: grid; place-items: center; padding: 12px;
  background: radial-gradient(ellipse at center, #131922 0%, var(--bg) 75%);
}
.rp-radar { width: 100%; height: 100%; }
.rp-radar.zoomed { cursor: grab; touch-action: none; }
.rp-radar.panning { cursor: grabbing; }
.rp-clock {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  padding: 4px 14px; border-radius: 9px; background: rgba(12, 15, 20, .85); border: 1px solid var(--line);
  font: 700 22px/1.2 var(--display); letter-spacing: .05em;
}
.rp-clock .bombtime { display: inline-flex; align-items: center; gap: 6px; color: #ff6b6b; }
.rp-controls {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px 12px;
  border-top: 1px solid var(--line); background: var(--surface);
}
.icon-btn { justify-content: center; width: 40px; height: 36px; padding: 0; }
.icon-btn svg { width: 18px; height: 18px; }
.rp-track { position: relative; flex: 1; min-width: 120px; padding-top: 13px; }
.rp-track input[type="range"] { width: 100%; accent-color: var(--brand); margin: 10px 0 0; }
.rp-marks { position: absolute; left: 0; right: 0; top: 13px; height: 8px; pointer-events: none; }
.rp-marks .mk { position: absolute; top: 0; width: 3px; height: 8px; margin-left: -1px; border-radius: 2px; }
.mk.t { background: var(--t); }
.mk.ct { background: var(--ct); }
.mk.plant { background: #ff5a5a; height: 12px; top: -2px; }
.mk.exec { background: var(--text); height: 12px; top: -2px; width: 2px; }
.rp-speed button { padding: 5px 9px; font-size: 12.5px; }

/* radar scene: CS2's spectator radar */
.pl { cursor: pointer; }
.pl .body { stroke: rgba(0, 0, 0, .55); stroke-width: 2.2; stroke-linejoin: round; }
.pl .shadow { fill: #000; opacity: .25; }
.pl.t .body { fill: var(--radar-t); }
.pl.ct .body { fill: var(--radar-ct); }
/* over the dot: the name, and the weapon in their hands */
.pl .tag { pointer-events: none; }
.pl .nm-bg { fill: rgba(0, 0, 0, .5); }
.pl .nm { font: 700 12.5px var(--font); }
.pl.t .nm { fill: var(--radar-t); }
.pl.ct .nm { fill: var(--radar-ct); }
.pl .wi-ic { fill: #fff; opacity: .9; }
.pl .wi-sh { fill: #000; opacity: .6; }
.pl .selring { fill: none; stroke: #fff; stroke-width: 2.5; opacity: 0; }
.pl.sel .selring { opacity: 1; }
.pl .carry { fill: #ff5a4d; pointer-events: none; }
.death path { stroke-width: 4; stroke-linecap: round; }
.death.t path { stroke: var(--radar-t); }
.death.ct path { stroke: var(--radar-ct); }
.sites .site { fill: rgba(255, 255, 255, .78); font: 700 46px var(--display); paint-order: stroke;
  stroke: rgba(0, 0, 0, .55); stroke-width: 5px; pointer-events: none; }
.fx-smoke { fill: rgba(212, 216, 222, .82); stroke: rgba(240, 242, 245, .9); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.fx-molotov { fill: rgba(255, 96, 32, .55); stroke: rgba(255, 150, 60, .9); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.fx-flash { fill: rgba(255, 246, 200, .5); stroke: rgba(255, 238, 150, .95); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.fx-he { fill: rgba(127, 220, 143, .22); stroke: rgba(150, 235, 165, .95); stroke-width: 3; vector-effect: non-scaling-stroke; }
.bombmark { color: #ff3b3b; }
.bombmark.plant { animation: bomb-blink 1s steps(2, start) infinite; }
.bombmark.defuse { color: #5fd08a; }
@keyframes bomb-blink { to { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .bombmark.plant { animation: none; } }
.selpath polyline { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
/* the last seconds behind every player */
.ptrails polyline { fill: none; stroke-linecap: butt; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ptrails .edge { stroke: rgba(7, 9, 12, .55); }
.ptrail.t .line { stroke: var(--radar-t); }
.ptrail.ct .line { stroke: var(--radar-ct); }
.ptrails.has-sel .ptrail:not(.sel) { opacity: .35; }
.selpath .past { stroke-width: 3.5; opacity: .85; }
.selpath .past.t { stroke: var(--radar-t); }
.selpath .past.ct { stroke: var(--radar-ct); }
.selpath .future { stroke: #fff; stroke-width: 2; stroke-dasharray: 5 8; opacity: .3; }
.rp-opt { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; white-space: nowrap; cursor: pointer; }
.rp-opt input { accent-color: var(--brand); }
.rp-opt select { width: auto; padding: 3px 6px; font-size: 12.5px; }

/* panel */
.rp-panel h4 { margin: 18px 16px 8px; color: var(--muted); font: 700 13px var(--font); text-transform: uppercase; letter-spacing: .06em; }
.rp-sub { line-height: 1.5; }
.won { color: #5fd08a; }
.lost { color: #ff7b7b; }
.igl { margin: 14px 16px 0; padding: 12px 14px; border-radius: 12px; background: rgba(255, 181, 71, .08); border: 1px solid rgba(255, 181, 71, .35); }
.igl-head { display: flex; justify-content: space-between; align-items: center; color: var(--brand);
  font: 700 12px var(--font); text-transform: uppercase; letter-spacing: .06em; }
.igl-head .link { display: inline-flex; align-items: center; gap: 4px; text-transform: none; letter-spacing: 0; font-weight: 600; }
.igl p { margin: 8px 0 0; font-size: 15px; line-height: 1.5; font-weight: 500; }
.rp-desc { margin: 0 16px; color: var(--text); line-height: 1.55; }
.rp-actions { display: flex; align-items: center; gap: 10px; margin: 14px 16px 0; }
.playnote { margin: 12px 16px 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.playnote h4 { margin: 0 0 6px; }
.playnote p { margin: 0 0 6px; }
.who { margin: 16px 12px 0; padding: 4px 4px 8px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.who.t { border-color: color-mix(in srgb, var(--t) 45%, var(--line)); }
.who.ct { border-color: color-mix(in srgb, var(--ct) 45%, var(--line)); }
.who-head { display: flex; justify-content: space-between; align-items: center; padding-right: 10px; }
.who-head h4 { margin: 12px 10px 4px; color: var(--text); font-size: 14px; text-transform: none; letter-spacing: 0; }
.who .hint { margin: 0 10px 8px; }
.tl, .feed { list-style: none; margin: 0; padding: 0 6px; }
.tl button, .feed button {
  display: grid; grid-template-columns: 44px 1fr; gap: 8px; align-items: baseline; width: 100%;
  padding: 5px 6px; border: 0; border-radius: 7px; background: none; text-align: left; cursor: pointer; font-size: 13px;
}
.tl button:hover, .feed button:hover { background: var(--surface-3); }
.tl svg { width: 13px; height: 13px; margin-right: 5px; vertical-align: -2px; }
.kt { color: var(--faint); font-variant-numeric: tabular-nums; font-size: 12px; }
.tl .place span { color: var(--muted); }
.tl .ok, .tl b.ok { color: #5fd08a; }
.tl .bad, .tl b.bad { color: #ff7b7b; }
.tl .muted { color: var(--faint); }
.feed { padding: 0 10px 20px; }
.feed button { grid-template-columns: 44px auto auto 1fr; }
.feed .t { color: var(--t); font-weight: 600; }
.feed .ct { color: var(--ct); font-weight: 600; }
.feed .kw { color: var(--faint); font-size: 12px; }
.rp-examples .ico { font-weight: 700; }
.rp-examples .ico.won { color: #5fd08a; }
.rp-examples .ico.lost { color: #ff7b7b; }
.rp-examples .card { text-decoration: none; }

/* save dialog */
.modal-wrap { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(5, 7, 10, .65); }
.modal { width: min(440px, calc(100vw - 32px)); padding: 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
.modal h3 { margin: 0 0 12px; font: 700 22px/1 var(--display); text-transform: uppercase; }
.modal label { display: grid; gap: 5px; margin: 0 0 11px; color: var(--muted); font-size: 12.5px; }
.modal input, .modal select, .modal textarea, .play textarea, .play input, .booknotes {
  width: 100%; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--text); font: inherit; font-size: 13.5px;
}
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

/* playbooks */
.newbook { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.newbook input { min-width: 280px; flex: 1; max-width: 420px; }
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.bookcard { display: block; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-decoration: none; }
.bookcard:hover { border-color: var(--brand); }
.bookcard h3 { margin: 0 0 4px; font: 700 22px/1.1 var(--display); }
.bookcard p { margin: 8px 0 0; color: var(--muted); }
.bookname { width: 100%; margin: 0 0 8px; padding: 2px 0; border: 0; border-bottom: 1px dashed transparent; background: none;
  font: 700 40px/1.1 var(--display); text-transform: uppercase; letter-spacing: .03em; }
.bookname:hover, .bookname:focus { border-bottom-color: var(--line-strong); outline: none; }
.booknotes { max-width: 760px; resize: vertical; }
.plays { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 14px; }
.play { display: grid; grid-template-columns: 300px 1fr; gap: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.playmini { position: relative; display: block; border-radius: 10px; overflow: hidden; align-self: start; }
.playmini .mini { aspect-ratio: 1; }
.playbtn { position: absolute; inset: auto 10px 10px auto; display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 50%; background: var(--brand); color: var(--brand-ink); }
.playbtn svg { width: 18px; height: 18px; }
.playtop { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.playtop .num { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-3); font-weight: 700; }
.playtitle { flex: 1; font: 700 20px/1.1 var(--display) !important; letter-spacing: .02em; background: none !important; border-color: transparent !important; padding-left: 0 !important; }
.playtitle:hover, .playtitle:focus { border-color: var(--line-strong) !important; padding-left: 8px !important; }
.playtools { display: flex; gap: 10px; white-space: nowrap; }
.playtools .link[disabled] { opacity: .3; cursor: default; }
.link.danger { color: #ff7b7b; }
.play textarea { margin: 8px 0; resize: vertical; }
.roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 6px 14px; }
.roles label { display: grid; grid-template-columns: 82px 1fr; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.roles label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--t); font-weight: 600; }

@media (max-width: 1180px) {
  .rp { grid-template-columns: 200px minmax(0, 1fr); height: auto; }
  .rp-stage { min-height: 70vh; }
  .rp-panel { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); }
  .play { grid-template-columns: 200px 1fr; }
}
@media (max-width: 760px) {
  .mainnav a { padding: 5px 8px; }
  .crumbs { display: none; }
  .rp { display: block; }
  .rp-roster { display: flex; flex-wrap: wrap; gap: 0 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .rp-roster .rs-list { display: flex; flex-wrap: wrap; gap: 4px; }
  .rp-stage { min-height: 0; }
  .rp-wrap { aspect-ratio: 1; }
  .rp-controls { flex-wrap: wrap; }
  .play { grid-template-columns: 1fr; }
  .tx-head h1, .bookname { font-size: 30px; }
}

/* a shared, read-only copy: no edit controls */
body.shared #rp-save, body.shared #nb, body.shared #bk-del, body.shared .playtools,
body.shared #rp-saved, body.shared #news { display: none !important; }
body.shared .play textarea:placeholder-shown, body.shared .roles input:placeholder-shown { display: none; }
body.shared .bookname, body.shared .booknotes, body.shared .playtitle { pointer-events: none; }

/* --- buys ------------------------------------------------------------------------ */
.buy-pistol { --buy: #b99cff; }
.buy-eco { --buy: #6fd6c0; }
.buy-force { --buy: #ff8f6b; }
.buy-semi { --buy: #e8d57a; }
.buy-full { --buy: #9aa8ba; }
.tag.buy { background: var(--buy); color: #0b0e13; }
.tx-filters .tx-sort { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; }
.tx-filters .tx-sort select { min-width: 150px; }
.tx-group { margin: 6px 0 30px; }
.tx-gh { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font: 700 26px/1 var(--display);
  text-transform: uppercase; letter-spacing: .03em; }
.tx-gh span { color: var(--faint); font-size: 20px; }
.buydot { width: 12px; height: 12px; border-radius: 50%; background: var(--buy); }

/* --- what each player holds, on the radar --------------------------------------------- */
.w-rifle { --wc: #eef1f5; }
.w-awp { --wc: #7dffb0; }
.w-sniper { --wc: #b6f5cf; }
.w-smg { --wc: #a9d6ff; }
.w-heavy { --wc: #ffd28f; }
.w-pistol { --wc: #b8bfca; }
.w-knife { --wc: #7d8591; }
.w-smoke { --wc: var(--smoke); }
.w-flash { --wc: var(--flash); }
.w-molotov { --wc: var(--molotov); }
.w-he { --wc: var(--he); }
.w-decoy { --wc: #b8bfca; }
.w-c4 { --wc: #ff6a5f; }
/* the kill feed: the weapon's icon, a headshot, a flash assist */
.feed .kw { display: inline-flex; align-items: center; gap: 5px; }
.feed .kw .wi { opacity: .85; }
.feed .kw .khs, .feed .kw .kfa { opacity: .7; }

/* --- grenades in flight ---------------------------------------------------------------- */
.n-smoke { --nc: var(--smoke); }
.n-flash { --nc: var(--flash); }
.n-molotov { --nc: var(--molotov); }
.n-he { --nc: var(--he); }
.ntrail { fill: none; stroke: var(--nc); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
  vector-effect: non-scaling-stroke; }
.ntrail.focus { stroke-width: 3.6; }
.nfuture { fill: none; stroke: var(--nc); stroke-width: 1.8; stroke-dasharray: 3 6; stroke-linecap: round; opacity: .6;
  vector-effect: non-scaling-stroke; }
.nhit { fill: #07090c; stroke: var(--nc); stroke-width: 2; vector-effect: non-scaling-stroke; }
.npulse { fill: none; stroke: var(--nc); stroke-width: 2.2; vector-effect: non-scaling-stroke; }
.nhead { fill: var(--nc); stroke: #07090c; stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.ntech { pointer-events: none; }
.ntech rect { fill: rgba(9, 11, 15, .9); stroke: var(--nc); stroke-width: 1.2; }
.ntech text { fill: #eef1f5; font: 600 12.5px var(--font); }

.rp-zoom { position: absolute; top: 14px; right: 14px; display: grid; gap: 5px; }
.rp-zoom button { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border-radius: 9px;
  border: 1px solid var(--line); background: rgba(12, 15, 20, .86); color: var(--text); font: 600 19px/1 var(--font); cursor: pointer; }
.rp-zoom button:hover { border-color: var(--brand); }
.rp-zoom svg { width: 17px; height: 17px; }

/* the round's grenades, in the panel */
.nhead-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-right: 16px; }
.nseg { width: auto; }
.nseg button { padding: 3px 10px; font-size: 12px; }
.nhint { margin: -2px 16px 6px; }
.nlist { list-style: none; margin: 0; padding: 0 10px; }
.nlist button {
  display: grid; gap: 2px; min-width: 0; width: 100%;
  padding: 5px 6px; border: 1px solid transparent; border-radius: 8px; background: none; text-align: left;
  cursor: pointer; font-size: 13px;
}
.nlist button:hover { background: var(--surface-3); }
.nlist button.on { background: var(--surface-2); border-color: color-mix(in srgb, var(--nc) 55%, var(--line)); }
.nlist .ni svg { display: inline-block; width: 14px; height: 14px; margin-right: 5px; vertical-align: -2px; color: var(--nc); }
.nlist .nw b.t { color: var(--t); }
.nlist .nw b.ct { color: var(--ct); }
.nlist .ntk { color: var(--faint); font-size: 11.5px; }

/* --- shots, hits and flashes ------------------------------------------------------------ */
.shots .shot { stroke-width: 1.6; stroke-linecap: round; vector-effect: non-scaling-stroke; pointer-events: none; }
.shots .shot.t { stroke: #ffd27a; }
.shots .shot.ct { stroke: #a8cbff; }
.shots .shot.hit { stroke-width: 2.6; }
.pl .firering { fill: none; stroke: #fff4c2; stroke-width: 3; pointer-events: none; }
.pl .hurtfill { fill: #ff3b3b; pointer-events: none; }
.pl .blindfill { fill: #ffffff; pointer-events: none; }
.pl .blindhalo { fill: #ffffff; pointer-events: none; }
.pl .blindarc { fill: none; stroke: #ffffff; stroke-width: 3.5; stroke-linecap: round; pointer-events: none; }
.dmgs .dmg { font-family: var(--font); font-weight: 600; fill: #ff7070; paint-order: stroke; stroke: rgba(0, 0, 0, .8);
  stroke-width: 3px; vector-effect: non-scaling-stroke; pointer-events: none; }
.dmgs .dmg.head { fill: #ff3030; }

/* --- a grenade on the radar: click it -------------------------------------------------------- */
.ngrab { fill: none; stroke: transparent; stroke-width: 16; vector-effect: non-scaling-stroke; pointer-events: stroke; cursor: pointer; }
.nheads .nhead, .fx circle { cursor: pointer; }
.ncard { position: absolute; z-index: 5; width: 300px; padding: 10px 12px 12px; border-radius: 12px;
  background: rgba(16, 20, 27, .97); border: 1px solid color-mix(in srgb, var(--nc) 55%, var(--line)); box-shadow: var(--shadow); }
.ncard-head { display: flex; align-items: center; gap: 8px; }
.ncard-head b { flex: 1; font-size: 14px; }
.ncard-head .ni svg { display: block; width: 17px; height: 17px; color: var(--nc); }
.ncard-x { padding: 0 2px; border: 0; background: none; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
.ncard-x:hover { color: var(--text); }
.ncard-sub { margin: 4px 0 8px; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.ncard-sub .t { color: var(--t); font-weight: 600; }
.ncard-sub .ct { color: var(--ct); font-weight: 600; }
.ncard-video { display: grid; gap: 4px; min-height: 36px; }
.ncard-video video { width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; background: #000; }
.ncard-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ncard-actions .btn { text-decoration: none; }
.nlist li { display: grid; grid-template-columns: 68px minmax(0, 1fr) auto; align-items: center; gap: 4px 6px; padding: 3px 0; }
.nlist li[hidden] { display: none; }
.nlink { padding: 4px 8px; border-radius: 7px; color: var(--brand); font-size: 12px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.nlink:hover { background: var(--surface-3); }

/* --- util in the round: quick access, right under the call ------------------------------ */
.util { margin-top: 4px; }
.uthumb { position: relative; display: grid; place-items: center; width: 68px; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 7px; background: var(--surface-3); border: 1px solid color-mix(in srgb, var(--nc) 40%, var(--line)); }
.uthumb img { width: 100%; height: 100%; object-fit: cover; }
.uthumb .uico svg { display: block; width: 18px; height: 18px; color: var(--nc); }
.uthumb .uplay { position: absolute; right: 3px; bottom: 3px; display: grid; place-items: center; width: 16px; height: 16px;
  border-radius: 50%; background: rgba(0, 0, 0, .7); color: #fff; }
.uthumb .uplay svg { width: 9px; height: 9px; }
a.uthumb:hover { border-color: var(--brand); }
.uexec { margin-left: 6px; padding: 0 6px; border-radius: 999px; background: rgba(255, 181, 71, .14); color: var(--brand);
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; vertical-align: 1px; }

/* grenades on the time bar */
.rp-nmarks { position: absolute; left: 0; right: 0; top: 0; height: 10px; }
.nm { position: absolute; top: 0; width: 10px; height: 10px; margin-left: -5px; padding: 0; border: 0; border-radius: 50%;
  background: var(--nc); cursor: pointer; }
.nm.ct { background: var(--surface); box-shadow: inset 0 0 0 2px var(--nc); }
.nm:hover, .nm:focus-visible { transform: scale(1.4); z-index: 1; }

/* --- flashes: their reach, and whom they blinded ------------------------------------------- */
.cover rect { pointer-events: none; }
.shots .ray { stroke-width: 2.4; stroke-linecap: round; vector-effect: non-scaling-stroke; pointer-events: none; }
.shots .ray.team { stroke: #ff7ad9; stroke-dasharray: 5 5; }
.dmgs .raylab { font-family: var(--font); font-weight: 600; fill: #fff6cf; paint-order: stroke; stroke: rgba(0, 0, 0, .85);
  stroke-width: 3px; vector-effect: non-scaling-stroke; pointer-events: none; }
.dmgs .raylab.team { fill: #ff9be3; }
.rs-blind { margin-left: 6px; padding: 0 6px; border-radius: 999px; background: #fffbe6; color: #11151b; white-space: nowrap;
  font-size: 10.5px; font-weight: 700; vertical-align: 1px; }
.rp-legend { position: absolute; left: 14px; bottom: 14px; display: grid; gap: 5px; max-width: 330px; padding: 8px 10px;
  border-radius: 9px; background: rgba(12, 15, 20, .88); border: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.rp-legend b { color: var(--text); }
.rp-legend span { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--text); }
.rp-legend i { display: inline-block; width: 12px; height: 12px; margin-right: -6px; border-radius: 3px; vertical-align: -1px; }
.rp-legend[hidden] { display: none; }

/* --- phones ------------------------------------------------------------------------------ */
.rp-tabs, .tx-more { display: none; }
.rp-radar { touch-action: pan-y; }             /* one finger scrolls the page, two zoom the radar */
@media (max-width: 760px) {
  .mainnav { flex: 1; }
  .mainnav a { flex: 1; padding: 7px 4px; text-align: center; }

  /* the replay: the radar first, the controls under it, the rest in tabs */
  .rp { display: flex; flex-direction: column; height: auto; }
  .rp-stage { order: 1; min-height: 0; scroll-margin-top: 56px; }
  .rp-tabs { order: 2; }
  .rp-panel { order: 3; border-top: 0; }
  .rp-roster { order: 4; display: block; padding: 4px 10px 24px; border: 0; }
  .rp-roster .rs-list { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 6px; }
  .rs-pl { padding: 6px 7px; }
  .rp-wrap { aspect-ratio: 1; padding: 4px; }
  .rp-clock { top: 8px; padding: 2px 10px; font-size: 18px; }
  .rp-zoom { top: 8px; right: 8px; gap: 5px; }
  .rp-zoom button { width: 38px; height: 38px; }
  .rp-legend { left: 8px; right: 8px; bottom: 8px; max-width: none; padding: 6px 8px; font-size: 11px; }
  .rp-controls { flex-wrap: wrap; gap: 8px 12px; padding: 8px 10px 10px; }
  .rp-track { flex: 1 1 calc(100% - 60px); }
  .rp-speed button { padding: 7px 10px; }
  .rp-opt { padding: 4px 0; font-size: 13px; }
  .rp-tabs { position: sticky; top: 56px; z-index: 6; display: flex; gap: 2px; padding: 6px 8px;
    background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .rp-tabs button { flex: 1; padding: 9px 4px; border: 0; border-radius: 8px; background: none;
    color: var(--muted); font-size: 13.5px; font-weight: 600; cursor: pointer; }
  .rp-tabs button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); }
  .rp-tabs span { margin-left: 5px; color: var(--faint); font-size: 12px; font-weight: 500; }
  .rp:not([data-tab="runda"]) [data-tab="runda"],
  .rp:not([data-tab="util"]) [data-tab="util"],
  .rp:not([data-tab="spelare"]) [data-tab="spelare"],
  .rp:not([data-tab="kills"]) [data-tab="kills"] { display: none !important; }
  .rp-panel .nhint { display: none; }
  .ncard { width: min(300px, calc(100% - 16px)); }

  /* the tactics list: compact cards, the rarely used filters folded away */
  .tx-page { padding: 18px 12px 48px; }
  .tx-head h1 { font-size: 28px; }
  .tx-head .lede { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    margin-bottom: 14px; font-size: 13.5px; }
  .tx-filters { gap: 8px; margin-bottom: 12px; }
  .tx-filters .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .tx-filters .seg::-webkit-scrollbar { display: none; }
  .tx-filters .seg button { flex: 0 0 auto; padding: 7px 10px; }
  .tx-filters .tx-sort select { min-width: 0; }
  .tx-more { display: inline-flex; }
  .tx-extra:not(.open) { display: none; }
  .tx-grid { grid-template-columns: 1fr; gap: 10px; }
  .tcard { grid-template-columns: 96px minmax(0, 1fr); grid-template-rows: none; align-items: start; }
  .tcard .mini { width: 96px; height: 96px; margin: 10px 0 10px 10px; border-radius: 8px; aspect-ratio: 1; }
  .tbody { padding: 8px 10px 10px; }
  .tbody h3 { margin: 4px 0; font-size: 17px; }
  .tcard .call { -webkit-line-clamp: 2; max-height: calc(2.8em + 8px); margin-bottom: 4px; padding: 4px 8px;
    font-size: 12px; line-height: 1.4; }
  .tcard .callmark { display: none; }
  .tx-gh { margin-bottom: 8px; font-size: 21px; }
  .tx-group { margin-bottom: 18px; }
}

/* --- who is blind, and for how long -------------------------------------------------------- */
.pl .blindtag { pointer-events: none; }
.pl .blindtag rect { fill: #fffbe6; stroke: #07090c; stroke-width: 1.6; }
.pl .blindtag text { fill: #11151b; font: 700 15px var(--display); letter-spacing: .04em; }
.pl .blindburst { fill: none; stroke: #ffffff; stroke-width: 3.5; pointer-events: none; }
.rs-pl.blind { background: rgba(255, 251, 230, .13); box-shadow: inset 3px 0 0 #fffbe6; }
.rs-pl.blind .rs-name { color: #fffbe6; }
.kblind { margin-left: 5px; padding: 0 6px; border-radius: 999px; background: #fffbe6; color: #11151b;
  font-size: 10.5px; font-weight: 700; vertical-align: 1px; }
.tl .blind .blindtxt { color: #fffbe6; }
.rs-money.blindnow { padding: 0 6px; border-radius: 999px; background: #fffbe6; color: #11151b; font: 700 13px var(--display); letter-spacing: .04em; }
