/* Gaeste-Ansicht waehrend der Party (Startseite und Handy-Simulation auf der Testseite) */
  .live { position: relative; overflow: hidden; }
  /* Hintergrund-26 als eigene, ruhige Ebene (verhindert Flackern auf dem iPhone) */
  .live .bg26 { position: absolute; transform: translateZ(0); contain: strict; }
  .gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .gallery button { padding: 0; min-height: 0; border: 0; aspect-ratio: 1; background: #DDDDD6; }
  .gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .lightbox { position: fixed; inset: 0; z-index: 30; background: rgba(17,17,17,0.94); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px; }
  .lightbox img { max-width: 100%; max-height: 78vh; background: #FFFFFF; padding: 10px 10px 0; }
  .lightbox p { color: #F7F7F2; font-weight: 900; font-size: 20px; }
  .live .wrap { padding-top: max(14px, env(safe-area-inset-top)); padding-bottom: max(28px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 16px; }
  .live header { display: flex; align-items: center; gap: 10px; }
  .logo { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: var(--accent); font-weight: 900; font-size: 20px; letter-spacing: -0.04em; text-decoration: none; flex-shrink: 0; }
  .live header b { flex: 1; font-size: 16px; }
  .live header span { font-size: 14px; font-weight: 900; color: var(--muted); font-variant-numeric: tabular-nums; }
  .rulecard { background: var(--card); border: 3px solid var(--ink); padding: 18px 16px 20px; display: flex; flex-direction: column; gap: 12px; }
  .rulecard .rule { font-size: clamp(26px, 8vw, 40px); font-weight: 900; line-height: 1.05; letter-spacing: -0.03em; text-transform: uppercase; overflow-wrap: anywhere; }
  .timer { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
  .timer .big { font-size: 44px; font-weight: 900; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
  .bar { height: 8px; background: #DCDCD3; }
  .bar div { height: 8px; background: var(--ink); }
  .soon { background: var(--ink); color: var(--bg); padding: 28px 16px; text-align: center; display: flex; flex-direction: column; gap: 6px; }
  .soon b { font-size: 120px; line-height: 0.9; letter-spacing: -0.05em; color: var(--accent); font-variant-numeric: tabular-nums; }
  .act { width: 100%; min-height: 60px; font-size: 19px; }
  .act svg { flex-shrink: 0; }
  .done-btn[disabled] { opacity: 1; background: var(--ink); color: var(--bg); }
  .meta { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); font-weight: 600; }
  input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* Knoepfe zum Draufdruecken: harter Schatten, der beim Druecken verschwindet */
.live button:not(.ghost):not(.gallery button), .live .btn { box-shadow: 4px 4px 0 #111111; transition: transform .08s ease-out, box-shadow .08s ease-out, background-color .15s; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.live button:not(.ghost):not([disabled]):active, .live .btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 #111111; }
.live button[disabled] { box-shadow: none; }
.live .gallery button { box-shadow: none; transition: transform .12s; }
.live .gallery button:active { transform: scale(.94); }
.live .done-btn.is-done { animation: donePop .45s cubic-bezier(.2,.9,.3,1.3) both; box-shadow: none; }
@keyframes donePop { 0% { transform: scale(.9); } 50% { transform: scale(1.06); } 100% { transform: none; } }
.live .done-btn.primary:not([disabled]) { animation: doneWiggle 3.5s ease-in-out 2s infinite; }
@keyframes doneWiggle { 0%, 88%, 100% { transform: none; } 91% { transform: rotate(-1.5deg); } 94% { transform: rotate(1.5deg); } 97% { transform: rotate(-.8deg); } }
/* Konfetti beim "Geschafft" */
.burst { position: absolute; left: 50%; top: 50%; width: 0; height: 0; z-index: 5; pointer-events: none; }
.burst-p { position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; animation: burstP .9s cubic-bezier(.15,.7,.3,1) both; }
.burst-p:nth-child(3n) { width: 8px; height: 16px; }
@keyframes burstP { 0% { transform: translate(0, 0) rotate(0) scale(.4); opacity: 1; } 75% { opacity: 1; } 100% { transform: translate(var(--x), calc(var(--y) + 120px)) rotate(var(--r)) scale(1); opacity: 0; } }
/* Foto gesendet: kleine Bestaetigung fliegt nach oben weg */
.sent-fly { align-self: center; background: #111111; color: #E6FF2E; font-weight: 900; padding: 8px 14px; animation: sentFly 1.6s cubic-bezier(.3,.7,.3,1) both; pointer-events: none; }
@keyframes sentFly { 0% { transform: translateY(20px) scale(.8); opacity: 0; } 20% { transform: none; opacity: 1; } 70% { transform: translateY(-10px); opacity: 1; } 100% { transform: translateY(-80px) rotate(-6deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .burst, .sent-fly, .live .done-btn.primary:not([disabled]) { animation: none; display: none; } }

/* Layout: Inhalt scrollt, Knopfleiste bleibt unten stehen */
.live { height: 100%; display: flex; flex-direction: column; container-type: inline-size; background: var(--bg); }
.live-main { position: relative; z-index: 1; flex: 1; min-height: 0; overflow-y: auto; padding: max(14px, env(safe-area-inset-top)) 16px 16px; display: flex; flex-direction: column; gap: 14px; }
.live-main .rulecard { padding: 14px 14px 16px; gap: 10px; }
.live .rulecard .rule { font-size: clamp(19px, 6.6cqw, 30px); line-height: 1.12; letter-spacing: -0.02em; }
.live .timer .big { font-size: 36px; }
.live-bar { position: relative; z-index: 3; background: var(--bg); border-top: 3px solid var(--ink); padding: 12px 16px max(14px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; }
.bar-main { display: flex; gap: 10px; align-items: stretch; }
.bar-main .act { min-height: 58px; width: 100%; font-size: 18px; }
.bar-main .cam { width: auto; flex: 0 0 auto; padding: 0 16px; }
.bar-sub { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
.bar-sub button, .bar-sub .btn { min-height: 44px; font-size: 14px; padding: 0 6px; }
.bar-msg { font-weight: 700; font-size: 14px; text-align: center; }
.live-bar .sent-fly { position: absolute; left: 50%; top: -48px; transform: translateX(-50%); white-space: nowrap; }
/* Fenster von unten */
.scrim { position: absolute; inset: 0; z-index: 20; background: rgba(17,17,17,0.45); animation: fadeIn .2s ease-out both; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 21; background: var(--bg); border-top: 3px solid var(--ink); padding: 14px 16px max(18px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; max-height: 88%; overflow-y: auto; animation: sheetUp .25s cubic-bezier(.2,.8,.3,1) both; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sheet-full { position: absolute; inset: 0; z-index: 22; background: var(--bg); overflow-y: auto; animation: sheetUp .25s cubic-bezier(.2,.8,.3,1) both; }
.sheet-full .sheet-head { position: sticky; top: 0; background: var(--bg); padding: max(14px, env(safe-area-inset-top)) 16px 12px; border-bottom: 3px solid var(--ink); margin-bottom: 12px; z-index: 1; }
.lightbox { position: absolute; }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Oben: feste Statuszeile + Regel-Feld, das immer gleich gross bleibt */
.live-main { overflow: hidden; }
.live header span { color: var(--ink); }
.status { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 6px 10px; }
.status .st-round { font-weight: 900; font-size: 15px; }
.status .st-time { justify-self: end; font-size: 15px; font-variant-numeric: tabular-nums; }
.status .st-time b { font-size: 26px; font-weight: 900; letter-spacing: -0.02em; }
.status .bar { grid-column: 1 / -1; }
.live .rulecard { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: 12px; transition: background-color .3s, color .3s; }
.live .rulecard.dark { background: var(--ink); color: var(--bg); }
.rc-center { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; }
.rc-count { font-size: clamp(90px, 38cqw, 160px); line-height: 0.9; letter-spacing: -0.05em; color: var(--accent); font-variant-numeric: tabular-nums; }
.rc-new { font-size: clamp(30px, 10cqw, 44px); color: var(--accent); }
/* Unten: grosse Kacheln mit Erklaerung */
.live-bar { gap: 10px; }
.tile { display: flex; align-items: center; justify-content: flex-start; gap: 12px; min-height: 64px; padding: 8px 14px; text-align: left; width: 100%; }
.tile.big { min-height: 70px; }
.tile svg { flex-shrink: 0; }
.tl { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.tl b { font-size: 18px; font-weight: 900; }
.tl small { font-size: 13px; font-weight: 600; opacity: 0.75; line-height: 1.2; }
.tile.big .tl b { font-size: 21px; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile { min-width: 0; }
.tl { overflow: hidden; }
.done-btn.is-done[disabled] { background: var(--ink); color: var(--bg); opacity: 1; }
