/* ═══════════ SCHIFFE RETTEN · Kampagnen-Spiel von Die PARTEI ═══════════ */

:root {
  --sea:        oklch(0.16 0.03 245);
  --sea-raise:  oklch(0.20 0.035 245);
  --panel:      oklch(0.20 0.035 245 / .72);
  --line:       oklch(0.75 0.05 245 / .16);
  --line-soft:  oklch(0.75 0.05 245 / .08);
  --ink:        oklch(0.95 0.01 245);
  --ink-soft:   oklch(0.76 0.02 245);
  --ink-faint:  oklch(0.60 0.02 245);
  --orange:     oklch(0.72 0.19 45);
  --orange-hot: oklch(0.78 0.19 45);
  --orange-ink: oklch(0.22 0.05 45);
  --saved:      oklch(0.78 0.16 150);
  --distress:   oklch(0.64 0.23 25);
  --distress-soft: oklch(0.64 0.23 25 / .18);
  --lost:       oklch(0.42 0.14 25);
  --abducted:   oklch(0.55 0.06 300);
  --display: "Anton", "Archivo Black", system-ui, sans-serif;
  --body: "Archivo", system-ui, sans-serif;
  --mono: "Sometype Mono", ui-monospace, monospace;
  /* Motion */
  --ease-out-strong: cubic-bezier(0.22, 1, 0.36, 1);  /* UI-Standard: Ein-/Austritte, Pops */
  --ease-burst: cubic-bezier(0.16, 1, 0.3, 1);        /* expandierende Ringe/Funken/Ripples */
  --ease-exit-accel: cubic-bezier(0.5, 0, 0.8, 0.4);  /* beschleunigende Abfahrt (nur Szenerie-Exits) */
  --cell: clamp(27px, min(8.2vw, 4.6vh), 46px);
  --radius: 14px;
  /* z-Skala */
  --z-locked: 2;
  --z-hud: 10;
  --z-card: 40;
  --z-flash: 50;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--body);
  background: var(--sea);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
button { font-family: inherit; color: inherit; }
[hidden] { display: none !important; }

.screen { display: none; min-height: 100dvh; }
.screen.active { display: block; }
/* Screenwechsel: kurzer Rise beim Eintritt (Bruch bewusst ausgenommen) */
#screenGame.active > .wrap,
#screenEnd.active > .bilanz {
  animation: screenIn 240ms var(--ease-out-strong) both;
}
@keyframes screenIn {
  from { opacity: 0; transform: translateY(10px); }
}

/* ═══════════ Screen 1 · Plakat ═══════════ */
#screenIntro.active {
  display: flex; flex-direction: column;
  align-items: stretch; justify-content: space-between;
  background: var(--orange);
  color: var(--orange-ink);
  padding: clamp(20px, 5vw, 64px);
  gap: 24px;
}
.plakat-top {
  font-family: var(--mono);
  font-size: .82rem;
  display: flex; justify-content: space-between; gap: 12px;
  text-transform: uppercase; letter-spacing: .08em;
}
.plakat-main { max-width: 1000px; }
.plakat-main h1 {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(3rem, 13vw, 6rem);
  line-height: .96;
  letter-spacing: .01em;
  margin: 0 0 clamp(18px, 4vw, 34px);
  text-wrap: balance;
}
.plakat-main h1 .strike { position: relative; white-space: nowrap; }
.plakat-main h1 .strike::after {
  content: "";
  position: absolute; left: -2%; right: -2%; top: 50%;
  height: clamp(5px, 1.2vw, 11px);
  background: currentColor;
  transform: translateY(-50%) rotate(-1.5deg);
  transform-origin: left center;
  animation: strikeDraw 450ms var(--ease-out-strong) 350ms both;
}
@keyframes strikeDraw {
  from { transform: translateY(-50%) rotate(-1.5deg) scaleX(0); }
  to   { transform: translateY(-50%) rotate(-1.5deg) scaleX(1); }
}
.plakat-main h1 .retten {
  display: block;
  color: oklch(0.99 0.005 45);
  background: oklch(0.22 0.05 45);
  width: fit-content;
  padding: .04em .18em .02em;
  transform: rotate(-1.2deg);
  margin-top: .12em;
  animation: rettenStamp 300ms var(--ease-out-strong) 850ms both;
}
@keyframes rettenStamp {
  0%   { opacity: 0; transform: rotate(-1.2deg) scale(1.5); }
  65%  { opacity: 1; transform: rotate(-1.2deg) scale(0.97); }
  100% { opacity: 1; transform: rotate(-1.2deg) scale(1); }
}
.plakat-sub {
  font-size: clamp(1.05rem, 2.6vw, 1.45rem);
  font-weight: 600;
  max-width: 34ch;
  margin: 0 0 clamp(26px, 5vw, 44px);
  text-wrap: pretty;
}
.plakat-cta {
  display: inline-block;
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(1.3rem, 3.4vw, 1.9rem);
  letter-spacing: .04em;
  background: var(--orange-ink);
  color: var(--orange);
  border: none;
  padding: .55em 1.1em .5em;
  cursor: pointer;
  transition: transform .15s var(--ease-out-strong), background .15s;
}
.plakat-cta:focus-visible { outline: 3px solid var(--orange-ink); outline-offset: 4px; }
.plakat-foot {
  font-size: .85rem;
  font-weight: 600;
  display: flex; flex-wrap: wrap; gap: 6px 22px;
  max-width: 70ch;
}
.plakat-foot span { opacity: .85; }

/* ═══════════ Screen 2 · Einsatz ═══════════ */
#screenGame .wrap {
  max-width: 1100px; margin: 0 auto;
  padding: 16px clamp(12px, 3vw, 24px) 56px;
}
.hud {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 10px 16px;
  margin-bottom: 18px;
  position: sticky; top: 8px; z-index: var(--z-hud);
  backdrop-filter: blur(8px);
}
.hud-title {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: 1.05rem;
  color: var(--orange);
  display: flex; align-items: center; gap: 9px;
}
.hud-title::before {
  content: "";
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--saved);
  box-shadow: 0 0 8px var(--saved);
  animation: lampPulse 2s ease-in-out infinite;
}
@keyframes lampPulse { 50% { opacity: .45; } }
.hud-stats {
  display: flex; gap: 16px; margin-left: auto;
  font-family: var(--mono); font-size: .85rem;
}
.hud-stat b { font-size: 1.05rem; display: inline-block; }
.hud-stat b.bump { animation: statBump 300ms var(--ease-out-strong); }
@keyframes statBump { 40% { transform: scale(1.3); } }
.hud-stat.kasse b { color: var(--orange); font-size: .95rem; }
.hud-stat.kasse b.low { color: var(--distress); }
.appealbtn {
  border: 1px solid var(--orange);
  background: none; color: var(--orange);
  font-weight: 700; font-size: .82rem; letter-spacing: .03em;
  padding: 9px 14px; border-radius: 10px; cursor: pointer;
  flex-shrink: 0;
  transition: background .15s, transform 120ms var(--ease-out-strong);
}
@media (hover: hover) { .appealbtn:hover { background: oklch(0.72 0.19 45 / .12); } }
.appealbtn:active { transform: scale(0.97); }
.appealbtn.broke {
  background: oklch(0.72 0.19 45 / .16);
  animation: appealPulse 1.1s ease-in-out infinite;
}
@keyframes appealPulse { 50% { box-shadow: 0 0 0 7px oklch(0.72 0.19 45 / .18); } }
.hud-stat.saved b { color: var(--saved); }
.hud-stat.lost b { color: var(--distress); }
.hud-stat .lbl { color: var(--ink-faint); font-size: .68rem; display: block; text-transform: uppercase; letter-spacing: .08em; }
.iconbtn {
  border: 1px solid var(--line); background: none; color: var(--ink-soft);
  width: 38px; height: 38px; border-radius: 10px; cursor: pointer; font-size: 1rem;
  flex-shrink: 0;
  transition: transform 120ms var(--ease-out-strong), border-color .15s, color .15s;
}

.layout {
  display: flex; gap: 30px; justify-content: center; align-items: flex-start; flex-wrap: wrap;
}

/* Karte */
.chart-block { display: flex; flex-direction: column; gap: 8px; }
.chart-caption {
  display: flex; justify-content: space-between; align-items: baseline; gap: 14px; flex-wrap: wrap;
  font-family: var(--mono); font-size: .75rem; color: var(--ink-faint);
  padding: 0 4px;
}
.chart-caption .zug { color: var(--ink-soft); }
.gridbox {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto 1fr;
  gap: 4px;
  user-select: none; -webkit-user-select: none;
}
.collabels, .rowlabels { display: grid; gap: 2px; }
.collabels { grid-column: 2; grid-template-columns: repeat(10, var(--cell)); }
.rowlabels { grid-row: 2; grid-template-rows: repeat(10, var(--cell)); }
.collabels span, .rowlabels span {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: .6rem; color: var(--ink-faint);
}
.rowlabels span { width: 1.3em; }
.grid {
  grid-column: 2; grid-row: 2;
  display: grid;
  grid-template-columns: repeat(10, var(--cell));
  grid-template-rows: repeat(10, var(--cell));
  gap: 2px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400'%3E%3Cg fill='none' stroke='%23a8c8e8' stroke-opacity='.06'%3E%3Cpath d='M-20 90 C 80 60, 150 130, 240 100 S 400 60, 430 90'/%3E%3Cpath d='M-20 150 C 70 120, 170 190, 260 160 S 400 130, 430 160'/%3E%3Cpath d='M-20 235 C 90 205, 160 270, 250 240 S 410 210, 430 240'/%3E%3Cpath d='M-20 320 C 80 295, 180 350, 270 322 S 400 300, 430 325'/%3E%3C/g%3E%3C/svg%3E") center / cover,
    linear-gradient(oklch(0.75 0.05 245 / .04) 1px, transparent 1px) 0 0 / 100% calc(var(--cell) + 2px),
    linear-gradient(160deg, oklch(0.22 0.04 245 / .5), oklch(0.14 0.03 245 / .7));
  touch-action: manipulation;
  position: relative;
  overflow: hidden;
}
/* Radar-Sweep */
.grid::before {
  content: "";
  position: absolute; inset: -55%;
  background: conic-gradient(from 0deg at 50% 50%,
    transparent 0deg 290deg,
    oklch(0.72 0.19 45 / .02) 300deg,
    oklch(0.72 0.19 45 / .1) 345deg,
    oklch(0.75 0.17 45 / .26) 359deg,
    transparent 360deg);
  animation: sweep 9s linear infinite;
  z-index: 0;
  pointer-events: none;
}
@keyframes sweep { to { transform: rotate(360deg); } }
/* Scanlines + Vignette */
.grid::after {
  content: "";
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, oklch(1 0 0 / .022) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 55%, oklch(0 0 0 / .3));
  pointer-events: none;
  z-index: 3;
}
.cell { z-index: 1; }
/* Sektor-Overlays (Lagebild) */
.overlay-layer {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 2;
}
.sector-box {
  position: absolute;
  border: 1px dashed oklch(0.72 0.19 45 / .55);
  border-radius: 6px;
  background: oklch(0.72 0.19 45 / .04);
}
.sector-box .tag {
  position: absolute; top: -1px; left: -1px;
  font-family: var(--mono); font-size: .58rem; letter-spacing: .05em;
  background: oklch(0.72 0.19 45 / .85); color: var(--orange-ink);
  padding: 1px 5px; border-radius: 5px 0 5px 0;
  font-weight: 700;
}
.sector-box.urgent {
  border-color: oklch(0.64 0.23 25 / .75);
  background: oklch(0.64 0.23 25 / .05);
}
.sector-box.urgent .tag { background: oklch(0.64 0.23 25 / .9); color: #fff; }
.sector-box.critical { animation: sectorBlink 1s steps(2) infinite; }
@keyframes sectorBlink { 50% { opacity: .35; } }
/* Boots-Silhouetten (Lagebild) */
.boat-visual {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  color: var(--saved);
  filter: drop-shadow(0 0 12px oklch(0.78 0.16 150 / .55));
  animation: boatIn .8s var(--ease-out-strong) both;
}
@keyframes boatIn {
  0% { transform: scale(.45); opacity: 0; }
  55% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.boat-visual svg { position: absolute; display: block; }
.boat-visual .hull { fill: color-mix(in oklch, currentColor 22%, transparent); stroke: currentColor; stroke-width: 2.5; stroke-linejoin: round; }
.boat-visual .cabin { fill: color-mix(in oklch, currentColor 40%, transparent); stroke: currentColor; stroke-width: 2; }
.boat-visual .detail { fill: none; stroke: currentColor; stroke-width: 2; }
.boat-visual .tube { fill: color-mix(in oklch, currentColor 12%, transparent); stroke: currentColor; stroke-width: 6.5; }
.boat-visual .p { fill: var(--ink); }
.boat-visual .break { display: none; fill: none; stroke: var(--sea); stroke-width: 5.5; stroke-linejoin: round; }
.boat-visual.sunk {
  color: var(--distress);
  filter: drop-shadow(0 0 9px oklch(0.5 0.2 25 / .55));
}
.boat-visual.sunk .break { display: block; }
.boat-visual.sunk .p { opacity: .75; }
.boat-visual.abducted {
  color: var(--abducted);
  filter: drop-shadow(0 0 8px oklch(0.55 0.06 300 / .5));
}
.boat-visual.abducted .hull, .boat-visual.abducted .tube { stroke-dasharray: 7 5; }
/* Glyphen unter Boots-Silhouette ausblenden */
.cell.covered::before, .cell.covered::after { display: none !important; }

/* Treffer-Burst: Ringe + Funken */
.burst {
  position: absolute;
  width: var(--cell); height: var(--cell);
  pointer-events: none;
}
.burst .ring {
  position: absolute; inset: 0;
  border: 2.5px solid oklch(0.78 0.17 45 / .85);
  border-radius: 50%;
  animation: burstRing .8s var(--ease-burst) forwards;
}
.burst .ring.slow { animation-duration: 1.15s; animation-delay: .08s; border-width: 1.5px; opacity: .7; }
@keyframes burstRing {
  0% { transform: scale(.35); opacity: 1; }
  100% { transform: scale(3.1); opacity: 0; }
}
.burst .spark {
  position: absolute; left: 50%; top: 50%;
  width: 4px; height: 4px; margin: -2px;
  border-radius: 50%;
  background: oklch(0.82 0.16 45);
  animation: sparkFly .7s var(--ease-burst) forwards;
}
@keyframes sparkFly {
  0% { transform: rotate(var(--a)) translateX(0); opacity: 1; }
  100% { transform: rotate(var(--a)) translateX(calc(var(--cell) * 1.5)); opacity: 0; }
}
.burst.rescue .ring { border-color: oklch(0.8 0.16 150 / .9); }
.burst.rescue .ring.slow { animation-duration: 1.3s; }
.burst.rescue .spark { background: oklch(0.82 0.15 150); }
.burst.rescue { animation: none; }
.burst.rescue .ring { animation-name: burstRingBig; }
@keyframes burstRingBig {
  0% { transform: scale(.4); opacity: 1; }
  100% { transform: scale(4.4); opacity: 0; }
}
/* Aufsteigendes Rettungs-Label */
.float-tag {
  position: absolute;
  transform: translate(-50%, 0);
  font-family: var(--mono); font-weight: 700;
  font-size: clamp(.72rem, 2.4vw, .95rem);
  letter-spacing: .06em;
  color: oklch(0.85 0.16 150);
  text-shadow: 0 0 14px oklch(0.78 0.16 150 / .8), 0 1px 2px oklch(0 0 0 / .8);
  white-space: nowrap;
  animation: floatUp 1.6s var(--ease-out-strong) forwards;
  z-index: 4;
}
@keyframes floatUp {
  0% { opacity: 0; translate: 0 6px; }
  18% { opacity: 1; translate: 0 0; }
  75% { opacity: 1; }
  100% { opacity: 0; translate: 0 -38px; }
}
/* Grüne Rettungs-Blende */
.flash.good-flash {
  background: radial-gradient(ellipse at center, transparent 50%, oklch(0.7 0.15 150 / .35));
}
/* Such-Ping */
.ripple {
  position: absolute;
  width: var(--cell); height: var(--cell);
  border: 2px solid oklch(0.75 0.17 45 / .8);
  border-radius: 50%;
  transform: scale(.3);
  opacity: .9;
  animation: rippleOut .7s var(--ease-burst) forwards;
}
@keyframes rippleOut { to { transform: scale(2.4); opacity: 0; } }
.cell {
  position: relative;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: oklch(0.28 0.05 245 / .25);
  padding: 0; margin: 0;
  cursor: crosshair;
  transition: background .12s, border-color .12s, transform 100ms var(--ease-out-strong);
  font-family: var(--mono);
  font-size: calc(var(--cell) * .38);
}
@media (hover: hover) {
  .grid:not(.inert) .cell.free:hover { background: oklch(0.72 0.19 45 / .28); border-color: var(--orange); }
}
.cell:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; }
.grid.inert .cell { cursor: default; }

.cell.water { cursor: default; }
.cell.water::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 20%; height: 20%; border-radius: 50%;
  background: oklch(0.45 0.04 245);
}
.cell.contact {
  background: oklch(0.72 0.19 45 / .3);
  border-color: var(--orange);
  cursor: default;
  animation: contactFlash .6s var(--ease-out-strong);
  box-shadow: 0 0 10px 0 oklch(0.75 0.17 45 / .28);
}
@keyframes contactFlash {
  0%   { transform: scale(.3); filter: brightness(3.2); box-shadow: 0 0 0 0 oklch(0.78 0.17 45 / .9); }
  45%  { transform: scale(1.28); filter: brightness(2); box-shadow: 0 0 30px 8px oklch(0.78 0.17 45 / .6); }
  100% { transform: scale(1); filter: brightness(1); box-shadow: 0 0 10px 0 oklch(0.75 0.17 45 / .28); }
}
.cell.contact::after { content: "◉"; color: var(--orange-hot); display: grid; place-items: center; position: absolute; inset: 0; }
.cell.rescued {
  background: oklch(0.78 0.16 150 / .26);
  border-color: var(--saved);
  cursor: default;
  animation: rescuePop .55s var(--ease-out-strong) both;
  box-shadow: 0 0 12px 0 oklch(0.78 0.16 150 / .3);
}
@keyframes rescuePop {
  0%   { transform: scale(.4); filter: brightness(2.6); box-shadow: 0 0 0 0 oklch(0.78 0.16 150 / .9); }
  50%  { transform: scale(1.32); filter: brightness(1.8); box-shadow: 0 0 28px 8px oklch(0.78 0.16 150 / .6); }
  100% { transform: scale(1); filter: brightness(1); box-shadow: 0 0 12px 0 oklch(0.78 0.16 150 / .3); }
}
.cell.rescued::after { content: "✓"; color: var(--saved); font-weight: 700; display: grid; place-items: center; position: absolute; inset: 0; }
.cell.sunkcell {
  background: oklch(0.42 0.14 25 / .3);
  border-color: var(--lost);
  cursor: default;
}
.cell.sunkcell::after { content: "✕"; color: var(--distress); display: grid; place-items: center; position: absolute; inset: 0; }
.cell.abducted-cell {
  background: oklch(0.55 0.06 300 / .2);
  border-color: var(--abducted);
  cursor: default;
}
.cell.abducted-cell::after { content: "▲"; color: var(--abducted); display: grid; place-items: center; position: absolute; inset: 0; font-size: .8em; }
.cell.pending { border-color: var(--ink-faint); cursor: default; }
.cell.pending::after { content: "?"; color: var(--ink-faint); display: grid; place-items: center; position: absolute; inset: 0; }
.cell.locked {
  cursor: not-allowed;
  background: repeating-linear-gradient(45deg,
    oklch(0.64 0.23 25 / .12) 0 5px, transparent 5px 10px);
  border-color: oklch(0.64 0.23 25 / .4);
  z-index: var(--z-locked);
}
.grid.shake { animation: shake .4s; }
@keyframes shake {
  20% { transform: translate(-3px, 1px); } 40% { transform: translate(3px, -1px); }
  60% { transform: translate(-2px, -2px); } 80% { transform: translate(2px, 1px); }
}

/* rote Blende beim Untergang */
.flash {
  position: fixed; inset: 0; pointer-events: none; z-index: var(--z-flash);
  background: radial-gradient(ellipse at center, transparent 45%, oklch(0.5 0.2 25 / .45));
  opacity: 0; transition: opacity .25s;
}
.flash.on { opacity: 1; }

/* Seitenpanels */
.side { display: flex; flex-direction: column; gap: 14px; width: 320px; max-width: 100%; }
.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 14px 16px;
  backdrop-filter: blur(6px);
}
.panel h2 {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 400;
}

/* Mayday-Liste */
.mayday { display: flex; flex-direction: column; gap: 9px; }
.boat {
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 9px 11px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  font-size: .84rem;
  transition: border-color .3s, background-color .3s, opacity .3s;
}
.boat .name { font-weight: 700; letter-spacing: .02em; grid-column: 1; grid-row: 1; align-self: center; }
.boat .call {
  font-family: var(--mono); font-size: .62rem; font-weight: 700;
  background: oklch(0.72 0.19 45 / .85); color: var(--orange-ink);
  padding: 1px 5px; border-radius: 4px; margin-right: 6px;
  vertical-align: 1px;
}
.boat.urgent .call { background: oklch(0.64 0.23 25 / .9); color: #fff; }
.boat.done .call { background: oklch(0.5 0.02 245 / .5); color: var(--ink); }
.boat .meta { color: var(--ink-soft); font-size: .78rem; grid-column: 1; grid-row: 2; }
.boat .meta .sector { font-family: var(--mono); color: var(--ink); }
.boat .countdown {
  grid-column: 2; grid-row: 1 / span 2; align-self: center; text-align: right;
  font-family: var(--mono); line-height: 1.15;
}
.boat .countdown b { font-size: 1.35rem; display: block; }
.boat .countdown .u { font-size: .62rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .06em; }
.boat.urgent { border-color: var(--distress); background: var(--distress-soft); }
.boat.urgent .countdown b { color: var(--distress); }
.boat.critical .countdown b { animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .25; } }
.boat.done { opacity: .75; }
.boat .status { font-family: var(--mono); font-size: .95rem; grid-column: 2; grid-row: 1 / span 2; align-self: center; text-align: right; }
.boat.rescued-b { border-color: var(--saved); }
.boat.rescued-b .status { color: var(--saved); }
.boat.sunk-b { border-color: var(--lost); }
.boat.sunk-b .status { color: var(--distress); }
.boat.abducted-b { border-color: var(--abducted); }
.boat.abducted-b .status { color: var(--abducted); font-size: .78rem; }
.boat .progress { display: flex; gap: 3px; grid-column: 1 / -1; grid-row: 3; margin-top: 4px; }
.boat .seg {
  height: 6px; flex: 1; border-radius: 3px;
  background: oklch(0.75 0.05 245 / .15);
}
.boat .seg.on { background: var(--orange); }
.boat.rescued-b .seg.on { background: var(--saved); }

/* Funkverkehr */
.radio {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 6px;
  font-family: var(--mono); font-size: .76rem;
  max-height: 180px; overflow-y: auto;
}
.radio li { color: var(--ink-faint); }
.radio li:first-child { color: var(--ink); }
.radio li:first-child::after {
  content: "▌"; color: var(--orange);
  margin-left: 5px;
  animation: cursorBlink 1.1s steps(2) infinite;
}
@keyframes cursorBlink { 50% { opacity: 0; } }
.radio li .t { color: var(--orange); margin-right: 6px; }
.radio li.grim { color: var(--distress); }
.radio li.good { color: var(--saved); }

/* ── Fernschreiben »Festung Europa« ── */
.chart-block { position: relative; }
.telex {
  position: absolute;
  top: 30px; left: 0; right: 0;
  z-index: var(--z-card);
  display: flex; justify-content: center;
  pointer-events: none;
}
.telex-paper {
  pointer-events: auto;
  width: min(96%, 520px);
  background:
    radial-gradient(circle at 7px 50%, transparent 3px, oklch(0.93 0.015 90) 3.5px) left center / 14px 14px repeat-y,
    radial-gradient(circle at calc(100% - 7px) 50%, transparent 3px, oklch(0.93 0.015 90) 3.5px) right center / 14px 14px repeat-y,
    oklch(0.93 0.015 90);
  background-color: oklch(0.93 0.015 90);
  color: oklch(0.22 0.02 90);
  font-family: var(--mono);
  padding: 14px 26px 16px;
  transform: rotate(-.5deg);
  box-shadow: 0 18px 44px oklch(0 0 0 / .55);
  transition: translate .45s var(--ease-out-strong), opacity .35s;
}
.telex[hidden] { display: none; }
.telex.off .telex-paper { translate: 0 -130%; opacity: 0; }
.telex-head {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: .64rem; letter-spacing: .14em;
  border-bottom: 1px dashed oklch(0.22 0.02 90 / .4);
  padding-bottom: 7px; margin-bottom: 10px;
}
.telex-paper h3 {
  font-family: var(--display); font-weight: 400;
  text-transform: uppercase; letter-spacing: .03em;
  font-size: 1.45rem; line-height: 1.02;
  margin: 0 0 8px;
  color: oklch(0.45 0.2 25);
  text-wrap: balance;
}
.telex-satz { margin: 0 0 10px; font-size: .84rem; line-height: 1.55; min-height: 2.4em; }
.telex-satz .caret { animation: cursorBlink .8s steps(2) infinite; }
.telex-fakt {
  margin: 0 0 14px; padding-top: 9px;
  border-top: 1px dashed oklch(0.22 0.02 90 / .4);
  font-size: .74rem; line-height: 1.5;
  transition: opacity .4s;
}
.telex-fakt.pending { opacity: 0; }
.telex-fakt::before {
  content: "KEIN WITZ:";
  color: oklch(0.45 0.2 25);
  font-size: .64rem; letter-spacing: .12em; margin-right: 7px; font-weight: 700;
}
#telexOk {
  border: 2px solid oklch(0.22 0.02 90);
  background: none; color: oklch(0.22 0.02 90);
  font-family: var(--body); font-weight: 700; font-size: .85rem;
  padding: 8px 18px; cursor: pointer; width: 100%;
  transition: background .15s, color .15s, transform 120ms var(--ease-out-strong);
}
#telexOk:focus-visible { outline: 3px solid oklch(0.45 0.2 25); outline-offset: 2px; }

/* ── Karten-Akteure ── */
.fx { position: absolute; pointer-events: none; z-index: 4; will-change: transform; }
.fx svg { display: block; overflow: visible; }
.fx-drone { color: var(--ink-soft); filter: drop-shadow(0 0 6px oklch(0 0 0 / .6)); }
.fx-patrol { color: oklch(0.62 0.03 245); filter: drop-shadow(0 0 8px oklch(0 0 0 / .6)); }
.fx-patrol .hull { fill: color-mix(in oklch, currentColor 30%, transparent); stroke: currentColor; stroke-width: 2.5; }
.fx-patrol .det { fill: currentColor; }
.fx-tow { color: var(--abducted); }
.fx-tow .hull, .fx-tow .tube { stroke: currentColor; }
/* Sperrzonen-Band */
.zone-tape {
  position: absolute; z-index: 2; pointer-events: none;
  border: 3px solid transparent;
  border-image: repeating-linear-gradient(45deg,
    oklch(0.64 0.23 25) 0 8px, oklch(0.2 0.03 245) 8px 16px) 3;
  animation: tapeIn .5s var(--ease-out-strong) both;
}
.zone-tape .tag {
  position: absolute; top: -1px; left: -1px;
  font-family: var(--mono); font-size: .56rem; font-weight: 700; letter-spacing: .1em;
  background: oklch(0.64 0.23 25); color: #fff;
  padding: 1px 6px;
}
@keyframes tapeIn { 0% { transform: scale(1.15); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
/* Amtsstempel über der Karte */
.map-stamp {
  position: absolute; z-index: 5; pointer-events: none;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  font-family: var(--display); font-weight: 400;
  text-transform: uppercase; letter-spacing: .08em;
  font-size: clamp(1.3rem, 4.5vw, 2.2rem);
  color: var(--distress);
  border: 4px solid var(--distress);
  padding: .2em .5em;
  white-space: nowrap;
  opacity: 0;
  animation: stampIn 1.6s var(--ease-out-strong) forwards;
}
@keyframes stampIn {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(-8deg) scale(1.6); }
  12% { opacity: .95; transform: translate(-50%, -50%) rotate(-8deg) scale(1); }
  75% { opacity: .95; }
  100% { opacity: 0; transform: translate(-50%, -50%) rotate(-8deg) scale(1); }
}
/* Akten-Chip für unbestätigte Suche */
.pending-tag {
  position: absolute; z-index: 2; pointer-events: none;
  transform: translate(-50%, -110%);
  font-family: var(--mono); font-size: .55rem; font-weight: 700; letter-spacing: .08em;
  background: oklch(0.93 0.015 90); color: oklch(0.3 0.02 90);
  border: 1px solid oklch(0.45 0.2 25);
  padding: 1px 5px;
  box-shadow: 2px 2px 0 oklch(0.45 0.2 25 / .5);
}

/* ═══════════ Screen 3 · Bilanz & Bruch ═══════════ */
#screenEnd.active { display: flex; align-items: center; justify-content: center; padding: 24px; }
.bilanz { max-width: 620px; width: 100%; text-align: center; }
.bilanz h2 {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(2rem, 7vw, 3.4rem); letter-spacing: .02em;
  margin: 0 0 26px; line-height: 1;
}
.tally {
  display: flex; justify-content: center; gap: clamp(18px, 6vw, 52px);
  margin-bottom: 30px;
}
.tally div { min-width: 90px; }
.tally b {
  display: block; font-family: var(--display); font-weight: 400;
  font-size: clamp(2.4rem, 9vw, 4rem); line-height: 1;
}
.tally .saved b { color: var(--saved); }
.tally .drowned b { color: var(--distress); }
.tally .abducted b { color: var(--abducted); }
.tally .lbl {
  font-family: var(--mono); font-size: .7rem;
  text-transform: uppercase; letter-spacing: .12em; color: var(--ink-faint);
}
.bilanz .boats-recap {
  font-family: var(--mono); font-size: .8rem; color: var(--ink-soft);
  list-style: none; padding: 0; margin: 0 auto 34px;
  display: flex; flex-direction: column; gap: 4px; max-width: 380px;
  text-align: left;
}
/* Recap-Zeilen treten gestaffelt ein */
.bilanz .boats-recap li {
  animation: recapIn 240ms var(--ease-out-strong) both;
}
.bilanz .boats-recap li:nth-child(1) { animation-delay: .30s; }
.bilanz .boats-recap li:nth-child(2) { animation-delay: .36s; }
.bilanz .boats-recap li:nth-child(3) { animation-delay: .42s; }
.bilanz .boats-recap li:nth-child(4) { animation-delay: .48s; }
.bilanz .boats-recap li:nth-child(5) { animation-delay: .54s; }
@keyframes recapIn {
  from { opacity: 0; transform: translateY(6px); }
}
.bilanz-geld {
  font-family: var(--mono); font-size: .8rem; color: var(--ink-soft);
  max-width: 46ch; margin: -14px auto 32px;
}
.bilanz .boats-recap .ok { color: var(--saved); }
.bilanz .boats-recap .bad { color: var(--distress); }
.bilanz .boats-recap .abd { color: var(--abducted); }
.btn-primary {
  border: none; background: var(--orange); color: var(--orange-ink);
  font-weight: 700; font-size: 1rem;
  padding: 14px 30px; cursor: pointer;
  transition: background .15s, transform .15s;
}
.btn-primary:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* Bruch */
#screenBruch.active {
  display: flex; align-items: center; justify-content: center;
  background: #000; color: #fff;
  padding: 24px;
}
.bruch { max-width: 560px; text-align: center; }
.bruch p {
  font-size: clamp(1.25rem, 4vw, 1.7rem);
  font-weight: 600; line-height: 1.45;
  margin: 0 0 1.1em;
  opacity: 0;
  animation: bruchIn .8s var(--ease-out-strong) forwards;
  text-wrap: balance;
}
.bruch p:nth-child(1) { animation-delay: .4s; }
.bruch p:nth-child(2) { animation-delay: 1.6s; }
.bruch p.zahlen { animation-delay: 3s; font-family: var(--mono); font-weight: 400; font-size: clamp(.95rem, 3vw, 1.1rem); color: oklch(0.8 0.02 245); }
.bruch .quelle { animation-delay: 3.6s; font-size: .75rem; color: oklch(0.6 0.02 245); font-family: var(--mono); font-weight: 400; }
.bruch .ctas {
  display: flex; flex-direction: column; gap: 12px; align-items: center;
  margin-top: 34px;
  opacity: 0; animation: bruchIn .8s .5s var(--ease-out-strong) forwards;
}
.bruch .ctas.ready { animation-delay: 4.2s; }
@keyframes bruchIn { to { opacity: 1; } }
.cta-spende {
  display: block; width: 100%; max-width: 380px;
  background: var(--orange); color: var(--orange-ink);
  text-decoration: none; font-weight: 700; font-size: 1.15rem;
  padding: 16px 24px; text-align: center;
  transition: background .15s, transform .15s;
}
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.cta-sub {
  color: #fff; background: none;
  border: 1px solid oklch(0.4 0.01 245);
  text-decoration: none; font-size: .88rem; font-weight: 600;
  padding: 10px 18px; cursor: pointer;
  transition: border-color .15s, transform 120ms var(--ease-out-strong);
}
a.cta-sub { display: inline-block; }
.bruch .again {
  margin-top: 26px; background: none; border: none;
  color: oklch(0.64 0.02 245); font-size: .8rem; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}

/* ── Hover nur für echte Zeiger, Press-Feedback für alle ── */
@media (hover: hover) {
  .plakat-cta:hover { transform: translateY(-2px) rotate(-.5deg); background: oklch(0.16 0.04 45); }
  .btn-primary:hover { background: var(--orange-hot); transform: translateY(-1px); }
  .cta-spende:hover { background: var(--orange-hot); transform: translateY(-1px); }
  .iconbtn:hover { border-color: var(--orange); color: var(--ink); }
  #telexOk:hover { background: oklch(0.22 0.02 90); color: oklch(0.93 0.015 90); }
  .cta-sub:hover { border-color: #fff; }
  .bruch .again:hover { color: #fff; }
}
.plakat-cta:active, .btn-primary:active, .cta-spende:active,
.cta-sub:active, #telexOk:active, .iconbtn:active, .fleetrow:active {
  transform: scale(0.97);
}
.grid:not(.inert) .cell.free:active { transform: scale(0.95); }

/* ═══════════ Responsive & Motion ═══════════ */
@media (max-width: 920px) {
  .layout { gap: 18px; }
  .side { width: min(100%, calc(var(--cell) * 10 + 60px)); }
  .radio { max-height: 130px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .bruch p, .bruch .ctas { opacity: 1; animation: none; }
  .flash { display: none; }
  .grid::before { animation: none; opacity: .5; }
  .ripple, .burst { display: none; }
  .float-tag { animation: none; opacity: 1; }
  .radio li:first-child::after, .hud-title::before, .sector-box.critical { animation: none; }
  .cell.contact, .cell.rescued { animation: none; }
  .appealbtn.broke { animation: none; }
  .fx { display: none; }
  .map-stamp { animation: stampFadeReduced 1.6s linear forwards; }
  .telex-satz .caret { display: none; }
  /* Sanfte Fades bleiben: Opacity ist keine Bewegung */
  .telex-paper { transition: opacity 200ms ease !important; }
  .telex.off .telex-paper { translate: 0 0; }
  .boat { transition: border-color 200ms ease, background-color 200ms ease, opacity 200ms ease !important; }
}
@keyframes stampFadeReduced { 0%, 80% { opacity: .95; } 100% { opacity: 0; }
}
