/* ---------- Handy ---------- */
body.player { min-height: 100dvh; overscroll-behavior: none; }
#app { min-height: 100dvh; }
.center { text-align: center; }
.muted { color: var(--ink2); }

.home { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; padding: 24px 16px 30px; gap: 18px; }
.home-logo { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.home-logo .mark { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(180deg, #6fd0f6, #29a8e0); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), 0 8px 16px -8px rgba(41, 168, 224, .8); }
.home-logo .word { font-size: 38px; font-weight: 900; }
.home-logo .word b { color: #9aa1a8; } .home-logo .word i { color: var(--accent); font-style: normal; }
.join-form { width: min(470px, 100%); display: flex; flex-direction: column; gap: 10px; padding: 20px; }
.lbl { font-size: 14px; font-weight: 900; color: var(--ink2); text-transform: uppercase; margin-top: 6px; }
.host-link { color: var(--ink2); font-size: 15px; }

/* Figuren-Editor (Mii) */
.editor { display: flex; flex-direction: column; gap: 10px; }
.ed-stage { position: relative; display: flex; justify-content: center; padding: 14px 0 0; border-radius: 22px; background: radial-gradient(circle at 50% 30%, #fff, #e8ecef 75%); border: 2px solid var(--line2); }
.ed-stage .av { --s: 170px !important; }
.mii-stage { padding-bottom: 8px; overflow: hidden; }
.mii-empty { width: 120px; height: 120px; margin: 18px 0 22px; border-radius: 50%; display: grid; place-items: center; color: var(--accent); background: #fff; border: 3px dashed var(--line); }
.mii-open-btn { margin-top: 2px; }
.mii-hint { margin: -2px 2px 4px; font-size: 14px; line-height: 1.35; text-align: center; }
.sticker-pick { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.sp { aspect-ratio: 1; border: 2px solid var(--line2); border-radius: 14px; background: #fff; padding: 4px; display: grid; place-items: center; }
.sp.on { border-color: var(--accent); background: #eaf7fd; }
.sp svg { width: 100%; height: 100%; }

/* Spiel-Screen */
.pscreen { min-height: 100dvh; display: flex; flex-direction: column; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); }
.ptop { display: flex; align-items: center; gap: 8px; padding: 2px 2px 10px; }
.ptop .av { margin-top: -10px; }
.pname { font-size: 18px; font-weight: 900; }
.pbody { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.pcenter { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; padding: 10px 0 20px; }
.big-title { font-size: clamp(28px, 8.5vw, 40px); font-weight: 900; line-height: 1.08; margin: 0; }
.pmsg { color: var(--ink2); font-size: 17px; margin: 0; line-height: 1.4; }
.prow { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.wait-ic { color: var(--accent); }

.emote-bar { display: flex; justify-content: center; gap: 6px; padding-top: 10px; }
.emote-btn { width: 52px; height: 52px; border: 2px solid var(--line2); border-radius: 16px; background: #fff; box-shadow: 0 4px 10px -6px rgba(40, 50, 60, .5); padding: 5px; display: grid; place-items: center; transition: transform .25s var(--spring); }
.emote-btn:active { transform: scale(.88); }
.emote-btn svg { width: 100%; height: 100%; }
.player .emote-fly { bottom: 70px; }

/* Fragen */
.pq { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.pq-head { display: flex; align-items: center; gap: 12px; background: #fff; border: 2px solid var(--line2); border-radius: 22px; padding: 8px 12px; box-shadow: var(--shadow); }
.pq-prompt { font-size: 18px; line-height: 1.25; flex: 1; font-weight: 800; }
.pmedia { display: flex; justify-content: center; }
.pmedia .media.logo { padding: 14px; border-radius: 22px; } .pmedia .media.logo img { width: 110px; height: 110px; }
.pmedia .media.flag img { height: 100px; border-width: 4px; }
.pmedia .media.photo { border-width: 5px; border-radius: 18px; } .pmedia .media.photo img { max-height: 30vh; max-width: 100%; }
.pmedia .media.audio .eq { height: 80px; padding: 0 20px; border-radius: 24px; gap: 4px; } .pmedia .media.audio .eq i { width: 7px; }
.pmedia .media.text { font-size: 17px; padding: 12px 16px; }
.pmedia .media.letters span { width: 40px; height: 48px; font-size: 26px; border-radius: 12px; }
.pmedia .media.hl { gap: 8px; } .pmedia .hl-card { border-radius: 18px; } .pmedia .hl-img { height: 80px; } .pmedia .hl-body { padding: 6px; } .pmedia .hl-name { font-size: 15px; } .pmedia .hl-val { font-size: 18px; } .pmedia .hl-vs { width: 40px; height: 40px; font-size: 13px; border-width: 3px; } .pmedia .hl-metric { font-size: 10px; }
.popts { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.popts.two { grid-template-columns: 1fr; }
.pbtn { font-size: 18px; min-height: 96px; flex-direction: column; justify-content: center; text-align: center; gap: 6px; padding: 10px; }
.pbtn:active, .pbtn.chosen { transform: scale(.95); }
.pbtn .shape { width: 40px; height: 40px; }
.jokers { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.answer-form { display: flex; gap: 8px; }
.answer-form .field { flex: 1; min-width: 0; }
.answer-form .btn { width: 64px; height: 58px; padding: 0; }
.feedback { text-align: center; padding: 10px 14px; border-radius: 16px; font-size: 16px; background: #fff; border: 2px solid var(--line2); }
.word-game { justify-content: center; }
.word-slots, .word-bank { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.word-slot, .word-tile { width: clamp(38px, 11vw, 58px); height: clamp(44px, 12vw, 66px); border: 2px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); font-size: clamp(22px, 6vw, 32px); font-weight: 900; }
.word-slot { border-style: dashed; background: #f0f3f5; }
.word-slot.filled { border-style: solid; border-color: var(--accent); background: #fff; }
.word-tile { transition: transform .12s, opacity .12s; }
.word-tile:not(:disabled):active { transform: scale(.92); }
.word-tile.used { opacity: .35; }
.word-submit { align-self: center; min-width: 180px; }
.word-submit:disabled { opacity: .5; cursor: default; }
.feedback.bad { border-color: var(--red); color: #c92f3d; }
.feedback.close { border-color: var(--yellow); color: #a66f00; }
.feedback.ok { border-color: var(--green); color: #1d9a4d; }
.feedback.hint { color: var(--ink2); }
.found { display: flex; flex-wrap: wrap; gap: 6px; }

/* Ergebnis */
.res-icon { width: 126px; height: 126px; border-radius: 50%; display: grid; place-items: center; color: #fff; border: 6px solid #fff; }
.result.good .res-icon { background: linear-gradient(180deg, #72e39a, #2fc56a); box-shadow: 0 0 0 3px #22a957, 0 16px 30px -12px rgba(34, 169, 87, .9); }
.result.bad .res-icon { background: linear-gradient(180deg, #ff8a95, #ff4f5e); box-shadow: 0 0 0 3px #c92f3d, 0 16px 30px -12px rgba(201, 47, 61, .8); }
.points { font-size: 46px; font-weight: 900; color: var(--accent); }
.answer-card { font-size: 19px; padding: 14px 20px; }
.rank-badge { width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; font-size: 60px; font-weight: 900; color: #fff; background: linear-gradient(180deg, #6fd0f6, #29a8e0); border: 6px solid #fff; box-shadow: 0 0 0 3px #1786bb, 0 16px 30px -12px rgba(41, 168, 224, .9); }
.rank-badge.gold { background: linear-gradient(180deg, #ffe27a, #ffc61a); box-shadow: 0 0 0 3px #d9a200, 0 16px 30px -12px rgba(217, 162, 0, .9); }
.team-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px; border: 2px solid var(--tc); color: var(--tc); background: #fff; font-weight: 900; }

/* Abstimmen */
.vote-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vote-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px 10px; border: 2px solid var(--line2); border-radius: 22px; background: #fff; box-shadow: var(--shadow); font-size: 16px; font-weight: 900; transition: transform .25s var(--spring); }
.vote-btn small { color: var(--ink2); font-size: 13px; font-weight: 700; }
.vote-btn:active, .vote-btn.chosen { transform: scale(.94); border-color: var(--accent); }
.pick-list { display: flex; flex-direction: column; gap: 10px; }
.pick-opt { text-align: left; padding: 16px 18px; border: 2px solid var(--line2); border-radius: 20px; background: #fff; font-size: 18px; font-weight: 800; box-shadow: var(--shadow); }
.pick-opt:active, .pick-opt.chosen { border-color: var(--accent); transform: scale(.98); }

/* Imposter-Karte */
.secret-card { position: relative; height: 220px; perspective: 900px; border: 0; background: none; padding: 0; width: 100%; color: var(--ink); flex: none; }
.secret-card > div { position: absolute; inset: 0; border-radius: 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; backface-visibility: hidden; transition: transform .6s var(--spring); font-size: 17px; border: 2px solid var(--line2); box-shadow: var(--shadow); }
.sc-front { background: repeating-linear-gradient(45deg, #29a8e0 0 18px, #3db4e8 18px 36px); color: #fff; }
.sc-front b { font-size: 24px; }
.sc-back { background: #fff; transform: rotateY(180deg); }
.secret-card.imp .sc-back { background: linear-gradient(180deg, #ff8a95, #ff4f5e); color: #fff; }
.secret-card.open .sc-front { transform: rotateY(-180deg); }
.secret-card.open .sc-back { transform: rotateY(0); }
.sc-word { font-size: 44px; font-weight: 900; color: var(--accent); }
.secret-card.imp b { font-size: 26px; }

/* Gleichgedacht / Zahlen */
.prompt-big { text-align: center; font-size: 30px; font-weight: 900; padding: 18px; background: #fff; border: 2px solid var(--line2); border-radius: 24px; box-shadow: var(--shadow); }
.mates { display: flex; align-items: center; gap: 8px; justify-content: center; flex-wrap: wrap; color: var(--ink2); }
.mates .av { margin-top: -10px; }
.yn { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.yn .btn { height: 74px; font-size: 20px; }
.yn .btn.sel { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(41, 168, 224, .3); }
.stepper { display: flex; align-items: center; justify-content: center; gap: 18px; }
.stepper b { font-size: 60px; font-weight: 900; min-width: 90px; text-align: center; color: var(--accent); }
.numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.numpad button { height: 58px; border-radius: 18px; border: 2px solid var(--line2); background: #fff; font-size: 26px; font-weight: 900; box-shadow: 0 3px 0 var(--line); }
.numpad button:active { transform: translateY(2px); box-shadow: none; }
.num-display { font-size: 44px; font-weight: 900; text-align: center; padding: 10px; background: #fff; border: 2px solid var(--line2); border-radius: 22px; min-height: 76px; font-variant-numeric: tabular-nums; }
.num-display small { font-size: 22px; color: var(--ink2); }
.est-thumb { max-height: 22vh; border-radius: 18px; border: 5px solid #fff; box-shadow: var(--shadow); align-self: center; }

/* Reaktion */
.react-pad { flex: 1; border-radius: 32px; display: grid; place-items: center; color: #fff; font-size: 44px; font-weight: 900; text-align: center; padding: 20px; user-select: none; touch-action: manipulation; }
.react-pad.ready { background: linear-gradient(180deg, #ff8a95, #ff4f5e); }
.react-pad.go { background: linear-gradient(180deg, #72e39a, #22a957); }
.react-pad.trap { background: linear-gradient(180deg, #ffe27a, #ff9f1c); }
.react-pad.done { background: linear-gradient(180deg, #fff, #eef1f4); color: var(--ink); border: 2px solid var(--line2); }
.react-pad.done.bad { color: var(--red); }

/* Zeichnen */
.pdraw { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.pd-top { display: flex; align-items: center; gap: 10px; }
.pd-word { flex: 1; font-size: 20px; background: #fff; border: 2px solid var(--line2); border-radius: 16px; padding: 8px 12px; font-weight: 900; }
.pd-word.mask { display: flex; gap: 4px; flex-wrap: wrap; font-size: 24px; align-items: flex-end; }
.pd-word .blank { display: inline-block; width: 16px; border-bottom: 4px solid var(--ink); height: 26px; }
.canvas-wrap.p { position: relative; aspect-ratio: 4 / 3; width: 100%; border-radius: 20px; overflow: hidden; background: #fff; border: 5px solid #fff; box-shadow: 0 0 0 2px var(--line2), var(--shadow); }
.canvas-wrap.p canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; display: block; }
.tools { display: flex; flex-direction: column; gap: 8px; background: #fff; border: 2px solid var(--line2); border-radius: 20px; padding: 10px; }
.colors { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.col { aspect-ratio: 1.4; border: 2px solid rgba(0, 0, 0, .1); border-radius: 10px; }
.col.on { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--accent); transform: scale(1.06); }
.tool-row { display: flex; gap: 6px; }
.size, .tool { flex: 1; height: 46px; border: 2px solid var(--line2); border-radius: 12px; background: #f5f7f9; display: grid; place-items: center; padding: 0; color: var(--ink); }
.size i { display: block; background: var(--ink); border-radius: 50%; }
.size.on, .tool.on { border-color: var(--accent); background: #eaf7fd; }
.mini-chat { font-size: 14px; color: var(--ink2); display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
#guessArea { display: flex; flex-direction: column; gap: 8px; }

/* Tennis-Controller */
.ppaddle { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.pp-head { display: flex; justify-content: space-between; align-items: center; }
.pp-score { font-size: 34px; font-weight: 900; }
.pp-zone { position: relative; flex: 1; min-height: 260px; border-radius: 30px; touch-action: none; overflow: hidden; border: 5px solid #fff; box-shadow: 0 0 0 2px var(--line2), var(--shadow);
  background: linear-gradient(90deg, transparent 49%, rgba(255, 255, 255, .7) 49% 51%, transparent 51%), repeating-linear-gradient(0deg, #3b7fd4 0 30px, #3577c9 30px 60px); }
.pp-knob { position: absolute; left: 50%; width: 64%; height: 60px; transform: translate(-50%, -50%); border-radius: 30px; border: 4px solid #fff; top: 50%; transition: top .05s linear; box-shadow: 0 8px 16px -8px rgba(0, 0, 0, .5); }
.team-0 .pp-knob { background: linear-gradient(180deg, #ff8a95, #ff4f5e); } .team-1 .pp-knob { background: linear-gradient(180deg, #6fb0ff, #2d6fff); }
.pp-hint { position: absolute; bottom: 10px; width: 100%; text-align: center; color: #fff; opacity: .85; font-size: 14px; }
.swing-btn { height: 96px; font-size: 28px; }
.swing-btn.hit { animation: pop .3s; }
.pp-status { text-align: center; color: var(--ink2); }

.ed-stage .av.av-img { margin-bottom: 10px; }

/* ---------- Mii-Editor (Vollbild) ---------- */

.home-logo .brand-logo { background: #fff; font-size: 48px; }
/* Jedes Spiel färbt auch das Handy */
.pscreen.tinted { background: linear-gradient(180deg, color-mix(in srgb, var(--g1) 26%, #fff), transparent 46%); }
body.vault-mode .pscreen.tinted { background: none; }

/* Zeitstrahl */
.tl-wrap { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 6px; position: relative; padding-left: 4px; }
.tl-wrap::before { content: ''; position: absolute; left: 21px; top: 16px; bottom: 16px; width: 6px; border-radius: 9px; background: linear-gradient(180deg, #f0a41c, #35b96a); }
.tl-end { position: relative; align-self: flex-start; margin-left: 46px; font-size: 14px; color: #5c656d; }
#tlList { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; touch-action: none; user-select: none; -webkit-user-select: none; }
.tl-row { position: relative; display: flex; align-items: center; gap: 10px; min-height: 76px; padding: 6px; background: #fff; border: 2px solid var(--line2); border-radius: 18px; margin-left: 46px; box-shadow: 0 5px 12px -8px rgba(40, 50, 60, .6); transition: transform .18s var(--ease); cursor: grab; }
.tl-row.drag { z-index: 5; transition: none; border-color: var(--accent); box-shadow: 0 16px 26px -10px rgba(40, 50, 60, .55); cursor: grabbing; }
.tl-no { position: absolute; left: -44px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 3px solid var(--accent); font-size: 15px; }
.tl-th { flex: none; width: 88px; height: 64px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: #f1f4f6; color: var(--ink3); } .tl-th img { width: 88px; height: 64px; object-fit: cover; pointer-events: none; }
.tl-nm { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; font-size: 16px; } .tl-nm small { color: #6b737a; }
.tl-mv { display: flex; flex-direction: column; gap: 2px; } .tl-mv button { width: 36px; height: 30px; border: 0; border-radius: 9px; background: #eef2f5; color: var(--ink); display: grid; place-items: center; } .tl-mv button:disabled { opacity: .3; }

/* Figur wählen: vier Vorschläge oder selbst gestalten */
.mii-four { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mii-opt { aspect-ratio: 1; padding: 3px; overflow: hidden; border: 3px solid var(--line2); border-radius: 20px; background: linear-gradient(180deg, #fff, #e8f4fa); transition: transform .18s var(--ease); }
.mii-opt img { display: block; width: 100%; height: 100%; object-fit: contain; }
.mii-opt:active { transform: scale(.94); } .mii-opt.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(41, 168, 224, .28); }
.mii-acts { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 8px; margin: 10px 0 14px; } .mii-acts .btn { padding: 0 6px; gap: 6px; font-size: 15px; height: 50px; min-width: 0; white-space: nowrap; }
.mii-own { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin: -4px 0 14px; padding: 5px; border: 2px dashed var(--line); border-radius: 16px; background: none; font-size: 15px; } .mii-own img { width: 42px; height: 42px; object-fit: contain; }
