/* Left Right Center — shared styles. Theme colours arrive as CSS variables from themes/*.js */
:root {
  --bg: #2a170d; --bg2: #5a2d14; --table: #9a6233; --table-edge: #5b3417; --cloth: #f3e2c3;
  --accent: #e8792b; --accent2: #b5262f; --gold: #f6c445; --text: #fff6e8; --muted: #e9cfa6;
  --die: #fffaf0; --die-text: #6b2a10; --good: #5fb35a; --bad: #d9473f;
  --font-display: 'Arial Rounded MT Bold', sans-serif; --font-body: system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font-body); color: var(--text);
  background: radial-gradient(ellipse at 50% 35%, var(--bg2), var(--bg) 70%) fixed, var(--bg);
  overflow-x: hidden;
}
h1, h2, h3, .display { font-family: var(--font-display); font-weight: 400; letter-spacing: .02em; margin: 0; }
button { font: inherit; cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

/* falling background decorations */
#decor { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
#decor span { position: absolute; top: -10%; opacity: .22; animation: fall linear infinite; }
@keyframes fall { from { transform: translateY(0) rotate(0); } to { transform: translateY(125vh) rotate(540deg); } }

/* buttons */
.btn {
  border: 0; border-radius: 999px; padding: .8em 1.6em; font-family: var(--font-display); font-size: 1.1em;
  background: var(--accent); color: #fff; box-shadow: 0 .25em 0 rgba(0,0,0,.35); transition: transform .08s, filter .2s;
  text-shadow: 0 2px 0 rgba(0,0,0,.2);
}
.btn:active { transform: translateY(.15em); box-shadow: 0 .1em 0 rgba(0,0,0,.35); }
.btn:disabled { filter: grayscale(.8) brightness(.7); cursor: not-allowed; }
.btn.alt { background: var(--accent2); }
.btn.ghost { background: rgba(255,255,255,.12); box-shadow: none; }
.btn.gold { background: linear-gradient(180deg, #ffe27a, var(--gold) 55%, #c98d12); color: #4a2a00; text-shadow: 0 1px 0 rgba(255,255,255,.5); }
.btn.small { font-size: .85em; padding: .5em 1em; }

/* avatars */
.avatar {
  --s: 3em; width: var(--s); height: var(--s); border-radius: 50%; display: inline-grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #fff, var(--cloth)); border: .12em solid var(--accent);
  box-shadow: 0 .15em .4em rgba(0,0,0,.4); overflow: hidden; flex: none; position: relative;
}
.avatar span { font-size: calc(var(--s) * .58); line-height: 1; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* dice */
.die {
  --d: 3em; width: var(--d); height: var(--d); border-radius: 22%; display: inline-grid; place-items: center;
  background: linear-gradient(145deg, #fff, var(--die)); color: var(--die-text);
  box-shadow: inset 0 -.18em 0 rgba(0,0,0,.15), 0 .25em .5em rgba(0,0,0,.45);
  font-family: var(--font-display); font-size: 1em; position: relative;
}
.die b { font-size: calc(var(--d) * .58); font-weight: 400; line-height: 1; }
.die .pip { width: calc(var(--d) * .28); height: calc(var(--d) * .28); border-radius: 50%; background: var(--die-text); display: block; }
.die.gold {
  background: linear-gradient(145deg, #fff4bf, var(--gold) 50%, #c98d12); color: #5a3300;
  box-shadow: inset 0 -.18em 0 rgba(0,0,0,.2), 0 0 1.2em rgba(246,196,69,.8), 0 .25em .5em rgba(0,0,0,.45);
}
.die.gold .pip { background: #5a3300; }
.die.gold b { color: #8a1f00; }
.die.tumble { animation: tumble .18s linear infinite; }
@keyframes tumble { 0% { transform: rotate(0) translateY(0); } 50% { transform: rotate(180deg) translateY(-.3em); } 100% { transform: rotate(360deg) translateY(0); } }
.die.landed { animation: land .35s cubic-bezier(.3,1.6,.5,1); }
@keyframes land { from { transform: scale(1.5); } to { transform: scale(1); } }
.die.active { outline: .15em solid #fff; outline-offset: .12em; transform: scale(1.12); transition: transform .2s; }
.die.done { opacity: .45; }

/* chip pile */
.chips { display: flex; gap: .1em; align-items: center; justify-content: center; min-height: 1.3em; }
.chips .c { font-size: 1.1em; filter: drop-shadow(0 .1em .1em rgba(0,0,0,.5)); }
.chips .n { font-family: var(--font-display); margin-left: .2em; }
.chips .zero { opacity: .6; font-size: .8em; }

.pill { display: inline-block; padding: .25em .8em; border-radius: 999px; font-weight: 900; font-size: .85em; }
.pill.paid { background: var(--good); color: #fff; }
.pill.unpaid { background: var(--bad); color: #fff; }
.pill.host { background: var(--gold); color: #4a2a00; }

/* toast */
#toast {
  visibility: hidden; position: fixed; left: 50%; bottom: 1.2em; transform: translateX(-50%) translateY(200%); z-index: 100;
  background: #222; color: #fff; padding: .8em 1.2em; border-radius: 1em; transition: transform .3s; max-width: 90vw; text-align: center;
}
#toast.show { visibility: visible; transform: translateX(-50%) translateY(0); }

.confetti { position: fixed; top: -5vh; width: .6em; height: .9em; z-index: 170; animation: confetti linear forwards; pointer-events: none; font-size: 1.6em; }
@keyframes confetti { to { transform: translateY(115vh) rotate(720deg); } }

/* ============================================================== TV */
body.tv { font-size: 2.1vh; height: 100vh; overflow: hidden; }
.tv .screen { position: absolute; inset: 0; z-index: 1; }
.tv header.hud { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 1.5vh 2.5vw; z-index: 5; }
.tv .brand small { display: block; font-family: var(--font-body); font-weight: 900; color: var(--gold); letter-spacing: .25em; text-transform: uppercase; font-size: .75em; }
.tv .brand h1 { font-size: 2.4em; line-height: 1; text-shadow: 0 .08em 0 rgba(0,0,0,.4); }
.tv .brand .ed { color: var(--accent); font-size: .95em; font-family: var(--font-display); }
.tv .potbox { text-align: right; }
.tv .potbox .amt { font-family: var(--font-display); font-size: 3em; color: var(--gold); line-height: 1; text-shadow: 0 .08em 0 rgba(0,0,0,.5); }
.tv .potbox .lbl { font-weight: 900; letter-spacing: .15em; text-transform: uppercase; font-size: .8em; color: var(--muted); }
.tv .potbox .code { font-weight: 800; color: var(--muted); }

/* setup screen */
#setup { display: grid; place-items: center; text-align: center; }
#setup .card { background: rgba(0,0,0,.25); padding: 5vh 5vw; border-radius: 3vh; }
#setup h1 { font-size: 5em; line-height: 1; }
#setup .themes { display: flex; gap: 1.5vw; justify-content: center; margin: 2vh 0 3vh; }
.setup-split { display: flex; gap: 4vw; align-items: center; justify-content: center; margin-top: 4vh; }
.setup-split .or { font-family: var(--font-display); font-size: 2em; color: var(--muted); }
#setup input.in { width: auto; }
.theme-opt { border: .25em solid transparent; background: rgba(255,255,255,.08); color: var(--text); border-radius: 2vh; padding: 2vh 2vw; min-width: 14vw; }
.theme-opt.sel { border-color: var(--gold); background: rgba(255,255,255,.16); }
.theme-opt .ic { font-size: 3em; display: block; }
#setup .btn { font-size: 1.8em; }

/* lobby */
#lobby { display: grid; grid-template-columns: 34vw 1fr; gap: 3vw; padding: 13vh 4vw 4vh; }
.joinbox { background: var(--cloth); color: #3a1d0a; border-radius: 3vh; padding: 3vh; text-align: center; align-self: start; box-shadow: 0 1vh 3vh rgba(0,0,0,.4); }
.joinbox .qr { background: #fff; border-radius: 2vh; padding: 1vh; width: 26vh; height: 26vh; margin: 1.5vh auto; }
.joinbox .qr svg { width: 100%; height: 100%; display: block; }
.joinbox .roomcode { font-family: var(--font-display); font-size: 5em; letter-spacing: .12em; color: var(--accent2); line-height: 1; }
.joinbox .url { font-weight: 800; word-break: break-all; font-size: .95em; }
.joinbox h2 { font-size: 1.8em; }
.lobby-main h2 { font-size: 3em; margin-bottom: 1vh; }
.lobby-main .sub { font-size: 1.3em; margin-bottom: 3vh; }
.lobby-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2vh 1.5vw; }
.pcard { background: rgba(0,0,0,.25); border-radius: 2vh; padding: 2vh 1vw; text-align: center; animation: pop .4s cubic-bezier(.3,1.6,.5,1); border: .2em solid transparent; }
.pcard.paid { border-color: var(--good); }
.pcard .avatar { --s: 10vh; }
.pcard .nm { font-weight: 900; font-size: 1.3em; margin: 1vh 0 .6vh; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard.empty { border: .2em dashed rgba(255,255,255,.2); background: none; display: grid; place-items: center; color: rgba(255,255,255,.3); font-size: 3em; min-height: 22vh; animation: none; }
.tvctl .pcard { cursor: pointer; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.lobby-actions { margin-top: 3vh; display: flex; gap: 1.5vw; align-items: center; flex-wrap: wrap; }
.lobby-actions .btn.go { font-size: 2em; }
.lobby-actions .hint { font-weight: 800; color: var(--muted); }
.chipval { display: inline-flex; align-items: center; gap: .6em; background: rgba(0,0,0,.25); border-radius: 999px; padding: .3em .5em; font-weight: 900; }
.chipval button { width: 2em; height: 2em; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: var(--text); font-weight: 900; }

/* game table */
#game .arena { position: absolute; left: 0; right: 0; top: 14vh; bottom: 3vh; }
.table {
  position: absolute; left: 50%; top: 50%; width: 58vw; height: 50vh; transform: translate(-50%, -50%);
  border-radius: 50%; background:
    radial-gradient(ellipse at 50% 40%, rgba(255,255,255,.18), transparent 60%),
    repeating-linear-gradient(95deg, rgba(0,0,0,.05) 0 .6vw, transparent .6vw 1.4vw),
    var(--table);
  border: 1.6vh solid var(--table-edge); box-shadow: inset 0 0 4vh rgba(0,0,0,.45), 0 3vh 6vh rgba(0,0,0,.6);
}
.table.shaking { animation: shake .12s linear 10; }
@keyframes shake { 0%,100% { transform: translate(-50%,-50%) rotate(0); } 25% { transform: translate(-51.5%,-49%) rotate(-1.5deg); } 75% { transform: translate(-48.5%,-51%) rotate(1.5deg); } }
.platter {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 17vh; height: 17vh; border-radius: 50%;
  background: radial-gradient(circle, #fff, var(--cloth) 70%); border: .6vh solid rgba(0,0,0,.15); display: grid; place-items: center; text-align: center; color: #3a1d0a;
  box-shadow: 0 1vh 2vh rgba(0,0,0,.35);
}
.platter .ic { font-size: 5.5vh; line-height: 1; }
.platter .cnt { font-family: var(--font-display); font-size: 2.2em; line-height: 1; }
.platter .lbl { font-size: .7em; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; }
.platter.bump { animation: land .35s cubic-bezier(.3,1.6,.5,1); }
.tray { position: absolute; left: 50%; top: calc(50% - 16vh); transform: translate(-50%, -50%); display: flex; gap: 2vh; z-index: 4; pointer-events: none; }
.tray .die { --d: 11vh; }

.seat { position: absolute; transform: translate(-50%, -50%); text-align: center; z-index: 3; width: 24vh; }
.seat .avatar { --s: 11vh; transition: box-shadow .3s, transform .3s; }
.seat .nm { font-weight: 900; font-size: 1.15em; background: rgba(0,0,0,.55); border-radius: 999px; padding: .15em .7em; margin-top: -.6em; position: relative; display: inline-block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat .chips { font-size: 1.3em; margin-top: .25em; }
.seat.turn .avatar { box-shadow: 0 0 0 .5vh #fff, 0 0 4vh 1vh var(--gold); transform: scale(1.12); }
.seat.turn .nm { background: var(--accent); }
.seat.out .avatar { filter: grayscale(.9) brightness(.7); }
.seat.winner .avatar { box-shadow: 0 0 0 .6vh var(--gold), 0 0 6vh 2vh var(--gold); transform: scale(1.25); }
.seat .tag { position: absolute; top: -.6em; left: 50%; transform: translateX(-50%); font-family: var(--font-display); background: var(--accent2); padding: .05em .6em; border-radius: .5em; font-size: 1.1em; z-index: 2; }
.seat.flying { z-index: 6; }
.flychip { position: fixed; z-index: 50; font-size: 4.5vh; transition: transform .5s cubic-bezier(.4,0,.2,1); pointer-events: none; filter: drop-shadow(0 .5vh .5vh rgba(0,0,0,.5)); }

.banner { position: absolute; left: 25vw; right: 25vw; top: 3vh; text-align: center; z-index: 5; }
.banner span { display: inline-block; background: rgba(0,0,0,.55); padding: .35em 1.2em; border-radius: 999px; font-family: var(--font-display); font-size: 1.8em; }
.banner span:empty { display: none; }
.bigword { position: absolute; inset: 0; display: grid; place-items: center; z-index: 20; pointer-events: none; }
.bigword span { font-family: var(--font-display); font-size: 12vh; color: var(--gold); text-shadow: 0 1vh 0 rgba(0,0,0,.4), 0 0 5vh rgba(246,196,69,.6); animation: bigword 2s ease-out forwards; text-align: center; line-height: 1.05; }
.bigword small { display: block; font-size: .35em; color: #fff; }
@keyframes bigword { 0% { transform: scale(.2) rotate(-8deg); opacity: 0; } 20% { transform: scale(1.15) rotate(3deg); opacity: 1; } 35% { transform: scale(1) rotate(0); } 85% { opacity: 1; } 100% { opacity: 0; transform: scale(1.1); } }

.tvbar { position: absolute; right: 2vw; bottom: 2vh; z-index: 6; display: flex; gap: .8vw; opacity: .85; }
.tvbar .btn { font-size: .8em; }

/* winner overlay */
#over { background: rgba(0,0,0,.65); display: grid; place-items: center; z-index: 30; text-align: center; animation: fadein .5s; }
@keyframes fadein { from { opacity: 0; } }
#over .avatar { --s: 28vh; border-width: 1vh; border-color: var(--gold); box-shadow: 0 0 10vh var(--gold); animation: pop .6s cubic-bezier(.3,1.6,.5,1); }
#over h2 { font-size: 7em; margin-top: 3vh; line-height: 1; }
#over .amt { font-family: var(--font-display); font-size: 5em; color: var(--gold); }
#over p { font-size: 1.6em; font-weight: 800; }

/* ============================================================== PHONE */
body.phone { font-size: 17px; min-height: 100%; }
.phone main { position: relative; z-index: 1; max-width: 480px; margin: 0 auto; padding: 16px 16px 120px; }
.phone .top { text-align: center; padding: 6px 0 12px; }
.phone .top small { color: var(--gold); font-weight: 900; letter-spacing: .2em; text-transform: uppercase; font-size: 11px; }
.phone .top h1 { font-size: 30px; line-height: 1; }
.phone .top .ed { color: var(--accent); font-family: var(--font-display); }
.panel { background: rgba(0,0,0,.28); border-radius: 20px; padding: 16px; margin-bottom: 14px; }
.panel h3 { font-size: 20px; margin-bottom: 10px; }
label.f { display: block; font-weight: 900; margin: 10px 0 6px; }
input.in {
  width: 100%; font: inherit; font-size: 20px; padding: 12px 14px; border-radius: 14px; border: 3px solid transparent;
  background: var(--cloth); color: #3a1d0a; font-weight: 800; outline: none;
}
input.in:focus { border-color: var(--accent); }
input.code { text-transform: uppercase; letter-spacing: .3em; text-align: center; font-family: var(--font-display); font-size: 28px; }
.avgrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.avgrid button { aspect-ratio: 1; border-radius: 50%; border: 3px solid transparent; background: rgba(255,255,255,.1); font-size: 26px; padding: 0; }
.avgrid button.sel { border-color: var(--gold); background: rgba(255,255,255,.25); transform: scale(1.08); }
.avgrid.faces { margin-bottom: 10px; }
.avgrid.faces button { overflow: hidden; background: rgba(255,255,255,.15); }
.avgrid.faces img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.photo-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.photo-row .avatar { --s: 64px; }
.phone .btn.big { width: 100%; font-size: 24px; padding: 16px; margin-top: 14px; }
.me { display: flex; align-items: center; gap: 14px; }
.me .avatar { --s: 72px; }
.me .nm { font-family: var(--font-display); font-size: 26px; }
.plist { list-style: none; padding: 0; margin: 0; }
.plist li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.plist li:last-child { border: 0; }
.plist .avatar { --s: 40px; }
.plist .nm { flex: 1; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toggle { border: 0; border-radius: 999px; padding: 8px 14px; font-weight: 900; color: #fff; background: var(--bad); min-width: 92px; }
.toggle.on { background: var(--good); }
.x { border: 0; background: rgba(255,255,255,.12); color: var(--text); width: 34px; height: 34px; border-radius: 50%; font-weight: 900; }
.statusbig { text-align: center; font-family: var(--font-display); font-size: 22px; margin: 6px 0; }
.potline { display: flex; justify-content: space-between; align-items: center; font-weight: 900; }
.potline .amt { font-family: var(--font-display); font-size: 28px; color: var(--gold); }
.plate { text-align: center; }
.plate .count { font-family: var(--font-display); font-size: 72px; line-height: 1; }
.plate .chips { font-size: 34px; margin: 6px 0; min-height: 44px; }
.neighbors { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; }
.neighbors div { flex: 1; background: rgba(255,255,255,.08); border-radius: 14px; padding: 8px; font-weight: 800; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.neighbors div:last-child { flex-direction: row-reverse; text-align: right; }
.neighbors .avatar { --s: 34px; }
.neighbors b { font-family: var(--font-display); font-weight: 400; color: var(--gold); font-size: 18px; }
.rollbtn { width: 100%; font-size: 40px; padding: 26px; border-radius: 28px; margin-top: 4px; }
.rollbtn.pulse { animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.04); box-shadow: 0 .25em 0 rgba(0,0,0,.35), 0 0 30px var(--gold); } }
.lastroll { text-align: center; }
.lastroll .dice { display: flex; justify-content: center; gap: 10px; margin: 8px 0; }
.lastroll .die { --d: 52px; }
.lastroll p { margin: 4px 0 0; font-weight: 700; }
.hostbar { display: flex; gap: 8px; flex-wrap: wrap; }
.hostbar .btn { flex: 1; }
.seg { display: flex; gap: 6px; }
.seg button { flex: 1; border: 3px solid transparent; background: rgba(255,255,255,.1); color: var(--text); border-radius: 12px; padding: 8px; font-weight: 900; }
.seg button.sel { border-color: var(--gold); }
.winbox { text-align: center; }
.winbox .avatar { --s: 140px; border-color: var(--gold); box-shadow: 0 0 40px var(--gold); }
.winbox h2 { font-size: 36px; margin-top: 10px; }
.winbox .amt { font-family: var(--font-display); font-size: 44px; color: var(--gold); }
.center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; }
.spacer { flex: 1; }

.invite-qr { background: #fff; border-radius: 16px; padding: 8px; width: 190px; height: 190px; margin: 6px auto; }
.invite-qr svg { width: 100%; height: 100%; display: block; }
.viewer .tvctl-only { display: none !important; }

/* 3D dice */
.cube3d { --d: 3em; width: var(--d); height: var(--d); perspective: calc(var(--d) * 7); display: inline-block; transition: transform .25s, opacity .3s, filter .3s; }
.cube { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; }
.cube .face { position: absolute; left: 0; top: 0; width: var(--d); height: var(--d); border-radius: 14%; backface-visibility: hidden;
  box-shadow: inset 0 0 0 calc(var(--d) * .03) rgba(0,0,0,.08), inset 0 calc(var(--d) * -.08) 0 rgba(0,0,0,.12); }
.cube .front  { transform: translateZ(calc(var(--d) / 2)); }
.cube .back   { transform: rotateY(180deg) translateZ(calc(var(--d) / 2)); }
.cube .right  { transform: rotateY(90deg) translateZ(calc(var(--d) / 2)); }
.cube .left   { transform: rotateY(-90deg) translateZ(calc(var(--d) / 2)); }
.cube .top    { transform: rotateX(90deg) translateZ(calc(var(--d) / 2)); }
.cube .bottom { transform: rotateX(-90deg) translateZ(calc(var(--d) / 2)); }
.cube3d { filter: drop-shadow(0 calc(var(--d) * .12) calc(var(--d) * .1) rgba(0,0,0,.5)); }
.cube3d.gold { filter: drop-shadow(0 0 calc(var(--d) * .25) rgba(246,196,69,.9)); }
.cube3d.active { transform: scale(1.15); filter: drop-shadow(0 0 calc(var(--d) * .2) #fff); }
.cube3d.done { opacity: .45; }
.tray .cube3d { --d: 12vh; }

/* phone roll overlay */
#rollFx { position: fixed; inset: 0; z-index: 70; background: rgba(15,8,4,.9); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: grid; place-items: center; text-align: center; animation: fadein .2s; }
#rollFx .who { font-family: var(--font-display); font-size: 28px; margin-bottom: 26px; }
#rollFx .dice { display: flex; gap: 22px; justify-content: center; min-height: 100px; }
#rollFx .cube3d { --d: 84px; }
#rollFx .res { margin-top: 26px; font-weight: 800; font-size: 19px; min-height: 2.6em; padding: 0 20px; opacity: 0; transition: opacity .3s; }
#rollFx .res.show { opacity: 1; }
#rollFx .shk { font-family: var(--font-display); color: var(--gold); font-size: 40px; margin-top: 10px; }

.viewer-only { display: none; }
.viewer .viewer-only { display: block; }

/* ---------- wobbling avatars (TV + phone) ---------- */
@keyframes wobble { 0%, 100% { transform: rotate(-5deg) translateY(0); } 50% { transform: rotate(5deg) translateY(-4%); } }
@keyframes wobbleTurn { 0%, 100% { transform: rotate(-9deg) scale(1.12) translateY(0); } 50% { transform: rotate(9deg) scale(1.2) translateY(-10%); } }
@keyframes cheer { 0%, 100% { transform: scale(1.2) translateY(0) rotate(0); } 25% { transform: scale(1.3) translateY(-18%) rotate(-10deg); } 75% { transform: scale(1.3) translateY(-18%) rotate(10deg); } }
@keyframes droop { 0%, 100% { transform: rotate(-2deg) translateY(4%); } 50% { transform: rotate(2deg) translateY(6%); } }
.seat .avatar, .pseat .avatar { animation: wobble 2.6s ease-in-out infinite; animation-delay: var(--wd, 0s); }
.seat.turn .avatar, .pseat.turn .avatar { animation: wobbleTurn .8s ease-in-out infinite; }
.seat.winner .avatar, .pseat.winner .avatar { animation: cheer .9s ease-in-out infinite; }
.seat.out .avatar, .pseat.out .avatar { animation: droop 4s ease-in-out infinite; animation-delay: var(--wd, 0s); }
.seat.turn .avatar { transform: none; }

/* ---------- phone table ---------- */
#ptable { margin: 0 -8px 10px; }
.pwrap { position: relative; width: 100%; aspect-ratio: 1 / .92; --av: 52px; margin-bottom: 34px; }
.pwrap.shaking { animation: pshake .1s linear 8; }
@keyframes pshake { 0%,100% { transform: translate(0,0) rotate(0); } 25% { transform: translate(-6px,3px) rotate(-1.5deg); } 75% { transform: translate(6px,-3px) rotate(1.5deg); } }
.ptbl { position: absolute; left: 15%; right: 15%; top: 17%; bottom: 17%; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 40%, rgba(255,255,255,.18), transparent 60%), repeating-linear-gradient(95deg, rgba(0,0,0,.05) 0 6px, transparent 6px 14px), var(--table);
  border: 7px solid var(--table-edge); box-shadow: inset 0 0 18px rgba(0,0,0,.45), 0 10px 24px rgba(0,0,0,.55); }
.pplatter { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 64px; height: 64px; border-radius: 50%;
  background: radial-gradient(circle, #fff, var(--cloth) 70%); color: #3a1d0a; display: grid; place-items: center; align-content: center; box-shadow: 0 4px 10px rgba(0,0,0,.35); transition: opacity .3s; }
.pplatter .ic { font-size: 22px; line-height: 1; }
.pplatter b { font-family: var(--font-display); font-weight: 400; font-size: 20px; line-height: 1; }
.ptray { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; gap: 10px; z-index: 4; opacity: 0; transition: opacity .35s; pointer-events: none; }
.ptray.on { opacity: 1; }
.ptray.on ~ .pplatter, .pwrap:has(.ptray.on) .pplatter { opacity: .15; }
.ptray .cube3d { --d: 46px; }
.ppot { position: absolute; right: 2%; top: 0; text-align: right; line-height: 1; }
.ppot small { display: block; font-weight: 900; letter-spacing: .15em; font-size: 10px; color: var(--muted); }
.ppot b { font-family: var(--font-display); font-weight: 400; color: var(--gold); font-size: 22px; }
.pseat { position: absolute; transform: translate(-50%, -50%); text-align: center; width: calc(var(--av) * 1.7); z-index: 3;
}
.pseat .avatar { --s: var(--av); border-width: 3px; }
.pseat .nm { font-weight: 900; font-size: 12px; background: rgba(0,0,0,.6); border-radius: 999px; padding: 1px 7px; margin-top: -6px; position: relative;
  display: inline-block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pseat .pc { font-size: 13px; font-weight: 900; margin-top: 1px; }
.pseat .pc b { font-family: var(--font-display); font-weight: 400; margin-left: 2px; }
.pseat .pc i { font-style: normal; color: var(--muted); font-size: 11px; }
.pseat.mine .nm { background: var(--gold); color: #4a2a00; }
.pseat.turn .avatar { box-shadow: 0 0 0 3px #fff, 0 0 18px 4px var(--gold); }
.pseat.turn .nm { background: var(--accent); color: #fff; }
.pseat.out .avatar { filter: grayscale(.9) brightness(.7); }
.pseat .tag { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); font-family: var(--font-display); background: var(--accent2); padding: 0 6px; border-radius: 6px; font-size: 13px; z-index: 2; }
.presult { text-align: center; min-height: 1.6em; font-weight: 700; padding: 0 12px; margin-top: -4px; }
.presult .shk { font-family: var(--font-display); font-weight: 400; color: var(--gold); }
.flychip.phone { font-size: 26px; transition: transform .42s cubic-bezier(.4,0,.2,1); }

/* ---------- in-game phone layout: compact header, table on top, action bar pinned to the bottom ---------- */
.ingame .top { padding: 0 0 2px; }
.ingame .top small, .ingame .top .ed { display: none; }
.ingame .top h1 { font-size: 20px; }
.ingame main { padding-top: 8px; padding-bottom: 150px; }
.ingame .pwrap { width: min(100%, 54vh); margin: 18px auto 26px; }
.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 70%, transparent); text-align: center;
}
.actionbar > * { max-width: 448px; margin-left: auto; margin-right: auto; }
.actionbar .statusbig { margin: 4px auto; font-size: 19px; }
.actionbar .rollbtn { font-size: 30px; padding: 16px; margin-top: 2px; }
.actionbar:not(.myturn) { padding-top: 26px; }

/* ---------- prominent slice counts + big L / R badges ---------- */
.pseat .pc { display: inline-flex; align-items: center; gap: 3px; margin-top: 3px; background: rgba(0,0,0,.55); border: 2px solid var(--gold);
  border-radius: 999px; padding: 0 9px 0 6px; line-height: 1.25; }
.pseat .pc span { font-size: 16px; }
.pseat .pc b { font-family: var(--font-display); font-weight: 400; font-size: 24px; color: var(--gold); margin: 0; }
.pseat .pc.zero { border-color: rgba(255,255,255,.25); }
.pseat .pc.zero b { color: var(--muted); }
.pseat .pc.zero span { filter: grayscale(1); opacity: .5; }

@keyframes tagpop { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }
.pseat .tag, .seat .tag { display: grid; place-items: center; border-radius: 50%; color: #fff; font-family: var(--font-display);
  border: 3px solid #fff; box-shadow: 0 3px 8px rgba(0,0,0,.5); z-index: 5; animation: tagpop 1s ease-in-out infinite; padding: 0; }
.pseat .tag { width: 36px; height: 36px; font-size: 24px; top: -10px; left: auto; right: 2px; transform: none; }
.seat .tag { width: 6.5vh; height: 6.5vh; font-size: 4.4vh; top: -2vh; left: auto; right: 2vh; transform: none; }
.tag.tl { background: #2a7cf0; }
.tag.tr { background: #e0362c; }
.pseat .tag:not(.tl):not(.tr), .seat .tag:not(.tl):not(.tr) { background: var(--accent2); width: auto; border-radius: 12px; padding: 0 8px; }

.seat .chips { margin-top: .3em; }
.cnum { display: inline-flex; align-items: center; gap: .25em; background: rgba(0,0,0,.55); border: .25vh solid var(--gold); border-radius: 999px; padding: 0 .7em 0 .45em; line-height: 1.2; }
.cnum .c { font-size: 1.1em; }
.cnum b { font-family: var(--font-display); font-weight: 400; font-size: 2.1em; color: var(--gold); }
.cnum.zero { border-color: rgba(255,255,255,.25); }
.cnum.zero b { color: var(--muted); }
.cnum.zero .c { filter: grayscale(1); opacity: .5; }

/* ---------- phone turned sideways (e.g. mirrored to a TV): table on the left, controls on the right, no scrolling ---------- */
@media (orientation: landscape) and (max-height: 560px) {
  body.phone.ingame { overflow: hidden; height: 100vh; height: 100dvh; }
  .phone.ingame main { max-width: none; padding: 0; height: 100vh; height: 100dvh; }
  .phone.ingame .top { display: none; }
  .phone.ingame #ptable { position: fixed; left: env(safe-area-inset-left); top: 0; bottom: 0; width: 64vw; margin: 0;
    display: flex; flex-direction: column; justify-content: center; align-items: center; }
  .phone.ingame .pwrap { width: min(60vw, 88vh); width: min(60vw, 88dvh); margin: 0 auto 4px; }
  .phone.ingame .presult { font-size: 14px; min-height: 1.3em; margin: 0; }
  .phone.ingame #app { position: fixed; right: 0; top: 0; bottom: 0; width: 34vw; overflow-y: auto;
    padding: 10px calc(10px + env(safe-area-inset-right)) 140px 6px; }
  .phone.ingame #app .panel { padding: 10px; margin-bottom: 8px; border-radius: 14px; }
  .phone.ingame .plate .count { font-size: 34px !important; }
  .phone.ingame .neighbors div { font-size: 12px; padding: 5px; }
  .phone.ingame .neighbors .avatar { --s: 26px; }
  .phone.ingame .actionbar { left: auto; width: 34vw; padding: 8px calc(10px + env(safe-area-inset-right)) 10px 6px; background: linear-gradient(to top, var(--bg) 75%, transparent); }
  .phone.ingame .actionbar .rollbtn { font-size: 22px; padding: 12px; border-radius: 20px; }
  .phone.ingame .actionbar .statusbig { font-size: 15px; }
  .phone.ingame .winbox .avatar { --s: 70px; }
  .phone.ingame .winbox h2 { font-size: 22px; }
  .phone.ingame .winbox .amt { font-size: 28px; }
  .phone.ingame .btn.big { font-size: 18px; padding: 10px; margin-top: 8px; }
  .phone.ingame .lastroll { display: none; }
}

/* Start over / Cancel button (phone) */
.topbtn { position: fixed; top: calc(8px + env(safe-area-inset-top)); left: calc(10px + env(safe-area-inset-left)); z-index: 60;
  border: 0; border-radius: 999px; padding: 6px 12px; font-weight: 900; font-size: 13px; color: var(--text); background: rgba(0,0,0,.45);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.topbtn:active { transform: scale(.96); }
@media (max-width: 400px) { .phone:not(.ingame) .top { padding-top: 30px; } }

/* ---------- "X is rolling…" banner ---------- */
.rollingnow { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 auto;
  background: linear-gradient(180deg, var(--accent), #b9551a); border: 3px solid var(--gold); border-radius: 22px; padding: 10px 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,.45), 0 0 22px rgba(246,196,69,.35); animation: rollglow 1.4s ease-in-out infinite; }
.rollingnow .avatar { --s: 52px; border-color: #fff; animation: wobbleTurn .8s ease-in-out infinite; }
.rollingnow span { font-family: var(--font-display); font-size: 30px; line-height: 1.05; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.3); text-align: left; }
.rollingnow small { display: block; font-size: 18px; color: #ffe9b8; }
@keyframes rollglow { 50% { box-shadow: 0 6px 18px rgba(0,0,0,.45), 0 0 34px rgba(246,196,69,.7); } }
.actionbar:not(.myturn) { padding-top: 22px; }
.presult b { font-family: var(--font-display); font-weight: 400; font-size: 22px; }

@media (orientation: landscape) and (max-height: 560px) {
  /* oval table */
  .phone.ingame .pwrap { aspect-ratio: 1.6 / 1; width: min(62vw, 140vh); width: min(62vw, 140dvh); max-height: 86dvh; }
  .phone.ingame .ptbl { left: 12%; right: 12%; top: 16%; bottom: 16%; }
  .phone.ingame .ppot { right: -2%; top: -4%; }
  .phone.ingame .rollingnow { padding: 6px 10px; gap: 8px; border-radius: 16px; }
  .phone.ingame .rollingnow .avatar { --s: 38px; }
  .phone.ingame .rollingnow span { font-size: 21px; }
  .phone.ingame .rollingnow small { font-size: 13px; }
  .phone.ingame .presult b { font-size: 17px; }
}

/* TV: roll button for the person playing at this screen */
.tvmyroll { position: absolute; left: 2vw; bottom: 9vh; z-index: 7; }
.tvmyroll .btn { font-size: 2.2em; padding: .5em 1.2em; animation: pulse 1.1s ease-in-out infinite; }
.tvmyroll .btn:disabled { animation: none; }

/* ---------- ★ face + picking ---------- */
.die .star { color: #d99a00; font-family: system-ui, sans-serif; font-size: calc(var(--d) * .62); text-shadow: 0 1px 0 rgba(0,0,0,.25); }
.die.gold .star { color: #b3001b; }
.pickbox { background: rgba(0,0,0,.55); border: 3px solid var(--gold); border-radius: 20px; padding: 10px; box-shadow: 0 0 26px rgba(246,196,69,.45); }
.picktitle { font-family: var(--font-display); font-size: 22px; color: var(--gold); margin-bottom: 8px; display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; }
.pickleft { font-family: var(--font-body); font-weight: 900; font-size: 13px; background: var(--accent2); color: #fff; border-radius: 999px; padding: 2px 10px; }
.picklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; max-height: 34vh; overflow-y: auto; }
.pickbtn { display: flex; align-items: center; gap: 8px; border: 2px solid rgba(255,255,255,.2); background: rgba(255,255,255,.1); color: var(--text);
  border-radius: 14px; padding: 6px 10px 6px 6px; font-weight: 900; text-align: left; }
.pickbtn:active { transform: scale(.97); background: var(--accent); }
.pickbtn .avatar { --s: 36px; flex: none; }
.pickbtn span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pickbtn b { font-family: var(--font-display); font-weight: 400; color: var(--gold); font-size: 18px; }
@keyframes pickpulse { 0%, 100% { box-shadow: 0 0 0 3px var(--gold), 0 0 10px 2px var(--gold); } 50% { box-shadow: 0 0 0 5px #fff, 0 0 22px 6px var(--gold); } }
.pseat.pickable { cursor: pointer; z-index: 6; }
.pseat.pickable .avatar { animation: pickpulse .9s ease-in-out infinite !important; }
.pseat.pickable::after { content: '⭐'; position: absolute; left: -4px; top: -6px; font-size: 22px; }
@media (orientation: landscape) and (max-height: 560px) {
  .phone.ingame .picktitle { font-size: 16px; }
  .phone.ingame .picklist { grid-template-columns: 1fr 1fr; max-height: 46vh; }
  .phone.ingame .pickbtn { padding: 3px 6px 3px 3px; font-size: 13px; }
  .phone.ingame .pickbtn .avatar { --s: 26px; }
}

.seat.pickable { cursor: pointer; z-index: 6; }
.seat.pickable .avatar { animation: pickpulse .9s ease-in-out infinite !important; }
.seat.pickable::after { content: '⭐'; position: absolute; left: 2vh; top: -1vh; font-size: 4.5vh; }

/* ---------- Make Holidays Fun Again logo ---------- */
.mhfa { display: block; width: 100%; height: auto; filter: drop-shadow(0 4px 0 rgba(0,0,0,.25)); }
.logo-big { width: min(440px, 86vw); margin: 0 auto 10px; }
.tv .logo-big { width: 30vw; }
.logo-phone { width: 230px; margin: 0 auto 4px; }
.tv .brand { display: flex; flex-direction: column; gap: .4vh; }
.logo-hud { width: 18vw; }
.tv .brand .titleline { display: flex; align-items: baseline; gap: .8vw; }
.tv .brand .titleline h1 { font-size: 1.7em; }
.ingame .logo-phone { display: none; }

/* the player whose turn it is: bottom centre and bigger */
.seat .avatar, .pseat .avatar { transition: width .45s ease, height .45s ease, box-shadow .3s; }
.seat.turn .avatar { --s: 17vh; }
.seat.turn { z-index: 5; }
.pseat.turn .avatar { --s: calc(var(--av) * 1.5); }
.pseat.turn { z-index: 5; }
.seat.winner .avatar { --s: 17vh; }
.pseat.winner .avatar { --s: calc(var(--av) * 1.5); }

/* the pup peeking over "Make Holidays" */
.mhfa .pup { transform-box: fill-box; transform-origin: 50% 100%; animation: pup 9s ease-in-out infinite; transform: translateY(105%); }
@keyframes pup {
  0%, 6%   { transform: translateY(105%) rotate(0deg); }
  13%      { transform: translateY(-7%) rotate(0deg); }
  17%      { transform: translateY(0) rotate(0deg); }
  24%, 33% { transform: translateY(0) rotate(-10deg); }
  41%, 50% { transform: translateY(0) rotate(9deg); }
  55%      { transform: translateY(-6%) rotate(0deg); }
  60%      { transform: translateY(0) rotate(0deg); }
  68%, 100%{ transform: translateY(105%) rotate(0deg); }
}
@media (prefers-reduced-motion: reduce) { .mhfa .pup { animation: none; transform: translateY(0); } }
body.rec .mhfa .pup { display: none; }

/* ---------- HOT SEAT: roller + their L and R during a roll ---------- */
.hs { position: absolute; inset: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35em;
  background: radial-gradient(ellipse at 50% 55%, var(--bg2), var(--bg) 75%); opacity: 0; transform: scale(1.04); transition: opacity .32s, transform .32s; border-radius: 18px; overflow: hidden; }
.hs.on { opacity: 1; transform: none; }
.hs-dice { display: flex; gap: .35em; min-height: 1.2em; }
.hs-dice .cube3d { --d: var(--hsd); }
.hs-dice .cube3d .die { --d: var(--hsd); }
.hs-row { display: flex; align-items: flex-end; justify-content: center; gap: .45em; width: 100%; }
.hs-p { position: relative; text-align: center; width: 3.2em; display: flex; flex-direction: column; align-items: center; }
/* while the Hot Seat plays, the regular table underneath is hidden */
.hs-busy > :not(.hs) { opacity: 0 !important; transition: opacity .3s; }
.hs-busy .seat, .hs-busy .pseat { pointer-events: none; }
.hs-p.hs-c { width: 4.1em; }
.hs-av .avatar { --s: 2.1em; border-width: .08em; animation: wobble 2.4s ease-in-out infinite; }
.hs-c .hs-av .avatar { --s: 3em; border-color: var(--gold); box-shadow: 0 0 0 .06em #fff, 0 0 .5em .1em var(--gold); animation: wobbleTurn .8s ease-in-out infinite; }
.hs-nm { display: inline-block; max-width: 100%; margin-top: -.15em; position: relative; background: rgba(0,0,0,.6); border-radius: 999px; padding: .02em .35em;
  font-weight: 900; font-size: .3em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.hs-c .hs-nm { background: var(--accent); font-size: .36em; }
.hs-ct { display: inline-flex; align-items: center; gap: .08em; margin-top: .1em; background: rgba(0,0,0,.55); border: .04em solid var(--gold); border-radius: 999px; padding: 0 .22em 0 .14em; font-size: .62em; line-height: 1.15; }
.hs-ct span { font-size: .6em; }
.hs-ct b { font-family: var(--font-display); font-weight: 400; color: var(--gold); }
.hs-tag { position: absolute; top: -.2em; right: .05em; z-index: 2; width: .9em; height: .9em; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-display); font-size: .7em; color: #fff; border: .07em solid #fff; background: var(--accent2); box-shadow: 0 .05em .15em rgba(0,0,0,.5); }
.hs-tag.tl { background: #2a7cf0; } .hs-tag.tr { background: #e0362c; }
.hs-p.got .hs-av { animation: hsgot .5s cubic-bezier(.3,1.6,.5,1); }
@keyframes hsgot { 0% { transform: scale(1); } 40% { transform: scale(1.22) translateY(-8%); } 100% { transform: scale(1); } }
.hs-pot { display: inline-flex; align-items: center; gap: .15em; background: radial-gradient(circle, #fff, var(--cloth) 75%); color: #3a1d0a; border-radius: 999px; padding: .05em .4em; font-size: .42em; box-shadow: 0 .1em .25em rgba(0,0,0,.4); }
.hs-pot b { font-family: var(--font-display); font-weight: 400; font-size: 1.3em; line-height: 1.1; }
.hs-pot small { font-weight: 900; letter-spacing: .1em; font-size: .55em; }
.hs-pot.bump { animation: land .35s cubic-bezier(.3,1.6,.5,1); }
.hs-shout { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%) scale(.3); opacity: 0; text-align: center; pointer-events: none; z-index: 5;
  font-family: var(--font-display); font-size: 1.55em; line-height: 1; color: #fff; text-shadow: 0 .06em 0 rgba(0,0,0,.45), 0 0 .3em rgba(0,0,0,.5); -webkit-text-stroke: .02em rgba(0,0,0,.35); }
.hs-shout.go { animation: shout .9s cubic-bezier(.2,1.5,.4,1) forwards; }
.hs-shout.left { color: #6fb2ff; } .hs-shout.right { color: #ff7a6e; } .hs-shout.center { color: var(--gold); }
.hs-shout.star { color: #ffd23e; } .hs-shout.shake { color: var(--gold); } .hs-shout.keep { color: #d8f5c9; }
@keyframes shout { 0% { opacity: 0; transform: translateY(-50%) scale(.3) rotate(-8deg); } 25% { opacity: 1; transform: translateY(-50%) scale(1.12) rotate(3deg); }
  45% { transform: translateY(-50%) scale(1) rotate(-1deg); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-62%) scale(1.05); } }
.hsfly { position: fixed; z-index: 80; transition: transform .48s cubic-bezier(.4,0,.2,1); pointer-events: none; filter: drop-shadow(0 .1em .1em rgba(0,0,0,.5)); }

/* ---------------------------------------------------------------- host: "turn your phone sideways" prompt */
.rotate-me { display: none; }
@media (orientation: portrait) {
  body.need-rotate .rotate-me {
    display: flex; position: fixed; inset: 0; z-index: 200; flex-direction: column; align-items: center; justify-content: center;
    background: radial-gradient(ellipse at center, var(--bg2, #5a2d14), var(--bg, #2a170d) 75%); color: #fff; text-align: center; padding: 24px;
    animation: rmIn .35s ease;
  }
}
.rm-phone { font-size: 110px; line-height: 1; animation: rmTurn 2.2s ease-in-out infinite; transform-origin: 50% 60%; }
.rm-title { font-family: 'Lilita One', system-ui; font-size: 34px; margin-top: 26px; color: var(--gold, #ffc53d); }
.rm-sub { font-size: 20px; margin-top: 6px; opacity: .9; }
.rm-skip { margin-top: 44px; background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: 12px 20px; font-size: 15px; font-weight: 700; }
@keyframes rmTurn { 0%, 20% { transform: rotate(0deg); } 50%, 80% { transform: rotate(-90deg); } 100% { transform: rotate(0deg); } }
@keyframes rmIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------------------------------------------------------------- host winner card (mirrored to the TV) */
.win-show { position: fixed; inset: 0; z-index: 150; display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: radial-gradient(ellipse at center, rgba(90,45,20,.97), rgba(20,10,5,.98) 70%); opacity: 0; transition: opacity .4s; text-align: center; color: #fff; }
.win-show.on { opacity: 1; }
.ws-rays { position: absolute; width: 220vmax; height: 220vmax; left: 50%; top: 50%; margin: -110vmax 0 0 -110vmax; opacity: .22;
  background: repeating-conic-gradient(var(--gold, #ffc53d) 0 7deg, transparent 7deg 20deg); animation: wsSpin 24s linear infinite; }
.ws-in { position: relative; display: flex; flex-direction: column; align-items: center; transform: scale(.6); transition: transform .6s cubic-bezier(.2,1.6,.4,1); }
.win-show.on .ws-in { transform: scale(1); }
.ws-label { font-family: 'Lilita One', system-ui; font-size: min(13vw, 11vh); color: var(--gold, #ffc53d); letter-spacing: 2px; line-height: 1;
  text-shadow: 0 .06em 0 #b8650f, 0 .12em .3em rgba(0,0,0,.6); animation: wsPulse 1.2s ease-in-out infinite; }
.ws-av { margin: 3vh 0 1.5vh; }
.ws-av .avatar { --s: min(42vw, 34vh); box-shadow: 0 0 0 .5vh var(--gold, #ffc53d), 0 0 6vh rgba(255,197,61,.6); animation: wobbleTurn 1.6s ease-in-out infinite; }
.ws-name { font-family: 'Lilita One', system-ui; font-size: min(11vw, 8vh); line-height: 1.05; max-width: 90vw; overflow-wrap: anywhere; }
.ws-amt { font-family: 'Lilita One', system-ui; font-size: min(19vw, 15vh); color: #8fe28f; line-height: 1.05; margin-top: .5vh;
  text-shadow: 0 .05em 0 #2f7a2f, 0 .1em .3em rgba(0,0,0,.6); }
.ws-sub { font-size: min(5vw, 3.2vh); opacity: .9; }
.ws-go { margin-top: 3vh; background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: 1.4vh 3vh; font-size: min(4.5vw, 2.6vh); font-weight: 800; }
@media (orientation: landscape) {
  .ws-in { display: grid; grid-template-columns: auto auto; grid-template-areas: "label label" "av name" "av amt" "av sub" "go go"; align-items: center; column-gap: 5vw; }
  .ws-label { grid-area: label; } .ws-av { grid-area: av; margin: 2vh 0; } .ws-name { grid-area: name; align-self: end; text-align: left; }
  .ws-amt { grid-area: amt; text-align: left; } .ws-sub { grid-area: sub; text-align: left; align-self: start; } .ws-go { grid-area: go; justify-self: center; }
  .ws-av .avatar { --s: 46vh; }
}
@keyframes wsSpin { to { transform: rotate(360deg); } }
@keyframes wsPulse { 50% { transform: scale(1.06); } }

/* ---------------------------------------------------------------- game over: pie in the face for everyone but the winner */
.seat .av, .pseat .av { position: relative; }
.seat.pied .av::after, .pseat.pied .av::after {
  content: ''; position: absolute; left: 16%; top: -14%; width: 92%; height: 92%; pointer-events: none; z-index: 3;
  background: url(../img/pie-splat.svg?v=2) center / contain no-repeat;
  transform-origin: 60% 30%; opacity: 0; animation: pieSplat .45s cubic-bezier(.2,1.7,.4,1) forwards; animation-delay: var(--pd, .6s);
}
.seat.pied .avatar, .pseat.pied .avatar { filter: saturate(.75); animation: droop 3s ease-in-out infinite; }
@keyframes pieSplat {
  0% { opacity: 0; transform: translate(-60%, -90%) scale(2.6) rotate(-40deg); }
  60% { opacity: 1; transform: translate(0, 0) scale(.85) rotate(6deg); }
  100% { opacity: 1; transform: translate(0, 0) scale(1) rotate(0deg); }
}
/* the losers row on the host's winner card */
.ws-rest { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.6vh; margin-top: 2.2vh; }
.ws-rest .av { position: relative; display: inline-block; }
.ws-rest .avatar { --s: min(11vw, 8vh); }
.ws-rest .av::after { content: ''; position: absolute; left: 16%; top: -14%; width: 92%; height: 92%; background: url(../img/pie-splat.svg?v=2) center / contain no-repeat;
  opacity: 0; animation: pieSplat .45s cubic-bezier(.2,1.7,.4,1) forwards; animation-delay: var(--pd, 1s); }
@media (orientation: landscape) { .ws-in { grid-template-areas: "label label" "av name" "av amt" "av sub" "rest rest" "go go"; } .ws-rest { grid-area: rest; margin-top: 1vh; } .ws-rest .avatar { --s: 7vh; } }

/* ---------------------------------------------------------------- remember me */
.mecard { display: flex; align-items: center; gap: 14px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: 18px; padding: 12px 14px; margin: 12px 0 4px; }
.mecard .avatar { --s: 64px; flex: none; }
.mecard .who { flex: 1; min-width: 0; }
.mecard .hi { font-size: 13px; opacity: .75; }
.mecard .nm { font-family: 'Lilita One', system-ui; font-size: 24px; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mecard .lnks { display: flex; gap: 14px; margin-top: 4px; font-size: 13px; font-weight: 800; }
.mecard .lnks a { color: var(--gold); text-decoration: none; }
.mecard .lnks a.forget { color: var(--muted, #d8bfa3); }
.remember { display: flex; align-items: center; gap: 8px; margin: 14px 0 4px; font-weight: 700; font-size: 14px; opacity: .9; }
.remember input { width: 20px; height: 20px; accent-color: var(--gold); }

/* ---------------------------------------------------------------- host: which face pictures are on */
.facepick { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 8px; margin-bottom: 6px; }
.facepick button { position: relative; aspect-ratio: 1; border-radius: 50%; padding: 0; border: 3px solid transparent; background: rgba(255,255,255,.1); overflow: visible; opacity: .45; filter: grayscale(.7); transition: opacity .15s, filter .15s, border-color .15s; }
.facepick button img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.facepick button i { position: absolute; right: -4px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.55); border: 2px solid rgba(255,255,255,.5); color: transparent; font-style: normal; font-weight: 900; font-size: 13px; display: grid; place-items: center; }
.facepick button.on { opacity: 1; filter: none; border-color: var(--gold); }
.facepick button.on i { background: var(--good, #3fae5a); border-color: #fff; color: #fff; }
