@import url(/static/fonts/fonts.css);

/* A regulars' table in a dark pub (generated picture), white dice, beer
   mats with a yellow bolt and electric blue/yellow lettering. */
:root {
  --wood: #4a2a14;
  --wood-dk: #1c0f07;
  --ink: #1f1a16;
  --night: #120a05;
  --red: #d9261b;
  --red-dark: #8a140b;
  --orange: #ff9d2e;
  --yellow: #ffd21a;
  --volt: #3fb7ff;
  --green: #4fd36a;
  --blue: #2f6fe0;
  --paper: #fffaf1;
  --muted: #6d665f;
  --line: #eadfce;
  --good: #2aa84a;
  --bad: #d9261b;
  --radius: 16px;
  --stencil: Anton, Impact, Haettenschweiler, 'Arial Narrow', sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
html { background: var(--night); }
body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 70% 55% at 50% 0%, rgba(255, 196, 110, .22), transparent 70%),
    radial-gradient(ellipse 120% 90% at 50% 100%, rgba(0, 0, 0, .7), transparent 60%),
    repeating-linear-gradient(90deg, rgba(0,0,0,.35) 0 2px, transparent 2px 96px),
    linear-gradient(180deg, #3a2010, #1c0f07);
  background-attachment: fixed;
  color: var(--ink); font-family: Montserrat, system-ui, sans-serif; font-size: 15px; line-height: 1.45;
}
main { max-width: 1100px; margin: 0 auto; padding: 16px; }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.2; }
h2 { font-weight: 800; color: var(--ink); }
p { margin: 0 0 .5rem; }
a { color: var(--red); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center-text { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------------------------------------------------------------- logo */
.logo { position: relative; display: inline-flex; align-items: center; line-height: 1; white-space: nowrap; user-select: none; font-family: var(--stencil); font-weight: 400; letter-spacing: .03em; }
.logo-high, .logo-volt {
  color: #f2fbff; -webkit-text-stroke: .018em #0b2a55; paint-order: stroke fill;
  text-shadow: 0 0 .03em #fff, 0 0 .1em #7fd3ff, 0 0 .22em #1e8bff, 0 0 .5em rgba(30, 110, 255, .55), .03em .05em 0 #050d1c;
  animation: flicker 7s infinite;
}
.logo-volt { animation-delay: -3.1s; }
.logo-bolt { width: 1.05em; height: 1.45em; margin: -.3em -.06em -.2em; flex: none; position: relative; z-index: 1; overflow: visible;
  filter: drop-shadow(0 0 .06em #fff3a0) drop-shadow(0 0 .2em #ffd21a) drop-shadow(0 0 .45em rgba(255, 150, 0, .75)); animation: bolt 2.6s infinite; }
.logo-arc { position: absolute; left: 4%; right: 4%; bottom: -.14em; height: .06em; border-radius: 1em;
  background: linear-gradient(90deg, transparent, #7fd3ff 15%, #fff 50%, #7fd3ff 85%, transparent); box-shadow: 0 0 .15em #3fb7ff, 0 0 .4em #1e6dff; opacity: .8; animation: arc 2.6s infinite; }
@keyframes flicker { 0%, 89%, 91.5%, 93%, 100% { opacity: 1; } 90% { opacity: .55; text-shadow: none; } 92.4% { opacity: .8; } }
@keyframes bolt { 0%, 100% { transform: scale(1) rotate(0deg); } 48% { transform: scale(1) rotate(0deg); } 50% { transform: scale(1.12) rotate(-4deg); filter: drop-shadow(0 0 .1em #fff) drop-shadow(0 0 .35em #ffe14a) drop-shadow(0 0 .8em rgba(255, 160, 0, 1)); } 54% { transform: scale(1) rotate(0deg); } }
@keyframes arc { 0%, 46%, 60%, 100% { opacity: .55; transform: scaleX(.96); } 50% { opacity: 1; transform: scaleX(1.02); } 53% { opacity: .2; } 56% { opacity: .95; } }
.hero-logo { font-size: clamp(2.6rem, 11vw, 5.6rem); }
.brand-logo { font-size: 1.35rem; }
.brand-logo .logo-arc { display: none; }
.bolt { overflow: visible; }

/* ---------------------------------------------------------------- topbar */
.topbar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: rgba(14, 8, 4, .8); color: #fff; flex-wrap: wrap; backdrop-filter: blur(6px); }
.topbar a, .topbar .linkbtn { color: #fff; text-decoration: none; font-weight: 600; }
.brand { display: flex; align-items: center; padding: 4px 8px; }
.topbar nav { margin-left: auto; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }

/* ---------------------------------------------------------------- forms */
label { display: block; font-weight: 700; font-size: .85rem; margin-bottom: 4px; color: var(--ink); }
input, select { width: 100%; padding: 11px 12px; border: 2px solid var(--line); border-radius: 10px; font: inherit; background: #fff; color: var(--ink); }
input:focus, select:focus { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(245, 196, 0, .35); }
button, .btn { font: inherit; font-weight: 800; border: 0; border-radius: 12px; padding: 11px 18px; cursor: pointer; background: #3a3a3a; color: #fff; text-decoration: none; display: inline-block; box-shadow: 0 3px 0 #161412; transition: transform .08s, filter .15s; }
button:hover { filter: brightness(1.08); }
button:active { transform: translateY(2px); box-shadow: 0 1px 0 #161412; }
button:disabled { opacity: .45; cursor: default; }
.btn-accent { background: var(--red); box-shadow: 0 3px 0 var(--red-dark); }
.btn-accent:active { box-shadow: 0 1px 0 var(--red-dark); }
.btn-ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn-small { padding: 6px 12px; font-size: .85rem; }
.btn-block { width: 100%; }
.sso-btn::before { content: '🔑 '; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.check input { width: auto; }
.code-input { text-transform: uppercase; letter-spacing: .3em; font-weight: 900; font-size: 1.4rem; text-align: center; }

/* ---------------------------------------------------------------- layout */
.panel { background: var(--paper); border-radius: var(--radius); padding: 18px; box-shadow: 0 10px 30px rgba(5, 2, 20, .45), inset 0 -4px 0 rgba(28, 23, 51, .07); }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 8px; align-items: center; }
.grow { flex: 1; min-width: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.notice { padding: 12px 14px; border-radius: 10px; background: #fff; border-left: 5px solid var(--blue); }
.notice.err { border-left-color: var(--bad); }
.notice.ok { border-left-color: var(--good); background: #f1faf2; }
.pill { display: inline-block; font-size: .72rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: #f1ebe4; color: var(--ink); margin-right: 4px; }
.pill.off { background: #f3f3f3; color: #888; }
.pill.gold { background: var(--yellow); color: var(--ink); }
.dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; flex: none; box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(0,0,0,.15); }
.copybox { display: flex; gap: 6px; }
.copybox input { font-size: .85rem; }
.toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; border-left: 5px solid var(--yellow); z-index: 2000; max-width: calc(100vw - 32px); font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.35); animation: toast-in .25s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } }
.spinner { width: 14px; height: 14px; border: 3px solid rgba(255,255,255,.35); border-top-color: var(--yellow); border-radius: 50%; display: inline-block; vertical-align: -2px; margin-right: 8px; animation: spin 0.9s linear infinite; }
.panel .spinner { border-color: var(--line); border-top-color: var(--red); }
@keyframes spin { to { transform: rotate(360deg); } }
.wait { color: var(--muted); font-weight: 600; }

/* confetti (ui.js) */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 3000; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { top: 110vh; transform: rotate(720deg) translateX(40px); } }


/* ---------------------------------------------------------------- home */
.hero { text-align: center; margin: 22px 0 26px; color: #fff; }
.hero-props { display: flex; justify-content: center; align-items: flex-end; gap: 18px; margin: 18px 0 6px; }
.hero-props .hero-cup { width: clamp(70px, 16vw, 110px); filter: drop-shadow(0 10px 14px rgba(0,0,0,.6)); transform: rotate(-8deg); }
.hero-dice { display: flex; gap: 10px; font-size: clamp(34px, 8vw, 52px); }
.hero-dice .die { animation: hero-in .7s cubic-bezier(.2,.8,.3,1.25) backwards; animation-delay: calc(var(--i) * 90ms + .2s); }
.hero-props .hero-lids { --s: clamp(46px, 11vw, 70px); }
@keyframes hero-in { from { opacity: 0; transform: translate(-120px, -40px) rotate(-260deg); } }
.subtitle { font-size: 1.1rem; font-weight: 600; color: #fbe9d6; margin: 14px auto 0; max-width: 640px; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.rules { padding-left: 1.3rem; margin: 0; }
.rules li { margin-bottom: .55rem; }
.rules li::marker { color: var(--red); font-weight: 900; }

/* ---------------------------------------------------------------- dice + mats */
.die {
  --tilt: 0deg;
  position: relative; width: 1em; height: 1em; flex: none; border-radius: .18em; user-select: none; -webkit-user-select: none;
  background: radial-gradient(circle at 32% 26%, #ffffff 0%, #f3f1ec 45%, #d8d3ca 100%);
  box-shadow: inset 0 -.05em .03em rgba(0,0,0,.2), inset 0 .03em .02em rgba(255,255,255,.9), .03em .08em .12em rgba(0,0,0,.6);
  transform: rotate(var(--tilt)); transition: background .25s, transform .18s, box-shadow .2s;
  --pip: #141414;
}
.pips { position: absolute; inset: .13em; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); }
.pips i { place-self: center; width: .19em; height: .19em; border-radius: 50%; }
.pips i.on { background: radial-gradient(circle at 40% 35%, color-mix(in srgb, var(--pip) 70%, #fff), var(--pip) 60%); box-shadow: inset 0 .015em .02em rgba(0,0,0,.6); }
.die[data-pip="1"] { --pip: #c41a10; }
.die[data-pip="1"] .pips i.on { width: .26em; height: .26em; }
.die.sel { transform: rotate(var(--tilt)) translateY(-.14em) scale(1.06); box-shadow: 0 0 0 .05em var(--yellow), 0 0 .25em .04em rgba(255, 210, 26, .9), 0 .2em .2em rgba(0,0,0,.55); }
.die.aside { box-shadow: 0 0 0 .04em rgba(79, 211, 106, .9), 0 0 .2em rgba(79, 211, 106, .55), .03em .08em .12em rgba(0,0,0,.6); }
.die.turned::after { content: '6→1'; position: absolute; left: 50%; bottom: -.36em; transform: translateX(-50%) rotate(calc(var(--tilt) * -1)); font-size: .2em; font-weight: 900; color: #fff; background: #1d6b30; padding: .05em .35em; border-radius: 1em; white-space: nowrap; }
.die.can { cursor: pointer; animation: can 1.2s ease-in-out infinite alternate; }
.die.can.sel { animation: none; }
@keyframes can { to { box-shadow: 0 0 0 .035em rgba(255, 210, 26, .8), 0 0 .2em rgba(255, 210, 26, .5), .03em .08em .12em rgba(0,0,0,.6); } }
@media (hover: hover) { .die.can:hover { transform: rotate(var(--tilt)) translateY(-.08em) scale(1.05); } }
.die.idle { opacity: .35; filter: grayscale(.4); }
.die.rolling { animation: tumble .3s linear infinite; animation-delay: calc(var(--d) * -70ms); opacity: 1; filter: none; }
.die.rolling .pips { filter: blur(.5px); }
@keyframes tumble {
  0% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(.14em, -.26em) rotate(95deg) scale(1.08); }
  50% { transform: translate(-.1em, -.08em) rotate(185deg); }
  75% { transform: translate(.06em, -.2em) rotate(275deg) scale(1.05); }
  100% { transform: translate(0, 0) rotate(360deg); }
}
.die.land { animation: land .34s cubic-bezier(.3,1.6,.5,1); }
@keyframes land { 0% { transform: translateX(.6em) rotate(calc(var(--tilt) + 60deg)) scale(1.2); } 100% { transform: rotate(var(--tilt)); } }
.mini-dice { display: inline-flex; gap: .15em; font-size: 1.15em; vertical-align: middle; }
.mini-dice .die { box-shadow: 0 .04em .06em rgba(0,0,0,.5); }

.lid { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }
.lid.tiny { display: inline-block; width: 1.1em; height: 1.1em; vertical-align: -.2em; }
.lid-stack { --s: 2em; position: relative; display: inline-block; width: var(--s); height: calc(var(--s) + (var(--n) - 1) * var(--s) * .07); flex: none; }
.lid-stack .lid { position: absolute; left: 0; width: var(--s); height: var(--s); bottom: calc(var(--k) * var(--s) * .07); transform: rotate(var(--r)); filter: drop-shadow(0 .03em .05em rgba(0,0,0,.6)); }
.fly-lid { position: fixed; z-index: 1600; filter: drop-shadow(0 6px 8px rgba(0,0,0,.6)); }
.cup { display: block; width: 100%; user-select: none; -webkit-user-drag: none; }

/* ---------------------------------------------------------------- lobby */
.lobby { margin-top: 8px; }
.code-text { font-size: clamp(2.4rem, 10vw, 3.4rem); font-weight: 900; font-style: italic; letter-spacing: .18em; color: var(--yellow); -webkit-text-stroke: 3px var(--night); paint-order: stroke fill; text-shadow: 3px 4px 0 var(--red), 0 0 18px rgba(255, 210, 26, .5); }
.qr { width: 180px; height: 180px; display: block; margin: 0 auto; border-radius: 12px; border: 6px solid #fff; box-shadow: 0 0 0 3px var(--red); }
.players .tags { margin-top: 2px; }
.lobby-wrap main { padding-bottom: 40px; }

/* ---------------------------------------------------------------- table */
body.in-game { overflow: hidden; overscroll-behavior: none; }
.game { height: 100svh; display: flex; flex-direction: column; align-items: center; padding: max(6px, env(safe-area-inset-top)) max(6px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left)); gap: 6px; }
.board-wrap { flex: none; display: grid; place-items: center; }
.board { position: relative; container-type: size; border-radius: 3cqmin; overflow: hidden; background: #2a160a center / cover no-repeat; box-shadow: 0 10px 40px rgba(0,0,0,.7), inset 0 0 6cqmin rgba(0,0,0,.65); }
.board.tall { aspect-ratio: 2 / 3; width: min(calc(100vw - 12px), calc((100svh - 170px) * 2 / 3)); background-image: url(/static/art/table-tall.webp); }
.board.wide { aspect-ratio: 3 / 2; width: min(calc(100vw - 12px), calc((100svh - 12px) * 1.5)); background-image: url(/static/art/table-wide.webp); }
.game.wide { flex-direction: row; justify-content: center; align-items: stretch; }
.game.wide .side { width: 320px; flex: none; }
.game.wide .board { width: min(calc(100vw - 350px), calc((100svh - 12px) * 1.5)); }
@media (max-width: 900px) { .game.wide .side { display: none; } .game.wide .board { width: min(calc(100vw - 12px), calc((100svh - 12px) * 1.5)); } }
.felt-glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 40% 34% at 50% 50%, rgba(255, 200, 120, .12), transparent 70%); }
.board.zapped::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 30; animation: zap .7s; background: radial-gradient(ellipse at 50% 50%, rgba(160, 220, 255, .55), rgba(255, 230, 80, .25) 40%, transparent 75%); }
@keyframes zap { 0%, 30%, 60% { opacity: 1; } 15%, 45% { opacity: .1; } 100% { opacity: 0; } }

.hud { position: absolute; left: 50%; top: 22%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 4cqmin; font-family: var(--stencil); color: #fff; letter-spacing: .06em; text-shadow: 0 .3cqmin .4cqmin #000; white-space: nowrap; }
.board.tall .hud { top: 19%; }
.hud-half, .hud-limit { font-size: 3.4cqmin; display: flex; align-items: center; gap: .6cqmin; }
.hud-half { color: var(--yellow); text-shadow: 0 0 1.4cqmin rgba(255, 210, 26, .6), 0 .3cqmin .4cqmin #000; }
.hud-bolt { width: 3cqmin; height: 4cqmin; filter: drop-shadow(0 0 .8cqmin #ffd21a); }
.hud-limit { color: #bfe6ff; text-shadow: 0 0 1.2cqmin rgba(63, 183, 255, .6), 0 .3cqmin .4cqmin #000; }
.pot { position: relative; display: flex; align-items: flex-end; }
.pot-pile { position: relative; width: 15cqmin; height: 10cqmin; }
.pot-pile .lid { position: absolute; width: 7cqmin; height: 7cqmin; left: calc(50% - 3.5cqmin + var(--x)); top: calc(50% - 3.5cqmin + var(--y)); transform: rotate(var(--r)); filter: drop-shadow(0 .3cqmin .4cqmin rgba(0,0,0,.6)); }
.pot-n { position: absolute; right: -1.6cqmin; bottom: -1cqmin; min-width: 4.6cqmin; height: 4.6cqmin; display: grid; place-items: center; border-radius: 50%; background: #120a05; color: var(--yellow); font-size: 2.8cqmin; box-shadow: 0 0 0 .4cqmin var(--yellow); letter-spacing: 0; }

/* the middle of the table: dice, hand, hint and buttons stacked, so a long
   hint pushes the buttons down instead of running into them */
.center { position: absolute; left: 50%; top: 31%; transform: translateX(-50%); width: 74cqw; display: flex; flex-direction: column; align-items: center; gap: 1.4cqmin; }
.board.tall .center { top: 30%; width: 50cqw; gap: 1.8cqmin; }
.tray { position: relative; display: flex; align-items: center; gap: 3cqmin; font-size: 10cqmin; }
.board.tall .tray { font-size: 9cqmin; }
.aside-dice, .cup-dice { display: flex; gap: 1.6cqmin; }
.aside-dice:empty { display: none; }
.aside-dice { padding: 1.2cqmin; border-radius: 2cqmin; background: rgba(20, 60, 30, .35); box-shadow: inset 0 0 0 .3cqmin rgba(79, 211, 106, .4); }
.cup-wrap { width: 11cqmin; margin-left: 1cqmin; transform: rotate(10deg); filter: drop-shadow(0 1.5cqmin 1.5cqmin rgba(0,0,0,.65)); }
.board.tall .cup-wrap { position: absolute; right: -14cqmin; width: 10cqmin; }
.cup-wrap.shake { animation: cup-shake .16s linear infinite; }
@keyframes cup-shake { 0% { transform: rotate(4deg) translate(0, 0); } 25% { transform: rotate(16deg) translate(.6cqmin, -.8cqmin); } 50% { transform: rotate(6deg) translate(-.4cqmin, -.2cqmin); } 75% { transform: rotate(18deg) translate(.3cqmin, -1cqmin); } 100% { transform: rotate(4deg); } }

.hand-line { min-height: 7cqmin; display: flex; justify-content: center; align-items: baseline; gap: 2.4cqmin; font-family: var(--stencil); color: #fff; text-shadow: 0 .3cqmin .5cqmin #000; }
.hand-label { font-size: 6cqmin; letter-spacing: .05em; color: #fff; animation: pop .35s; }
.hand-label.k-general, .hand-label.k-strasse, .hand-label.k-jule { color: #bfe6ff; text-shadow: 0 0 1.5cqmin #3fb7ff, 0 .3cqmin .5cqmin #000; }
.hand-label.schock { color: var(--yellow); text-shadow: 0 0 1cqmin #fff3a0, 0 0 3cqmin #ffb000, 0 .3cqmin .5cqmin #000; animation: pop .35s, flicker 3s infinite; }
.throw-n { font-size: 3cqmin; color: #e8d4b8; letter-spacing: .08em; }
.thint { width: 100%; min-height: 6.6cqmin; text-align: center; font-size: 2.6cqmin; font-weight: 700; color: #f1e2cc; line-height: 1.25; text-shadow: 0 .2cqmin .4cqmin #000, 0 0 1cqmin #000; }
.board.tall .thint { font-size: 2.4cqmin; min-height: 6.2cqmin; }
.thint.mine { color: var(--yellow); }
.thint .beat { color: #ffb4a8; font-weight: 800; margin-top: .6cqmin; }
.controls { display: flex; gap: 3cqmin; margin-top: .6cqmin; }
.board.tall .controls { flex-direction: column; align-items: center; gap: 2.4cqmin; }
.board.tall .tbtn-lg { font-size: 4.2cqmin; padding: 1.4cqmin 2.4cqmin; min-width: 28cqmin; }
.tbtn { font-family: var(--stencil); font-weight: 400; letter-spacing: .05em; line-height: 1; border-radius: 1.6cqmin; transition: opacity .2s, transform .1s, box-shadow .2s; }
.tbtn-lg { font-size: 4.6cqmin; padding: 1.6cqmin 3.4cqmin; min-width: 30cqmin; }
.tbtn.roll { background: linear-gradient(180deg, #ffe45a, #ffc400 60%, #e09a00); color: #1a1206; box-shadow: 0 .8cqmin 0 #8a5a00, 0 1.4cqmin 2cqmin rgba(0,0,0,.6); }
.tbtn.stand { background: linear-gradient(180deg, #3b4a5c, #1f2a38); color: #dff1ff; box-shadow: 0 .8cqmin 0 #0c121a, 0 1.4cqmin 2cqmin rgba(0,0,0,.6), inset 0 0 0 .3cqmin rgba(63, 183, 255, .6); }
.tbtn:active { transform: translateY(.5cqmin); }
.tbtn.off { opacity: .35; cursor: default; filter: grayscale(.6); }
.tbtn.go { animation: go 1s ease-in-out infinite alternate; }
.tbtn.go2 { animation: go2 1.2s ease-in-out infinite alternate; }
@keyframes go { to { box-shadow: 0 .8cqmin 0 #8a5a00, 0 0 4cqmin rgba(255, 210, 26, .95); } }
@keyframes go2 { to { box-shadow: 0 .8cqmin 0 #0c121a, 0 0 3.4cqmin rgba(63, 183, 255, .9), inset 0 0 0 .3cqmin rgba(63, 183, 255, 1); } }
.corner { position: absolute; top: 2cqmin; z-index: 20; }
.corner.tl { left: 2cqmin; }
.corner.tr { right: 2cqmin; }
.tbtn-sm { font-size: 2.6cqmin; padding: 1cqmin 1.8cqmin; background: rgba(15, 9, 5, .7); color: #f1e2cc; box-shadow: 0 .4cqmin 1cqmin rgba(0,0,0,.5); backdrop-filter: blur(2px); }

.seat {
  position: absolute; z-index: 5; transform: translate(-50%, -50%); width: 25cqmin; text-align: center; color: #f4ece0;
  background: linear-gradient(170deg, rgba(48, 52, 50, .94), rgba(22, 24, 23, .94)); border: .45cqmin solid var(--pc); border-radius: 1.8cqmin; padding: .8cqmin 1.2cqmin 1cqmin;
  box-shadow: 0 1cqmin 2.4cqmin rgba(0,0,0,.6); transition: box-shadow .3s, transform .3s, opacity .3s;
}
.seat.active { border-color: var(--yellow); box-shadow: 0 0 0 .5cqmin rgba(255, 210, 26, .45), 0 0 4cqmin rgba(255, 210, 26, .8); transform: translate(-50%, -50%) scale(1.07); z-index: 6; }
.seat.offline { opacity: .6; }
.seat.out { opacity: .5; filter: grayscale(.8); }
.seat.me .seat-name { color: var(--yellow); }
.seat-name { font-weight: 800; font-size: 2.3cqmin; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat-row { display: flex; align-items: center; justify-content: center; gap: 1.2cqmin; margin-top: .4cqmin; min-height: 4.4cqmin; }
.seat-lids { display: inline-flex; align-items: flex-end; gap: .6cqmin; font-family: var(--stencil); font-size: 3.2cqmin; }
.seat-lids .lid-stack { --s: 3.8cqmin; }
.halves { color: #ff6a5a; font-weight: 900; font-size: 2.6cqmin; letter-spacing: .1em; }
.seat .tally { font-size: 2.4cqmin; }
.seat-res { margin-top: .6cqmin; font-family: var(--stencil); font-size: 2.9cqmin; letter-spacing: .04em; border-radius: 1cqmin; padding: .3cqmin .8cqmin; background: rgba(255,255,255,.08); display: flex; justify-content: center; gap: 1.2cqmin; align-items: baseline; animation: pop .35s; }
.res-throws { font-family: Montserrat, sans-serif; font-weight: 700; font-size: 1.9cqmin; color: #cbbca6; }
.seat-res.best { background: rgba(255, 210, 26, .25); color: var(--yellow); box-shadow: inset 0 0 0 .25cqmin rgba(255, 210, 26, .6); }
.seat-res.worst { background: rgba(217, 38, 27, .35); color: #ffd0c8; box-shadow: inset 0 0 0 .25cqmin rgba(255, 90, 74, .7); }
.seat-res.outl { color: #aaa; font-size: 2.4cqmin; }
.tally { display: inline-flex; gap: .4em; font-family: var(--stencil); color: #f4ece0; letter-spacing: .08em; }
.tally-g { position: relative; }
.tally-g.five::after { content: ''; position: absolute; left: -.15em; right: -.15em; top: 50%; height: .12em; background: currentColor; transform: rotate(-24deg); }

.board.has-banner .tray, .board.has-banner .hand-line, .board.has-banner .thint { visibility: hidden; }
.banner { position: absolute; z-index: 25; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(70cqw, 78cqmin * 1.2); background: rgba(14, 9, 5, .93); color: #fff; border-radius: 2.4cqmin; padding: 2.6cqmin 3cqmin; text-align: center;
  box-shadow: 0 0 0 .5cqmin var(--yellow), 0 0 5cqmin rgba(255, 210, 26, .45), 0 2cqmin 5cqmin rgba(0,0,0,.7); animation: banner-in .45s cubic-bezier(.2,.9,.3,1.3); cursor: pointer; }
.board.tall .banner { width: 86cqw; }
.banner.so { box-shadow: 0 0 0 .6cqmin #fff, 0 0 7cqmin rgba(160, 220, 255, .9), 0 2cqmin 5cqmin rgba(0,0,0,.7); }
@keyframes banner-in { from { opacity: 0; transform: translate(-50%, -50%) scale(.6); } }
.banner-title { font-family: var(--stencil); font-size: 5cqmin; letter-spacing: .04em; color: var(--yellow); display: flex; justify-content: center; align-items: center; gap: 1.4cqmin; text-shadow: 0 0 2cqmin rgba(255, 210, 26, .5); }
.banner-bolt { width: 4cqmin; height: 5.4cqmin; flex: none; }
.banner-sub { font-size: 2.6cqmin; color: #e8d4b8; margin-top: .4cqmin; }
.banner-best { font-size: 2.8cqmin; font-weight: 800; margin-top: 1.2cqmin; color: #bfe6ff; }
.banner-list { list-style: none; margin: 1.6cqmin 0 0; padding: 0; font-size: 2.5cqmin; text-align: left; }
.banner-list li { display: grid; grid-template-columns: 1fr auto 13cqmin 5cqmin; gap: 1.4cqmin; align-items: center; padding: .5cqmin 1cqmin; border-radius: 1cqmin; }
.banner-list li.best { background: rgba(255, 210, 26, .18); color: var(--yellow); }
.banner-list li.worst { background: rgba(217, 38, 27, .35); }
.bl-name { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-hand { font-family: var(--stencil); letter-spacing: .04em; }
.bl-t { color: #cbbca6; font-size: .85em; text-align: right; }
.banner .mini-dice { font-size: 3cqmin; }

.side { flex: 1 1 auto; min-height: 0; overflow: auto; width: min(100%, 560px); background: rgba(16, 10, 6, .86); color: #eee; border-radius: 14px; padding: 12px 14px; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.side h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: #bbb; margin: 0 0 4px; }
.side .list li { border-bottom-color: rgba(255,255,255,.08); padding: 6px 0; }
.standings li.active strong { color: var(--yellow); }
.standings li.out { opacity: .5; }
.st-lids { font-weight: 800; }
.side .tally { margin-left: 6px; }
.side .halves { font-size: .9rem; }
.row-between { display: flex; justify-content: space-between; gap: 8px; }
.last { margin-top: 10px; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.06); }
.last p { margin: 0; }
.log { list-style: none; margin: 10px 0 0; padding: 0; font-size: .78rem; }
.log li { opacity: .78; padding: 2px 0; }
.log li:first-child { opacity: 1; }

/* bubbles */
.fly-layer { position: fixed; inset: 0; pointer-events: none; z-index: 1500; }
.bubble { position: fixed; z-index: 1700; transform: translate(-50%, -50%); font-family: var(--stencil); font-weight: 400; font-size: 2.4rem; color: #fff; white-space: nowrap;
  -webkit-text-stroke: 2px var(--night); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--night); animation: bubble 1.9s ease-out forwards; letter-spacing: .04em; }
.bubble.b-zap { color: var(--yellow); text-shadow: 3px 3px 0 var(--night), 0 0 18px rgba(255, 210, 26, .95); }
.bubble.b-big { color: #fff; font-size: 3.6rem; text-shadow: 3px 3px 0 #0b2a55, 0 0 14px #3fb7ff, 0 0 34px #1e6dff, 0 0 60px rgba(255, 210, 26, .8); }
.bubble.b-out { color: #ccc; }
.bubble.b-half { color: #ff6a5a; font-size: 2.6rem; }
@keyframes bubble { 0% { opacity: 0; scale: .3; } 15% { opacity: 1; scale: 1.15; } 25% { scale: 1; } 75% { opacity: 1; translate: 0 -12px; } 100% { opacity: 0; translate: 0 -34px; } }
@keyframes pop { 0% { scale: 1.18; } 100% { scale: 1; } }
@keyframes fade-in { from { opacity: 0; } }

/* menu + overlays */
.menu { position: fixed; right: 12px; top: calc(max(8px, env(safe-area-inset-top)) + 44px); z-index: 1200; background: #fff; border-radius: 14px; padding: 6px; display: flex; flex-direction: column; min-width: 220px; box-shadow: 0 12px 30px rgba(0,0,0,.4); animation: pop .2s; }
.menu button { background: none; box-shadow: none; color: var(--ink); text-align: left; padding: 10px 12px; font-weight: 700; }
.menu button:hover { background: #f5efe8; }
.overlay { position: fixed; inset: 0; z-index: 1300; background: rgba(20, 12, 6, .62); display: grid; place-items: center; padding: 16px; animation: fade-in .3s; backdrop-filter: blur(3px); }
.modal { width: min(480px, 100%); max-height: calc(100svh - 32px); overflow: auto; color: var(--ink); animation: pop .35s; }
.overlay.clear { background: transparent; backdrop-filter: none; }
.over { text-align: center; }
.over h2 { font-size: 2.1rem; font-weight: 400; font-family: var(--stencil); letter-spacing: .02em; color: var(--red); }
.over-dice { display: flex; justify-content: center; gap: 8px; font-size: 44px; margin: 4px 0 12px; }
.over-points { display: inline-block; background: var(--orange); color: var(--ink); font-weight: 900; padding: 4px 14px; border-radius: 999px; margin-bottom: 12px; }
.scores li { text-align: left; }
.scores li.win { background: #fff1d6; border-radius: 10px; padding-left: 8px; padding-right: 8px; }
.score { color: var(--ink); white-space: nowrap; }
.grid-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opts .check { margin: 6px 0; }

.over-beers { font-size: 46px; letter-spacing: 6px; animation: pop .5s; }
.over-why { font-weight: 700; }
.scores li.lose { background: #ffe9d6; border-radius: 10px; padding-left: 8px; padding-right: 8px; }
.scores .tally { color: var(--ink); font-size: 1.3rem; }
.opts .check { margin: 6px 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------------------------------------------------------------- tutorial */
.tut-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 16px; }
.tut-cta h2 { margin-bottom: 4px; }
.tut-cta p { margin: 0; }
.tut-cta .grow { flex: 1 1 280px; }
.coach-box { position: sticky; top: -12px; z-index: 2; margin: -12px -14px 10px; padding: 12px 14px; background: #2a1a0c; border-bottom: 2px solid var(--yellow); border-radius: 14px 14px 0 0; }
.coach-head { display: flex; justify-content: space-between; gap: 8px; font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--yellow); }
.coach-box p { margin: 6px 0 0; font-size: 1rem; line-height: 1.4; color: #fff; }
.coach-box .btn-small { margin-top: 10px; }
.coach-box.nudge { animation: nudge .4s; }
@keyframes nudge { 20% { translate: -6px 0; } 40% { translate: 6px 0; } 60% { translate: -4px 0; } 80% { translate: 3px 0; } }
.die.coach::before { content: ''; position: absolute; inset: -.09em; border-radius: .25em; border: .045em solid var(--yellow); animation: coach .8s ease-in-out infinite alternate; pointer-events: none; }
@keyframes coach { from { opacity: .35; } to { opacity: 1; box-shadow: 0 0 .18em .04em rgba(255, 207, 74, .8); } }
.tbtn.coach { outline: .5cqmin solid #fff; outline-offset: .6cqmin; }
@media (prefers-reduced-motion: reduce) { .die.coach::before { animation: none; } }
@media (max-width: 900px) { .game.wide.tut .side { display: block; width: 240px; } .game.wide.tut .board { width: min(calc(100vw - 260px), calc((100svh - 12px) * 1.5)); } }
.coach-box .row { margin-top: 10px; }
.coach-hands { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.coach-hands li { display: flex; align-items: center; gap: 10px; font-family: var(--stencil); letter-spacing: .04em; color: var(--yellow); }
.coach-hands .mini-dice { font-size: 1.35rem; }
.banner-short { font-size: 2.4cqmin; color: #ffb4a8; margin-top: .6cqmin; font-weight: 700; }
