/* Yahtzee — page furniture, player chips and the dice column from clever.css (a red felt); the score card 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; }


/* ================= Yahtzee ================= */
.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)); }


/* Colours: a deep red felt (the classic box), cream score card. */
:root { --felt-glow: #7a2430; --felt: #4a1219; --felt-dark: #1e0508; --sheet: #2a0b10; --panel: rgba(30, 6, 10, 0.88); }
.felt { background: radial-gradient(ellipse at 50% 45%, rgba(255,255,255,.08), transparent 60%), radial-gradient(ellipse at 50% 40%, #6a1a24 0%, var(--felt) 45%, var(--felt-dark) 100%); }
.lc-title em { color: #ffd75e; text-shadow: 0 0 12px rgba(255,215,94,.6), 0 3px 0 #8a1020; font-style: normal; }
.mode-picker button { font-size: 16px; }

/* Whose turn and the turn number in the right column beside the sound / menu buttons; the card runs top to bottom. */
.topbar { left: auto; width: var(--right); padding: 5px calc(6px + var(--safe-r)) 0 4px; flex-wrap: wrap; justify-content: flex-end; align-items: flex-start; 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; font-size: 12px; line-height: 1.2; }
.topbar .round-info .trump-pill { margin-left: 0; font-size: 12px; padding: 2px 8px; }
.topbar .round-info #turnLabel { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
#table { --right: calc(min(210px, 25vw) + var(--safe-r)); --u: 22px; }
.lc-players { top: 6px; }
.lc-right { top: 92px; }
.sheet-wrap { top: 3px; bottom: calc(3px + var(--safe-b)); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
@media (max-height: 360px) { .lc-players { top: 4px; } .lc-right { top: 88px; } .sheet-wrap { top: 2px; } }

/* the score card: sections side by side (Upper | Colours | Lower), rows of label + value cells */
.cardhead { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #fff3dc; flex: none; }
.cardhead .avatar { width: 22px; height: 22px; font-size: 11px; }
.cardhead .peek { border: 0; border-radius: 10px; padding: 3px 10px; font-size: 13px; font-weight: 800; background: rgba(255,255,255,.14); color: #fff3dc; }
.ycard { --u2: var(--u); display: flex; gap: calc(var(--u2) * .4); align-items: flex-start; padding: calc(var(--u2) * .3); border-radius: 12px; background: #fdf8ec; box-shadow: 0 10px 26px rgba(0,0,0,.5); color: #2a1a10; width: max-content; }
.ycard.small { --u2: 18px; }
.ysec { display: flex; flex-direction: column; border: 2px solid #b0262f; border-radius: 8px; overflow: hidden; }
.ysh { background: #b0262f; color: #fff; font-weight: 900; font-size: calc(var(--u2) * .55); letter-spacing: 1px; text-transform: uppercase; padding: 1px calc(var(--u2) * .3); }
.yrow { display: flex; align-items: stretch; border-top: 1px solid rgba(176,38,47,.25); height: calc(var(--u2) * 1.22); }
.yrow:first-of-type { border-top: 0; }
.yl { width: calc(var(--u2) * 5); display: flex; align-items: center; gap: 4px; padding: 0 calc(var(--u2) * .25); font-weight: 800; font-size: calc(var(--u2) * .56); white-space: nowrap; }
.yl small { margin-left: auto; font-size: .75em; color: #9a6a50; font-weight: 700; }
.yl .sw { display: inline-block; width: calc(var(--u2) * .5); height: calc(var(--u2) * .5); border-radius: 3px; }
.yv { width: calc(var(--u2) * 2); border-left: 1px solid rgba(176,38,47,.25); display: grid; place-items: center; font-size: calc(var(--u2) * .66); font-weight: 900; }
.yv.wide { width: auto; flex: 1; min-width: calc(var(--u2) * 2); }
.yv.ink { color: #1f3fae; font-family: Kalam, "Comic Sans MS", cursive; font-size: calc(var(--u2) * .78); }
.yv.ink.zero { color: #9a6a50; }
.yv.ink.fresh { animation: inkPop .6s cubic-bezier(.2,1.6,.4,1); background: rgba(255,215,94,.55); }
@keyframes inkPop { from { transform: scale(2.2) rotate(-12deg); opacity: 0; } }
.yv.open { cursor: pointer; color: rgba(60,60,60,.5); font-family: Kalam, "Comic Sans MS", cursive; font-weight: 700; background: rgba(255,215,94,.18); }
.yv.open:not(.nil) { color: rgba(31,63,174,.55); }
.yv.open.sel { background: #ffd75e; color: #1f3fae; box-shadow: inset 0 0 0 2px #c98a00; }
.yrow.head { height: calc(var(--u2) * .9); background: rgba(176,38,47,.08); }
.yrow.head .yv { font-size: calc(var(--u2) * .5); color: #b0262f; }
.yrow.sum { background: rgba(176,38,47,.07); }
.yrow.sum .yl { font-weight: 700; color: #6a3a2a; }
.yrow.sum .yv i { font-style: normal; font-size: .7em; color: #9a6a50; font-weight: 700; }
.yrow.bonus .yv { color: #1a7a3a; }
.yrow.grand { background: #b0262f; color: #fff; height: calc(var(--u2) * 1.4); }
.yrow.grand .yv { border-left-color: rgba(255,255,255,.3); font-size: calc(var(--u2) * .9); }

/* dice */
.dicebox { padding: 6px; border-radius: 14px; background: rgba(0,0,0,.3); display: flex; flex-direction: column; gap: 4px; }
.dzl { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.ydice { display: flex; flex-wrap: wrap; gap: 8px 6px; justify-content: center; padding: 4px 0 14px; }
.ydie { --d: var(--die); position: relative; width: var(--d); height: var(--d); padding: 0; border: 0; border-radius: calc(var(--d) * .18); background: transparent; display: grid; place-items: center; transition: transform .2s; }
.ydie.big { --d: 44px; }
.ydie.mini { --d: 22px; display: inline-grid; vertical-align: middle; margin: 0 1px; }
.ydie.blank { background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 2px rgba(255,255,255,.18); }
.ydie.incoming { visibility: hidden; }
.ydie.can { cursor: pointer; }
.ydie.held { transform: translateY(-5px); }
.ydie.held .yface { box-shadow: 0 0 0 3px #ffd75e, 0 0 14px rgba(255,215,94,.8); }
.ydie em { position: absolute; bottom: calc(var(--d) * -.42); left: 50%; transform: translateX(-50%); font-style: normal; font-size: 10px; font-weight: 900; color: #ffd75e; letter-spacing: .5px; }
.yface { width: 100%; height: 100%; border-radius: inherit; display: 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); }
.yface.ivory { background: #fffdf6; }
.yface .dt-pips { width: 74%; height: 74%; }
.dt-face .yface, .dt-die .yface { box-shadow: none; border-radius: inherit; }
.lc-actions .btn small { font-weight: 600; font-size: 12px; opacity: .85; }

/* announcements everyone sees */
.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(20,4,8,.94); border: 2px solid #ffd75e; box-shadow: 0 10px 30px rgba(0,0,0,.6); font-size: 18px; font-weight: 600; text-align: center; pointer-events: none; }
.announce.big { font-size: 22px; }
.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; }
@keyframes annPop { from { transform: scale(.7); opacity: 0; } }
.pchip.shown { box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); }
#cardsBody .ycard { margin: 0 auto; }
.final-table td .avatar { width: 22px; height: 22px; font-size: 11px; display: inline-grid; vertical-align: middle; }

/* Whose turn and the turn number at the top of the left column, above the players (owner, 2026-10-18); the dice
   column starts under the sound / menu buttons and the dice are sized so everything fits (see layout()). */
.topbar { left: 0; right: 0; width: auto; padding: 5px calc(6px + var(--safe-r)) 0 calc(6px + var(--safe-l)); justify-content: flex-end; flex-wrap: nowrap; }
.topbar .round-info { position: absolute; left: calc(5px + var(--safe-l)); top: 6px; width: calc(var(--left) - 10px); flex: none; flex-direction: column; align-items: flex-start; gap: 4px; padding-left: 0; }
.topbar .round-info .trump-pill { order: -1; }
.topbar .round-info #turnLabel { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lc-players { top: 66px; }
.lc-right { top: 46px; }
.ydice { gap: 6px; padding: 2px 0 12px; }
@media (max-height: 360px) { .lc-players { top: 62px; } .lc-right { top: 44px; } }

/* 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; }
