/* Buzzmoji player: phone first, fine on a laptop in a video call. The root scrolls (never overflow:hidden on html). */
html.player { overflow-y: auto; height: auto }
body.player { min-height: 100dvh; background: var(--blue); color: #fff; overflow-x: hidden }
body.player::before { content: ""; position: fixed; inset: 0; z-index: -1;
  background: radial-gradient(circle at 15% 10%, rgba(255, 194, 26, .35), transparent 38%), radial-gradient(circle at 90% 85%, rgba(212, 19, 111, .45), transparent 42%), linear-gradient(160deg, #2E3BFF 0%, #5B2FE6 55%, #7B3FF2 100%) }
body.player.t-fruits::before { background: radial-gradient(circle at 15% 10%, rgba(255, 194, 26, .45), transparent 40%), radial-gradient(circle at 90% 85%, rgba(0, 162, 122, .4), transparent 42%), linear-gradient(160deg, #D4136F 0%, #F2502E 60%, #FF7A1A 100%) }
body.player.t-space::before { background: radial-gradient(1.5px 1.5px at 20% 30%, #fff, transparent), radial-gradient(1.5px 1.5px at 70% 20%, #fff, transparent), radial-gradient(2px 2px at 40% 80%, #fff, transparent), radial-gradient(1.5px 1.5px at 85% 60%, #fff, transparent), radial-gradient(circle at 80% 10%, rgba(123, 63, 242, .6), transparent 45%), linear-gradient(170deg, #0D0B33 0%, #24135E 60%, #3B1A7A 100%) }
body.player.has-brand::before { background: radial-gradient(circle at 15% 10%, rgba(255, 194, 26, .3), transparent 38%), linear-gradient(160deg, var(--brand) 0%, var(--brand) 45%, #1B1446 140%) }
.ptop .brandbadge { font-size: .78rem; max-width: 46vw; box-shadow: none }
.game-chip { flex-wrap: wrap }
.game-chip .brandbadge { font-size: .85rem; box-shadow: none }
.pw { width: min(560px, 100%); margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)) }
.ptop { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px }
.ptop .bz-logo__t { font-size: 1.2rem }
.ptop .bz-logo__bee { width: 32px; height: 32px }
.ptop__r { display: flex; align-items: center; gap: 8px }
.score-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; background: #fff; color: var(--ink); border: 2.5px solid var(--ink); font: 900 1rem/1 var(--f-display); font-stretch: 112% }
.pscr { flex: 1; display: none; flex-direction: column; gap: 16px; padding: 10px 0 0 }
.pscr.on { display: flex; animation: slideUp 420ms var(--ease-out) both }
@keyframes slideUp { from { opacity: 0; transform: translateY(18px) } to { opacity: 1; transform: none } }
.ptitle { margin: 0; font: 900 clamp(1.8rem, 7vw, 2.4rem)/1.05 var(--f-display); font-stretch: 118%; letter-spacing: -.02em; text-shadow: 0 3px 0 rgba(27, 20, 70, .35) }
.psub { margin: 0; font-size: 1.02rem; color: rgba(255, 255, 255, .9) }
.pcard { background: #fff; color: var(--ink); border: 3px solid var(--ink); border-radius: 24px; box-shadow: var(--sh); padding: 18px }
.grow { flex: 1 }

/* PIN */
.pin-hero { display: grid; place-items: center; margin: 4px 0 2px }
.pin-hero img { width: min(46vw, 190px); height: auto; animation: float 4s ease-in-out infinite }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-3deg) } 50% { transform: translateY(-10px) rotate(3deg) } }
.pin-in { width: 100%; height: 76px; text-align: center; font: 900 2.4rem/1 var(--f-display); font-stretch: 110%; letter-spacing: .22em; border: 3px solid var(--ink); border-radius: 18px; padding: 0 0 0 .22em }
.pin-in::placeholder { color: #C9C3E3; letter-spacing: .3em }
.pfoot { text-align: center; font-size: .9rem; color: rgba(255, 255, 255, .85) }
.pfoot a { color: #fff; font-weight: 800 }

/* studio */
.game-chip { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 16px; background: rgba(255, 255, 255, .16); border: 2px solid rgba(255, 255, 255, .5); font-weight: 700 }
.game-chip .emo { width: 30px; height: 30px }
.ava-stage { position: relative; height: min(38vw, 200px); min-height: 150px; overflow: visible }
.ava-stage .ava { position: absolute; inset: 0; margin: auto; width: auto; height: 100%; max-width: 100%; object-fit: contain; pointer-events: none; animation: bob 2.4s ease-in-out infinite }
.ava-stage .dice { position: absolute; right: 0; top: 0; z-index: 2; background: #fff; color: var(--ink); border-color: var(--ink); box-shadow: var(--sh-sm) }
@keyframes bob { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-8px) } }
.studio-tabs { display: flex; gap: 6px }
.studio-tabs button { flex: 1; min-height: 44px; border-radius: 14px; border: 2.5px solid var(--ink); background: rgba(255, 255, 255, .85); color: var(--ink); font-weight: 800 }
.studio-tabs button[aria-pressed="true"] { background: var(--yellow) }
.studio-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap }
.tones { display: flex; gap: 8px }
.tones button { width: 36px; height: 36px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--ink) }
.tones button[aria-pressed="true"] { transform: scale(1.12); box-shadow: 0 0 0 3px var(--ink), 0 0 0 6px var(--yellow) }
.pick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px }
.pick-grid button { display: grid; justify-items: center; gap: 2px; padding: 8px 4px 6px; border-radius: 16px; border: 2.5px solid var(--line); background: var(--mist); color: var(--ink); font: 700 .74rem/1.15 var(--f-body) }
.pick-grid button img { width: 52px; height: 52px }
.pick-grid button[aria-pressed="true"] { border-color: var(--ink); background: var(--yellow); box-shadow: var(--sh-sm) }
.join-dock { position: sticky; bottom: 0; z-index: 5; display: grid; gap: 10px; margin: 6px -16px calc(-16px - env(safe-area-inset-bottom)); padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); background: rgba(27, 20, 70, .94); border-top: 3px solid var(--ink); border-radius: 24px 24px 0 0 }
.join-dock .input { font-size: 1.15rem; font-weight: 800 }
.fun-name { padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .12); font-weight: 700 }

/* lobby */
.me-big { display: grid; place-items: center; gap: 6px; text-align: center }
.me-big img { width: min(52vw, 230px); height: auto; pointer-events: none; animation: bob 2.4s ease-in-out infinite }
.me-big b { font: 900 1.6rem/1.1 var(--f-display); font-stretch: 112% }
.react-bar { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px }
.react-bar button { aspect-ratio: 1; border-radius: 16px; border: 2.5px solid var(--ink); background: #fff; display: grid; place-items: center; padding: 6px; box-shadow: var(--sh-sm); transition: transform 120ms }
.react-bar button:active { transform: scale(.9) }
.react-bar img, .react-bar .emo--text { width: 100%; height: 100%; font-size: 28px }

/* intro + question */
.qhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; font: 800 .95rem/1 var(--f-display); font-stretch: 112% }
.tbar { height: 12px; border-radius: 99px; background: rgba(255, 255, 255, .25); overflow: hidden; border: 2px solid var(--ink) }
.tbar i { display: block; height: 100%; width: 100%; background: var(--yellow); transform-origin: left; transition: background 300ms }
.tbar.low i { background: #FF4D6D }
.q-text { margin: 0; padding: 16px 18px; border-radius: 22px; background: #fff; color: var(--ink); border: 3px solid var(--ink); box-shadow: var(--sh-sm); font: 800 clamp(1.15rem, 4.8vw, 1.45rem)/1.25 var(--f-body); display: flex; gap: 12px; align-items: center }
.q-text .emo { width: 46px; height: 46px; flex: 0 0 auto; font-size: 40px }
.q-img { max-height: 30vh; width: auto; margin: 0 auto; border-radius: 16px; border: 3px solid var(--ink) }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; flex: 1; align-content: stretch }
.tiles.n2 { grid-template-columns: 1fr }
.tiles .tile { min-height: 96px; font-size: 1.05rem; flex-direction: column; justify-content: center; text-align: center; padding: 12px 10px }
.tiles.icons-only .tile { min-height: 130px }
.tiles.icons-only .tile__ic { width: 84px; height: 84px }
.tiles.icons-only .tile__ic img { width: 66px; height: 66px }
.tiles .tile:active { transform: translate(3px, 3px); box-shadow: none }
.tiles.locked .tile:not(.picked) { opacity: .3; filter: grayscale(.6) }
.tiles .tile.picked { outline: 4px solid #fff; outline-offset: 3px }
.intro-n { font: 900 clamp(3rem, 16vw, 5.2rem)/1 var(--f-display); font-stretch: 120%; text-shadow: 0 5px 0 rgba(27, 20, 70, .4) }
.center { text-align: center; align-items: center; justify-content: center }
.double { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 99px; background: var(--yellow); color: var(--ink); border: 3px solid var(--ink); font: 900 1.25rem/1 var(--f-display); font-stretch: 115%; box-shadow: var(--sh-sm); animation: pulse 900ms ease-in-out infinite }
.double .emo { width: 34px; height: 34px }
@keyframes pulse { 50% { transform: scale(1.06) } }
.wait-big { display: grid; place-items: center; gap: 8px; text-align: center; flex: 1 }
.wait-big .emo, .wait-big img { width: 120px; height: 120px }
.wait-big b { font: 900 1.6rem/1.1 var(--f-display); font-stretch: 115% }

/* result */
.res { display: grid; gap: 14px; text-align: center; justify-items: center; flex: 1; align-content: center }
.res__icon { width: 130px; height: 130px; animation: pop 500ms var(--ease-spring) }
.res__h { font: 900 2.4rem/1 var(--f-display); font-stretch: 118% }
.res__pts { font: 900 3rem/1 var(--f-display); font-stretch: 112%; color: var(--yellow); text-shadow: 0 4px 0 var(--ink) }
.res__pts.neg { color: #FF8FA3 }
.res__chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center }
.res__chips .chip { color: var(--ink) }
.res__note { background: rgba(255, 255, 255, .14); border: 2px solid rgba(255, 255, 255, .5); border-radius: 16px; padding: 10px 14px; font-size: .95rem }
.res__rank { display: grid; gap: 2px; padding: 12px 16px; border-radius: 18px; background: #fff; color: var(--ink); border: 3px solid var(--ink); box-shadow: var(--sh-sm); min-width: 240px }
.res__rank b { font: 900 1.6rem/1 var(--f-display) }
.res.good .res__h { color: #7CFFC4 }
.res.bad .res__h { color: #FFB3C1 }

/* final */
.fin { display: grid; gap: 14px; justify-items: center; text-align: center }
.fin__ava { position: relative; width: 190px; height: 190px }
.fin__ava .ava { animation: bob 2.4s ease-in-out infinite }
.fin__medal { position: absolute; right: -12px; bottom: -6px; width: 84px; height: 84px }
.fin__place { position: absolute; right: -6px; bottom: 2px; min-width: 70px; padding: 8px 12px; border-radius: 18px; background: var(--yellow); color: var(--ink); border: 3px solid var(--ink); font: 900 1.6rem/1 var(--f-display) }
.fin__score { font: 900 3.2rem/1 var(--f-display); font-stretch: 112%; text-shadow: 0 4px 0 var(--ink) }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100% }
.stats div { padding: 12px; border-radius: 16px; background: #fff; color: var(--ink); border: 2.5px solid var(--ink) }
.stats b { display: block; font: 900 1.5rem/1.1 var(--f-display) }
.stats small { color: var(--muted); font-weight: 700 }
.prize { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border-radius: 20px; background: var(--yellow); color: var(--ink); border: 3px solid var(--ink); box-shadow: var(--sh-sm); text-align: left; font-weight: 800 }
.prize img { width: 64px; height: 64px; animation: pulse 1.2s ease-in-out infinite }
.awards { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center }
.awards .chip { color: var(--ink) }
