:root {
  color-scheme: dark;
  --bg: #111722;
  --panel: #1a2230;
  --panel-light: #202b3b;
  --line: #303b4c;
  --text: #f2f3f6;
  --muted: #98a5b7;
  --accent: #c6ef83;
  --player: #f16463;
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: radial-gradient(ellipse at 20% 30%, #1b263630, transparent 65%), var(--bg); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
button, a, input, select, [role="button"] { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
[hidden] { display: none !important; }
.online-panel { padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); margin-bottom: 28px; }
.online-panel h2 { margin: 12px 0; }
.online-panel p { color: var(--muted); line-height: 1.6; }
.online-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.online-actions a { text-decoration: none; }
#room-lobby { display: flex; gap: 28px; align-items: center; margin-top: 24px; }
#room-qr { flex: 0 0 200px; background: white; border-radius: 12px; padding: 6px; }
#room-qr svg { display: block; width: 100%; height: auto; }
#room-link { color: var(--accent); overflow-wrap: anywhere; display: block; margin-bottom: 16px; }
#network-error { color: #ffb6b0; }
#room-origin-warning { color: #ffe0c6; }
.tv-display { position: absolute; top: 10px; left: 10px; width: 190px; padding: 14px; border: 1px solid #52627988; border-radius: 14px; background: #111722df; pointer-events: none; text-align: center; }
.tv-display strong { font-size: 13px; display: block; color: var(--player); overflow-wrap: anywhere; }
.tv-display .dice-stage { height: 104px; gap: 24px; }
.tv-display p { font-size: 14px; font-weight: 700; margin: 4px 0 8px; }
.tv-display small { display: block; color: var(--muted); font-size: 10px; line-height: 1.4; }
.player-card.absent { opacity: .55; }
.connection-banner { padding: 14px 20px; color: #ffe0c6; background: #562f2f; border-radius: 12px; }
.online-host .sidebar, .online-host .intro, .online-host #rules-button, .online-host #winner-dialog, .online-host #new-game { display: none !important; }
.online-host .game-layout { grid-template-columns: minmax(0, 1fr); }
.online-playing .online-panel, .online-playing .page-footer, .online-playing .board-footer { display: none; }
.online-playing main { max-width: none; padding: 12px 24px; }
.online-playing .board-wrap { width: min(100%, calc(100dvh - 160px)); margin: 12px auto 0; }
.online-playing #event-dialog { position: fixed; inset: auto 24px 24px auto; width: min(360px, 40vw); max-height: 75dvh; margin: 0; padding: 20px; pointer-events: none; background: #141b27e8; z-index: 5; }
.online-host #event-confirm { display: none; }
.online-host #event-dialog::backdrop { background: transparent; backdrop-filter: none; }
.online-playing #event-dialog h2 { font-size: 20px; }
.online-playing #event-dialog p { font-size: 12px; }
.online-playing .wheel-labels { display: none; }
.online-playing .event-symbol { font-size: 28px; }
@media (max-width: 600px) {
  .tv-display { width: 150px; padding: 10px; transform: scale(.8); transform-origin: top left; }
  #room-lobby { flex-direction: column; align-items: stretch; }
  #room-qr { flex: auto; width: 200px; align-self: center; }
  .online-playing #event-dialog { width: min(300px, 75vw); bottom: 10px; right: 10px; }
}
h1, h2, h3, .brand, .turn-heading, .number { font-family: 'Space Grotesk', system-ui, sans-serif; }
.topbar { height: 88px; border-bottom: 1px solid #ffffff0d; display: flex; align-items: center; gap: 30px; padding: 0 max(32px, calc((100vw - 1360px) / 2)); }
.brand { font-size: 23px; font-weight: 700; display: flex; align-items: center; text-decoration: none; color: var(--text); white-space: nowrap; letter-spacing: -1px; }
.brand-mark { display: inline-flex; justify-content: center; align-items: center; background: var(--accent); width: 34px; height: 36px; color: var(--bg); border-radius: 10px; margin-right: 12px; font-size: 27px; transform: rotate(-7deg); }
.brand-mark span { font-size: 23px; }
.brand-dot { color: var(--accent); }
.top-caption { flex: 1; color: #6f7e93; font-size: 10px; letter-spacing: 1.8px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 17px; min-height: 44px; font-size: 13px; font-weight: 600; color: var(--text); transition: background .2s, transform .2s, border-color .2s; }
.button:hover:not(:disabled) { transform: translateY(-2px); }
.button.quiet { background: #1a223077; }
.button.quiet:hover { background: var(--panel-light); border-color: #526279; }
.button.primary { background: var(--accent); border-color: var(--accent); color: #182321; font-weight: 700; }
.button.primary:hover:not(:disabled) { background: #d5f5a6; }
.button > span { font-size: 19px; }
main { max-width: 1360px; margin: auto; padding: 44px 32px 24px; }
.intro { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 34px; }
.eyebrow { color: var(--muted); font-weight: 600; font-size: 10px; letter-spacing: 1.9px; }
.intro .eyebrow { display: flex; align-items: center; gap: 9px; }
.live-dot { display: inline-block; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 10px #c6ef8333; }
h1 { font-size: clamp(30px, 3.6vw, 47px); margin: 12px 0 9px; letter-spacing: -2px; font-weight: 600; }
h1 span { color: var(--accent); }
.intro p { color: var(--muted); font-size: 14px; margin: 0; }
.fullscreen-error { margin: 12px 24px; color: #ffe0c6; font-size: 13px; }
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 344px; align-items: start; gap: 24px; }
.board-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 20px 24px 16px; box-shadow: 0 15px 70px #00000018; }
.board-toolbar { display: flex; justify-content: space-between; align-items: center; }
.pill { background: #c6ef8310; color: var(--accent); border: 1px solid #c6ef8324; border-radius: 7px; padding: 7px 11px; font-size: 11px; font-weight: 600; }
.round-label { font-size: 10px; font-weight: 600; letter-spacing: 1.8px; color: var(--muted); }
.board-wrap { margin: 14px -5px 3px; position: relative; border-radius: 14px; overflow: hidden; }
#board { display: block; width: 100%; aspect-ratio: 1; touch-action: manipulation; }
.camera-control { position: absolute; top: 10px; right: 10px; font-size: 11px; background: #111b2bdd !important; }
.scene-caption { position: absolute; bottom: 12px; left: 14px; font-size: 10px; color: #d7e9bf; pointer-events: none; max-width: calc(100% - 28px); text-shadow: 0 1px 3px #000; }
#webgl-error { padding: 70px 24px; min-height: 300px; color: #ffe0c6; background: #182334; line-height: 1.8; }
.board-footer { display: flex; gap: 20px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; align-items: center; }
.board-footer > span { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
#board-hint { margin-left: auto; color: #69788e; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; }
.legend-dot.event { background: var(--accent); }
.legend-dot.safe { background: #94a3b8; }
.sidebar { display: flex; flex-direction: column; gap: 18px; }
.turn-panel, .players-panel, .activity-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.turn-panel { background: linear-gradient(140deg, #242d3b, #1a2230 70%); position: relative; overflow: hidden; }
.turn-panel::before { content: ''; position: absolute; top: 0; left: 22px; right: 22px; height: 2px; background: var(--player); border-radius: 0 0 2px 2px; }
.turn-heading { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.turn-heading h2 { font-size: 26px; letter-spacing: -.9px; margin: 0; overflow-wrap: anywhere; }
.turn-heading > span:last-child { margin-left: auto; font-size: 23px; color: #516074; }
.player-orb { width: 13px; height: 13px; border-radius: 50%; background: var(--player); box-shadow: 0 0 14px color-mix(in srgb, var(--player) 30%, transparent); flex-shrink: 0; }
.turn-hint { color: var(--muted); font-size: 12px; line-height: 1.6; min-height: 38px; margin: 8px 0 0; }
.dice-stage { height: 132px; display: flex; justify-content: center; align-items: center; gap: 38px; perspective: 650px; }
.die-shell { width: 62px; height: 62px; position: relative; transform: rotate(-8deg); }
.die { width: 62px; height: 62px; position: relative; transform-style: preserve-3d; transform: rotateX(-22deg) rotateY(-28deg); }
.die-face { position: absolute; inset: 0; background: #f0eee8; border: 2px solid #d1cfc9; border-radius: 11px; display: grid; align-items: center; justify-content: center; color: #253043; font: 700 28px 'Space Grotesk', sans-serif; backface-visibility: hidden; box-shadow: inset 0 0 10px #bbb9b54d; }
.die-face.front { transform: translateZ(31px); }
.die-face.back { transform: rotateY(180deg) translateZ(31px); }
.die-face.right { transform: rotateY(90deg) translateZ(31px); background: #dcdad4; }
.die-face.left { transform: rotateY(-90deg) translateZ(31px); background: #dcdad4; }
.die-face.top { transform: rotateX(90deg) translateZ(31px); background: #faf9f6; }
.die-face.bottom { transform: rotateX(-90deg) translateZ(31px); }
.pip-grid { display: grid; grid-template-columns: repeat(3, 10px); grid-template-rows: repeat(3, 10px); gap: 3px; }
.pip { width: 9px; height: 9px; background: #263248; border-radius: 50%; box-shadow: inset 0 1px 2px #00000050; }
.die-type { font-size: 9px; color: #69788e; text-align: center; position: absolute; top: 80px; width: 100%; letter-spacing: 1.5px; }
.die.rolling { animation: tumble 1.12s cubic-bezier(.22, .65, .26, 1) both; }
@keyframes tumble {
  0% { transform: translateY(0) rotateX(-22deg) rotateY(-28deg); }
  25% { transform: translateY(-30px) rotateX(230deg) rotateY(170deg) rotateZ(60deg); }
  65% { transform: translateY(-8px) rotateX(590deg) rotateY(600deg) rotateZ(-30deg); }
  85% { transform: translateY(4px) rotateX(710deg) rotateY(700deg) rotateZ(6deg); }
  100% { transform: translateY(0) rotateX(698deg) rotateY(692deg); }
}
.dice-meta { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 10px; margin: 8px 0 16px; }
.dice-meta strong { color: var(--text); font-size: 12px; font-weight: 500; }
#roll-button { width: 100%; font-size: 14px; min-height: 48px; }
kbd { font: 10px 'DM Sans', sans-serif; border: 1px solid #18232125; padding: 3px 5px; border-radius: 4px; opacity: .7; margin-left: auto; }
.move-options { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.move-options:empty { display: none; }
.move-options:not(:empty) { margin-top: 12px; }
.move-option { border: 1px solid color-mix(in srgb, var(--player) 55%, transparent); border-radius: 8px; background: color-mix(in srgb, var(--player) 10%, transparent); color: var(--text); padding: 9px 5px; font-size: 11px; }
.move-option:hover { background: color-mix(in srgb, var(--player) 22%, transparent); }
.effect-banner { margin-top: 12px; color: var(--accent); background: #c6ef8309; border-radius: 8px; font-size: 11px; line-height: 1.6; padding: 10px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 18px; }
.section-heading h2 { font-size: 15px; font-weight: 600; margin: 0; letter-spacing: -.3px; }
.section-heading > span { color: #6f7e93; font-size: 8px; letter-spacing: 1.3px; white-space: nowrap; }
.player-card { border: 1px solid transparent; padding: 11px 10px; margin: 0 -10px 6px; border-radius: 9px; transition: background .2s; }
.player-card.active { background: color-mix(in srgb, var(--card-color) 8%, transparent); border-color: color-mix(in srgb, var(--card-color) 25%, transparent); }
.player-card.eliminated { opacity: .45; }
.player-row { display: flex; align-items: center; gap: 9px; }
.player-dot { background: var(--card-color); width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.player-name { font-weight: 600; font-size: 12px; overflow-wrap: anywhere; }
.controller-badge { color: var(--accent); background: #c6ef8312; border: 1px solid #c6ef8325; font-size: 8px; padding: 2px 4px; border-radius: 4px; flex-shrink: 0; }
.player-status { color: var(--muted); font-size: 9px; margin-left: auto; white-space: nowrap; }
.mini-pieces { display: flex; gap: 4px; }
.mini-pieces i { width: 6px; height: 9px; border-radius: 4px 4px 2px 2px; background: var(--card-color); opacity: .25; }
.mini-pieces i.finished { opacity: 1; }
.counter-row { display: flex; align-items: center; gap: 10px; margin: 9px 0 0 18px; }
.counter-track { height: 3px; background: #ffffff0b; border-radius: 4px; overflow: hidden; flex: 1; }
.counter-fill { height: 100%; background: var(--card-color); border-radius: 4px; transition: width .4s; }
.counter-number { font-size: 9px; color: var(--muted); min-width: 38px; text-align: right; }
.counter-number strong { color: var(--text); font-weight: 500; }
.counter-note { border-top: 1px solid var(--line); margin: 11px 0 0; padding-top: 13px; font-size: 10px; color: #78899f; text-align: center; }
.activity-panel { padding-bottom: 12px; }
.activity-panel .section-heading { margin-bottom: 12px; }
#activity { list-style: none; padding: 0; margin: 0; max-height: 156px; overflow: auto; scrollbar-width: thin; }
#activity li { position: relative; color: var(--muted); font-size: 11px; line-height: 1.6; padding: 8px 0 8px 14px; border-bottom: 1px solid #ffffff06; }
#activity li::before { content: ''; position: absolute; top: 15px; left: 0; background: #47566c; width: 4px; height: 4px; border-radius: 50%; }
#activity li:first-child { color: #dee4ec; }
#activity li:first-child::before { background: var(--accent); }
.page-footer { display: flex; justify-content: space-between; gap: 16px; color: #66758b; font-size: 10px; padding: 24px 2px 0; }
.page-footer span:last-child { font-size: 8px; letter-spacing: 1.5px; }
.board-cell { fill: #253244; stroke: #38485e; stroke-width: 1.5; }
.board-cell.event { fill: #b8db7a0e; stroke: #8ba76380; }
.event-star { fill: #c6ef83; opacity: .8; font-size: 20px; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.home-label { font: 600 10px 'DM Sans', sans-serif; letter-spacing: 1.8px; text-anchor: middle; }
.home-sub { fill: #718198; font: 9px 'DM Sans', sans-serif; text-anchor: middle; }
.home-base { fill: #18212f; stroke-width: 1; }
.start-arrow { text-anchor: middle; dominant-baseline: central; font: 16px 'DM Sans', sans-serif; pointer-events: none; }
.goal-number { text-anchor: middle; dominant-baseline: central; font: 10px 'DM Sans', sans-serif; opacity: .4; }
.piece { cursor: default; }
.piece.available { cursor: pointer; }
.piece-ring { fill: none; stroke-width: 2; opacity: 0; }
.piece.available .piece-ring { opacity: 1; animation: piece-pulse 1.8s infinite; }
.piece.available:hover .piece-body { filter: brightness(1.2); }
.piece.available:focus { outline: none; }
.piece.available:focus-visible .piece-ring { stroke: white; stroke-width: 4; opacity: 1; }
.piece-number { fill: #111b26; text-anchor: middle; dominant-baseline: central; font: 700 11px 'Space Grotesk', sans-serif; pointer-events: none; }
.piece-lock { text-anchor: middle; font: 10px sans-serif; fill: #ffffffc0; pointer-events: none; }
@keyframes piece-pulse { 50% { stroke-width: 3; opacity: .35; } }
.center-logo { font: 700 32px 'Space Grotesk', sans-serif; text-anchor: middle; fill: var(--accent); letter-spacing: -2px; }
.center-sub { font: 8px 'DM Sans', sans-serif; fill: #76879d; text-anchor: middle; letter-spacing: 2px; }
dialog { color: var(--text); background: #1b2534; border: 1px solid #435069; border-radius: 24px; padding: 34px; max-width: min(520px, calc(100vw - 28px)); width: 520px; max-height: calc(100dvh - 36px); box-shadow: 0 30px 120px #00000080; }
dialog::backdrop { background: #070c15bc; backdrop-filter: blur(7px); }
dialog h2 { font-size: 30px; letter-spacing: -1.2px; margin: 13px 0 10px; }
dialog p { color: var(--muted); font-size: 13px; line-height: 1.7; }
.name-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 25px 0; }
.name-field { font-size: 10px; color: var(--muted); display: flex; flex-direction: column; gap: 8px; }
.name-field > span { display: flex; gap: 7px; align-items: center; }
.name-field input { width: 100%; padding: 12px; background: #111a28; border: 1px solid #354358; border-radius: 9px; color: var(--text); font-size: 13px; }
.name-field input:focus { border-color: var(--card-color); }
.controller-field { display: flex; flex-direction: column; gap: 6px; font-size: 10px; color: var(--muted); }
.controller-field select { width: 100%; color: var(--text); background: #111a28; border: 1px solid #354358; border-radius: 9px; padding: 10px; font-size: 12px; }
.controller-field select:focus { border-color: var(--card-color); }
.mode-choices { margin: 0 0 24px; padding: 0; border: none; }
.mode-choices legend { font-size: 11px; color: var(--muted); margin-bottom: 10px; }
.mode-choices label { display: flex; gap: 12px; align-items: center; padding: 13px; border: 1px solid #354358; border-radius: 10px; margin-bottom: 9px; cursor: pointer; }
.mode-choices label:has(input:checked) { border-color: #c6ef8377; background: #c6ef8308; }
.mode-choices input { accent-color: var(--accent); width: 16px; height: 16px; flex-shrink: 0; }
.mode-choices strong { font-size: 13px; display: block; }
.mode-choices small { display: block; font-size: 11px; line-height: 1.5; color: var(--muted); margin-top: 4px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }
.dialog-actions .primary { flex: 1; }
.setup-footnote { color: #6f7e93; display: block; text-align: center; font-size: 10px; margin-top: 18px; }
#event-dialog, #winner-dialog { text-align: center; }
.event-symbol { display: flex; align-items: center; justify-content: center; width: 80px; height: 80px; background: #c6ef8310; color: var(--accent); border-radius: 24px; font-size: 40px; margin: 24px auto 20px; border: 1px solid #c6ef8320; }
#event-confirm, #play-again, #rules-close { width: 100%; margin-top: 12px; }
#event-result { color: var(--accent); font-weight: 600; min-height: 20px; }
.rules-content { max-height: 55dvh; overflow-y: auto; padding-right: 12px; scrollbar-width: thin; }
.rules-content h3 { font-size: 15px; margin-top: 24px; color: var(--accent); }
.rule-event { display: flex; gap: 12px; margin-bottom: 16px; font-size: 12px; line-height: 1.6; color: var(--muted); }
.rule-event > span { font-size: 23px; color: var(--accent); min-width: 28px; text-align: center; }
.rule-event strong { display: block; color: var(--text); font-size: 12px; }
#wheel-container { position: relative; margin: 22px 0 6px; }
.wheel { width: 212px; height: 212px; border-radius: 50%; border: 7px solid #303e52; margin: 0 auto; position: relative; box-shadow: 0 0 0 1px #61718b, 0 8px 20px #00000035; }
.wheel::after { content: '✹'; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #202b3b; color: var(--accent); border: 3px solid #f1f3f6; font-size: 22px; }
.wheel-pointer { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font-size: 26px; color: var(--accent); z-index: 2; text-shadow: 0 2px 3px #000; }
.wheel-number { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px; color: #111722; background: #ffffffba; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.wheel-labels { display: flex; justify-content: center; flex-wrap: wrap; gap: 5px 13px; font-size: 10px; color: var(--muted); margin-top: 16px; }
.wheel-labels { max-height: 125px; overflow-y: auto; }
.mini-pieces { flex-wrap: wrap; max-width: 65px; }
.wheel-labels span { display: flex; gap: 5px; align-items: center; }
.wheel-labels i { width: 7px; height: 7px; border-radius: 50%; }
.winner-confetti { animation: celebration .8s ease; }
@keyframes celebration { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (min-width: 1450px) { main { padding-top: 48px; } }
@media (max-width: 1100px) {
  .game-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; }
  .board-panel { padding: 18px; }
  #board-hint { display: none; }
  .turn-panel, .players-panel, .activity-panel { padding: 18px; }
  .page-footer span:last-child { display: none; }
}
@media (max-width: 820px) {
  .topbar { height: 72px; padding: 0 20px; gap: 16px; }
  .top-caption { display: none; }
  #sound-toggle { margin-left: auto; }
  main { padding: 30px 18px 22px; }
  .intro { margin-bottom: 24px; }
  .intro .eyebrow { font-size: 8px; letter-spacing: 1.1px; }
  .game-layout { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .activity-panel { grid-column: 1 / -1; }
  .board-panel { padding: 18px; }
  .board-wrap { max-width: 620px; margin: 10px auto 0; }
}
@media (max-width: 480px) {
  .brand { font-size: 19px; }
  .brand-mark { width: 29px; height: 31px; font-size: 23px; margin-right: 8px; }
  .topbar .quiet { font-size: 11px; padding: 9px; }
  .topbar { padding: 12px; gap: 8px; height: auto; min-height: 72px; flex-wrap: wrap; }
  .topbar .brand { font-size: 16px; letter-spacing: -.7px; }
  .intro { align-items: flex-start; }
  .intro > .quiet { font-size: 0; padding: 9px 11px; min-height: 38px; }
  .intro > .quiet span { font-size: 19px; }
  h1 { letter-spacing: -1.2px; font-size: 31px; }
  .intro .eyebrow { font-size: 7px; letter-spacing: .8px; }
  .intro p { font-size: 11px; }
  .board-panel { padding: 14px 8px 12px; border-radius: 16px; }
  .board-toolbar { margin: 0 7px; }
  .board-footer { margin: 0 7px; gap: 15px; font-size: 9px; }
  .sidebar { grid-template-columns: 1fr; }
  .activity-panel { grid-column: auto; }
  .dice-stage { height: 125px; }
  .turn-hint { min-height: 20px; }
  .players-panel .section-heading { margin-bottom: 12px; }
  dialog { padding: 25px 22px; border-radius: 18px; }
  dialog h2 { font-size: 26px; }
  .name-fields { gap: 10px; }
  .name-field input { padding: 10px; }
  .page-footer { font-size: 9px; }
  kbd { display: none; }
}
html:fullscreen, html:fullscreen body { overflow: hidden; }
html:fullscreen main { max-width: none; margin: 0; padding: 0; }
html:fullscreen .intro, html:fullscreen .page-footer, html:fullscreen .online-panel,
html:fullscreen .board-toolbar, html:fullscreen .board-footer,
html:fullscreen .players-panel, html:fullscreen .activity-panel { display: none; }
html:fullscreen .game-layout { display: block; }
html:fullscreen .board-panel { position: fixed; inset: 0; width: 100%; height: 100dvh; padding: 0; border: 0; border-radius: 0; }
html:fullscreen .board-wrap { width: 100%; max-width: none; height: 100%; margin: 0; border-radius: 0; }
html:fullscreen #board { width: 100%; height: 100%; aspect-ratio: auto; }
html:fullscreen .topbar { position: fixed; top: 12px; right: 12px; height: auto; min-height: 0; padding: 0; border: 0; gap: 8px; z-index: 3; }
html:fullscreen .brand, html:fullscreen .top-caption { display: none; }
html:fullscreen .topbar .button { background: #111722e8; }
html:fullscreen .camera-control { top: 68px; right: 12px; }
html:fullscreen .sidebar { position: fixed; bottom: 32px; left: 12px; display: block; width: min(300px, calc(100vw - 24px)); max-height: calc(100dvh - 110px); overflow-y: auto; z-index: 2; }
html:fullscreen .turn-panel { padding: 14px; background: #111722e8; }
html:fullscreen .turn-heading { margin-top: 6px; }
html:fullscreen .turn-heading h2 { font-size: 20px; }
html:fullscreen .turn-panel .dice-stage { height: 100px; }
html:fullscreen .dice-meta { margin-bottom: 8px; }
html:fullscreen .effect-banner { max-height: 70px; overflow-y: auto; }
html:fullscreen .fullscreen-error, html:fullscreen #network-error,
html:fullscreen .connection-banner { position: fixed; top: 118px; right: 12px; max-width: min(440px, calc(100vw - 24px)); margin: 0; padding: 12px; background: #562f2f; z-index: 4; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
