/* Dialogboksen: under skibet, nederst på midten, med en sømandsskrift der stadig er let at læse */
#eventBox {
  top: auto; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%);
  width: min(640px, calc(100vw - 32px)); max-height: 44vh;
  padding: 18px 24px 20px; gap: 12px; z-index: 16;
  animation: evPopLow 0.3s ease-out;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.55);
}
@keyframes evPopLow { from { opacity: 0; transform: translate(-50%, 14px); } }
#eventBox > h2 { font-size: clamp(1.6rem, 2.8vw, 2.1rem); line-height: 1.05; text-align: center; }
#eventBox p { font-family: "IM Fell English", Georgia, "Iowan Old Style", serif; font-size: clamp(1.08rem, 1.5vw, 1.22rem); line-height: 1.45; color: #f6ecd2; }
#eventBox .fx { gap: 6px; justify-content: center; }
#eventBox .fx span { font-size: 0.92rem; padding: 3px 10px; }

#eventBox .choices button { font-family: "IM Fell English", Georgia, serif; font-size: clamp(1rem, 1.35vw, 1.12rem); padding: 9px 14px; }
#eventBox .choices button small { font-family: var(--body); font-size: 0.85rem; }
@media (prefers-reduced-motion: reduce) { #eventBox { animation: none; } }

/* ---------- Opgaver på søkortet: målet får en klarere, pulserende guldring (12b-quests) ---------- */
#chartSvg .node.quest > circle:not(.qring):not(.qhalo) { stroke: #ffd65a; stroke-width: 3.2; filter: drop-shadow(0 0 4px rgba(255, 210, 90, 0.95)); }
#chartSvg .node.quest .qring { fill: none; stroke: #ffe28a; stroke-width: 2; opacity: 0.95; }
#chartSvg .node.quest .qhalo { fill: none; stroke: #ffd65a; stroke-width: 6; opacity: 0.22; transform-box: fill-box; transform-origin: center; animation: qhalo 1.8s ease-in-out infinite; }
#chartSvg .node.quest .qmark circle { fill: #2a1d08; stroke: #ffd65a; stroke-width: 1.6; }
#chartSvg .node.quest .qmark path { fill: none; stroke: #ffe28a; stroke-width: 2; stroke-linecap: round; }
#chartSvg .node.quest.visited { opacity: 1; }
@keyframes qhalo { 0%, 100% { opacity: 0.12; transform: scale(0.92); } 50% { opacity: 0.4; transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { #chartSvg .node.quest .qhalo { animation: none; } }
#chartQuest { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin: 2px 0 6px; padding: 5px 10px; border: 1px solid rgba(255, 214, 90, 0.45); border-radius: 6px; background: rgba(60, 42, 12, 0.45); font-size: 0.88rem; color: var(--paper); }
#chartQuest[hidden] { display: none; }
#chartQuest .qtag { font: 700 0.66rem var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: #2a1d08; background: #ffd65a; border-radius: 3px; padding: 1px 6px; }
#chartQuest b { font-family: var(--display); font-weight: 400; color: #ffe28a; }
#chartQuest .qdet { color: var(--muted); }
#nodeInfo .qinfo { color: #ffd65a; }

/* ---------- Søkortet: den sejlede vej står skarpt, de veje vi ikke tog bliver dæmpede ---------- */
#chartSvg .edge.trod { stroke: rgba(214, 178, 108, 0.95); stroke-width: 5; stroke-linecap: round; stroke-dasharray: none; opacity: 1; filter: none; }
#chartSvg .node.visited { opacity: 1; }
#chartSvg .node.visited > circle:not(.qring):not(.qhalo) { fill: #2a2214; stroke: #d6b26c; stroke-width: 3; filter: none; }
#chartSvg .node.passed { opacity: 0.28; }
#chartSvg .node.passed circle { stroke: #6d6450; }

/* ---------- Sekstanten: flådens linje nu og efter næste rejse, og punkter flåden når før os ---------- */
#chartSvg .sxNow { stroke: #ff5a3c; stroke-width: 2.5; }
#chartSvg .sxNext { stroke: #ffb04a; stroke-width: 2; stroke-dasharray: 8 6; }
#chartSvg .sxLbl { fill: #ff8a6a; font: 700 11px var(--body); letter-spacing: 0.08em; text-transform: uppercase; }
#chartSvg .sxLbl.next { fill: #ffc070; }
#chartSvg .node.doomed > circle:not(.qring):not(.qhalo) { stroke: #ff5a3c; stroke-dasharray: 4 3; }
#chartSvg .node.doomed::after { content: none; }

/* ===== Vi synker: blå kant, stigende vandlinje, bobler og varsel (updateFloodFx i 14) ===== */
#floodFx { position: fixed; inset: 0; pointer-events: none; z-index: 3; opacity: 0; transition: opacity 0.6s; --k: 0; overflow: hidden; }
#floodFx.on { opacity: 1; }
#floodFx .fvig { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 42%, rgba(10, 40, 70, 0) calc(62% - var(--k) * 30%), rgba(14, 58, 96, calc(0.25 + var(--k) * 0.45)) calc(85% - var(--k) * 20%), rgba(6, 26, 48, calc(0.55 + var(--k) * 0.35)) 100%); }
#floodFx .fline { position: absolute; left: -5%; right: -5%; bottom: 0; height: calc(2% + var(--k) * 24%); background: linear-gradient(180deg, rgba(90, 160, 205, 0.42), rgba(16, 60, 104, 0.72)); transition: height 0.8s ease-out; }
#floodFx .fline b { position: absolute; left: 0; right: 0; top: -14px; height: 16px; background: radial-gradient(14px 10px at 14px 16px, rgba(90, 160, 205, 0.42) 98%, transparent 100%) repeat-x; background-size: 28px 16px; animation: floodWave 2.4s linear infinite; }
#floodFx .fline::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: rgba(220, 240, 255, 0.55); }
@keyframes floodWave { to { background-position: 28px 0; } }
#floodFx .fbub { position: absolute; left: 0; right: 0; bottom: 0; height: calc(4% + var(--k) * 36%); }
#floodFx .fbub span { position: absolute; bottom: -12px; width: var(--s); height: var(--s); border-radius: 50%; border: 1.5px solid rgba(220, 240, 255, 0.7); background: rgba(220, 240, 255, 0.12); animation: floodBub 3s ease-in infinite; }
@keyframes floodBub { 0% { transform: translate(0, 0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(10px, calc(-1 * (60px + var(--k) * 300px))); opacity: 0; } }
#floodFx .ftxt { position: absolute; left: 50%; bottom: calc(4% + var(--k) * 24%); transform: translateX(-50%); text-align: center; opacity: 0; transition: opacity 0.4s; }
#floodFx .ftxt b { display: block; font: 400 2.2rem "Pirata One", var(--display, serif); color: #e8f6ff; text-shadow: 0 0 10px #0a3a66, 0 2px 0 #041a30; letter-spacing: 0.04em; }
#floodFx .ftxt small { display: block; font: italic 1rem "IM Fell English", serif; color: #cfe8ff; text-shadow: 0 1px 3px #041a30; }
#floodFx.dire .ftxt { opacity: 1; animation: floodPulse 1.1s ease-in-out infinite; }
#floodFx.dire .fvig { animation: floodVig 1.1s ease-in-out infinite; }
@keyframes floodPulse { 50% { transform: translateX(-50%) scale(1.06); } }
@keyframes floodVig { 50% { opacity: 0.7; } }
body #hullPlank #waterGauge.high { animation: wgShake 0.5s ease-in-out infinite; }
body #hullPlank #waterGauge.high .hgHead b { color: #9fd8ff !important; text-shadow: 0 0 6px #2a8adf; }
@keyframes wgShake { 25% { transform: translateX(-1.5px); } 75% { transform: translateX(1.5px); } }
@media (prefers-reduced-motion: reduce) { #floodFx *, body #hullPlank #waterGauge.high { animation: none !important; } }

/* ===== Piratbanderne på søkortet (12c-factions) ===== */

#chartSvg .node.nf-coast:not(.reach):not(.cur):not(.sel) > circle:not(.qring):not(.qhalo) { stroke: #6fa0e0; }
#chartSvg .node.nf-fen:not(.reach):not(.cur):not(.sel) > circle:not(.qring):not(.qhalo) { stroke: #a8d060; }
#chartSvg .node.nf-rime:not(.reach):not(.cur):not(.sel) > circle:not(.qring):not(.qhalo) { stroke: #cfeaff; }
#chartFactions { display: flex; flex-wrap: wrap; margin: 2px 0 6px; border-radius: 6px; border: 1px solid rgba(214, 178, 108, 0.3); }
#chartFactions .facChip { display: inline-flex; align-items: center; color: var(--paper); }
#chartFactions .facChip b { font-weight: 700; }
#chartFactions .facChip small { opacity: 0.85; font-size: 0.75rem; }
#chartFactions .facChip.st-hostile small { color: #ff8a6a; opacity: 1; }
#chartFactions .facChip.st-friendly small, #chartFactions .facChip.st-ally small { color: #9fe0a0; opacity: 1; }
#chartFactions .facBar { position: relative; display: inline-block; border-radius: 3px; background: linear-gradient(90deg, #a83a2a, #5a5246 45% 55%, #3e9a52); }
#chartFactions .facBar u { position: absolute; top: -2px; width: 3px; height: 9px; margin-left: -1.5px; background: #f6e7c4; border-radius: 1px; box-shadow: 0 0 2px #000; }
.facSig { flex: none; vertical-align: middle; }
#nodeInfo .facInfo { display: inline-flex; align-items: center; gap: 4px; font-size: 0.86rem; }
#nodeInfo .facInfo.coast b { color: #9cc4f0; } #nodeInfo .facInfo.fen b { color: #c4e48a; } #nodeInfo .facInfo.rime b { color: #e0f2ff; }
#chartQuest .qfac { font-size: 0.78rem; font-style: italic; opacity: 0.85; }

/* ===== Vektorikoner (SVGICON i 10-hud): bløde kanter i stedet for pixel ===== */
.px.vx { image-rendering: auto; shape-rendering: geometricPrecision; overflow: visible; }
.px.vx.flip { transform: scaleX(-1); }
.chip2 .px.vx, .chip2.mat .px.vx { filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.5)); }
.invItem .px.vx, .cico .px.vx, .wsIco .px.vx { filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.45)); }

/* ===== Artefakter: bjælke til højre for skrogplanken, kant efter sjældenhed (12d-artifacts) ===== */
#artifactBar { --r: #c9c2b0; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; max-width: 300px; padding: 6px 8px; margin-top: 4px; pointer-events: auto; flex: 0 1 auto;
  background: rgba(24, 14, 6, 0.72); border: 1px solid #6a4a22; border-radius: 6px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 220, 150, 0.06); }
#artifactBar[hidden], #artifactBar.off, body.menu #artifactBar { display: none !important; }
#artifactBar .artSlot {
  --r: #c9c2b0;
  width: 38px;
  height: 38px;
  padding: 4px;
  border-radius: 7px;
  cursor: help;
  background: radial-gradient(circle at 50% 40%, rgba(255, 240, 200, 0.12), rgba(0, 0, 0, 0.25)), #2a1a0c;
  border: 2px solid var(--r);
  box-shadow: 0 0 0 1px #0e0804, inset 0 0 6px rgba(0, 0, 0, 0.6);
  transition: transform 0.12s;
}
#artifactBar .artSlot:hover, #artifactBar .artSlot:focus-visible { transform: translateY(-2px) scale(1.06); outline: none; }
#artifactBar .artSlot .px { width: 100%; height: 100%; }
.r-common { --r: #c9c2b0; }
.r-rare { --r: #4f9be8; }
.r-exceptional { --r: #b26ae8; }
.r-unique { --r: #ffb52e; }
#artifactBar .artSlot.r-rare { box-shadow: 0 0 0 1px #0e0804, 0 0 6px rgba(79, 155, 232, 0.45), inset 0 0 6px rgba(0, 0, 0, 0.6); }
#artifactBar .artSlot.r-exceptional { box-shadow: 0 0 0 1px #0e0804, 0 0 9px rgba(178, 106, 232, 0.6), inset 0 0 6px rgba(0, 0, 0, 0.6); }
#artifactBar .artSlot.r-unique { box-shadow: 0 0 0 1px #0e0804, 0 0 12px rgba(255, 181, 46, 0.7), inset 0 0 6px rgba(0, 0, 0, 0.6); animation: artUnique 2.6s ease-in-out infinite; }
@keyframes artUnique { 50% { box-shadow: 0 0 0 1px #0e0804, 0 0 18px rgba(255, 200, 80, 0.95), inset 0 0 6px rgba(0, 0, 0, 0.6); } }
#artifactBar .artSlot.fresh { animation: artFresh 0.9s ease-out 3; }
@keyframes artFresh { 0% { transform: scale(1.5); filter: brightness(1.8); } 100% { transform: scale(1); filter: none; } }
#artTip { position: fixed; z-index: 40; width: 260px; padding: 8px 11px; pointer-events: none; border-radius: 6px; border: 2px solid var(--r);
  background: rgba(22, 13, 6, 0.96); color: #f4ead2; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6); font: 0.84rem var(--body); }
#artTip b { display: block; font: 400 1.15rem "Pirata One", var(--display, serif); color: var(--r); letter-spacing: 0.02em; }
#artTip em { display: block; font: 700 0.66rem var(--body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--r); opacity: 0.85; margin-bottom: 4px; }
#artTip p { margin: 0; line-height: 1.35; }
.invItem.art { border-left: 3px solid var(--r) !important; }
.invItem.art .px { outline: 2px solid var(--r); outline-offset: 1px; border-radius: 5px; background: #2a1a0c; padding: 2px; box-sizing: border-box; }
.invItem.art .n { color: var(--r); font-weight: 700; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; }
.fx span.art, #eventBox .fx span.art { border-color: var(--r) !important; color: #fff; box-shadow: 0 0 8px var(--r); }

/* ===== En post bliver ramt: rækken ryster og blinker (stationHit i 10-hud) ===== */
.srow { position: relative; }
.srow.hit, .srow.hitFire, .srow.hitCrew { animation: srowShake 0.45s cubic-bezier(.36,.07,.19,.97); }
.srow.hit::after, .srow.hitFire::after, .srow.hitCrew::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; animation: srowFlash 0.7s ease-out forwards; }
.srow.hit::after { box-shadow: inset 0 0 0 2px #ff4a32, inset 0 0 18px rgba(255, 60, 40, 0.55); background: rgba(255, 50, 30, 0.18); }
.srow.hitFire::after { box-shadow: inset 0 0 0 2px #ff9a2c, inset 0 0 18px rgba(255, 150, 40, 0.6); background: rgba(255, 140, 30, 0.2); }
.srow.hitCrew::after { box-shadow: inset 0 0 0 2px #d070ff, inset 0 0 18px rgba(200, 100, 255, 0.5); background: rgba(190, 90, 255, 0.16); }
@keyframes srowShake { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(3px); } 30%, 50%, 70% { transform: translateX(-5px) rotate(-0.6deg); } 40%, 60% { transform: translateX(5px) rotate(0.6deg); } }
@keyframes srowFlash { from { opacity: 1; } to { opacity: 0; } }
.srowDmg { position: absolute; right: 10px; top: 2px; z-index: 3; pointer-events: none; font: 700 0.95rem var(--body); color: #ff6a4a; text-shadow: 0 1px 0 #000, 0 0 6px rgba(255, 60, 30, 0.8); animation: srowDmg 1s ease-out forwards; }
.srowDmg.hitFire { color: #ffb050; }
.srowDmg.hitCrew { color: #e0a0ff; }
@keyframes srowDmg { from { transform: translateY(0) scale(1.2); opacity: 1; } to { transform: translateY(-20px) scale(1); opacity: 0; } }
.stag.hit { animation: srowShake 0.45s; filter: drop-shadow(0 0 6px #ff4a32); }
@media (prefers-reduced-motion: reduce) { .srow.hit, .srow.hitFire, .srow.hitCrew, .stag.hit, #artifactBar .artSlot { animation: none !important; } }

/* ===== Break away: spørg først (breakAway i 14) ===== */
#breakAsk { position: fixed; left: 50%; top: 34%; transform: translateX(-50%); z-index: 30; width: 270px; padding: 10px 12px; text-align: center;
  background: rgba(30, 16, 8, 0.97); border: 2px solid #c9952a; border-radius: 8px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6); pointer-events: auto; }
#breakAsk[hidden] { display: none !important; }
#breakAsk.on { animation: baPop 0.18s ease-out; }
body #combatBoard #breakPanel #breakAsk small, body #breakPanel #breakAsk small { grid-area: auto; white-space: normal; overflow: visible; font: 0.82rem var(--body); color: #e8dcc0; text-align: center; }
#breakAsk b { display: block; font: 400 1.25rem "Pirata One", var(--display, serif); color: #ffd98a; }
#breakAsk small { display: block; margin: 2px 0 8px; font-size: 0.8rem; color: #e8dcc0; }
#breakAsk .baBtns { display: flex; gap: 6px; justify-content: center; }
#breakAsk .baBtns button { flex: 1; padding: 5px 6px; font-size: 0.82rem; }
@keyframes baPop { from { transform: translateX(-50%) scale(0.9); opacity: 0; } }
body.menu #breakAsk { display: none !important; }

/* Biomes use terrain color; political territories use patterns and flags. */

/* Minimal enemy overlay: large station icons, existing targeting/state hooks. */
body #enemyPanel .eBadges .vb {
  width:48px;height:48px;padding:3px 5px !important;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
  border:0 !important;border-radius:50%;background:transparent !important;box-shadow:none !important;
}
body #enemyPanel .eBadges .vb .vbh { justify-content:center; }
body #enemyPanel .eBadges .vb .vbh b,
body #enemyPanel .eBadges .vb .vbs { display:none; }
body #enemyPanel .eBadges .vb .sti { width:34px;height:34px;filter:drop-shadow(0 2px 3px #000) drop-shadow(0 0 3px #000); }
body #enemyPanel .eBadges .vb .vbb { width:28px;height:3px;flex:none;border-radius:3px; }
body #enemyPanel .eBadges .vb .vba { position:absolute;top:-5px;right:-7px;text-shadow:0 1px 3px #000; }
body #enemyPanel .eBadges .vb:hover,
body #enemyPanel .eBadges .vb.hov,
body #enemyPanel .eBadges .vb:focus-visible { background:rgba(255,240,190,.1) !important;outline:2px solid #fff1cd;outline-offset:1px; }
body #enemyPanel .eBadges .vb.aimed { outline-offset:1px; }
body #enemyPanel .eBadges .vb.burning .sti { filter:drop-shadow(0 0 5px #ff531e) drop-shadow(0 1px 2px #000); }
body #enemyPanel .eBadges .vb.hit .sti { filter:brightness(1.8) drop-shadow(0 0 5px #fff); }
body #enemyPanel .eBadges .vb.wrecked .sti { opacity:.45;filter:grayscale(1) drop-shadow(0 1px 2px #000); }
body #enemyPanel #epAffiliation { display:inline-flex;align-items:center;gap:6px;margin:5px 0 3px;padding:3px 8px;border-left:3px solid var(--affiliation);background:rgba(7,13,20,.75);color:var(--affiliation);font:700 .72rem var(--body);letter-spacing:.09em;text-transform:uppercase; }
body #enemyPanel #epAffiliation[hidden] { display:none; }
body #enemyPanel #epNote:empty,body #enemyPanel #eGunsNote:empty { display:none; }

/* Shield layers and compact gun names, with readable station details. */

body #enemyPanel #eLayers { display:flex; align-items:stretch; }
body #enemyPanel .bulwarkShield { display:block;flex:1;min-width:0;height:100%;overflow:visible; }
body #enemyPanel .shieldEmpty { fill:rgba(6,12,18,.55); }
body #enemyPanel .shieldFill { fill:#d6b26c;transition:y .15s linear; }
body #enemyPanel .shieldEdge { fill:none;stroke:#e1c68e;stroke-width:2;stroke-linejoin:round; }
body #enemyPanel .eGunsHead { display:none; }
body #enemyPanel #eGuns .eg { display:flex;flex-direction:column;align-items:stretch;gap:5px;padding:7px 8px; }
body #enemyPanel #eGuns .egn { font-size:.8rem; }
body #enemyPanel #eGuns .bar { height:11px;width:100%;border-radius:4px; }
body #enemyPanel #eGuns .egt { display:none; }
body #enemyPanel #eInfo { height:auto;min-height:0;max-height:210px;overflow:auto;font-size:.92rem;line-height:1.4;padding:10px 12px; }
body #enemyPanel #eInfo .eh { flex-wrap:wrap; }
body #enemyPanel #eInfo .eh b { font-size:1rem; }
body #enemyPanel #eInfo .k,body #enemyPanel #eInfo .now { font-size:.84rem; }
body #enemyPanel #eInfo:empty { display:none; }
#icoGold .px,#icoFood .px { width:26px;height:26px; }

/* Small free-standing kite shields, shared by both ships. */
.shieldLayers { display:flex;align-items:center;gap:3px;flex-wrap:wrap; }
.shieldLayers .bulwarkShield { display:block;flex:0 0 27px;width:27px;height:34px;overflow:visible;filter:drop-shadow(0 2px 2px #000); }
.shieldLayers .shieldEmpty { fill:#111b23;fill-opacity:.6; }
.shieldLayers .shieldFill { fill:#cfac62;transition:y .15s linear; }
.shieldLayers .shieldEdge { fill:none;stroke:#e6cc92;stroke-width:2;stroke-linejoin:round; }
body #enemyPanel header { flex-wrap:wrap;gap:6px 10px; }
body #enemyPanel #eLayers { width:auto;height:auto;min-height:34px;gap:3px;margin-left:auto;align-self:center;background:none;border:0;box-shadow:none; }
body #enemyPanel #eLayers .bulwarkShield { flex:0 0 27px;width:27px;height:34px; }
#ourLayers { min-height:34px; }
#score[hidden] { display:none !important; }
/* A lit target area and bright icon replace the red target rectangle. */
body #enemyPanel .eOver .vz.aimed { fill:rgba(255,218,113,.4);stroke:none;filter:drop-shadow(0 0 7px #ffd879);animation:targetGlow 1.6s ease-in-out infinite alternate; }
body #enemyPanel .eBadges .vb.aimed { outline:0 !important;background:radial-gradient(circle,rgba(255,224,142,.32),transparent 72%) !important;box-shadow:none !important; }
body #enemyPanel .eBadges .vb.aimed .sti { filter:brightness(1.5) drop-shadow(0 0 5px #ffe6a1) drop-shadow(0 0 10px #dcb253); }
body #enemyPanel .eg.aim,body #enemyPanel .egb.aim { outline:0 !important;border-color:transparent !important;box-shadow:0 0 12px rgba(255,218,113,.65) !important;background:rgba(210,157,54,.25) !important; }
body #enemyPanel .eOver .vret .r1,body #enemyPanel .eOver .vret path { stroke:#ffe6a1; }
body #enemyPanel .eOver .vret .r2 { fill:#ffe6a1; }
body #enemyPanel .eOver .vret rect { stroke:none;fill:rgba(20,16,7,.7); }
@keyframes targetGlow { from { fill:rgba(255,218,113,.28); } to { fill:rgba(255,235,171,.5); } }
@media(prefers-reduced-motion:reduce){body #enemyPanel .eOver .vz.aimed { animation:none; }}

.px.currencyCoin { object-fit:contain;image-rendering:pixelated; }

/* små knapper i postrækkerne (Rally!, builds' knapper) */
.srow .dgb { margin-left: 3px; }
.srow .dgb:disabled { opacity: .45; cursor: not-allowed; }

/* Builds (12e): et artefakt med en aktiv, udløst effekt lyser; data-t = nedtælling eller opsparing */
#artifactBar .artSlot { position: relative; }
#artifactBar .artSlot.on { box-shadow: 0 0 0 2px #ffd36a, 0 0 12px rgba(255, 196, 80, .75); }
#artifactBar .artSlot[data-t]:not([data-t=""])::after { content: attr(data-t); position: absolute; right: -4px; bottom: -5px; min-width: 14px; padding: 0 3px; border-radius: 7px; background: #2a1a0c; color: #ffe2a0; font: 700 10px/14px "Alegreya Sans", sans-serif; text-align: center; pointer-events: none; }

/* Signal Book (12e): en post, hendes ladte kanoner sigter på */
.srow.incoming { box-shadow: inset 3px 0 0 #ff9a3c; }
.srow.incoming .sn::after { content: " ⚠"; color: #ffb35a; }

/* Ship's log (12f): stats over alt */
#shipLog { position: fixed; inset: 0; z-index: 31; display: flex; align-items: center; justify-content: center; background: rgba(6, 12, 22, 0.6); padding: max(16px, env(safe-area-inset-top, 0px)) 16px max(16px, env(safe-area-inset-bottom, 0px)); }
#shipLog > .panel { width: min(1080px, 100%); max-height: 100%; overflow: hidden; padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 10px; }
#shipLog h2 { margin: 0; display: flex; align-items: baseline; gap: 10px; font-family: var(--display); font-weight: 400; font-size: 1.6rem; color: var(--brass, #e2b45a); }
#shipLog h2 small { font: 0.8rem var(--body); color: var(--muted, #c9bfa8); flex: 1; }
#shipLog .logTabs { display: flex; flex-wrap: wrap; gap: 4px; }
#shipLog .logTabs button { padding: 4px 12px; border-radius: 4px 4px 0 0; border: 1px solid rgba(226, 180, 90, 0.35); border-bottom: 0; background: rgba(10, 18, 28, 0.55); color: #e8dcc0; font: 600 0.85rem var(--body); cursor: pointer; }
#shipLog .logTabs button[aria-selected="true"] { background: rgba(226, 180, 90, 0.22); color: #ffe3a0; border-color: rgba(226, 180, 90, 0.8); }
#shipLog .logBody { overflow: auto; min-height: 0; border-top: 1px solid rgba(226, 180, 90, 0.4); padding-top: 8px; }
#shipLog .logNote { margin: 0 0 8px; font-size: 0.82rem; color: #d6c6a3; }
#shipLog h3 { margin: 12px 0 6px; font: 400 1.1rem var(--display); color: #e2b45a; }
#shipLog .logTbl { width: 100%; border-collapse: collapse; font-size: 0.84rem; color: #f1e6cc; }
#shipLog .logTbl th, #shipLog .logTbl td { padding: 4px 8px; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(226, 180, 90, 0.14); }
#shipLog .logTbl thead th { position: sticky; top: 0; background: #241a10; color: #e2b45a; font-weight: 700; font-size: 0.78rem; letter-spacing: .04em; text-transform: uppercase; }
#shipLog .logTbl tbody th { color: #e2c98c; font-weight: 600; white-space: nowrap; }
#shipLog .logTbl td.n, #shipLog .logTbl td.d { color: #c9bfa8; font-size: 0.78rem; }
#shipLog .logTbl tr.have td:first-child { color: #ffe3a0; font-weight: 700; }
#shipLog .logTbl tr.have td:first-child::before { content: "● "; color: #9fe0a0; }
#shipLog .logArts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
#shipLog .logArt { display: flex; gap: 8px; padding: 6px 8px; border-radius: 6px; background: rgba(10, 18, 28, 0.5); border: 1px solid rgba(201, 194, 176, 0.4); }
#shipLog .logArt.r-rare { border-color: #4f9be8; } #shipLog .logArt.r-exceptional { border-color: #b26ae8; } #shipLog .logArt.r-unique { border-color: #ffb52e; }
#shipLog .logArt i { flex: 0 0 auto; width: 30px; height: 30px; } #shipLog .logArt i svg { width: 30px; height: 30px; }
#shipLog .logArt p { margin: 2px 0 0; font-size: 0.78rem; color: #d6c6a3; } #shipLog .logArt small { color: #c9bfa8; }
@media (max-width: 700px) { #shipLog .logTbl { font-size: 0.74rem; } #shipLog .logTbl th, #shipLog .logTbl td { padding: 3px 4px; } }

/* Søkortet: bandernes farvande (12c) — farvet tone, kant og glød, vimpel med segl */
#chartSvg .facTerritory .facTint { opacity: 0.07; }

#chartSvg .facTerritory.st-friendly .facTint, #chartSvg .facTerritory.st-ally .facTint { opacity: 0.11; }

#chartFactions { justify-content: center; align-items: center; gap: 8px 12px; padding: 8px 10px; background: linear-gradient(180deg, rgba(16, 27, 40, 0.75), rgba(10, 18, 28, 0.6)); border-color: rgba(214, 178, 108, 0.45); }
#chartFactions .facChip { position: relative; gap: 10px; padding: 5px 12px 5px 5px; border-radius: 22px; background: rgba(8, 14, 22, 0.7); border: 1px solid var(--fc); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.4), 0 0 10px color-mix(in srgb, var(--fc) 25%, transparent); font-size: 0.9rem; }
#chartFactions .facChip .facMed { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, color-mix(in srgb, var(--fs) 85%, white 15%), #0b141e 80%); border: 2px solid var(--fc); }
#chartFactions .facChip .facTxt { display: flex; flex-direction: column; line-height: 1.1; }
#chartFactions .facChip .facTxt b { font: 400 1.05rem "Pirata One", Georgia, serif; letter-spacing: 0.02em; }
#chartFactions .facChip .facTxt small { font-size: 0.7rem; letter-spacing: 0.05em; text-transform: uppercase; color: #c9bfa8; opacity: 1; }
#chartFactions .facChip .facRep { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
#chartFactions .facChip .facRep em { font-style: normal; font-size: 0.72rem; color: #e8dcc0; }
#chartFactions .facChip.st-hostile .facRep em { color: #ff9a7a; } #chartFactions .facChip.st-friendly .facRep em, #chartFactions .facChip.st-ally .facRep em { color: #a8e6a8; }
#chartFactions .facBar { width: 84px; height: 6px; }

/* Havn: portræt af sømænd i kroen, og fuld tekst ved hover på klippede kort */
#port .card .cico.face { width: 32px; height: 34px; padding: 0; overflow: hidden; background: #120c08; border-width: 2px; line-height: 0; }
#port .card .cico.face img { width: 100%; height: 100%; display: block; image-rendering: pixelated; image-rendering: crisp-edges; }
#port .card:hover { box-shadow: inset 0 0 0 1px rgba(242, 207, 122, 0.75), inset 0 2px 6px rgba(0, 0, 0, 0.5); }
#portTip { position: fixed; z-index: 60; pointer-events: none; display: flex; flex-direction: column; gap: 3px; padding: 7px 10px; box-sizing: border-box;
  background: rgba(14, 10, 6, 0.96); border: 1.5px solid #c9a04a; border-radius: 6px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6); font-size: 0.78rem; line-height: 1.35; color: #e8dcc0; }
#portTip[hidden] { display: none; }
#portTip b { font-size: 0.82rem; color: #f2cf7a; }

/* ===== Indhold v2: knust post, bulwarks nede, mast nede (14g-content.js) ===== */
#wreckStamp { position: fixed; left: 50%; top: 27%; z-index: 14; pointer-events: none; display: grid; justify-items: center; gap: 2px; opacity: 0;
  transform: translate(-50%, -50%); text-align: center; width: min(560px, calc(100vw - 32px)); }
#wreckStamp .wsIcon { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; line-height: 1; color: #ffe39a;
  background: radial-gradient(circle at 35% 30%, #d9443a, #7a1410 70%); border: 3px solid #f2cf7a;
  box-shadow: 0 0 0 3px rgba(40, 6, 4, 0.8), 0 0 28px rgba(255, 120, 60, 0.75), inset 0 -4px 8px rgba(0, 0, 0, 0.45); }
#wreckStamp .wsIcon .px { width: 36px; height: 36px; filter: drop-shadow(0 1px 0 #3a0a06); }
#wreckStamp .wsIcon .px * { fill: #ffe39a; stroke: #ffe39a; }
#wreckStamp b { font: 400 clamp(2rem, 4.6vw, 3.3rem)/1 "Pirata One", var(--display); color: #ffd36a; letter-spacing: 0.03em;
  text-shadow: 0 3px 0 #5a1208, 0 0 18px rgba(255, 110, 50, 0.6), 0 4px 18px rgba(0, 0, 0, 0.8); text-transform: uppercase; }
#wreckStamp small { font: italic 400 1rem "IM Fell English", var(--display); color: #fff1d6; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.95); }
#wreckStamp.show { animation: wreckStampIn var(--wsDur, 2.2s) cubic-bezier(.2, .9, .3, 1) forwards; }
#wreckStamp.small b { font-size: clamp(1.4rem, 3vw, 2.1rem); }
#wreckStamp.small .wsIcon { width: 46px; height: 46px; font-size: 22px; }
#wreckStamp.gold .wsIcon { background: radial-gradient(circle at 35% 30%, #f2cf7a, #8a5a14 72%); color: #3a2208; border-color: #fff1c4; }
#wreckStamp.gold b { color: #fff1c4; text-shadow: 0 3px 0 #6a4210, 0 0 16px rgba(255, 210, 110, 0.6), 0 4px 18px rgba(0, 0, 0, 0.8); }
#wreckStamp.ours { top: 33%; }
#wreckStamp.ours .wsIcon { background: radial-gradient(circle at 35% 30%, #4a5462, #141a22 72%); border-color: #ff7a5a; box-shadow: 0 0 0 3px rgba(40, 6, 4, 0.8), 0 0 22px rgba(255, 60, 30, 0.6); }
#wreckStamp.ours b { color: #ff8a6a; font-size: clamp(1.4rem, 3vw, 2.2rem); text-shadow: 0 2px 0 #2a0604, 0 4px 16px rgba(0, 0, 0, 0.9); }
@keyframes wreckStampIn {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(2.2) rotate(-6deg); }
  9% { opacity: 1; transform: translate(-50%, -50%) scale(0.92) rotate(1deg); }
  14% { transform: translate(-50%, -50%) scale(1.04) rotate(-0.5deg); }
  20%, 78% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0); }
  100% { opacity: 0; transform: translate(-50%, -58%) scale(0.98); }
}
.floater.wreck b { font-size: 1.25rem; color: #ffd36a; text-shadow: 0 0 10px rgba(255, 140, 60, 0.9), 0 2px 4px #000; letter-spacing: 0.06em; }
/* hendes badge i panelet: et kort udbrud når posten knuses, derefter et rødt kryds */
body #enemyPanel .eBadges .vb.burst { animation: vbBurst 0.9s ease-out; }
@keyframes vbBurst {
  0% { transform: scale(1); filter: brightness(2.4) drop-shadow(0 0 0 #ffc65a); }
  25% { transform: scale(1.4); filter: brightness(1.8) drop-shadow(0 0 14px #ff7a3a); }
  100% { transform: scale(1); filter: none; }
}
body #enemyPanel .eBadges .vb.wrecked::after { content: "✕"; position: absolute; inset: 0; display: grid; place-items: center; font: 700 30px/1 var(--body);
  color: #ff4a2a; text-shadow: 0 0 6px #000, 0 0 2px #000; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { #wreckStamp.show { animation-duration: 0.01s; opacity: 1; } body #enemyPanel .eBadges .vb.burst { animation: none; } }

/* ===== Havnen som faner + overskueligt værksted (12f portTabsRender / wsBuildHTML) ===== */
#port > .panel { height: min(700px, calc(100vh - 24px)); }
#port .portGrid.ptabs { display: grid; grid-template-columns: 200px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 14px; flex: 1; min-height: 0; }
#port .portGrid.ptabs > section { grid-column: 2; grid-row: 1; min-height: 0; overflow: auto; padding-right: 4px; }
#port .portGrid.ptabs > section.off { display: none !important; }
.portNav { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; gap: 6px; }
.portNav button { position: relative; display: flex; align-items: center; gap: 10px; padding: 9px 10px; text-align: left; border: 0 !important; border-radius: 6px;
  background: var(--slot-bg) !important; box-shadow: inset 0 0 0 1px rgba(201, 160, 74, 0.35), inset 0 2px 6px rgba(0, 0, 0, 0.5); color: #e8d6a8; }
.portNav button[aria-selected="true"] { background: linear-gradient(180deg, rgba(92, 60, 20, 0.92), rgba(46, 28, 10, 0.92)) !important;
  box-shadow: inset 0 0 0 2px var(--gold-l), inset 4px 0 0 var(--gold-l), 0 0 12px rgba(242, 207, 122, 0.35); color: #fff; }
.portNav button.empty:not([aria-selected="true"]) { opacity: 0.6; }
.pnIco { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 6px; border: 1.5px solid #c9a04a; background: rgba(10, 6, 2, 0.6); }
.pnIco .px { width: 26px; height: 26px; }
.pnTx { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.pnTx b { font: 400 1.15rem "Pirata One", var(--display); letter-spacing: 0.03em; color: var(--gold-l); }
.pnTx small { font-size: 0.72rem; color: #c9b88e; }
.pnBadge { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); min-width: 20px; height: 20px; padding: 0 5px; box-sizing: border-box; border-radius: 999px;
  font: 700 0.72rem/20px var(--body); font-style: normal; text-align: center; color: #1a1006; background: linear-gradient(180deg, #ffe7a8, #d6a64a); box-shadow: 0 0 0 1px #4a2e10, 0 0 8px rgba(242, 207, 122, 0.45); }
#port .ptabs h3 { font-size: 1.35rem; margin: 0 0 8px; }
#port .ptabs h3 small { display: inline; margin-left: 8px; font-size: 0.78rem; }
#port .ptabs .cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 6px; align-content: start; }
#port .ptabs .card { padding: 7px 9px; gap: 8px; align-items: center; }
#port .ptabs .card .ci b { font-size: 0.9rem; }
#port .ptabs .card .ci > span:not(.pips) { display: block; -webkit-line-clamp: unset; overflow: visible; font-size: 0.76rem; line-height: 1.3; }
#port .ptabs .card button { min-width: 70px; padding: 6px 8px; font-size: 0.82rem; }
#port .ptabs .pnone { grid-column: 1 / -1; }
.psub { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin: 8px 0 2px; font: 700 0.68rem var(--body); letter-spacing: 0.16em; text-transform: uppercase; color: #c9a04a; }
.psub:first-child { margin-top: 0; }
.psub::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(201, 160, 74, 0.55), transparent); }
.psub small { font-weight: 400; letter-spacing: 0.04em; text-transform: none; color: var(--muted); }
.yardHint { margin-top: 8px !important; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.yardHint .mini, .specBox .mini { font-style: normal; padding: 3px 9px; font-size: 0.76rem; }
.spTag { font: 700 0.6rem var(--body); font-style: normal; letter-spacing: 0.06em; text-transform: uppercase; color: #9fd8ff; margin-left: 4px; white-space: nowrap; }
.card .opens { display: block; margin-top: 2px; font-size: 0.68rem; font-style: italic; color: #a8e6bf; }
.card .opens::before { content: "→ "; font-style: normal; }
@media (max-width: 760px) {
  #port > .panel { height: auto; }
  #port .portGrid.ptabs { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  #port .portGrid.ptabs > section { grid-column: 1; grid-row: 2; overflow: visible; }
  .portNav { grid-row: 1; flex-direction: row; overflow-x: auto; }
  .portNav button { flex: 1 0 auto; padding: 6px 30px 6px 6px; }
  .pnIco { width: 28px; height: 28px; } .pnIco .px { width: 20px; height: 20px; }
  .pnTx b { font-size: 0.98rem; }
}

/* værkstedet: grupper, filter, specialiseringsbokse og "Fitted"-mærker */
#workshop > .panel { width: min(1120px, 100%); }
#wsBuild { display: flex !important; flex-direction: column; gap: 8px; }
.wsFilter { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wsFilter button { padding: 4px 11px; font-size: 0.8rem; border-radius: 999px; }
.wsFilter button b { margin-left: 4px; color: var(--gold-l); font-variant-numeric: tabular-nums; }
.wsFilter button[aria-pressed="true"] { background: linear-gradient(180deg, #ffe7a8, #d6a64a) !important; color: #1a1006 !important; }
.wsFilter button[aria-pressed="true"] b { color: #4a2e10; }
.wsFilter span { font-size: 0.72rem; color: var(--muted); font-style: italic; margin-left: 4px; }
.wsCat { border-radius: 8px; background: rgba(0, 0, 0, 0.18); box-shadow: inset 0 0 0 1px rgba(201, 160, 74, 0.22); padding: 4px 6px 7px; }
.wsCat.shut { padding-bottom: 4px; }
.wsCat h4 { margin: 0 0 5px; }
.wsCat.shut h4 { margin: 0; }
.wsCat h4 button { width: 100%; display: flex; align-items: center; gap: 8px; padding: 3px 4px; background: none !important; border: 0 !important; box-shadow: none !important; text-align: left; }
.wcIco { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 5px; border: 1.5px solid #c9a04a; background: rgba(10, 6, 2, 0.6); flex: none; }
.wcIco .px { width: 19px; height: 19px; }
.wcName { font: 400 1.08rem "Pirata One", var(--display); letter-spacing: 0.03em; color: var(--gold-l); white-space: nowrap; }
.wcProg { flex: 1; max-width: 140px; height: 5px; margin-left: 4px; border-radius: 3px; background: rgba(0, 0, 0, 0.55); box-shadow: inset 0 0 0 1px rgba(142, 100, 36, 0.6); overflow: hidden; }
.wcProg i { display: block; height: 100%; background: linear-gradient(90deg, #6fd860, #b9f7a8); }
.wsCat h4 small { font: 400 0.7rem var(--body); color: var(--muted); white-space: nowrap; }
.wcArrow { margin-left: auto; color: var(--gold-l); font-size: 0.8rem; }
.wsCards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 5px; }
.specBox { grid-column: 1 / -1; padding: 6px; border-radius: 7px; border: 1px dashed rgba(159, 216, 255, 0.55); background: rgba(40, 80, 110, 0.14); }
.specBox header { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 0 2px 5px; }
.specBox header b { font: 700 0.7rem var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: #9fd8ff; }
.specBox header small { font-size: 0.7rem; color: var(--muted); }
.specBox .wsCards:empty { display: none; }
.specChosen { display: flex; }
.fitted { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.fitted > small { font: 700 0.62rem var(--body); letter-spacing: 0.14em; text-transform: uppercase; color: #8fd078; margin-right: 2px; }
.fchip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px 2px 3px; border-radius: 999px; font-size: 0.72rem; color: #d8efc8;
  background: rgba(60, 110, 40, 0.28); box-shadow: inset 0 0 0 1px rgba(143, 208, 120, 0.5); cursor: help; }
.fchip .px { width: 16px; height: 16px; }
.fchip i { font-style: normal; font-size: 0.55rem; letter-spacing: 0.08em; color: #b9f7a8; }
.fchip::after { content: "✓"; color: #8fd078; font-weight: 700; margin-left: 1px; }

/* ===== Sejrsskærmen i afsnit (showDialog { head }) og tavlen med bytte der hales om bord (#haulBoard, 14-battle) ===== */
#eventBox .fx .fxHead { flex-basis: 100%; display: flex; align-items: center; gap: 10px; margin-top: 6px; padding: 0 !important; background: none !important; border: 0 !important; box-shadow: none !important;
  font: 700 0.68rem var(--body) !important; letter-spacing: 0.16em; text-transform: uppercase; color: #c9a04a; }
#eventBox .fx .fxHead:first-child { margin-top: 0; }
#eventBox .fx .fxHead::before, #eventBox .fx .fxHead::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(201, 160, 74, 0.6), transparent); }
#eventBox .fx .fxHead.secTask { color: #ffe08a; }
#eventBox .fx .fxHead.secRen { color: #c9a8ff; }
#eventBox .fx .fxHead.secBat { color: #9fb8cc; }
#eventBox .fx span.secTask:not(.fxHead) { border-color: #e2b45a !important; background: rgba(120, 84, 20, 0.45) !important; color: #fff3d0; }
#eventBox .fx span.secRen:not(.fxHead) { border-color: rgba(201, 168, 255, 0.6); }
#eventBox .fx span.secBat:not(.fxHead) { opacity: 0.85; font-size: 0.82rem; }

#haulBoard { position: fixed; z-index: 28; right: max(16px, env(safe-area-inset-right, 0px)); top: 24%; width: 250px; max-width: calc(100vw - 32px); padding: 9px 11px 10px; box-sizing: border-box;
  border-radius: 8px; background: linear-gradient(180deg, rgba(40, 24, 8, 0.94), rgba(18, 10, 4, 0.94)); box-shadow: inset 0 0 0 2px #c9a04a, inset 0 0 0 3px rgba(0, 0, 0, 0.5), 0 10px 30px rgba(0, 0, 0, 0.55);
  pointer-events: none; animation: hbIn 0.35s ease-out; transition: opacity 0.6s ease, transform 0.6s ease; }
#haulBoard.out { opacity: 0; transform: translateX(16px); }
#haulBoard .hbHead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
#haulBoard .hbHead b { font: 400 1.12rem "Pirata One", var(--display); letter-spacing: 0.03em; color: var(--gold-l); }
#haulBoard .hbHead small { font-size: 0.72rem; color: #c9b88e; font-variant-numeric: tabular-nums; }
#haulBoard .hbBar { height: 5px; margin: 4px 0 7px; border-radius: 3px; background: rgba(0, 0, 0, 0.6); box-shadow: inset 0 0 0 1px rgba(142, 100, 36, 0.6); overflow: hidden; }
#haulBoard .hbBar i { display: block; height: 100%; background: linear-gradient(90deg, #d6a64a, #ffe7a8); transition: width 0.4s ease; }
#haulBoard.done .hbBar i { background: linear-gradient(90deg, #4fb83e, #b9f7a8); }
#haulBoard ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
#haulBoard li { position: relative; display: flex; align-items: center; gap: 8px; padding: 3px 6px 3px 3px; border-radius: 5px; background: rgba(255, 255, 255, 0.05); }
#haulBoard li.bump { animation: hbBump 0.7s ease-out; }
#haulBoard li.neg { color: #ffb09a; }
#haulBoard .hbIco { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 5px; border: 1.5px solid #c9a04a; background: rgba(10, 6, 2, 0.6); }
#haulBoard .hbIco .px { width: 19px; height: 19px; }
#haulBoard .hbName { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 0.82rem; line-height: 1.15; color: #f1e4c4; }
#haulBoard .hbName small { font-size: 0.64rem; color: #a8946a; }
#haulBoard li b { font: 700 1rem var(--body); color: #ffe08a; font-variant-numeric: tabular-nums; }
#haulBoard li b.ok { color: #8fd078; }
#haulBoard .hbAdd { position: absolute; right: 6px; top: -2px; font: 700 0.72rem var(--body); font-style: normal; color: #b9f7a8; animation: hbAdd 1s ease-out forwards; }
@keyframes hbIn { from { opacity: 0; transform: translateX(24px); } }
@keyframes hbBump { 0% { background: rgba(255, 224, 138, 0.45); transform: scale(1.04); } 100% { background: rgba(255, 255, 255, 0.05); transform: none; } }
@keyframes hbAdd { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-16px); } }
@media (prefers-reduced-motion: reduce) { #haulBoard, #haulBoard li.bump, #haulBoard .hbAdd { animation: none; } }
@media (max-width: 760px) { #haulBoard { top: calc(70px + env(safe-area-inset-top, 0px)); width: 220px; } }

/* Hændelsesvalg v2 (12-voyage showDialog): [medaljon] [mærke/tekst/note] [pris som ikoner]; særlige valg i måneblå med glans */
#eventBox .choices { gap: 7px; }
#eventBox .choices button.evc {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  text-align: left; padding: 9px 12px 9px 10px; border: 0; border-radius: 6px;
  color: #f3e3bf; background-color: rgba(42, 26, 12, 0.92);
  background-image: linear-gradient(90deg, rgba(226, 180, 90, 0.1), rgba(226, 180, 90, 0) 55%), linear-gradient(180deg, rgba(255, 220, 160, 0.08) 0 45%, rgba(0, 0, 0, 0.16) 45% 100%);
  box-shadow: inset 0 0 0 1px rgba(201, 160, 74, 0.55), inset 0 0 0 2px rgba(0, 0, 0, 0.45), 0 2px 4px rgba(0, 0, 0, 0.35);
  transition: transform 0.16s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
  animation: evcIn 0.32s ease-out backwards; animation-delay: calc(var(--i, 0) * 45ms + 80ms);
}
#eventBox .choices button.evc::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--gold-l), var(--gold-d)); transform: scaleY(0.3); opacity: 0.45;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
#eventBox .choices button.evc:hover:not(:disabled), #eventBox .choices button.evc:focus-visible:not(:disabled) {
  transform: translateX(3px); color: #fff; background-color: rgba(74, 46, 18, 0.97); outline: none;
  box-shadow: inset 0 0 0 1px var(--gold-l), inset 0 0 0 2px rgba(0, 0, 0, 0.45), 0 0 14px rgba(242, 207, 122, 0.32), 0 4px 10px rgba(0, 0, 0, 0.4);
}
#eventBox .choices button.evc:hover:not(:disabled)::before, #eventBox .choices button.evc:focus-visible:not(:disabled)::before { transform: scaleY(1); opacity: 1; }
#eventBox .choices button.evc:active:not(:disabled) { transform: translateX(3px) scale(0.99); }

#eventBox .evc .evIco { position: relative; width: 30px; height: 30px; display: grid; place-items: center; }
#eventBox .evc .evIco .px { width: 21px; height: 21px; }
#eventBox .evc .evIco.dot::before {
  content: ""; width: 7px; height: 7px; transform: rotate(45deg); border: 1.5px solid #c9a04a; background: rgba(201, 160, 74, 0.15);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
#eventBox .evc:hover:not(:disabled) .evIco.dot::before, #eventBox .evc:focus-visible:not(:disabled) .evIco.dot::before {
  transform: rotate(45deg) scale(1.35); background: var(--gold-l); border-color: var(--gold-l); box-shadow: 0 0 8px rgba(255, 227, 160, 0.85);
}
#eventBox .evc .evMain { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
#eventBox .evc .evTxt { line-height: 1.25; }
#eventBox .choices button.evc small { font: 400 0.8rem var(--body); color: #c4b28a; white-space: normal; line-height: 1.25; }
#eventBox .evc .evTag {
  display: flex; align-items: center; gap: 6px; font: 700 0.62rem var(--body); font-style: normal; letter-spacing: 0.16em; text-transform: uppercase;
  color: #b4e1ff; text-shadow: 0 0 8px rgba(120, 200, 255, 0.65);
}
#eventBox .evc .evTag::before { content: "✦"; font-size: 0.7rem; letter-spacing: 0; }

/* pris: mønt/varer som ikon + tal, én gang */
#eventBox .evc .evCost { display: flex; gap: 5px; align-items: center; }
#eventBox .evc .cp {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px 2px 5px; border-radius: 999px;
  font: 700 0.92rem var(--body); font-variant-numeric: tabular-nums; color: var(--gold-l);
  background: rgba(12, 7, 2, 0.6); box-shadow: inset 0 0 0 1px rgba(226, 180, 90, 0.5);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
#eventBox .evc .cp .px { width: 18px; height: 18px; flex: none; }
#eventBox .evc:hover:not(:disabled) .cp { box-shadow: inset 0 0 0 1px var(--gold-l), 0 0 8px rgba(255, 210, 120, 0.45); transform: scale(1.06); }
#eventBox .evc .cp.short { color: #ff9a7a; box-shadow: inset 0 0 0 1px rgba(240, 110, 80, 0.75); background: rgba(60, 12, 6, 0.6); }
#eventBox .evc .cp.short .px { filter: grayscale(0.7); opacity: 0.75; }

/* låst valg: tekst dæmpes, men den røde pris kan stadig læses */
#eventBox .choices button.evc:disabled { opacity: 1; cursor: not-allowed; background-color: rgba(30, 20, 12, 0.85); box-shadow: inset 0 0 0 1px rgba(150, 120, 70, 0.3); }
#eventBox .choices button.evc:disabled .evMain, #eventBox .choices button.evc:disabled .evIco { opacity: 0.45; }

/* særlige valg: måneblå kant, medaljon der ånder, og en glans der løber over */
#eventBox .choices button.evc.special {
  color: #f6f0e2;
  background-color: rgba(26, 34, 46, 0.94);
  background-image: linear-gradient(100deg, rgba(70, 130, 190, 0.38), rgba(30, 50, 76, 0.2) 45%, rgba(42, 26, 12, 0.6));
  box-shadow: inset 0 0 0 1px rgba(150, 210, 255, 0.75), inset 0 0 0 2px rgba(0, 0, 0, 0.4), 0 0 12px rgba(110, 185, 255, 0.25), 0 2px 4px rgba(0, 0, 0, 0.35);
}
#eventBox .choices button.evc.special::before { transform: none; opacity: 1; background: linear-gradient(180deg, #eef8ff, #6fb9f2); box-shadow: 0 0 8px rgba(130, 200, 255, 0.9); }
#eventBox .choices button.evc.special::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(190, 230, 255, 0.16) 46%, rgba(255, 255, 255, 0.32) 50%, rgba(190, 230, 255, 0.16) 54%, transparent 65%);
  transform: translateX(-120%); animation: evcSheen 4.6s ease-in-out infinite; animation-delay: calc(var(--i, 0) * 0.35s + 0.6s);
}
#eventBox .choices button.evc.special:hover:not(:disabled), #eventBox .choices button.evc.special:focus-visible:not(:disabled) {
  background-color: rgba(30, 44, 62, 0.97); color: #fff;
  box-shadow: inset 0 0 0 1px #d8efff, inset 0 0 0 2px rgba(0, 0, 0, 0.4), 0 0 20px rgba(130, 200, 255, 0.5), 0 4px 10px rgba(0, 0, 0, 0.4);
}
#eventBox .choices button.evc.special:hover:not(:disabled)::after { animation-duration: 1.3s; animation-delay: 0s; }
#eventBox .evc.special .evIco {
  border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(200, 235, 255, 0.35), rgba(30, 60, 96, 0.9) 70%);
  box-shadow: inset 0 0 0 1px rgba(180, 225, 255, 0.85), 0 0 10px rgba(120, 195, 255, 0.5);
  animation: evcBreath 2.6s ease-in-out infinite alternate;
}
#eventBox .evc.special .evIco::after { content: "✦"; position: absolute; right: -3px; top: -5px; font-size: 0.6rem; color: #eaf7ff; text-shadow: 0 0 6px #8fd0ff; animation: evcTwinkle 2.2s ease-in-out infinite; }
#eventBox .evc.special:hover:not(:disabled) .evIco { transform: scale(1.08) rotate(-6deg); transition: transform 0.2s ease; }
#eventBox .evc.special .cp { box-shadow: inset 0 0 0 1px rgba(150, 210, 255, 0.55); }
#eventBox .evc.special .cp.short { box-shadow: inset 0 0 0 1px rgba(240, 110, 80, 0.75); }

@keyframes evcIn { from { opacity: 0; transform: translateY(6px); } }
@keyframes evcSheen { 0% { transform: translateX(-120%); } 45%, 100% { transform: translateX(120%); } }
@keyframes evcBreath { from { box-shadow: inset 0 0 0 1px rgba(180, 225, 255, 0.7), 0 0 6px rgba(120, 195, 255, 0.35); } to { box-shadow: inset 0 0 0 1px rgba(220, 242, 255, 1), 0 0 14px rgba(140, 205, 255, 0.75); } }
@keyframes evcTwinkle { 0%, 70%, 100% { opacity: 0.25; transform: scale(0.7); } 80% { opacity: 1; transform: scale(1.15); } }
@media (max-width: 520px) {
  #eventBox .choices button.evc { grid-template-columns: 24px minmax(0, 1fr) auto; gap: 9px; padding: 8px 9px 8px 8px; }
  #eventBox .evc .evIco { width: 24px; height: 24px; }
  #eventBox .evc .evIco .px { width: 17px; height: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  #eventBox .choices button.evc, #eventBox .choices button.evc.special::after, #eventBox .evc.special .evIco, #eventBox .evc.special .evIco::after { animation: none; }
  #eventBox .choices button.evc.special::after { display: none; }
}

/* 2026-11-08: lavere, enklere bulwark-skjold */
.shieldLayers .bulwarkShield, body #enemyPanel #eLayers .bulwarkShield { flex:0 0 27px;width:27px;height:23px; }

/* 2026-11-08: fjendens sigte på en post = samme røde dødningehoved-mærke som på afstandspanelet */
body .srow.targeted .sn::after { content: "☠"; display: inline-grid; place-items: center; width: 16px; height: 16px; margin-left: 5px; vertical-align: middle; font-size: 0.68rem; line-height: 1; font-family: sans-serif;
  color: #ffe0d0; background: #8a1a0e; border-radius: 50%; box-shadow: 0 0 0 1.5px #ff8a6a, 0 2px 4px rgba(0, 0, 0, 0.5); text-shadow: none; flex: none; }

/* 2026-11-08: pauseskiltet er meget større */
body #pauseBanner { font-size: 3.4rem !important; padding: 16px 48px 20px !important; letter-spacing: 0.14em; line-height: 1.05; }
body #pauseBanner small { font-size: 1.15rem !important; margin-top: 6px; letter-spacing: 0.04em; }
@media (max-width: 700px) { body #pauseBanner { font-size: 2.4rem !important; padding: 12px 26px 14px !important; } body #pauseBanner small { font-size: 0.95rem !important; } }

/* 2026-11-08: "Break away"-måleren lader i samme guld som kanonerne */
body .escTrack i { background: linear-gradient(180deg, #ffe7a8, #d6a64a) !important; }
body #breakPanel.ready .escTrack i { background: linear-gradient(180deg, #b9f7a8, #4fb83e) !important; }

/* 2026-11-08: fjendepanelet ligger foran synke-vandet (#floodFx z 3), så man kan se hende, mens vi synker */
body #enemyPanel { z-index: 4; }

/* 2026-11-08: sigtemærket sidder ude i postens højre hjørne, væk fra navn og folk */
body .srow.targeted .sn::after { position: absolute; right: 4px; top: 4px; margin-left: 0; z-index: 2; }
body .srow.targeted .sl1 { padding-right: 22px; }
body #hudTop .hudBtns #btnHarbor { color: var(--gold-l, #ffe3a0); box-shadow: inset 0 0 0 1px #c9a04a; }

/* 2026-11-08: ikoner ved byttet på sejrsskærmen */
#eventBox .fx span.hasIco { display: inline-flex; align-items: center; gap: 6px; }
#eventBox .fx span .fxIco { display: inline-grid; place-items: center; width: 20px; height: 20px; flex: none; font-style: normal; }
#eventBox .fx span .fxIco svg, #eventBox .fx span .fxIco canvas, #eventBox .fx span .fxIco img { width: 20px !important; height: 20px !important; display: block; }

/* 2026-11-08: fjendens skrogtal stort og lige op ad bjælken */
body #enemyPanel .emeters > .big { gap: 8px !important; }
body #enemyPanel .emeters > .big label { width: auto !important; flex-direction: row !important; align-items: baseline !important; gap: 6px; font-size: 0.95rem !important; }
body #enemyPanel .emeters > .big label b { font: 800 2.2rem/1 var(--body) !important; min-width: 2.4ch; text-align: right; text-shadow: 0 2px 0 #2a0a04, 0 0 10px rgba(255, 90, 60, 0.35); display: inline-block; }
body #enemyPanel .emeters > .big .bar { height: 26px !important; position: relative; }
body #enemyPanel .emeters > .big .bar > i { position: relative; z-index: 1; }
body #enemyPanel .emeters > .big .bar > u.hpGhost { position: absolute; left: 0; top: 0; bottom: 0; width: 0; z-index: 0; background: linear-gradient(180deg, #fff6d8, #ffb04a); transition: width 0.7s ease-in; text-decoration: none; }
/* skaden blinker */
@keyframes hpHitNum { 0% { transform: scale(1.45); color: #ff3a1e; text-shadow: 0 0 16px #ff3a1e, 0 0 4px #fff; } 60% { transform: scale(0.96); } 100% { transform: scale(1); } }
@keyframes hpHitBar { 0% { box-shadow: 0 0 0 2px #fff, 0 0 18px 4px #ff4a2a; filter: brightness(1.8); } 100% { box-shadow: none; filter: none; } }
body #enemyPanel #epHullTxt.hpHit { animation: hpHitNum 0.5s ease-out; }
body #enemyPanel #epHullWrap.hpHit { animation: hpHitBar 0.55s ease-out; }

/* 2026-11-08: vores skadeskilte på fjenden vokser med skaden */
.floater.dmg { font: 800 0.9rem/1 var(--body); padding: 2px 8px 3px; border: 1px solid rgba(255, 217, 138, 0.5); color: #ffe7b0; letter-spacing: 0.04em; }
.floater.dmg-0 { opacity: 0.75; color: #c9bfa8; font-size: 0.8rem; }
.floater.dmg-s { animation: floatPop 0.3s cubic-bezier(.2, 1.7, .4, 1); }
.floater.dmg-m { font-size: 1.3rem; padding: 4px 12px 5px; color: #fff; border: 2px solid #ffb347; box-shadow: 0 0 10px rgba(255, 170, 60, 0.6), 0 2px 8px rgba(0,0,0,0.5);
  text-shadow: -1px -1px 0 #c86a10, 1px -1px 0 #c86a10, -1px 1px 0 #c86a10, 1px 1px 0 #c86a10, 0 0 8px rgba(255, 160, 50, 0.8); animation: floatPop 0.36s cubic-bezier(.2, 1.8, .4, 1); }
.floater.dmg-l { font-size: 1.75rem; padding: 5px 15px 6px; color: #fff; border: 3px solid #ff5a2a; background: rgba(50, 10, 4, 0.85); box-shadow: 0 0 16px rgba(255, 80, 40, 0.75), 0 3px 10px rgba(0,0,0,0.55);
  text-shadow: -2px -2px 0 #b0200c, 2px -2px 0 #b0200c, -2px 2px 0 #b0200c, 2px 2px 0 #b0200c, 0 0 12px rgba(255, 70, 30, 0.9); animation: floatPop 0.4s cubic-bezier(.2, 2, .4, 1); }
.floater.dmg-x { font-size: 2.3rem; padding: 6px 18px 8px; color: #fff8d8; border: 3px solid #ffd23a; background: linear-gradient(180deg, rgba(120, 20, 6, 0.92), rgba(40, 6, 2, 0.92)); box-shadow: 0 0 0 2px #b0200c, 0 0 26px rgba(255, 180, 40, 0.9), 0 4px 12px rgba(0,0,0,0.6);
  text-shadow: -2px -2px 0 #c0300c, 2px -2px 0 #c0300c, -2px 2px 0 #c0300c, 2px 2px 0 #c0300c, 0 0 16px rgba(255, 200, 60, 1); animation: floatPop 0.45s cubic-bezier(.2, 2.2, .4, 1); }

/* 2026-11-08: en skudt post er tydelig i postlisten */
body #crewPanel .srow.wrecked { background-color: rgba(70, 10, 6, 0.85) !important; background-image: repeating-linear-gradient(135deg, rgba(255, 60, 30, 0.16) 0 8px, transparent 8px 16px) !important; border-left-color: #ff3a1e !important; box-shadow: inset 0 0 0 1px rgba(255, 70, 40, 0.65) !important; }
body #crewPanel .srow.wrecked .sn { color: #ff9a80 !important; }
body #crewPanel .srow.wrecked .sn .sti, body #crewPanel .srow.wrecked .sn svg { filter: grayscale(1) brightness(0.7); }
body #crewPanel .srow.wrecked::before { content: "✕ WRECKED"; position: absolute; right: 6px; bottom: 3px; z-index: 2; padding: 1px 6px; border-radius: 3px; font: 800 0.6rem/1.3 var(--body); letter-spacing: 0.1em; color: #fff; background: #b0200c; box-shadow: 0 0 6px rgba(255, 60, 30, 0.7); pointer-events: none; animation: wreckPulse 1.4s ease-in-out infinite; }
@keyframes wreckPulse { 50% { box-shadow: 0 0 12px rgba(255, 60, 30, 1); } }

/* ---------- menuknapperne øverst: træplanke med lys trækant og stort mærke ---------- */
body #hudTop .hudBtns { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)) !important; gap: 6px !important; }
body #hudTop .hudBtns button.mbtn:not([hidden]) {
  display: flex !important; align-items: center; justify-content: flex-start; gap: 6px;
  min-height: 32px; padding: 3px 8px 3px 6px !important; border: 0 !important; border-radius: 6px !important;
  color: #f6e7c4 !important; font: 700 0.76rem var(--body) !important; letter-spacing: 0.04em;
  text-shadow: 0 1px 0 #1a0f06, 0 0 2px rgba(0, 0, 0, 0.6);
  background-color: #5c381a !important;
  background-image:
    radial-gradient(ellipse 9px 2.4px at 72% 38%, rgba(30, 16, 6, 0.38), transparent 75%),
    repeating-linear-gradient(176deg, rgba(255, 222, 170, 0.07) 0 1px, transparent 1px 4px, rgba(0, 0, 0, 0.13) 4px 5px, transparent 5px 9px),
    repeating-linear-gradient(181deg, transparent 0 6px, rgba(0, 0, 0, 0.09) 6px 7px, transparent 7px 13px),
    linear-gradient(180deg, #855428 0%, #6a4120 46%, #4e2f15 100%) !important;
  box-shadow:
    inset 0 0 0 2px #f0dcaa,
    inset 0 0 0 3px #3a2310,
    inset 0 4px 0 0 rgba(255, 232, 186, 0.10),
    inset 0 -5px 8px -3px rgba(0, 0, 0, 0.45),
    0 2px 0 #241406, 0 3px 6px rgba(0, 0, 0, 0.5) !important;
  transition: transform 0.08s, box-shadow 0.12s, filter 0.12s;
}
body #hudTop .hudBtns button.mbtn:hover:not(:disabled) {
  color: #fff !important; filter: brightness(1.1); transform: translateY(-1px);
  box-shadow: inset 0 0 0 2px #fff4d6, inset 0 0 0 3px #3a2310, inset 0 4px 0 0 rgba(255, 232, 186, 0.14), inset 0 -5px 8px -3px rgba(0, 0, 0, 0.4), 0 3px 0 #241406, 0 0 12px rgba(255, 227, 160, 0.45) !important;
}
body #hudTop .hudBtns button.mbtn:active:not(:disabled) { transform: translateY(1px); filter: brightness(0.92); box-shadow: inset 0 0 0 2px #e2c88e, inset 0 0 0 3px #3a2310, inset 0 3px 6px rgba(0, 0, 0, 0.5), 0 1px 0 #241406 !important; }
body #hudTop .hudBtns button.mbtn[aria-expanded="true"] { box-shadow: inset 0 0 0 2px #ffe3a0, inset 0 0 0 3px #3a2310, inset 0 3px 6px rgba(0, 0, 0, 0.45), 0 0 10px rgba(255, 227, 160, 0.4) !important; }
body #hudTop .hudBtns button.mbtn .mi { width: 24px; height: 24px; flex: none; vertical-align: 0; color: var(--gold-l); filter: drop-shadow(0 1px 0 #1a0f06) drop-shadow(0 0 1.5px rgba(0, 0, 0, 0.7)); }
body #hudTop .hudBtns button.mbtn .ml { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; text-align: left; }
body #hudTop .hudBtns button.mbtn .mk { flex: none; padding: 0 4px; border-radius: 3px; font: 800 0.62rem/1.5 var(--body); color: #f0dcaa; background: rgba(20, 11, 4, 0.55); box-shadow: inset 0 0 0 1px rgba(240, 220, 170, 0.35); text-shadow: none; }
body #hudTop .hudBtns #btnHarbor.mbtn .ml { color: var(--gold-l); }
@media (max-width: 1360px) {
  body #hudTop .hudBtns { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)) !important; }
  body #hudTop .hudBtns button.mbtn:not([hidden]) { min-height: 30px; font-size: 0.7rem !important; gap: 5px; }
  body #hudTop .hudBtns button.mbtn .mi { width: 21px; height: 21px; }
}
@media (max-width: 640px) {
  body #hudTop .hudBtns button.mbtn .mk { display: none; }
}

/* 2026-11-08: fjendens skrogbjælke uden gul ramme: spøgelset holdes inden for kanten og følger fyldets segmenter */
body #enemyPanel .emeters > .big .bar > u.hpGhost { top: 3px !important; bottom: 3px !important; left: 3px !important; border-radius: 1px;
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 9px, transparent 9px 11px); mask: repeating-linear-gradient(90deg, #000 0 9px, transparent 9px 11px); }

/* ---------- 2026-11-08: fjendepanelet ryddet: ingen "All guns"-linje, bande ved navnet, større kanonkort, ikoner ---------- */

body #enemyPanel header > div { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; column-gap: 10px; row-gap: 2px; }
body #enemyPanel header > div > h2 { flex: 0 1 auto; min-width: 0; }
body #enemyPanel header > div > #epAffiliation { margin: 0 !important; flex: none; }
body #enemyPanel header > div > small { flex: 1 0 100%; }
body #enemyPanel .emeters label .eli { width: 20px; height: 20px; flex: none; color: #ff9a7a; filter: drop-shadow(0 1px 0 #1a0604); vertical-align: -4px; }
body #enemyPanel .emeters > div:not(.big) label { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 6px; }
body #enemyPanel #eGuns { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important; gap: 7px !important; }
body #enemyPanel #eGuns .eg { gap: 7px !important; padding: 10px 11px !important; min-height: 72px; box-sizing: border-box; }
body #enemyPanel #eGuns .egn { display: flex; align-items: center; gap: 8px; font-size: 1rem !important; font-weight: 700; }
body #enemyPanel #eGuns .egn .px { width: 34px !important; height: 34px !important; flex: none; }
body #enemyPanel #eGuns .bar { height: 14px !important; }

/* ---------- 2026-11-08: større menuknapper øverst til højre ---------- */
body #hudTop .hudBtns { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important; gap: 8px !important; }
body #hudTop .hudBtns button.mbtn:not([hidden]) { min-height: 44px; gap: 8px; padding: 5px 10px 5px 8px !important; font-size: 0.92rem !important; }
body #hudTop .hudBtns button.mbtn .mi { width: 32px; height: 32px; }
body #hudTop .hudBtns button.mbtn .mk { font-size: 0.72rem; padding: 0 5px; }
@media (max-width: 1360px) {
  body #hudTop .hudBtns { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)) !important; }
  body #hudTop .hudBtns button.mbtn:not([hidden]) { min-height: 40px; font-size: 0.84rem !important; gap: 6px; }
  body #hudTop .hudBtns button.mbtn .mi { width: 28px; height: 28px; }
}
/* 2026-11-25 · relationsbjælke "G": præget rille i papiret med en lakdråbe; farven fylder ud fra midten */
@keyframes facDrop { from { left: var(--p0); } }
@keyframes facFillL { from { left: min(50%, var(--p0)); width: max(calc(var(--p0) - 50%), calc(50% - var(--p0))); } }
html body #chartFactions .facBar.g, html body #eventBox#eventBox .facBar.g { position: relative; display: block; width: 104px; height: 7px; margin: 5px 9px 4px; border-radius: 4px; background: #e6d6b2; box-shadow: inset 0 1px 1px rgba(90, 64, 30, 0.75), inset 0 -1px 0 #fff8e4, 0 0 0 1px rgba(60, 40, 18, 0.35); }
html body #chartFactions .facBar.g b, html body #eventBox#eventBox .facBar.g b { position: absolute; top: 1px; bottom: 1px; left: min(50%, var(--p)); width: max(calc(var(--p) - 50%), calc(50% - var(--p))); border-radius: 3px; background: var(--c); opacity: 0.8; }
html body #chartFactions .facBar.g::after, html body #eventBox#eventBox .facBar.g::after { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: rgba(60, 40, 18, 0.45); }
html body #chartFactions .facBar.g u, html body #eventBox#eventBox .facBar.g u { position: absolute; z-index: 1; left: var(--p); top: 50%; width: 13px; height: 15px; margin: -9px 0 0 -6.5px; border-radius: 50% 50% 50% 50% / 42% 42% 58% 58%; background: radial-gradient(circle at 34% 30%, #e8a090 0 12%, #b33a26 34%, #8e2a1c 62%, #5a160c); box-shadow: 0 1px 1.5px rgba(30, 10, 4, 0.55), inset 0 -1px 1px rgba(40, 8, 2, 0.5); text-decoration: none; }
html body #chartFactions .facBar.g.mv u, html body #eventBox#eventBox .facBar.g.mv u { animation: facDrop 0.9s 0.35s cubic-bezier(0.3, 1.35, 0.5, 1) both; }
html body #chartFactions .facBar.g.mv b, html body #eventBox#eventBox .facBar.g.mv b { animation: facFillL 0.9s 0.35s cubic-bezier(0.3, 1.35, 0.5, 1) both; }
html body #chartFactions .facBar.g:empty::after { display: none; }
