/* SAUGFEST – Indoor-Spielplatz: kräftig, freundlich, gut lesbar. Menü: ../_sdk/menu.css */
:root { --ink: #1b2233; --ok: #48d27a; --bad: #ff4d5e; --gelb: #ffd23f; --safe-top: 0px; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #1b2233; color: #fff; font-family: system-ui, 'Segoe UI', sans-serif; -webkit-tap-highlight-color: transparent; user-select: none; }
#game { position: fixed; left: 0; top: var(--cv-cam-top, 0px); width: 100%; height: calc(100% - var(--cv-cam-top, 0px) - var(--cv-cam-bottom, 0px)); display: block; touch-action: none; }
[hidden] { display: none !important; }
#hud { position: fixed; inset: var(--cv-cam-top, 0px) 0 var(--cv-cam-bottom, 0px) 0; z-index: 20; pointer-events: none; container-type: size; font-weight: 900; }
html[data-stream][data-game-orientation=hoch] { --safe-top: 11cqh; }
html[data-facecam="oben"][data-game-orientation] { --safe-top: 0px; }
/* Zähler: runde, verspielte Plakette */
#counter { position: absolute; left: 50%; top: calc(var(--safe-top) + 12px); transform: translateX(-50%); display: grid; justify-items: center; gap: 2px; padding: 8px 22px 10px; border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(232,242,255,.94)); color: var(--ink); box-shadow: 0 6px 0 #ff8f3a, 0 10px 24px rgba(0,0,0,.35); min-width: 230px; }
#counter .lbl { font-size: 11px; letter-spacing: .18em; color: #5a6680; }
#c-num { font-size: 46px; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.cbar { width: 100%; height: 8px; border-radius: 4px; background: #d4def0; overflow: hidden; }
.cbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #48d27a, #3aa7ff); transition: width .3s; }
#counter small { font-size: 11px; color: #5a6680; font-weight: 800; }
#h-status { position: absolute; left: 50%; transform: translateX(-50%); top: calc(var(--safe-top) + 128px); display: flex; gap: 6px; }
#h-status span { padding: 3px 10px; border-radius: 20px; background: rgba(27,34,51,.85); font-size: 13px; }
#h-status .good { box-shadow: inset 0 0 0 2px var(--ok); } #h-status .bad { box-shadow: inset 0 0 0 2px var(--bad); }
#banner { position: absolute; left: 50%; top: 34cqh; transform: translate(-50%, -50%) scale(.92); display: grid; justify-items: center; gap: 6px; opacity: 0; transition: opacity .25s, transform .25s; max-width: min(60cqw, 680px); text-align: center; }
#banner.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
#banner b { font-size: 34px; text-shadow: 0 3px 0 #1b2233, 0 0 18px rgba(0,0,0,.5); }
#banner span { background: rgba(27,34,51,.85); border-radius: 20px; padding: 3px 14px; font-size: 14px; }
#kammer { position: absolute; inset: 0; display: grid; place-items: center; background: repeating-linear-gradient(90deg, rgba(10,10,14,.92) 0 46px, rgba(10,10,14,.55) 46px 58px); }
#kammer b { font-size: 34px; color: var(--bad); }
#dbg { position: absolute; right: 10px; bottom: 8px; font: 700 11px ui-monospace, monospace; color: #cfe; background: rgba(0,0,0,.45); padding: 3px 8px; border-radius: 6px; }
#dbg:empty { display: none; }
.hud-buttons { position: absolute; top: calc(var(--safe-top) + 10px); right: 10px; display: flex; flex-direction: column; gap: 6px; pointer-events: auto; }
.hud-buttons button { width: 42px; height: 42px; padding: 0; border: 0; border-radius: 12px; background: rgba(27,34,51,.85); color: #fff; font-size: 17px; cursor: pointer; }
.demo .hud-buttons, .obs .hud-buttons { display: none; }
html[data-game-orientation=hoch] #c-num { font-size: 36px; }
html[data-game-orientation=hoch] #counter { min-width: 190px; padding: 6px 16px 8px; }
html[data-game-orientation=hoch] #banner { max-width: 88cqw; } html[data-game-orientation=hoch] #banner b { font-size: 25px; }
#watermark { position: fixed; left: 50%; bottom: 8px; transform: translateX(-50%); z-index: 24; pointer-events: none; padding: 4px 12px; background: rgba(0,0,0,.6); font-size: 13px; font-weight: 800; }

/* Saugbeutel unter dem Zähler, Steuer-Hinweis */
#bag { position: absolute; left: 50%; transform: translateX(-50%); top: calc(var(--safe-top) + 112px); display: flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 14px; background: rgba(15,18,26,.82); font-size: 13px; }
#bag .bbar { width: 120px; height: 8px; border-radius: 4px; background: #2b3242; overflow: hidden; }
#bag .bbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #48d27a, #ffd23f, #ff4d5e); transition: width .2s; }
#bag.voll { animation: bagblink .5s steps(2) infinite; box-shadow: 0 0 0 2px #ff4d5e; }
@keyframes bagblink { 50% { opacity: .55; } }
#h-status { top: calc(var(--safe-top) + 146px); }
#hint { position: absolute; left: 50%; bottom: 14cqh; transform: translateX(-50%); padding: 6px 14px; border-radius: 16px; background: rgba(15,18,26,.82); font-size: 13px; white-space: nowrap; opacity: 0; transition: opacity .4s; }
#hint.on { opacity: 1; }
.demo #hint, .obs #hint, html[data-stream] #hint { display: none; }
html[data-game-orientation=hoch] #bag { top: calc(var(--safe-top) + 96px); }
html[data-game-orientation=hoch] #h-status { top: calc(var(--safe-top) + 128px); }
/* im Spiel kein Mauszeiger über dem Bild (Knöpfe und Menü behalten ihn) */
html.spielt #game { cursor: none; }

/* Siege + Uhr im Zähler, Teams-Leiste, Endkarte, Autopilot-Knopf */
#c-row { display: flex; gap: 10px; justify-content: center; font-size: 12px; color: #33405a; font-weight: 900; margin-top: 1px; }
#h-time.low { color: #e0303f; animation: bagblink .6s steps(2) infinite; }
#teams { position: absolute; left: 50%; transform: translateX(-50%); top: calc(var(--safe-top) + 146px); width: min(340px, 80cqw); padding: 4px 10px; border-radius: 12px; background: rgba(15,18,26,.8); }
#teams .row { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; white-space: nowrap; }
#teams .up { color: #48d27a; } #teams .down { color: #ff6b5b; } #teams .row b { color: #fff; font-size: 13px; }
#teams .tbar { height: 6px; border-radius: 3px; background: #ff6b5b; overflow: hidden; margin: 3px 0; } #teams .tbar i { display: block; height: 100%; width: 50%; background: #48d27a; transition: width .3s; }
#teams .tops { font-size: 10px !important; color: #cfd6e4; font-weight: 700; } #teams .tops span { overflow: hidden; text-overflow: ellipsis; max-width: 49%; }
#h-status { top: calc(var(--safe-top) + 196px) !important; }
#end { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
#end .card { width: min(460px, 92cqw); padding: 16px; border-radius: 18px; background: rgba(15,18,26,.94); box-shadow: 0 0 0 3px #48d27a, 0 18px 50px rgba(0,0,0,.6); display: grid; gap: 12px; text-align: center; }
#end.lose .card { box-shadow: 0 0 0 3px #ff6b5b, 0 18px 50px rgba(0,0,0,.6); }
#end .kicker { font-size: 21px; color: #48d27a; } #end.lose .kicker { color: #ff6b5b; }
#end .cells { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; } #end .cells div { display: grid; background: #222a3a; border-radius: 10px; padding: 6px 2px; } #end .cells b { font-size: 18px; } #end .cells span { font-size: 10px; color: #a9b3c7; }
#end .lists { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: left; } #end h3 { margin: 0 0 4px; font-size: 13px; } #end ol { margin: 0; padding-left: 18px; font-size: 13px; font-weight: 700; }
#end small { color: #a9b3c7; font-weight: 700; }
#autobtn.on { box-shadow: inset 0 0 0 2px #48d27a; }
html[data-game-orientation=hoch] #teams { top: calc(var(--safe-top) + 128px); }
html[data-game-orientation=hoch] #h-status { top: calc(var(--safe-top) + 178px) !important; }
/* Abstände: Zähler (mit Siege/Uhr) → Beutel → Teams → Status */
#bag { top: calc(var(--safe-top) + 132px) !important; }
#teams { top: calc(var(--safe-top) + 162px) !important; }
#h-status { top: calc(var(--safe-top) + 212px) !important; }
html[data-game-orientation=hoch] #bag { top: calc(var(--safe-top) + 116px) !important; }
html[data-game-orientation=hoch] #teams { top: calc(var(--safe-top) + 146px) !important; }
html[data-game-orientation=hoch] #h-status { top: calc(var(--safe-top) + 196px) !important; }
/* Hochformat: Team-Leiste rechts zwischen Geschenke-Liste (links) und Knöpfen (rechts), Beutel nicht am Zähler */
html[data-game-orientation=hoch] #bag { top: calc(var(--safe-top) + 128px) !important; }
html[data-game-orientation=hoch] #teams { top: calc(var(--safe-top) + 158px) !important; left: 36cqw; right: 12cqw; width: auto; transform: none; }
html[data-game-orientation=hoch] #h-status { top: calc(var(--safe-top) + 212px) !important; left: 62cqw; }
/* Hochformat: Einblendungen in der freien Fläche rechts neben der Geschenk-Anzeige */
html[data-game-orientation=hoch] #banner { left: 67cqw; top: 46cqh; max-width: 60cqw; }
html[data-game-orientation=hoch] #banner b { font-size: 21px; }
html[data-game-orientation=hoch] #banner span { font-size: 12px; }

/* Hochformat ohne Überlappung (iPhone, mit/ohne Stream-Rand): Team-Leiste endet vor der Knopfspalte (10px + 42px + Abstand),
   Einblendungen rechts neben der Geschenk-Anzeige (die endet bei höchstens 43cqw + Rand). */
#teams .tw { font-style: normal; }
html[data-game-orientation=hoch] #teams { right: 60px !important; }
html[data-game-orientation=hoch] #teams .tw { display: none; }
html[data-game-orientation=hoch] #banner { left: 74cqw; max-width: 46cqw; }
html[data-game-orientation=hoch] #banner { width: max-content; }
/* Stream-Hochformat: unten verdeckt TikTok 27 % – links ist zwischen Team-Leiste und Geschenk-Anzeige kein Platz für die
   Geschenke-Liste. Sie wandert deshalb nach rechts unten (über den TikTok-Rand), unter die Einblendungen. */
html[data-stream][data-game-orientation=hoch] #cv-feed { left: auto !important; right: 8px !important; top: auto !important; bottom: calc(27cqh + 6px) !important; width: min(200px, 50cqw) !important; flex-direction: column-reverse; }
/* Status rechtsbündig unter der Team-Leiste, damit er weder Geschenk-Anzeige noch Einblendungen trifft */
html[data-game-orientation=hoch] #h-status { left: auto; right: 8px; transform: none; top: calc(var(--safe-top) + 202px) !important; }
/* Beutel nie umbrechen (bei 375 px Breite rutschte „0 %“ sonst in eine zweite Zeile auf die Team-Leiste);
   Geschenk-Anzeige auf kurzen Bildschirmen erst unter der Team-Leiste beginnen lassen. */
#bag { white-space: nowrap; width: max-content; }
html[data-game-orientation=hoch] #cv-viewport #cv-gifts { top: max(calc(var(--cv-cam-top, 0px) + (100cqh - var(--cv-cam-top, 0px) - var(--cv-cam-bottom, 0px)) * .36), calc(var(--safe-top) + var(--cv-cam-top, 0px) + 204px)); }
/* Einblendungen nie über Status/Knöpfen: Mitte mindestens 280 px unter dem oberen Rand */
html[data-game-orientation=hoch] #banner { top: max(46cqh, calc(var(--safe-top) + 280px)); }
/* Querformat: Zähler ist mit Siege/Uhr ~128 px hoch – Beutel, Team-Leiste und Status rücken darunter, Einblendungen darunter */
html:not([data-game-orientation=hoch]) #bag { top: calc(var(--safe-top) + 146px) !important; }
html:not([data-game-orientation=hoch]) #teams { top: calc(var(--safe-top) + 176px) !important; }
html:not([data-game-orientation=hoch]) #h-status { top: calc(var(--safe-top) + 222px) !important; }
html:not([data-game-orientation=hoch]) #banner { top: max(34cqh, calc(var(--safe-top) + 300px)); }

/* ---- Karten, Effekte, Abstellkammer (Ausbau 18.11.) ---- */
/* Kino-Vignette über dem Spielbild (bei Stromausfall stärker) */
#vignette { position: fixed; left: 0; right: 0; top: var(--cv-cam-top, 0px); bottom: var(--cv-cam-bottom, 0px); z-index: 1; pointer-events: none; background: radial-gradient(ellipse at 50% 55%, rgba(0,0,0,0) 55%, rgba(0,0,0,.42) 100%); transition: background .8s; }
html.dunkel #vignette { background: radial-gradient(ellipse at 50% 60%, rgba(0,0,0,0) 30%, rgba(0,0,0,.75) 100%); }
html:not(.spielt) #vignette { display: none; }
/* Abblende beim Ortswechsel */
#fade { position: fixed; inset: 0; z-index: 30; background: #000; opacity: 0; pointer-events: none; transition: opacity .55s ease; }
#fade.on { opacity: 1; }
/* Abstellkammer: der Raum ist jetzt 3D – hier nur Schrift und Rand */
#kammer { background: radial-gradient(ellipse at 50% 50%, rgba(0,0,0,0) 45%, rgba(0,0,0,.6) 100%) !important; display: grid; place-items: end center; padding-bottom: 18cqh; }
#kammer[hidden] { display: none !important; }
#kammer b { font-size: 30px; color: #ff6b5b; text-shadow: 0 3px 0 #1b2233, 0 0 22px rgba(255,60,40,.6); animation: kshake .35s steps(2) 3; }
#kammer span { display: block; margin-top: 6px; padding: 4px 14px; border-radius: 16px; background: rgba(15,18,26,.82); font-size: 14px; text-align: center; }
#kammer em { font-style: normal; color: #ffd23f; font-size: 18px; }
@keyframes kshake { 50% { transform: translateX(4px) rotate(-1deg); } }
/* Turbo: Tempo-Linien vom Rand */
#speed { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: repeating-conic-gradient(from 0deg at 50% 55%, rgba(200,240,255,.0) 0deg 5deg, rgba(200,240,255,.22) 5.4deg 5.9deg, rgba(200,240,255,0) 6.3deg 11deg);
  -webkit-mask: radial-gradient(ellipse at 50% 55%, transparent 38%, #000 80%); mask: radial-gradient(ellipse at 50% 55%, transparent 38%, #000 80%); }
html.turbo #speed { opacity: 1; animation: speedspin .25s linear infinite; }
@keyframes speedspin { 50% { transform: scale(1.04) rotate(1.5deg); } }
/* kurzer Farbblitz (Gold, Großputz, Beutel, Kammer) */
#flash { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at 50% 55%, transparent 20%, var(--c, #fff) 120%); }
#flash.on { animation: flashk .7s ease-out; }
@keyframes flashk { 0% { opacity: .85; } 100% { opacity: 0; } }
/* Danke: Herzen steigen auf */
#hearts { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
#hearts i { position: absolute; bottom: 18%; font-style: normal; font-size: 30px; animation: heartup 2.4s ease-out forwards; }
@keyframes heartup { 0% { transform: translateY(0) scale(.5); opacity: 0; } 15% { opacity: 1; transform: translateY(-20px) scale(1.1); } 100% { transform: translateY(-46cqh) scale(.8) rotate(12deg); opacity: 0; } }
/* Einblendung springt auf */
#banner.on b { animation: bpop .45s cubic-bezier(.2,1.7,.4,1); }
@keyframes bpop { 0% { transform: scale(.4); } 100% { transform: scale(1); } }
#kammer b { display: none !important; }
#end-next { display: none !important; }   /* steht jetzt im 10-s-Timer (_sdk/rundentimer) */

/* Finale (letzte 45 s oder < 10 % übrig): Zähler pulsiert im Herzschlag, Rand wird dunkler – ohne Flackern */
html.finale #c-num { animation: finpuls 1.1s ease-in-out infinite; color: #ffd0d0; }
html.finale-hart #c-num { animation-duration: .62s; color: #ff8a8a; }
html.finale #h-time.low { animation: finpuls .62s ease-in-out infinite; }
@keyframes finpuls { 0%, 100% { transform: scale(1); } 18% { transform: scale(1.09); } 34% { transform: scale(1.02); } 48% { transform: scale(1.06); } }
html.finale #vignette { background: radial-gradient(ellipse at 50% 55%, rgba(0,0,0,0) 42%, rgba(40,0,0,.62) 100%); transition: background 1.5s; }
html.finale.dunkel #vignette { background: radial-gradient(ellipse at 50% 60%, rgba(0,0,0,0) 30%, rgba(20,0,0,.8) 100%); }
/* Team-Balken zuckt kurz in der Farbe des Teams, das gerade Punkte bekommt */
#teams.p-up { animation: tpup .5s ease-out; } #teams.p-down { animation: tpdown .5s ease-out; }
@keyframes tpup { 0% { box-shadow: 0 0 0 2px #48d27a, 0 0 18px #48d27a99; } 100% { box-shadow: none; } }
@keyframes tpdown { 0% { box-shadow: 0 0 0 2px #ff6b5b, 0 0 18px #ff6b5b99; } 100% { box-shadow: none; } }
/* Knappe Entscheidung auf der Endkarte */
#end.knapp #end-kicker { font-size: 1.15em; animation: finpuls .9s ease-in-out 3; display: inline-block; }
@media (prefers-reduced-motion: reduce) { html.finale #c-num, html.finale #h-time.low, #end.knapp #end-kicker { animation: none; } }

/* Filmkorn (Grusel-Look): sehr leicht, im Dunkeln etwas stärker; bei Qualität „niedrig“ und reduzierter Bewegung aus */
#grain { position: fixed; inset: 0; z-index: 2; pointer-events: none; background-image: var(--grain); background-size: 128px 128px; opacity: .045; mix-blend-mode: overlay; animation: grainmove .5s steps(4) infinite; }
html.dunkel #grain, html.finale #grain { opacity: .08; }
html:not(.spielt) #grain, html[data-quality=niedrig] #grain { display: none; }
@keyframes grainmove { 0% { background-position: 0 0; } 25% { background-position: -37px 21px; } 50% { background-position: 19px -43px; } 75% { background-position: -11px 57px; } 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { #grain { animation: none; } }

/* Politur 24.11.2026: Bindestrich-Wörter im Banner nicht trennen ("TURBO-SAUGER") */
#banner .nw { font-style: normal; white-space: nowrap; }
/* Hochformat ohne sichtbare Geschenk-Leiste (Handy, Demo): nichts nach rechts schieben, alles mittig */
html[data-game-orientation=hoch]:not(:has(#cv-gifts:not([hidden]))) #teams { left: 50% !important; right: auto !important; width: min(340px, 84cqw) !important; transform: translateX(-50%); }
html[data-game-orientation=hoch]:not(:has(#cv-gifts:not([hidden]))) #h-status { left: 50%; right: auto; transform: translateX(-50%); }
html[data-game-orientation=hoch]:not(:has(#cv-gifts:not([hidden]))) #banner { left: 50%; max-width: 88cqw; width: max-content; }

/* Politur 24.11.2026: Endkarte – sanft einblenden, Zahlen klarer, Bestenlisten als Kästen */
#end:not([hidden]) { background: radial-gradient(ellipse at center, transparent 30%, rgba(4,4,8,.5)); }
#end .card { background: linear-gradient(180deg, rgba(28,20,42,.96), rgba(12,11,20,.96)); animation: endin .45s cubic-bezier(.2,1.4,.4,1) both; }
#end .cells div { background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.07); }
#end .cells b { font: 700 20px "Space Grotesk", system-ui, sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
#end .cells span { text-transform: uppercase; letter-spacing: .1em; font-size: 9px; font-weight: 700; }
#end .lists > div { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); border-radius: 10px; padding: 8px 10px; }
#end-help b { color: #48d27a; } #end-sabo b { color: #ff6b5b; }
@keyframes endin { 0% { opacity: 0; transform: translateY(16px) scale(.94); } 100% { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #end .card { animation: none; } }

/* Politur 24.11.2026: Geschenk-Banner nicht über die Endkarte legen (Geschenk-Liste unten zeigt es trotzdem) */
#end:not([hidden]) ~ #banner { opacity: 0 !important; }
