/* Karaoke – Handy-Mikro (apps/mikro.php). Mobil zuerst: feste Fußleiste in
 * Daumenhöhe, ein Schritt pro Bildschirm, große Tippflächen (min. 48 px). */
:root { --c: #ff3d8b; --deep: #9d174d; --text: #fff; --muted: rgba(255,255,255,.72);
  --sat: env(safe-area-inset-top); --sab: env(safe-area-inset-bottom); }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: 'Inter', system-ui, sans-serif; color: var(--text); background: #0b0716; overflow: hidden;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; -webkit-text-size-adjust: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; touch-action: manipulation; }
.hidden { display: none !important; }
.bg { position: fixed; inset: 0; z-index: 0; transition: background .6s;
  background: radial-gradient(130% 60% at 50% -5%, color-mix(in srgb, var(--c) 60%, transparent), transparent 70%),
              radial-gradient(100% 50% at 50% 110%, color-mix(in srgb, var(--deep) 85%, transparent), transparent 70%), #0b0716; }
.bg::after { content: ''; position: absolute; inset: 0; opacity: .2;
  background-image: radial-gradient(rgba(255,255,255,.55) 1px, transparent 1.4px); background-size: 22px 22px;
  mask-image: linear-gradient(180deg, #000, transparent 65%); -webkit-mask-image: linear-gradient(180deg, #000, transparent 65%); }

.screen { position: fixed; inset: 0; z-index: 1; display: flex; flex-direction: column; height: 100dvh; animation: in .35s cubic-bezier(.2,.8,.2,1); }
@keyframes in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.head { flex: none; display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 8px; padding: calc(var(--sat) + 10px) 16px 6px; min-height: 64px; }
.head .brand { grid-column: 1 / 3; }
.body { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 10px 20px 18px; }
.body.center { justify-content: center; }
.foot { flex: none; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 18px calc(var(--sab) + 16px); }
.brand { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; }
.brand b { color: var(--c); }
.chip { justify-self: end; display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 999px; font-weight: 800; font-size: 15px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); }
.chip .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--c); box-shadow: 0 0 12px var(--c); }
.back { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.12); font-size: 26px; line-height: 1; display: grid; place-items: center; }
.steps { justify-self: center; display: flex; gap: 8px; }
.steps i { width: 26px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.2); }
.steps i.on { background: var(--c); box-shadow: 0 0 10px var(--c); }

h1 { font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(26px, 8vw, 34px); text-align: center; line-height: 1.12; }
.lead { color: var(--muted); font-size: 17px; text-align: center; max-width: 360px; line-height: 1.4; }
.lead b { color: var(--text); }
.emoji-hero { font-size: 72px; line-height: 1; animation: bob 2.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-4deg); } }

.orb { position: relative; flex: none; width: min(42vw, 30dvh, 180px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  font-size: min(20vw, 14dvh, 86px); line-height: 1; background-size: cover; background-position: center;
  background-image: radial-gradient(circle at 35% 30%, rgba(255,255,255,.55), color-mix(in srgb, var(--c) 85%, #fff) 30%, var(--c) 55%, var(--deep));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 70%, #fff), 0 18px 50px color-mix(in srgb, var(--c) 45%, transparent); transition: transform .08s linear; }
.orb.big { width: min(52vw, 32dvh, 220px); font-size: min(24vw, 15dvh, 104px); }
.orb .ring { position: absolute; inset: -14px; border-radius: 50%; border: 3px solid var(--c); opacity: 0; pointer-events: none; }
.mic-badge { position: absolute; right: -4px; bottom: -4px; width: 56px; height: 56px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 28px;
  box-shadow: 0 6px 18px rgba(0,0,0,.35); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.12); } }

input[type=text] { width: 100%; max-width: 420px; font: 700 24px 'Bricolage Grotesque', sans-serif; color: #fff; padding: 16px 18px; border-radius: 20px; -webkit-appearance: none; appearance: none;
  background: rgba(255,255,255,.12); border: 2px solid rgba(255,255,255,.22); outline: none; text-align: center; user-select: text; -webkit-user-select: text; }
input[type=text]:focus { border-color: var(--c); background: rgba(255,255,255,.16); }
.link { color: var(--muted); font-weight: 800; font-size: 15px; padding: 10px 14px; text-decoration: underline; text-underline-offset: 4px; min-height: 44px; }
.colors { display: flex; gap: 14px; }
.colors button { width: 50px; height: 50px; border-radius: 50%; border: 3px solid transparent; position: relative; }
.colors button.on { border-color: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.22); }
.colors button:disabled { opacity: .25; }
.colors button:disabled::after { content: '✕'; position: absolute; inset: 0; display: grid; place-items: center; font-weight: 900; color: #000; }

/* Schritt 2 */
.selfie-card { width: 100%; max-width: 440px; display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: 24px; text-align: left;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 75%, #fff), var(--c) 55%, var(--deep));
  box-shadow: 0 14px 34px color-mix(in srgb, var(--c) 40%, transparent), inset 0 2px 0 rgba(255,255,255,.4); color: #1a0b14; position: relative; overflow: hidden; }
.selfie-card::after { content: '✨'; position: absolute; right: 14px; top: 8px; font-size: 22px; animation: bob 2s ease-in-out infinite; }
.selfie-card:active, .mine:active, .animals button:active { transform: scale(.98); }
.selfie-icon { width: 64px; height: 64px; flex: none; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 34px; box-shadow: 0 6px 16px rgba(0,0,0,.2); }
.selfie-text b { display: block; font-family: 'Bricolage Grotesque', sans-serif; font-size: 22px; }
.selfie-text small { font-size: 14px; font-weight: 800; opacity: .75; }
.mine { width: 100%; max-width: 440px; display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 22px; text-align: left;
  background: rgba(255,255,255,.1); border: 2px solid rgba(255,255,255,.2); }
.mine.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 25%, transparent); }
.mine-img { width: 56px; height: 56px; flex: none; border-radius: 50%; background-size: cover; background-position: center; box-shadow: 0 0 0 3px #fff; }
.mine b { display: block; font-family: 'Bricolage Grotesque', sans-serif; font-size: 19px; }
.mine small { color: var(--muted); font-weight: 700; }
.or { color: var(--muted); font-weight: 800; margin-top: 6px; }
.animals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: 100%; max-width: 440px; }
.animals button { aspect-ratio: 1; border-radius: 22px; font-size: clamp(34px, 10vw, 44px); background: rgba(255,255,255,.09); border: 3px solid transparent; }
.animals button.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 30%, transparent); }

.tip { display: flex; gap: 12px; align-items: flex-start; max-width: 380px; padding: 14px 16px; border-radius: 18px; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.15); font-size: 16px; line-height: 1.4; }
.tip span:first-child { font-size: 22px; }

.btn { width: 100%; max-width: 440px; border: 0; color: #1a0b14; font: 700 21px 'Bricolage Grotesque', sans-serif; padding: 16px; border-radius: 22px; min-height: 58px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 65%, #fff), var(--c));
  box-shadow: 0 12px 30px color-mix(in srgb, var(--c) 40%, transparent), inset 0 2px 0 rgba(255,255,255,.5); }
.btn:active { transform: translateY(2px) scale(.99); }
.btn:disabled { opacity: .55; }
.btn.ghost { background: rgba(255,255,255,.1); color: #fff; box-shadow: none; border: 1px solid rgba(255,255,255,.2); font-size: 17px; min-height: 52px; padding: 12px; }
.btn.big { font-size: 25px; min-height: 72px; }
.row { display: flex; gap: 10px; width: 100%; max-width: 440px; }

/* Live */
.status { font-size: 14px; font-weight: 800; padding: 7px 12px; border-radius: 999px; background: rgba(0,0,0,.3); display: inline-flex; gap: 7px; align-items: center; grid-column: 1 / 3; justify-self: start; }
.status i { width: 9px; height: 9px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 10px #4ade80; }
.status.bad i { background: #f87171; box-shadow: 0 0 10px #f87171; }
.live-name { font-family: 'Bricolage Grotesque', sans-serif; font-size: 28px; font-weight: 700; text-align: center; }
.meter { width: min(78vw, 340px); height: 14px; border-radius: 999px; background: rgba(255,255,255,.12); overflow: hidden; flex: none; }
.meter i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #fff, var(--c)); transition: width .06s linear; }
.note { font-family: 'Bricolage Grotesque', sans-serif; font-size: 36px; font-weight: 700; height: 42px; line-height: 42px; text-shadow: 0 0 24px var(--c); flex: none; }
.card { width: 100%; max-width: 440px; text-align: center; padding: 16px 18px; border-radius: 22px; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.14); }
.card .big { font-family: 'Bricolage Grotesque', sans-serif; font-size: 22px; font-weight: 700; }
.card .small { color: var(--muted); font-weight: 700; margin-top: 4px; font-size: 15px; }
.card.check { border: 2px dashed color-mix(in srgb, var(--c) 70%, #fff); animation: pulse 1.8s ease-in-out infinite; }
.card.check.ok { border-style: solid; border-color: #4ade80; animation: none; }
.score { font-family: 'Bricolage Grotesque', sans-serif; font-size: 44px; font-weight: 700; color: var(--c); text-shadow: 0 0 20px color-mix(in srgb, var(--c) 60%, transparent); }
.help { text-align: left; max-width: 360px; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; font-size: 16px; line-height: 1.35; }
.help b { color: var(--c); }

/* Fotobox */
.booth { position: fixed; inset: 0; z-index: 10; display: flex; flex-direction: column; height: 100dvh; background: #07040f; animation: in .3s ease; }
.booth-head { flex: none; display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; padding: calc(var(--sat) + 10px) 14px 6px; }
.booth-title { text-align: center; font-family: 'Bricolage Grotesque', sans-serif; font-size: 22px; font-weight: 700; }
.booth-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 8px; }
.viewer { position: relative; width: min(86vw, 52dvh, 420px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: #000;
  box-shadow: 0 0 0 5px var(--c), 0 0 60px color-mix(in srgb, var(--c) 50%, transparent); }
.viewer canvas { width: 100%; height: 100%; display: block; }
#video { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.countdown { position: absolute; inset: 0; display: grid; place-items: center; font-family: 'Bricolage Grotesque', sans-serif; font-size: 140px; font-weight: 700; color: #fff;
  text-shadow: 0 0 30px rgba(0,0,0,.6); animation: cd 1s ease-out infinite; }
@keyframes cd { from { transform: scale(1.4); opacity: 0; } 20% { opacity: 1; } to { transform: scale(.8); opacity: .3; } }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.flash.go { animation: flash .5s ease-out; }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }
.effects { flex: none; display: flex; gap: 10px; overflow-x: auto; padding: 8px 16px 4px; scrollbar-width: none; justify-content: safe center; }
.effects::-webkit-scrollbar { display: none; }
.effects button { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 10px; border-radius: 18px; min-width: 72px;
  background: rgba(255,255,255,.08); border: 2px solid transparent; font-weight: 800; font-size: 13px; }
.effects button span { font-size: 28px; line-height: 1; }
.effects button.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 28%, transparent); }
.booth-foot { flex: none; padding: 14px 18px calc(var(--sab) + 18px); }
.shoot-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.shutter { width: 84px; height: 84px; border-radius: 50%; border: 5px solid #fff; display: grid; place-items: center; justify-self: center; }
.shutter i { width: 64px; height: 64px; border-radius: 50%; background: var(--c); box-shadow: 0 0 24px var(--c); transition: transform .15s; }
.shutter:active i { transform: scale(.85); }
.side { justify-self: center; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 26px; min-width: 64px; min-height: 56px; }
.side small { font-size: 12px; font-weight: 800; color: var(--muted); }
.review-row { display: flex; gap: 10px; max-width: 440px; margin: 0 auto; }

.paused-mic { position: fixed; inset: 0; z-index: 9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px;
  background: rgba(7,4,15,.94); text-align: center; }
.toast { position: fixed; left: 50%; top: calc(var(--sat) + 14px); transform: translate(-50%, -150%); z-index: 20; opacity: 0; visibility: hidden; padding: 12px 18px; border-radius: 16px;
  background: rgba(15,10,30,.95); border: 1px solid rgba(255,255,255,.2); font-weight: 800; max-width: 90vw; text-align: center;
  transition: transform .35s, opacity .25s, visibility 0s .35s; }
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition: transform .35s, opacity .25s, visibility 0s; }
@media (max-height: 640px) { .body { gap: 10px; } .emoji-hero { font-size: 54px; } .btn.big { min-height: 62px; font-size: 22px; } }
/* Zurück-Knopf auf Schritt 1 unsichtbar, aber Platz halten (sonst rutschen die Schritt-Punkte) */
.head .back.hidden { display: grid !important; visibility: hidden; }

/* Party-Name, damit Gäste sehen, dass sie mit der richtigen Party verbunden sind */
.party-tag { padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); color: var(--muted); font-size: 15px; text-align: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.party-tag b { color: #fff; }
/* Kleine Handys: nichts stauchen, bei Überlänge oben beginnen statt oben abschneiden */
.party-tag, .orb, .live-name, .meter, .card { flex: none; }
.body.center { justify-content: safe center; }

/* =====================================================================
 * Erwachsener Look (wie Landingpage und Bildschirm): ruhig, flach,
 * Spielerfarbe nur als Akzent. Überschreibt den verspielten Stil oben.
 * ===================================================================== */
body { background: #0e0c11; font-weight: 500; }
.bg { background: radial-gradient(90% 45% at 50% -5%, color-mix(in srgb, var(--c) 22%, transparent), transparent 70%), #0e0c11; }
.bg::after { display: none; }
h1 { font-weight: 800; letter-spacing: -.02em; }
.brand { letter-spacing: -.01em; text-transform: none; font-weight: 800; font-size: 17px; }
.chip, .status { font-weight: 600; border-radius: 10px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); }
.chip .dot, .status i, .steps i.on { box-shadow: none; }
.back { border-radius: 10px; background: rgba(255,255,255,.06); }
.emoji-hero { display: none; }
.orb { background-image: none; background-color: color-mix(in srgb, var(--c) 22%, #16131b); box-shadow: 0 0 0 3px var(--c); }
.mic-badge { animation: none; box-shadow: none; font-size: 26px; }
input[type=text] { font-family: 'Inter', sans-serif; font-weight: 600; border-radius: 12px; background: #16131b; border: 1px solid rgba(255,255,255,.14); }
.link { font-weight: 600; }
.selfie-card { background: #16131b; color: #f3f0f6; border: 1px solid rgba(255,255,255,.12); border-left: 3px solid var(--c); box-shadow: none; border-radius: 14px; }
.selfie-card::after { display: none; }
.selfie-icon { background: color-mix(in srgb, var(--c) 18%, #0e0c11); box-shadow: none; font-size: 28px; }
.selfie-text small { font-weight: 500; opacity: .7; }
.mine { border-radius: 14px; background: #16131b; border: 1px solid rgba(255,255,255,.12); }
.or { font-weight: 600; }
.animals button { border-radius: 14px; background: #16131b; border: 2px solid transparent; }
.tip { border-radius: 12px; background: #16131b; border: 1px solid rgba(255,255,255,.1); font-weight: 500; }
.tip span:first-child { display: none; }
.btn { font-family: 'Inter', sans-serif; font-weight: 700; border-radius: 12px; background: var(--c); box-shadow: none; }
.btn.ghost { border-radius: 12px; background: transparent; }
.btn.big { font-size: 21px; min-height: 62px; }
.meter { height: 8px; }
.meter i { background: var(--c); }
.card { border-radius: 14px !important; }
.party-tag { border-radius: 10px; background: rgba(255,255,255,.05); font-family: 'Inter', sans-serif; }
.toast { border-radius: 12px !important; }
.card.check { border: 1px solid rgba(255,255,255,.14) !important; border-left: 3px solid var(--c) !important; background: #16131b !important; }

/* Live-Kopf: Status links, rechts Farbpunkt + dezente Knöpfe */
.live-head { display: flex; justify-content: space-between; }
.live-actions { display: flex; align-items: center; gap: 6px; }
.chip.dot-only { padding: 9px; }
.hbtn { font: 600 14px 'Inter', sans-serif; color: var(--muted); padding: 8px 11px; border-radius: 10px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); min-height: 36px; }
.hbtn:active { background: rgba(255,255,255,.12); }

/* Touch-Sperre */
.lock { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 14px;
  padding: 0 22px calc(var(--sab) + 22px); touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.lock-text { color: var(--muted); font-size: 13px; text-align: center; max-width: 300px; opacity: .8; }
.lock-btn { position: relative; overflow: hidden; width: 100%; max-width: 440px; min-height: 54px; border-radius: 12px; border: 1px solid rgba(255,255,255,.16);
  background: rgba(22,19,27,.9); color: #f3f0f6; font: 600 15px 'Inter', sans-serif; touch-action: none; }
.lock-fill { position: absolute; inset: 0; width: 0; background: color-mix(in srgb, var(--c) 45%, transparent); }
.lock-label { position: relative; }
body.locked { overscroll-behavior: none; }
/* Farbe nur als Punkt zeigen, nicht als Wort */
.chip .colorName { display: none; }
.chip { padding: 9px; }

/* Sperre aufgeräumt: ersetzt die Fußleiste, nichts scheint durch */
body.locked #s-live .foot { visibility: hidden; }
body.locked .live-actions .hbtn { visibility: hidden; }
.lock { gap: 0; padding-bottom: calc(var(--sab) + 16px); }
.lock-text { display: none; }
.lock-btn { min-height: 48px; max-width: 320px; border-radius: 999px; background: rgba(22,19,27,.95); border: 1px solid rgba(255,255,255,.12);
  color: var(--muted); font-size: 14px; outline: none; -webkit-tap-highlight-color: transparent; }
.lock-btn:focus, .lock-btn:focus-visible { outline: none; }
/* Beim Singen kompakter, damit die Lied-Karte vollständig sichtbar bleibt */
body.locked #s-live .orb.big { width: min(38vw, 22dvh, 170px); font-size: min(18vw, 10dvh, 80px); }
body.locked #s-live .body { gap: 10px; }

/* Fernbedienung Liedauswahl */
.ctl { width: 100%; max-width: 440px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ctl-row { display: flex; gap: 10px; width: 100%; }
.ctl-nav { flex: none; width: 62px; min-height: 62px; border-radius: 12px; background: #16131b; border: 1px solid rgba(255,255,255,.14); font-size: 30px; color: #f3f0f6; }
.ctl-nav:active { background: rgba(255,255,255,.12); }
.ctl-go { flex: 1; }
.ctl-back { min-height: 36px; padding: 6px 10px; font-size: 14px; }

.ctl-search { display: flex; gap: 8px; width: 100%; margin-bottom: 4px; }
.ctl-search input { flex: 1; min-width: 0; font: 600 18px 'Inter', sans-serif; color: #fff; padding: 14px 14px; border-radius: 12px;
  background: #16131b; border: 1px solid var(--c); outline: none; -webkit-appearance: none; user-select: text; -webkit-user-select: text; }
.ctl-x { flex: none; width: 52px; border-radius: 12px; background: #16131b; border: 1px solid rgba(255,255,255,.14); color: var(--muted); font-size: 18px; }
.ctl-lupe { display: grid; place-items: center; }

.ctl-row.three > *, .ctl-row.two > * { flex: 1; min-width: 0; padding: 12px 6px; font-size: 16px; }
.ctl-opts { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 4px; }
.mseg { display: flex; width: 100%; padding: 3px; border-radius: 12px; background: #0e0c11; border: 1px solid rgba(255,255,255,.12); }
.mseg button { flex: 1; padding: 9px 4px; border-radius: 9px; font: 600 14px 'Inter', sans-serif; color: var(--muted); }
.mseg button.on { background: #f3f0f6; color: #0e0c11; }
#ctlPause { gap: 10px; }
.head .brand { display: flex; align-items: center; gap: 9px; }
.app-icon { border-radius: 7px; flex: none; }
