/* LADENSCHLUSS – dunkler Markt bei Nacht, Anzeigen wie Kassenbon und Regalschild (Crowdvio-Stil: harte Versatzschatten). Menü: ../_sdk/menu.css */
:root { --ink: #15171d; --ok: #48d27a; --bad: #ff5a4d; --gelb: #ffd23f; --papier: #f3efe3; --safe-top: 0px; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0b0c10; 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; }
html.spielt #game { cursor: none; }

/* Zähler = Kassenbon */
#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; min-width: 236px;
  background: var(--papier); color: var(--ink); border-radius: 4px; box-shadow: 5px 5px 0 #ff5a4d, 0 12px 26px rgba(0,0,0,.45);
  -webkit-mask: radial-gradient(circle 5px at 50% 100%, transparent 98%, #000) 0 0 / 14px 100% repeat-x; mask: radial-gradient(circle 5px at 50% 100%, transparent 98%, #000) 0 0 / 14px 100% repeat-x; padding-bottom: 14px; }
#counter .lbl { font-size: 11px; letter-spacing: .2em; color: #6a665c; font-family: ui-monospace, 'Consolas', monospace; }
#c-num { font-size: 46px; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.cbar { width: 100%; height: 7px; border-radius: 2px; background: #d9d3c2; overflow: hidden; }
.cbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #48d27a, #b6e34a); transition: width .3s; }
#counter small { font-size: 11px; color: #6a665c; font-weight: 800; font-family: ui-monospace, 'Consolas', monospace; }
#c-row { display: flex; gap: 12px; justify-content: center; font-size: 12px; color: #33302a; margin-top: 1px; }
#h-time.low { color: #d8281e; animation: blink .6s steps(2) infinite; }
@keyframes blink { 50% { opacity: .5; } }

/* Einkaufswagen-Anzeige */
#cartbox { position: absolute; left: 50%; transform: translateX(-50%); top: calc(var(--safe-top) + 150px); display: flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 10px; background: rgba(15,17,22,.86); box-shadow: 3px 3px 0 rgba(0,0,0,.5); font-size: 14px; white-space: nowrap; }
#cartbox b { font-size: 17px; font-variant-numeric: tabular-nums; } #cartbox em { font-style: normal; opacity: .5; margin: 0 2px; }
#cart-chips { display: flex; gap: 4px; } #cart-chips:empty { display: none; }
#cart-chips i { font-style: normal; font-size: 12px; padding: 1px 6px; border-radius: 6px; background: color-mix(in srgb, var(--c) 35%, #111); box-shadow: inset 0 0 0 1.5px var(--c); }
#cartbox.voll { box-shadow: 0 0 0 2px #ffd23f, 3px 3px 0 rgba(0,0,0,.5); animation: blink .7s steps(2) infinite; }
#cartbox.riesig .ico { transform: scale(1.35); display: inline-block; }

/* Teams */
#teams { position: absolute; left: 50%; transform: translateX(-50%); top: calc(var(--safe-top) + 186px); width: min(340px, 80cqw); padding: 4px 10px; border-radius: 10px; background: rgba(15,17,22,.84); }
#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 .tw { font-style: normal; }
#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%; }
#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; } }

#h-status { position: absolute; left: 50%; transform: translateX(-50%); top: calc(var(--safe-top) + 240px); display: flex; gap: 6px; }
#h-status span { padding: 3px 10px; border-radius: 20px; background: rgba(15,17,22,.86); 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: max(40cqh, calc(var(--safe-top) + 300px)); 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: 3px 3px 0 #000, 0 0 18px rgba(0,0,0,.6); }
#banner.on b { animation: bpop .45s cubic-bezier(.2,1.7,.4,1); }
@keyframes bpop { 0% { transform: scale(.4); } 100% { transform: scale(1); } }
#banner span { background: rgba(15,17,22,.86); border-radius: 20px; padding: 3px 14px; font-size: 14px; }

/* Durchsage-Untertitel (wie aus dem Deckenlautsprecher) */
#subtitle { position: absolute; left: 50%; bottom: 22cqh; transform: translateX(-50%); max-width: min(80cqw, 640px); padding: 6px 16px; border-radius: 8px; background: rgba(0,0,0,.72); color: #e8e2cf; font: italic 700 15px Georgia, 'Times New Roman', serif; text-align: center; opacity: 0; transition: opacity .6s; letter-spacing: .02em; }
#subtitle.on { opacity: 1; }

#hint { position: absolute; left: 50%; bottom: calc(14cqh + 48px); transform: translateX(-50%); padding: 6px 14px; border-radius: 16px; background: rgba(15,17,22,.86); 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; }
#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(15,17,22,.86); color: #fff; font-size: 17px; cursor: pointer; }
.demo .hud-buttons, .obs .hud-buttons { display: none; }
#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; }

/* Endkarte */
#end { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
#end .card { width: min(460px, 92cqw); padding: 16px; border-radius: 12px; background: rgba(15,17,22,.95); box-shadow: 0 0 0 3px #48d27a, 6px 6px 0 3px #000; display: grid; gap: 12px; text-align: center; }
#end.lose .card { box-shadow: 0 0 0 3px #ff6b5b, 6px 6px 0 3px #000; }
#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: #232733; border-radius: 8px; 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.knapp #end-kicker { animation: finpuls .9s ease-in-out 3; display: inline-block; }

/* Bildwirkung */
#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% 50%, rgba(0,0,0,0) 50%, rgba(0,0,0,.5) 100%); transition: background .8s; }
html.dunkel #vignette { background: radial-gradient(ellipse at 50% 55%, rgba(0,0,0,0) 26%, rgba(0,0,0,.82) 100%); }
html:not(.spielt) #vignette { background: radial-gradient(ellipse at 50% 50%, rgba(0,0,0,0) 35%, rgba(0,0,0,.6) 100%); }
#fade { position: fixed; inset: 0; z-index: 30; background: #000; opacity: 0; pointer-events: none; transition: opacity .55s ease; } #fade.on { opacity: 1; }
#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,.18) 5.4deg 5.9deg, rgba(200,240,255,0) 6.3deg 11deg); -webkit-mask: radial-gradient(ellipse at 50% 55%, transparent 40%, #000 82%); mask: radial-gradient(ellipse at 50% 55%, transparent 40%, #000 82%); }
html.turbo #speed { opacity: 1; animation: speedspin .25s linear infinite; }
@keyframes speedspin { 50% { transform: scale(1.04) rotate(1.5deg); } }
#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: .8; } 100% { opacity: 0; } }
#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; } }
html.finale #c-num { animation: finpuls 1.1s ease-in-out infinite; color: #b3261e; } html.finale-hart #c-num { animation-duration: .62s; }
@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; }
#grain { position: fixed; inset: 0; z-index: 2; pointer-events: none; opacity: .06; mix-blend-mode: overlay; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); animation: grainmove .5s steps(4) infinite; }
html.dunkel #grain, html.finale #grain { opacity: .1; }
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, html.finale #c-num, #end.knapp #end-kicker { animation: none; } }

/* Hochformat (Handy / TikTok 9:16): Zähler kleiner, Wagen + Team-Leiste rechts neben der Geschenk-Anzeige */
html[data-game-orientation=hoch] #c-num { font-size: 36px; }
html[data-game-orientation=hoch] #counter { min-width: 190px; padding: 6px 16px 12px; }
html[data-game-orientation=hoch] #cartbox { top: calc(var(--safe-top) + 132px); font-size: 13px; }
html[data-game-orientation=hoch] #teams { top: calc(var(--safe-top) + 168px); left: 36cqw; right: 60px; width: auto; transform: none; }
html[data-game-orientation=hoch] #teams .tw { display: none; }
html[data-game-orientation=hoch] #h-status { left: auto; right: 8px; transform: none; top: calc(var(--safe-top) + 216px); }
html[data-game-orientation=hoch] #banner { left: 70cqw; top: max(46cqh, calc(var(--safe-top) + 280px)); max-width: 54cqw; width: max-content; }
html[data-game-orientation=hoch] #banner b { font-size: 21px; } html[data-game-orientation=hoch] #banner span { font-size: 12px; }
html[data-game-orientation=hoch] #subtitle { bottom: 30cqh; font-size: 13px; }
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) + 214px)); }
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; }
html[data-stream][data-game-orientation=hoch] #subtitle { bottom: 34cqh; }
/* Hochformat-Korrektur: Einblendung mittig unter der Geschenk-Liste (vorher rechts abgeschnitten), Hinweise umbrechen */
html[data-game-orientation=hoch] #banner { left: 50%; top: 66cqh; max-width: 92cqw; width: auto; }
html[data-game-orientation=hoch] #hint { white-space: normal; width: max-content; max-width: 90cqw; text-align: center; }
html[data-game-orientation=hoch] #c-level { white-space: nowrap; font-size: 10px; }

/* Schluss-Countdown: alles eingeräumt, Chat hat 10 Sekunden */
#last { position: absolute; left: 50%; top: max(47cqh, calc(var(--safe-top) + 330px)); transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 4px; pointer-events: none; text-align: center; }
#last .t1 { white-space: nowrap; font-size: 20px; color: #48d27a; text-shadow: 2px 2px 0 #000; letter-spacing: .04em; }
#last b { font-size: 92px; line-height: .95; color: #fff; text-shadow: 4px 4px 0 #000, 0 0 30px rgba(72,210,122,.55); font-variant-numeric: tabular-nums; }
#last b.tick { animation: lastpop .35s cubic-bezier(.2,1.7,.4,1); }
#last.eng b { color: #ff6b5b; text-shadow: 4px 4px 0 #000, 0 0 30px rgba(255,107,91,.6); }
#last .t2 { background: rgba(15,17,22,.86); border-radius: 20px; padding: 4px 14px; font-size: 14px; color: #ffb0a6; }
#last .lbar { width: 220px; height: 8px; border-radius: 4px; background: rgba(0,0,0,.55); overflow: hidden; box-shadow: 0 0 0 2px #000; }
#last .lbar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #ff6b5b, #ffd23f 40%, #48d27a); }
@keyframes lastpop { 0% { transform: scale(1.5); } 100% { transform: scale(1); } }
html[data-game-orientation=hoch] #last { top: max(65cqh, calc(var(--safe-top) + 420px)); }
html[data-game-orientation=hoch] #last b { font-size: 70px; } html[data-game-orientation=hoch] #last .t1 { font-size: 16px; } html[data-game-orientation=hoch] #last .t2 { font-size: 12px; max-width: 86cqw; }
/* Querformat: Geschenk-Leiste nur in der linken Hälfte, damit Zähler, Wagen und Team-Leiste in der Mitte frei stehen */
html:not([data-game-orientation=hoch]) #cv-viewport #cv-gifts[data-gift-layout=strip] { width: calc(50cqw - 150px); }
html:not([data-game-orientation=hoch]) #cv-feed { max-width: calc(50cqw - 190px); }

/* 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(30,24,22,.96), rgba(13,13,17,.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; }
