/* Würfeln – Stil passend zur Startseite (blaue Akzente, automatisch hell/dunkel) */

:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #12162a;
  --muted: #5a6280;
  --line: #dfe3ee;
  --accent: #1f4fd8;
  --accent-ink: #ffffff;
  --bad: #d7263d;
  --good: #1f9d6b;

  /* Holz */
  --wood-base: #b8843f;
  --wood-frame: #6a4220;
  --wood-shadow: rgba(60, 30, 5, .45);
  --brass-a: #ecd08a;
  --brass-b: #bb8d33;
  --brass-ink: #2a1c05;
  --cup-a: #5a3416;
  --cup-b: #94602e;
  --cup-stitch: #e8c48f;
  --cup-inner: #22130a;
  --cup-rim: #c99a5b;
  --die-a: #fbf6e8;
  --die-b: #e4d9bd;

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='700' height='360'%3E%3Cfilter id='w' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.004 0.16' numOctaves='4' seed='11' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.20  0 0 0 0 0.10  0 0 0 0 0.03  0 0 0 1.5 -0.42'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23w)'/%3E%3C/svg%3E");
  --knots: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='700' height='360'%3E%3Cfilter id='k' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012 0.05' numOctaves='2' seed='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35  0 0 0 0 0.20  0 0 0 0 0.07  0 0 0 1.2 -0.5'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23k)'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0c0f16;
    --surface: #141925;
    --text: #eef0f8;
    --muted: #9aa3b8;
    --line: #232a3b;
    --accent: #7ba0ff;
    --accent-ink: #0b1020;
    --bad: #ff6b7d;
    --good: #3ecf8e;
    --wood-base: #5e3b1f;
    --wood-frame: #2a180b;
    --wood-shadow: rgba(0, 0, 0, .6);
    --brass-a: #d6b263;
    --brass-b: #9c7420;
    --cup-b: #9d6a35;
    --die-a: #ece4cf;
    --die-b: #cfc3a4;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c0f16;
  --surface: #141925;
  --text: #eef0f8;
  --muted: #9aa3b8;
  --line: #232a3b;
  --accent: #7ba0ff;
  --accent-ink: #0b1020;
  --bad: #ff6b7d;
  --good: #3ecf8e;
  --wood-base: #5e3b1f;
  --wood-frame: #2a180b;
  --wood-shadow: rgba(0, 0, 0, .6);
  --brass-a: #d6b263;
  --brass-b: #9c7420;
  --cup-b: #9d6a35;
  --die-a: #ece4cf;
  --die-b: #cfc3a4;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

h1, h2 { line-height: 1.2; margin: 0; }
h2 { font-size: 1.15rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* Kopfzeile */
.top {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 980px;
  margin: 0 auto;
  padding: 14px 16px;
}
.top-spacer { flex: 1; }
.back, .icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  padding: 0;
}
.back:hover, .icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.top-actions { display: flex; gap: 8px; }
#btn-sound .ic-off { display: none; }
#btn-sound[aria-pressed="true"] .ic-on { display: none; }
#btn-sound[aria-pressed="true"] .ic-off { display: block; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

main { max-width: 980px; margin: 0 auto; padding: 0 16px 48px; }
.screen { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.hint { color: var(--muted); font-size: .92rem; }

/* Startseite: schmale, zentrierte Spalte statt volle Breite (auch auf Desktop), Bild+Titel prominent wie bei Skyjo */
#screen-start { max-width: 420px; margin: 0 auto; text-align: center; padding-top: 2vh; }
#screen-start .hero { display: flex; justify-content: center; align-items: center; height: 96px; margin-bottom: 2px; }
#screen-start .hero-icon { filter: drop-shadow(0 8px 12px rgba(0,0,0,.22)); }
#screen-start h1 { font-size: 2.5rem; letter-spacing: -.02em; }
#screen-start .sub { margin: 4px 0 22px; color: var(--muted); }
#screen-start .card { text-align: left; }
#screen-start .hint { margin-top: 16px; }

/* Karten und Formulare */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  display: flex; flex-direction: column; gap: 14px;
}
label { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; color: var(--muted); }
input[type="text"], input:not([type]), input[type="search"] {
  font: inherit; color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .65em .8em;
  width: 100%;
}
input:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 0; border-color: var(--accent); }
.code-input { text-transform: uppercase; letter-spacing: .3em; font-weight: 700; text-align: center; }

/* Trenner zwischen "Raum erstellen" und "Raum beitreten" */
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.targets { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.targets legend { font-size: .9rem; color: var(--muted); padding: 0; margin-bottom: 6px; }
.targets label { flex-direction: row; gap: 0; }
.targets input { position: absolute; opacity: 0; pointer-events: none; }
.targets span {
  display: inline-block; padding: .5em 1em;
  border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); background: var(--bg); cursor: pointer; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.targets input:checked + span { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.targets input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Buttons */
.btn {
  font: inherit; font-weight: 650;
  padding: .7em 1.2em;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: transform .08s, filter .15s, border-color .15s;
}
.btn:hover:not(:disabled) { border-color: var(--accent); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn.gold { background: linear-gradient(180deg, var(--brass-a), var(--brass-b)); border-color: rgba(0,0,0,.35); color: var(--brass-ink); }
.btn.gold:hover:not(:disabled) { filter: brightness(1.06); }
.btn.small { padding: .35em .8em; font-size: .85rem; border-radius: 9px; }
.btn.ghost { background: transparent; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }

/* Lobby */
.lobby { max-width: 520px; }
.roomcode { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.roomcode strong { font-size: 2rem; letter-spacing: .25em; font-variant-numeric: tabular-nums; }
.plist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.plist li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg);
}
.plist li .grow { flex: 1; font-weight: 600; }
.tag { font-size: .75rem; padding: .1em .6em; border-radius: 99px; background: var(--line); color: var(--muted); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--good); flex: none; }
.dot.off { background: #8b93a7; }

/* Spiel */
.gamebar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.gamebar .btn { margin-left: auto; }
.chip {
  display: inline-flex; gap: 6px; padding: .25em .8em;
  border: 1px solid var(--line); border-radius: 99px; background: var(--surface);
  font-size: .9rem; color: var(--muted);
}
.chip strong { color: var(--text); letter-spacing: .12em; font-variant-numeric: tabular-nums; }

.scoreboard {
  list-style: none; margin: 0 0 16px; padding: 0;
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.pl {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px 12px;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.pl.turn {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent);
  transform: translateY(-2px);
}
.pl .name { display: flex; align-items: center; gap: 7px; font-weight: 650; min-width: 0; }
.pl .name span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl .score { font-size: 1.7rem; font-weight: 750; font-variant-numeric: tabular-nums; line-height: 1.15; margin-top: 2px; }
.pl .meta { color: var(--muted); font-size: .82rem; display: flex; justify-content: space-between; gap: 8px; min-height: 1.3em; }
.pl .bar { height: 5px; background: var(--line); border-radius: 99px; margin-top: 8px; overflow: hidden; }
.pl .bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.pl .me { font-size: .7rem; padding: .05em .5em; border-radius: 99px; background: var(--accent); color: var(--accent-ink); }
.pl .act { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.pl .draw-sum { font-weight: 700; color: var(--text); }
.pl .meta .bad { color: var(--bad); font-weight: 600; }
.pl.gain { animation: gainflash 2.3s ease both; animation-delay: var(--el, 0ms); }
@keyframes gainflash {
  0%   { box-shadow: 0 0 0 0 rgba(242, 182, 50, 0); }
  10%  { box-shadow: 0 0 0 4px rgba(242, 182, 50, .95), 0 0 28px 6px rgba(242, 182, 50, .55); transform: translateY(-3px) scale(1.025); }
  60%  { box-shadow: 0 0 0 4px rgba(242, 182, 50, .7), 0 0 20px 4px rgba(242, 182, 50, .35); transform: translateY(-2px) scale(1.01); }
  100% { box-shadow: 0 0 0 0 rgba(242, 182, 50, 0); }
}
.pl .badge {
  position: absolute; right: 10px; top: 9px; pointer-events: none;
  background: #f2b632; color: #2a1c05; font-weight: 800; font-size: 1.05rem;
  padding: .05em .6em; border-radius: 99px;
  box-shadow: 0 3px 8px rgba(0,0,0,.35);
  animation: badgefx 2.5s ease both; animation-delay: var(--el, 0ms);
}
@keyframes badgefx {
  0%   { opacity: 0; transform: translateY(12px) scale(.6); }
  12%  { opacity: 1; transform: translateY(0) scale(1.15); }
  20%  { transform: scale(1); }
  82%  { opacity: 1; transform: translateY(-3px); }
  100% { opacity: 0; transform: translateY(-14px); }
}

/* Grosse Einblendung der gesicherten Punkte */
.pop {
  position: absolute; left: 50%; top: 44%; z-index: 6; pointer-events: none;
  text-align: center; padding: .35em 1.4em .5em; border-radius: 20px;
  background: linear-gradient(180deg, var(--brass-a), var(--brass-b));
  color: var(--brass-ink);
  box-shadow: 0 12px 34px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.6);
  animation: popfx 2.4s cubic-bezier(.2, .9, .3, 1) both;
}
.pop b { display: block; font-size: clamp(2.3rem, 10vw, 3.6rem); line-height: 1.05; font-variant-numeric: tabular-nums; }
.pop span { font-weight: 650; }
@keyframes popfx {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(.5); }
  12%  { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
  20%  { transform: translate(-50%, -50%) scale(1); }
  76%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -64%) scale(.96); }
}

/* Holzbrett */
.board {
  position: relative;
  border: 10px solid var(--wood-frame);
  border-radius: 22px;
  padding: 16px;
  color: #fff8e8;
  background:
    var(--knots),
    var(--grain),
    repeating-linear-gradient(180deg, transparent 0 96px, rgba(0,0,0,.38) 96px 98px, rgba(255,255,255,.07) 98px 100px),
    linear-gradient(180deg, rgba(255,255,255,.10), rgba(0,0,0,.16)),
    var(--wood-base);
  box-shadow:
    inset 0 0 46px rgba(0,0,0,.5),
    inset 0 0 0 2px rgba(255,255,255,.08),
    0 14px 34px var(--wood-shadow);
  display: flex; flex-direction: column; gap: 14px;
}
.plate {
  align-self: center;
  max-width: 100%;
  padding: 8px 18px;
  border-radius: 10px;
  text-align: center;
  font-weight: 650;
  color: var(--brass-ink);
  background: linear-gradient(180deg, var(--brass-a), var(--brass-b));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 2px 5px rgba(0,0,0,.45);
  min-height: 2.4em;
  display: flex; align-items: center; justify-content: center;
}
.plate.bad { background: linear-gradient(180deg, #ef8a8a, #b83a3a); color: #fff; }

.table { display: flex; align-items: center; gap: 14px; }
.tray {
  flex: 1;
  min-height: 108px;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 12px;
  padding: 16px 12px;
  border-radius: 16px;
  background: rgba(0,0,0,.2);
  box-shadow: inset 0 4px 12px rgba(0,0,0,.5), inset 0 -1px 0 rgba(255,255,255,.1);
  position: relative;
}
.tray:empty::after {
  content: "Die Würfel liegen im Becher";
  color: rgba(255, 248, 232, .55);
  font-size: .9rem;
}
.tray.gathering .die { opacity: 0; transform: scale(.4) translateY(-30px); transition: opacity .18s, transform .18s; }

.cup {
  flex: none;
  width: 92px; height: 115px;
  background: none; border: 0; padding: 0;
  cursor: default;
  transform-origin: 50% 88%;
  position: relative;
}
.cup svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 8px 6px rgba(0,0,0,.5)); transform-origin: 50% 90%; }
.cup.ready { cursor: pointer; }
.cup.ready svg { animation: bob 1.5s ease-in-out infinite; }
.cup:not(.ready) { opacity: .8; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-7px) rotate(-2deg); } }
.cup-hint { margin: -8px 0 0; text-align: center; font-size: .88rem; color: rgba(255, 248, 232, .85); min-height: 1.3em; }

/* Würfel */
.die {
  --s: clamp(46px, 12.5vw, 62px);
  width: var(--s); height: var(--s);
  flex: none;
  border: 0; padding: calc(var(--s) * .13);
  border-radius: calc(var(--s) * .2);
  background: linear-gradient(145deg, var(--die-a), var(--die-b));
  box-shadow: inset 0 -3px 5px rgba(0,0,0,.2), inset 0 2px 3px rgba(255,255,255,.75), 0 5px 9px rgba(0,0,0,.45);
  display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  cursor: default;
  transform: translateY(var(--dy, 0px)) rotate(var(--rot, 0deg));
  transition: transform .16s ease, box-shadow .16s ease;
  will-change: transform;
}
.die .p { width: 74%; height: 74%; border-radius: 50%; align-self: center; justify-self: center; }
.die .p.on { background: radial-gradient(circle at 35% 30%, #4b3c2d, #1b140e); box-shadow: inset 0 1px 2px rgba(0,0,0,.6); }
.die[data-v="1"] .p.on { width: 92%; height: 92%; background: radial-gradient(circle at 35% 30%, #e6564a, #a1231a); }
.die.small { --s: clamp(30px, 8.5vw, 38px); box-shadow: inset 0 -2px 3px rgba(0,0,0,.2), inset 0 1px 2px rgba(255,255,255,.7), 0 3px 5px rgba(0,0,0,.4); }
.tray.can .die { cursor: pointer; }
.tray.can .die:hover { transform: translateY(calc(var(--dy, 0px) - 4px)) rotate(var(--rot, 0deg)); }
.die.sel {
  transform: translateY(calc(var(--dy, 0px) - 11px)) rotate(var(--rot, 0deg));
  box-shadow: 0 0 0 3px var(--accent), 0 0 0 5px rgba(255,255,255,.35), 0 12px 14px rgba(0,0,0,.5);
}
.die.sel.bad { box-shadow: 0 0 0 3px var(--bad), 0 0 0 5px rgba(255,255,255,.3), 0 12px 14px rgba(0,0,0,.5); }
.tray.bust .die { filter: saturate(.55) brightness(.92); box-shadow: 0 0 0 3px var(--bad), 0 5px 9px rgba(0,0,0,.5); }
.tray.hotflash { animation: flash .8s ease; }
@keyframes flash { 0%, 100% { box-shadow: inset 0 4px 12px rgba(0,0,0,.5); } 40% { box-shadow: inset 0 4px 12px rgba(0,0,0,.5), 0 0 26px 6px rgba(255, 220, 120, .8); } }

.kept-wrap { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 54px; }
.kept-label { font-size: .82rem; color: rgba(255, 248, 232, .75); flex: none; }
.kept {
  flex: 1; min-width: 120px; min-height: 48px;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(0,0,0,.16);
  box-shadow: inset 0 3px 8px rgba(0,0,0,.4);
}
.kept:empty::after { content: "–"; color: rgba(255,248,232,.4); }

.controls { display: flex; flex-direction: column; gap: 12px; }
.pts { display: flex; justify-content: center; gap: 8px; text-align: center; }
.pts div {
  flex: 1 1 0; max-width: 220px; min-width: 96px;
  background: rgba(0,0,0,.24); border-radius: 12px; padding: 6px 4px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.35);
}
.pts span { display: block; font-size: .74rem; color: rgba(255,248,232,.72); }
.pts strong { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.pts strong.bad { color: #ff9a9a; }
.controls .row { justify-content: center; }
.controls .btn { min-width: 150px; }
.controls.off .row { opacity: .5; }
.ooo { text-align: center; }

/* Sieger */
.win {
  position: fixed; inset: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: rgba(6, 8, 14, .6);
  backdrop-filter: blur(3px);
  animation: fade .3s ease;
}
.win-card {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: 20px;
  padding: 22px 22px 20px;
  width: min(440px, 100%);
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
  animation: pop .55s cubic-bezier(.2, 1.3, .3, 1);
}
@keyframes pop { from { transform: scale(.6) translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.crown { animation: crown 1.6s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes crown { 0%, 100% { transform: rotate(-4deg) translateY(0); } 50% { transform: rotate(4deg) translateY(-6px); } }
.win-card h2 { font-size: 1.6rem; }
.standings { width: 100%; border-collapse: collapse; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.standings th { font-size: .75rem; font-weight: 600; color: var(--muted); text-align: right; padding: 2px 6px; }
.standings th:first-child, .standings td:first-child { text-align: left; }
.standings td { padding: 6px; border-top: 1px solid var(--line); text-align: right; }
.standings tr.first td { font-weight: 750; color: var(--accent); }
.win .row { justify-content: center; margin-top: 4px; }

/* Regeln */
dialog {
  border: 1px solid var(--line); border-radius: 18px;
  background: var(--surface); color: var(--text);
  width: min(560px, 92vw); padding: 0;
}
dialog::backdrop { background: rgba(0,0,0,.55); }
.rules-in { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.rules-in ol { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; font-size: .95rem; }
.ptable { border-collapse: collapse; width: 100%; font-size: .93rem; }
.ptable th, .ptable td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.ptable td:last-child, .ptable th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.ptable th { color: var(--muted); font-weight: 600; font-size: .8rem; }

/* Hinweis */
.toast {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--text); color: var(--bg);
  padding: .7em 1.1em; border-radius: 12px; z-index: 70;
  max-width: min(92vw, 460px); text-align: center; font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
  animation: fade .2s ease;
}
.toast.bad { background: var(--bad); color: #fff; }

#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }

/* Schmale Bildschirme */
@media (max-width: 560px) {
  .table { align-items: flex-start; gap: 10px; }
  .cup { width: 62px; height: 78px; margin-top: 8px; }
  .board { padding: 12px; border-width: 8px; }
  .tray { min-height: 92px; padding: 12px 8px; gap: 9px; }
  .die { --s: clamp(40px, 11.6vw, 50px); }
  .die.small { --s: clamp(30px, 8.5vw, 36px); }
  .pts strong { font-size: 1.2rem; }
  .pts div { min-width: 0; }
  .controls .btn { flex: 1; min-width: 0; padding-inline: .5em; font-size: .93rem; white-space: nowrap; }
  .roomcode strong { font-size: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  .pop, .pl .badge, .pl.gain { animation: none !important; opacity: 1; transform: translate(-50%, -50%); }
  .pl .badge { transform: none; }
  .pl.gain { transform: none; box-shadow: 0 0 0 3px rgba(242, 182, 50, .9); }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

.die, .cup, .plate, .pts { -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
