/* The game modes' own interface (step 31 - docs/MODES_PLAN.md; loaded last, after compact.css, so its touch and narrow rules
   stand). The raid (Rajd R2, docs/modes/rajd.md ch. 5): the squad strip and the best result in the raid's window
   (src/ui/raid_setup.js), the squad's window (ui/squad_pick.js), the raid's HUD in the light sidebar (ui/raid_hud.js).
   Buttons only from the shared classes (.ab, .ib, .sk-bar - docs/NAVIGATION.md 9.6); targets 44 px on touch. */

/* ---------------- the raid's window: the faction's best, the squad strip (a button: its icons, its name and cost, "Zmień") */
.rd-best { margin: 4px 0 0; font-size: 11px; line-height: 1.35; }  /* (under the seed: the map column has room at 960 x 600, the options' column none) */
.rd-sq { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; min-height: 50px; padding: 5px 10px 5px 6px;
  text-align: left; letter-spacing: 0; border: 1px solid #3a4047; border-radius: 4px; background: linear-gradient(#1a1c20, #0f1013); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05); }
@media (hover: hover) { .rd-sq:hover { border-color: rgba(240, 200, 80, .55); background: linear-gradient(#1f2126, #121317); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07); } }
.rd-sq.bad { border-color: rgba(255, 106, 85, .7); }
.rd-sq-icons { display: flex; gap: 3px; min-width: 0; overflow: hidden; }
.rd-sq-u { position: relative; flex: none; display: grid; place-items: center; width: 46px; height: 36px; border: 1px solid #000; border-radius: 3px; background: #0b0c0e; box-shadow: 0 0 0 1px #2c3137; }
.rd-sq-u img, .rd-sq-u i { width: 44px; height: 34px; object-fit: contain; }
.rd-sq-u em { position: absolute; right: 1px; bottom: 0; font: 700 11px Consolas, monospace; font-style: normal; color: #fff; text-shadow: 1px 1px 0 #000, 0 0 3px #000; }
.rd-sq-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rd-sq-txt b { font: 700 14px var(--font-d); letter-spacing: 1.4px; text-transform: uppercase; color: #f3efe6; }
.rd-sq-txt small { overflow: hidden; font-size: 11.5px; font-weight: 400; color: var(--t3); white-space: nowrap; text-overflow: ellipsis; }
.rd-sq.bad .rd-sq-txt small { color: #ff8a75; }
.rd-sq .chg { padding: 4px 12px; border: 1px solid rgba(240, 200, 80, .45); border-radius: 12px; color: var(--gold); font: 600 11px var(--font-d); letter-spacing: 1.6px; text-transform: uppercase; }
@media (hover: hover) { .rd-sq:hover .chg { background: rgba(240, 200, 80, .12); } }
.rd-sq-bad { margin: -2px 0 0; color: #ff8a75; }
.rd-sq-bad[hidden] { display: none; }
body.touch .rd-sq { min-height: 44px; padding-block: 3px; }
body.touch .rd-sq-u { width: 42px; height: 32px; }
body.touch .rd-sq-u img, body.touch .rd-sq-u i { width: 40px; height: 30px; }

/* ---------------- the squad's window: the ready squads and the meter on top, the units' list scrolling, the bar in the dock */
.sq-modal .sq-box { max-height: 100%; min-height: 0; }
.sq-box .ph h2 { font-size: 20px; }
.sq-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.sq-styles { margin: 0; }
.sq-styles button { min-width: 78px; min-height: 26px; }
.sq-meter { flex: 1 1 260px; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 3px 10px; align-items: center; min-width: 0; }
.sq-bar { grid-column: 1 / -1; height: 8px; border: 1px solid #000; border-radius: 2px; background: #15171a; box-shadow: 0 0 0 1px #2c3137; overflow: hidden; }
.sq-bar i { display: block; width: calc(var(--w, 0) * 100%); height: 100%; background: linear-gradient(#f0c850, #a8822a); transition: width .15s; }
.sq-meter.bad .sq-bar i { background: linear-gradient(#ff6a55, #a3271a); }
.sq-sum { font: 700 13px var(--font-d); letter-spacing: .6px; color: var(--gold); }
.sq-meter.bad .sq-sum { color: #ff8a75; }
.sq-heads, .sq-left { font-size: 11.5px; color: var(--t3); }
.sq-heads { justify-self: end; }
.sq-left { grid-column: 1 / -1; }
.sq-list { display: flex; flex-direction: column; gap: 4px; min-height: 0; overflow-y: auto; margin: 0 -6px; padding: 0 6px 4px; overscroll-behavior: contain; }
.sq-list > .cap { margin: 6px 0 1px; padding-bottom: 4px; border-bottom: 1px solid var(--line); color: var(--gold); }
.sq-list > .cap:first-child { margin-top: 0; }
.sq-row { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto auto; align-items: center; gap: 4px 12px; padding: 5px 8px 5px 5px;
  border: 1px solid #262a30; border-radius: 4px; background: linear-gradient(#16181b, #0e0f11); }
.sq-row.on { border-color: rgba(240, 200, 80, .55); background: linear-gradient(#211d12, #120f09); }
.sq-row.off { opacity: .62; }
.sq-ico { display: grid; place-items: center; width: 58px; height: 44px; border: 1px solid #000; border-radius: 3px; background: #0b0c0e; box-shadow: 0 0 0 1px #2c3137; }
.sq-ico img { width: 54px; height: 41px; object-fit: contain; }
.sq-ico img:not([src]) { visibility: hidden; }
.sq-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sq-txt b { font: 700 13.5px var(--font-d); letter-spacing: .8px; color: var(--t1); }
.sq-txt small { font: 600 11px var(--font-d); letter-spacing: .6px; text-transform: uppercase; color: var(--t3); }
.sq-txt p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin: 1px 0 0; font-size: 11.5px; line-height: 1.35; color: var(--t3); }
.sq-cost { font: 700 13px var(--font-d); color: var(--gold); text-align: right; min-width: 44px; }
.sq-step { display: flex; align-items: center; gap: 2px; }
.sq-step output { min-width: 22px; font: 700 14px Consolas, monospace; text-align: center; color: var(--t4); }
.sq-row.on .sq-step output { color: var(--gold); }
.sq-step button.ib { border: 1px solid #08090a; background: linear-gradient(#3a4047, #24282d); color: var(--t1); }
.sq-step button.ib:disabled { opacity: .3; }
.i-minus { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 7h12v2H2z'/%3E%3C/svg%3E"); }
body.touch .sq-step button.ib { width: 44px; height: 44px; }
body.touch .sq-styles button { min-height: 40px; }

/* the window on a short screen: the list takes what is left between the header and the dock (960 x 600 with touch) */
@media (max-height: 700px) {
  .sq-box .ph p { display: none; }
  .sq-box { gap: 8px; }
}
/* a narrow window (a portrait tablet, a phone-sized view): the description under the name, the price beside the stepper */
@media (max-width: 620px) {
  .sq-row { grid-template-columns: 50px minmax(0, 1fr) auto; }
  .sq-ico { width: 50px; height: 38px; }
  .sq-ico img { width: 46px; height: 35px; }
  .sq-cost { grid-column: 3; grid-row: 1; align-self: start; }
  .sq-step { grid-column: 3; grid-row: 2; }
  .sq-ico { grid-row: 1 / 3; }
  .sq-txt { grid-row: 1 / 3; }
}

/* ---------------- the raid's HUD: a plate in the light HUD's sidebar under the power charges (style.css body.hud-light) */
#raid-hud { order: 6; flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; gap: calc(6px * var(--hud)); padding: calc(7px * var(--hud)) calc(8px * var(--hud));
  overflow: hidden; border: 1px solid #000; border-radius: 3px; background: linear-gradient(rgba(0, 0, 0, .3), rgba(0, 0, 0, .5)); box-shadow: 0 0 0 1px var(--metal); }
#raid-hud[hidden] { display: none; }
#raid-hud .rh-row { display: flex; align-items: center; gap: calc(8px * var(--hud)); }
#raid-hud .rh-k { margin: 0; font: 600 calc(11px * var(--hud)) var(--font-d); letter-spacing: 1.4px; text-transform: uppercase; color: var(--gold); }
#raid-hud .rh-row .rh-k { min-width: calc(58px * var(--hud)); }
#raid-hud .rh-v { margin-left: auto; font: 700 calc(12.5px * var(--hud)) Consolas, monospace; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
#raid-hud .rh-pips { display: flex; gap: calc(3px * var(--hud)); }
#raid-hud .rh-pips i { width: calc(11px * var(--hud)); height: calc(11px * var(--hud)); border: 1px solid #000; border-radius: 2px; background: #22262b; box-shadow: 0 0 0 1px #3b4148; transform: skewX(-12deg); }
#raid-hud .rh-pips i.on { background: linear-gradient(#ffb04a, #c86418); box-shadow: 0 0 0 1px #ffb04a, 0 0 5px rgba(255, 160, 60, .55); }
#raid-hud .rh-alarm:is([data-lv="3"], [data-lv="4"], [data-lv="5"]) .rh-pips i.on { background: linear-gradient(#ff6a4a, #a8231a); box-shadow: 0 0 0 1px #ff6a4a, 0 0 6px rgba(255, 80, 60, .6); }
#raid-hud .rh-alarm:is([data-lv="3"], [data-lv="4"], [data-lv="5"]) .rh-v { color: #ff8a75; }
#raid-hud .rh-bar { flex: 1; height: calc(7px * var(--hud)); border: 1px solid #000; border-radius: 2px; background: #15171a; box-shadow: 0 0 0 1px #2c3137; overflow: hidden; }
#raid-hud .rh-bar i { display: block; width: calc(var(--w, 0) * 100%); height: 100%; background: linear-gradient(#8fd86a, #3f8a2a); transition: width .3s; }
#raid-hud .rh-squad.low .rh-bar i { background: linear-gradient(#ff6a55, #a3271a); }
#raid-hud .rh-squad.low .rh-v { color: #ff8a75; }
#raid-hud .rh-squad .rh-v { margin-left: 0; }
#raid-hud .rh-log { display: flex; flex-direction: column; gap: 3px; min-height: 0; overflow: hidden; padding-top: calc(5px * var(--hud)); border-top: 1px solid rgba(255, 255, 255, .07); }
#raid-hud .rh-log[hidden] { display: none; }
#raid-hud .rh-log ol { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
#raid-hud .rh-log li { display: flex; gap: 6px; font-size: calc(11.5px * var(--hud)); line-height: 1.3; color: #cfc9bb; }
#raid-hud .rh-log li time { flex: none; font: 600 calc(10.5px * var(--hud)) Consolas, monospace; color: var(--muted); padding-top: 1px; }
#raid-hud .rh-log li.new { color: #f3efe6; animation: rh-in .9s ease-out; }
@keyframes rh-in { from { background: rgba(240, 200, 80, .22); } }
body.touch #raid-hud { gap: 5px; padding: 6px 7px; }

/* ---------------- the zone (step 31 Strefa S1, docs/modes/strefa.md ch. 6): its window's notes (src/ui/zone_setup.js), its HUD
   in the light sidebar under the power charges (ui/zone_hud.js - as the raid's), the end screen's places (ui/zone_end.js) */
.zn-best { margin: 4px 0 0; font-size: 11px; line-height: 1.35; }
.zn-cap { margin: 0; color: #cdbf8f; }
.zn-bad { margin: 0; color: #ff8a75; }
:is(.zn-cap, .zn-bad)[hidden] { display: none; }
.zn-cols .grid > :is(.zn-cap, .zn-bad) { grid-column: 2 / -1; align-self: center; font-size: 11.5px; line-height: 1.35; }  /* (S3: beside the map type - the options' chips fit under the grid at 960 x 600) */
#zone-hud { order: 6; flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; gap: calc(5px * var(--hud)); padding: calc(7px * var(--hud)) calc(8px * var(--hud));
  overflow: hidden; border: 1px solid #000; border-radius: 3px; background: linear-gradient(rgba(0, 0, 0, .3), rgba(0, 0, 0, .5)); box-shadow: 0 0 0 1px var(--metal); }
#zone-hud[hidden] { display: none; }
#zone-hud .zh-row { display: flex; align-items: center; gap: calc(8px * var(--hud)); min-width: 0; }
#zone-hud .zh-row[hidden] { display: none; }
#zone-hud .zh-k { margin: 0; font: 600 calc(11px * var(--hud)) var(--font-d); letter-spacing: 1.4px; text-transform: uppercase; color: var(--gold); white-space: nowrap; }
#zone-hud .zh-v, #zone-hud .zh-t { margin-left: auto; font: 700 calc(12.5px * var(--hud)) Consolas, monospace; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
#zone-hud .zh-storm { display: flex; flex-direction: column; gap: calc(3px * var(--hud)); padding: calc(4px * var(--hud)) 0; border-block: 1px solid rgba(255, 255, 255, .07); }
#zone-hud .zh-pips { display: flex; gap: calc(3px * var(--hud)); margin-left: auto; }
#zone-hud .zh-pips i { width: calc(11px * var(--hud)); height: calc(11px * var(--hud)); border: 1px solid #000; border-radius: 50%; background: #22262b; box-shadow: 0 0 0 1px #3b4148; }
#zone-hud .zh-pips i.on { background: radial-gradient(circle at 40% 35%, #b9cbff, #4a62b0); box-shadow: 0 0 0 1px #8fa8ff, 0 0 5px rgba(130, 160, 255, .55); }
#zone-hud .zh-pips i.now { animation: zh-pulse 1s ease-in-out infinite alternate; }
@keyframes zh-pulse { to { box-shadow: 0 0 0 1px #d8e2ff, 0 0 9px rgba(170, 195, 255, .9); } }
#zone-hud .zh-s { min-width: 0; overflow: hidden; font-size: calc(11.5px * var(--hud)); color: #cfc9bb; white-space: nowrap; text-overflow: ellipsis; }
#zone-hud[data-state="shrink"] .zh-s, #zone-hud .zh-when.soon .zh-t { color: #b9cbff; }
#zone-hud[data-state="arena"] .zh-s { color: #ff8a75; font-weight: 600; }
#zone-hud .zh-bar { height: calc(5px * var(--hud)); border: 1px solid #000; border-radius: 2px; background: #15171a; box-shadow: 0 0 0 1px #2c3137; overflow: hidden; }
#zone-hud .zh-bar i { display: block; width: calc(var(--w, 0) * 100%); height: 100%; background: linear-gradient(#9fb4ff, #4a62b0); transition: width .3s linear; }
#zone-hud[data-state="arena"] .zh-bar i { background: linear-gradient(#ff8a75, #a3271a); }
#zone-hud[data-state="over"] .zh-bar { visibility: hidden; }
#zone-hud .zh-warn { margin: 0; padding: calc(3px * var(--hud)) calc(6px * var(--hud)); border-radius: 2px; background: rgba(160, 30, 20, .35); box-shadow: inset 0 0 0 1px rgba(255, 106, 85, .5);
  font: 600 calc(11.5px * var(--hud)) var(--font-d); letter-spacing: .6px; color: #ffb3a6; animation: zh-warn 1.1s ease-in-out infinite alternate; }
#zone-hud .zh-warn[hidden] { display: none; }
@keyframes zh-warn { to { background: rgba(200, 40, 25, .5); } }
body.touch #zone-hud { gap: 4px; padding: 6px 7px; }
/* S2 (ui/zone_hud2.js): the squad at its cap, scouting with a bar to the next reinforcement, the upgrades' steps, the drop's
   countdown; the power charges (the light HUD's own #powers) three in a line with a count badge */
#zone-hud .zh-squad.full .zh-v { color: var(--gold); }
#zone-hud svg.zi { flex: none; width: calc(12px * var(--hud)); height: calc(12px * var(--hud)); color: #9aa3ad; }
#zone-hud .zh-scout .zh-sbar { flex: 1; min-width: calc(24px * var(--hud)); height: calc(5px * var(--hud)); border: 1px solid #000; border-radius: 2px; background: #15171a; box-shadow: 0 0 0 1px #2c3137; overflow: hidden; }
#zone-hud .zh-scout .zh-sbar i { display: block; width: calc(var(--w, 0) * 100%); height: 100%; background: linear-gradient(#a6e08a, #4c8a34); transition: width .3s linear; }
#zone-hud .zh-scout .zh-v { margin-left: 0; }
#zone-hud .zh-ups { display: flex; justify-content: space-between; gap: calc(4px * var(--hud)); }
#zone-hud .zh-ups[hidden] { display: none; }
#zone-hud .zh-up { display: flex; align-items: center; gap: calc(3px * var(--hud)); padding: 1px calc(3px * var(--hud)); border-radius: 2px; }
#zone-hud .zh-up svg.zi { color: #e2a6ff; }
#zone-hud .zh-up.none svg.zi { color: #6d6577; }
#zone-hud .zh-st { display: flex; gap: calc(2px * var(--hud)); }
#zone-hud .zh-st i { width: calc(5px * var(--hud)); height: calc(10px * var(--hud)); border-radius: 1px; background: #23272c; box-shadow: inset 0 0 0 1px #40464d; }
#zone-hud .zh-st i.on { background: linear-gradient(#f3d4ff, #b26ad8); box-shadow: inset 0 0 0 1px #fbe8ff; }
#zone-hud .zh-up.got { animation: zh-got 2.2s ease-out; }
@keyframes zh-got { from { background: rgba(214, 140, 255, .45); box-shadow: 0 0 10px rgba(214, 140, 255, .7); } }
#zone-hud .zh-drop svg.zi { margin-left: auto; color: #ff7440; }
#zone-hud .zh-drop .zh-v { margin-left: 0; }
#zone-hud .zh-drop .zh-k { color: #ffb08a; }
#zone-hud .zh-drop.soon .zh-v { color: #ffb08a; animation: zh-blink .5s ease-in-out infinite alternate; }
@keyframes zh-blink { to { opacity: .45; } }
#zone-hud .zh-drop.down .zh-v { font: 600 calc(11.5px * var(--hud)) var(--font-d); color: #cfc9bb; }
/* S3's tags (ui/zone_hud3.js): the head, the swarm, the dusk, the signal - small, two to a line in the narrow plate */
#zone-hud .zh-tags { display: flex; flex-wrap: wrap; gap: calc(3px * var(--hud)) calc(4px * var(--hud)); }
#zone-hud .zh-tags[hidden], #zone-hud .zh-tag[hidden] { display: none; }
#zone-hud .zh-tag { flex: 1 1 auto; display: inline-flex; align-items: center; gap: calc(4px * var(--hud)); min-width: 0; padding: 1px calc(5px * var(--hud)); border-radius: 2px;
  background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
#zone-hud .zh-tag .zh-tk { font: 600 calc(10.5px * var(--hud)) var(--font-d); letter-spacing: 1px; text-transform: uppercase; color: #cfc9bb; white-space: nowrap; }
#zone-hud .zh-tag .zh-tv { margin-left: auto; font: 700 calc(12px * var(--hud)) Consolas, monospace; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
#zone-hud .zh-tag .zh-tv:empty { display: none; }
#zone-hud .zh-tag[data-k="head"] { cursor: pointer; }
#zone-hud .zh-tag[data-k="head"] svg.zi { color: var(--gold); }
#zone-hud .zh-tag[data-k="head"].low .zh-tv, #zone-hud .zh-tag[data-k="head"].lost .zh-tv { color: #ff8a75; }
#zone-hud .zh-tag[data-k="head"].lost .zh-tv { font: 600 calc(10.5px * var(--hud)) var(--font-d); }
#zone-hud .zh-tag[data-k="swarm"] svg.zi { color: #b4e830; }
#zone-hud .zh-tag[data-k="swarm"].coming .zh-tv { color: #d6f58a; }
#zone-hud .zh-tag[data-k="dusk"] svg.zi { color: #9fb4ff; }
#zone-hud .zh-tag[data-k="dusk"].on { box-shadow: inset 0 0 0 1px rgba(150, 175, 255, .45); background: rgba(40, 52, 96, .35); }
#zone-hud .zh-tag[data-k="ping"] svg.zi { color: #8fe3d0; }
#zone-hud .zh-tag[data-k="ping"].now { animation: zh-got 1.6s ease-out; }
body.hud-light #powers.zn .power-btn { flex: 0 0 calc((100% - 12px) / 3); }
body.hud-light #powers.zn .power-btn[data-charges]::after { content: attr(data-charges); position: absolute; top: 2px; right: 2px; z-index: 1; min-width: calc(14px * var(--hud));
  padding: 0 3px; border-radius: 2px; text-align: center; font: 700 calc(10px * var(--hud))/calc(13px * var(--hud)) Consolas, monospace; color: var(--gold); background: rgba(0, 0, 0, .72);
  box-shadow: 0 0 0 1px rgba(255, 210, 74, .55); pointer-events: none; }
/* the end screen: each side's place in its card (the winner gold, the sides out greyed, those still in plain) */
.es-side.zn-side em b { font-size: 16px; }
.es-side.zn-side.win em b { color: var(--gold); }
.es-side.zn-side.in em { color: var(--t2); }
.es-side.zn-side.me { box-shadow: inset 3px 0 0 var(--gold); }
#end-sides.many .es-side.zn-side em b { font-size: 13px; }
#end-sides.many .es-side.zn-side em { font-size: 8.5px; letter-spacing: 1px; }

/* ---------------- the Front (step 31 Front F3, docs/modes/front.md ch. 6): the start window (src/ui/front_setup.js), the staff
   screen over the menu (ui/front_screen.js - the map painted by ui/front_map.js under the layer ui/front_layer.js), a sector's
   card, the order pick and the run's end (ui/front_pick.js). Icons are masks (.fr-i: ft-<template>, fc-<reward category>). */
.fr-i { display: inline-block; flex: none; width: 13px; height: 13px; background: currentColor; -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
.ft-annihilation { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 .5l1.6 4 4-1.8-1.9 3.9 4 1.6-4 1.5 1.9 3.9-4-1.8L8 15.5l-1.6-4-4 1.8 1.9-3.9-4-1.5 4-1.6-1.9-3.9 4 1.8z'/%3E%3C/svg%3E"); }
.ft-crossing { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1 4.5h14V6h-1.2v3.2h-1.6V6H3.8v3.2H2.2V6H1zM1 11.5c1.2-.9 2.3-.9 3.5 0s2.3.9 3.5 0 2.3-.9 3.5 0 2.3.9 3.5 0V13c-1.2.9-2.3.9-3.5 0s-2.3-.9-3.5 0-2.3.9-3.5 0-2.3-.9-3.5 0z'/%3E%3C/svg%3E"); }
.ft-nests { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8 1.5l5.6 3.2v6.6L8 14.5l-5.6-3.2V4.7zm0 2.4L4.4 6v4l3.6 2.1 3.6-2.1V6zM8 6.6l1.4.8v1.6L8 9.8l-1.4-.8V7.4z'/%3E%3C/svg%3E"); }
.ft-siege { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1.5 15V5.5h2.3v2h1.9v-2h1.9v2h.8v-2h1.9v2h1.9v-2h2.3V15H9.6v-3.2a1.6 1.6 0 0 0-3.2 0V15z'/%3E%3C/svg%3E"); }
.ft-convoy { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1 3.5h8.6v7.7H1zM10.6 6.2h2.7l2.2 2.7v2.3h-4.9zM4 11.6a1.7 1.7 0 1 1 0 3.4 1.7 1.7 0 0 1 0-3.4zm8.2 0a1.7 1.7 0 1 1 0 3.4 1.7 1.7 0 0 1 0-3.4z'/%3E%3C/svg%3E"); }
.ft-head { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M7.2 0h1.6v3.3H7.2zm0 12.7h1.6V16H7.2zM0 7.2h3.3v1.6H0zm12.7 0H16v1.6h-3.3zM8 3.6a4.4 4.4 0 1 1 0 8.8 4.4 4.4 0 0 1 0-8.8zm0 1.7a2.7 2.7 0 1 0 0 5.4 2.7 2.7 0 0 0 0-5.4z'/%3E%3C/svg%3E"); }
.ft-race { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1.5 15v-3.5h2.8V15zm4.2 0V8.5h2.8V15zm4.2 0V6.5h2.8V15zM9.6 1H15v5.4l-1.9-1.9-3.4 3.4-1.3-1.3 3.4-3.4z'/%3E%3C/svg%3E"); }
.ft-nomad { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8 1.5 15.5 14.5H.5zm0 6.3-2.6 6.7h5.2z'/%3E%3C/svg%3E"); }
.ft-hq { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 1h1.4v12H3zM4.4 1.8h9.1l-2.4 2.9 2.4 2.9H4.4zM1 13.2c2-1.1 12-1.1 14 0V15H1z'/%3E%3C/svg%3E"); }
.fc-E { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8 1.5a6.5 6.5 0 1 1 0 13 6.5 6.5 0 0 1 0-13zm0 2.2a4.3 4.3 0 1 0 0 8.6 4.3 4.3 0 0 0 0-8.6zM7.1 5h1.8v6H7.1z'/%3E%3C/svg%3E"); }
.fc-W { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1.2 1.2h2l7.3 7.3-1.4 1.4-7.9-7.9zm13.6 0v2L7.5 10.5 6.1 9.1l7.3-7.9zM3 10.4l2.6 2.6-1.8 1.8-2.6-2.6zm10 0 1.8 1.8-2.6 2.6-1.8-1.8zM2.4 8.9l1.1-1.1 4.7 4.7-1.1 1.1zm11.2 0-4.7 4.7-1.1-1.1 4.7-4.7z'/%3E%3C/svg%3E"); }
.fc-Z { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8 3C4.3 3 1.5 6.2.6 8c.9 1.8 3.7 5 7.4 5s6.5-3.2 7.4-5C14.5 6.2 11.7 3 8 3zm0 2.2a2.8 2.8 0 1 1 0 5.6 2.8 2.8 0 0 1 0-5.6z'/%3E%3C/svg%3E"); }
.fc-M { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M9.6.8 2.8 9.2h4.4L6.4 15.2l6.8-8.4H8.8z'/%3E%3C/svg%3E"); }
.fc-F { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 .8l2.2 4.6 5 .7-3.6 3.5.9 5L8 12.2l-4.5 2.4.9-5L.8 6.1l5-.7z'/%3E%3C/svg%3E"); }
:is(.fr-ord, .fr-oi, .fr-chip).c-E { --cc: #d8b04a; }
:is(.fr-ord, .fr-oi, .fr-chip).c-W { --cc: #d65a3e; }
:is(.fr-ord, .fr-oi, .fr-chip).c-Z { --cc: #4cb4c4; }
:is(.fr-ord, .fr-oi, .fr-chip).c-M { --cc: #a874e4; }
.fr-pips { display: inline-flex; gap: 3px; }
.fr-pips i { width: 10px; height: 10px; border: 1px solid #000; border-radius: 2px; background: #22262b; box-shadow: 0 0 0 1px #3b4148; transform: skewX(-12deg); }
.fr-pips i.on { background: linear-gradient(#ffd56a, #c8902a); box-shadow: 0 0 0 1px #f0c850, 0 0 5px rgba(240, 200, 80, .5); }
.fr-pips i.going { animation: fr-pip 1.3s ease-in both; }
@keyframes fr-pip { 0%, 35% { background: linear-gradient(#ffb04a, #e04a20); box-shadow: 0 0 0 1px #ff8a50, 0 0 10px rgba(255, 110, 50, .9); } 100% { background: #22262b; box-shadow: 0 0 0 1px #3b4148; } }

/* the start window: the rival's card (its emblem, its boss's name and silhouette), the saved fronts with a small staff map each */
.fs-rv { --fc: var(--gold); position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 148px; padding: 12px 10px 10px; overflow: hidden; text-align: center;
  border: 1px solid color-mix(in srgb, var(--fc) 45%, #000); border-radius: 4px; background: radial-gradient(ellipse at 50% 18%, color-mix(in srgb, var(--fc) 24%, transparent), transparent 72%), linear-gradient(#17191c, #0d0e10); }
.fs-rv .emb { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: radial-gradient(circle, rgba(0, 0, 0, .15), rgba(0, 0, 0, .6));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--fc) 70%, #000), 0 0 14px color-mix(in srgb, var(--fc) 40%, transparent); }
.fs-rv .emb img { width: 58px; height: 58px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .7)); }
.fs-rv .emb.unknown::after { content: '?'; font: 700 34px var(--font-d); color: var(--t3); }
.fs-rv b { position: relative; font: 700 15px var(--font-d); letter-spacing: 1.2px; text-transform: uppercase; color: #f3efe6; }
.fs-rv small { position: relative; font-size: 11.5px; line-height: 1.3; color: var(--t3); }
.fs-rv .fs-boss { width: 64px; height: 48px; margin-top: 2px; object-fit: contain; border-radius: 3px; box-shadow: 0 0 0 1px #000, 0 0 0 2px color-mix(in srgb, var(--fc) 45%, #000); }
.fs-saved { display: flex; flex-direction: column; gap: 5px; max-height: 158px; margin: 0 -4px; padding: 0 4px 2px; overflow-y: auto; overscroll-behavior: contain; }
.fs-saved > .note { margin: 2px 0 0; }
.fs-run { --fc: var(--gold); display: grid; grid-template-columns: 124px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 4px 6px 4px 4px;
  border: 1px solid #2c3137; border-radius: 4px; background: linear-gradient(#17191c, #0e0f11); box-shadow: inset 3px 0 0 var(--fc); }
.fs-mini { width: 124px; height: 52px; border-radius: 2px; box-shadow: 0 0 0 1px #000; }  /* (the staff sheet's proportion - F5's 600-unit height) */
.fs-run-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fs-run-t b { overflow: hidden; font: 700 12.5px var(--font-d); letter-spacing: .6px; color: var(--t1); white-space: nowrap; text-overflow: ellipsis; }
.fs-run-t small { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--t3); }
.fs-run .fs-resume { min-width: 0; min-height: 34px; padding: 6px 14px; }
body.touch .fs-run .fs-resume { min-height: 44px; }
@media (max-width: 900px) {
  .fs-side > .cap { grid-column: 1; grid-row: 1; }
  .fs-side > .fs-rv { grid-column: 1; grid-row: 2 / 6; }
  .fs-side > .sk-seed { grid-column: 2; grid-row: 2; margin-top: 0; }
  .fs-side > .zn-bad { grid-column: 2; grid-row: 3; }
  .fs-side > .md-best { grid-column: 2; grid-row: 4; }
}

/* the staff screen: a panel over the menu - the map's frame, the dock's row with the staff bar (.lead) */
.fr-staff { width: min(1520px, calc(100vw - 32px)); gap: 10px; padding: 14px 18px 18px; }
.fr-staff > .ph { padding-bottom: 8px; }
.fr-vs { display: flex; align-items: center; gap: 8px; }
.fr-vs img { width: 38px; height: 38px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .8)); }
.fr-vs i { width: 2px; height: 28px; background: linear-gradient(transparent, var(--gold), transparent); transform: skewX(-18deg); }
.fr-frame { position: relative; flex: none; overflow: hidden; border: 1px solid #000; border-radius: 3px; background: #2b2418; box-shadow: 0 0 0 1px #5a4a30, 0 10px 26px rgba(0, 0, 0, .6); }
.fr-scroll { height: 100%; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #6b5a3c #1b1710; }
.fr-scroll.tall { overflow-y: auto; overscroll-behavior: contain; }  /* (a window too low for the whole sheet at the scale's minimum - 960 × 600 with touch: up and down too) */
.fr-sheet { position: relative; margin: 0 auto; }
.fr-canvas { position: absolute; left: 0; top: 0; display: block; }
.fr-layer { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.fr-here { position: absolute; right: 10px; bottom: 12px; z-index: 2; min-width: 0; padding: 7px 14px; box-shadow: 0 4px 12px rgba(0, 0, 0, .6); }
.fr-here[hidden] { display: none; }
body.touch .fr-here { min-height: 44px; }
.fr-staff .foot-row { flex-wrap: nowrap; }
.fr-staffbar { display: flex; flex: 1 1 auto; flex-wrap: wrap; align-items: center; gap: 6px 18px; min-width: 0; }
.fr-sb { display: flex; align-items: center; gap: 7px; min-width: 0; }
.fr-sb .cap { font-size: 10px; letter-spacing: 1.4px; }
.fr-sb-v { display: flex; align-items: center; gap: 3px; min-width: 0; }
.fr-sb .note { font-size: 11.5px; font-style: italic; }
.fr-sb-v em { font: 700 11px Consolas, monospace; font-style: normal; color: var(--t3); }
.fr-sb-u { position: relative; display: grid; place-items: center; width: 34px; height: 26px; border: 1px solid #000; border-radius: 2px; background: #0b0c0e; box-shadow: 0 0 0 1px #2c3137; }
.fr-sb-u img { width: 32px; height: 24px; object-fit: contain; }
:is(.fr-sb-u, .fs-rv) img:not([src]) { visibility: hidden; }
.fr-sb-u:is(.r1, .r2, .r3)::after { content: ''; position: absolute; right: 1px; top: 1px; width: 8px; height: 5px; background: var(--gold); clip-path: polygon(0 45%, 50% 0, 100% 45%, 100% 100%, 50% 55%, 0 100%); }
.fr-sb-u.r2::after { height: 8px; clip-path: polygon(0 28%, 50% 0, 100% 28%, 100% 50%, 50% 22%, 0 50%, 0 78%, 50% 50%, 100% 78%, 100% 100%, 50% 72%, 0 100%); }
.fr-sb-u.r3::after { width: 9px; height: 9px; background: #ffd86a; clip-path: polygon(50% 0, 62% 36%, 100% 38%, 70% 60%, 80% 100%, 50% 77%, 20% 100%, 30% 60%, 0 38%, 38% 36%); }
.fr-sb-code b { font: 700 13px Consolas, monospace; letter-spacing: 1px; color: var(--gold); }
.fr-oi { --cc: var(--gold); display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 3px; color: #fff;
  background: radial-gradient(circle at 40% 30%, color-mix(in srgb, var(--cc) 60%, #222), #111); box-shadow: 0 0 0 1px var(--cc), inset 0 1px 0 rgba(255, 255, 255, .15); }
.fr-oi .fr-i { width: 14px; height: 14px; }
.fr-oi.emb { background: radial-gradient(circle, #2a2b2e, #0d0e10); }
.fr-oi.emb img { width: 88%; height: 88%; object-fit: contain; }

/* the map's layer: labels in the map's ink, buttons over the areas (their halo - raised for a choice), pins, pulse, flags, stamps */
/* (the area's box only places the label: the pointer, the halo, the pulse and the picture follow its painted outline - .fr-shape,
   ui/front_layer.js shapeSvg; a div, never a <button> - Firefox clips what overflows a button; .fr-btn inside is the keyboard's) */
.fr-area { position: absolute; display: block; min-width: 0; min-height: 0; padding: 0; border: 0; background: none; box-shadow: none; color: inherit; cursor: default; pointer-events: none; }
.fr-area.live { cursor: pointer; }
.fr-btn { position: absolute; inset: 0; width: auto; height: auto; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; opacity: 0; pointer-events: none; }
.fr-shape { position: absolute; overflow: visible; pointer-events: none; }  /* (no shadow, no lift: the picture lies exactly on the painted outline - the user, 2026-10-28) */
.fr-shape .hit { fill: transparent; pointer-events: fill; }
.fr-shape :is(.edge, .ring) { fill: none; stroke: transparent; stroke-linejoin: round; transition: stroke .15s, stroke-width .15s; }
.fr-shape :is(.pic, .vig) { opacity: 0; transition: opacity .2s; }
.fr-shape .vig { fill: none; stroke: rgba(24, 14, 6, .3); stroke-width: 8; }
.fr-area.st-choice .edge { stroke: rgba(150, 30, 20, .55); stroke-width: 6; }
.fr-area.st-choice .ring { stroke: rgba(255, 246, 220, .6); stroke-width: 2; }
.fr-area.st-current .edge { stroke: rgba(196, 38, 26, .7); stroke-width: 5; }
.fr-area.st-current .ring { stroke: rgba(255, 246, 220, .55); stroke-width: 2; }
@media (hover: hover) {
  .fr-area.live:hover .edge { stroke: rgba(240, 200, 80, .95); stroke-width: 6; }
  .fr-area.live:hover .ring { stroke: #fff6dc; stroke-width: 2.2; }
  .fr-area.live:hover .fr-shape :is(.pic, .vig) { opacity: 1; }
  .fr-area.live.art:hover .fr-lab b { padding: 0 4px; border-radius: 2px; background: rgba(244, 234, 210, .9); box-shadow: 0 0 0 1px rgba(60, 40, 20, .4); }
  .fr-area.live.art:hover .fr-key:not(.way) { opacity: 0; }  /* (on the picture the key cannot be read - the user, 2026-10-28) */
}
:is(.fr-area.live:has(> .fr-btn:focus-visible), .fr-area.open) .edge { stroke: #f0c850; stroke-width: 8; }
:is(.fr-area.live:has(> .fr-btn:focus-visible), .fr-area.open) .ring { stroke: #fff6dc; stroke-width: 2.4; }
:is(.fr-area.live:has(> .fr-btn:focus-visible), .fr-area.open) .fr-shape :is(.pic, .vig) { opacity: 1; }
:is(.fr-area.live:has(> .fr-btn:focus-visible), .fr-area.open).art .fr-lab b { padding: 0 4px; border-radius: 2px; background: rgba(244, 234, 210, .9); box-shadow: 0 0 0 1px rgba(60, 40, 20, .4); }
:is(.fr-area.live:has(> .fr-btn:focus-visible), .fr-area.open).art .fr-key:not(.way) { opacity: 0; }
.fr-lab { position: absolute; left: calc(var(--bx, 0px) + 6px); width: calc(var(--bw, 100%) - 12px); top: var(--lt); display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; pointer-events: none; }
.fr-lab b { max-width: 100%; font: 700 11.5px/1.08 var(--font-d); font-stretch: semi-condensed; letter-spacing: .4px; text-transform: uppercase; color: #24180c;
  text-shadow: 0 0 3px rgba(244, 234, 210, .95), 0 0 2px #f4ead2, 0 0 1px #f4ead2; }
.fr-lab.fog b { color: rgba(70, 52, 30, .6); letter-spacing: 2px; text-shadow: none; }
.fr-ics { display: flex; align-items: center; justify-content: center; gap: 3px; padding: 1px 5px; border-radius: 8px; color: #3a2814; background: rgba(246, 238, 216, .82); box-shadow: 0 0 0 1px rgba(60, 40, 20, .35); }
.fr-ics :is(.fr-i, .ri) { width: 11px; height: 11px; }
.fr-key { position: absolute; left: calc(var(--bx, 0px) + var(--bw, 100%) / 2); top: calc(var(--by, 0px) + 3px); transform: translateX(-50%); font: 700 9px Consolas, monospace; font-style: normal; color: rgba(50, 35, 18, .8); text-shadow: 0 0 2px #efe4c8; pointer-events: none; }
.fr-area.st-fog .fr-key { display: none; }
/* a choice's way left to Kwatera beside its key ("S3b · do Kwatery 2–4" - F5: the routes' lengths at a glance) */
.fr-key.way { top: calc(var(--by, 0px) + 1px); padding: 1px 6px; border-radius: 8px; color: #3a2814; white-space: nowrap; background: rgba(246, 238, 216, .88); box-shadow: 0 0 0 1px rgba(60, 40, 20, .4); text-shadow: none; }
.fr-key.way span { font: 700 9.5px var(--font-d); letter-spacing: .5px; text-transform: uppercase; }
.fr-area.st-skipped .fr-lab { opacity: .55; }
.fr-pin { position: absolute; width: 22px; height: 32px; margin: -32px 0 0 -11px; pointer-events: none; animation: fr-bob 1.7s ease-in-out infinite; }
.fr-pin::before { content: ''; position: absolute; left: 10px; top: 17px; width: 2px; height: 15px; background: linear-gradient(90deg, #eee, #777); }
.fr-pin::after { content: '?'; position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; color: #fff; font: 700 14px/22px var(--font-d); text-align: center;
  background: radial-gradient(circle at 35% 30%, #ff9a80, #c8281a 58%, #7a120a); box-shadow: 0 2px 3px rgba(0, 0, 0, .5); }
@keyframes fr-bob { 50% { transform: translateY(-4px); } }
.fr-shape .pls { fill: none; stroke: rgba(206, 44, 28, .85); stroke-width: 3; vector-effect: non-scaling-stroke; transform-box: fill-box; transform-origin: 50% 50%; animation: fr-pulse 1.9s ease-out infinite; }
.fr-shape .pls.soft { stroke: rgba(240, 200, 80, .85); }
@keyframes fr-pulse { 0% { opacity: .9; transform: scale(.98); } 100% { opacity: 0; transform: scale(1.13); } }
.fr-flag { --fc: var(--gold); position: absolute; width: 20px; height: 28px; margin: -28px 0 0 -1px; pointer-events: none; filter: drop-shadow(1px 2px 1px rgba(40, 24, 8, .5)); }
.fr-flag::before { content: ''; position: absolute; left: 0; top: 0; width: 2px; height: 28px; background: #3a2a1a; }
.fr-flag::after { content: ''; position: absolute; left: 2px; top: 1px; width: 18px; height: 13px; background: linear-gradient(var(--fc), color-mix(in srgb, var(--fc) 65%, #000)); clip-path: polygon(0 0, 100% 12%, 76% 50%, 100% 88%, 0 100%); }
.fr-flag.pre { opacity: 0; }
.fr-flag.new { animation: fr-plant .5s ease-out both; }
@keyframes fr-plant { from { opacity: 0; transform: translateY(-16px); } }
.fr-stamp { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 3px 8px 2px; border: 3px double rgba(176, 30, 22, .9); border-radius: 3px; color: rgba(176, 30, 22, .95);
  background: rgba(246, 236, 214, .88); box-shadow: 0 1px 3px rgba(40, 20, 8, .35); transform: translate(-50%, -50%) rotate(var(--rot)); pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='40'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' seed='4'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='table' tableValues='0 .2 1 1 1 1'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") 0 0 / 90px 40px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='40'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' seed='4'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='table' tableValues='0 .2 1 1 1 1'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") 0 0 / 90px 40px; }
.fr-stamp b { font: 800 13px/1 var(--font-d); letter-spacing: 2.5px; text-transform: uppercase; }
.fr-stamp small { font: 700 8.5px/1.15 Consolas, monospace; letter-spacing: .3px; white-space: nowrap; }
.fr-stamp.pre { opacity: 0; }
.fr-stamp.new { animation: fr-stamp .4s cubic-bezier(.3, 1.6, .6, 1) both; }
@keyframes fr-stamp { from { opacity: 0; transform: translate(-50%, -50%) rotate(var(--rot)) scale(2.3); } 60% { opacity: 1; } }
.fr-ribbon { position: absolute; padding: 2px 16px; color: #ede6d6; font: 700 10px var(--font-d); letter-spacing: 2px; text-transform: uppercase; white-space: nowrap; pointer-events: none;
  background: linear-gradient(#2c2824, #0b0a09); box-shadow: 0 2px 4px rgba(0, 0, 0, .5); transform: rotate(-14deg); clip-path: polygon(7px 0, 100% 0, calc(100% - 7px) 100%, 0 100%); }
.fr-hq { --fc: var(--gold); position: absolute; display: flex; flex-direction: column; align-items: center; gap: 3px; transform: translate(-50%, -50%); }
.fr-hq .emb { position: relative; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: radial-gradient(circle, #f2e7cc, #d4c49b);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--fc) 75%, #000), 0 0 0 4px rgba(244, 234, 210, .6), 0 3px 8px rgba(40, 24, 8, .5); }
.fr-hq .emb img { width: 48px; height: 48px; }
.fr-hq small { max-width: 72px; font: 700 8.5px/1.15 var(--font-d); letter-spacing: 1.2px; text-transform: uppercase; text-align: center; color: #3a2814; text-shadow: 0 0 2px #efe4c8; }
.fr-hq .fr-boss { position: absolute; bottom: calc(100% + 2px); left: 50%; width: 92px; margin-left: -46px; opacity: .62; pointer-events: none; }
.fr-hq .fr-boss:not([src]) { visibility: hidden; }
.fr-hq.wake .fr-boss { opacity: .95; filter: drop-shadow(0 0 4px rgba(220, 40, 20, .85)); animation: fr-wake 2.6s ease-in-out infinite; }
@keyframes fr-wake { 50% { transform: translateY(-3px) scale(1.05); } }
.fr-hq.fallen .emb::after { content: ''; position: absolute; inset: -6px; background: linear-gradient(45deg, transparent 45%, rgba(190, 30, 20, .9) 45% 55%, transparent 55%), linear-gradient(-45deg, transparent 45%, rgba(190, 30, 20, .9) 45% 55%, transparent 55%); }
.fr-cart { position: absolute; display: flex; flex-direction: column; gap: 1px; width: 94px; padding: 4px 6px 5px; color: #3a2814; pointer-events: none;
  border: 1px solid rgba(60, 40, 20, .7); outline: 1px solid rgba(60, 40, 20, .35); outline-offset: 2px; background: rgba(240, 230, 205, .84); }
.fr-cart b { font: 700 8.5px var(--font-d); letter-spacing: 1.4px; text-transform: uppercase; }
.fr-cart span { font: 700 10px Consolas, monospace; }
.fr-cart .fr-scale { height: 4px; margin: 2px 0 1px; border: 1px solid #3a2814; background: repeating-linear-gradient(90deg, #3a2814 0 10px, transparent 10px 20px); }
.fr-cart small { font: 600 7.5px var(--font-d); letter-spacing: .5px; }
.fr-line { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.fr-line .halo { fill: none; stroke: rgba(244, 236, 214, .75); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.fr-line .ln { fill: none; stroke: #c4261a; stroke-width: 3.4; stroke-dasharray: 12 7; stroke-linecap: round; stroke-linejoin: round; }
.fr-line .fwd { fill: color-mix(in srgb, var(--fc) 85%, transparent); stroke: rgba(40, 20, 10, .8); stroke-width: 1.2; stroke-linejoin: round; }
.fr-line .back { fill: rgba(44, 40, 36, .72); stroke: rgba(20, 16, 12, .85); stroke-width: 1; stroke-linejoin: round; }

/* a sector's card beside its area (the area grown into it), with the card's own action */
.fr-card { position: absolute; z-index: 3; display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid #000; border-radius: 5px;
  background: linear-gradient(#1d2024, #0f1013); box-shadow: 0 0 0 1px #4a5057, 0 14px 32px rgba(0, 0, 0, .75); animation: fr-card .16s ease-out; }
.fr-card[hidden] { display: none; }
/* the sector's picture instead of the grey (ui/front_art.js; the user, 2026-10-28) - darkened where the text stands */
.fr-card.art { background: linear-gradient(rgba(12, 13, 15, .18), rgba(12, 13, 15, .55) 45%, rgba(12, 13, 15, .84)), var(--fr-art) center / cover no-repeat, #0f1013; }
.fr-card.art :is(.fr-card-txt, .fr-card-pic small) { text-shadow: 0 1px 2px #000, 0 0 6px rgba(0, 0, 0, .8); }
@keyframes fr-card { from { opacity: 0; transform: scale(.94); } }
.fr-card-in { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 12px; }
.fr-card-pic { display: flex; flex-direction: column; gap: 4px; }
.fr-card-map { width: 132px; height: 132px; border: 3px solid #efe6cf; box-shadow: 0 0 0 1px #000; image-rendering: pixelated; }
.fr-card-pic small { font-size: 11px; color: var(--t3); }
.fr-card-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fr-card-txt h3 { margin: 0; font: 700 17px var(--font-d); letter-spacing: 1.2px; text-transform: uppercase; color: var(--t1); }
.fr-card dl { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 5px 10px; margin: 3px 0 0; }
.fr-card dt { font: 600 10px var(--font-d); letter-spacing: 1.4px; text-transform: uppercase; color: var(--gold); }
.fr-card dd { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; font-size: 12px; line-height: 1.35; color: var(--t2); }
.fr-card dd.goal { flex-wrap: nowrap; align-items: flex-start; gap: 6px; }
.fr-card dd.goal .fr-i { margin-top: 2px; color: var(--gold); }
.fr-chip { --cc: rgba(255, 255, 255, .2); display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 10px; font-size: 11.5px; color: var(--t2);
  background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--cc); }
.fr-chip.mod { --cc: rgba(255, 106, 85, .5); color: #ffb3a6; }
.fr-chip.rw { color: #f3e6c2; }
.fr-chip.rw .fr-i { color: var(--cc); }

/* over the map: the order pick (three cards dealt) and the run's end (a big stamp, the sectors' results) */
.fr-over { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; padding: 12px; overflow-y: auto; background: radial-gradient(ellipse at 50% 50%, rgba(10, 8, 6, .5), rgba(10, 8, 6, .84)); animation: fr-fade .3s ease-out; }
.fr-over[hidden] { display: none; }
.fr-over.out { animation: fr-out .55s ease-in both; }
@keyframes fr-fade { from { opacity: 0; } }
@keyframes fr-out { to { opacity: 0; } }
.fr-pick { display: flex; flex-direction: column; align-items: center; gap: 12px; width: min(880px, 100%); }
.fr-pick header { text-align: center; }
.fr-pick h3, .fr-seal b { margin: 0; font: 700 20px var(--font-d); letter-spacing: 2.5px; text-transform: uppercase; color: #f0dca0; text-shadow: 0 2px 0 #000; }
.fr-pick header p { margin: 3px 0 0; font-size: 12px; color: var(--t3); }
.fr-orders { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: 100%; }
.fr-orders.n2 { grid-template-columns: repeat(2, minmax(0, 280px)); justify-content: center; }
.fr-orders.n1 { grid-template-columns: minmax(0, 300px); justify-content: center; }
.fr-ord { --cc: var(--gold); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 12px 12px; border: 1px solid #000; border-radius: 5px; text-align: center;
  background: radial-gradient(ellipse at 50% 0, color-mix(in srgb, var(--cc) 20%, transparent), transparent 60%), linear-gradient(#211f1a, #110f0a);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--cc) 70%, #000), 0 12px 24px rgba(0, 0, 0, .6); animation: fr-deal .45s cubic-bezier(.2, 1.3, .5, 1) both; }
.fr-ord.fac { --cc: var(--fc); }
.fr-ord:nth-child(2) { animation-delay: .09s; }
.fr-ord:nth-child(3) { animation-delay: .18s; }
@keyframes fr-deal { from { opacity: 0; transform: translateY(34px) rotate(-3deg); } }
.fr-ord > .fr-oi { width: 50px; height: 50px; border-radius: 50%; }
.fr-ord > .fr-oi .fr-i { width: 26px; height: 26px; }
.fr-ord .cap { color: var(--cc); }
.fr-ord h4 { margin: 0; font: 700 15px var(--font-d); letter-spacing: 1.2px; text-transform: uppercase; color: var(--t1); }
.fr-ord .val { font: 700 18px var(--font-d); letter-spacing: .5px; color: color-mix(in srgb, var(--cc) 75%, #fff); }
.fr-ord .desc { flex: 1; margin: 0; font-size: 12px; line-height: 1.4; color: var(--t2); }
.fr-ord .ab { width: 100%; margin-top: 6px; }
.fr-over.out .fr-ord:not(.taken) { opacity: .25; transition: opacity .2s; }
.fr-ord.taken { animation: fr-take .55s ease-in both; }
@keyframes fr-take { 40% { transform: scale(1.05); box-shadow: 0 0 0 2px var(--cc), 0 0 30px color-mix(in srgb, var(--cc) 60%, transparent); } to { transform: scale(.9) translateY(-20px); opacity: 0; } }
.fr-sum { display: flex; flex-direction: column; align-items: center; gap: 8px; width: min(780px, 100%); padding: 16px 18px; border: 1px solid #000; border-radius: 5px;
  background: linear-gradient(#1d1b17, #0f0e0b); box-shadow: 0 0 0 1px #5a4a2a, 0 14px 30px rgba(0, 0, 0, .7); }
.fr-seal { display: flex; flex-direction: column; align-items: center; padding: 6px 22px 5px; border: 4px double currentColor; border-radius: 4px; color: #e6b84a; transform: rotate(-4deg); animation: fr-seal .5s cubic-bezier(.3, 1.6, .6, 1) both; }
.fr-sum.lost .fr-seal { color: #e0402e; }
.fr-seal b { color: inherit; font-size: 28px; letter-spacing: 5px; }
.fr-seal small { font: 700 11px Consolas, monospace; letter-spacing: 1px; }
@keyframes fr-seal { from { opacity: 0; transform: rotate(-4deg) scale(2); } }
.fr-sum .sub { margin: 2px 0 0; font-size: 12.5px; color: var(--t2); text-align: center; }
.fr-res-w { width: 100%; max-height: 320px; overflow-y: auto; }
.fs-cols .sk-opts > .cap:not(:first-child) { margin-top: 4px; }
.fr-res { width: 100%; border-collapse: collapse; font-size: 12px; color: var(--t2); }
.fr-res td { padding: 4px 6px; border-bottom: 1px solid rgba(255, 255, 255, .06); vertical-align: middle; }
.fr-res td small { display: flex; align-items: center; gap: 4px; font-size: 10.5px; color: var(--t3); }
.fr-res .k { font: 700 11px Consolas, monospace; color: var(--gold); }
.fr-res .n { font: 600 12px Consolas, monospace; text-align: right; white-space: nowrap; }
.fr-res .o { white-space: nowrap; }
.fr-res .o .fr-oi { display: inline-grid; width: 20px; height: 20px; margin-right: 5px; vertical-align: middle; }
.fr-res .s { font: 600 10.5px var(--font-d); letter-spacing: 1.2px; text-align: right; text-transform: uppercase; }
.fr-res tr.won .s { color: #9fd06a; }
.fr-res tr.lost .s { color: #ff8a75; }
.fr-sum .tot { margin: 2px 0 0; font: 600 12px var(--font-d); letter-spacing: .6px; color: var(--t1); }
.fr-sum .best { margin: 0; font: 700 12px var(--font-d); color: var(--gold); }

/* small screens: the header's sentence on one line, the card narrower, the orders' text shorter; a portrait window: the staff bar wraps */
@media (max-height: 700px) {
  .fr-staff { gap: 8px; padding: 10px 14px 14px; }
  .fr-staff > .ph { padding-bottom: 6px; }
  .fr-staff .ph h2 { font-size: 18px; }
  .fr-staff .ph p { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .fr-vs img { width: 30px; height: 30px; }
  .fr-card-in { grid-template-columns: 96px minmax(0, 1fr); }
  .fr-card-map { width: 96px; height: 96px; }
  .fr-ord { padding: 10px 10px 10px; }
  .fr-ord > .fr-oi { width: 40px; height: 40px; }
  .fr-ord .desc { font-size: 11.5px; line-height: 1.3; }
  .fr-res-w { max-height: 150px; }
}
@media (max-width: 760px) {
  .fr-staff .foot-row { flex-wrap: wrap; }
  .fr-orders { grid-template-columns: minmax(0, 1fr); }
}
