/* Last Tile Standing — TV + phone. Colours and layout follow Kita's mockups (docs/tiles/). */
:root { --gold: #ffcf3a; --gold2: #ff9d1a; --ice: #e6f4ff; --sky: #5fc3ff; --neon: #3aa0ff; --green: #2cff6a; --red: #ff3448; --navy: #0a1240; }
[hidden] { display: none !important; }

/* the title lettering: gold "LAST TILE" over icy-blue "STANDING" */
.ttitle { margin: 0; display: grid; justify-items: center; line-height: .86; font-family: 'Fredoka', sans-serif; font-weight: 700; letter-spacing: .01em; }
.ttitle span { display: block; -webkit-text-stroke: .045em #1a1550; paint-order: stroke fill; filter: drop-shadow(0 .06em 0 #1a1550) drop-shadow(0 .14em .18em rgba(0,0,0,.55)); }
.ttitle .l1 { background: linear-gradient(#fff6b0, var(--gold) 45%, var(--gold2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ttitle .l2 { background: linear-gradient(#ffffff, var(--ice) 40%, var(--sky)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ============================== TV ============================== */
body.ttv { margin: 0; overflow: hidden; background: #050a2a; color: #fff; font-family: Nunito, sans-serif; }
.tstage { position: relative; width: 100vw; height: 100vh; overflow: hidden; background: url(/art/tiles/stage.jpg) center / cover no-repeat; }
.tstage::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 40%, transparent 50%, rgba(2,4,24,.55)); }
.tstage > * { z-index: 1; }
.tstage .logo { position: absolute; left: 1.2vw; top: 1.4vh; }
.tsound { display: none; } /* the mute button on every game (/gt-media.js) does this */

.thead { position: absolute; left: 50%; top: 1vh; transform: translateX(-50%); display: grid; justify-items: center; gap: 1.2vh; }
.thead .ttitle img { height: 17vh; display: block; filter: drop-shadow(0 .6vh 1.4vh rgba(0,0,0,.55)); }
.tround { padding: .8vh 2.2vw; border-radius: 1.2vh; font: 800 2.6vh Nunito, sans-serif; letter-spacing: .03em; white-space: nowrap;
  background: rgba(6,10,44,.88); border: .3vh solid var(--neon); box-shadow: 0 0 2vh rgba(58,160,255,.55); }
.tround em { font-style: normal; color: var(--gold); }

.tclock { position: absolute; right: calc(3vw + 30vh); top: 1.5vh; width: 18vh; height: 18vh; display: grid; place-content: center; text-align: center;
  background: url(/art/tiles/timer.png) center / contain no-repeat; }
.tclock b { font: 700 6.4vh/1 Fredoka, sans-serif; }
.tclock small { font: 800 1.3vh/1.1 Nunito, sans-serif; letter-spacing: .06em; }

.tjack { position: absolute; right: 1.6vw; top: 1vh; height: 17vh; filter: drop-shadow(0 .6vh 1.4vh rgba(0,0,0,.5)); }

.thow { position: absolute; left: 1.6vw; top: 15vh; width: 19vw; padding: 1.6vh 1.2vw; border-radius: 1.6vh;
  background: rgba(6,12,52,.86); border: .3vh solid var(--neon); box-shadow: 0 0 2vh rgba(58,160,255,.45); }
.thow h2 { margin: 0 0 1vh; font: 800 2.6vh Nunito, sans-serif; letter-spacing: .03em; }
.thow ol { list-style: none; margin: 0 0 1.2vh; padding: 0; display: grid; gap: 1vh; }
.thow li { display: flex; align-items: center; gap: .7vw; font-weight: 800; font-size: 2vh; }
.thow li i { flex: none; width: 3.4vh; height: 3.4vh; border-radius: 50%; display: grid; place-items: center; font-style: normal; background: var(--neon); color: #fff; font-weight: 900; box-shadow: 0 0 1vh var(--neon); }
.thow .key { display: flex; align-items: center; gap: .8vw; font-weight: 900; font-size: 2.1vh; margin-top: .7vh; }
.thow .key span { width: 3.6vw; height: 2.6vh; border-radius: .6vh; }
.thow .key.g { color: var(--green); } .thow .key.g span { background: var(--green); box-shadow: 0 0 1.4vh var(--green); }
.thow .key.r { color: var(--red); } .thow .key.r span { background: var(--red); box-shadow: 0 0 1.4vh var(--red); }

/* the floor: a 5 × 5 grid of light-up tiles, tipped back in 3D; each player stands up on their tile */
.tfloorwrap { position: absolute; left: 22vw; right: 22vw; top: 25vh; bottom: 13vh; perspective: 110vh; perspective-origin: 50% 0%; }
.tfloor { --n: 5; position: absolute; left: 50%; bottom: 0; width: 56vh; height: 56vh; transform-origin: 50% 100%;
  transform: translateX(-50%) rotateX(52deg); transform-style: preserve-3d;
  display: grid; grid-template-columns: repeat(var(--n), 1fr); grid-template-rows: repeat(var(--n), 1fr); gap: 1.4vh; }
.tile { position: relative; border-radius: 1vh; transform-style: preserve-3d; transition: background .35s, box-shadow .35s, border-color .35s;
  background: linear-gradient(145deg, rgba(40,90,255,.55), rgba(10,30,140,.75)); border: .45vh solid rgba(120,190,255,.95);
  box-shadow: 0 0 1.6vh rgba(58,160,255,.85), inset 0 0 1.6vh rgba(120,190,255,.5); }
.tile.taken { border-color: #ffe27a; box-shadow: 0 0 1.8vh rgba(255,207,58,.8), inset 0 0 1.4vh rgba(255,207,58,.45); }
.tile.flicker { animation: flick .45s var(--d, 0ms) infinite alternate; }
@keyframes flick { 0% { background: linear-gradient(145deg, rgba(40,90,255,.5), rgba(10,30,140,.7)); } 50% { background: linear-gradient(145deg, rgba(255,60,80,.7), rgba(150,10,40,.8)); } 100% { background: linear-gradient(145deg, rgba(60,255,120,.6), rgba(10,120,50,.75)); } }
.tile.green { background: linear-gradient(145deg, rgba(80,255,140,.85), rgba(10,150,60,.9)); border-color: #b6ffcb; box-shadow: 0 0 2.6vh var(--green), inset 0 0 1.6vh rgba(200,255,220,.6); }
.tile.red { background: linear-gradient(145deg, rgba(255,80,96,.9), rgba(160,10,30,.92)); border-color: #ffb3bb; box-shadow: 0 0 2.6vh var(--red), inset 0 0 1.6vh rgba(255,200,205,.6); }
.tok { position: absolute; left: 50%; bottom: 30%; transform-origin: 50% 100%; transform: translateX(-50%) rotateX(-52deg);
  display: grid; justify-items: center; pointer-events: none; transition: filter .4s, opacity .4s; }
.tok .face { width: 7vh; height: 7vh; border-radius: 50%; display: grid; place-items: center; font-size: 4.6vh; line-height: 1;
  background: radial-gradient(circle at 40% 35%, #fff, #dfe9ff); border: .5vh solid #fff; box-shadow: 0 .8vh 1.6vh rgba(0,0,0,.5); }
.tok .nm { margin-top: .3vh; padding: .2vh .8vw; border-radius: 99px; font: 900 1.8vh Nunito, sans-serif; white-space: nowrap; max-width: 14vh; overflow: hidden; text-overflow: ellipsis;
  background: rgba(6,10,44,.88); }
.tile.green .tok .face { box-shadow: 0 0 2vh var(--green), 0 .8vh 1.6vh rgba(0,0,0,.5); animation: hop .5s ease-out 2; }
@keyframes hop { 50% { transform: translateY(-1.6vh); } }
.tile.out .tok { filter: grayscale(1) brightness(.75); }
.tile.out .tok::after { content: '✕'; position: absolute; top: -1vh; font: 900 8vh/1 Nunito, sans-serif; color: var(--red); text-shadow: 0 0 1.4vh #000; }

.tlist { position: absolute; right: 1.6vw; top: 19vh; bottom: 3vh; width: 19vw; display: flex; flex-direction: column; gap: .8vh; padding: 1.4vh 1vw; border-radius: 1.6vh;
  background: rgba(6,12,52,.86); border: .3vh solid var(--neon); box-shadow: 0 0 2vh rgba(58,160,255,.45); overflow: hidden; }
.tlist h3 { margin: 0; padding: .6vh .5vw; border-radius: 1vh; font: 900 2vh Nunito, sans-serif; text-align: center; letter-spacing: .02em; white-space: nowrap; }
.tlist h3.up { background: linear-gradient(#1f8f4a, #0d5a2c); box-shadow: 0 0 1.4vh rgba(44,255,106,.5); }
.tlist h3.down { background: linear-gradient(#b31a2c, #6d0b17); box-shadow: 0 0 1.4vh rgba(255,52,72,.5); margin-top: .6vh; }
.tlist .rows { display: grid; gap: .45vh; overflow: hidden; }
.prow { display: flex; align-items: center; gap: .6vw; padding: .45vh .6vw; border-radius: .8vh; background: rgba(255,255,255,.06); font-weight: 800; font-size: 2vh; }
.prow i { width: 1.6vh; height: 1.6vh; border-radius: 50%; flex: none; }
.prow.up i { background: var(--green); box-shadow: 0 0 .8vh var(--green); }
.prow.down i { background: var(--red); }
.prow.down { opacity: .7; }
.prow .f { font-size: 2.4vh; }
.prow .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tsaid { position: absolute; left: 50%; bottom: 2.4vh; transform: translateX(-50%); z-index: 4; padding: 1.2vh 2.4vw; border-radius: 99px; white-space: nowrap;
  font: 900 3vh Nunito, sans-serif; background: rgba(6,10,44,.92); border: .3vh solid var(--gold); box-shadow: 0 0 2vh rgba(255,207,58,.5); }
.tsaid.pop { animation: tpop .45s; }
@keyframes tpop { 0% { transform: translateX(-50%) scale(.5); } 70% { transform: translateX(-50%) scale(1.1); } 100% { transform: translateX(-50%) scale(1); } }

.thost { position: absolute; left: 1.6vw; bottom: 9.4vh; width: 17vh; height: 17vh; border-radius: 50%; overflow: hidden; border: .5vh solid var(--gold);
  background: #1a1f5a; box-shadow: 0 0 2.4vh rgba(255,207,58,.6); }
.thost img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.thost.talking { animation: htalk .42s ease-in-out infinite alternate; }
@keyframes htalk { to { transform: scale(1.06) rotate(-2deg); box-shadow: 0 0 3.4vh rgba(255,207,58,.95); } }

.ttv .codechip { position: absolute; left: 1.6vw; top: 62vh; display: flex; align-items: center; gap: .8vw; padding: .8vh 1vw; border-radius: 1.4vh;
  background: rgba(6,10,44,.9); border: .3vh solid var(--neon); font-weight: 800; font-size: 1.6vh; line-height: 1.2; }
.ttv .codechip .qrmini { background: #fff; padding: .5vh; border-radius: .8vh; line-height: 0; }
.ttv .codechip .qrmini img, .ttv .codechip .qrmini canvas { width: 8vh !important; height: 8vh !important; }
.ttv .codechip b { font: 700 3.6vh Fredoka, sans-serif; letter-spacing: .18em; color: var(--gold); }

/* lobby + winner panels */
.tpanel { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 6; width: min(76vw, 1100px); max-height: 92vh; overflow: auto;
  padding: 3vh 3vw; border-radius: 3vh; text-align: center; display: grid; gap: 1.8vh; justify-items: center;
  background: rgba(6,10,44,.94); border: .45vh solid var(--neon); box-shadow: 0 0 4vh rgba(58,160,255,.6); }
.tpanel > h1 { margin: 0; font: 700 7vh/1 Fredoka, sans-serif; }
.tpanel .plogo-big { height: 16vh; }
.tpanel > h1 .l1 { color: var(--gold); } .tpanel > h1 .l2 { color: var(--sky); }
.tpanel p { margin: 0; font-size: 2.3vh; max-width: 60ch; line-height: 1.45; }
.tpanel b.r { color: var(--red); } .tpanel b.g { color: var(--green); }
.tpanel .wjoin { display: flex; align-items: center; gap: 2vw; }
.tpanel .qr { background: #fff; padding: 1vh; border-radius: 1.4vh; }
.tpanel .qr img, .tpanel .qr canvas { width: 22vh !important; height: 22vh !important; display: block; }
.tpanel .bigcode { font: 700 9vh/1 Fredoka, sans-serif; letter-spacing: .14em; color: var(--gold); }
.lobbypeople { display: flex; flex-wrap: wrap; justify-content: center; gap: .8vh .6vw; }
.lobbypeople span { padding: .6vh 1vw; border-radius: 99px; background: rgba(255,255,255,.1); font-weight: 800; font-size: 2.2vh; }
.tpanel .row { display: flex; gap: 1vw; flex-wrap: wrap; justify-content: center; }
.twin .crown { font-size: 9vh; line-height: 1; animation: hop .8s ease-in-out infinite; }
.twin h2 { margin: 0; font: 700 4vh Fredoka, sans-serif; color: var(--sky); letter-spacing: .06em; }
.twin h1 { margin: 0; font: 700 8vh/1 Fredoka, sans-serif; color: var(--gold); text-shadow: 0 0 3vh rgba(255,207,58,.6); }
.twin .jack { font: 900 3.4vh Nunito, sans-serif; color: var(--green); }
.podium { display: flex; align-items: flex-end; gap: 1.4vw; }
.podium .step { display: grid; justify-items: center; gap: .4vh; padding: 1.4vh 1.6vw; border-radius: 1.4vh 1.4vh 0 0; background: rgba(255,255,255,.08); min-width: 12vw; }
.podium .p1 { order: 2; min-height: 22vh; background: linear-gradient(rgba(255,207,58,.35), rgba(255,207,58,.08)); }
.podium .p2 { order: 1; min-height: 16vh; } .podium .p3 { order: 3; min-height: 12vh; }
.podium .f { font-size: 6vh; line-height: 1; } .podium b { font-size: 2.4vh; } .podium small { font-weight: 800; font-size: 2vh; }

/* ============================== PHONE ============================== */
body.tphone { margin: 0; min-height: 100vh; color: #fff; font-family: Nunito, sans-serif; background: #061040 url(/art/tiles/phone-bg.jpg) center top / cover no-repeat fixed; }
.phead { position: sticky; top: 0; z-index: 3; display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top));
  background: rgba(6,10,44,.75); backdrop-filter: blur(6px); font-weight: 800; }
.pmain { display: grid; justify-items: center; gap: 8px; padding: 8px 14px 70px; text-align: center; }
.plogo { width: min(300px, 82vw); filter: drop-shadow(0 4px 10px rgba(0,0,0,.5)); }
.ttitle.small { font-size: 36px; margin-top: -6px; }
.pclock { width: 104px; height: 104px; display: grid; place-content: center; text-align: center; background: url(/art/tiles/timer.png) center / contain no-repeat; }
.pchoose { width: 100%; max-width: 440px; display: block; filter: drop-shadow(0 4px 12px rgba(0,0,0,.5)); }
.pclock b { font: 700 34px/1 Fredoka, sans-serif; }
.pclock small { font: 800 9px/1.1 Nunito, sans-serif; letter-spacing: .06em; }
.pbanner { width: 100%; max-width: 420px; padding: 10px 12px; border-radius: 14px; font: 700 23px/1.15 Fredoka, sans-serif; letter-spacing: .02em;
  background: rgba(6,10,44,.88); border: 3px solid var(--neon); box-shadow: 0 0 14px rgba(58,160,255,.55); }
.pbanner em { font-style: normal; color: var(--gold); }
.pbanner.good { border-color: var(--green); box-shadow: 0 0 18px rgba(44,255,106,.7); }
.pbanner.bad { border-color: var(--red); box-shadow: 0 0 18px rgba(255,52,72,.7); }
.psub { font-weight: 800; font-size: 13px; letter-spacing: .05em; color: #fff; text-transform: uppercase; padding: 4px 14px; border-radius: 99px; background: rgba(6,10,44,.85); }
.psub:empty { display: none; }
.pgrid { --n: 5; width: 100%; max-width: 420px; aspect-ratio: 1; display: grid; grid-template-columns: repeat(var(--n), 1fr); grid-template-rows: repeat(var(--n), 1fr); gap: 8px; padding: 10px; border-radius: 18px;
  background: rgba(6,12,52,.8); border: 3px solid rgba(58,160,255,.7); box-shadow: 0 0 18px rgba(58,160,255,.45); }
.cell { border: 3px solid rgba(230,240,255,.95); border-radius: 12px; padding: 0; cursor: pointer; display: grid; place-items: center; color: var(--gold);
  background: radial-gradient(circle at 50% 50%, rgba(60,90,170,.6), rgba(20,30,80,.9)); box-shadow: 0 0 10px rgba(120,180,255,.7), inset 0 0 8px rgba(120,180,255,.35);
  transition: transform .12s, background .3s, box-shadow .3s, border-color .3s; -webkit-tap-highlight-color: transparent; }
.cell:not(:disabled):active { transform: scale(.92); }
.cell:disabled { cursor: default; }
.cell svg { width: 58%; height: 58%; fill: currentColor; }
.cell.taken { border-color: #ffd34d; background: radial-gradient(circle, rgba(255,190,40,.55), rgba(150,90,10,.75)); box-shadow: 0 0 12px rgba(255,207,58,.85), inset 0 0 8px rgba(255,220,120,.5); color: #ffc93a; }
.cell.mine { border-color: #b6ffcb; background: radial-gradient(circle, rgba(70,255,130,.85), rgba(10,150,60,.9)); box-shadow: 0 0 18px var(--green), inset 0 0 10px rgba(220,255,230,.6); }
.cell.mine.pending { border-color: #a8f0ff; background: radial-gradient(circle, rgba(60,220,255,.85), rgba(10,110,170,.9)); box-shadow: 0 0 18px #3ad8ff; }
.cell .me { font-size: 30px; line-height: 1; }
.cell.flicker { animation: flick .45s var(--d, 0ms) infinite alternate; }
.cell.flicker.mine { animation: pulse .6s infinite alternate; }
@keyframes pulse { to { transform: scale(1.08); box-shadow: 0 0 28px var(--green); } }
.cell.red { border-color: #ffb3bb; background: radial-gradient(circle, rgba(255,80,96,.9), rgba(160,10,30,.92)); box-shadow: 0 0 16px var(--red); color: #ffd0d5; }
.cell.green { border-color: #b6ffcb; background: radial-gradient(circle, rgba(80,255,140,.85), rgba(10,150,60,.9)); box-shadow: 0 0 16px var(--green); color: #eaffef; }
/* Kita's "Players choosing:" bar — the live number sits where the picture's number was */
.pcount { position: relative; width: min(330px, 86vw); aspect-ratio: 2091 / 427; background: url(/art/tiles/choosing.png) center / contain no-repeat; }
.pcount b { position: absolute; left: 86.2%; top: 50.6%; transform: translate(-50%, -50%); font: 700 clamp(22px, 7vw, 30px)/1 Fredoka, sans-serif;
  background: linear-gradient(#fff3a0, var(--gold) 50%, var(--gold2)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #5a2a00); }
.plegend { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; font-weight: 800; font-size: 13px; padding: 8px 12px; border-radius: 12px; background: rgba(6,10,44,.8); }
.plegend span { display: flex; align-items: center; gap: 5px; }
.plegend i { width: 18px; height: 18px; border-radius: 5px; border: 2px solid #e6f0ff; background: #1a2a6a; }
.plegend i.t { border-color: #ffd34d; background: #a7700f; } .plegend i.m { border-color: #b6ffcb; background: #19b24e; }

/* on the live stream the stream page shows the host and the join code, so the game doesn't repeat them */
body.streaming .thost { display: none; }

/* phone: show me on the big screen */
.pcam { width: 100%; max-width: 420px; display: grid; gap: 8px; justify-items: center; padding: 12px; border-radius: 16px; background: rgba(6,10,44,.85); border: 2px solid rgba(58,160,255,.6); }
.pcamtitle { font: 700 18px Fredoka, sans-serif; }
.pcambtns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.pcambtns button { border: 2px solid rgba(255,255,255,.4); border-radius: 99px; padding: 8px 12px; background: rgba(255,255,255,.08); color: #fff; font: 800 14px Nunito, sans-serif; cursor: pointer; }
.pcambtns button.on { border-color: var(--green); background: rgba(44,255,106,.25); box-shadow: 0 0 10px rgba(44,255,106,.6); }
.pcamview { display: flex; align-items: center; gap: 10px; }
.pcamview video { width: 72px; height: 96px; object-fit: cover; border-radius: 10px; border: 2px solid var(--green); transform: scaleX(-1); }
.pcamview video.face { height: 72px; border-radius: 50%; }
.pcamhint { margin: 0; font-size: 13px; font-weight: 700; color: #d7e4ff; text-align: left; }

/* TV: a player's camera standing on their tile */
.tok img.cam { display: block; object-fit: cover; border: .5vh solid #fff; box-shadow: 0 .8vh 1.6vh rgba(0,0,0,.5); background: #1a1f5a; }
.tok img.cam.face { width: 8vh; height: 8vh; border-radius: 50%; }
.tok img.cam.body { width: 7.4vh; height: 10.4vh; border-radius: 1.2vh; }
.tile.green .tok img.cam { border-color: #b6ffcb; box-shadow: 0 0 2vh var(--green), 0 .8vh 1.6vh rgba(0,0,0,.5); }
.tile.red .tok img.cam { border-color: #ffb3bb; }

.thostname { position: absolute; left: 1.6vw; bottom: 6.4vh; width: calc(17vh + 1vh); text-align: center; z-index: 2; padding: .3vh 0; border-radius: 99px;
  font: 700 1.6vh Fredoka, sans-serif; letter-spacing: .04em; color: var(--gold); background: rgba(6,10,44,.9); border: .25vh solid var(--gold); }
body.streaming .thostname { display: none; }

/* the shrinking floor: fallen tiles drop away into the dark (Kita 2026-10-04) */
.tile { transition: background .35s, box-shadow .35s, border-color .35s, transform 1.1s cubic-bezier(.5,0,.9,.4), opacity 1.1s; }
.tile.gone { transform: translateZ(-26vh) rotateX(-18deg); opacity: 0; pointer-events: none; }
.cell.gone { opacity: .08; border-color: rgba(255,255,255,.15); box-shadow: none; background: #050a26; transition: opacity .8s; }

/* phone: emoji reactions that float up on the TV */
.preact { position: fixed; left: 10px; bottom: max(10px, env(safe-area-inset-bottom)); z-index: 50; display: flex; gap: 4px; padding: 4px 6px; border-radius: 99px; background: rgba(6,10,44,.85); box-shadow: 0 0 0 1.5px rgba(255,255,255,.3); }
.preact button { border: 0; background: none; font-size: 24px; padding: 2px 3px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.preact button.sent { animation: rpop .4s; }
@keyframes rpop { 50% { transform: scale(1.5) translateY(-6px); } }
.tphone .pmain { padding-bottom: 90px; }

/* Mr. Game Time's moments (meet the players / still standing) */
.tshow { width: min(60vw, 900px); top: 58%; }
.tshow h2 { margin: 0; font: 700 5vh Fredoka, sans-serif; color: var(--gold); letter-spacing: .04em; }
.tshow p { font-size: 2.6vh; font-weight: 800; }
.showpeople { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.4vh 1.2vw; }
.showpeople .pc { display: grid; justify-items: center; gap: .4vh; padding: 1vh 1vw; border-radius: 1.4vh; background: rgba(255,255,255,.08); min-width: 9vw; animation: tpopin .5s backwards; }
.showpeople .pc .f { font-size: 6vh; line-height: 1; }
.showpeople .pc b { font-size: 2.2vh; }
.showpeople .pc small { font-weight: 900; font-size: 1.7vh; color: #ffb3c8; }
@keyframes tpopin { from { transform: scale(.3); opacity: 0; } }

.pcheer { width: 100%; max-width: 420px; display: grid; gap: 8px; padding: 12px; border-radius: 16px; background: rgba(6,10,44,.88); border: 2px solid #ff6fa8; }
.pcheertitle { font: 700 18px Fredoka, sans-serif; }
.pcheer button { padding: 12px; border-radius: 12px; border: 2px solid rgba(255,255,255,.4); background: rgba(255,255,255,.08); color: #fff; font: 800 17px Nunito, sans-serif; cursor: pointer; }
.pcheer button.on { border-color: #ff6fa8; background: rgba(255,111,168,.3); box-shadow: 0 0 12px #ff6fa8; }
/* a bigger floor for a bigger group (Kita 2026-10-06: 6×6 … 9×9): tokens and names shrink with the tiles */
.tfloor { gap: calc(7vh / var(--n)); }
.tfloor .tok .face { width: calc(35vh / var(--n)); height: calc(35vh / var(--n)); font-size: calc(23vh / var(--n)); }
.tfloor .tok .nm { font-size: calc(9vh / var(--n)); max-width: calc(70vh / var(--n)); padding: .1vh .4vw; }
.tfloor .tok .cam { width: calc(35vh / var(--n)); height: calc(35vh / var(--n)); }
.pgrid { gap: calc(40px / var(--n)); }   /* a bigger floor: smaller gaps */
/* a big group (Kita 2026-10-06): small cards so 13-50 names fit */
.showpeople.many { gap: .6vh .5vw; }
.showpeople.many .pc { min-width: 6.5vw; padding: .5vh .4vw; gap: .1vh; }
.showpeople.many .pc .f { font-size: 3.2vh; } .showpeople.many .pc b { font-size: 1.4vh; } .showpeople.many .pc small { font-size: 1.2vh; }
.podium.many { flex-wrap: wrap; justify-content: center; align-items: stretch; max-width: 70vw; }
.podium.many .step { min-width: 9vw; min-height: 0; padding: .8vh .8vw; border-radius: 1.2vh; }
.podium.many .f { font-size: 4vh; } .podium.many b { font-size: 1.8vh; } .podium.many small { font-size: 1.4vh; }
