/* The menu's option screens (step 29 E5, docs/SERIES_PLAN.md - kept out of menu.css for the < 500 lines rule): Potyczka
   (src/ui/skirmish.js), Ustawienia (ui/settings.js - in the menu and over the battle), the window of the keys and the
   mouse (ui/help.js), the commander's language model (ui/commander_ui.js). The shared widgets (.ph, .foot, .card, .tg,
   the slider, .ib, .empty): widgets.css - loaded before this file. */

/* ---------------- Potyczka: the faction card | the battle's and the map's options three to a row, the switches |
   the map preview drawn 1:1 (192 canvas px on 192 CSS px - every map pixel the same size) with the seed and the dice */
.sk-cols { display: grid; grid-template-columns: 184px minmax(0, 1fr) 192px; gap: 16px; }
.sk-side { display: flex; flex-direction: column; gap: 6px; }
.sk-opts { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.sk-opts .grid + .cap { margin-top: 5px; }
.grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px; }
/* (the columns as wide as their longest choices, measured: the mode "Oblężenie (fale wrogów)" and the size "Bardzo duża
   (104×104)" | the tempo and the map type | the speed "×0,5 – bardzo wolno" and the layout "Zamarznięte jeziora") */
.sk-opts .grid.g3 { grid-template-columns: minmax(0, 178fr) minmax(0, 120fr) minmax(0, 157fr); align-items: end; }
.sk-opts .grid label { letter-spacing: 1.2px; }  /* ("TEMPO ROZGRYWKI" on one line in the middle column) */
.sk-opts .dd { padding-right: 26px; }
.chips + .chips { margin-top: 0; }
/* (the battle's row: the guardian, the tempo, the speed - the line about the guardian under it, the whole row wide; the
   siege moved to the "Tryby" tab in step 31) */
.sk-note { grid-column: 1 / -1; align-self: end; margin: 0 0 1px; font-size: 11.5px; line-height: 1.35; color: var(--t3); }
.sk-note[hidden] { display: none; }
#lbl-guardian .dd { font-size: 12px; }  /* (the longest guardian, "House of the White Heron", whole in its column - E5 check) */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; }
.chips label.check { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 7px; border: 1px solid #3a4047; border-radius: 14px; cursor: pointer;
  background: linear-gradient(#141619, #0e0f12); font: 600 11px var(--font-d); letter-spacing: 1.1px; text-transform: uppercase; color: var(--t3); transition: border-color .12s, color .12s; }
@media (hover: hover) { .chips label.check:hover { border-color: var(--metal-hi); color: #d4cfc2; } }
.chips label.check:has(input:checked) { border-color: rgba(240, 200, 80, .5); color: #f0dca0; background: linear-gradient(#2a2416, #161208); }
.chips input { width: 14px; height: 14px; margin: 0; accent-color: var(--gold); }
.sk-map { display: flex; flex-direction: column; gap: 6px; }
#sk-preview, .sg-preview { width: 192px; height: 192px; image-rendering: pixelated; border: 1px solid #3a3f46; border-radius: 3px; background: #0c0d0f; box-shadow: inset 0 0 12px #000; }
.sk-map-cap { margin: 0; font-size: 11px; line-height: 1.35; color: var(--t3); }
.sk-map-cap .nv { display: block; color: var(--t2); }  /* the "Navy" verdict of the map, a line of its own (ui/skirmish.js - step 30) */
.sk-map-cap .nv.ok { color: #8fd0ff; }
.sk-seed { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; font: 600 11px var(--font-d); letter-spacing: 1.6px; text-transform: uppercase; color: var(--t3); }
.sk-seed .row { gap: 6px; }
.sk-seed input { min-width: 0; }
:is(#faction-current, .sg-faction) { --fc: var(--gold); flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 16px 12px 12px;
  text-align: center; border: 1px solid color-mix(in srgb, var(--fc) 60%, #000); border-radius: 5px; letter-spacing: 0;
  background: radial-gradient(ellipse at 50% 30%, color-mix(in srgb, var(--fc) 26%, transparent), transparent 70%), linear-gradient(#1a1b1f, #0d0e10);
  box-shadow: 0 0 16px color-mix(in srgb, var(--fc) 22%, transparent), inset 0 1px 0 rgba(255, 255, 255, .07); }
@media (hover: hover) { :is(#faction-current, .sg-faction):hover { border-color: var(--fc); background: radial-gradient(ellipse at 50% 30%, color-mix(in srgb, var(--fc) 36%, transparent), transparent 72%), linear-gradient(#1e1f24, #0f1012);
  box-shadow: 0 0 22px color-mix(in srgb, var(--fc) 38%, transparent), inset 0 1px 0 rgba(255, 255, 255, .09); } }
:is(#faction-current, .sg-faction) .emb { display: grid; place-items: center; width: 104px; height: 104px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--fc) 30%, transparent), transparent 68%); }
:is(#faction-current, .sg-faction) img { width: 84px; height: 84px; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .7)); transition: transform .2s; }
@media (hover: hover) { :is(#faction-current, .sg-faction):hover img { transform: scale(1.06); } }
:is(#faction-current, .sg-faction) b { font: 700 20px var(--font-d); font-stretch: semi-condensed; letter-spacing: 1.5px; text-transform: uppercase; color: #f3efe6; }
:is(#faction-current, .sg-faction) small { color: var(--t3); font-size: 12px; font-weight: 400; line-height: 1.3; }
:is(#faction-current, .sg-faction) .chg { margin-top: 6px; 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) { :is(#faction-current, .sg-faction):hover .chg { background: rgba(240, 200, 80, .12); } }
/* the participants (a folding section like the room's slots) */
.sk-sec { border-top: 1px solid var(--line); padding-top: 8px; }
.sk-sec > summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 8px; font: 600 11px var(--font-d);
  letter-spacing: 1.6px; text-transform: uppercase; color: var(--t3); }
.sk-sec > summary::-webkit-details-marker { display: none; }
.sk-sec > summary::before { content: ''; width: 6px; height: 6px; border: solid var(--gold); border-width: 0 2px 2px 0; transform: rotate(-45deg);
  transition: transform .15s; align-self: center; }
.sk-sec[open] > summary::before { transform: rotate(45deg); }
.sk-sum { text-transform: none; letter-spacing: 0; font: 400 11px "Segoe UI", sans-serif; color: var(--t3); }
.sk-bar { display: flex; gap: 0; margin: 8px 0 6px; border-radius: 3px; box-shadow: 0 0 0 1px #000; width: max-content; }
.sk-bar button { padding: 4px 12px; font-size: 11.5px; border-radius: 0; }
.sk-bar button:first-child { border-radius: 3px 0 0 3px; }
.sk-bar button:last-child { border-radius: 0 3px 3px 0; }
.sk-bar[hidden] { display: none; }
#sk-players { width: 100%; border-collapse: collapse; }
#sk-players th { padding: 2px 6px 4px; text-align: left; font: 600 10px var(--font-d); letter-spacing: 1.5px; text-transform: uppercase; color: var(--t4); }
#sk-players td { padding: 3px 4px; border-top: 1px solid #22262b; vertical-align: middle; }
#sk-players td:nth-child(1) { width: 34%; }
#sk-players td:nth-child(2) { width: 30%; }
#sk-players td:nth-child(3) { width: 16%; }
#sk-players td:nth-child(5) { width: 36px; text-align: right; }
#sk-players td:first-child { white-space: nowrap; }
#sk-players .sw { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border: 1px solid #000; border-radius: 2px; vertical-align: middle; }
#sk-players .sw + .dd { display: inline-block; width: calc(100% - 20px); vertical-align: middle; }
#sk-players .dd { padding-top: 5px; padding-bottom: 5px; font-size: 12.5px; }
#sk-players .sk-me b { color: var(--gold); }
#sk-players .sk-me small { color: var(--t3); }
#sk-add { margin-top: 6px; padding: 5px 12px; font-size: 12px; }
/* (the start: the action bar's main plate alone in its dock - widgets.css .ab.solo, docs/NAVIGATION.md) */

/* ---------------- Ustawienia: the header, the sub-tabs down the left like the rail (an icon, a name, a line), the rows over
   the rest of the window's height (their list keeps its place while a key is set - settings.js), a question before the
   page is loaded anew, a refused key's line, the footer */
#screen-settings > .panel { width: min(960px, calc(100vw - 32px)); }
.set-body { display: grid; grid-template-columns: 212px minmax(0, 1fr); gap: 16px; align-items: start; }
.set-tabs { display: flex; flex-direction: column; gap: 4px; }
.set-tabs button { display: grid; grid-template-columns: 22px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; min-height: 52px; padding: 8px 10px;
  text-align: left; letter-spacing: 0; border-color: transparent; border-radius: 4px; background: transparent; box-shadow: none; }
.set-tabs button::before { content: ''; grid-row: 1 / 3; width: 20px; height: 20px; background: #a8a194; -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
.set-tabs button span { font: 700 13.5px var(--font-d); font-stretch: semi-condensed; letter-spacing: 2px; text-transform: uppercase; color: #ece8df; }
.set-tabs button small { font: 11px/1.25 "Segoe UI", Tahoma, sans-serif; color: var(--t3); }
@media (hover: hover) { .set-tabs button:hover { background: linear-gradient(90deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); transform: none; } }
@media (hover: hover) { .set-tabs button:hover::before { background: #f0c850; } }
.set-tabs button.on { background: linear-gradient(90deg, #a23e2d, #5c1c14); border-color: #250705;
  box-shadow: inset 4px 0 0 #f0c850, inset 0 1px 0 rgba(255, 190, 170, .28), 0 0 12px rgba(216, 58, 44, .4); }
@media (hover: hover) { .set-tabs button.on:hover { background: linear-gradient(90deg, #a23e2d, #5c1c14); border-color: #250705;
  box-shadow: inset 4px 0 0 #f0c850, inset 0 1px 0 rgba(255, 190, 170, .28), 0 0 12px rgba(216, 58, 44, .4); } }
.set-tabs button.on::before { background: #fff; }
.set-tabs button.on span { color: #fff; }
.set-tabs button.on small { color: #f3cdc2; }
.st-sound { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 9h4.5L12 4.5v15L6.5 15H2zm13.3-1.7 1.4-1.4a8.5 8.5 0 0 1 0 12.2l-1.4-1.4a6.5 6.5 0 0 0 0-9.4zm2.9-2.9 1.4-1.4a12.5 12.5 0 0 1 0 18l-1.4-1.4a10.5 10.5 0 0 0 0-15.2z'/%3E%3C/svg%3E"); }
.st-gfx { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M1 3h22v15H1zm2 2v11h18V5zm5 15h8v2H8z'/%3E%3Cpath d='M4.5 14.5l4.5-6 3.5 4.2 2.2-2.6 4.8 4.4z'/%3E%3C/svg%3E"); }
.st-play { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 5h20v2H2zm0 6h20v2H2zm0 6h20v2H2z'/%3E%3Ccircle cx='8' cy='6' r='2.8'/%3E%3Ccircle cx='16' cy='12' r='2.8'/%3E%3Ccircle cx='10' cy='18' r='2.8'/%3E%3C/svg%3E"); }
.st-ctrl { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 1.5a6.5 6.5 0 0 0-6.5 6.5v8a6.5 6.5 0 0 0 13 0V8A6.5 6.5 0 0 0 12 1.5zm-4.5 8V16a4.5 4.5 0 0 0 9 0V9.5zm3.5-5.9A4.5 4.5 0 0 0 7.6 7.5H11zm2 0v3.9h3.4A4.5 4.5 0 0 0 13 3.6z'/%3E%3C/svg%3E"); }
.set-rows { display: flex; flex-direction: column; gap: 2px; max-height: max(300px, calc(100vh - 300px)); overflow-y: auto; padding-right: 4px; overscroll-behavior: contain; }
#screen-settings .set-rows { max-height: max(300px, calc(100vh - 280px)); }  /* (over the battle: no menu head above it; its action bar under the rows) */
.set-rows > .set-cap { padding: 12px 10px 2px; }  /* (a group's caption: Sterowanie's Dotyk / Gładzik / Mysz i rozkazy / Klawisze - step 29 E6c) */
.set-row { display: grid; grid-template-columns: 1fr 230px; align-items: center; gap: 16px; padding: 7px 10px; border-radius: 3px; cursor: pointer;
  background: linear-gradient(90deg, rgba(255, 255, 255, .03), transparent); }
@media (hover: hover) { .set-row:hover { background: linear-gradient(90deg, rgba(240, 200, 80, .07), transparent); } }
.set-row.preset { margin-bottom: 6px; border: 1px solid rgba(216, 58, 44, .4); background: linear-gradient(90deg, rgba(216, 58, 44, .16), transparent); }
.set-txt b { display: block; font: 600 13.5px var(--font-d); letter-spacing: .4px; color: var(--t1); }
.set-txt small { display: block; margin-top: 2px; font-size: 11px; line-height: 1.3; color: var(--t3); }
.set-ctl { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.set-ctl .dd { width: 100%; }
.set-ctl input[type=range] { flex: 1; min-width: 0; }
.set-val { width: 40px; text-align: right; font: 600 12px Consolas, monospace; color: var(--gold); }
.set-key { min-width: 44px; font: 600 12px Consolas, monospace; }
.set-key.on { color: #fff; }
/* (a change of the graphics style or detail in the menu: the page loads anew only when asked - settings.js) */
.set-ask { display: flex; align-items: center; gap: 14px; padding: 9px 12px; border: 1px solid rgba(240, 200, 80, .45); border-radius: 4px;
  background: linear-gradient(90deg, rgba(240, 200, 80, .12), rgba(240, 200, 80, .02)); }
.set-ask[hidden], .set-msg[hidden] { display: none; }
.set-ask p { flex: 1; margin: 0; color: var(--t2); font-size: 12.5px; line-height: 1.4; }
.set-ask button { flex: none; padding: 7px 16px; }

/* ---------------- the window of the keys and the mouse (the rail's foot; ui/help.js): a search field in the header, five
   groups in two columns, each row its keys as chips | what they do */
#keys-modal { align-items: flex-start; }  /* (at the top: the window does not jump while a search shortens it) */
#keys-modal .modal-box { width: min(1080px, 100%); }
.ph-tools { display: flex; align-items: center; gap: 10px; }
#keys-find { width: min(280px, 40vw); }
.keys-grid { columns: 2 400px; column-gap: 28px; }
.keys-grid section { break-inside: avoid; margin: 0 0 14px; }
.keys-grid section[hidden] { display: none; }
.keys-grid .cap { padding-bottom: 5px; margin-bottom: 2px; border-bottom: 1px solid var(--line); color: var(--gold); }
.keys-grid .empty { column-span: all; }
:is(div, p).empty[hidden] { display: none; }
.kr { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 12px; padding: 5px 2px; border-bottom: 1px solid rgba(255, 255, 255, .04);
  color: var(--t2); font-size: 12.5px; line-height: 1.45; break-inside: avoid; }
.kr[hidden] { display: none; }
.kr > span:first-child { display: flex; flex-wrap: wrap; align-content: start; gap: 3px; }
.kr kbd { display: inline-block; max-width: 100%; padding: 0 5px; border: 1px solid #454b52; border-bottom-width: 2px; border-radius: 3px; background: #16181b;
  color: var(--gold); font: 600 11px/1.55 Consolas, monospace; }

/* ---------------- the commander's language model (src/ui/commander_ui.js) - a window from the rail's foot: the ladder of
   variants as cards to choose (the radio inside each), the switches, the footer */
.cmdr #cmdr-box { display: flex; flex-direction: column; gap: 10px; }
.cmdr:has(#cmdr-consent:not([hidden])) > .ab-dock { display: none; }  /* (while the consent asks, its bar [Anuluj | Pobierz…] is the window's only way on and back - docs/NAVIGATION.md 2.4) */
.cmdr #cmdr-box > details > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; color: var(--gold); }
.cmdr #cmdr-box > details > summary::-webkit-details-marker { display: none; }
.cmdr #cmdr-box > details > summary::before { content: ''; width: 6px; height: 6px; border: solid var(--gold); border-width: 0 2px 2px 0; transform: rotate(-45deg); transition: transform .15s; }
.cmdr #cmdr-box > details[open] > summary::before { transform: rotate(45deg); }
.cmdr label.row { flex-direction: row; justify-content: flex-start; align-items: center; gap: 10px; }
.cmdr .dd { flex: 1; min-width: 0; }
.cmdr ul { margin: 4px 0 8px; padding-left: 18px; color: var(--t2); font-size: 12px; }
.cmdr details > * + * { margin-top: 8px; }
.cmdr .bar { width: 100%; }
.cmdr .bar .fill { height: 100%; width: 0; background: var(--accent); transition: width .15s; }
.cmdr-ladder { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cmdr .rung { --cc: var(--gold); gap: 3px; padding: 10px 12px 11px; }  /* (gold when chosen - not the campaign's colour the menu carries) */
.cmdr .rung input { position: absolute; opacity: 0; pointer-events: none; }
.cmdr .rung:has(input:focus-visible) { outline: 1px solid var(--gold); outline-offset: 2px; }
.rg-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.rg-head b { font: 700 24px/1 var(--font-d); font-stretch: semi-condensed; letter-spacing: 1px; color: var(--t1); }
.rg-head em { padding: 1px 7px; border: 1px solid rgba(240, 200, 80, .45); border-radius: 9px; font: normal 600 9.5px var(--font-d); letter-spacing: 1.4px; text-transform: uppercase; color: var(--gold); }
.rg-name { font: 700 13px var(--font-d); letter-spacing: 1.6px; text-transform: uppercase; color: #ece8df; }
.cmdr .rung small { color: var(--t4); font: 10.5px Consolas, monospace; overflow-wrap: anywhere; }
.cmdr .rung dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 6px 0 0; padding-top: 6px; border-top: 1px solid var(--line); font-size: 11.5px; }
.cmdr .rung dt { color: var(--t3); }
.cmdr .rung dd { margin: 0; text-align: right; color: var(--t2); font: 600 11.5px Consolas, monospace; }
.cmdr .warn { color: #d08a5a; }
.cmdr textarea { width: 100%; box-sizing: border-box; font: 11px Consolas, monospace; background: #15120e; color: #cfc8bb; border: 1px solid #3a342c; resize: vertical; }

/* ---------------- Tryby (step 31 F0 - src/ui/modes_tab.js, ui/siege_setup.js): the modes as cards in the campaign
   carousel's look - the icon (a mask in --ico, faint and large behind the card too), the name, two sentences, the best
   result, the way in; a mode still to come greyed with "wkrótce"; a mode's own window in the panel's second state */
.i-siege { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 22V10h3v2h2V10h3v3h4v-3h3v2h2V10h3v12h-8v-5a2 2 0 0 0-4 0v5zM11 2h1.6v1.2H16l-1.2 1.6L16 6.4h-3.4V8H11z'/%3E%3C/svg%3E"); }
.i-raid { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 3a9 9 0 1 0 9 9h-2.2A6.8 6.8 0 1 1 12 5.2zm0 5a4 4 0 1 0 4 4h-2.2A1.8 1.8 0 1 1 12 10.2z'/%3E%3Cpath d='M13.5 2H22v8.5l-3-3-5.6 5.6-2-2L17 5.5z'/%3E%3C/svg%3E"); }
.i-zone { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 1.5a10.5 10.5 0 1 0 0 21 10.5 10.5 0 0 0 0-21zm0 2.2a8.3 8.3 0 1 1 0 16.6 8.3 8.3 0 0 1 0-16.6zM12 7a5 5 0 1 0 0 10 5 5 0 0 0 0-10zm0 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"); }
.i-front { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 2h2.2v20H4zM7.6 3H20l-3 4.5 3 4.5H7.6zM2 20h20v2H2z'/%3E%3C/svg%3E"); }
.nv-modes { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 3h8v8H3zm10 0h8v8h-8zM3 13h8v8H3zm10 0h8v8h-8z'/%3E%3C/svg%3E"); }
#panel-modes.md-open > .md-ph, #panel-modes.md-open > .md-list { display: none; }
.md-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }  /* (two to a row, four on a wide screen) */
:is(.overlay, .modal) .card.md-card { overflow: hidden; gap: 9px; padding: 18px 18px 16px; min-height: 236px; }
.md-card::after { content: ''; position: absolute; right: -22px; top: -22px; width: 132px; height: 132px; background: var(--gold); opacity: .05; pointer-events: none;
  -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
.md-ico { flex: none; width: 42px; height: 42px; background: var(--gold); -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
.md-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.md-head h3 { margin: 0; font: 700 21px var(--font-d); font-stretch: semi-condensed; letter-spacing: 3px; text-transform: uppercase; color: var(--t1); text-shadow: 0 2px 0 #000; }
.md-blurb { flex: 1; margin: 0; font-size: 13px; line-height: 1.45; color: var(--t2); }
.md-best { margin: 0; font: 600 11.5px var(--font-d); letter-spacing: 1px; color: var(--gold); }
.md-card.soon .md-ico { background: var(--t4); }
.md-card.soon .md-blurb { color: var(--t3); }
.md-card.soon .md-best { color: var(--t4); font-style: italic; letter-spacing: .3px; }
/* (a mode's window's way back and start: the action bar - ui/siege_setup.js, ui/raid_setup.js; docs/NAVIGATION.md) */
.md-view { display: flex; flex-direction: column; gap: 12px; }
.md-view[hidden] { display: none; }
.sg-pair:empty, .sg-pair[hidden] { display: none; }
.sg-cols .sg-inv { grid-column: span 2; }  /* (the invader's long names - "Mieszany (2 losowe frakcje)" - over two columns) */
/* (the raid's window's squad strip, best result, the squad's window and the raid's HUD: modes.css - step 31 R2) */

/* ---------------- narrower windows */
@media (max-width: 900px) {
  .sk-cols { grid-template-columns: 200px minmax(0, 1fr); }
  .sk-map { grid-column: 1 / -1; display: grid; grid-template-columns: 192px minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: 18px; }
  .sk-map > .cap, .sk-map > canvas { grid-column: 1; }
  .sk-map > canvas { grid-row: 2 / 4; }
  .sk-map > .sk-map-cap, .sk-map > .sk-seed { grid-column: 2; }
}
@media (max-width: 720px) {
  .sk-cols, .set-body, .cmdr-ladder, .grid.g3 { grid-template-columns: 1fr; }
  .sk-note, .sg-cols .sg-inv { grid-column: auto; }
  .set-tabs { flex-direction: row; flex-wrap: wrap; }
  .set-tabs button { flex: 1 1 40%; min-height: 0; }
  .set-tabs button small { display: none; }
  .keys-grid { columns: 1; }
  .kr { grid-template-columns: 1fr; gap: 3px; }
}

/* ---------------- Potyczka: the battle's rules (step 31 Front F1 - ui/skirmish_rules.js): one chip at the end of the
   switches' row, "Reguły" with the number chosen, opens the rules' chips over the screen like a dropdown's list (the
   screen never grows - 960 x 600 with touch); a chip's icon is a mask drawn here (.ri-<rule's icon>) */
.chips .sk-rules-btn { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 4px 25px 4px 11px; border: 1px solid #3a4047; border-radius: 14px;
  background: linear-gradient(#141619, #0e0f12); box-shadow: none; font: 600 11px var(--font-d); letter-spacing: 1.1px; text-transform: uppercase; color: var(--t3); transition: border-color .12s, color .12s; }
.chips .sk-rules-btn::after { content: ''; position: absolute; right: 11px; top: 50%; width: 5px; height: 5px; margin-top: -4px; border: solid var(--gold); border-width: 0 2px 2px 0;
  transform: rotate(45deg); transition: transform .15s, margin .15s; }
.chips .sk-rules-btn.open::after { transform: rotate(-135deg); margin-top: -1px; }
@media (hover: hover) { .chips .sk-rules-btn:hover { border-color: var(--metal-hi); color: #d4cfc2; } }
.chips .sk-rules-btn.on, .chips .sk-rules-btn.open { border-color: rgba(240, 200, 80, .5); color: #f0dca0; background: linear-gradient(#2a2416, #161208); }
.sk-rules-btn .n { min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--gold); color: #1a1408; font: 700 10.5px/16px var(--font-d); letter-spacing: 0; text-align: center; }
body.touch .chips .sk-rules-btn { min-height: 40px; padding: 6px 30px 6px 14px; }
.sk-rules-warn { margin: 1px 0 0; font-size: 11.5px; line-height: 1.35; }
.sk-rules-warn[hidden], .sk-rules-pop[hidden] { display: none; }
.sk-rules-warn + .chips { margin-top: 0; }  /* (the refusal's line sits between the two rows of switches: the rows as close as ever) */
.sk-rules-pop { position: fixed; z-index: 40; padding: 10px 12px 9px; border: 1px solid #000; border-radius: 5px; background: linear-gradient(#1b1e22, #0e0f12);
  box-shadow: 0 0 0 1px #4a5057, 0 12px 28px rgba(0, 0, 0, .8); animation: dd-in .12s ease-out; }
.sk-rules-pop.up { animation-name: dd-up; }
.sk-rules-pop > .cap { margin: 0 0 8px; }
.sk-rules-pop .chips { margin: 0; }
.sk-rules-pop label.check.off { opacity: .45; }
.sk-rules-note { min-height: 2.7em; margin: 7px 0 0; font-size: 11.5px; line-height: 1.35; color: #c9c3b6; }
.sk-rules-note.bad { color: #ff9b86; }
.ri { flex: none; width: 13px; height: 13px; background: currentColor; -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
body.touch .ri { width: 15px; height: 15px; }
.ri-night { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M10.6 1.2A7 7 0 1 0 14.8 12 5.6 5.6 0 0 1 10.6 1.2z'/%3E%3C/svg%3E"); }
.ri-storm { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 9.5a3.2 3.2 0 0 1 .3-6.4A4.3 4.3 0 0 1 12.4 4 2.8 2.8 0 0 1 12 9.5H10L11 7H8.2l-1.6 4h2.2L7.6 15l4.2-5.5zM2.5 11h2l-1 2.4h-2zm2.6 1.6h2l-.8 2h-2z'/%3E%3C/svg%3E"); }
.ri-frost { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cg%3E%3Crect x='7.1' y='.8' width='1.8' height='14.4'/%3E%3Crect x='7.1' y='.8' width='1.8' height='14.4' transform='rotate(60 8 8)'/%3E%3Crect x='7.1' y='.8' width='1.8' height='14.4' transform='rotate(120 8 8)'/%3E%3Cpath d='M5.6 1.6 8 4l2.4-2.4 1 1L8 6 4.6 2.6zm0 12.8L8 12l2.4 2.4 1-1L8 10l-3.4 3.4z'/%3E%3C/g%3E%3C/svg%3E"); }
.ri-crates { --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='M1 5h14v10H1zm1.6 1.6v6.8h3.6V6.6zm5.2 0v6.8h5.6V6.6zM2 1.5h12L15 4H1z'/%3E%3C/svg%3E"); }
.ri-veterans { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1.5 6.2 8 2l6.5 4.2v2.4L8 4.4 1.5 8.6zm0 5L8 7l6.5 4.2v2.4L8 9.4l-6.5 4.2z'/%3E%3C/svg%3E"); }
.ri-radio { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M7.2 6h1.6v9H7.2zM5 15l2.4-6h1.2L11 15zM4.2 2.2l1.1 1.1a3.8 3.8 0 0 0 0 5.4L4.2 9.8a5.4 5.4 0 0 1 0-7.6zm7.6 0a5.4 5.4 0 0 1 0 7.6l-1.1-1.1a3.8 3.8 0 0 0 0-5.4zM1.3 2.4l1.1-1.1 12.3 12.3-1.1 1.1z'/%3E%3C/svg%3E"); }
.ri-sky { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M7.3 1h1.4l.6 4.6L15 8.8v1.6l-5.7-1.7-.4 3.6 1.9 1.4V15L8 14.2 5.2 15v-1.3l1.9-1.4-.4-3.6L1 10.4V8.8l5.7-3.2zM1.3 2.4l1.1-1.1 12.3 12.3-1.1 1.1z'/%3E%3C/svg%3E"); }
.ri-guardian { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1 4.5 4.6 8 8 2l3.4 6L15 4.5 13.6 13H2.4zM2.6 14h10.8v1.4H2.6z'/%3E%3C/svg%3E"); }
.ri-mist { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1 3.2h10v1.7H1zm3 3.6h11v1.7H4zM1 10.4h11v1.7H1zm4 3.4h9v1.4H5z'/%3E%3C/svg%3E"); }
.ri-fast { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1.5 2.5 7 8l-5.5 5.5V10.8L4.3 8 1.5 5.2zm6.5 0L13.5 8 8 13.5V10.8L10.8 8 8 5.2z'/%3E%3C/svg%3E"); }
.ri-plague { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.6 1.2h1.8l3 13.6H5.6zm4 0h1.8l3 13.6H9.6zm4 0h1.8L15 11h-1.8z'/%3E%3C/svg%3E"); }
.ri-second { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 1.5h1.7V15H2zm1.7.5h10l-2.4 3.2L13.7 8.4h-10z'/%3E%3C/svg%3E"); }
