/* =====================================================================
   UI v14 "Cabin" (2026-11-10): kaptajnens kahyt. Egeplanker med tovkant og
   messingsøm som ramme, tjærede fordybninger til alt der skal læses, sejldug
   med sting som afsnitsmærker, messingplader som hovedknapper.
   Træet er rammen, teksten står aldrig på årer og fuger (undtagen store overskrifter).
   Tilgængelighed forrest: kontrast (tekst mindst 7:1, småtekst mindst 4.5:1), hele
   hjørner (de skrå klippede fokusringen væk), trykflader på mindst 40 px, bred
   fokusring, tilstande der ikke kun vises med farve, valgfri tekststørrelse og ro.

   A. Fælles hjælp (gælder BEGGE udseender): tekststørrelse, rolig tilstand, Esc-rækkerne.
   B. Udseendet "Cabin": ALT under html.cab.

   html.cab / html.txl / html.calm og --uiz sættes af det lille script øverst i index.html
   og skiftes i Esc-menuen og under Display på startskærmen (uiPrefs i 12f-ui-input). localStorage: seaEagleUi
   ("cabin" | "classic"), seaEagleText ("1" | "1.15" | "1.3"), seaEagleCalm ("1" | "0").
   Fortryd: Esc-menu → Display → Classic. Helt væk: slet filen og dens <link>.
   Erstatter 07-chartroom.css (v13) og 07-refit.css (v12).
   ===================================================================== */

/* =============================== A. Fælles hjælp =============================== */

/* A1. Tekststørrelse: de store vinduer og dialogen forstørres som helhed (zoom), så layoutet følger med.
   HUD-panelerne har deres egne hjørnegreb til det samme. */
html.txl body :is(#port, #inventory, #workshop, #armory, #chart, #escMenu, #gameover) > .panel {
  zoom: var(--uiz, 1);
  max-height: calc((100dvh - 64px) / var(--uiz, 1)) !important;
  max-width: calc((100vw - 76px) / var(--uiz, 1)) !important;
}
html.txl body #eventBox { zoom: min(var(--uiz, 1), 1.15); max-width: calc((100vw - 24px) / 1.15) !important; }
html.txl body #help { zoom: var(--uiz, 1); }
html.txl body #menu .mm { zoom: var(--uiz, 1); }
html.txl body #toast, html.txl body #banner { zoom: min(var(--uiz, 1), 1.15); }

/* A1b. Startskærmen: se B8 (.mm ruller selv, når skærmen er lav). */
#menuDisplay { padding: 12px 16px 14px; }

/* A2. Rolig tilstand: pynt der svinger, pulserer og glimter står stille. Skadetal, toasts, banner,
   møntregn og rejseovergangen beholder deres bevægelse (de bærer information eller styres af ure). */
html.calm body *:not(#floaters, #floaters *, #toast, #banner, #banner *, #coinRain, #coinRain *, #fade, #fade *, #showcaseCard, #showcaseCard *),
html.calm body *:not(#floaters, #floaters *, #toast, #banner, #banner *, #coinRain, #coinRain *, #fade, #fade *, #showcaseCard, #showcaseCard *)::before,
html.calm body *:not(#floaters, #floaters *, #toast, #banner, #banner *, #coinRain, #coinRain *, #fade, #fade *, #showcaseCard, #showcaseCard *)::after {
  animation-duration: 0.01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important;
}

/* A3. Esc-menuens indstillinger (Interface / Text size / Motion): rækker med valgknapper */
#escMenu > .panel { max-height: calc(100dvh - 64px); overflow: auto; }
.uiSet { display: grid; gap: 6px; margin: 2px 0; padding: 0; border: 0; min-width: 0; }
.uiSet > legend { padding: 0; margin-bottom: 4px; font: 700 0.74rem var(--body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-l); }
.uiRow { display: grid; grid-template-columns: minmax(84px, auto) 1fr; align-items: center; gap: 10px; }
.uiRow > span { font: 500 0.9rem var(--body); color: var(--paper); }
.uiSet .seg { display: flex; gap: 4px; min-width: 0; }
.uiSet .seg button { flex: 1 1 0; min-width: 0; min-height: 36px; padding: 4px 8px; font: 600 0.84rem var(--body); white-space: nowrap; }
/* valgt: ikke kun farve, også flueben og fed kant */
.uiSet .seg button[aria-pressed="true"] { color: #1a1206 !important; background: #e8c27a !important; box-shadow: inset 0 0 0 2px #fff1c4, 0 0 0 1px #1a0e05 !important; text-shadow: none !important; font-weight: 800; }
.uiSet .seg button[aria-pressed="true"]::before { content: "✓ "; }

/* =============================== B. Cabin =============================== */

/* ---------- B1. Tokens ---------- */
html.cab {
  --cb-ink: #100803;       /* tjære: kanter, skygger */
  --cb-brass: #f0cd78;     /* streger, ikoner, mærker */
  --cb-brass-hi: #fff0c0;
  --cb-brass-d: #b98a3c;
  --cb-cream: #fbf3df;     /* tekst: 16:1 på tjære, 8.5:1 på eg */
  --cb-soft: #e6d8ba;      /* brødtekst: 12:1 på tjære */
  --cb-dim: #c6b48e;       /* småetiketter: 8:1 på tjære, 5:1 på eg */
  --cb-canvas-ink: #2a180a;/* skrift på sejldug: 12:1 */
  --cb-line: rgba(240, 205, 120, 0.3);
  --cb-line-2: rgba(240, 205, 120, 0.55);
  --cb-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --cb-focus: #fff0c0;
  /* snoet tov (vandret og lodret) */
  --cb-rope-x: repeating-linear-gradient(118deg, #f4d992 0 2px, #cfa24c 2px 4.5px, #6e4c1e 4.5px 6px);
  --cb-rope-y: repeating-linear-gradient(28deg, #f4d992 0 2px, #cfa24c 2px 4.5px, #6e4c1e 4.5px 6px);
  /* messingsøm */
  --cb-nail: radial-gradient(circle at 42% 38%, #fff8dc 0 1.2px, #f2cd70 2.4px, #a8782a 4.2px, #3a2208 5.2px, rgba(0, 0, 0, 0.5) 6px, transparent 6.8px);
  /* sejldug: vævet lærred */
  --cb-weave:
    repeating-linear-gradient(0deg, rgba(90, 60, 20, 0.07) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(90, 60, 20, 0.05) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, #efe3c6, #e0d0ac);

  /* de gamle navne peger på det nye, så hele HUD'en følger med */
  --paper: var(--cb-cream);
  --muted: var(--cb-soft);
  --brass: var(--cb-brass);
  --gold-l: var(--cb-brass-hi);

  /* egedæk: brede planker med fuger, stød og årer. Roligere end v11, og teksten står i fordybninger */
  --planks:
    repeating-linear-gradient(180deg, transparent 0 38px, rgba(8, 4, 1, 0.5) 38px 39.5px, rgba(255, 214, 150, 0.07) 39.5px 40.5px),
    repeating-linear-gradient(90deg, transparent 0 236px, rgba(8, 4, 1, 0.26) 236px 237px, transparent 237px 410px),
    repeating-linear-gradient(178.7deg, rgba(255, 226, 172, 0.035) 0 1px, transparent 1px 3px, rgba(0, 0, 0, 0.06) 3px 4px, transparent 4px 9px),
    radial-gradient(ellipse 30px 7px at 71% 22%, rgba(24, 10, 2, 0.26), transparent 70%),
    radial-gradient(ellipse 110% 70% at 50% 0%, rgba(255, 196, 120, 0.1), transparent 60%),
    linear-gradient(172deg, rgba(112, 72, 38, 0.98) 0%, rgba(86, 53, 26, 0.98) 50%, rgba(60, 36, 16, 0.985) 100%);
  /* rammen: tov hele vejen rundt, et messingsøm i hvert hjørne, en tjæret rille indenfor */
  --rope-frame:
    var(--cb-nail) 9px 9px / 14px 14px no-repeat,
    var(--cb-nail) calc(100% - 9px) 9px / 14px 14px no-repeat,
    var(--cb-nail) 9px calc(100% - 9px) / 14px 14px no-repeat,
    var(--cb-nail) calc(100% - 9px) calc(100% - 9px) / 14px 14px no-repeat,
    var(--cb-frame-plain);
  /* samme ramme uden søm: til de små HUD-paneler, hvor sømmene ville ligge oven på indholdet */
  --cb-frame-plain:
    var(--cb-rope-x) top / 100% 6px no-repeat,
    var(--cb-rope-x) bottom / 100% 6px no-repeat,
    var(--cb-rope-y) left / 6px 100% no-repeat,
    var(--cb-rope-y) right / 6px 100% no-repeat,
    linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)) 6px 6px / calc(100% - 12px) 1.5px no-repeat,
    linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)) 6px calc(100% - 6px) / calc(100% - 12px) 1.5px no-repeat,
    linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)) 6px 6px / 1.5px calc(100% - 12px) no-repeat,
    linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)) calc(100% - 6px) 6px / 1.5px calc(100% - 12px) no-repeat;
  --wood-bg: var(--rope-frame), var(--planks);
  --wood-edge: 0 0 0 1.5px var(--cb-ink), inset 0 0 30px rgba(0, 0, 0, 0.32), 0 16px 34px rgba(0, 0, 0, 0.55);
  --hull-edge: 0 0 0 1.5px var(--cb-ink), 0 0 0 2.5px var(--cb-brass-d);
  /* fordybede felter: jævn tjære, ingen årer */
  --slot-bg: linear-gradient(180deg, rgba(20, 11, 5, 0.86), rgba(28, 17, 9, 0.82));
}
html.cab body { color: var(--cb-cream); }
/* små paneler (HUD): tovramme uden hjørnesøm. Tokens genberegnes på elementet, så de gamle regler følger med */
html.cab body .panel:not(:is(#port, #chart, #inventory, #workshop, #armory, #escMenu, #gameover) > .panel) {
  --rope-frame: var(--cb-frame-plain);
  --wood-bg: var(--cb-frame-plain), var(--planks);
}

/* ---------- B2. Fælles: fokus, knapper, rullebjælker, overskrifter ---------- */
/* fokus: bred lys ring med mørk kant udenom, så den ses på både træ, tjære og messing */
html.cab body :is(button, [role="button"], [role="tab"], [role="option"], input, select, a, [tabindex]):focus-visible {
  outline: 3px solid var(--cb-focus) !important; outline-offset: 2px !important;
  box-shadow: 0 0 0 7px rgba(10, 5, 2, 0.88) !important; z-index: 3;
}
/* på pergament (dialogen) er ringen mørk */
html.cab body #eventBox :is(button, input, [tabindex]):focus-visible { outline-color: #5a1408 !important; box-shadow: 0 0 0 7px rgba(255, 248, 226, 0.9) !important; }

/* knapper: tjæret egeplade med messingkant; hele hjørner (de skrå hjørner klippede fokusringen væk) */
html.cab body button:not(.egb):not(.wc):not(.stag):not(.cc):not(.evc):not(.sgGift):not(.mbtn):not(.primary):not(.focusBtn):where(:not(#enemyPanel *, #eventBox *, #menu *, #gunList *, #combatBoard *, #touch *)) {
  clip-path: none !important; border-radius: 4px !important;
  color: var(--cb-cream); text-shadow: 0 1px 0 var(--cb-ink);
  background:
    repeating-linear-gradient(178.5deg, rgba(255, 226, 172, 0.04) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, #4a2f17, #37220f 55%, #2a190b) #37220f;
  box-shadow: inset 0 0 0 1px var(--cb-brass-d), inset 0 1px 0 1px rgba(255, 226, 172, 0.1), 0 2px 0 var(--cb-ink);
  transition: background-color 0.12s var(--cb-ease), box-shadow 0.12s var(--cb-ease), transform 0.08s var(--cb-ease);
}
html.cab body button:not(.egb):not(.wc):not(.stag):not(.cc):not(.evc):not(.sgGift):not(.mbtn):not(.primary):not(.focusBtn):where(:not(#enemyPanel *, #eventBox *, #menu *, #gunList *, #combatBoard *, #touch *)):hover:not(:disabled) {
  filter: none; color: #fff;
  background: linear-gradient(180deg, #654120, #4b2f15 55%, #382210) #4b2f15;
  box-shadow: inset 0 0 0 1.5px var(--cb-brass-hi), 0 2px 0 var(--cb-ink);
}
/* hovedknap: messingplade med en nitte i hver ende og mørk skrift (11:1); ingen glimt, ingen tekstskygge */
html.cab body button.primary:not(:disabled):where(:not(#enemyPanel *, #eventBox *)) {
  clip-path: none !important; border-radius: 4px !important;
  color: #1a1206 !important; text-shadow: none !important; font-weight: 800; letter-spacing: 0.02em;
  background:
    radial-gradient(circle at 9px 50%, #6a4a14 0 2px, rgba(255, 246, 214, 0.7) 2px 3px, transparent 3.5px),
    radial-gradient(circle at calc(100% - 9px) 50%, #6a4a14 0 2px, rgba(255, 246, 214, 0.7) 2px 3px, transparent 3.5px),
    linear-gradient(180deg, #f8e09c, #e4b962 58%, #cc9c44) #e4b962 !important;
  box-shadow: inset 0 0 0 1px #6a4a14, inset 0 1px 0 1px rgba(255, 255, 255, 0.4), 0 2px 0 var(--cb-ink) !important;
}
html.cab body button.primary:hover:not(:disabled):where(:not(#enemyPanel *, #eventBox *)) {
  filter: none;
  background:
    radial-gradient(circle at 9px 50%, #6a4a14 0 2px, rgba(255, 246, 214, 0.7) 2px 3px, transparent 3.5px),
    radial-gradient(circle at calc(100% - 9px) 50%, #6a4a14 0 2px, rgba(255, 246, 214, 0.7) 2px 3px, transparent 3.5px),
    linear-gradient(180deg, #fff2c4, #f2cb76 58%, #dcae54) #f2cb76 !important;
  box-shadow: inset 0 0 0 1px #6a4a14, 0 2px 0 var(--cb-ink), 0 0 0 2px rgba(255, 240, 192, 0.5) !important;
}
/* utilgængelig: stiplet kant og flad plade, teksten kan stadig læses. Ikke kun "lidt mørkere" */
html.cab body button:disabled:where(:not(#enemyPanel *, #eventBox *, #gunList *, #combatBoard *)) {
  filter: none !important; opacity: 1 !important; cursor: not-allowed;
  color: var(--cb-dim) !important; text-shadow: none !important;
  background: rgba(16, 8, 3, 0.6) !important;
  box-shadow: none !important; outline: 1px dashed rgba(198, 180, 142, 0.65); outline-offset: -1px;
  clip-path: none !important; border-radius: 4px !important;
}
html.cab body :is(#port, #chart, #inventory, #workshop, #armory, #escMenu, #shipLog, #crewPanel) * {
  scrollbar-width: thin; scrollbar-color: var(--cb-brass-d) rgba(0, 0, 0, 0.35);
}
/* overskrifter: rolig antikva i stedet for den gotiske; én mørk skygge, så de står rent på træet */
html.cab body :is(#port, #inventory, #workshop, #armory) :is(h3, .arH),
html.cab body .wsCat :is(h4, summary) {
  font-family: "IM Fell English", "Iowan Old Style", Georgia, serif !important; letter-spacing: 0.01em; text-shadow: 0 1px 0 var(--cb-ink) !important;
}
html.cab body #battery > h2, html.cab body #crewPanel .cphead h2, html.cab body #aboutPanel > h2, html.cab body #rangePanel > h2, html.cab body .chartHead h2 {
  color: var(--cb-brass-hi) !important; text-shadow: 0 1px 0 var(--cb-ink), 0 2px 3px rgba(0, 0, 0, 0.55) !important;
}

/* ---------- B3. Store vinduer: ramme af eg, indhold i tjærede fordybninger ---------- */
html.cab body :is(#port, #chart, #inventory, #workshop, #armory, #escMenu) { background-color: rgba(8, 5, 2, 0.72); }
html.cab body :is(#port, #inventory, #workshop, #armory) > .panel {
  /* panelet måles uden polstring (content-box), så træk den fra: ellers rører rammen skærmkanten */
  max-height: calc(100dvh - 64px); padding: 22px 26px 0; gap: 12px;
}
html.cab body :is(#port, #inventory, #workshop, #armory) .chartHead { padding-bottom: 10px; }
html.cab body :is(#port, #inventory, #workshop, #armory) .chartHead h2 small { color: var(--cb-brass); letter-spacing: 0.16em; font-size: 0.8rem; text-shadow: 0 1px 0 var(--cb-ink); }
/* tal og noter i overskriften står på en tjæret plade, ikke direkte på plankerne */
html.cab body :is(#port, #inventory, #workshop, #armory) .res {
  color: var(--cb-soft); font-size: 0.95rem; padding: 5px 10px; border-radius: 5px;
  background: var(--slot-bg); box-shadow: inset 0 0 0 1px var(--cb-line);
}
html.cab body :is(#port, #inventory, #workshop, #armory) .res b { color: var(--cb-cream); }
html.cab body #portNotes { color: var(--cb-brass-hi); font-size: 0.9rem; text-shadow: 0 1px 0 var(--cb-ink); }

/* fordybningen: her ligger alt, der skal læses */
html.cab body #port .portGrid.ptabs > section,
html.cab body #workshop .wsGrid > section,
html.cab body #inventory .invGrid,
html.cab body #armory .arShipWrap {
  background: linear-gradient(180deg, rgba(22, 13, 6, 0.93), rgba(28, 17, 9, 0.9));
  border-radius: 6px; padding: 14px 16px 16px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.7), inset 0 0 0 2px rgba(240, 205, 120, 0.22), inset 0 6px 14px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(255, 220, 160, 0.14);
}

/* bundlinjen: en mørk egeliste, står fast nederst mens indholdet ruller bag den; tovet fortsætter udenom */
html.cab body :is(#port, #inventory, #workshop, #armory) > .panel > .portFoot {
  position: sticky; bottom: 0; z-index: 5; margin: 0 -26px; padding: 12px 26px 20px;
  border-top: 1.5px solid var(--cb-brass-d);
  background:
    var(--cb-nail) 9px calc(100% - 9px) / 14px 14px no-repeat,
    var(--cb-nail) calc(100% - 9px) calc(100% - 9px) / 14px 14px no-repeat,
    var(--cb-rope-x) bottom / 100% 6px no-repeat,
    var(--cb-rope-y) left / 6px 100% no-repeat,
    var(--cb-rope-y) right / 6px 100% no-repeat,
    repeating-linear-gradient(178.7deg, rgba(255, 226, 172, 0.03) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, #46290f, #2e1a09);
  box-shadow: 0 -12px 18px -10px rgba(0, 0, 0, 0.65);
  flex-wrap: nowrap; justify-content: flex-end;
}
html.cab body .portFoot > :is(#pMsg, #wsMsg, #invHint, #arMsg) { flex: 1 1 auto; min-width: 0; margin-right: auto; color: var(--cb-cream); font-size: 0.9rem; text-shadow: 0 1px 0 var(--cb-ink); }
html.cab body .portFoot button { min-height: 40px; padding-inline: 18px; white-space: nowrap; font-size: 0.95rem; }
html.cab body .portFoot button.primary { min-width: 120px; }
html.cab body :is(#port, #inventory, #workshop, #armory) h3 { margin: 0 0 8px; color: var(--cb-brass-hi); font-size: 1.3rem; }
html.cab body :is(#port, #inventory, #workshop, #armory) h3 small { color: var(--cb-dim); font: 400 0.85rem var(--body); letter-spacing: 0; margin-left: 6px; text-shadow: none; }

/* afsnitsmærker i havnen: en strimmel sejldug med sting, sort skrift (12:1) */
html.cab body #port h4.psub {
  margin: 18px 0 6px; padding: 5px 12px; gap: 10px; border-radius: 3px;
  font-size: 0.76rem; letter-spacing: 0.16em; color: var(--cb-canvas-ink); text-shadow: none;
  background: var(--cb-weave);
  outline: 1px dashed rgba(42, 24, 10, 0.55); outline-offset: -4px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.6), 0 2px 5px rgba(0, 0, 0, 0.35);
}
html.cab body #port h4.psub:first-child { margin-top: 2px; }
html.cab body #port h4.psub small { font-size: 0.76rem; letter-spacing: 0.02em; color: #4a2f17; text-transform: none; font-weight: 600; }
html.cab body #port h4.psub::after { display: none; }

/* kort (havn, værksted) og rækker (inventar): en plade i fordybningen, hele hjørner */
html.cab body :is(#port, #workshop) .card, html.cab body #inventory .invList > * {
  clip-path: none !important; border-radius: 5px;
  background: linear-gradient(180deg, rgba(58, 37, 19, 0.6), rgba(44, 27, 13, 0.6)); border: 1px solid var(--cb-line);
  box-shadow: inset 0 1px 0 rgba(255, 226, 172, 0.06), 0 1px 0 rgba(0, 0, 0, 0.5);
}
html.cab body :is(#port, #workshop) .card {
  padding: 12px 14px; gap: 12px; align-items: flex-start;
  transition: border-color 0.12s var(--cb-ease), background-color 0.12s var(--cb-ease);
}
html.cab body :is(#port, #workshop) .card:hover, html.cab body #inventory .invList > *:hover { border-color: var(--cb-line-2); background-color: rgba(120, 78, 38, 0.3); }
html.cab body :is(#port, #workshop) .card .cico, html.cab body #portNav .pnIco { background: var(--cb-ink) !important; box-shadow: 0 0 0 1.5px var(--cb-brass-d) !important; border-radius: 50%; }
html.cab body :is(#port, #workshop) .card .cico { width: 42px; height: 42px; flex: none; margin-top: 1px; }
html.cab body :is(#port, #workshop) .card .ci { gap: 3px; flex: 1 1 auto; min-width: 0; }
html.cab body :is(#port, #workshop) .card .ci > b { font-size: 1.02rem; line-height: 1.25; color: var(--cb-cream); }
html.cab body :is(#port, #workshop) .card .ci > :is(small, span):not([class]) { font-size: 0.88rem; line-height: 1.42; color: var(--cb-soft); }
html.cab body :is(#port, #workshop) .card > button { flex: none; min-width: 84px; min-height: 40px; align-self: center; font-weight: 700; font-size: 0.95rem; }
html.cab body :is(#port, #workshop) .card .docTags { display: flex; flex-wrap: wrap; gap: 4px 5px; margin-top: 6px; }
html.cab body :is(#port, #workshop) .card .docTag { display: inline-flex; flex: none; width: auto; font-size: 0.78rem; }
html.cab body :is(#port, #workshop) .card .pips { margin-top: 4px; color: var(--cb-brass); font-size: 0.82rem; }
html.cab body :is(#port, #workshop) .card .mcost .short { font-size: 0.84rem; color: var(--cb-cream); }

/* ---------- B4. Havnen ---------- */
/* fejl i det gamle lag: sektionen voksede med indholdet (align-items: start), så kortene løb ind under knapperne */
html.cab body #port .portGrid.ptabs { align-items: stretch; gap: 18px; grid-template-columns: 216px minmax(0, 1fr); }
html.cab body #port .portGrid.ptabs > section { align-self: stretch; margin-bottom: 14px; }
/* fanerne: skilte af tjæret eg */
html.cab body #portNav { gap: 7px; }
html.cab body #portNav button {
  min-height: 60px; padding: 9px 12px; border-radius: 5px !important; clip-path: none !important;
  background: linear-gradient(180deg, rgba(34, 20, 9, 0.9), rgba(24, 14, 6, 0.9)) !important;
  box-shadow: inset 0 0 0 1px var(--cb-line), 0 2px 0 var(--cb-ink) !important; color: var(--cb-cream);
}
html.cab body #portNav button b { font-family: "IM Fell English", Georgia, serif; font-size: 1.2rem; letter-spacing: 0.01em; }
html.cab body #portNav button small { color: var(--cb-soft); font-size: 0.82rem; }
html.cab body #portNav button:hover { background: linear-gradient(180deg, rgba(74, 47, 23, 0.95), rgba(52, 32, 14, 0.95)) !important; }
/* valgt fane: messingbjælke i venstre side + lysere plade + fed kant (ikke kun farve) */
html.cab body #portNav button[aria-selected="true"] {
  background: linear-gradient(90deg, rgba(240, 205, 120, 0.3), rgba(96, 62, 30, 0.95) 55%) !important;
  box-shadow: inset 6px 0 0 var(--cb-brass), inset 0 0 0 1.5px var(--cb-brass), 0 2px 0 var(--cb-ink) !important;
}
html.cab body #portNav button.empty:not([aria-selected="true"]) { opacity: 1; }
html.cab body #portNav button.empty:not([aria-selected="true"]) :is(b, small) { color: var(--cb-dim); }
html.cab body #port .ptabs .cards { grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 10px; }
html.cab body #port .ptabs .cards > :is(h4, p) { grid-column: 1 / -1; }
html.cab body #port .goldBox { clip-path: none !important; border-radius: 5px; background: var(--cb-ink) !important; }

/* ---------- B5. Værksted, inventar, våbenkammer ---------- */
html.cab body #workshop .wsGrid { gap: 18px; padding-bottom: 14px; }
html.cab body #workshop .wsNote { margin: 0; color: var(--cb-brass-hi); font-size: 0.92rem; text-shadow: 0 1px 0 var(--cb-ink); }
html.cab body #workshop .wsHow { color: var(--cb-soft); font-size: 0.9rem; line-height: 1.45; }
html.cab body #workshop .wsMat small { color: var(--cb-cream); font-size: 0.72rem; }
/* værkstedets kort står i smalle spalter: lidt mindre ikon og knap, så teksten får pladsen */
html.cab body #workshop .card { padding: 10px 12px; gap: 10px; }
html.cab body #workshop .card .cico { width: 36px; height: 36px; }
html.cab body #workshop .card .ci > b { font-size: 0.98rem; }
html.cab body #workshop .card .ci > :is(small, span):not([class]) { font-size: 0.85rem; line-height: 1.38; }
html.cab body #workshop .card > button { min-width: 70px; padding-inline: 10px; }
html.cab body #workshop .wsFilter :is(small, em, p, i) { color: var(--cb-soft); font-size: 0.84rem; line-height: 1.4; }
html.cab body #inventory .invWrap { padding-bottom: 14px; }
html.cab body #inventory .invGrid { gap: 20px 22px; }
html.cab body #inventory .invList { gap: 6px; }
html.cab body #inventory .invList > * small, html.cab body #inventory .invList > * span:not([class]) { color: var(--cb-soft); }
html.cab body #armory .arGrid { padding-bottom: 14px; }
html.cab body #armory .arInfo { clip-path: none !important; border-radius: 6px; background: linear-gradient(180deg, rgba(22, 13, 6, 0.93), rgba(28, 17, 9, 0.9)); border: 1px solid var(--cb-line); color: var(--cb-soft); font-size: 0.92rem; line-height: 1.45; }
html.cab body #armory .arInfo :is(h3, h4, b) { color: var(--cb-cream); }

/* ---------- B6. HUD ---------- */
/* menuknapperne øverst til højre: en ryddelig blok på 3 × 2, skilte af eg med tov foroven */
html.cab body #hudTop .hudBtns { grid-template-columns: repeat(3, minmax(0, 152px)) !important; justify-content: end; gap: 7px !important; }
html.cab body #hudTop .hudBtns button.mbtn:not([hidden]) {
  min-height: 44px; padding: 7px 9px 4px 7px !important; gap: 8px; clip-path: none !important; border-radius: 4px !important;
  font: 400 0.98rem "IM Fell English SC", var(--display) !important; color: var(--cb-cream) !important; text-shadow: 0 1px 0 var(--cb-ink), 0 0 3px rgba(0, 0, 0, 0.6) !important;
  background:
    var(--cb-rope-x) top / 100% 4px no-repeat,
    repeating-linear-gradient(178.6deg, rgba(255, 226, 172, 0.05) 0 1px, transparent 1px 4px, rgba(0, 0, 0, 0.08) 4px 5px, transparent 5px 9px),
    linear-gradient(180deg, #6e4526 0%, #563419 50%, #3c230f 100%) #4a2c14 !important;
  box-shadow: 0 0 0 1.5px var(--cb-ink), 0 4px 10px rgba(0, 0, 0, 0.5) !important;
}
html.cab body #hudTop .hudBtns button.mbtn:hover:not(:disabled) { transform: none; filter: brightness(1.14); box-shadow: 0 0 0 1.5px var(--cb-ink), 0 0 0 3px var(--cb-brass-hi), 0 4px 10px rgba(0, 0, 0, 0.5) !important; }
html.cab body #hudTop .hudBtns button.mbtn[aria-expanded="true"] { filter: brightness(1.14); box-shadow: inset 0 -4px 0 var(--cb-brass), 0 0 0 1.5px var(--cb-ink), 0 0 0 3px var(--cb-brass-hi) !important; }
html.cab body #hudTop .hudBtns button.mbtn .mi { width: 28px; height: 28px; color: var(--cb-brass-hi); background: var(--cb-ink); box-shadow: 0 0 0 1.5px var(--cb-brass-d); }
html.cab body #hudTop .hudBtns button.mbtn .ml { overflow: visible; text-overflow: clip; white-space: nowrap; }
html.cab body #hudTop .hudBtns button.mbtn .mk { font-size: 0.7rem !important; color: #1a1206; background: var(--cb-brass); box-shadow: inset 0 0 0 1px #6a4a14; border-radius: 3px; }

/* posterne: hele hjørner, tydelig hover, læsbar hjælpetekst på en tjæret plade */
html.cab body #stationList .srow { clip-path: none !important; border-radius: 4px; transition: filter 0.12s var(--cb-ease); }
html.cab body #stationList .srow:hover { filter: brightness(1.2); }
html.cab body #crewInfo { color: var(--cb-soft); line-height: 1.4; font-size: 0.8rem; padding: 5px 8px; border-radius: 4px; background: var(--slot-bg); }
html.cab body #crewInfo:empty { display: none; }
/* hjørnesømmene må ikke ligge oven på hjælpeteksten */
html.cab body #crewInfo { margin: 0 12px 6px; }
html.cab body #stationList .srow .se { font-size: 0.76rem; }
html.cab body #mgNote { clip-path: none !important; border-radius: 4px; }

/* ---------- B7. Søkortet og Esc-menuen ---------- */
html.cab body #chart .chartFoot button { min-height: 40px; padding-inline: 16px; }
html.cab body #chart #nodeInfo { color: var(--cb-cream); font-size: 0.95rem; text-shadow: 0 1px 0 var(--cb-ink); }
html.cab body #escMenu > .panel { gap: 10px; padding: 24px 26px 26px; width: min(460px, calc(100vw - 32px)); }
html.cab body #escMenu h2 { padding-bottom: 10px; margin-bottom: 2px; border-bottom: 1.5px solid var(--cb-brass-d); }
html.cab body #escMenu h2 small { color: var(--cb-cream); text-shadow: 0 1px 0 var(--cb-ink); }
html.cab body #escMenu .volRow { clip-path: none !important; border-radius: 5px; background: var(--slot-bg); box-shadow: inset 0 0 0 1px var(--cb-line); }
html.cab body #escMenu .volRow label { color: var(--cb-brass-hi); }
html.cab body #escMenu .panel > button, html.cab body #escMenu .escBtns button { min-height: 40px; }
html.cab body #escMenu #btnEscClose { min-height: 48px; margin-top: 6px; font-size: 1.05rem; }
html.cab body #escMenu #saveMenuNote { color: var(--cb-cream); font-size: 0.82rem; text-shadow: 0 1px 0 var(--cb-ink); }
html.cab body #escMenu .uiSet { padding: 10px 12px 12px; border-radius: 5px; background: var(--slot-bg); box-shadow: inset 0 0 0 1px var(--cb-line); }

/* ---------- B8. Startskærmen v3 "Midtlinje" (2026-11-11): næsten ingenting. Traileren bag menuen er billedet
   (TRL i 17, snit gennem #menuCut); titlen står lille og spatieret øverst, nederst navnefelt, én knap og fire
   tekstlinks. Det åbne felt (How to play, Sails, Display) lægger sig over knapperne. Markup: #menu > #menuCut + .mm (.mmHead, .mmDeck). ---------- */
body.menu #toast, body.menu #banner, body.menu #floaters, body.menu #pauseBanner { display: none !important; }
html.cab body #menu {
  display: block; padding: 0; overflow: hidden; animation: none;
  background:
    linear-gradient(180deg, rgba(6, 10, 18, 0.84) 0, rgba(6, 10, 18, 0.55) 17%, rgba(6, 10, 18, 0) 38%),
    linear-gradient(0deg, rgba(6, 10, 18, 0.9) 0, rgba(6, 10, 18, 0.66) 20%, rgba(6, 10, 18, 0) 40%);
}
html.cab body #menu #menuCut { position: absolute; inset: 0; z-index: 0; background: #04060b; opacity: 0; pointer-events: none; transition: opacity 0.36s ease; }
html.cab body #menu #menuCut.on { opacity: 1; }
@keyframes mmFade { from { opacity: 0; } }
html.cab body #menu .mm {
  position: absolute; z-index: 1; inset: 0; box-sizing: border-box; padding: clamp(28px, 8vh, 76px) 26px clamp(22px, 6.5vh, 60px);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 24px;
  overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: var(--cb-brass-d) transparent;
  color: var(--cb-cream); animation: mmFade 1.4s ease-out both;
}
html.cab body #menu .mmHead { text-align: center; }
html.cab body #menu h1 { margin: 0; font-weight: 400; display: flex; flex-direction: column; align-items: center; gap: 10px; }
html.cab body #menu .mmDeck { position: relative; display: flex; flex-direction: column; align-items: center; gap: 22px; width: min(560px, 100%); }
html.cab body #menu .mmName { display: flex; flex-direction: column; align-items: center; gap: 2px; }
html.cab body #menu .mmName span { font: 700 0.8rem var(--body); letter-spacing: 0.26em; text-transform: uppercase; color: var(--cb-soft); text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8); }
html.cab body #menu #shipNameIn {
  box-sizing: border-box; width: min(300px, 78vw); min-height: 46px; padding: 0; text-align: center;
  font: 400 1.75rem "IM Fell English", Georgia, serif; color: var(--cb-cream); caret-color: var(--cb-brass);
  background: none; border: 0; border-bottom: 1px solid rgba(251, 243, 223, 0.5); border-radius: 0; box-shadow: none; outline: none;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8); transition: border-color 0.15s ease;
}
html.cab body #menu #shipNameIn:hover { border-bottom-color: rgba(251, 243, 223, 0.85); }
html.cab body #menu #shipNameIn:focus-visible { border-bottom: 2px solid var(--cb-brass); }
/* knapperne: den udfyldte sætter sejl; har man et gemt togt, står "New voyage" som en tynd ramme under */
html.cab body #menu .mmBtns { display: flex; flex-direction: column; align-items: center; gap: 10px; }
html.cab body #menu .mmBtns button {
  min-width: min(300px, 78vw); min-height: 56px; padding: 0 36px 2px; clip-path: none !important; border-radius: 2px !important; cursor: pointer;
  font: 400 1.5rem "IM Fell English SC", var(--display); letter-spacing: 0.2em; text-shadow: none !important; filter: none !important;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
html.cab body #menu .mmBtns button.primary:not(:disabled) { color: #14100a; background: var(--cb-brass) !important; border: 0 !important; box-shadow: 0 6px 22px rgba(0, 0, 0, 0.4) !important; }
html.cab body #menu .mmBtns button.primary:hover:not(:disabled) { background: var(--cb-brass-hi) !important; transform: translateY(-1px); }
html.cab body #menu .mmBtns button:not(.primary) { min-height: 46px; font-size: 1.15rem; color: var(--cb-cream); background: rgba(6, 10, 18, 0.35) !important; border: 1px solid rgba(251, 243, 223, 0.55) !important; box-shadow: none !important; }
html.cab body #menu .mmBtns button:not(.primary):hover { color: #fff; border-color: var(--cb-cream) !important; background: rgba(6, 10, 18, 0.6) !important; }
html.cab body #menu .mmBtns button:focus-visible { outline: 2px solid var(--cb-brass-hi); outline-offset: 4px; }

/* de åbne felter: en mørk plade lige over navnefeltet, så teksten aldrig står på billedet */
html.cab body #menu .mmDeck > .panel {
  --wood-bg: linear-gradient(180deg, rgba(8, 11, 18, 0.94), rgba(8, 11, 18, 0.94));
  order: -1; box-sizing: border-box; width: 100%; max-height: max(220px, calc(100dvh - 400px)); overflow-y: auto; padding: 18px 20px 20px; border-radius: 3px; color: var(--cb-soft);
  box-shadow: inset 0 0 0 1px rgba(251, 243, 223, 0.28), 0 18px 44px rgba(0, 0, 0, 0.5) !important;
  scrollbar-width: thin; scrollbar-color: var(--cb-brass-d) rgba(0, 0, 0, 0.35); animation: mmFade 0.25s ease-out both;
}
html.cab body #menu #howTo ul { gap: 8px; font-size: 0.97rem; line-height: 1.5; color: var(--cb-soft); }
html.cab body #menu #howTo b { color: var(--cb-cream); }
html.cab body #menu #sailsMenu h2 { font-family: "IM Fell English", Georgia, serif; color: var(--cb-cream); }
html.cab body #menu #sailsMenu h2 small { color: var(--cb-soft); font-size: 0.86rem; }
html.cab body #menu .sailOpt {
  position: relative; min-height: 104px; font-size: 0.8rem !important; line-height: 1.15; white-space: normal; color: var(--cb-cream);
  clip-path: none !important; border-radius: 3px !important; text-shadow: none;
  background: rgba(251, 243, 223, 0.06); box-shadow: inset 0 0 0 1px rgba(251, 243, 223, 0.18);
}
html.cab body #menu .sailOpt:hover { filter: none; background: rgba(251, 243, 223, 0.12); box-shadow: inset 0 0 0 1px rgba(251, 243, 223, 0.5); }
/* valgt sejl: messingkant og et flueben i hjørnet */
html.cab body #menu .sailOpt.on { box-shadow: inset 0 0 0 2px var(--cb-brass) !important; background: rgba(240, 205, 120, 0.12); }
html.cab body #menu .sailOpt.on::after {
  content: "\2713"; position: absolute; top: 5px; right: 5px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font: 800 0.8rem var(--body); color: #1a1206; background: var(--cb-brass); box-shadow: 0 0 0 1.5px var(--cb-ink);
}
html.cab body #menu #menuDisplay .seg button {
  clip-path: none !important; border-radius: 2px !important; color: var(--cb-cream); text-shadow: none;
  background: rgba(251, 243, 223, 0.06); box-shadow: inset 0 0 0 1px rgba(251, 243, 223, 0.3);
}
html.cab body #menu #menuDisplay .seg button[aria-pressed="true"] { color: #14100a; background: var(--cb-brass); box-shadow: none; }
/* lave skærme: når et felt er åbent, viger titlen */
@media (max-height: 720px) {
  html.cab body #menu .mm { gap: 14px; }
  html.cab body #menu .mmDeck { gap: 14px; }
  html.cab body #menu .mm:has(.mmDeck > .panel:not([hidden])) .mmHead { display: none; }
  html.cab body #menu .mm:has(.mmDeck > .panel:not([hidden])) { justify-content: flex-end; }
  html.cab body #menu .mmDeck > .panel { max-height: max(180px, calc(100dvh - 300px)); }
}
@media (prefers-reduced-motion: reduce) { html.cab body #menu .mm, html.cab body #menu .mmDeck > .panel { animation: none !important; } html.cab body #menu #menuCut { transition: none; } }

/* ---------- B8b. Afgang (2026-11-11): menuen toner ud, og HUD'et kommer ind i rækkefølge, når togtet begynder.
   #menu.out og body.hudIn sættes af menuLeave (17) og fjernes igen efter et par sekunder. Kun `translate`, `rotate`,
   `scale` og `opacity` animeres, så panelernes egne `transform` (placering) ikke røres. ---------- */
html.cab body #menu.out { pointer-events: none; opacity: 0; transition: opacity 0.5s ease 0.05s; }
html.cab body #menu.out .mmHead { translate: 0 -34px; transition: translate 0.5s cubic-bezier(0.5, 0, 0.9, 0.4); }
html.cab body #menu.out .mmDeck { translate: 0 44px; transition: translate 0.5s cubic-bezier(0.5, 0, 0.9, 0.4); }
/* skrogplanken falder ned i sine tove og svinger på plads */
@keyframes hudDrop { 0% { opacity: 0; translate: 0 -150%; rotate: -2.2deg; } 55% { opacity: 1; translate: 0 7px; rotate: 0.7deg; } 78% { translate: 0 -3px; rotate: -0.25deg; } 100% { opacity: 1; translate: 0 0; rotate: 0deg; } }
@keyframes hudLeft { 0% { opacity: 0; translate: -110% 0; } 62% { opacity: 1; translate: 8px 0; } 100% { opacity: 1; translate: 0 0; } }
@keyframes hudRight { 0% { opacity: 0; translate: 110% 0; } 62% { opacity: 1; translate: -8px 0; } 100% { opacity: 1; translate: 0 0; } }
@keyframes hudUp { 0% { opacity: 0; translate: 0 120%; } 62% { opacity: 1; translate: 0 -6px; } 100% { opacity: 1; translate: 0 0; } }
@keyframes hudPop { 0% { opacity: 0; scale: 0.4; translate: 0 -26px; } 60% { opacity: 1; scale: 1.1; translate: 0 2px; } 100% { opacity: 1; scale: 1; translate: 0 0; } }
@keyframes hudRow { 0% { opacity: 0; translate: -18px 0; } 100% { opacity: 1; translate: 0 0; } }
@keyframes hudFade { 0% { opacity: 0; } 100% { opacity: 1; } }
body.hudIn #hullFrame { transform-origin: 50% 0; animation: hudDrop 1s cubic-bezier(0.25, 0.8, 0.3, 1) 0.4s both; }
body.hudIn #hudBtns > * { animation: hudPop 0.6s cubic-bezier(0.25, 0.8, 0.3, 1) 0.85s both; }
body.hudIn #hudBtns > :nth-child(2) { animation-delay: 0.95s; }
body.hudIn #hudBtns > :nth-child(3) { animation-delay: 1.05s; }
body.hudIn #hudBtns > :nth-child(n+4) { animation-delay: 1.15s; }
body.hudIn #artifactBar { animation: hudFade 0.6s ease-out 1.3s both; }
body.hudIn #crewPanel, body.hudIn #battery { animation: hudLeft 0.8s cubic-bezier(0.25, 0.8, 0.3, 1) 0.75s both; }
body.hudIn #stationList > * { animation: hudRow 0.45s ease-out 1.25s both; }
body.hudIn #stationList > :nth-child(2) { animation-delay: 1.31s; }
body.hudIn #stationList > :nth-child(3) { animation-delay: 1.37s; }
body.hudIn #stationList > :nth-child(4) { animation-delay: 1.43s; }
body.hudIn #stationList > :nth-child(5) { animation-delay: 1.49s; }
body.hudIn #stationList > :nth-child(6) { animation-delay: 1.55s; }
body.hudIn #stationList > :nth-child(7) { animation-delay: 1.61s; }
body.hudIn #stationList > :nth-child(8) { animation-delay: 1.67s; }
body.hudIn #stationList > :nth-child(n+9) { animation-delay: 1.73s; }
body.hudIn #helmDock, body.hudIn #touch { animation: hudUp 0.8s cubic-bezier(0.25, 0.8, 0.3, 1) 0.95s both; }
body.hudIn #enemyPanel, body.hudIn #combatBoard, body.hudIn #topright { animation: hudRight 0.8s cubic-bezier(0.25, 0.8, 0.3, 1) 0.95s both; }
body.hudIn #stationTags { animation: hudFade 0.8s ease-out 1.6s both; }
@media (prefers-reduced-motion: reduce) {
  html.cab body #menu.out, html.cab body #menu.out .mmHead, html.cab body #menu.out .mmDeck { transition: none; }
  body.hudIn #hullFrame, body.hudIn #hudBtns > *, body.hudIn #artifactBar, body.hudIn #crewPanel, body.hudIn #battery, body.hudIn #stationList > *, body.hudIn #helmDock, body.hudIn #touch, body.hudIn #enemyPanel, body.hudIn #combatBoard, body.hudIn #topright, body.hudIn #stationTags { animation: none; }
}

/* ---------- B9. Systemets egne ønsker ---------- */
@media (prefers-contrast: more) {
  html.cab { --cb-soft: #f3ead4; --cb-dim: #e6d8ba; --cb-line: rgba(240, 205, 120, 0.6); --cb-line-2: rgba(240, 205, 120, 0.85); }
  html.cab body #port .portGrid.ptabs > section, html.cab body #workshop .wsGrid > section, html.cab body #inventory .invGrid, html.cab body #armory .arShipWrap { background: #140b05; }
}
@media (forced-colors: active) {
  html.cab body button, html.cab body .card, html.cab body .panel { border: 1px solid ButtonText !important; }
}

/* 2026-11-10 (f): fjendepanelets tov er mørkerødt (tjæret, rødbejdset hamp). Rammen genberegnes på panelet,
   så var(--cb-rope-x/y) slår igennem her og ikke på de andre paneler */
html.cab body #enemyPanel.panel:is(#enemyPanel) {
  --cb-rope-x: repeating-linear-gradient(118deg, #7c2216 0 2px, #4c1009 2px 4.5px, #1c0403 4.5px 6px);
  --cb-rope-y: repeating-linear-gradient(28deg, #7c2216 0 2px, #4c1009 2px 4.5px, #1c0403 4.5px 6px);
  --cb-frame-plain:
    var(--cb-rope-x) top / 100% 6px no-repeat,
    var(--cb-rope-x) bottom / 100% 6px no-repeat,
    var(--cb-rope-y) left / 6px 100% no-repeat,
    var(--cb-rope-y) right / 6px 100% no-repeat,
    linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)) 6px 6px / calc(100% - 12px) 1.5px no-repeat,
    linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)) 6px calc(100% - 6px) / calc(100% - 12px) 1.5px no-repeat,
    linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)) 6px 6px / 1.5px calc(100% - 12px) no-repeat,
    linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)) calc(100% - 6px) 6px / 1.5px calc(100% - 12px) no-repeat;
  --rope-frame: var(--cb-frame-plain);
}

/* 2026-11-10 (g): pausemenuens tov løber roligt rundt (med uret), mens spillet står stille.
   --ro forskyder snoningen; øverst og venstre med +, nederst og højre med −, så tovet går hele vejen rundt */
@property --ro { syntax: "<length>"; inherits: true; initial-value: 0px; }
html.cab body #escMenu > .panel {
  --ropeA: #f4d992; --ropeB: #cfa24c; --ropeC: #6e4c1e;
  --rope-frame:
    var(--cb-nail) 9px 9px / 14px 14px no-repeat,
    var(--cb-nail) calc(100% - 9px) 9px / 14px 14px no-repeat,
    var(--cb-nail) 9px calc(100% - 9px) / 14px 14px no-repeat,
    var(--cb-nail) calc(100% - 9px) calc(100% - 9px) / 14px 14px no-repeat,
    repeating-linear-gradient(118deg, var(--ropeA) var(--ro), var(--ropeA) calc(var(--ro) + 2px), var(--ropeB) calc(var(--ro) + 2px), var(--ropeB) calc(var(--ro) + 4.5px), var(--ropeC) calc(var(--ro) + 4.5px), var(--ropeC) calc(var(--ro) + 6px)) top / 100% 6px no-repeat,
    repeating-linear-gradient(118deg, var(--ropeA) calc(0px - var(--ro)), var(--ropeA) calc(2px - var(--ro)), var(--ropeB) calc(2px - var(--ro)), var(--ropeB) calc(4.5px - var(--ro)), var(--ropeC) calc(4.5px - var(--ro)), var(--ropeC) calc(6px - var(--ro))) bottom / 100% 6px no-repeat,
    repeating-linear-gradient(28deg, var(--ropeA) var(--ro), var(--ropeA) calc(var(--ro) + 2px), var(--ropeB) calc(var(--ro) + 2px), var(--ropeB) calc(var(--ro) + 4.5px), var(--ropeC) calc(var(--ro) + 4.5px), var(--ropeC) calc(var(--ro) + 6px)) left / 6px 100% no-repeat,
    repeating-linear-gradient(28deg, var(--ropeA) calc(0px - var(--ro)), var(--ropeA) calc(2px - var(--ro)), var(--ropeB) calc(2px - var(--ro)), var(--ropeB) calc(4.5px - var(--ro)), var(--ropeC) calc(4.5px - var(--ro)), var(--ropeC) calc(6px - var(--ro))) right / 6px 100% no-repeat,
    linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)) 6px 6px / calc(100% - 12px) 1.5px no-repeat,
    linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)) 6px calc(100% - 6px) / calc(100% - 12px) 1.5px no-repeat,
    linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)) 6px 6px / 1.5px calc(100% - 12px) no-repeat,
    linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)) calc(100% - 6px) 6px / 1.5px calc(100% - 12px) no-repeat;
  --wood-bg: var(--rope-frame), var(--planks);
  animation: popIn 0.25s ease-out, escFloat 6s ease-in-out 0.3s infinite, escGlow 4s ease-in-out infinite, escRope 0.9s linear infinite;
}
@keyframes escRope { from { --ro: 0px; } to { --ro: 6px; } }
@media (prefers-reduced-motion: reduce) { html.cab body #escMenu > .panel { animation: none; } }
/* 2026-11-10 (j): pauseskiltets tov løber rundt ligesom på Esc-menuen (--ro, escRope); samme guldtov, ingen søm.
   Dobbelt id slår "små paneler"-reglen (B1), der ellers sætter den stille ramme */
html.cab body #pauseBanner#pauseBanner {
  --ropeA: #f4d992; --ropeB: #cfa24c; --ropeC: #6e4c1e;
  --rope-frame:
    repeating-linear-gradient(118deg, var(--ropeA) var(--ro), var(--ropeA) calc(var(--ro) + 2px), var(--ropeB) calc(var(--ro) + 2px), var(--ropeB) calc(var(--ro) + 4.5px), var(--ropeC) calc(var(--ro) + 4.5px), var(--ropeC) calc(var(--ro) + 6px)) top / 100% 6px no-repeat,
    repeating-linear-gradient(118deg, var(--ropeA) calc(0px - var(--ro)), var(--ropeA) calc(2px - var(--ro)), var(--ropeB) calc(2px - var(--ro)), var(--ropeB) calc(4.5px - var(--ro)), var(--ropeC) calc(4.5px - var(--ro)), var(--ropeC) calc(6px - var(--ro))) bottom / 100% 6px no-repeat,
    repeating-linear-gradient(28deg, var(--ropeA) var(--ro), var(--ropeA) calc(var(--ro) + 2px), var(--ropeB) calc(var(--ro) + 2px), var(--ropeB) calc(var(--ro) + 4.5px), var(--ropeC) calc(var(--ro) + 4.5px), var(--ropeC) calc(var(--ro) + 6px)) left / 6px 100% no-repeat,
    repeating-linear-gradient(28deg, var(--ropeA) calc(0px - var(--ro)), var(--ropeA) calc(2px - var(--ro)), var(--ropeB) calc(2px - var(--ro)), var(--ropeB) calc(4.5px - var(--ro)), var(--ropeC) calc(4.5px - var(--ro)), var(--ropeC) calc(6px - var(--ro))) right / 6px 100% no-repeat,
    linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)) 6px 6px / calc(100% - 12px) 1.5px no-repeat,
    linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)) 6px calc(100% - 6px) / calc(100% - 12px) 1.5px no-repeat,
    linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)) 6px 6px / 1.5px calc(100% - 12px) no-repeat,
    linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)) calc(100% - 6px) 6px / 1.5px calc(100% - 12px) no-repeat;
  --wood-bg: var(--rope-frame), var(--planks);
  animation: pauseSway 3.6s ease-in-out -0.9s infinite, pauseIn 0.3s ease-out, escRope 0.9s linear infinite;
}
html.cab body #escMenu > .panel { animation: popIn 0.25s ease-out, escFloat 6s ease-in-out 0.3s infinite, escGlow 4s ease-in-out infinite, escRope 0.9s linear infinite, escSway 7s ease-in-out -1.75s infinite; }
@media (prefers-reduced-motion: reduce) { html.cab body #pauseBanner#pauseBanner, html.cab body #escMenu > .panel { animation: none; } }

/* Lyd v2 (2026-11-10): "Sound effects" og "Music" i Esc-menuen; bredere etiketkolonne, etiketten må gå på to linjer (begge udseender) */
#escMenu .volRow { grid-template-columns: 76px 1fr 3ch auto; }
#escMenu .volRow label { line-height: 1.15; }

/* Display: skyder (Bloom) i en .uiRow, i Esc-menuen og på startskærmen */
.uiRange { display: grid; grid-template-columns: 1fr 5ch; align-items: center; gap: 10px; min-width: 0; }
.uiRange input[type="range"] { width: 100%; min-width: 0; accent-color: var(--cb-brass-hi, var(--gold)); cursor: pointer; }
.uiRange b { font-variant-numeric: tabular-nums; text-align: right; color: var(--cb-brass-hi, var(--gold-l)); font-size: 0.85rem; }

/* Esc-menuen > Graphics (2026-11-13): en underside. Mens den er åben (.gfxOn) skjules resten af menuen undtagen overskriften. */
#gfxMenu { display: grid; gap: 10px; }
#gfxMenu[hidden] { display: none; }
#gfxSet .uiRow { grid-template-columns: 1fr minmax(128px, 42%); }
#gfxSet .uiRow > span[title] { cursor: help; }
#gfxNote { color: var(--cb-cream, #d8bf86); font-size: 0.82rem; text-shadow: 0 1px 0 var(--cb-ink, #1a0e05); }

/* ---------- B8c. Trailerens tekstkort (2026-11-13): én linje pr. klip i venstre side, lille overlinje over. #trlCap bygges af trlCap (17)
   og ligger under .mm i #menu (pointer-events: none). Smal skærm: centreret under titlen. ---------- */

/* 2026-11-14: pause med musen. Skiltet kan klikkes (fortsæt), og pauseknappen i søjlen lyser, mens spillet står stille */
html.cab body #pauseBanner#pauseBanner { pointer-events: auto; cursor: pointer; }
html.cab body #pauseBanner#pauseBanner:hover { filter: brightness(1.12); }
html.cab body #pauseBanner#pauseBanner:focus-visible { outline: 2px solid #f4d992; outline-offset: 3px; }
html.cab body #hudTop .hudBtns button.mbtn#btnPause[aria-pressed="true"] { filter: brightness(1.14); box-shadow: inset 0 -4px 0 var(--cb-brass), 0 0 0 1.5px var(--cb-ink), 0 0 0 3px var(--cb-brass-hi) !important; }


/* =============================== C. Battle orders A2 (2026-11-15) ===============================
   Come about er to flag (bagbord/styrbord; messing = siden mod hende), Break away en kløftet vimpel der fyldes, og under en
   messingstreg ligger afstanden: runde knapper over en rille, der går fra nærmeste til fjerneste afstand (yderpunkterne),
   messingviser = hvor vi er, rødt skib = hvad hun vil, pile i rillen = hvilken vej afstanden går (røde: hun styrer, messing:
   vi gør). Brættet falder ud under skrogtavlen (cbDropA2) og flag, vimpel og knapper kommer på plads efter hinanden.
   JS: 14-battle-ui (rangePc, rangeHeading, BREAK_ICON, aboutSwitch), 16b (Horizon-knappen, #bxAux i toppen) */
html body #combatBoard#combatBoard { gap: 6px !important; padding: 9px 12px 12px !important; }
html body #combatBoard #cbFold { display: grid !important; grid-template-columns: 88px minmax(0, 1fr); grid-template-areas: "about brk" "rng rng"; column-gap: 10px; row-gap: 0; align-items: center; }
html body #combatBoard #cbFold[hidden] { display: none !important; }
html body #combatBoard #plankCombat { display: contents !important; }

/* Break away: vimplen. Fyldes med mørk messing (--esc), lys og glødende når hun kan slippe væk */
html body #combatBoard #breakPanel { grid-area: brk; display: block !important; position: relative !important; padding: 0 !important; }
html body #combatBoard #breakPanel[hidden] { display: none !important; }
html body #combatBoard #breakPanel #btnBreak.bigBtn, html body #combatBoard #breakPanel #btnBreak.bigBtn:disabled, html body #combatBoard #breakPanel #btnBreak.bigBtn:not(:disabled) {
  display: block !important; width: 100% !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important;
  background: none !important; box-shadow: none !important; animation: none !important; clip-path: none !important; opacity: 1 !important;
  font: 800 15px/1 var(--body) !important; letter-spacing: 0 !important; color: #fbf3df !important; text-shadow: none !important; filter: drop-shadow(1.5px 0 0 #100803) drop-shadow(-1.5px 0 0 #100803) drop-shadow(0 1.5px 0 #100803) drop-shadow(0 -1.5px 0 #100803) !important; }
html body #combatBoard #breakPanel #btnBreak.bigBtn:disabled { cursor: default; }
html body #combatBoard #btnBreak .baFlag { display: flex; align-items: center; gap: 7px; height: 38px; padding-left: 10px; box-sizing: border-box; clip-path: polygon(0 0, 100% 0, 89% 50%, 100% 100%, 0 100%);
  background: linear-gradient(180deg, rgba(255, 241, 196, 0.16), transparent 40%), linear-gradient(90deg, #8f6420 0 var(--esc, 0%), #24150a var(--esc, 0%) 100%); }
html body #combatBoard #btnBreak .baIco { width: 30px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
html body #combatBoard #btnBreak .baPct { text-shadow: 0 1px 0 #100803; font-variant-numeric: tabular-nums; }
html body #combatBoard #breakPanel #btnBreak.bigBtn:not(:disabled) { color: #2a1606 !important; cursor: pointer; animation: baA2 1.4s ease-in-out infinite !important; }
html body #combatBoard #btnBreak:not(:disabled) .baFlag { background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.28) 42%, transparent 52%), linear-gradient(180deg, #fff1c4 0%, #f0cd78 30%, #d5a54a 52%, #b6852f 75%, #8f6420 100%); }
html body #combatBoard #btnBreak:not(:disabled) .baPct { text-shadow: 0 1px 0 rgba(255, 246, 214, 0.6); }
html body #combatBoard #breakPanel #btnBreak.bigBtn:not(:disabled):hover { filter: drop-shadow(1.5px 0 0 #100803) drop-shadow(-1.5px 0 0 #100803) drop-shadow(0 1.5px 0 #100803) drop-shadow(0 -1.5px 0 #100803) brightness(1.12) drop-shadow(0 0 12px rgba(255, 210, 120, 0.9)) !important; }
html body #combatBoard #breakPanel #btnBreak.bigBtn:focus-visible { outline: 2px solid #fff0c0 !important; outline-offset: 3px; }
@keyframes baA2 { 0%, 100% { filter: drop-shadow(1.5px 0 0 #100803) drop-shadow(-1.5px 0 0 #100803) drop-shadow(0 1.5px 0 #100803) drop-shadow(0 -1.5px 0 #100803) drop-shadow(0 0 5px rgba(255, 210, 120, 0.5)); } 50% { filter: drop-shadow(1.5px 0 0 #100803) drop-shadow(-1.5px 0 0 #100803) drop-shadow(0 1.5px 0 #100803) drop-shadow(0 -1.5px 0 #100803) drop-shadow(0 0 12px rgba(255, 210, 120, 0.95)); } }

/* Come about: to flag med vendepil og sekunder. Messing = den side, hun ligger på (et lille rødt skib i flaget) */
html body #combatBoard #aboutPanel { grid-area: about; display: block !important; position: relative !important; left: auto !important; bottom: auto !important; top: auto !important; padding: 0 !important; }
html body #combatBoard #aboutPanel[hidden] { display: none !important; }
html body #combatBoard #aboutPanel > h2, html body #combatBoard #aboutPanel > small, html body #combatBoard #aboutPanel #btnAbout { display: none !important; }
html body #combatBoard #aboutPanel .sideSwitch { display: grid !important; grid-template-columns: repeat(2, 41px); grid-template-rows: none; gap: 6px; align-items: start; min-height: 0; width: auto !important; background: none !important; box-shadow: none !important; animation: none !important; }
html body #combatBoard #aboutPanel .sideSwitch .ssKnob { display: none !important; }
html body #combatBoard #aboutPanel .sideSwitch button { position: relative; z-index: 1; display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 41px; height: 38px !important; min-height: 0 !important; margin: 0; padding: 0 0 1px !important; box-sizing: border-box;
  border: 0 !important; border-bottom: 4px solid var(--sc) !important; border-radius: 3px 3px 0 0 !important; clip-path: none !important; color: var(--sc) !important; background: linear-gradient(180deg, #0c0603, #24150a) !important; filter: none !important;
  box-shadow: 0 0 0 1.5px #100803, inset 0 0 0 1px rgba(201, 154, 68, 0.5), 0 3px 5px rgba(0, 0, 0, 0.4) !important; overflow: visible; transition: background-color 0.2s, filter 0.15s; }
html body #combatBoard #aboutPanel .sideSwitch button[data-s="-1"] { --sc: var(--side-p, #ff8a7a); }
html body #combatBoard #aboutPanel .sideSwitch button[data-s="1"] { --sc: var(--side-s, #8fe6a8); }
html body #combatBoard #aboutPanel .sideSwitch button[aria-checked="true"] { color: #2a1606 !important; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.28) 42%, transparent 52%), linear-gradient(180deg, #fff1c4 0%, #f0cd78 30%, #d5a54a 52%, #b6852f 75%, #8f6420 100%) !important;
  box-shadow: 0 0 0 1.5px #100803, inset 0 0 0 1px rgba(255, 240, 196, 0.6), 0 3px 6px rgba(0, 0, 0, 0.45) !important; }
html body #combatBoard #aboutPanel .sideSwitch .ssIco { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
html body #combatBoard #aboutPanel .sideSwitch button b { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
html body #combatBoard #aboutPanel .sideSwitch button small { position: static; min-height: 0; font: 800 11px/1 var(--body) !important; color: #e6d8ba !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
html body #combatBoard #aboutPanel .sideSwitch button small:empty { display: none; }
html body #combatBoard #aboutPanel .sideSwitch button[aria-checked="true"] small { color: #4a2c0a !important; }
html body #combatBoard #aboutPanel .sideSwitch button.face::after { content: ""; display: block; width: 19px; height: 15px; flex: none; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 26'%3E%3Cg transform='translate(32 0) scale(-1 1)'%3E%3Cg stroke='%231a0e05' stroke-linejoin='round'%3E%3Cpath d='M11 3v14M20 2v15' stroke-width='1.6'/%3E%3Cpath d='M20 .8h6v4.4h-6z' fill='%23140a04' stroke-width='.7'/%3E%3Cpath d='M6 4.5q5 1.5 10 0v10q-5-1.5-10 0z' fill='%23a3271a' stroke-width='1.1'/%3E%3Cpath d='M15 3.5q5 1.5 10 0v11q-5-1.5-10 0z' fill='%23c2321f' stroke-width='1.1'/%3E%3Cpath d='M21 4l9 11h-8z' fill='%23a3271a' stroke-width='1'/%3E%3Cpath d='M1 16.5h30l-3.8 7H5z' fill='%232a1608' stroke-width='1.3'/%3E%3C/g%3E%3Ccircle cx='23' cy='3' r='1.1' fill='%23f2e6cc'/%3E%3Cpath d='M3.5 19h25' stroke='%23c2321f' stroke-width='1.4'/%3E%3C/g%3E%3C/svg%3E") center / 100% 100% no-repeat; }
html body #combatBoard #aboutPanel .sideSwitch button:disabled { cursor: default; opacity: 1 !important; }
html body #combatBoard #aboutPanel .sideSwitch button:disabled:not([aria-checked="true"]) { opacity: 0.5 !important; }
html body #combatBoard #aboutPanel .sideSwitch button:not(:disabled):hover { filter: brightness(1.18) !important; }
html body #combatBoard #aboutPanel .sideSwitch button:focus-visible { outline: 2px solid #fff0c0 !important; outline-offset: 2px; }
/* ingen bredside bærer: begge flag gløder rødt */
html body #combatBoard #aboutPanel .sideSwitch[data-st="none"] button:not(:disabled) { background: linear-gradient(180deg, #2a0c06, #3a140a) !important; box-shadow: 0 0 0 1.5px #100803, 0 0 0 3px #ff8a7a, 0 0 10px 2px rgba(255, 138, 122, 0.65) !important; animation: aboutA2 1.2s ease-in-out infinite; }
html body #combatBoard #aboutPanel .sideSwitch[data-st="none"] button small { color: #ffd9d2 !important; }
@keyframes aboutA2 { 50% { box-shadow: 0 0 0 1.5px #100803, 0 0 0 3px #ffc6bc, 0 0 16px 4px rgba(255, 138, 122, 0.9); } }
/* under vendingen blinker målflaget; det andet flag er "afbryd" (✕) */
html body #combatBoard #aboutPanel .sideSwitch[data-st="turning"] button[aria-checked="true"] { animation: aboutTurnA2 0.9s ease-in-out infinite; }
@keyframes aboutTurnA2 { 50% { filter: brightness(1.25); } }

/* Range: rillen går fra kant til kant lige under flagene og vimplen, med lige langt mellem afstandene (rangePc/rangeStops).
   Mærket med tallet rider på rillen (hvor vi er), pilene viser hvilken vej afstanden går, og knapperne står under rillen:
   den første flugter med venstre kant, den sidste med højre (--x/--tx fra 14-battle-ui). Hendes ønske: rød ring og et lille skib */
html body #combatBoard #rangePanel { grid-area: rng; display: block !important; position: relative !important; left: auto !important; bottom: auto !important; top: auto !important; width: auto !important; height: 46px; margin: 11px 0 0 !important; padding: 0 !important; background: none !important; }
html body #combatBoard #rangePanel[hidden] { display: none !important; }
html body #combatBoard #rangePanel > h2, html body #combatBoard #rangePanel .rPull, html body #combatBoard #rangePanel .rnote { display: none !important; }
html body #combatBoard #rangePanel .rTrack { position: absolute !important; left: 0; right: 0; top: 0; height: 14px !important; width: auto !important; margin: 0 !important; display: block !important; pointer-events: none; }
html body #combatBoard #rangePanel .rTrack .rLine { top: 3px !important; left: 0 !important; right: 0 !important; height: 8px !important; border-radius: 4px !important;
  background: repeating-linear-gradient(90deg, rgba(255, 220, 160, 0.05) 0 1px, transparent 1px 7px), linear-gradient(180deg, #0c0603, #24150a) !important;
  box-shadow: 0 0 0 1.5px #1a0e05, 0 1px 0 1.5px rgba(255, 228, 178, 0.16), inset 0 2px 3px rgba(0, 0, 0, 0.8) !important; transform-origin: 0 50%; }
html body #combatBoard #rangePanel .rTrack .rNow, html body #combatBoard #rangePanel .rTrack .rUs, html body #combatBoard #rangePanel .rTrack #rngTHer.rHer { display: none !important; }
html body #combatBoard #rangePanel .rTrack .rArr { position: absolute; top: 3px; height: 8px; border-radius: 4px; translate: none !important; z-index: 1; transition: left 0.4s ease-out, width 0.4s ease-out; }
html body #combatBoard #rangePanel .rTrack .rArr[hidden] { display: none !important; }
html body #combatBoard #rangePanel .rTrack .rArr.out.her { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 12'%3E%3Cpath d='M5 2l4 4-4 4' fill='none' stroke='%23ffb2a6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 0 50% / 12px 9px repeat-x, linear-gradient(90deg, rgba(194, 50, 31, 0.65), rgba(194, 50, 31, 0.15)); }
html body #combatBoard #rangePanel .rTrack .rArr.in.her { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 12'%3E%3Cpath d='M9 2L5 6l4 4' fill='none' stroke='%23ffb2a6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 100% 50% / 12px 9px repeat-x, linear-gradient(270deg, rgba(194, 50, 31, 0.65), rgba(194, 50, 31, 0.15)); }
html body #combatBoard #rangePanel .rTrack .rArr.out:not(.her) { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 12'%3E%3Cpath d='M5 2l4 4-4 4' fill='none' stroke='%23fff1c4' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 0 50% / 12px 9px repeat-x, linear-gradient(90deg, rgba(240, 205, 120, 0.6), rgba(240, 205, 120, 0.12)); }
html body #combatBoard #rangePanel .rTrack .rArr.in:not(.her) { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 12'%3E%3Cpath d='M9 2L5 6l4 4' fill='none' stroke='%23fff1c4' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 100% 50% / 12px 9px repeat-x, linear-gradient(270deg, rgba(240, 205, 120, 0.6), rgba(240, 205, 120, 0.12)); }
html body #combatBoard #rangePanel .rTrack .rLbl { position: absolute; top: -2px; z-index: 3; translate: -50% 0; display: flex; align-items: center; gap: 3px; height: 18px; padding: 0 7px; box-sizing: border-box; border-radius: 9px;
  font: 800 12px/1 var(--body); color: #2a1606; white-space: nowrap; font-variant-numeric: tabular-nums; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.28) 42%, transparent 52%), linear-gradient(180deg, #fff1c4 0%, #f0cd78 30%, #d5a54a 52%, #b6852f 75%, #8f6420 100%);
  box-shadow: 0 0 0 1.5px #1a0e05, inset 0 0 0 1px rgba(255, 240, 196, 0.6), 0 2px 4px rgba(0, 0, 0, 0.6), 0 0 8px rgba(255, 220, 140, 0.35); transition: left 0.4s ease-out; }
html body #combatBoard #rangePanel .rTrack .rLbl:empty { display: none; }
html body #combatBoard #rangePanel .rTrack .rLbl.flip { margin-left: 0; }
html body #combatBoard #rangePanel .rTrack .rLbl.steady::after { content: ""; width: 11px; height: 11px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='6' fill='none' stroke='%232a1606' stroke-width='2.6'/%3E%3Cpath d='M12 2v5M12 17v5M2 12h5M17 12h5' stroke='%232a1606' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
html body #combatBoard #rangePanel #rngBtns { position: absolute; left: 0; right: 0; top: 21px; height: 24px; display: block !important; width: auto !important; margin: 0; pointer-events: none; }
html body #combatBoard #rangePanel #rngBtns button { position: absolute !important; left: var(--x, 50%); translate: var(--tx, -50%) 0; top: 0; width: 56px; height: 24px; min-height: 0 !important; margin: 0 !important; padding: 0 2px 0 0 !important; pointer-events: auto;
  display: flex !important; flex-direction: row !important; align-items: center; justify-content: center; gap: 3px; border: 0 !important; border-radius: 12px !important; clip-path: none !important;
  color: #fbf3df !important; background: linear-gradient(180deg, #0c0603, #24150a) !important; box-shadow: 0 0 0 1.5px #1a0e05, inset 0 0 0 1px rgba(201, 154, 68, 0.6), 0 2px 4px rgba(0, 0, 0, 0.5) !important; transition: filter 0.15s; }
html body #combatBoard #rangePanel #rngBtns button[hidden] { display: none !important; }
html body #combatBoard #rangePanel #rngBtns button b { font: 800 13px/1 var(--body) !important; color: inherit !important; font-variant-numeric: tabular-nums; }
html body #combatBoard #rangePanel #rngBtns button small { display: none !important; }
html body #combatBoard #rangePanel #rngBtns .ri { width: 14px; height: 14px; flex: none; fill: none; stroke: #f0cd78; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
html body #combatBoard #rangePanel #rngBtns button.bxHz .ri { stroke: #9fd0ff; }
html body #combatBoard #rangePanel #rngBtns button[aria-pressed="true"] { color: #2a1606 !important; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.28) 42%, transparent 52%), linear-gradient(180deg, #fff1c4 0%, #f0cd78 30%, #d5a54a 52%, #b6852f 75%, #8f6420 100%) !important; box-shadow: 0 0 0 1.5px #1a0e05, inset 0 0 0 1px rgba(255, 240, 196, 0.6), 0 2px 4px rgba(0, 0, 0, 0.6) !important; }
html body #combatBoard #rangePanel #rngBtns button[aria-pressed="true"] .ri { stroke: currentColor; }
html body #combatBoard #rangePanel #rngBtns button.her { box-shadow: 0 0 0 1.5px #1a0e05, 0 0 0 3px #c2321f, inset 0 0 0 1px rgba(201, 154, 68, 0.6), 0 2px 4px rgba(0, 0, 0, 0.5) !important; }
html body #combatBoard #rangePanel #rngBtns button.her[aria-pressed="true"] { box-shadow: 0 0 0 1.5px #1a0e05, 0 0 0 3px #c2321f, inset 0 0 0 1px rgba(255, 240, 196, 0.6), 0 2px 4px rgba(0, 0, 0, 0.6) !important; }
html body #combatBoard #rangePanel #rngBtns button::after { content: none !important; display: none !important; }
html body #combatBoard #rangePanel #rngBtns button::before { content: none !important; display: none !important; }
html body #combatBoard #rangePanel #rngBtns button.her::before { content: "" !important; display: block !important; position: absolute !important; top: -9px !important; left: -8px !important; right: auto !important; bottom: auto !important; width: 19px !important; height: 15px !important; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; font-size: 0 !important; box-shadow: none !important;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 26'%3E%3Cg transform='translate(32 0) scale(-1 1)'%3E%3Cg stroke='%231a0e05' stroke-linejoin='round'%3E%3Cpath d='M11 3v14M20 2v15' stroke-width='1.6'/%3E%3Cpath d='M20 .8h6v4.4h-6z' fill='%23140a04' stroke-width='.7'/%3E%3Cpath d='M6 4.5q5 1.5 10 0v10q-5-1.5-10 0z' fill='%23a3271a' stroke-width='1.1'/%3E%3Cpath d='M15 3.5q5 1.5 10 0v11q-5-1.5-10 0z' fill='%23c2321f' stroke-width='1.1'/%3E%3Cpath d='M21 4l9 11h-8z' fill='%23a3271a' stroke-width='1'/%3E%3Cpath d='M1 16.5h30l-3.8 7H5z' fill='%232a1608' stroke-width='1.3'/%3E%3C/g%3E%3Ccircle cx='23' cy='3' r='1.1' fill='%23f2e6cc'/%3E%3Cpath d='M3.5 19h25' stroke='%23c2321f' stroke-width='1.4'/%3E%3C/g%3E%3C/svg%3E") center / 100% 100% no-repeat !important; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.9)); pointer-events: none; }
html body #combatBoard #rangePanel #rngBtns button.her:first-child::before { left: auto !important; right: -8px !important; }   /* skibet sidder på den inderste skulder, væk fra rammen */
html body #combatBoard #rangePanel #rngBtns button:disabled { opacity: 0.5; cursor: not-allowed; }
html body #combatBoard #rangePanel #rngBtns button:not(:disabled):hover { filter: brightness(1.2); }
html body #combatBoard #rangePanel #rngBtns button:focus-visible { outline: 2px solid #fff0c0 !important; outline-offset: 2px; }

