:root {
  --navy: #14213d;
  --navy-deep: #0b1426;
  --gold: #d4a944;
  --gold-light: #f0d68a;
  --burgundy: #8c1c2b;
  --paper: #fbf3e2;
  --paper-dark: #efe0bf;
  --ink: #161616;
  --sea: #8ec5e8;
  --green: #2f7d4f;
  --radius: 14px;
  --shadow: 5px 5px 0 var(--ink);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--navy);
  background-image: radial-gradient(rgba(212, 169, 68, .12) 1.2px, transparent 1.3px);
  background-size: 14px 14px;
  color: var(--ink);
  font: 16px/1.5 "Nunito", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--burgundy); font-weight: 700; }
button { font: inherit; cursor: pointer; }

/* ---------- Hero ---------- */
.marquee {
  text-align: center;
  border: 3px solid var(--gold);
  outline: 1px solid var(--gold);
  outline-offset: 5px;
  padding: 16px 10px;
  margin: 8px 6px 22px;
  background: linear-gradient(180deg, #1c2d52, var(--navy-deep));
}
.marquee-small {
  display: block;
  font: 11px/1.3 "Special Elite", monospace;
  letter-spacing: .08em;
  color: var(--gold-light);
  text-transform: uppercase;
}
.marquee h1 {
  font: clamp(22px, 6.6vw, 34px)/1.05 "Limelight", serif;
  color: var(--gold);
  margin: 10px 0;
  letter-spacing: .04em;
  text-shadow: 0 2px 0 #000;
}
.marquee h1 span { font-size: 1.3em; display: inline-block; white-space: nowrap; }

.conductor-row { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 18px; }
.conductor { width: 92px; flex: none; animation: bob 3s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-4px) rotate(-2deg); } }
.bubble {
  flex: 1;
  position: relative;
  background: #fff;
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 18px;
  padding: 10px 14px;
  font-size: 15px;
  box-shadow: var(--shadow);
  margin-bottom: 34px;
}
.bubble::before {
  content: "";
  position: absolute;
  left: -16px; bottom: 14px;
  border: 10px solid transparent;
  border-right: 14px solid var(--ink);
}
.bubble::after {
  content: "";
  position: absolute;
  left: -9px; bottom: 17px;
  border: 7px solid transparent;
  border-right: 10px solid #fff;
}

.board {
  background: #111;
  border: 4px solid #2b2b2b;
  border-radius: var(--radius);
  padding: 14px 10px 12px;
  box-shadow: 0 0 0 3px var(--gold), var(--shadow);
  text-align: center;
}
.board-title { font: 20px "Bangers", cursive; letter-spacing: .1em; color: var(--gold); }
.flaps { display: flex; justify-content: center; gap: 8px; margin: 8px 0; }
.flap { display: flex; flex-direction: column; align-items: center; }
.flap b {
  display: block;
  min-width: 62px;
  font: 38px/1 "Special Elite", monospace;
  color: #f7f1df;
  background: linear-gradient(180deg, #2c2c2c 0 49%, #000 49% 51%, #232323 51%);
  border-radius: 6px;
  padding: 10px 4px;
  box-shadow: inset 0 -2px 0 rgba(255,255,255,.07);
}
.flap b.tick { animation: flip .35s ease; }
@keyframes flip { 0% { transform: rotateX(80deg); } 100% { transform: rotateX(0); } }
.flap small { color: #bbb; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; margin-top: 4px; }
.board-meta { display: flex; flex-direction: column; gap: 2px; color: #ddd; font-size: 13px; }

/* ---------- Panels ---------- */
main { max-width: 600px; margin: 0 auto; padding: 8px 16px calc(96px + env(safe-area-inset-bottom)); color: var(--ink); }
.panel {
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 16px;
  margin: 26px 0;
  position: relative;
}
.halftone-bg, .panel.map-panel {
  background-image: radial-gradient(rgba(0,0,0,.07) 1px, transparent 1.2px);
  background-size: 8px 8px;
  background-color: var(--paper);
}
.sfx {
  font: 30px/1 "Bangers", cursive;
  letter-spacing: .06em;
  color: var(--gold);
  -webkit-text-stroke: 1.5px var(--ink);
  text-shadow: 3px 3px 0 var(--ink);
  margin: -36px 0 12px -4px;
  transform: rotate(-2deg);
  display: inline-block;
  background: var(--burgundy);
  padding: 6px 14px 4px;
  border: 3px solid var(--ink);
  border-radius: 10px;
}
.caption { margin: 0 0 12px; }
.small { font-size: 13px; color: #555; }

/* ---------- Map ---------- */
#map svg { width: 100%; height: auto; display: block; border: 2px solid var(--ink); border-radius: 10px; background: #f6ebcf; }
#map .st { cursor: pointer; }
#map .st circle { transition: r .2s; }
#map .st:hover circle, #map .st:focus circle { r: 5.5; }
#map text { font-family: "Nunito", sans-serif; font-weight: 800; paint-order: stroke; stroke: #f6ebcf; stroke-width: 3px; }

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  padding: 10px 16px;
  background: var(--gold);
  color: var(--ink);
  font: 20px/1 "Bangers", cursive;
  letter-spacing: .06em;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .08s, box-shadow .08s;
}
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.btn.secondary { background: #fff; }
.btn.danger { background: #f3c1c1; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

.field { display: block; margin: 12px 0; font-weight: 800; }
.field > span { display: block; font-size: 14px; margin-bottom: 4px; }
.field em { font-weight: 400; font-style: normal; color: #666; font-size: 13px; }
input[type=text], textarea {
  width: 100%;
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  padding: 10px 12px;
  font: 16px "Nunito", sans-serif;
  background: #fff;
}
input[type=text]:focus, textarea:focus { outline: 3px solid var(--gold); }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check {
  display: inline-flex; align-items: center; gap: 6px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  padding: 6px 12px;
  background: #fff;
  font-weight: 700; font-size: 14px;
  cursor: pointer;
  user-select: none;
}
.check input { display: none; }
.check:has(input:checked) { background: var(--gold); }

/* ---------- Login / PIN ---------- */
.login-box {
  margin-top: 18px;
  padding: 12px 14px;
  border: 2.5px dashed var(--ink);
  border-radius: 12px;
  background: #fff;
  font-size: 15px;
}
.login-box.warn { border-style: solid; background: #fff3cd; margin: 14px 0 0; }
input.pin-input {
  width: 100%;
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  padding: 10px 12px;
  font: 24px/1 "Special Elite", monospace;
  letter-spacing: .4em;
  text-align: center;
  background: #fff;
}
input.pin-input:focus { outline: 3px solid var(--gold); }
.who-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.who-choice {
  display: flex; align-items: center; gap: 10px;
  border: 2.5px solid var(--ink); border-radius: 12px;
  padding: 10px 12px; background: #fff;
  font-weight: 800; cursor: pointer;
}
.who-choice:has(input:checked) { background: var(--gold); }
.who-choice.disabled { opacity: .5; cursor: not-allowed; }
.who-choice input { width: 20px; height: 20px; accent-color: var(--navy); }
.who-choice small { font-weight: 400; }
.link-btn {
  margin-left: 8px; padding: 0 8px;
  border: 1.5px solid var(--ink); border-radius: 999px;
  background: #fff; font-size: 12px; font-weight: 700;
}

/* ---------- Ticket ---------- */
.ticket {
  position: relative;
  background: linear-gradient(135deg, #fff8e4, #f3e2b8);
  border: 3px solid var(--ink);
  border-radius: 12px;
  padding: 16px 18px 16px 26px;
  font-family: "Special Elite", monospace;
  overflow: hidden;
  box-shadow: 4px 4px 0 var(--ink);
}
.ticket::before {
  content: "";
  position: absolute; left: 8px; top: 8px; bottom: 8px;
  border-left: 3px dotted var(--ink);
}
.ticket-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px dashed var(--ink); padding-bottom: 6px; margin-bottom: 8px; }
.ticket-head b { font: 22px "Limelight", serif; color: var(--burgundy); }
.ticket-row { display: flex; gap: 8px; margin: 4px 0; font-size: 15px; }
.ticket-row span:first-child { color: #7a6a4a; min-width: 82px; font-size: 12px; text-transform: uppercase; padding-top: 2px; }
.ticket .punch {
  position: absolute; right: 14px; top: 46px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--ink);
}
.ticket .stamp { position: absolute; right: 10px; bottom: 12px; }
.ticket-link { font-size: 13px; margin-top: 10px; word-break: break-all; }
.ticket-link code { background: #fff; padding: 2px 6px; border: 1px solid #ccc; border-radius: 6px; }

.stamp {
  display: inline-block;
  font: 18px/1 "Bangers", cursive;
  letter-spacing: .08em;
  padding: 6px 10px 4px;
  border: 3px solid currentColor;
  border-radius: 8px;
  transform: rotate(-8deg);
  opacity: .85;
  text-transform: uppercase;
}
.stamp.free { color: var(--green); }
.stamp.taken { color: var(--burgundy); }
.stamp.mine { color: #1d4ed8; }
.stamp.secret { color: #555; }
.stamp.slam { animation: slam .45s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes slam { 0% { transform: scale(3) rotate(-20deg); opacity: 0; } 100% { transform: scale(1) rotate(-8deg); opacity: .85; } }

/* ---------- Route / legs ---------- */
.leg {
  position: relative;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--ink);
  margin: 0 0 22px;
  overflow: hidden;
  scroll-margin-top: 20px;
}
.leg::before {
  content: "";
  position: absolute; left: -33px; top: 22px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--gold); border: 3px solid var(--ink);
}
.leg-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  color: #fff;
  background: var(--leg-color, var(--navy));
  border-bottom: 3px solid var(--ink);
  background-image: radial-gradient(rgba(255,255,255,.14) 1.2px, transparent 1.3px);
  background-size: 7px 7px;
}
.leg-flag { font-size: 32px; line-height: 1; }
.leg-title { flex: 1; min-width: 0; }
.leg-title small { display: block; font: 12px "Special Elite", monospace; opacity: .9; text-transform: uppercase; letter-spacing: .05em; }
.leg-title b { display: block; font: 24px/1.05 "Bangers", cursive; letter-spacing: .05em; text-shadow: 2px 2px 0 #000; }
.leg-body { padding: 12px 14px 14px; }
.leg-stations { font: 14px "Special Elite", monospace; margin-bottom: 10px; }
.leg-stations .sep { color: var(--gold); margin: 0 4px; }
.course-badge {
  display: inline-block;
  background: var(--navy); color: var(--gold-light);
  border-radius: 999px; padding: 3px 12px;
  font-weight: 800; font-size: 13px;
  margin-bottom: 10px;
}
.fact {
  background: #fffbe9;
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 14px;
  position: relative;
  margin: 6px 0 12px;
}
.fact summary { cursor: pointer; font: 15px "Bangers", cursive; letter-spacing: .05em; color: var(--burgundy); list-style: none; }
.fact summary::-webkit-details-marker { display: none; }
.fact summary::after { content: " ▸ antippen"; font: 12px "Nunito", sans-serif; color: #888; }
.fact[open] summary::after { content: " ▾"; }
.fact p { margin: 4px 0 0; }
.ideas { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ideas span { background: var(--paper-dark); border: 1.5px solid var(--ink); border-radius: 999px; padding: 2px 10px; font-size: 13px; }
.leg-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.leg-foot .who { font-size: 14px; }
.leg.taken .leg-head { filter: saturate(.75); }
.leg.mine { box-shadow: 0 0 0 4px #1d4ed8, 4px 4px 0 var(--ink); }
.leg.flash { animation: flash 1.2s ease; }
@keyframes flash { 30% { transform: scale(1.03) rotate(-.6deg); } }
.leg.retour { --leg-color: #3b3b3b; }
.leg.retour::before { background: var(--burgundy); }

/* ---------- Passengers ---------- */
.pax { list-style: none; margin: 0; padding: 0; }
.pax li {
  display: flex; gap: 10px; align-items: flex-start;
  border-bottom: 2px dashed #c9b88f;
  padding: 10px 0;
}
.pax li:last-child { border-bottom: 0; }
.pax .seat {
  flex: none;
  width: 40px; height: 40px;
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--gold);
  font: 18px "Bangers", cursive;
}
.pax .seat.empty { background: #e9e1cc; color: #8a7d5e; border-style: dashed; }
.pax .pname { font-weight: 800; }
.pax .greet { font-size: 14px; font-style: italic; color: #444; }
.pax .pleg { font-size: 13px; margin-top: 2px; }
.pax .bio {
  font-size: 14px; margin: 6px 0 2px; padding: 6px 10px;
  background: #fffbe9; border: 2px dashed #b9a571; border-radius: 8px;
  white-space: pre-line;
}

/* ---------- Gear ---------- */
.gear-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; margin-bottom: 10px; }
.gear-item {
  background: #fff; border: 2.5px solid var(--ink); border-radius: 12px;
  text-align: center; padding: 10px 6px; position: relative;
  box-shadow: 3px 3px 0 var(--ink);
}
.gear-item .gi { font-size: 30px; }
.gear-item .gl { font-weight: 800; font-size: 14px; }
.gear-item .gc {
  position: absolute; top: -10px; right: -8px;
  background: var(--burgundy); color: #fff; border: 2px solid var(--ink);
  border-radius: 999px; min-width: 26px; height: 26px; font-weight: 800; font-size: 14px;
  display: grid; place-items: center;
}
.gear-item .gw { font-size: 12px; color: #555; margin-top: 4px; }

/* ---------- Info ---------- */
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { display: flex; gap: 12px; padding: 8px 0; }
.info-list li > span { font-size: 26px; }

footer { text-align: center; color: var(--gold-light); font: 12px "Special Elite", monospace; padding: 10px 16px 40px; }

/* ---------- Sheet (modal) ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(10, 15, 30, .65);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet-backdrop[hidden] { display: none; }
.sheet {
  width: 100%; max-width: 560px; max-height: 92vh; overflow: auto;
  background: var(--paper);
  border: 3px solid var(--ink); border-bottom: 0;
  border-radius: 20px 20px 0 0;
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
  animation: up .25s ease-out;
}
@media (min-width: 600px) {
  .sheet-backdrop { align-items: center; }
  .sheet { border-bottom: 3px solid var(--ink); border-radius: 20px; }
}
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet h3 { font: 28px/1.05 "Bangers", cursive; letter-spacing: .05em; margin: 0 0 6px; color: var(--burgundy); }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60;
  transform: translateX(-50%);
  background: var(--ink); color: #fff;
  border: 2px solid var(--gold);
  padding: 10px 16px; border-radius: 12px;
  max-width: calc(100% - 32px);
  font-weight: 700;
  box-shadow: 3px 3px 0 var(--gold);
}

/* ---------- Steam puffs ---------- */
.puff {
  position: fixed; z-index: 70; pointer-events: none;
  width: 40px; height: 40px; border-radius: 50%;
  background: #fff; border: 2px solid #ccc;
  animation: puff 1.4s ease-out forwards;
}
@keyframes puff { to { transform: translate(var(--dx), -220px) scale(2.4); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
@media (min-width: 420px) {
  .flap b { min-width: 74px; font-size: 44px; }
}

/* ================= App-Struktur ================= */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 10px 16px calc(10px);
  padding-top: calc(10px + env(safe-area-inset-top));
  background: var(--navy-deep);
  border-bottom: 3px solid var(--gold);
  color: var(--gold-light);
  font: 13px "Special Elite", monospace;
}
.topbar-title b { font: 16px "Limelight", serif; color: var(--gold); font-weight: 400; }
.topbar-cd { white-space: nowrap; color: #fff; }

.screen { animation: screen-in .3s ease-out; }
@keyframes screen-in { from { opacity: 0; transform: translateY(12px); } }
.screen .marquee { margin-top: 18px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; justify-content: center;
  background: var(--paper);
  border-top: 3px solid var(--ink);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -4px 0 rgba(0,0,0,.25);
}
.tabbar a {
  position: relative;
  flex: 1; min-width: 0; max-width: 110px;
  display: flex; flex-direction: column; align-items: center;
  padding: 7px 2px 8px;
  text-decoration: none; color: var(--ink);
  font: 700 10.5px "Nunito", sans-serif;
  border-right: 2px solid #e0d2b0;
  white-space: nowrap;
}
.tabbar a:last-child { border-right: 0; }
.tabbar a span { font-size: 22px; line-height: 1.1; transition: transform .15s; }
.tabbar a.active { background: var(--gold); }
.tabbar a.active span { transform: scale(1.18) rotate(-6deg); }
.tabbar .dot {
  position: absolute; top: 5px; right: calc(50% - 20px);
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--burgundy); border: 2px solid var(--ink);
  animation: pulse 1.4s infinite;
}
@keyframes pulse { 50% { transform: scale(1.35); } }

.btn.big { font-size: 26px; padding: 14px 16px; }
.btn.round { width: 46px; height: 46px; padding: 0; border-radius: 50%; font-size: 16px; }
.caption.light { color: var(--paper); text-align: center; font-size: 14px; }
.comic-replay {
  display: block; margin: 0 auto 10px; background: none; border: 0;
  color: var(--gold-light); text-decoration: underline; font-weight: 700;
}
.howto { padding-left: 22px; margin: 0 0 14px; }
.howto li { margin: 6px 0; }

/* ---------- Zug mit Waggons ---------- */
.train-scroll { overflow-x: auto; margin: 0 -16px; padding: 6px 16px 14px; scrollbar-width: none; }
.train-scroll::-webkit-scrollbar { display: none; }
.train {
  display: flex; align-items: flex-end; gap: 6px; width: max-content;
  padding-bottom: 8px;
  background: linear-gradient(transparent calc(100% - 4px), var(--ink) 0) bottom / 100% 100% no-repeat;
}
.loco { font-size: 54px; line-height: 1; filter: drop-shadow(2px 2px 0 rgba(0,0,0,.3)); animation: chug .6s ease-in-out infinite alternate; }
@keyframes chug { to { transform: translateY(-2px); } }
.wagon {
  position: relative;
  width: 78px; height: 74px;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 4px 4px 12px;
  border: 3px solid var(--ink); border-radius: 10px 10px 4px 4px;
  background: #e9dfc6;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .15s;
}
.wagon:active { transform: translateY(3px); }
.wagon::before, .wagon::after {
  content: ""; position: absolute; bottom: -10px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #333; border: 2.5px solid var(--ink);
}
.wagon::before { left: 10px; } .wagon::after { right: 10px; }
.wagon.taken { background: var(--leg-color); color: #fff; }
.wagon.mine { outline: 4px solid #1d4ed8; outline-offset: 2px; }
.wagon.host { background: var(--burgundy); color: #fff; }
.wagon-no { font: 14px/1 "Bangers", cursive; letter-spacing: .05em; }
.wagon-win {
  width: 52px; height: 28px; display: grid; place-items: center;
  background: #fff8e4; border: 2px solid var(--ink); border-radius: 6px;
  font-size: 17px; line-height: 1;
}
.wagon-label { font: 800 11px/1 "Nunito", sans-serif; max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cta { margin-top: 10px; }

/* ---------- Karussell ---------- */
.leg-tabs { display: flex; justify-content: space-between; gap: 4px; margin-top: 10px; }
.leg-tabs button {
  flex: 1; min-width: 0; padding: 6px 0; font-size: 17px; line-height: 1.2; white-space: nowrap; letter-spacing: -.25em;
  background: #fff; border: 2px solid var(--ink); border-radius: 8px;
  transition: transform .15s;
}
.leg-tabs button.active { background: var(--gold); transform: translateY(-3px); box-shadow: 0 3px 0 var(--ink); }
#map .st.focus circle { stroke-width: 2.5; }

.carousel {
  position: relative; /* Bezugspunkt für offsetLeft der Karten */
  display: flex; gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 18px -16px 0;
  padding: 4px calc(50% + 16px - min(43vw, 250px)) 12px;
  scrollbar-width: none;
  align-items: stretch;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel .leg { flex: 0 0 min(86vw, 500px); scroll-snap-align: center; margin: 0; display: flex; flex-direction: column; }
.carousel .leg-body { flex: 1; display: flex; flex-direction: column; }
.carousel .leg-foot { margin-top: auto; padding-top: 4px; }
.carousel .scene-char { font-size: 42px; }
.carousel .scene-bubble { font-size: 14px; padding: 6px 10px; margin-bottom: 12px; }
.carousel .ideas span { font-size: 12px; }
.carousel .leg::before { display: none; }
.carousel-nav { display: flex; justify-content: center; align-items: center; gap: 18px; color: var(--paper); font: 20px "Bangers", cursive; letter-spacing: .08em; margin: 6px 0 8px; }

.scene { display: flex; align-items: flex-end; gap: 6px; margin: 0 0 12px; }
.scene-char { font-size: 50px; line-height: 1; flex: none; animation: bob 3s ease-in-out infinite; }
.scene-bubble {
  position: relative; flex: 1;
  background: #fff; border: 2.5px solid var(--ink); border-radius: 16px;
  padding: 8px 12px; font: 15px/1.35 "Nunito", sans-serif; font-weight: 700;
  margin-bottom: 18px;
}
.scene-bubble::before {
  content: ""; position: absolute; left: -12px; bottom: 6px;
  border: 7px solid transparent; border-right: 11px solid var(--ink);
}
.scene-bubble::after {
  content: ""; position: absolute; left: -7px; bottom: 8px;
  border: 5px solid transparent; border-right: 8px solid #fff;
}

/* ---------- Intro-Comic ---------- */
.intro {
  position: fixed; inset: 0; z-index: 80;
  display: flex; flex-direction: column;
  background: var(--navy);
  background-image: radial-gradient(rgba(212, 169, 68, .18) 1.4px, transparent 1.5px);
  background-size: 12px 12px;
  padding: calc(16px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom));
}
.intro[hidden] { display: none; }
.intro-stage { flex: 1; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.comic-panel {
  position: relative;
  width: 100%; max-width: 460px; min-height: 360px;
  background: var(--paper);
  background-image: radial-gradient(rgba(0,0,0,.08) 1.2px, transparent 1.3px);
  background-size: 9px 9px;
  border: 4px solid var(--ink); border-radius: 6px;
  box-shadow: 8px 8px 0 #000;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: 56px 18px 28px;
  animation: panel-in .45s cubic-bezier(.2, 1.4, .4, 1);
  transform: rotate(-1deg);
}
@keyframes panel-in { from { transform: scale(.6) rotate(-8deg); opacity: 0; } }
.comic-caption {
  position: absolute; top: -4px; left: -4px; max-width: 80%;
  background: #ffe066; border: 4px solid var(--ink);
  padding: 8px 12px; font: 16px/1.25 "Special Elite", monospace;
}
.comic-art { font-size: 92px; line-height: 1; text-align: center; animation: bob 3s ease-in-out infinite; }
.comic-art svg { width: 130px; }
.comic-bubble {
  position: relative; background: #fff; border: 3.5px solid var(--ink); border-radius: 50% / 40%;
  padding: 16px 22px; font: 20px/1.2 "Bangers", cursive; letter-spacing: .04em; text-align: center; max-width: 92%;
  animation: pop .4s .25s both cubic-bezier(.2, 1.6, .4, 1);
}
.comic-bubble::after {
  content: ""; position: absolute; top: -20px; left: 30%;
  border: 10px solid transparent; border-bottom: 16px solid var(--ink);
}
@keyframes pop { from { transform: scale(0); } }
.comic-sfx {
  position: absolute; right: 10px; bottom: 10px;
  font: 40px/1 "Bangers", cursive; letter-spacing: .04em;
  color: #ffd23f; -webkit-text-stroke: 2px var(--ink); text-shadow: 4px 4px 0 var(--burgundy);
  transform: rotate(-10deg);
  animation: pop .35s .45s both cubic-bezier(.2, 1.8, .4, 1);
}
.comic-panel.telegram { background: #f4ecd2; align-items: stretch; justify-content: flex-start; padding-top: 22px; }
.telegram-head { font: 13px "Special Elite", monospace; border-bottom: 2px solid var(--ink); padding-bottom: 6px; color: var(--burgundy); text-transform: uppercase; }
.telegram-text { font: 22px/1.5 "Special Elite", monospace; min-height: 220px; }
.telegram-text::after { content: "▍"; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.intro-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; max-width: 460px; width: 100%; margin: 14px auto 0; }
.intro-skip { background: none; border: 0; color: var(--gold-light); text-decoration: underline; }
.intro-dots { display: flex; gap: 6px; }
.intro-dots i { width: 10px; height: 10px; border-radius: 50%; background: #445; border: 2px solid var(--gold); }
.intro-dots i.on { background: var(--gold); }

/* ================= Krimi & Akte ================= */
.act-panel { padding: 14px; background: #fff3cd; }
.act-card { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.act-card.locked { opacity: .85; margin-bottom: 0; }
.act-card b { font: 22px/1.1 "Bangers", cursive; letter-spacing: .05em; color: var(--burgundy); display: block; }
.act-icon { font-size: 40px; line-height: 1; animation: bob 3s ease-in-out infinite; }
.journey { font-size: 14px; font-weight: 700; margin: 4px 0 0; }
.map-train-bob { animation: bob 1.2s ease-in-out infinite; }

.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 21px; top: 10px; bottom: 10px; border-left: 4px dotted var(--ink); }
.tl { display: flex; gap: 12px; padding: 8px 0; position: relative; }
.tl-icon {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; font-size: 22px;
  background: #fff; border: 3px solid var(--ink);
}
.tl.done .tl-icon { background: var(--paper-dark); }
.tl.now .tl-icon { background: var(--gold); animation: pulse 1.6s infinite; }
.tl.next { opacity: .7; }
.tl-body { padding-top: 2px; }
.tl-body .link-btn { margin: 4px 0 0; }

.locked-box { text-align: center; padding: 6px 4px; }
.big-icon { font-size: 44px; }

.belt {
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 0 -16px 12px; padding: 6px 16px 18px;
  background: repeating-linear-gradient(90deg, #555 0 18px, #444 18px 36px) bottom / 100% 12px no-repeat;
  scrollbar-width: none;
}
.belt::-webkit-scrollbar { display: none; }
.suitcase {
  flex: 0 0 62%; scroll-snap-align: center;
  background: #c08a4a; color: var(--ink);
  border: 3px solid var(--ink); border-radius: 12px;
  padding: 14px 12px 12px; position: relative;
  box-shadow: 3px 3px 0 var(--ink);
  background-image: linear-gradient(90deg, transparent 20%, rgba(0,0,0,.15) 20% 23%, transparent 23% 77%, rgba(0,0,0,.15) 77% 80%, transparent 80%);
}
.suitcase::before {
  content: ""; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  width: 40px; height: 12px; border: 3px solid var(--ink); border-bottom: 0; border-radius: 8px 8px 0 0;
}
.suitcase-tag {
  display: inline-block; background: #fff8e4; border: 2px solid var(--ink); border-radius: 6px;
  font: 13px "Special Elite", monospace; padding: 1px 6px; margin-bottom: 8px; transform: rotate(-3deg);
}
.suitcase-text { background: rgba(255, 248, 228, .92); border-radius: 8px; padding: 8px; font-weight: 700; min-height: 64px; font-size: 14px; }
.suitcase:not(.full) .suitcase-text { font-weight: 400; font-style: italic; color: #666; }
.declare textarea { resize: vertical; }

.tips { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.tip-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #fff; border: 2.5px solid var(--ink); border-radius: 12px; padding: 8px 10px;
  font-weight: 800; font-size: 14px;
}
.tip-row.own { background: #dbeafe; }
.tip-row.empty { opacity: .6; }
.tip-row select {
  max-width: 55%; font: 700 14px "Nunito", sans-serif;
  border: 2px solid var(--ink); border-radius: 8px; padding: 6px; background: var(--paper);
}
.tip-row select.dupe { background: #f3c1c1; }

.ranking { list-style: none; padding: 0; margin: 0; }
.ranking li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 2px dashed #c9b88f; }
.ranking li.winner { background: #fff3cd; border-radius: 10px; font-size: 18px; }
.ranking .rk { width: 30px; text-align: center; font-weight: 800; }
.ranking .rn { flex: 1; font-weight: 800; }
.ranking .rh { font: 18px "Bangers", cursive; letter-spacing: .05em; }
.my-tips { padding-left: 4px; list-style: none; margin: 0; }
.my-tips li { padding: 3px 0; }

/* Schnee in Akt 2 */
.snow {
  position: fixed; inset: 0; z-index: 35; pointer-events: none;
  background-image:
    radial-gradient(4px 4px at 20px 30px, #fff 50%, transparent 51%),
    radial-gradient(3px 3px at 80px 120px, #fff 50%, transparent 51%),
    radial-gradient(5px 5px at 150px 60px, rgba(255,255,255,.9) 50%, transparent 51%),
    radial-gradient(3px 3px at 200px 180px, #fff 50%, transparent 51%),
    radial-gradient(4px 4px at 260px 90px, rgba(255,255,255,.8) 50%, transparent 51%);
  background-size: 300px 220px;
  animation: snow 9s linear infinite;
  opacity: .8;
}
.snow[hidden] { display: none; }
@keyframes snow { to { background-position: 60px 220px, -40px 220px, 30px 220px, -20px 220px, 50px 220px; } }

/* Enthüllungs-Comic */
.reveal-list { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.reveal-title { font: 34px "Bangers", cursive; letter-spacing: .05em; color: var(--burgundy); text-align: center; transform: rotate(-2deg); }
.reveal-row {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 3px solid var(--ink); border-radius: 10px; padding: 6px 10px;
  animation: row-in .5s cubic-bezier(.2, 1.6, .4, 1) both;
}
@keyframes row-in { from { transform: scale(2) rotate(-6deg); opacity: 0; } }
.reveal-flag { font-size: 26px; }
.reveal-who small { display: block; font-size: 12px; color: #666; }
.reveal-who b { font: 20px/1.1 "Bangers", cursive; letter-spacing: .04em; }
.winner-box { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; }

/* ================= Bordbuch & Fahndungsplakate ================= */
.episode { margin-bottom: 22px; }
.episode-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.episode-head small { display: block; font: 12px "Special Elite", monospace; color: #7a6a4a; }
.episode-head b { font: 24px/1.05 "Bangers", cursive; letter-spacing: .04em; }
.next-ep { text-align: center; margin: 0; }

.poster {
  position: relative;
  background: #f1dfb2;
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(120, 80, 20, .18), transparent 40%),
    radial-gradient(ellipse at 85% 90%, rgba(120, 80, 20, .22), transparent 45%);
  border: 3px solid #5b4527;
  box-shadow: 4px 4px 0 var(--ink);
  padding: 14px 16px 16px;
  text-align: center;
  font-family: "Special Elite", monospace;
  transform: rotate(-.8deg);
}
.poster::before, .poster::after {
  content: ""; position: absolute; top: 6px; width: 10px; height: 10px; border-radius: 50%;
  background: #8a8a8a; border: 2px solid #333;
}
.poster::before { left: 8px; } .poster::after { right: 8px; }
.poster-head { font: 46px/1 "Bangers", cursive; letter-spacing: .12em; color: #5b2a14; }
.poster-sub { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: #5b4527; margin-bottom: 8px; }
.poster-face {
  width: 110px; height: 110px; margin: 0 auto 6px;
  display: grid; place-items: center; font-size: 72px;
  background: #e8d3a0; border: 3px solid #5b4527; filter: sepia(.35);
}
.poster-name { font: 34px/1 "Bangers", cursive; letter-spacing: .08em; color: var(--ink); }
.poster-label { font-size: 12px; color: #5b4527; margin: 6px 0 2px; }
.poster-charge { font-size: 14px; line-height: 1.35; }
.poster-acc { font-size: 13px; margin-top: 8px; }
.poster-reward {
  margin: 10px auto 0; padding: 6px 10px; max-width: 320px;
  border-top: 2px solid #5b4527; border-bottom: 2px solid #5b4527;
  font-weight: 700; font-size: 14px;
}
.poster-reward small { display: block; font: 18px "Bangers", cursive; letter-spacing: .1em; color: var(--burgundy); }
.vote { margin-top: 12px; font-family: "Nunito", sans-serif; }
.vote-q { font: 18px "Bangers", cursive; letter-spacing: .05em; }
.vote .btn-row { justify-content: center; margin: 6px 0; }
.vote .btn { font-size: 18px; padding: 8px 14px; }
.comic-panel .poster { transform: none; width: 100%; padding: 10px 12px; }
.comic-panel .poster-face { width: 84px; height: 84px; font-size: 56px; }
.comic-panel .poster-head { font-size: 38px; }
.comic-panel { max-height: calc(100vh - 120px); overflow-y: auto; }
.comic-bubble .who { display: block; font-size: 14px; color: var(--burgundy); letter-spacing: .06em; }

/* ================= Bordfunk & Orakel ================= */
.bordfunk {
  margin: 0 0 22px;
  background: #111; color: #ffd23f;
  border: 3px solid var(--gold); border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.bordfunk[hidden] { display: none; }
.bordfunk-head {
  background: var(--gold); color: var(--ink);
  font: 16px "Bangers", cursive; letter-spacing: .1em; padding: 3px 12px;
}
.bordfunk-text { padding: 10px 14px 12px; font: 15px/1.4 "Special Elite", monospace; min-height: 66px; }
.bordfunk-text.in { animation: funk-in .5s ease-out; }
@keyframes funk-in { from { opacity: 0; transform: translateY(8px); } }

.oracle-panel { display: flex; gap: 12px; align-items: flex-start; background: #f3e7ff; }
.oracle-panel[hidden] { display: none; }
.oracle-cup { font-size: 40px; line-height: 1; animation: bob 3s ease-in-out infinite; }
.oracle-panel b { font: 20px/1.1 "Bangers", cursive; letter-spacing: .04em; color: #5b2a8c; }
.oracle-text { margin: 4px 0; font-style: italic; }

/* ================= Spiel ================= */
.game-panel { padding-left: 10px; padding-right: 10px; }
.game-wrap { border: 3px solid var(--ink); border-radius: 10px; overflow: hidden; background: #0b1426; line-height: 0; }
.game-canvas { display: block; width: 100%; touch-action: none; user-select: none; -webkit-user-select: none; cursor: pointer; }
.game-help { margin: 10px 4px 4px; }
.game-status { font-weight: 800; margin: 6px 4px 0; }
