:root {
  --ink: #1f2638;
  --paper: #f7f1de;
  --stamp: #c1272d;
  --good: #2e9e5b;
  --gold: #ffce00;
  --gov: #004b76;
  --comic: "Bangers", Impact, sans-serif;
  --type: "Special Elite", "Courier New", monospace;
  --sans: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(ellipse at center, #2b3a31, #111814);
  overflow: hidden; font-family: var(--sans); color: var(--ink);
  -webkit-user-select: none; user-select: none; touch-action: manipulation;
}
button { font-family: inherit; }
.hidden { display: none !important; }

/* ---------- Bühne 1280×720, per JS skaliert ---------- */
.stage {
  position: absolute; left: 50%; top: 50%; width: 1280px; height: 720px;
  transform-origin: 50% 50%; overflow: hidden; border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0,0,0,.6); background: #efe6cf;
}
.layer { position: absolute; inset: 0; }
.layer > svg, #room svg, #counter svg { width: 100%; height: 100%; display: block; }
.office { position: absolute; inset: 0; }
#room { z-index: 0; }
#citizens { z-index: 3; pointer-events: none; }
.counter { z-index: 4; pointer-events: none; }

/* ---------- HUD ---------- */
.hud {
  position: absolute; left: 0; right: 0; top: 0; height: 56px; z-index: 10;
  display: flex; align-items: center; gap: 16px; padding: 0 14px;
  background: linear-gradient(#ffffff, #f1f1f1); border-bottom: 4px solid transparent;
  border-image: linear-gradient(90deg, #000 0 33.3%, #dd0000 33.3% 66.6%, #ffce00 66.6%) 1;
  box-shadow: 0 3px 10px rgba(0,0,0,.2);
}
.hud-brand { display: flex; align-items: center; gap: 8px; min-width: 210px; }
.hud-emblem { width: 30px; height: 36px; display: inline-block; }
.hud-emblem svg { width: 100%; height: 100%; }
.hud-brand b { display: block; font-size: 15px; }
.hud-brand small { color: #666; font-size: 12px; }
.meters { display: flex; gap: 12px; flex: 1; }
.meter { flex: 1; position: relative; }
.meter-top { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; }
.meter-top span:first-child { white-space: nowrap; }
.meter-track { height: 10px; background: #e0e0e0; border-radius: 5px; overflow: hidden; position: relative; margin-top: 2px; }
.meter-fill { height: 100%; border-radius: 5px; background: #66bb6a; transition: width .5s cubic-bezier(.3,1.4,.5,1), background .3s; }
.meter.danger .meter-fill { background: #ef5350; }
.meter.danger { animation: pulse .9s infinite; }
@keyframes pulse { 50% { filter: drop-shadow(0 0 4px #ef5350); } }
.meter.two .meter-track::before, .meter.two .meter-track::after { content: ""; position: absolute; top: 0; bottom: 0; width: 15%; background: repeating-linear-gradient(45deg, rgba(239,83,80,.35) 0 3px, transparent 3px 6px); z-index: 1; }
.meter.two .meter-track::before { left: 0; } .meter.two .meter-track::after { right: 0; }
.meter .pop { position: absolute; right: 0; top: -6px; font-family: var(--comic); font-size: 15px; padding: 0 5px; border-radius: 4px; color: #fff; animation: floatUp 1.3s forwards; pointer-events: none; }
.pop.up { background: var(--good); } .pop.down { background: var(--stamp); } .pop.neutral { background: #8a8577; }
@keyframes floatUp { 0% { opacity: 0; transform: translateY(8px) scale(.6); } 20% { opacity: 1; transform: scale(1.15); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px); } }
.hud-right { display: flex; align-items: center; gap: 12px; }
.money, .served { font-size: 15px; background: #f5f5f5; border: 1px solid #ddd; padding: 4px 10px; border-radius: 16px; white-space: nowrap; }
.money b { color: #2e7d32; font-variant-numeric: tabular-nums; }
.money.bump { animation: bump .5s; }
@keyframes bump { 40% { transform: scale(1.25) rotate(-4deg); } }
.tgl { width: 34px; height: 34px; border-radius: 50%; border: 1px solid #ccc; background: #fff; cursor: pointer; font-size: 16px; }
.tgl.off { opacity: .4; filter: grayscale(1); }

/* ---------- Wand-Deko ---------- */
.board { position: absolute; left: 290px; top: 118px; width: 170px; height: 94px; z-index: 1; background: #c69c6d; border: 5px solid #8d6e63; border-radius: 4px; padding: 4px 6px; box-shadow: 2px 3px 6px rgba(0,0,0,.25); overflow: hidden; }
.board-title { font-size: 9px; font-weight: 900; letter-spacing: .04em; color: #3e2723; }
.board ul { list-style: none; margin: 3px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 3px; }
.board li { background: #fffde7; font-size: 9px; line-height: 1.1; padding: 2px 4px; box-shadow: 1px 1px 2px rgba(0,0,0,.3); transform: rotate(-2deg); display: flex; align-items: center; gap: 2px; max-width: 150px; animation: pin .4s cubic-bezier(.2,1.6,.4,1); }
.board li:nth-child(2n) { transform: rotate(2deg); background: #e1f5fe; }
.board li svg { flex: none; }
@keyframes pin { from { transform: scale(2.5) rotate(20deg); opacity: 0; } }
.board .none { font-size: 10px; color: #3e2723; font-style: italic; }
.clock { position: absolute; left: 596px; top: 118px; width: 88px; height: 88px; z-index: 1; }
.clock svg { width: 100%; height: 100%; }
.ticket { position: absolute; left: 720px; top: 140px; z-index: 1; background: #111; color: #ff3d00; font-family: "Courier New", monospace; font-weight: 700; font-size: 22px; padding: 4px 10px; border-radius: 4px; border: 3px solid #555; text-shadow: 0 0 6px #ff3d00; letter-spacing: 2px; }
.ticket.flash { animation: flash .5s 2; }
@keyframes flash { 50% { color: #ffea00; } }
.pile { position: absolute; left: 990px; bottom: 322px; width: 110px; z-index: 1; display: flex; flex-direction: column-reverse; align-items: center; }
.pile .folder { width: 96px; height: 11px; border-radius: 2px; margin-top: -1px; box-shadow: inset 0 -2px 0 rgba(0,0,0,.15); animation: folderIn .35s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes folderIn { from { transform: translateY(-40px) rotate(15deg); opacity: 0; } }
.pile-label { font-size: 10px; font-weight: 900; color: #5d4037; letter-spacing: .06em; margin-top: 2px; order: -1; }
.ficus { position: absolute; left: 1118px; top: 262px; font-size: 96px; line-height: 1; z-index: 2; filter: drop-shadow(0 6px 6px rgba(0,0,0,.25)); }

/* ---------- Erzähler ---------- */
.narr { position: absolute; left: 144px; top: 196px; z-index: 2; }
.narr-slot { width: 120px; height: 140px; }
.narr-slot svg { width: 100%; height: 100%; overflow: visible; }
.narr-bubble {
  position: absolute; left: 96px; top: -128px; width: 290px; background: #fff; border: 3px solid #111; border-radius: 14px;
  padding: 7px 11px; font-family: var(--type); font-size: 14px; line-height: 1.3; box-shadow: 3px 3px 0 #111; z-index: 9;
  animation: bubbleIn .3s cubic-bezier(.2,1.6,.4,1);
}
.narr-bubble::after { content: ""; position: absolute; left: 14px; bottom: -16px; border: 8px solid transparent; border-top: 10px solid #111; border-left: 4px solid #111; }
@keyframes bubbleIn { from { transform: scale(.5); opacity: 0; } }

/* Erzähler-Stimmungen (aus dem klassischen Spiel) */
.narrator .e, .narrator .m, .narrator .fx { display: none; }
.narrator .n-blush { opacity: .3; }
.narrator[data-mood="neutral"] .e-neutral, .narrator[data-mood="neutral"] .m-neutral,
.narrator[data-mood="happy"] .e-happy, .narrator[data-mood="happy"] .m-happy, .narrator[data-mood="happy"] .fx-hearts,
.narrator[data-mood="shocked"] .e-shocked, .narrator[data-mood="shocked"] .m-shocked, .narrator[data-mood="shocked"] .fx-sweat,
.narrator[data-mood="angry"] .e-neutral, .narrator[data-mood="angry"] .m-angry, .narrator[data-mood="angry"] .fx-angry,
.narrator[data-mood="faint"] .e-faint, .narrator[data-mood="faint"] .m-faint, .narrator[data-mood="faint"] .fx-stars { display: inline; }
.narrator.talking .m { display: none !important; }
.narrator.talking .m-talk { display: inline !important; }
.talk-mouth { transform-box: fill-box; transform-origin: center; animation: talk .15s infinite alternate; }
@keyframes talk { from { transform: scaleY(.25); } to { transform: scaleY(1.1); } }
.n-all { transform-box: fill-box; transform-origin: 50% 100%; animation: breathe 3s ease-in-out infinite; }
@keyframes breathe { 50% { transform: translateY(-2px); } }
.narrator[data-mood="happy"] .n-all { animation: hop .5s ease-in-out infinite; }
@keyframes hop { 50% { transform: translateY(-6px) rotate(1.5deg); } }
.narrator[data-mood="shocked"] .n-all, .narrator[data-mood="angry"] .n-all { animation: tremble .09s infinite; }
@keyframes tremble { 50% { transform: translateX(2px); } }
.narrator[data-mood="faint"] .n-all { animation: none; transform: rotate(-16deg) translate(-8px, 10px); }
.n-lids rect { transform-box: fill-box; transform-origin: top; transform: scaleY(0); animation: blinkLid 4.5s infinite; }
@keyframes blinkLid { 0%,95%,100% { transform: scaleY(0); } 97% { transform: scaleY(1); } }
.n-brow { transform-box: fill-box; transform-origin: center; }
.narrator[data-mood="shocked"] .n-brow { transform: translateY(-9px); }
.narrator[data-mood="angry"] .n-brow-l { transform: rotate(16deg); }
.narrator[data-mood="angry"] .n-brow-r { transform: rotate(-16deg); }
.stars-orbit { transform-box: view-box; transform-origin: 100px 40px; animation: orbit 1.2s linear infinite; }
@keyframes orbit { to { transform: rotate(360deg); } }

/* ---------- Bürger ---------- */
.cit { position: absolute; top: 146px; width: 130px; height: 260px; margin-left: -65px; transition: left linear; pointer-events: auto; cursor: pointer; }
.cit .head { position: absolute; left: 21px; top: 86px; width: 88px; height: 88px; border-radius: 50%; overflow: hidden; }
.cit .head svg { width: 100%; height: 100%; }
.cit .head .face rect:first-child { fill: transparent; }
.cit .body { position: absolute; left: 5px; top: 168px; width: 120px; height: 80px; }
.cit .body svg { width: 100%; height: 100%; }
.cit.walking .bob { animation: walk .38s ease-in-out infinite alternate; }
@keyframes walk { from { transform: translateY(0) rotate(-2deg); } to { transform: translateY(-6px) rotate(2deg); } }
.cit .bob { position: absolute; inset: 0; }
.cit .want {
  position: absolute; left: 50%; top: 0; transform: translateX(-50%);
  background: #fff; border: 3px solid #111; border-radius: 12px; padding: 4px 5px 3px; box-shadow: 3px 3px 0 rgba(0,0,0,.35);
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 96px; transition: opacity .2s;
}
.cit .want::after { content: ""; position: absolute; left: 50%; bottom: -12px; margin-left: -8px; border: 8px solid transparent; border-top: 10px solid #111; }
.cit:not(.ready) .want { opacity: 0; }
.cit .want-title { font-size: 10px; font-weight: 900; white-space: nowrap; letter-spacing: .02em; }
.cit .want-items { display: flex; flex-wrap: wrap; justify-content: center; gap: 1px; max-width: 128px; }
.cit .want-items svg { width: 26px; height: 26px; }
.cit .want-items .have { opacity: .35; }
.cit .patience { width: 100%; height: 6px; background: #eee; border-radius: 3px; overflow: hidden; }
.cit .patience i { display: block; height: 100%; background: #66bb6a; border-radius: 3px; }
.cit .no { position: absolute; left: 50%; top: 236px; transform: translateX(-50%); background: var(--gold); font-size: 11px; font-weight: 900; padding: 1px 6px; border-radius: 4px; z-index: 5; }
.cit.ready:hover .head { box-shadow: 0 0 0 4px var(--gold); }
.cit.wrong { animation: wrong .4s; }
@keyframes wrong { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.cit .say { position: absolute; left: 50%; top: 40px; transform: translateX(-50%); background: var(--stamp); color: #fff; font-family: var(--comic); font-size: 18px; letter-spacing: .04em; padding: 2px 8px; border-radius: 6px; white-space: nowrap; animation: sayIn .9s forwards; z-index: 6; }
@keyframes sayIn { 0% { transform: translate(-50%, 10px) scale(.4); opacity: 0; } 20% { transform: translate(-50%, 0) scale(1.1); opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -16px); } }
.cit .cloud { position: absolute; left: 50%; top: 58px; transform: translateX(-50%); font-size: 34px; animation: storm .4s infinite alternate; }
@keyframes storm { to { transform: translateX(-50%) rotate(8deg); } }

/* ---------- Arbeitsplatz ---------- */
.work { position: absolute; left: 0; right: 0; bottom: 0; height: 232px; z-index: 6; }
.station { position: absolute; border: 0; background: none; cursor: pointer; padding: 0; transition: transform .1s; }
.station:hover { transform: translateY(-4px) scale(1.04); }
.station:active { transform: translateY(2px) scale(.95); }
.form { top: 26px; width: 58px; height: 120px; }
.form .stack { position: absolute; inset: 0; }
.form .stack svg { position: absolute; width: 58px; height: 58px; left: 0; }
.form b { position: absolute; left: 0; right: 0; bottom: -2px; font-family: var(--comic); font-size: 20px; color: #fff; text-shadow: 1px 1px 0 #000; }
.st-label, .tool-label { position: absolute; top: 172px; text-align: center; font-size: 11px; font-weight: 900; letter-spacing: .06em; color: #f3e0c7; }
.tool { top: 50px; width: 62px; height: 62px; background: #f7f1de; border-radius: 12px; box-shadow: 0 5px 0 #4e342e, inset 0 -3px 0 rgba(0,0,0,.08); display: grid; place-items: center; }
.tool svg { width: 46px; height: 46px; }
.tool .lbl { position: absolute; top: 72px; left: -4px; right: -4px; font-size: 11px; font-weight: 900; color: #f3e0c7; letter-spacing: .03em; }
.key { position: absolute; top: -6px; right: -6px; background: #1f2638; color: #fff; font-size: 10px; font-weight: 700; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; opacity: .8; }
.tray {
  position: absolute; top: 20px; width: 150px; height: 186px; cursor: pointer;
  background: linear-gradient(#e8c98f, #d9b26b); border-radius: 6px 6px 10px 10px; border: 3px solid #a57c3c;
  box-shadow: 0 6px 0 #4e342e; transition: transform .12s, box-shadow .12s;
}
.tray::before { content: ""; position: absolute; left: 10px; top: -12px; width: 50px; height: 14px; background: #d9b26b; border: 3px solid #a57c3c; border-bottom: 0; border-radius: 6px 6px 0 0; }
.tray.active { box-shadow: 0 6px 0 #4e342e, 0 0 0 4px var(--gold); transform: translateY(-3px); }
.tray-title { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; font-size: 11px; font-weight: 900; color: #6d4c21; letter-spacing: .05em; }
.tray-items { position: absolute; left: 8px; right: 8px; top: 8px; bottom: 26px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 2px; }
.tray-items svg { width: 40px; height: 40px; animation: drop .25s cubic-bezier(.2,1.6,.4,1); }
@keyframes drop { from { transform: translateY(-30px) scale(1.5); opacity: 0; } }
.tray.shake { animation: wrong .35s; }
.machine { position: absolute; top: 18px; width: 130px; height: 150px; border: 0; background: none; cursor: pointer; padding: 0; transition: transform .1s; }
.machine svg { width: 100%; height: 100%; }
.machine:hover { transform: scale(1.03); }
.machine .out { position: absolute; left: 44px; top: -30px; animation: drop .3s; }
.machine .out svg { width: 44px; height: 44px; filter: drop-shadow(0 3px 3px rgba(0,0,0,.4)); }
.machine.working .scan { animation: scan .6s linear infinite; opacity: .85; }
@keyframes scan { from { transform: translateX(0); } to { transform: translateX(100px); } }
.machine.working { animation: rumble .1s infinite; }
@keyframes rumble { 50% { transform: translate(1px, -1px); } }
.machine.ready .led { animation: blinkLed .4s steps(2) infinite; }
@keyframes blinkLed { 50% { fill: #b9f6ca; } }
.machine.jam .led { fill: #e53935; animation: blinkLed2 .3s steps(2) infinite; }
@keyframes blinkLed2 { 50% { fill: #ffcdd2; } }
.machine.jam { animation: jam .15s infinite; }
@keyframes jam { 25% { transform: rotate(-2deg); } 75% { transform: rotate(2deg); } }
.machine .prog { position: absolute; left: 18px; right: 18px; bottom: 26px; height: 7px; background: rgba(0,0,0,.2); border-radius: 4px; overflow: hidden; }
.machine .prog i { display: block; height: 100%; width: 0; background: #76ff03; }
.machine .badge { position: absolute; left: 50%; top: -24px; transform: translateX(-50%); background: var(--stamp); color: #fff; font-family: var(--comic); font-size: 17px; padding: 1px 8px; border-radius: 5px; white-space: nowrap; animation: blinkBadge .5s steps(2) infinite; }
@keyframes blinkBadge { 50% { opacity: .6; } }
.trash { position: absolute; top: 64px; width: 84px; height: 116px; border: 0; background: none; cursor: pointer; padding: 0; }
.trash svg { width: 100%; height: 100%; }
.trash:hover { transform: rotate(-4deg); }
.m-label { position: absolute; left: 0; right: 0; bottom: -18px; font-size: 11px; font-weight: 900; color: #f3e0c7; letter-spacing: .05em; text-align: center; }
.tip { position: absolute; left: 50%; bottom: 236px; transform: translateX(-50%); z-index: 8; background: #1f2638; color: #fff; padding: 8px 16px; border-radius: 20px; font-size: 15px; font-weight: 600; box-shadow: 0 6px 16px rgba(0,0,0,.35); white-space: nowrap; animation: tipBob 1.2s ease-in-out infinite; }
.tip::after { content: ""; position: absolute; left: 50%; bottom: -10px; margin-left: -10px; border: 10px solid transparent; border-bottom: 0; border-top-color: #1f2638; }
@keyframes tipBob { 50% { transform: translate(-50%, -4px); } }
.closed { position: absolute; left: 50%; top: 300px; transform: translateX(-50%) rotate(-4deg); z-index: 5; background: var(--stamp); color: #fff; font-family: var(--comic); font-size: 44px; letter-spacing: .06em; padding: 6px 26px; border: 5px solid #fff; box-shadow: 0 8px 20px rgba(0,0,0,.4); animation: slam .4s cubic-bezier(.2,1.6,.4,1); }
@keyframes slam { from { transform: translateX(-50%) rotate(-4deg) scale(3); opacity: 0; } }

/* ---------- Effekte ---------- */
.fx { position: absolute; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; }
.coin { position: absolute; font-family: var(--comic); font-size: 26px; color: #ffd54f; -webkit-text-stroke: 1.5px #5d4037; letter-spacing: .03em; animation: coinUp 1.2s forwards; white-space: nowrap; }
@keyframes coinUp { 0% { transform: translateY(0) scale(.5); opacity: 0; } 20% { transform: translateY(-20px) scale(1.2); opacity: 1; } 100% { transform: translateY(-90px) scale(1); opacity: 0; } }
.flyer { position: absolute; width: 36px; height: 36px; }
.flyer svg { width: 100%; height: 100%; }
.banner {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); font-family: var(--comic); font-size: 64px;
  color: #ffe14d; -webkit-text-stroke: 3px #111; text-shadow: 5px 5px 0 #111; letter-spacing: .04em; white-space: nowrap;
  animation: banner 1.8s forwards;
}
@keyframes banner { 0% { transform: translate(-50%, -50%) scale(0) rotate(-12deg); } 15% { transform: translate(-50%, -50%) scale(1.2) rotate(-4deg); } 25% { transform: translate(-50%, -50%) scale(1) rotate(-4deg); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -60%) scale(1) rotate(-4deg); } }
.combo { position: absolute; right: 30px; top: 70px; z-index: 12; font-family: var(--comic); font-size: 30px; color: #ff7043; -webkit-text-stroke: 1.5px #111; letter-spacing: .04em; animation: sayIn 1.2s forwards; }

/* ---------- Overlays (Titel, Kabinett, Abend, Shop, Ende) ---------- */
.overlay { position: absolute; inset: 0; z-index: 20; animation: fade .35s; }
@keyframes fade { from { opacity: 0; } }
.overlay .city-bg { position: absolute; inset: 0; }
.overlay .city-bg svg { width: 100%; height: 100%; display: block; }
.city .smoke circle { animation: smoke 3s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.city .smoke .s2 { animation-delay: -1s; } .city .smoke .s3 { animation-delay: -2s; }
@keyframes smoke { 0% { transform: translateY(8px) scale(.5); opacity: 0; } 30% { opacity: .9; } 100% { transform: translateY(-26px) scale(1.4); opacity: 0; } }
.city .cloud { animation: drift 18s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translateX(var(--dx, 40px)); } }
.city .paper { animation: papers 2.2s linear infinite; transform-box: fill-box; }
.city .p1 { animation-delay: -.4s; } .city .p2 { animation-delay: -.8s; } .city .p3 { animation-delay: -1.2s; } .city .p4 { animation-delay: -1.6s; } .city .p5 { animation-delay: -2s; }
@keyframes papers { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(40px, 120px) rotate(360deg); opacity: 0; } }
.city .rain { animation: rain .5s linear infinite; }
@keyframes rain { from { transform: translateY(-20px); } to { transform: translateY(20px); } }
.city .hook { animation: hook 3s ease-in-out infinite alternate; }
@keyframes hook { to { transform: translateY(24px); } }
.city .lit { animation: litFlicker 6s infinite; }
@keyframes litFlicker { 97% { opacity: 1; } 98% { opacity: .5; } }

.card {
  position: absolute; background: var(--paper); border-radius: 6px; box-shadow: 0 16px 40px rgba(0,0,0,.45);
  padding: 20px 24px; animation: cardIn .5s cubic-bezier(.2,1.3,.4,1);
}
@keyframes cardIn { from { transform: translateY(40px) rotate(-2deg); opacity: 0; } }
.btn {
  font-family: var(--sans); font-weight: 900; font-size: 18px; border: 0; border-radius: 10px; padding: 12px 24px; cursor: pointer;
  background: var(--good); color: #fff; box-shadow: 0 5px 0 #1b6e3d; transition: transform .1s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #1b6e3d; }
.btn:disabled { background: #9e9e9e; box-shadow: 0 5px 0 #616161; cursor: not-allowed; }
.btn.red { background: var(--stamp); box-shadow: 0 5px 0 #7d1418; }
.btn.ghost { background: #fff; color: var(--ink); box-shadow: 0 5px 0 #bbb; }

/* Titel */
.title-card { left: 50%; top: 50%; transform: translate(-50%, -50%); width: 560px; text-align: center; padding: 26px 30px 28px; animation: titleIn .7s cubic-bezier(.2,1.3,.4,1); }
@keyframes titleIn { from { transform: translate(-50%, -40%) scale(.8); opacity: 0; } }
.title-card .emb { width: 70px; height: 84px; margin: 0 auto; }
.title-card .emb svg { width: 100%; height: 100%; }
.title-card h1 { font-family: var(--comic); font-weight: 400; font-size: 64px; line-height: .95; margin: 6px 0 4px; letter-spacing: .03em; color: var(--stamp); text-shadow: 3px 3px 0 rgba(0,0,0,.15); }
.title-card h1 small { display: block; font-size: 22px; color: var(--ink); letter-spacing: .08em; }
.title-card p { font-size: 16px; margin: 8px 0 16px; }
.title-card .row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0 18px; text-align: left; }
.how div { background: #fff; border-radius: 8px; padding: 8px 10px; font-size: 13px; line-height: 1.3; box-shadow: 0 2px 0 rgba(0,0,0,.08); }
.how b { display: block; font-size: 14px; }
.how .big { font-size: 26px; }
.foot { font-size: 12px; color: #666; margin-top: 12px; }
.foot a { color: var(--gov); }

/* Kabinett */
.cabinet { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 30%, #6d4c33, #3e2a1c); }
.cab-head { position: absolute; left: 0; right: 0; top: 66px; text-align: center; color: #f3e0c7; }
.cab-head h2 { margin: 0; font-family: var(--comic); font-weight: 400; font-size: 40px; letter-spacing: .04em; color: #ffe14d; text-shadow: 3px 3px 0 #111; }
.cab-head p { margin: 2px 0 0; font-size: 15px; opacity: .85; }
.cab-letter { left: 40px; top: 150px; width: 470px; height: 520px; transform: rotate(-1.2deg); overflow: hidden; }
.cab-letter .pol { float: right; width: 110px; background: #fff; padding: 6px 6px 3px; margin: -4px -6px 8px 10px; transform: rotate(4deg); box-shadow: 0 4px 10px rgba(0,0,0,.25); }
.cab-letter .pol svg { width: 100%; height: auto; display: block; }
.cab-letter .pol small { display: block; text-align: center; font-family: var(--type); font-size: 10px; color: #666; }
.cab-letter .az { font-family: var(--type); font-size: 12px; color: var(--stamp); }
.cab-letter .cat { display: inline-block; margin-top: 4px; font-size: 10px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: #4f7359; padding: 2px 8px; border-radius: 10px; }
.cab-letter h3 { font-family: var(--type); font-weight: 400; font-size: 24px; margin: 10px 0 8px; line-height: 1.15; }
.cab-letter .from { font-size: 13px; color: #666; }
.cab-letter .body { font-family: var(--type); font-size: 15.5px; line-height: 1.55; clear: right; }
.cab-letter .body p { margin: 0 0 8px; }
.drafts { position: absolute; left: 540px; top: 150px; width: 700px; display: flex; flex-direction: column; gap: 10px; }
.draft {
  position: relative; text-align: left; background: var(--paper); border: 0; border-left: 10px solid #a8a293; border-radius: 6px;
  padding: 10px 14px 10px 16px; cursor: pointer; box-shadow: 0 6px 16px rgba(0,0,0,.35); transition: transform .15s cubic-bezier(.3,1.6,.5,1);
  animation: dealIn .45s cubic-bezier(.2,1.3,.4,1) both; overflow: hidden; font-family: var(--sans); color: var(--ink);
}
.draft:nth-child(2) { animation-delay: .08s; } .draft:nth-child(3) { animation-delay: .16s; }
@keyframes dealIn { from { opacity: 0; transform: translateX(80px) rotate(4deg); } }
.draft:hover { transform: translateX(-6px) scale(1.01); }
.draft.sel { border-left-color: var(--stamp); outline: 4px solid var(--gold); outline-offset: -4px; transform: translateX(-8px) scale(1.02); }
.draft.dim { opacity: .45; filter: grayscale(.7); }
.draft .lab { font-family: var(--type); font-size: 11px; color: #777; letter-spacing: .08em; }
.draft .nm { font-weight: 900; font-size: 18px; margin: 1px 0 2px; }
.draft .tx { font-size: 14px; color: #3a3f4a; margin: 0 0 6px; line-height: 1.3; }
.draft .conseq { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 4px 8px; border-radius: 8px; flex-wrap: wrap; }
.draft .conseq.x { background: #ffebee; color: #8f1a1f; }
.draft .conseq.v { background: #e8f5e9; color: #1b5e20; }
.draft .conseq svg { width: 22px; height: 22px; }
.draft .arrows { position: absolute; right: 12px; top: 10px; font-size: 12px; font-weight: 700; display: flex; gap: 6px; }
.draft .arrows span.u { color: var(--good); } .draft .arrows span.d { color: var(--stamp); }
.draft .ink { position: absolute; right: 20px; top: 50%; font-family: var(--type); font-size: 30px; font-weight: 700; color: var(--stamp); border: 4px solid var(--stamp); border-radius: 6px; padding: 0 12px; transform: translateY(-50%) rotate(-12deg); mix-blend-mode: multiply; animation: inkIn .3s cubic-bezier(.2,1.6,.4,1) both; }
.draft .ink.g { color: var(--good); border-color: var(--good); }
@keyframes inkIn { from { transform: translateY(-50%) rotate(-12deg) scale(3); opacity: 0; } }
.cab-go { position: absolute; left: 540px; top: 640px; width: 700px; font-family: var(--comic); font-weight: 400; font-size: 26px; letter-spacing: .05em; }

/* Abend */
.evening-paper { left: 30px; top: 76px; width: 470px; max-height: 620px; overflow-y: auto; background: #f7f3e8; }
.np-name { font-family: "Playfair Display", Georgia, serif; font-weight: 900; font-size: 32px; text-align: center; border-bottom: 3px double var(--ink); line-height: 1.1; padding-bottom: 4px; }
.np-meta { display: flex; justify-content: space-between; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: #666; border-bottom: 1px solid var(--ink); padding: 3px 0; margin-bottom: 10px; }
.np-head { font-family: "Playfair Display", Georgia, serif; font-weight: 900; font-size: 23px; line-height: 1.15; margin: 0 0 6px; }
.np-body { font-size: 14px; margin: 0 0 10px; }
.np-photo { float: left; width: 96px; margin: 2px 10px 4px 0; }
.np-photo svg { width: 100%; height: auto; display: block; filter: grayscale(.85) contrast(1.1); border: 1px solid #aaa; }
.fact { clear: both; background: #fff7b8; padding: 10px 12px; box-shadow: 0 3px 8px rgba(0,0,0,.15); border-top: 16px solid #f5e98a; transform: rotate(.4deg); }
.fact .k { font-size: 10px; font-weight: 900; letter-spacing: .1em; color: var(--stamp); }
.fact b { display: block; margin: 2px 0; }
.fact p { font-size: 13px; margin: 0 0 4px; line-height: 1.35; }
.fact small { color: #666; font-size: 11px; }
.evening-stats { right: 30px; top: 76px; width: 330px; }
.evening-stats h3 { font-family: var(--comic); font-weight: 400; font-size: 30px; margin: 0 0 6px; letter-spacing: .04em; color: var(--stamp); }
.stars { font-size: 38px; letter-spacing: 4px; margin: 4px 0 8px; }
.stars .off { filter: grayscale(1); opacity: .3; }
.srow { display: flex; justify-content: space-between; font-size: 15px; padding: 4px 0; border-bottom: 1px dashed #d9cfae; }
.srow b { font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0; }
.chip { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: #e6e0cf; }
.chip.up { background: #d8ecdc; color: #25613a; } .chip.down { background: #f6d6d4; color: #8f1a1f; }
.evening-stats .btn { width: 100%; margin-top: 10px; }
.city-caption { position: absolute; left: 520px; right: 380px; bottom: 16px; text-align: center; color: #fff; font-weight: 700; font-size: 14px; text-shadow: 0 1px 3px #000; }

/* Shop */
.shop { left: 50%; top: 50%; transform: translate(-50%, -50%); width: 900px; animation: titleIn .5s cubic-bezier(.2,1.3,.4,1); }
.shop h2 { font-family: var(--comic); font-weight: 400; font-size: 38px; margin: 0; letter-spacing: .04em; color: var(--gov); }
.shop .sub { margin: 0 0 12px; color: #555; }
.shop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.up-card { background: #fff; border-radius: 10px; padding: 12px; box-shadow: 0 3px 0 rgba(0,0,0,.1); display: flex; flex-direction: column; gap: 4px; position: relative; }
.up-card .ic { font-size: 40px; line-height: 1; }
.up-card b { font-size: 16px; }
.up-card p { margin: 0; font-size: 13px; color: #555; flex: 1; }
.up-card .buy { font-size: 15px; padding: 8px 12px; }
.up-card.owned { background: #e8f5e9; }
.up-card.owned::after { content: "✔ ANGESCHAFFT"; position: absolute; right: 10px; top: 12px; font-size: 11px; font-weight: 900; color: var(--good); }
.shop .row { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.shop .wallet { font-size: 20px; font-weight: 900; }

/* Ereignis */
.event { left: 50%; top: 50%; transform: translate(-50%, -50%); width: 560px; border-top: 12px solid var(--stamp); animation: titleIn .5s cubic-bezier(.2,1.3,.4,1); }
.event .kick { display: inline-block; background: var(--stamp); color: #fff; font-family: var(--comic); font-size: 20px; letter-spacing: .1em; padding: 2px 10px; border-radius: 4px; animation: blinkBadge .6s steps(2) infinite; }
.event h2 { font-family: var(--type); font-weight: 400; font-size: 26px; margin: 10px 0 6px; }
.event .siren { position: absolute; right: 20px; top: 14px; font-size: 44px; animation: jam .3s infinite; }

/* Ende */
.end-card { left: 50%; top: 50%; transform: translate(-50%, -50%); width: 760px; text-align: center; animation: titleIn .6s cubic-bezier(.2,1.3,.4,1); max-height: 690px; overflow-y: auto; }
.end-card .emo { font-size: 60px; line-height: 1; }
.end-card h1 { font-family: var(--comic); font-weight: 400; font-size: 46px; letter-spacing: .03em; margin: 4px 0; color: var(--stamp); }
.end-card .stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 12px 0; }
.end-card .stat { background: #ebe3c9; border-radius: 8px; padding: 8px 4px; }
.end-card .stat b { display: block; font-family: var(--type); font-size: 20px; color: var(--stamp); }
.end-card .stat span { font-size: 11px; text-transform: uppercase; color: #666; }
.fixes { text-align: left; background: #fff7b8; padding: 10px 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; font-size: 13px; margin-bottom: 14px; }
.fixes b { display: block; }

/* Hochformat */
.rotate-hint { display: none; }
@media (orientation: portrait) and (max-width: 700px) {
  .rotate-hint { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 99; background: #1f2638; color: #fff; padding: 10px 14px; font-size: 14px; justify-content: center; text-align: center; }
}

/* ================= Version 2: Licht, Schlange, Maschinen, Briefing ================= */
.tint, .vignette { position: absolute; inset: 0; pointer-events: none; z-index: 7; transition: background 1s linear; }
.tint { mix-blend-mode: multiply; }
.vignette { background: radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(20,12,0,.28) 100%); }
.stage.rushing .vignette { background: radial-gradient(ellipse at 50% 45%, transparent 50%, rgba(193,39,45,.35) 100%); animation: rushPulse 1s ease-in-out infinite; }
@keyframes rushPulse { 50% { opacity: .55; } }
.stage.shake { animation: stageShake .35s; }
@keyframes stageShake { 20% { margin-left: -4px; } 40% { margin-left: 4px; } 60% { margin-left: -2px; } 80% { margin-left: 2px; } }
#room .flicker { animation: flicker 7s infinite; }
@keyframes flicker { 0%, 90%, 94%, 100% { opacity: 1; } 91%, 93% { opacity: .35; } 92% { opacity: .9; } }
#counter .steam, #room .steam { animation: steam 2.4s ease-out infinite; }
#counter .steam.s2 { animation-delay: -1.2s; }
@keyframes steam { 0% { transform: translateY(6px); opacity: 0; } 30% { opacity: .7; } 100% { transform: translateY(-10px); opacity: 0; } }
#room .sunray { mix-blend-mode: screen; }

/* Warteschlange an der Tür */
.queue { position: absolute; left: 16px; top: 300px; width: 130px; height: 90px; z-index: 3; pointer-events: none; }
.qp { position: absolute; width: 48px; height: 48px; border-radius: 50%; overflow: hidden; box-shadow: 0 2px 4px rgba(0,0,0,.3); animation: qIn .4s cubic-bezier(.2,1.6,.4,1); }
.qp svg { width: 100%; height: 100%; }
.qp.mad { animation: qMad .3s infinite alternate; box-shadow: 0 0 0 3px #e53935; }
@keyframes qIn { from { transform: translateX(-40px); opacity: 0; } }
@keyframes qMad { to { transform: translateY(-3px) rotate(4deg); } }
.qbadge { position: absolute; left: 0; top: 56px; background: #1f2638; color: #fff; font-size: 12px; font-weight: 900; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.qbadge.hot { background: #e53935; animation: blinkBadge .5s steps(2) infinite; }

/* Bürger: Requisiten, Sonderkunden, Hinweise */
.cit .prop { position: absolute; left: -4px; top: 196px; font-size: 38px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.3)); }
.cit .prop.dog { left: 78px; top: 204px; font-size: 44px; transform: scaleX(-1); }
.cit .want-tag { font-size: 10px; font-weight: 900; color: #fff; background: #c1272d; padding: 0 6px; border-radius: 6px; letter-spacing: .04em; }
.cit.sp-rentner .want-tag { background: #8d6e63; }
.cit.sp-influencer .want-tag { background: #e91e63; animation: blinkBadge .6s steps(2) infinite; }
.cit.match .want { box-shadow: 0 0 0 4px #66bb6a, 3px 3px 0 rgba(0,0,0,.35); }
.cit.match .head { box-shadow: 0 0 0 4px #66bb6a; animation: matchPulse .6s ease-in-out infinite alternate; }
@keyframes matchPulse { to { box-shadow: 0 0 0 8px rgba(102,187,106,.5); } }
.cit.urgent .want { animation: urgent .25s infinite alternate; }
@keyframes urgent { to { transform: translateX(-50%) rotate(2deg); } }
.coin.red { color: #ff5252; } .coin.blue { color: #40c4ff; }

/* Maschinen-Ablage */
.outbox { position: absolute; top: -30px; width: 66px; height: 62px; border: 3px dashed rgba(255,255,255,.35); border-radius: 10px; background: rgba(0,0,0,.15); cursor: pointer; padding: 0; z-index: 2; transition: transform .1s; }
.outbox:hover { transform: scale(1.06); }
.outbox span { position: absolute; left: 10px; top: 8px; }
.outbox span svg { width: 42px; height: 42px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.4)); }
.outbox .empty-lbl { position: static; display: block; color: rgba(255,255,255,.55); font-size: 11px; font-weight: 900; margin-top: 18px; text-transform: uppercase; }
.outbox.has { border: 3px solid #ffce00; background: rgba(255,206,0,.18); animation: outGlow .7s ease-in-out infinite alternate; }
@keyframes outGlow { to { box-shadow: 0 0 14px rgba(255,206,0,.8); } }
.outbox .cnt { position: absolute; right: -8px; top: -10px; background: #c1272d; color: #fff; font-size: 13px; padding: 1px 6px; border-radius: 10px; }

/* Banner-Varianten */
.banner.hot { color: #fff; -webkit-text-stroke: 3px #7d1418; text-shadow: 5px 5px 0 #7d1418; font-size: 84px; }
.banner.small { font-size: 34px; top: 58%; }

/* Tagesbriefing */
.overlay.dim { background: rgba(10,14,12,.55); }
.dayintro { left: 50%; top: 50%; transform: translate(-50%, -50%); width: 760px; animation: titleIn .5s cubic-bezier(.2,1.3,.4,1); }
.di-day { font-family: var(--comic); font-size: 46px; letter-spacing: .05em; color: var(--stamp); text-align: center; line-height: 1; }
.di-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 14px 0 10px; }
.di-stat { background: #fff; border-radius: 10px; padding: 8px 10px; text-align: center; box-shadow: 0 2px 0 rgba(0,0,0,.08); }
.di-stat span { display: block; font-size: 11px; font-weight: 900; color: #777; text-transform: uppercase; letter-spacing: .05em; }
.di-stat b { font-size: 22px; }
.dots { display: flex; gap: 4px; justify-content: center; margin-top: 6px; }
.dots i { width: 14px; height: 14px; border-radius: 50%; background: #e0e0e0; }
.dots i.on { background: #e53935; }
.dots.pat i.on { background: #43a047; }
.chg { padding: 8px 12px; border-radius: 10px; font-size: 15px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.chg.x { background: #ffebee; color: #8f1a1f; } .chg.v { background: #e8f5e9; color: #1b5e20; }
.chg svg { width: 20px; height: 20px; }
.di-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 10px 0 14px; }
.di-cols h4 { margin: 0 0 6px; font-size: 15px; }
.di-cols ul { margin: 0; padding-left: 18px; font-size: 14px; }
.di-cols li { margin-bottom: 4px; }
.di-cols .rec svg, .di-rules svg { width: 22px; height: 22px; vertical-align: middle; }
.dayintro .btn { display: block; margin: 0 auto; font-size: 22px; }

/* Kabinett: Tischlampe */
.cab-lamp { position: absolute; left: 50%; top: -120px; width: 900px; height: 500px; margin-left: -450px; background: radial-gradient(ellipse at 50% 30%, rgba(255,230,160,.25), transparent 65%); pointer-events: none; }

/* Stadt */
.city .wave { animation: wave 2.4s ease-in-out infinite alternate; }
@keyframes wave { to { transform: translateX(6px); } }
.stars span { display: inline-block; animation: starPop .5s cubic-bezier(.2,1.8,.4,1) both; }
@keyframes starPop { from { transform: scale(0) rotate(-90deg); } }
