/* 72 Stunden – Oberfläche im HD-2D-Stil: dunkle Tafeln mit Goldrand, Pixelwelt darunter */
@font-face { font-family: 'Black Ops One'; src: url('/fonts/blackops.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; src: url('/fonts/barlow-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; src: url('/fonts/barlow-700.woff2') format('woff2'); font-weight: 600 900; font-display: swap; }

:root {
  --ink: #0c0a12;
  --panel: rgba(14, 12, 22, .94);
  --panel2: rgba(30, 26, 44, .92);
  --gold: #c8a45a;
  --gold2: #f0d890;
  --text: #f2ead8;
  --muted: #a8a0b8;
  --red: #e84a5a;
  --green: #8ae08a;
  --cyan: #7df9ff;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; -webkit-text-size-adjust: 100%; -webkit-touch-callout: none; background: #05040a; color: var(--text); font-family: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif; font-weight: 600; font-size: 17px; touch-action: none; user-select: none; -webkit-user-select: none; }
canvas#game { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
#touch, #touch *, #hud, #hud * { touch-action: none !important; -webkit-touch-callout: none; }
[hidden] { display: none !important; }
svg { display: block; }
.ico { width: 1.6em; height: 1.6em; image-rendering: auto; vertical-align: middle; }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; font-size: clamp(12px, 2.6vh, 19px); }
.hud-top { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: flex-start; padding: max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 0 max(10px, env(safe-area-inset-left)); }
.hud-left { display: flex; flex-direction: column; gap: .4em; align-items: flex-start; }
#hud-hearts { display: flex; flex-wrap: wrap; gap: .12em; max-width: 12em; filter: drop-shadow(0 2px 2px rgba(0,0,0,.7)); }
.heart { width: 1.45em; height: 1.35em; display: block; background: no-repeat center/contain; }
.heart.full { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 30'%3E%3Cpath d='M16 27C2 18 2 6 9 4c4-1 6 2 7 4 1-2 3-5 7-4 7 2 7 14-7 23z' fill='%23e84a5a' stroke='%230c0a12' stroke-width='2.5'/%3E%3Cellipse cx='10' cy='10' rx='3' ry='2' fill='%23fff' opacity='.6' transform='rotate(-30 10 10)'/%3E%3C/svg%3E"); }
.heart.half { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 30'%3E%3Cpath d='M16 27C2 18 2 6 9 4c4-1 6 2 7 4 1-2 3-5 7-4 7 2 7 14-7 23z' fill='%233a3048' stroke='%230c0a12' stroke-width='2.5'/%3E%3Cpath d='M16 27C2 18 2 6 9 4c4-1 6 2 7 4z' fill='%23e84a5a'/%3E%3C/svg%3E"); }
.heart.empty { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 30'%3E%3Cpath d='M16 27C2 18 2 6 9 4c4-1 6 2 7 4 1-2 3-5 7-4 7 2 7 14-7 23z' fill='%233a3048' stroke='%230c0a12' stroke-width='2.5'/%3E%3C/svg%3E"); }
#hud-item { pointer-events: auto; position: relative; width: 3.2em; height: 3.2em; min-width: 44px; min-height: 44px; border-radius: 10px; border: 2px solid var(--gold); background: radial-gradient(circle at 40% 35%, #3a3350, #14121c); box-shadow: 0 3px 8px rgba(0,0,0,.6), inset 0 0 0 2px rgba(0,0,0,.6); padding: .25em; display: grid; place-items: center; }
#hud-item .ico { width: 100%; height: 100%; }
#hud-item .ammo { position: absolute; right: -.35em; bottom: -.35em; min-width: 1.6em; padding: 0 .3em; border-radius: 8px; background: var(--ink); border: 2px solid var(--gold); font-size: .85em; text-align: center; }
#hud-item .ammo.zero { color: var(--red); }
.hud-right { display: flex; gap: .5em; align-items: center; }
#hud-scrap, #hud-keys { display: flex; align-items: center; gap: .25em; padding: .15em .6em .15em .25em; border-radius: 999px; background: var(--panel); border: 2px solid rgba(200,164,90,.7); font-family: 'Black Ops One', Impact, sans-serif; letter-spacing: .04em; }
#hud-scrap img, #hud-keys img { width: 1.5em; height: 1.5em; }
#hud-pause { pointer-events: auto; width: 2.6em; height: 2.6em; min-width: 44px; min-height: 44px; border-radius: 50%; border: 2px solid var(--gold); background: var(--panel); padding: .45em; }
.bump { animation: bump .3s ease-out; }
@keyframes bump { 40% { transform: scale(1.18); } }

/* Uhr unten in der Mitte (wie in Majora's Mask) */
/* Uhr unten links – verdeckt nichts vom Geschehen in der Bildmitte */
#hud-clock { position: absolute; left: max(10px, env(safe-area-inset-left)); bottom: max(6px, env(safe-area-inset-bottom)); width: 8.2em; text-align: center; filter: drop-shadow(0 3px 5px rgba(0,0,0,.8)); }
#hud-clock { transition: opacity .25s; }
#hud-clock.faded { opacity: .3; }
#hud-clock .dial { width: 100%; height: auto; }
#hud-clock .readout { position: absolute; left: 0; right: 0; top: 2.2em; display: flex; flex-direction: column; line-height: 1; }
#hud-clock .day { font-family: 'Black Ops One', Impact, sans-serif; color: var(--gold2); font-weight: 400; font-size: .9em; letter-spacing: .08em; }
#hud-clock .time { font-family: 'Black Ops One', Impact, sans-serif; font-size: 1.25em; }
#hud-clock .left { font-size: .8em; color: var(--muted); margin-top: -.1em; }
#hud-clock.final .left { color: #ff6a6a; font-family: 'Black Ops One', Impact, sans-serif; font-size: 1em; animation: pulse 1s infinite; }
#hud-clock.hemmer .time { color: var(--cyan); }
#hud-clock.hemmer .day::after { content: ' ❄'; color: var(--cyan); }
@keyframes pulse { 50% { opacity: .45; } }
#hud-infection { position: relative; height: 1.05em; margin-top: .2em; border-radius: 6px; background: #14121c; border: 2px solid #4a4660; overflow: hidden; }
#hud-infection i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #6a8a4a, #9ab85a); }
#hud-infection.st3 i, #hud-infection.st4 i { background: linear-gradient(90deg, #6a8a4a, #c8d84a); }
#hud-infection.st5 i { background: linear-gradient(90deg, #8aa05a, #e8e04a); animation: pulse .9s infinite; }
#hud-infection b { position: relative; font-size: .7em; letter-spacing: .12em; line-height: 1.5; color: #e8f0d8; text-shadow: 0 1px 2px #000; }

#hud-boss { position: absolute; left: 50%; bottom: max(10px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(26em, 56vw); text-align: center; }
#hud-boss .name { font-family: 'Black Ops One', Impact, sans-serif; font-size: 1.2em; letter-spacing: .08em; color: #ffb0b8; text-shadow: 0 2px 4px #000; }
#hud-boss .title { font-size: .8em; color: var(--muted); margin-bottom: .2em; }
#hud-boss .bar { height: .8em; border-radius: 4px; border: 2px solid var(--gold); background: #1a1020; overflow: hidden; }
#hud-boss .bar i { display: block; height: 100%; background: linear-gradient(#ff8a9a, #c8203a); transition: width .15s; }

#banner { position: absolute; left: 50%; top: 24%; transform: translateX(-50%); text-align: center; opacity: 0; pointer-events: none; }
#banner b { display: block; font-family: 'Black Ops One', Impact, sans-serif; font-weight: 400; font-size: 2.2em; letter-spacing: .1em; color: var(--text); text-shadow: 0 3px 10px #000, 0 0 30px rgba(200,164,90,.4); }
#banner small { display: block; color: var(--gold2); font-size: 1em; letter-spacing: .25em; text-transform: uppercase; text-shadow: 0 2px 6px #000; }
#banner.show { animation: banner 3.2s ease-out; }
@keyframes banner { 0% { opacity: 0; transform: translate(-50%, 10px); } 12%, 75% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
#toast { position: absolute; left: 50%; bottom: 4.5em; transform: translateX(-50%); max-width: 80vw; padding: .45em 1em; border-radius: 8px; background: var(--panel); border: 1.5px solid var(--gold); opacity: 0; text-align: center; }
#toast.show { animation: toast 3.4s ease-out; }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, 8px); } 8%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
#inner { position: absolute; left: max(14px, env(safe-area-inset-left)); bottom: 8.4em; max-width: min(34em, 46vw); opacity: 0; font-style: italic; font-size: 1.05em; color: #d8e8c8; text-shadow: 0 2px 6px #000, 0 0 12px rgba(120,200,120,.4); }
#inner.show { animation: inner 6.5s ease-out; }
@keyframes inner { 0% { opacity: 0; transform: translateY(6px); filter: blur(3px); } 10%, 82% { opacity: 1; transform: none; filter: none; } 100% { opacity: 0; filter: blur(2px); } }
#stagecard { position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%); text-align: center; opacity: 0; width: min(40em, 90vw); }
#stagecard small { display: block; letter-spacing: .3em; color: #9ab85a; font-size: .85em; }
#stagecard b { display: block; font-family: 'Black Ops One', Impact, sans-serif; font-weight: 400; font-size: 2.8em; color: #c8e87a; text-shadow: 0 0 24px rgba(160,220,80,.6), 0 4px 8px #000; letter-spacing: .08em; }
#stagecard span { display: block; color: var(--text); text-shadow: 0 2px 6px #000; }
#stagecard.show { animation: stagecard 5s ease-out; }
@keyframes stagecard { 0% { opacity: 0; transform: translate(-50%, -50%) scale(1.15); filter: blur(6px); } 10%, 80% { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: none; } 100% { opacity: 0; } }

/* ---------- Touch ---------- */
#touch { display: none; }
body.playing.touch #touch, body.playing.coarse #touch { display: block; }
#joy-zone { position: fixed; left: 0; top: 15%; bottom: 0; width: 50%; z-index: 3; }
#joy-base { position: fixed; width: clamp(110px, 30vh, 150px); height: clamp(110px, 30vh, 150px); left: calc(env(safe-area-inset-left) + 200px); top: calc(100% - 110px); transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none; z-index: 4; background: radial-gradient(circle, rgba(255,255,255,.12) 40%, rgba(255,255,255,.05)); border: 3px solid rgba(200,164,90,.6); opacity: .45; }
#joy-base.active { opacity: 1; }
#joy-knob { position: absolute; left: 50%; top: 50%; width: 46%; height: 46%; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f0d890, #c8a45a 60%, #7a5a2a); border: 3px solid var(--ink); }
#btn-attack, #btn-item, #btn-dash { position: fixed; z-index: 4; border-radius: 50%; border: 3px solid var(--gold); color: var(--text); font-family: 'Black Ops One', Impact, sans-serif; letter-spacing: .04em; box-shadow: 0 5px 0 rgba(0,0,0,.6); opacity: .9; }
#btn-attack { right: calc(env(safe-area-inset-right) + 18px); bottom: calc(env(safe-area-inset-bottom) + 20px); width: clamp(92px, 26vh, 120px); height: clamp(92px, 26vh, 120px); background: radial-gradient(circle at 35% 30%, #ff9aa6, #c8303e 60%, #7a1020); font-size: clamp(14px, 3.6vh, 18px); }
#btn-item { right: calc(env(safe-area-inset-right) + clamp(118px, 33vh, 150px)); bottom: calc(env(safe-area-inset-bottom) + 18px); width: clamp(66px, 19vh, 84px); height: clamp(66px, 19vh, 84px); background: radial-gradient(circle at 35% 30%, #5a5078, #1e1a2c); padding: 10px; }
#btn-item img { width: 100%; height: 100%; }
#btn-dash { right: calc(env(safe-area-inset-right) + 34px); bottom: calc(env(safe-area-inset-bottom) + clamp(126px, 34vh, 160px)); width: clamp(58px, 16vh, 72px); height: clamp(58px, 16vh, 72px); background: radial-gradient(circle at 35% 30%, #9ad8ff, #3a7ab8 60%, #1a3a68); font-size: clamp(11px, 2.6vh, 14px); }
#btn-dash.cooling { filter: grayscale(.8) brightness(.7); }
#btn-cycle { position: fixed; z-index: 4; right: calc(env(safe-area-inset-right) + clamp(128px, 36vh, 160px)); bottom: calc(env(safe-area-inset-bottom) + clamp(92px, 26vh, 116px)); width: clamp(44px, 12vh, 54px); height: clamp(44px, 12vh, 54px); border-radius: 50%; border: 2px solid var(--gold); background: rgba(30,26,44,.9); padding: 9px; box-shadow: 0 3px 0 rgba(0,0,0,.6); opacity: .9; }
/* Tablets: größere Knöpfe, HUD und Texte mitskalieren */
@media (pointer: coarse) and (min-width: 700px) and (min-height: 700px) {
  #hud { font-size: clamp(16px, 2.2vmin, 22px); }
  #btn-attack { width: 140px; height: 140px; font-size: 20px; }
  #btn-item { width: 96px; height: 96px; right: calc(env(safe-area-inset-right) + 176px); }
  #btn-dash { width: 84px; height: 84px; bottom: calc(env(safe-area-inset-bottom) + 176px); }
  #btn-cycle { width: 58px; height: 58px; right: calc(env(safe-area-inset-right) + 190px); bottom: calc(env(safe-area-inset-bottom) + 132px); }
  #joy-base { width: 170px; height: 170px; }
  #panel { font-size: 19px; }
  #dialog { font-size: 21px; }
}
/* Tablet hochkant: Dialog über den Knöpfen */
@media (pointer: coarse) and (orientation: portrait) and (min-width: 601px) {
  #dialog { bottom: calc(env(safe-area-inset-bottom) + 190px); }
}
.hint.install { margin-top: 1em !important; color: var(--gold2); font-size: .9em; }
#touch .pressed { transform: translateY(4px) scale(.96); box-shadow: 0 1px 0 rgba(0,0,0,.6); }
@media (pointer: coarse) { #inner { bottom: auto; top: 30%; max-width: 40vw; } #toast { bottom: auto; top: 16%; } #hud-boss { bottom: auto; top: 5.4em; } }

/* ---------- Dialog ---------- */
#dialog { position: fixed; z-index: 8; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(880px, 94vw); min-height: 7.2em; display: flex; gap: 14px; align-items: flex-start; padding: 14px 20px 16px; background: linear-gradient(var(--panel2), var(--panel)); border: 2px solid var(--gold); border-radius: 10px; box-shadow: 0 0 0 4px rgba(0,0,0,.6), 0 12px 30px rgba(0,0,0,.7); font-size: clamp(15px, 3vh, 20px); animation: dlg .18s ease-out; }
@keyframes dlg { from { transform: translate(-50%, 10px); opacity: 0; } }
#dialog .portrait { width: 6.4em; height: 6.4em; object-fit: cover; margin-top: -1.6em; border-radius: 8px; border: 2px solid var(--gold); background: radial-gradient(circle at 50% 30%, #4a4466, #1a1624); box-shadow: 0 6px 18px rgba(0,0,0,.6); flex: none; }
#dialog .dbody { flex: 1; }
#dialog .who { font-family: 'Black Ops One', Impact, sans-serif; font-weight: 400; color: var(--gold2); letter-spacing: .06em; margin-bottom: .2em; }
#dialog .text { line-height: 1.35; min-height: 2.7em; }
#dialog .next { position: absolute; right: 16px; bottom: 8px; color: var(--gold2); animation: pulse 1s infinite; }
#dialog .choices { display: flex; gap: 10px; flex-wrap: wrap; margin-top: .5em; }
#dialog .choices button { padding: .35em 1em; border-radius: 6px; border: 2px solid rgba(200,164,90,.6); background: #1e1a2c; }
#dialog .choices button.sel { border-color: var(--gold2); background: #3a3050; box-shadow: 0 0 12px rgba(240,216,144,.35); }

/* ---------- Menüs ---------- */
#overlay { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); background: radial-gradient(circle at 50% 40%, rgba(20,16,36,.35), rgba(5,4,10,.82)); }
#panel { position: relative; width: min(640px, 100%); max-height: 100%; overflow: auto; overscroll-behavior: contain; touch-action: pan-y; text-align: center; background: linear-gradient(var(--panel2), var(--panel)); border: 2px solid var(--gold); border-radius: 12px; box-shadow: 0 0 0 5px rgba(0,0,0,.55), 0 20px 50px rgba(0,0,0,.7); padding: clamp(14px, 3vh, 26px) clamp(14px, 3vw, 30px); animation: pop .2s ease-out; }
#panel.title { background: none; border: none; box-shadow: none; width: min(720px, 100%); }
#panel.pauseP, #panel.shopP { width: min(860px, 100%); }
@keyframes pop { from { transform: scale(.95); opacity: 0; } }
#panel h2 { font-family: 'Black Ops One', Impact, sans-serif; font-weight: 400; font-size: clamp(26px, 6vh, 40px); letter-spacing: .08em; margin: 0 0 .25em; color: var(--gold2); text-shadow: 0 3px 8px #000; }
#panel h3 { margin: .9em 0 .2em; color: var(--gold2); letter-spacing: .06em; }
#panel p { margin: .4em 0; line-height: 1.4; }
.note { color: var(--muted); font-size: .92em; }
.warn { color: #ffb070; }
.hint { color: var(--muted); font-size: .85em; }
.btns { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 14px; }
.btns.col button { min-width: 16em; }
.btns .row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.btns.sticky { position: sticky; bottom: -26px; padding: 12px 0 4px; background: linear-gradient(transparent, rgba(14,12,22,.98) 30%); flex-direction: row; justify-content: center; flex-wrap: wrap; }
#panel button { padding: .5em 1.3em; border-radius: 8px; border: 2px solid rgba(200,164,90,.55); background: #1e1a2c; color: var(--text); font-weight: 700; transition: transform .08s, background .15s; }
#panel button:hover, #panel button:focus-visible { background: #2e2842; border-color: var(--gold2); outline: none; }
#panel button:active { transform: translateY(2px); }
#panel button.go { background: linear-gradient(#8a6a2a, #5a4018); border-color: var(--gold2); color: #fff6dc; box-shadow: 0 0 18px rgba(200,164,90,.3); }
#panel button.big { font-family: 'Black Ops One', Impact, sans-serif; font-weight: 400; font-size: 1.25em; letter-spacing: .08em; min-width: 14em; display: flex; flex-direction: column; align-items: center; }
#panel button.big small { font-family: 'Barlow Condensed', sans-serif; font-size: .62em; letter-spacing: .02em; opacity: .8; }
#panel button:disabled { opacity: .45; cursor: default; }
.logo { display: flex; flex-direction: column; align-items: center; line-height: .85; margin-bottom: .3em; }
.logo .l0 { font-size: clamp(11px, 2.2vh, 15px); letter-spacing: .5em; color: var(--gold); margin-bottom: .6em; text-shadow: 0 2px 6px #000; }
.logo .l1 { font-family: 'Black Ops One', Impact, sans-serif; font-size: clamp(80px, 22vh, 150px); color: #d8e8c8; text-shadow: 0 0 40px rgba(140,220,100,.35), 0 6px 0 #1a2a12, 0 10px 20px #000; }
.logo .l2 { font-family: 'Black Ops One', Impact, sans-serif; font-size: clamp(30px, 8vh, 56px); letter-spacing: .25em; color: var(--gold2); text-shadow: 0 4px 12px #000; }
.tag { max-width: 34em; margin: 0 auto !important; text-shadow: 0 2px 6px #000; }
.credit { font-size: .8em; color: var(--muted); margin-top: 1.4em !important; }
.modes { display: grid; gap: 10px; margin-top: 12px; }
.mode { display: flex !important; flex-direction: column; align-items: flex-start; text-align: left; }
.mode b { font-family: 'Black Ops One', Impact, sans-serif; font-weight: 400; letter-spacing: .06em; }
.mode b i { font-family: 'Barlow Condensed', sans-serif; font-style: normal; font-size: .7em; color: var(--green); margin-left: .5em; }
.mode span { font-size: .85em; opacity: .8; }
.slide { min-height: 12em; display: grid; place-items: center; font-size: clamp(17px, 3.6vh, 24px); line-height: 1.5; }
.slide p { max-width: 30em; margin: 0 auto; }
#panel.intro { width: min(760px, 100%); background: linear-gradient(rgba(10,8,16,.9), rgba(5,4,10,.96)); }
.slide { position: relative; border-radius: 10px; padding: 2em 1.4em; overflow: hidden; }
.slide::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: .9; }
.slide-arena::before { background: radial-gradient(ellipse at 50% 110%, rgba(255,60,40,.55), transparent 60%), repeating-linear-gradient(90deg, rgba(255,255,255,.03) 0 2px, transparent 2px 40px); }
.slide-arena p { text-shadow: 0 0 18px rgba(255,80,60,.6), 0 2px 4px #000; }
.slide-dark { color: #c8c0d8; font-style: italic; }
.slide-dark::before { background: radial-gradient(circle at 50% 50%, rgba(80,120,70,.25), transparent 50%); animation: pulse 2.6s ease-in-out infinite; }
.slide-bastion::before { background: linear-gradient(#3a2a4a, #c86a3a 70%, #ffc27a); opacity: .45; }
.slide-bastion p { text-shadow: 0 2px 8px #000; }
.keys { margin: 0 auto; border-collapse: collapse; font-size: .92em; }
.keys td, .keys th { padding: .3em .6em; border-bottom: 1px solid rgba(200,164,90,.2); text-align: left; }
.keys th { color: var(--gold2); }
kbd { background: #2a2438; border: 1px solid var(--gold); border-bottom-width: 3px; border-radius: 4px; padding: 0 .35em; font: inherit; font-size: .9em; }
.set { display: flex; align-items: center; justify-content: space-between; gap: 1em; margin: .7em 0; text-align: left; }
.set.chk { justify-content: flex-start; }
.set input[type=range] { width: 55%; accent-color: var(--gold); }
.name-field { display: flex; flex-direction: column; gap: .3em; margin-top: 1em; }
.name-field input { font: inherit; font-size: 1.1em; padding: .4em .7em; border-radius: 8px; border: 2px solid var(--gold); background: #14121c; color: var(--text); text-align: center; user-select: text; -webkit-user-select: text; }
.rec { margin: 0 auto; border-collapse: collapse; min-width: 60%; }
.rec td { padding: .25em .7em; border-bottom: 1px solid rgba(200,164,90,.2); }
.rec tr.me td { color: var(--gold2); }

/* Gegenstand erhalten */
.fanfare { position: relative; padding: 1em 0 .4em; }
.fanfare img { width: 128px; height: 128px; position: relative; filter: drop-shadow(0 0 20px rgba(255,230,140,.6)); animation: float 1.8s ease-in-out infinite; }
.fanfare .rays { position: absolute; left: 50%; top: 5em; width: 260px; height: 260px; margin: -130px 0 0 -130px; background: repeating-conic-gradient(rgba(255,230,140,.16) 0 10deg, transparent 10deg 30deg); border-radius: 50%; animation: spin 10s linear infinite; mask: radial-gradient(circle, #000 30%, transparent 70%); -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 50% { transform: translateY(-8px); } }

/* Laden */
.shophead { display: flex; align-items: center; gap: 14px; text-align: left; }
.shophead .portrait { width: 88px; height: 88px; border-radius: 10px; border: 2px solid var(--gold); background: radial-gradient(circle at 50% 30%, #4a4466, #1a1624); }
.wallet { font-size: 1.2em; }
.shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.shop .card { display: flex !important; flex-direction: column; align-items: center; gap: .2em; padding: .7em !important; }
.shop .card .ico { width: 3em; height: 3em; }
.shop .card span { font-size: .85em; color: var(--gold2); }

/* Pause */
.pausehead { display: flex; align-items: baseline; justify-content: space-between; gap: 1em; flex-wrap: wrap; }
.pausehead span { color: var(--muted); }
.tabs { display: flex; gap: 8px; justify-content: center; margin: .4em 0 .8em; }
.tab.on { background: #3a3050 !important; border-color: var(--gold2) !important; }
.invgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.slot { display: flex; flex-direction: column; align-items: center; gap: .15em; padding: .6em; border-radius: 10px; border: 2px solid rgba(200,164,90,.35); background: #14121c; cursor: pointer; }
.slot.sel { border-color: var(--gold2); box-shadow: 0 0 14px rgba(240,216,144,.3); background: #2a2438; }
.slot .ico { width: 2.8em; height: 2.8em; }
.slot small { color: var(--muted); }
.cores { display: flex; justify-content: center; gap: 14px; margin-top: 1em; flex-wrap: wrap; }
.core { display: flex; flex-direction: column; align-items: center; width: 7em; opacity: .3; filter: grayscale(1); }
.core.have { opacity: 1; filter: drop-shadow(0 0 10px rgba(125,249,255,.5)); }
.core .ico { width: 3em; height: 3em; }
.core small { font-size: .75em; }
.stats { color: var(--muted); font-size: .9em; }
.stats .ico { width: 1.2em; height: 1.2em; }
#mapc { width: 100%; max-width: 600px; height: auto; border-radius: 8px; border: 2px solid rgba(200,164,90,.4); image-rendering: auto; }
.log { text-align: left; }
.plan { margin: .3em 0; padding-left: 1.2em; }
.plan li.done { color: var(--green); text-decoration: line-through; }
.plan li.late { color: #ff9a6a; }
.log h3 .ok { color: var(--green); font-size: .8em; }
.log h3 .warn { color: #ffb070; font-size: .8em; }
.log h3 .bad { color: #ff6a6a; font-size: .8em; }

/* Tod und Enden */
.deathcard h2 { color: #ff8a8a !important; }
.endcard small { letter-spacing: .3em; color: var(--green); }
.endcard.bad h2 { color: #c8e87a !important; }
.endcard p { white-space: normal; }

#rotate { display: none; }
@media (orientation: portrait) and (max-width: 600px) {
  body.coarse #rotate { display: grid; position: fixed; inset: 0; z-index: 50; place-items: center; background: #05040a; text-align: center; padding: 2em; }
  #rotate .phone { font-size: 64px; animation: rot 2s ease-in-out infinite; }
  @keyframes rot { 50% { transform: rotate(90deg); } }
}

/* ---------- KI-Artworks und -Porträts ---------- */
#overlay.hasart { background: linear-gradient(rgba(5,4,10,.25), rgba(5,4,10,.55) 55%, rgba(5,4,10,.9)), var(--art) center / cover no-repeat, #05040a; }
#overlay.hasart #panel.title .logo { filter: drop-shadow(0 6px 18px #000); }
#overlay.hasart #panel.title .tag, #overlay.hasart #panel.title .credit { text-shadow: 0 2px 6px #000, 0 0 14px #000; }
.slide.pic { min-height: min(52vh, 24em); background: center / cover no-repeat; display: flex; align-items: flex-end; padding: 0; }
.slide.pic::before { background: linear-gradient(transparent 40%, rgba(5,4,10,.92)); opacity: 1; z-index: 0; }
.slide.pic p { position: relative; z-index: 1; padding: 1em 1.2em 1.1em; text-shadow: 0 2px 6px #000; }
.endcard .endart { display: block; width: calc(100% + 2 * clamp(14px, 3vw, 30px)); margin: calc(-1 * clamp(14px, 3vh, 26px)) calc(-1 * clamp(14px, 3vw, 30px)) .8em; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px 10px 0 0; border-bottom: 2px solid var(--gold); }
#inner { display: flex; align-items: center; gap: .6em; }
#inner .face { width: 3.4em; height: 3.4em; border-radius: 50%; object-fit: cover; border: 2px solid rgba(160,220,120,.7); box-shadow: 0 0 14px rgba(120,200,120,.45); flex: none; font-style: normal; }
#stagecard .face { display: block; width: 7em; height: 7em; margin: 0 auto .4em; border-radius: 50%; object-fit: cover; border: 3px solid #9ab85a; box-shadow: 0 0 30px rgba(160,220,80,.55); }
body.aiart .heart.full { background-image: url(/img/ai/h_full.png); }
body.aiart .heart.half { background-image: url(/img/ai/h_half.png); }
body.aiart .heart.empty { background-image: url(/img/ai/h_empty.png); }

/* ---------- Spielstände & Konto ---------- */
#saveind { position: absolute; right: max(14px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); opacity: 0; font-weight: 700; color: var(--gold2); text-shadow: 0 2px 6px #000; pointer-events: none; }
#saveind.show { animation: saveind 2.4s ease-out; }
@keyframes saveind { 0% { opacity: 0; transform: translateY(6px); } 15%, 70% { opacity: 1; transform: none; } 100% { opacity: 0; } }
body.coarse #saveind { bottom: auto; top: 5.2em; }
#panel.slotsP { width: min(880px, 100%); }
.slotlist { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin: .8em 0; text-align: left; }
.slotcard { border: 2px solid rgba(200,164,90,.35); border-radius: 10px; padding: .7em .8em; background: rgba(10,8,18,.5); display: flex; flex-direction: column; gap: .4em; }
.slotcard.active { border-color: var(--gold2); box-shadow: 0 0 16px rgba(200,164,90,.25); }
.slotcard .sh { display: flex; justify-content: space-between; align-items: baseline; }
.slotcard .sh b { font-family: 'Black Ops One', Impact, sans-serif; font-weight: 400; color: var(--gold2); letter-spacing: .06em; }
.slotcard .sb { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.slotcard .sb button { padding: .35em .8em; }
.slotcard .sb .del { margin-left: auto; opacity: .75; }
#panel .form { display: grid; gap: .6em; max-width: 22em; margin: .8em auto; text-align: left; }
#panel .form label { display: grid; gap: .25em; font-weight: 700; }
#panel .form input { font: inherit; padding: .5em .7em; border-radius: 8px; border: 2px solid rgba(200,164,90,.45); background: #120f1c; color: var(--text); }
#panel .form input:focus { outline: none; border-color: var(--gold2); }
#panel .err { color: #ff7a7a; margin: 0; }
#panel button.acc { font-size: .9em; background: rgba(20,16,32,.7); border-style: dashed; }
body.coarse #hud-clock { font-size: .82em; }
