/* Computerzentrum: Crashout – Pixel-Look.
   Retro-Fenster (wie ein altes Betriebssystem, nur dunkel), harte Kanten, keine Rundungen.
   Farben als Variablen, damit Saison-Skins nur diese Werte tauschen. */
:root {
  --bg: #0d0f14;
  --panel: #1c2433;
  --panel-2: #2b3547;
  --line: #46536a;
  --hi: #6b778c;
  --text: #eef2f7;
  --muted: #a7b1c2;
  --accent: #22d3ee;
  --accent-dark: #0e7490;
  --ink: #0d0f14;
  --good: #34d399;
  --warn: #f59e0b;
  --bad: #ef4444;
  --gold: #fde047;
  --font: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); }
body { overscroll-behavior: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.pix { image-rendering: pixelated; image-rendering: crisp-edges; display: block; }
.good { color: var(--good); }
.warn { color: var(--warn); }
.bad { color: var(--bad); }
.small { font-size: 12px; }
.center { text-align: center; }

/* Ladebildschirm */
.boot { min-height: 100dvh; display: grid; place-content: center; gap: 16px; text-align: center; padding: 24px; }
.boot-logo { font-size: 56px; animation: wobble 1.6s steps(4) infinite; }
.boot-quote { color: var(--muted); max-width: 280px; margin: 0 auto; }
@keyframes wobble { 0%,100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }

/* ---------- Pixel-Buttons ---------- */
.pbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 14px; border: 2px solid var(--ink); border-radius: 0;
  background: var(--accent); color: var(--ink); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; cursor: pointer;
  box-shadow: inset -3px -3px 0 rgba(0,0,0,.35), inset 3px 3px 0 rgba(255,255,255,.35), 0 3px 0 var(--ink);
}
.pbtn:not(:disabled):active { transform: translateY(3px); box-shadow: inset -3px -3px 0 rgba(0,0,0,.35), inset 3px 3px 0 rgba(255,255,255,.35); }
.pbtn.ghost { background: var(--panel-2); color: var(--text); box-shadow: inset -3px -3px 0 rgba(0,0,0,.4), inset 3px 3px 0 rgba(255,255,255,.12), 0 3px 0 var(--ink); }
.pbtn.danger { color: var(--bad); }
.pbtn.block { width: 100%; margin-top: 12px; }
.pbtn.big { min-height: 54px; font-size: 16px; }
.pbtn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- Retro-Fenster ---------- */
.win { background: var(--panel); border: 2px solid var(--ink); box-shadow: inset 2px 2px 0 var(--hi), inset -2px -2px 0 #11161f, 6px 6px 0 rgba(0,0,0,.45); }
.win-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; padding: 4px 4px 4px 10px; background: linear-gradient(90deg, var(--accent-dark), var(--accent)); color: var(--ink); font-weight: 800; letter-spacing: .06em; }
.win-title .x { width: 32px; height: 28px; border: 2px solid var(--ink); background: var(--panel-2); color: var(--text); cursor: pointer; box-shadow: inset -2px -2px 0 rgba(0,0,0,.4), inset 2px 2px 0 rgba(255,255,255,.15); }
.win-body { padding: 14px; }

/* ---------- Titelbildschirm ---------- */
.title-screen { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: calc(16px + var(--safe-t)) 16px calc(20px + var(--safe-b)); max-width: 440px; margin: 0 auto; }
.title-cv { width: 100%; height: auto; aspect-ratio: 16 / 9; border: 2px solid var(--ink); box-shadow: 0 0 0 2px var(--line), 6px 6px 0 rgba(0,0,0,.45); }
.tagline { margin: 0; text-align: center; color: var(--muted); font-size: 13px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 14px; }
.seg button { min-height: 44px; border: 2px solid var(--ink); background: var(--panel-2); color: var(--muted); cursor: pointer; font-weight: 700; text-transform: uppercase; }
.seg button.on { background: var(--bg); color: var(--accent); box-shadow: inset 2px 2px 0 rgba(0,0,0,.5); }
.field { display: block; margin-bottom: 12px; }
.field span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; }
.field input { width: 100%; min-height: 48px; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 0; background: var(--bg); color: var(--text); font: inherit; font-size: 16px; box-shadow: inset 2px 2px 0 rgba(0,0,0,.6); }
.field input:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.form-error { color: var(--bad); min-height: 20px; font-size: 13px; }
.hint { color: var(--muted); font-size: 12px; margin: 8px 0; }

/* ---------- Spielbildschirm ---------- */
.game { position: fixed; inset: 0; display: flex; flex-direction: column; max-width: 520px; margin: 0 auto; background: #000; }
.hud { display: flex; align-items: stretch; gap: 6px; padding: calc(6px + var(--safe-t)) 6px 6px; background: var(--panel); border-bottom: 2px solid var(--ink); box-shadow: inset 0 -2px 0 var(--line); }
.hud-stat, .hud-lvl { display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 4px 8px; border: 2px solid var(--ink); background: var(--bg); cursor: pointer; box-shadow: inset 2px 2px 0 rgba(0,0,0,.6); }
.hud-stat b { font-size: 16px; font-variant-numeric: tabular-nums; }
.hud-stat canvas { width: 21px; height: 21px; }
.hud-lvl { flex: 1; min-width: 0; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; text-align: left; }
.hud-lvl .lv { grid-row: span 2; align-self: center; font-weight: 800; color: var(--accent); }
.hud-lvl .xp { height: 8px; border: 1px solid var(--ink); background: var(--panel-2); align-self: end; }
.hud-lvl .xp i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--accent) 0 4px, var(--accent-dark) 4px 5px); transition: width .6s steps(8); }
.hud-lvl .tt { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pulse { animation: pulse .5s steps(3); }
.pulse.good b { color: var(--good); }
.pulse.bad b { color: var(--bad); }
@keyframes pulse { 50% { transform: scale(1.12); } }

.stage { flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; background: #000; touch-action: none; user-select: none; -webkit-user-select: none; }
#cv { touch-action: none; }

.bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 6px 6px calc(6px + var(--safe-b)); background: var(--panel); border-top: 2px solid var(--ink); box-shadow: inset 0 2px 0 var(--line); }
.bar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; font-size: 10px !important; border: 2px solid var(--ink); background: var(--panel-2); color: var(--muted); font-weight: 800; text-transform: uppercase; font-size: 12px; cursor: pointer; box-shadow: inset -3px -3px 0 rgba(0,0,0,.4), inset 3px 3px 0 rgba(255,255,255,.1); }
.bar button canvas { width: 21px; height: 21px; }
.bar button.on { background: var(--bg); color: var(--accent); box-shadow: inset 3px 3px 0 rgba(0,0,0,.6); }
.bar button:active { transform: translateY(2px); }

/* ---------- Dialoge ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 30; display: flex; align-items: flex-end; justify-content: center; padding: 10px 10px calc(10px + var(--safe-b)); background: rgba(0,0,0,.6); }
.sheet-wrap.opening { animation: fade .15s steps(3); }
.sheet-wrap.opening .dlg { animation: popup .22s steps(4); }
@keyframes fade { from { opacity: 0; } }
@keyframes popup { from { transform: translateY(40px) scale(.96); opacity: 0; } }
.dlg { width: 100%; max-width: 500px; max-height: 86dvh; display: flex; flex-direction: column; }
.dlg .win-body { overflow-y: auto; overscroll-behavior: contain; }
.dlg h4 { margin: 16px 0 6px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

.cust { display: flex; gap: 12px; align-items: center; }
.cust .grow { flex: 1; min-width: 0; }
.portrait { padding: 6px; background: var(--bg); border: 2px solid var(--ink); box-shadow: inset 2px 2px 0 rgba(0,0,0,.6); }
.portrait.sm { padding: 4px; }
.name { font-weight: 800; font-size: 16px; }
.type { color: var(--muted); font-size: 12px; }
.tag { font-size: 10px; padding: 1px 5px; background: var(--gold); color: var(--ink); vertical-align: middle; }
.device { display: flex; gap: 8px; align-items: center; margin-top: 6px; font-size: 13px; }
.bubble { position: relative; margin: 14px 0 10px; padding: 10px 12px; background: var(--text); color: var(--ink); border: 2px solid var(--ink); font-style: italic; }
.bubble::before { content: ""; position: absolute; left: 22px; top: -10px; border: 5px solid transparent; border-bottom-color: var(--ink); }
.bubble.sm { margin: 10px 0 0; font-size: 12px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.stats > div { padding: 6px 8px; background: var(--bg); border: 2px solid var(--ink); }
.stats span:first-child { display: block; font-size: 10px; color: var(--muted); text-transform: uppercase; }
.stats b { font-size: 14px; }
.stats .stars { color: var(--gold); letter-spacing: 1px; }
.pbar { display: inline-flex; gap: 2px; }
.pbar i { width: 7px; height: 9px; background: var(--panel-2); border: 1px solid var(--ink); }
.pbar i.on { background: var(--accent); }
.xpbar { height: 12px; border: 2px solid var(--ink); background: var(--bg); margin-top: 8px; }
.xpbar i { display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--good) 0 6px, #047857 6px 7px); }
.notice { margin-top: 14px; padding: 10px; border: 2px dashed var(--gold); color: var(--gold); }

.pick { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 6px 10px; margin-top: 6px; border: 2px solid var(--ink); background: var(--panel-2); text-align: left; cursor: pointer; box-shadow: inset -3px -3px 0 rgba(0,0,0,.4), inset 3px 3px 0 rgba(255,255,255,.08); }
.pick:not(:disabled):hover { background: #34405a; }
.pick:not(:disabled):active { transform: translateY(2px); }
.pick:disabled { opacity: .45; cursor: not-allowed; }
.pick .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pick small { color: var(--muted); }
.pick .go { color: var(--accent); font-weight: 800; white-space: nowrap; }

.card { padding: 10px; margin-top: 10px; background: var(--bg); border: 2px solid var(--ink); box-shadow: inset 2px 2px 0 rgba(255,255,255,.05); }
.cert { padding: 12px; background: #f5ecd7; color: #2b2116; border: 2px solid var(--ink); box-shadow: inset 0 0 0 3px #c9b28a; }
.cert-head { text-align: center; font-weight: 900; letter-spacing: .2em; color: #7c2d12; margin-bottom: 6px; }
.cert .type { color: #5b4a35; }
.cert .stats > div { background: #fffaf0; }
.cert .stats span:first-child { color: #7a6650; }
.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.menu-grid .pbtn { font-size: 12px; }
.help { padding-left: 20px; margin: 0; display: grid; gap: 10px; }
.news, .summary { list-style: none; margin: 0; padding: 0; }
.news li { display: flex; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.news li.mine { color: var(--accent); }
.news .grow { flex: 1; }
.news time { color: var(--muted); font-size: 11px; white-space: nowrap; }
.summary { display: grid; gap: 6px; margin: 10px 0; font-size: 15px; }
.levelup { text-align: center; padding: 10px 0; }
.levelup .big { font-size: 36px; font-weight: 900; color: var(--gold); text-shadow: 3px 3px 0 var(--ink), 0 0 18px rgba(253,224,71,.4); letter-spacing: .08em; }

/* ---------- Ausbau ---------- */
.notice.gold { border-color: var(--gold); color: var(--gold); margin: 12px 0 0; background: rgba(253,224,71,.08); }
.card.up .pbar i { width: 10px; height: 10px; }
.card.up .pbar i.on { background: var(--gold); }

/* ---------- Rangliste & Rechtliches ---------- */
.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-list li { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-bottom: 1px dashed var(--line); }
.rank-list li.mine { background: rgba(34,211,238,.1); color: var(--accent); }
.rank-list .pos { width: 28px; text-align: center; font-weight: 800; }
.rank-list .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rank-list small { color: var(--muted); }
.rank-list .rep { color: var(--gold); white-space: nowrap; }
.legal { text-align: center; font-size: 12px; color: var(--muted); margin: 14px 0 0; }
.legal a, .linkbtn { color: var(--muted); text-decoration: underline; background: none; border: 0; padding: 4px; cursor: pointer; font-size: 12px; min-height: 32px; }

/* ---------- Kalle ---------- */
.kalle-cv { width: 100%; height: auto; aspect-ratio: 80 / 44; border: 2px solid var(--ink); box-shadow: inset 2px 2px 0 rgba(0,0,0,.5); }
.pet-stats { display: grid; gap: 8px; margin-top: 12px; }
.pet-stat { display: grid; grid-template-columns: 110px 1fr 32px; align-items: center; gap: 8px; font-size: 13px; }
.pet-stat b { text-align: right; font-variant-numeric: tabular-nums; }
.meter { height: 12px; border: 2px solid var(--ink); background: var(--bg); }
.meter i { display: block; height: 100%; transition: width .4s steps(6); }
.meter.good i { background: repeating-linear-gradient(90deg, var(--good) 0 6px, #047857 6px 7px); }
.meter.warn i { background: repeating-linear-gradient(90deg, var(--warn) 0 6px, #b45309 6px 7px); }
.meter.bad i { background: repeating-linear-gradient(90deg, var(--bad) 0 6px, #991b1b 6px 7px); }
.pet-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 14px; }
.pet-actions .pbtn { flex-direction: column; gap: 2px; padding: 8px 4px; font-size: 11px; min-height: 58px; }
.pet-actions small { font-size: 9px; font-weight: 600; text-transform: none; }

/* ---------- Preisangebot ---------- */
.offer { margin-top: 12px; padding: 12px; background: var(--bg); border: 2px solid var(--ink); }
.offer-price { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.offer-price span { font-size: 11px; color: var(--muted); text-transform: uppercase; }
.offer-price b { font-size: 32px; font-weight: 900; }
.offer-price small { color: var(--muted); }
.offer input[type=range] { width: 100%; height: 44px; accent-color: var(--accent); margin: 8px 0; }
.offer-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.offer-quick .pbtn { min-height: 40px; font-size: 11px; padding: 6px; }
.reaction { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 8px 0; }
.reaction canvas { border: 2px solid var(--ink); background: var(--bg); padding: 6px; }
.reaction.reject canvas { animation: shake .4s steps(4); border-color: var(--bad); }
.reaction.happy canvas { border-color: var(--good); }
.rx-title { font-size: 28px; font-weight: 900; letter-spacing: .06em; text-shadow: 3px 3px 0 var(--ink); }
.bubble.think { font-style: normal; font-size: 24px; padding: 4px 18px; }
.dots i { animation: blink 1s steps(2) infinite; font-style: normal; }
.dots i:nth-child(2) { animation-delay: .33s; }
.dots i:nth-child(3) { animation-delay: .66s; }
@keyframes blink { 50% { opacity: 0; } }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* ---------- Tabs, Raster, Aufgaben, Erfolge, Bewertungen ---------- */
.tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; margin: 12px 0 8px; }
.tabs button { min-height: 40px; border: 2px solid var(--ink); background: var(--panel-2); color: var(--muted); font-weight: 800; text-transform: uppercase; font-size: 11px; cursor: pointer; }
.tabs button.on { background: var(--bg); color: var(--accent); box-shadow: inset 2px 2px 0 rgba(0,0,0,.5); }
.kalle-head { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.kalle-head .grow { flex: 1; min-width: 0; }
.kalle-lv { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; min-width: 96px; }
.kalle-lv b { color: var(--accent); }
.kalle-lv .xp { width: 96px; height: 8px; border: 1px solid var(--ink); background: var(--panel-2); }
.kalle-lv .xp i { display: block; height: 100%; background: var(--accent); }
.kalle-lv small { color: var(--gold); }
.item-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border: 2px solid var(--ink); background: var(--panel-2); cursor: pointer; font-size: 11px; min-height: 44px; }
.item.on { border-color: var(--accent); background: var(--bg); }
.item:disabled:not(.on) { opacity: .45; cursor: not-allowed; }
.item small { color: var(--gold); }
.task { margin-top: 8px; }
.task-head, .task-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.task-foot { margin-top: 6px; }
.task-foot .pbtn { min-height: 38px; padding: 6px 12px; font-size: 12px; }
.task.done { border-color: var(--good); }
.task.claimed { opacity: .6; }
.ach { display: flex; gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 1px dashed var(--line); opacity: .5; }
.ach.on { opacity: 1; }
.ach .ico { font-size: 22px; width: 30px; text-align: center; }
.ach .grow { display: flex; flex-direction: column; }
.ach small { color: var(--muted); }
.trophies { display: flex; flex-wrap: wrap; gap: 10px; font-size: 28px; }
.trophies span { display: flex; flex-direction: column; align-items: center; }
.trophies small { font-size: 10px; color: var(--muted); }
.reviews { list-style: none; margin: 0; padding: 0; }
.reviews li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.reviews .grow { display: flex; flex-direction: column; gap: 2px; }
.reviews small { color: var(--muted); }
.stars { color: var(--gold); white-space: nowrap; letter-spacing: 1px; }
.stars.s1 { color: var(--bad); }
.logo-mini { width: 24px; height: 24px; flex: none; }
.rank-list li[role=button] { cursor: pointer; }

/* ---------- Team & Praktikanten ---------- */
.tag.intern { background: var(--good); }
.card.intern { border-color: var(--good); }
.intern-head { margin: -2px 0 8px; font-size: 11px; font-weight: 800; color: var(--good); letter-spacing: .04em; }
.pick .pbar i { width: 5px; height: 7px; }

/* ---------- Kalle: Quatschen ---------- */
.kalle-cv { cursor: pointer; }
.chat { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; padding: 8px; background: var(--bg); border: 2px solid var(--ink); }
.msg { max-width: 85%; padding: 7px 10px; border: 2px solid var(--ink); font-size: 13px; }
.msg.kalle { align-self: flex-start; background: var(--text); color: var(--ink); }
.msg.me { align-self: flex-end; background: var(--accent-dark); color: var(--text); }
.topics { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
.topics .pbtn { min-height: 44px; font-size: 11px; padding: 6px; text-transform: none; }
.kalle-head .rename input { min-height: 38px; font-size: 15px; }

/* ---------- Laden gestalten ---------- */
.logo-editor { display: flex; gap: 12px; align-items: flex-start; }
#logo-cv { width: min(224px, 62vw); height: auto; aspect-ratio: 1; border: 2px solid var(--ink); touch-action: none; image-rendering: pixelated; cursor: crosshair; }
.logo-side { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); }
.logo-side canvas { border: 2px solid var(--ink); background: var(--bg); }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.sw { width: 34px; height: 34px; border: 2px solid var(--ink); cursor: pointer; box-shadow: inset 2px 2px 0 rgba(255,255,255,.15); }
.sw.on { outline: 3px solid var(--accent); outline-offset: 1px; }
.tool-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.tool-row .pbtn { min-height: 38px; padding: 6px 10px; font-size: 11px; }
.rename { display: flex; gap: 6px; }
.rename input { flex: 1; min-height: 44px; padding: 8px; border: 2px solid var(--ink); background: var(--bg); color: var(--text); font: inherit; font-size: 16px; }

/* ---------- Besuch & Leiste ---------- */
.stage { position: relative; }
.visit-bar { position: absolute; left: 6px; right: 6px; top: 6px; display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: rgba(13,15,20,.9); border: 2px solid var(--accent); font-size: 12px; }
.visit-bar span { flex: 1; }
.visit-bar .pbtn { min-height: 36px; padding: 4px 10px; font-size: 11px; }
.bar { grid-template-columns: repeat(5, 1fr) !important; }
.bar button { position: relative; }
.bar .badge { position: absolute; top: 2px; right: 6px; min-width: 18px; height: 18px; padding: 0 4px; background: var(--gold); color: var(--ink); font: 800 11px/18px var(--font); font-style: normal; border: 2px solid var(--ink); }

/* ---------- Minispiel ---------- */
.mg-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: calc(8px + var(--safe-t)) 8px calc(8px + var(--safe-b)); background: rgba(0,0,0,.75); animation: fade .15s steps(3); }
.mg { width: 100%; max-width: 500px; height: 100%; max-height: 760px; display: flex; flex-direction: column; }
.mg-hud { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--bg); border-bottom: 2px solid var(--ink); }
.mg-time { flex: 1; height: 12px; border: 2px solid var(--ink); background: var(--panel-2); }
.mg-time i { display: block; height: 100%; width: 100%; background: repeating-linear-gradient(90deg, var(--accent) 0 6px, var(--accent-dark) 6px 7px); }
.mg-time.low i { background: repeating-linear-gradient(90deg, var(--bad) 0 6px, #991b1b 6px 7px); }
.mg-score { min-width: 64px; text-align: right; color: var(--gold); }
.mg-stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; background: #000; touch-action: none; user-select: none; -webkit-user-select: none; }
.mg-stage canvas { touch-action: none; }
.mg-panel { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 20px; text-align: center; background: rgba(13,15,20,.92); }
.mg-panel p { margin: 0; }
.mg-big { font-size: 34px; font-weight: 900; letter-spacing: .06em; color: var(--gold); text-shadow: 3px 3px 0 var(--ink); }
.mg-big.good { color: var(--good); }
.mg-big.bad { color: var(--bad); }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(76px + var(--safe-b)); z-index: 40; transform: translate(-50%, 12px); max-width: calc(100vw - 24px); padding: 10px 14px; background: var(--panel); border: 2px solid var(--ink); box-shadow: inset 2px 2px 0 var(--hi), 4px 4px 0 rgba(0,0,0,.5); opacity: 0; pointer-events: none; transition: opacity .15s steps(3), transform .15s steps(3); font-size: 13px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.good { border-left: 6px solid var(--good); }
.toast.bad { border-left: 6px solid var(--bad); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- Hunde-Game-Over (Easter Egg) ---------- */
.dog-btn { opacity: .75; font-size: 12px; }
.dog-ask { font-size: 56px; text-align: center; animation: dogbob 1s ease-in-out infinite; }
.dog-over { position: fixed; inset: 0; z-index: 9999; background: rgba(20, 8, 12, .94); overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 16px; color: #fff; font-family: var(--font); }
.dog-over .dogs span { position: absolute; animation: dogpop .5s cubic-bezier(.3, 1.6, .5, 1) both, dogbob 1.2s ease-in-out .5s infinite; }
.dog-over .bills { position: absolute; inset: 0; pointer-events: none; }
.dog-bill { position: absolute; top: -60px; width: 120px; background: #fffbe8; color: #222; border: 2px solid #222; padding: 4px 6px; font-size: 11px; box-shadow: 3px 3px 0 #0006; animation: billfall linear forwards; }
.dog-bill b { display: block; } .dog-bill span { color: #c22; font-weight: 800; }
.dog-panel { position: relative; max-width: 360px; width: 100%; text-align: center; background: var(--ink, #111); border: 3px solid #e33; padding: 18px 16px; box-shadow: 6px 6px 0 #0008; }
.dog-panel h2 { font-size: 17px; line-height: 1.3; margin: 10px 0 6px; }
.dog-sub { font-size: 12px; opacity: .8; }
.dog-money { font-size: clamp(16px, 6vw, 26px); white-space: nowrap; font-weight: 800; color: var(--gold, #fc3); font-variant-numeric: tabular-nums; }
.dog-money.debt { color: #ff3b3b; }
.dog-stamp { display: inline-block; margin: 12px 0; padding: 4px 14px; border: 4px solid #e22; color: #e22; font-size: 30px; font-weight: 900; letter-spacing: 2px; transform: rotate(-12deg) scale(3); opacity: 0; }
.dog-restart { opacity: 0; pointer-events: none; }
.dog-over.done .dog-stamp { animation: stamp .35s ease-in forwards; }
.dog-over.done .dog-restart { opacity: 1; pointer-events: auto; transition: opacity .3s .6s; }
.dog-over.shake .dog-panel { animation: dogshake .45s linear; }
.dog-over.calm .dog-stamp { transform: rotate(-12deg); opacity: 1; animation: none; }
.dog-over.calm .dogs span { animation: none; }
@keyframes dogpop { from { transform: scale(0) rotate(-30deg); } to { transform: scale(1); } }
@keyframes dogbob { 50% { transform: translateY(-6px); } }
@keyframes billfall { to { transform: translateY(115vh) rotate(var(--r, 10deg)); } }
@keyframes stamp { to { transform: rotate(-12deg) scale(1); opacity: 1; } }
@keyframes dogshake { 20% { transform: translate(-6px, 3px); } 40% { transform: translate(5px, -4px); } 60% { transform: translate(-4px, -2px); } 80% { transform: translate(3px, 4px); } }
@media (prefers-reduced-motion: reduce) { .dog-ask { animation: none; } }
.notice.regular { border-color: var(--cyan, #22d3ee); color: var(--cyan, #22d3ee); margin: 12px 0 0; background: rgba(34,211,238,.08); }
