/* That's Pretty Clever — page furniture and player chips from the Lost Cities styles (night black, neon); the sheet and dice at the end. */
:root {
  --felt-glow: #3a3a5a; /* the glow at the top of the home page */
  --sheet: #16161f; /* pop-up window background */
  --felt: #1d1d2a;
  --felt-dark: #0b0b12;
  --gold: #f5b700;
  --gold-deep: #c98a00;
  --ink: #1d1d1f;
  --paper: #fffdf6;
  --panel: rgba(10, 10, 18, 0.88);
  --text: #f4f1e8;
  --muted: #b9b9cc;
  --cw: 70px;
  --ch: 100px;
  --pw: 64px;
  --ph: 92px;
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

input { -webkit-user-select: text; user-select: text; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }

/* ---------- shared bits ---------- */
#home, #lobby {
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: radial-gradient(ellipse at 50% 20%, var(--felt-glow) 0%, var(--felt) 40%, var(--felt-dark) 100%);
}
.home-wrap { max-width: 560px; margin: 0 auto; padding: 24px 16px 48px; }
.brand { text-align: center; margin: 8px 0 20px; }
.brand h1 { font-family: Georgia, "Times New Roman", serif; font-size: 44px; margin: 8px 0 0; letter-spacing: 1px; text-shadow: 0 3px 0 rgba(0,0,0,.3); }

.panel { background: var(--panel); border: 1px solid rgba(255,255,255,.08); border-radius: 16px; padding: 16px; margin: 14px 0; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.panel h2 { margin: 0 0 8px; font-size: 20px; display: flex; align-items: center; gap: 8px; }
.field { display: block; margin: 8px 0 4px; }
.field span { display: block; font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.field input { width: 100%; font-size: 20px; padding: 12px 14px; border-radius: 12px; border: 2px solid rgba(255,255,255,.15); background: rgba(0,0,0,.3); color: var(--text); outline: none; }
.row { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }

.btn { border: 0; border-radius: 12px; padding: 12px 18px; font-size: 17px; font-weight: 700; background: rgba(255,255,255,.12); }
.btn.gold:disabled { filter: grayscale(.8); opacity: .6; }
.btn.ghost { background: transparent; border: 2px solid rgba(255,255,255,.25); }
.btn.danger { background: #a3242f; }
.btn.small { padding: 8px 12px; font-size: 15px; }
.linkish { display: block; margin: 16px auto 0; background: none; border: 0; color: var(--gold); text-decoration: underline; font-size: 15px; }

.count-picker { display: flex; gap: 8px; margin: 8px 0 14px; }
.count-picker button { flex: 1; font-size: 22px; font-weight: 700; padding: 10px 0; border-radius: 12px; border: 2px solid rgba(255,255,255,.2); background: rgba(0,0,0,.25); }
.count-picker button.on { border-color: var(--gold); background: rgba(245,183,0,.2); color: var(--gold); }

.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #4be08c; box-shadow: 0 0 8px #4be08c; animation: pulse 1.6s infinite; }
.game-list { display: flex; flex-direction: column; gap: 8px; }
.game-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: rgba(255,255,255,.06); }
.game-item .code { font-family: ui-monospace, Menlo, Consolas, monospace; background: rgba(0,0,0,.35); padding: 2px 6px; border-radius: 6px; font-size: 13px; margin-left: 6px; }

.code-row { display: flex; align-items: baseline; justify-content: space-between; }
.code-row strong { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 30px; color: var(--gold); letter-spacing: 4px; }
.seat-list { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 8px; }
.seat-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.06); }
.seat-list li.empty { opacity: .5; border: 2px dashed rgba(255,255,255,.2); background: transparent; }
.seat-list .tag { font-size: 12px; color: var(--muted); }

.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; font-size: 18px; border: 2px solid rgba(255,255,255,.9); box-shadow: 0 2px 6px rgba(0,0,0,.4); flex: none; text-shadow: 0 1px 2px rgba(0,0,0,.4); }

/* ---------- table ---------- */
#table { overflow: hidden; touch-action: none; }
.felt {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(255,255,255,.10), transparent 60%),
    repeating-radial-gradient(circle at 30% 30%, rgba(0,0,0,.025) 0 2px, transparent 2px 4px),
    radial-gradient(ellipse at 50% 40%, #2c2c44 0%, var(--felt) 45%, var(--felt-dark) 100%);
}
.topbar { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 6px calc(10px + var(--safe-r)) 0 calc(10px + var(--safe-l)); z-index: 5; pointer-events: none; }
.topbar > * { pointer-events: auto; }
.round-info { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.top-buttons { display: flex; gap: 6px; }
.icon-btn { height: 34px; min-width: 34px; padding: 0 8px; border-radius: 10px; border: 0; background: rgba(0,0,0,.35); font-size: 16px; display: flex; align-items: center; gap: 4px; }
.icon-btn span { font-size: 13px; font-weight: 700; }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

/* ---------- overlays ---------- */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.6); display: grid; place-items: center; padding: 12px; animation: fade .2s ease-out; }
.sheet.narrow { width: 420px; }
.sheet.wide { width: 900px; }
.sheet h2 { margin: 0 0 10px; font-family: Georgia, serif; }
.sheet .btn { margin-top: 8px; }
.sheet .btn.ghost, .sheet .btn.danger { width: 100%; }
.toggle { display: flex; gap: 10px; align-items: center; font-size: 15px; margin: 8px 0; }
.toggle input { width: 22px; height: 22px; }
.rules h3 { color: var(--text); margin: 0 0 4px; font-size: 15px; }
.rules p { margin: 4px 0; }
.claim-list { display: flex; flex-direction: column; gap: 8px; }
.claim-list button { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; border: 0; background: rgba(255,255,255,.08); font-size: 17px; font-weight: 700; text-align: left; }

.score-table-wrap { overflow-x: auto; }
table.scores { border-collapse: collapse; width: 100%; font-size: 14px; }
table.scores th, table.scores td { padding: 5px 8px; text-align: center; border-bottom: 1px solid rgba(255,255,255,.08); white-space: nowrap; }
table.scores th { font-size: 13px; }
table.scores td.rd { color: var(--muted); text-align: left; }
table.scores tr.current td { background: rgba(245,183,0,.12); }
table.scores tr.total td { font-weight: 900; font-size: 16px; border-top: 2px solid rgba(255,255,255,.3); }
table.scores td.zero { color: #4be08c; font-weight: 800; }
table.scores td.leader { color: var(--gold); }
table.scores .th-name { display: inline-flex; align-items: center; gap: 4px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

.result-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; background: rgba(255,255,255,.05); margin-bottom: 6px; }
.result-row.out { background: rgba(245,183,0,.15); border: 1px solid rgba(245,183,0,.5); }
.result-row .who { width: 110px; flex: none; display: flex; align-items: center; gap: 6px; font-weight: 700; }
.result-row .who .avatar { width: 28px; height: 28px; font-size: 13px; }
.result-row .cards { flex: 1; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.result-row .left { display: flex; gap: 3px; padding: 3px; border-radius: 6px; background: rgba(214,40,58,.25); outline: 1px dashed rgba(255,120,120,.6); }
.result-row .pts { width: 70px; text-align: right; font-weight: 900; font-size: 18px; }
.result-row .pts small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
.winner-banner { text-align: center; font-size: 22px; margin: 4px 0 12px; }
.winner-banner .big { font-size: 48px; display: block; animation: float 1.4s ease-in-out infinite; }

/* go-out show */
.goout { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: radial-gradient(circle, rgba(245,183,0,.35), rgba(0,0,0,.85) 70%); animation: fade .25s ease-out; }
.goout canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.goout-inner { position: relative; text-align: center; }
.goout-crown { font-size: 22vh; line-height: 1; animation: crownDrop .9s cubic-bezier(.2,1.6,.4,1) both, float 1.6s ease-in-out .9s infinite; filter: drop-shadow(0 0 30px rgba(245,183,0,.9)); }
.goout-name { font-family: Georgia, serif; font-size: 11vh; font-weight: 900; color: #fff; text-shadow: 0 0 20px var(--gold), 0 4px 0 #8a5d00; animation: zoomIn .6s .3s cubic-bezier(.2,1.6,.4,1) both; }
.goout-sub { font-size: 7vh; font-weight: 900; letter-spacing: 6px; color: var(--gold); text-shadow: 0 3px 0 #5a3d00; animation: zoomIn .6s .55s cubic-bezier(.2,1.6,.4,1) both; }
.goout-note { margin-top: 10px; font-size: 3.2vh; color: #fff; opacity: .9; animation: fade .6s 1s both; }
.goout.shake { animation: shake .5s ease-in-out; }

.rotate { display: none; }
@media (orientation: portrait) {
  body.in-game .rotate { display: flex; position: fixed; inset: 0; z-index: 100; flex-direction: column; align-items: center; justify-content: center; background: var(--felt-dark); font-size: 20px; text-align: center; padding: 24px; }
  .rotate-phone { font-size: 80px; animation: turn 2s ease-in-out infinite; }
}

.toast { position: fixed; left: 50%; top: 14px; transform: translateX(-50%); z-index: 90; background: #222; color: #fff; padding: 10px 16px; border-radius: 12px; font-weight: 700; box-shadow: 0 8px 20px rgba(0,0,0,.5); animation: rise .2s ease-out; max-width: 90vw; }

.your-turn-flash { position: absolute; inset: 0; z-index: 25; pointer-events: none; box-shadow: inset 0 0 60px 10px rgba(245,183,0,.7); animation: fadeOut 1.2s ease-out forwards; }

@keyframes glow { 0%,100% { box-shadow: 0 0 0 3px var(--gold), 0 0 10px 3px rgba(245,183,0,.6); } 50% { box-shadow: 0 0 0 3px var(--gold), 0 0 22px 8px rgba(245,183,0,.95); } }
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -4px); } }

/* ---------- the table: players | sheet | dice ---------- */
#table { --cell: 30px; --die: 50px; --left: calc(104px + var(--safe-l)); --right: calc(min(220px, 27vw) + var(--safe-r)); }
.lc-players { position: absolute; left: 0; top: 42px; bottom: calc(4px + var(--safe-b)); width: var(--left); padding: 0 4px 0 calc(4px + var(--safe-l)); display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; z-index: 3; overflow-y: auto; touch-action: pan-y; }
.pchip { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 4px 6px; border-radius: 10px; border: 2px solid transparent; background: rgba(0,0,0,.32); text-align: left; width: 100%; flex: none; }
.pchip .pc-top { display: flex; align-items: center; gap: 5px; width: 100%; min-width: 0; }
.pchip .avatar { width: 22px; height: 22px; font-size: 11px; border-width: 1.5px; }
.pchip b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pchip .pc-score { font-size: 17px; font-weight: 900; line-height: 1; }
.pchip .pc-score small { font-size: 10px; color: var(--muted); font-weight: 600; }
.pchip .pc-sub { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pchip.me { background: rgba(0,0,0,.45); border-color: rgba(255,255,255,.18); }
.pchip.roller { border-color: var(--gold); }
.pchip.roller .pc-sub { color: var(--gold); font-weight: 700; }
.pchip.done .pc-sub { color: #8fe3a8; }
.pchip.flash { animation: chipFlash .7s ease-out; }
@keyframes chipFlash { 0% { background: rgba(245,183,0,.6); } 100% { background: rgba(0,0,0,.32); } }

.sheet-wrap { position: absolute; left: var(--left); right: var(--right); top: 40px; bottom: calc(2px + var(--safe-b)); display: grid; place-items: center; z-index: 2; }
.sheet-wrap > .hint { text-align: center; }

/* ---------- right: dice, prompt, buttons ---------- */
.lc-right { position: absolute; right: 0; top: 42px; bottom: calc(4px + var(--safe-b)); width: var(--right); padding: 0 calc(6px + var(--safe-r)) 0 4px; display: flex; flex-direction: column; gap: 6px; z-index: 3; overflow-y: auto; touch-action: pan-y; }
.lc-prompt { font-size: 14px; line-height: 1.3; padding: 2px 4px; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.lc-prompt .sw, table.scores .sw { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 3px; vertical-align: -1px; border: 1px solid rgba(255,255,255,.6); }
.lc-actions { display: flex; flex-direction: column; gap: 5px; }
.lc-actions .btn { padding: 8px 10px; font-size: 15px; width: 100%; }
.lc-actions .btn small { font-weight: 600; font-size: 12px; opacity: .85; }

/* ---------- everyone's sheets + the end ---------- */
.sheets-body { display: flex; flex-direction: column; gap: 12px; align-items: center; max-height: 76vh; overflow-y: auto; touch-action: pan-y; }
.sheet-card { display: flex; flex-direction: column; gap: 4px; }
.sc-name { display: flex; align-items: center; gap: 6px; }
.sc-name .avatar { width: 26px; height: 26px; font-size: 12px; }
#sheetsWin .sheet, #final .sheet { max-height: 94vh; overflow: auto; touch-action: pan-y; }
table.final-table td .avatar { width: 22px; height: 22px; font-size: 11px; display: inline-grid; vertical-align: middle; }

.back-link { display: inline-block; text-decoration: none; font-weight: 700; font-size: 15px; padding: 4px 0; }
.back-link:active { color: var(--gold); }
.linkbtn { display: block; text-align: center; text-decoration: none; box-sizing: border-box; margin-top: 8px; }

/* Shell pieces copied from ud.css: the history list, its delete button (🗑), the lobby's bot rows, confetti */
.celebrate { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 70; pointer-events: none; }
/* game history */
#historyBtn { margin-top: 4px; }
.win-tally { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.win-chip b { color: var(--gold); margin-left: 4px; }
.history-list { display: flex; flex-direction: column; gap: 8px; }
.history-item { background: rgba(255,255,255,.06); border-radius: 12px; overflow: hidden; }
.history-item.open { background: rgba(255,255,255,.1); }
.history-item.incomplete .hi-title { color: var(--muted); }
.hi-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; }
.hi-main { flex: 1; min-width: 0; }
.hi-date { font-size: 12px; color: var(--muted); }
.hi-title { font-size: 16px; margin: 2px 0; }
.hi-sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hi-del { border: 0; background: rgba(0,0,0,.25); border-radius: 10px; width: 36px; height: 36px; font-size: 16px; flex: none; }
.hi-detail { padding: 0 12px 12px; overflow-x: auto; }
.seat-list li.can-bot { flex-wrap: wrap; }
.bot-tag { font-size: 12px; font-weight: 700; color: var(--muted); margin-left: 4px; }


/* ================= That's Pretty Clever ================= */
.lc-title { font-family: Georgia, "Times New Roman", serif; }
.lc-title em { font-style: normal; color: #6fe3ff; text-shadow: 0 0 12px rgba(111,227,255,.7); }
.brand-dice { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.trump-pill { background: rgba(0,0,0,.35); padding: 3px 10px; border-radius: 999px; font-size: 14px; font-weight: 900; margin-left: 8px; }
#table { --cell: 26px; --die: 40px; --left: calc(108px + var(--safe-l)); --right: calc(min(220px, 27vw) + var(--safe-r)); }

/* dice */
.cd { --d: var(--die); position: relative; flex: none; width: var(--d); height: var(--d); border-radius: calc(var(--d) * .2); display: inline-grid; place-items: center; color: #222; box-shadow: inset 0 -3px 0 rgba(0,0,0,.2), 0 3px 6px rgba(0,0,0,.45); }
.cd.dark { color: #fff; }
.cd.big { --d: 44px; }
.cd.mini { --d: calc(var(--cell) * .9); box-shadow: none; }
.cd .dt-pips { width: 74%; height: 74%; }
.cd.can { cursor: pointer; box-shadow: 0 0 0 3px var(--gold), 0 0 12px rgba(245,183,0,.75); }
.cd.sel { transform: translateY(-4px) scale(1.08); box-shadow: 0 0 0 3px #fff, 0 0 16px rgba(255,255,255,.8); }
.cd.used { opacity: .4; }
.cd.incoming { visibility: hidden; }
.cd.empty { background: rgba(255,255,255,.06) !important; box-shadow: inset 0 0 0 2px rgba(255,255,255,.18); }
.dicebox { display: flex; flex-direction: column; gap: 5px; padding: 6px; border-radius: 14px; background: rgba(0,0,0,.3); flex: none; }
.dz { display: flex; flex-direction: column; gap: 3px; }
.dzl { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.dd { display: flex; flex-wrap: wrap; gap: 5px; min-height: calc(var(--die) * .6); align-items: center; }
.dd small { color: var(--muted); }
.dz.platter { padding: 4px; border-radius: 12px; background: radial-gradient(ellipse at 50% 40%, rgba(230,230,240,.25), rgba(120,120,140,.15)); }

/* the sheet */
.csheet { --c: var(--cell); display: flex; flex-direction: column; gap: calc(var(--c) * .18); padding: calc(var(--c) * .25); border-radius: 12px; background: #101018; box-shadow: 0 10px 26px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,255,255,.08); color: #222; font-size: calc(var(--c) * .5); }
.csheet.small { --c: 20px; }
.ctop { display: flex; gap: calc(var(--c) * .3); align-items: flex-start; }
.area { border-radius: 10px; padding: calc(var(--c) * .15); }
.yel { background: #6b5a10; box-shadow: inset 0 0 0 2px #f6cf2b; display: grid; grid-template-columns: repeat(4, var(--c)) calc(var(--c) * .9); gap: 3px; align-items: center; }
.blu { background: #12395f; box-shadow: inset 0 0 0 2px #4aa3ff; }
.bgrid { display: grid; grid-template-columns: repeat(4, var(--c)) calc(var(--c) * .9); gap: 3px; align-items: center; }
.bpts { display: grid; grid-template-columns: repeat(11, 1fr); gap: 1px; margin-bottom: 3px; font-size: calc(var(--c) * .3); color: #8fc6ff; text-align: center; font-weight: 800; }
.bpts .got { color: #fff; background: #2f86d6; border-radius: 3px; }
.cx { position: relative; width: var(--c); height: var(--c); border-radius: 5px; background: #fafaf5; display: grid; place-items: center; font-weight: 900; }
.cx i { font-style: normal; color: #555; font-size: calc(var(--c) * .48); }
.cx b { position: absolute; inset: 0; display: grid; place-items: center; color: #1f3fae; font-size: calc(var(--c) * .8); line-height: 1; }
.cx b.pre { color: #222; position: static; }
.cx b.num { position: static; color: #1f3fae; font-family: Georgia, serif; font-size: calc(var(--c) * .55); }
.cx.on i { opacity: .25; }
.cx.printed { background: #ddd; }
.cx.printed em { font-style: normal; font-size: calc(var(--c) * .34); }
.yc.diag { box-shadow: inset 0 0 0 2px rgba(246,207,43,.8); }
.cp { text-align: center; font-weight: 900; color: #f6cf2b; font-size: calc(var(--c) * .42); }
.cp.got { background: #f6cf2b; color: #222; border-radius: 50%; }
.rb { display: grid; place-items: center; }
.bn { display: inline-grid; place-items: center; min-width: calc(var(--c) * .62); height: calc(var(--c) * .62); padding: 0 2px; border-radius: 4px; font-size: calc(var(--c) * .36); font-weight: 900; color: #fff; line-height: 1; }
.bn-yellow { background: #f6cf2b; color: #222; } .bn-blue { background: #2f86d6; } .bn-green { background: #3cae4f; } .bn-orange { background: #f08a24; } .bn-purple { background: #8e4fc4; }
.bn-rr { background: #333; } .bn-pl { background: #333; } .bn-fx { background: none; font-size: calc(var(--c) * .5); } .bn-black { background: #000; }
.cside { display: flex; flex-direction: column; gap: calc(var(--c) * .2); color: #eee; font-size: calc(var(--c) * .46); min-width: calc(var(--c) * 2.4); }
.cside .act { display: flex; align-items: center; gap: 4px; }
.cside small { color: #888; font-size: .75em; margin-left: 2px; }
.cside .tot { margin-top: auto; font-family: Georgia, serif; font-size: calc(var(--c) * .9); font-weight: 900; color: #6fe3ff; }
.cside .tot small { font-size: .45em; color: #aaa; }
.crow { display: flex; align-items: flex-start; gap: 2px; padding-top: calc(var(--c) * .35); }
.crow .lab { width: calc(var(--c) * 1.05); display: grid; place-items: center; align-self: center; }
.crow .slot { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.crow .sub { min-height: calc(var(--c) * .62); display: grid; place-items: center; }
.crow .top { position: absolute; top: calc(var(--c) * -.36); font-size: calc(var(--c) * .3); color: #9be3a8; font-weight: 800; }
.crow .lt { position: absolute; right: calc(var(--c) * -.22); top: calc(var(--c) * .25); color: #c9a0f0; font-size: calc(var(--c) * .4); font-weight: 900; }
.green { background: #123d1d; box-shadow: inset 0 0 0 2px #3cae4f; }
.orange { background: #4a2808; box-shadow: inset 0 0 0 2px #f08a24; }
.purple { background: #2e1745; box-shadow: inset 0 0 0 2px #a46ae0; }
.purple .slot { margin-right: calc(var(--c) * .12); }
.gc i { font-size: calc(var(--c) * .4); }
.oc i { color: #c06a10; }
/* taps and fresh ink */
.cx.tgt { cursor: pointer; box-shadow: 0 0 0 3px var(--gold), 0 0 12px rgba(245,183,0,.85); animation: tgtPulse 1.1s ease-in-out infinite; z-index: 1; }
@keyframes tgtPulse { 50% { box-shadow: 0 0 0 3px var(--gold), 0 0 4px rgba(245,183,0,.4); } }
.cx.fresh b { animation: inkPop .5s cubic-bezier(.2,1.6,.4,1); }
@keyframes inkPop { from { transform: scale(2.2) rotate(-12deg); opacity: 0; } }
.lc-prompt .cd.mini { --d: 18px; vertical-align: middle; }
.final-table th.hy { color: #f6cf2b; } .final-table th.hb { color: #4aa3ff; } .final-table th.hg { color: #3cae4f; } .final-table th.ho { color: #f08a24; } .final-table th.hp { color: #a46ae0; }
#sheetsBody .csheet { margin: 0 auto; }

@media (max-height: 360px) {
  .lc-players, .lc-right { top: 36px; }
  .sheet-wrap { top: 34px; }
  .dzl { font-size: 10px; }
  .lc-prompt { font-size: 13px; }
  .lc-actions .btn { padding: 6px 8px; font-size: 13px; }
}

/* Whose turn and the round sit in the right column beside the sound / menu buttons (owner, 2026-10-18), so the sheet
   runs from the top of the screen to the bottom and the players' column can use the full height too. */
.topbar { left: auto; width: var(--right); padding: 5px calc(6px + var(--safe-r)) 0 4px; justify-content: space-between; align-items: flex-start; gap: 6px; }
.topbar .round-info { flex: 1; min-width: 0; flex-direction: column; align-items: flex-start; gap: 3px; font-size: 12px; line-height: 1.2; }
.topbar .round-info .trump-pill { order: -1; margin-left: 0; font-size: 12px; padding: 2px 8px; }
.topbar .round-info #turnLabel { max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lc-players { top: 6px; }
.lc-right { top: 50px; }
.sheet-wrap { top: 3px; bottom: calc(3px + var(--safe-b)); }
.csheet { width: max-content; }
@media (max-height: 360px) {
  .lc-players { top: 4px; }
  .lc-right { top: 48px; }
  .sheet-wrap { top: 2px; }
}

/* The side box (rerolls, +1, foxes, points) has room: bigger text (owner, 2026-10-18). */
.cside { font-size: calc(var(--c) * .64); gap: calc(var(--c) * .3); min-width: calc(var(--c) * 2.9); }
.cside .act { gap: calc(var(--c) * .18); }
.cside .bn { min-width: calc(var(--c) * .8); height: calc(var(--c) * .8); font-size: calc(var(--c) * .46); }
.cside .bn-fx { font-size: calc(var(--c) * .66); }
.cside small { font-size: .7em; }
.cside .tot { font-size: calc(var(--c) * 1.2); }

/* A narrower dice column (owner, 2026-10-18): the sheet gets the width and can grow taller. The dice are sized
   from the column's width too (three in a row), see layout(). */
#table { --right: calc(min(172px, 21vw) + var(--safe-r)); }
.dicebox { padding: 5px; gap: 4px; }
.dd { gap: 4px; }
.lc-prompt { font-size: 13px; }

/* The round and whose turn get their own lines under the sound / menu buttons (beside them they overlapped the
   narrower dice column — owner, 2026-10-18); the dice column starts below them. */
.topbar { flex-wrap: wrap; justify-content: flex-end; gap: 4px 6px; }
.topbar .round-info { order: 2; flex: 0 0 100%; width: 100%; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 3px 6px; padding-left: 2px; }
.topbar .round-info .trump-pill { order: 0; }
.topbar .round-info #turnLabel { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: unset; }
.lc-right { top: 92px; }
@media (max-height: 360px) { .lc-right { top: 88px; } }

/* Announcements everyone sees: someone else's pick, anyone's reroll or +1 extra die. */
.announce { position: absolute; left: var(--left); right: var(--right); top: 40%; margin: 0 auto; width: max-content; max-width: calc(100% - var(--left) - var(--right) - 20px); z-index: 30; padding: 10px 16px; border-radius: 14px; background: rgba(10,10,18,.93); border: 2px solid var(--gold); box-shadow: 0 10px 30px rgba(0,0,0,.6); font-size: 18px; font-weight: 600; text-align: center; pointer-events: none; }
.announce.show { animation: annPop .3s cubic-bezier(.2,1.6,.4,1); }
.announce .avatar { width: 24px; height: 24px; font-size: 11px; display: inline-grid; vertical-align: middle; }
.announce .cd.mini { --d: 24px; vertical-align: middle; }
@keyframes annPop { from { transform: scale(.7); opacity: 0; } }
.cd.just { animation: justPick .8s ease-in-out 2; box-shadow: 0 0 0 3px #fff, 0 0 16px rgba(255,255,255,.9); }
@keyframes justPick { 50% { transform: scale(1.15); } }

/* Announcements bigger, so nobody misses them (owner, 2026-10-18). */
.announce { font-size: 24px; padding: 14px 22px; border-width: 3px; border-radius: 18px; }
.announce.big { font-size: 28px; }
.announce .avatar { width: 34px; height: 34px; font-size: 15px; }
.announce .ydie.mini, .announce .cd.mini { --d: 38px; margin: 0 2px; }
