/* Snootout: bedroom wallpaper, grape carpet, stink green, one big pink nose. */
@font-face { font-family: 'Rammetto One'; src: url('fonts/rammetto-one.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Patrick Hand'; src: url('fonts/patrick-hand.woff2') format('woff2'); font-display: swap; }
:root {
  --ink: #2A1538; --wall: #F2B632; --wall-dark: #E5A21E; --paper: #FFF6DC; --carpet: #4B2E83; --carpet-lit: #5F3F9C;
  --stink: #A5D625; --stink-deep: #5F8C0A; --me: #FF8FA3; --them: #6FC3F7; --lav: #B9A0F5; --red: #D8453A;
  --display: 'Rammetto One', 'Arial Black', Impact, sans-serif;
  --hand: 'Patrick Hand', 'Comic Sans MS', 'Trebuchet MS', sans-serif;
  --board: min(calc(100vw - 20px), calc(100dvh - 335px), 560px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overscroll-behavior: none; }
body {
  background-color: var(--wall); color: var(--ink);
  background-image: repeating-linear-gradient(90deg, var(--wall) 0 34px, var(--wall-dark) 34px 68px);
  font: 400 20px/1.2 var(--hand); touch-action: manipulation; overflow-x: hidden;
}
#app { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; }
#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 4px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 7px var(--ink); }

/* ---- chunky hand-cut buttons ---- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 58px; padding: 8px 18px;
  background: var(--paper); border: 4px solid var(--ink); border-radius: 18px 12px 20px 10px / 12px 20px 10px 18px;
  font: 400 21px/1.1 var(--display); box-shadow: 0 6px 0 var(--ink); transition: transform .07s, box-shadow .07s;
}
.btn:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 1px 0 var(--ink); }
.btn.go { background: var(--stink); }
.btn.pink { background: var(--me); }
.btn.blue { background: var(--them); }
.btn.small { min-height: 46px; font-size: 17px; box-shadow: 0 4px 0 var(--ink); }
.btn:disabled { opacity: .55; box-shadow: none; transform: translateY(4px); }
.icon-btn { width: 44px; height: 44px; padding: 7px; background: var(--paper); border: 3px solid var(--ink); border-radius: 50% 46% 52% 48%; display: grid; place-items: center; }
.icon-btn svg { width: 100%; height: 100%; display: block; }

/* ---- menu ---- */
.menu { width: min(100%, 440px); padding: max(22px, env(safe-area-inset-top)) 18px 20px; display: flex; flex-direction: column; flex: 1; gap: 14px; }
.logo { margin: 8px 0 0; display: flex; justify-content: center; align-items: flex-end; font: 400 clamp(38px, 12.6vw, 56px)/1 var(--display); color: var(--paper); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 0 5px 0 var(--ink); letter-spacing: -.02em; }
.logo-nose { width: 1.95em; height: auto; margin: 0 -.06em -.08em; flex: none; transform-origin: 50% 90%; animation: snuffle 3.4s ease-in-out infinite; }
.logo-hole { transform-box: fill-box; transform-origin: center; animation: flare 3.4s ease-in-out infinite; }
@keyframes snuffle { 0%, 80%, 100% { transform: scale(1); } 85% { transform: scale(1.08, .94); } 90% { transform: scale(.97, 1.05); } }
@keyframes flare { 0%, 80%, 100% { transform: scale(1); } 85% { transform: scale(1.18); } }
.tagline { text-align: center; font-size: 25px; margin: 6px 0 2px; }
.menu-hero { flex: 0 0 auto; height: clamp(84px, calc(100dvh - 640px), 240px); display: flex; align-items: flex-end; justify-content: center; gap: 0; position: relative; }
.menu-hero .snoot { height: 100%; max-height: 210px; width: auto; }
.menu-hero .junk { position: absolute; bottom: 0; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }
.foot { text-align: center; font-size: 18px; margin-top: 2px; }
.panel { background: var(--paper); border: 4px solid var(--ink); border-radius: 22px 16px 26px 14px / 16px 26px 14px 22px; padding: 16px; box-shadow: 0 6px 0 var(--ink); }
.panel h2 { font: 400 25px/1.1 var(--display); margin: 0 0 6px; }
.panel p { margin: 0 0 10px; font-size: 21px; }
.note { font-size: 19px; text-align: center; margin: 0; }
.bot-choice { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; background: var(--paper); border: 4px solid var(--ink); border-radius: 16px; padding: 8px 12px; box-shadow: 0 5px 0 var(--ink); }
.bot-choice:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.bot-choice .snoot { height: 74px; width: 62px; flex: none; }
.bot-choice b { display: block; font: 400 20px/1.1 var(--display); }
.bot-choice small { font-size: 19px; }
.bot-choice.sleepy .snoot { filter: saturate(.55); transform: rotate(-8deg); }
.code-input { width: 100%; font: 400 34px/1 var(--display); letter-spacing: .14em; text-align: center; text-transform: uppercase; padding: 12px 6px; border: 4px solid var(--ink); border-radius: 14px; background: #fff; color: var(--ink); min-width: 0; }
.room-code { font: 400 44px/1 var(--display); letter-spacing: .1em; text-align: center; padding: 12px 0 14px; color: var(--ink); user-select: all; }
.lobby-snoot { display: flex; justify-content: center; height: 130px; }
.lobby-snoot .snoot { height: 100%; width: auto; animation: tap-foot 1s ease-in-out infinite; }
@keyframes tap-foot { 50% { transform: rotate(4deg); } }

/* ---- game shell ---- */
.game { width: 100%; max-width: 1180px; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: max(6px, env(safe-area-inset-top)) 10px max(8px, env(safe-area-inset-bottom)); position: relative; }
.topbar { width: min(100%, var(--board)); min-width: min(100%, 340px); display: flex; align-items: center; gap: 8px; }
.who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; font-size: 18px; line-height: 1.02; }
.who .snoot { width: 32px; height: 38px; flex: none; }
.who.theirs { flex-direction: row-reverse; text-align: right; }
.who .label { min-width: 0; overflow-wrap: anywhere; }
.who.gone { opacity: .5; }
.who .score { font: 400 15px/1 var(--display); display: block; margin-top: 1px; }
.road { width: min(100%, var(--board)); min-width: min(100%, 340px); height: 26px; position: relative; flex: none; border-bottom: 3px solid var(--ink); }
.road .car { position: absolute; bottom: -3px; width: 44px; height: 25px; transform: translateX(-2px); transition: left .9s linear; }
.road .car svg, .road .house svg { display: block; width: 100%; height: 100%; }
.road .house { position: absolute; right: 0; bottom: -2px; width: 28px; height: 28px; }
.road .gran-time { position: absolute; left: 0; bottom: 2px; font-size: 18px; white-space: nowrap; }
.bubble { position: relative; width: min(100%, var(--board)); min-width: min(100%, 340px); min-height: 58px; padding: 6px 12px; background: var(--paper); border: 3px solid var(--ink); border-radius: 18px 22px 16px 24px / 20px 14px 22px 16px; font-size: 20px; line-height: 1.08; display: flex; align-items: center; justify-content: center; text-align: center; flex: none; }
.bubble.pop { animation: pop .22s ease-out; }
.bubble.warn { background: var(--stink); }
@keyframes pop { 0% { transform: scale(.94); } 60% { transform: scale(1.03); } }
.timer { position: absolute; left: 10px; right: 10px; bottom: 2px; height: 4px; border-radius: 3px; overflow: hidden; }
.timer i { display: block; height: 100%; background: var(--red); transform-origin: left; }
.tabs { display: flex; gap: 6px; width: min(100%, var(--board)); min-width: min(100%, 340px); }
.tab { flex: 1; min-height: 38px; padding: 3px 6px; border: 3px solid var(--ink); border-bottom-width: 0; border-radius: 14px 14px 0 0; background: var(--wall-dark); font: 400 14.5px/1.05 var(--display); }
.tab[aria-selected="true"] { background: var(--carpet); color: var(--paper); }
.tab .dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: var(--stink); border: 2px solid var(--ink); margin-right: 5px; vertical-align: 1px; opacity: 0; }
.tab.active-turn .dot { opacity: 1; }
.boards { display: flex; gap: 22px; align-items: flex-start; justify-content: center; }
.board-wrap { display: none; flex-direction: column; align-items: center; }
.board-wrap.show { display: flex; }
.board-title { display: none; }

/* ---- the floor ---- */
.board { position: relative; width: var(--board); height: var(--board); background-color: var(--carpet); border: 4px solid var(--ink); border-radius: 0 0 12px 12px; touch-action: manipulation; overflow: hidden; }
.board::before { content: ''; position: absolute; inset: 0; opacity: .34; background-image: radial-gradient(circle at 3px 3px, var(--carpet-lit) 2.4px, transparent 3px); background-size: 11px 11px; }
.layer { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); }
.layer-art { display: block; pointer-events: none; }
.layer-scan { display: block; pointer-events: none; }
.floor-cell { background-size: 94% 94%; background-position: center; background-repeat: no-repeat; }
.floor-cell.bare { background-image: none !important; }
.cell { position: relative; border: 0; padding: 0; background: transparent; display: grid; place-items: center; border-right: 1px solid rgba(255, 255, 255, .06); border-bottom: 1px solid rgba(255, 255, 255, .06); min-width: 0; min-height: 0; overflow: hidden; }
.cell .mark { width: 74%; height: 74%; display: block; pointer-events: none; }
.cell.can:hover { background: rgba(255, 246, 220, .28); }
.cell:focus-visible { outline: 3px solid #fff; outline-offset: -3px; box-shadow: none; background: rgba(255, 246, 220, .28); z-index: 2; }
.cell.old .mark { opacity: .42; filter: grayscale(.7); }
.cell.old { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .07) 0 5px, transparent 5px 10px); }
.cell.old::after { content: '?'; position: absolute; font: 400 60% var(--display); color: var(--paper); right: 12%; top: 6%; font-size: calc(var(--board) / 8 * .3); }
.cell.zone { background: rgba(165, 214, 37, .42); box-shadow: inset 0 0 0 2px var(--stink); }
.cell.zone.spray { background: rgba(185, 160, 245, .55); box-shadow: inset 0 0 0 2px var(--lav); }
.cell.new-mark .mark { animation: mark-in .28s cubic-bezier(.2, 1.7, .5, 1); }
@keyframes mark-in { from { transform: scale(0) rotate(-20deg); } }
.mark-whiff { animation: sway 2.2s ease-in-out infinite; }
@keyframes sway { 50% { transform: translateY(-5%) skewX(-5deg); } }
.placed { position: absolute; display: block; pointer-events: none; }
.placed .item-art { display: block; width: 100%; height: 100%; overflow: visible; }
.placed.selected { filter: drop-shadow(0 0 0 #fff) drop-shadow(0 0 7px #fff) drop-shadow(0 0 3px #fff); z-index: 3; }
.placed.ghost { opacity: .78; z-index: 4; }
.placed.ghost.bad { filter: drop-shadow(0 0 6px var(--red)) saturate(.3); opacity: .6; }
.placed.found-item { animation: dug-up .5s cubic-bezier(.2, 1.6, .4, 1); }
.placed.revealed { opacity: .92; }
.placed.dim { opacity: .55; }
@keyframes dug-up { from { transform: scale(.5) rotate(-10deg); opacity: 0; } }
.wisp { animation: sway 2.4s ease-in-out infinite; }
.spray-zone { position: absolute; background: rgba(185, 160, 245, .34); border: 3px dashed var(--lav); border-radius: 12px; }
.scan { position: absolute; border: 3px dashed var(--stink); border-radius: 10px; background: rgba(165, 214, 37, .08); }
.scan b { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: calc(var(--board) / 8 * .78); height: calc(var(--board) / 8 * .78); border-radius: 50%; display: grid; place-items: center; background: var(--stink); color: var(--ink); border: 3px solid var(--ink); font: 400 calc(var(--board) / 8 * .42)/1 var(--display); }
.scan.stale { border-color: #bbb; }
.scan.stale b { background: #bbb; }
.board.shake { animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* ---- under the floor ---- */
.controls { width: min(100%, var(--board)); min-width: min(100%, 340px); display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.tricks { display: flex; gap: 6px; }
.trick { flex: 1; min-width: 0; min-height: 66px; padding: 3px 2px; background: var(--paper); border: 3px solid var(--ink); border-radius: 14px 10px 16px 9px / 10px 16px 9px 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; box-shadow: 0 4px 0 var(--ink); font-size: 18px; line-height: .98; }
.trick svg { width: 32px; height: 32px; flex: none; }
.trick:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.trick:disabled { background: transparent; box-shadow: none; transform: translateY(3px); }
.trick:disabled svg { filter: grayscale(.85); opacity: .5; }
.trick.used { opacity: .45; }
.trick span { overflow-wrap: anywhere; }
.trick.arm { background: var(--stink); }
.reacts { display: flex; align-items: center; gap: 4px; }
.emoji { flex: 1; height: 40px; min-width: 0; padding: 0; font-size: 23px; line-height: 1; background: rgba(255, 246, 220, .55); border: 2px solid var(--ink); border-radius: 12px; }
.btn.block-btn { flex: none; width: auto; min-height: 40px; padding: 2px 9px; font-size: 14px; box-shadow: 0 2px 0 var(--ink); background: var(--paper); }
/* Block must stay in view: the row sticks to the bottom of a short screen instead of falling below it. */
.game.quick .reacts { position: sticky; bottom: 0; z-index: 5; background: var(--wall); padding: 3px 0; }
.bot-note { margin: 0; width: min(100%, var(--board)); text-align: center; font-size: 17px; line-height: 1.05; background: var(--ink); color: var(--paper); padding: 4px 10px; border-radius: 10px; }
.emoji:active { transform: scale(1.2); }
.emoji:disabled { opacity: .35; }
.confirm-row { display: flex; gap: 6px; }
.confirm-row > * { flex: 1; min-width: 0; }
.stash-row { display: flex; gap: 6px; justify-content: center; align-items: center; min-height: 32px; font-size: 17px; }
.stash-chip { width: 34px; height: 34px; border-radius: 9px; background: rgba(42, 21, 56, .16); border: 2px solid var(--ink); padding: 2px; display: grid; place-items: center; }
.stash-chip .item-art { width: 100%; height: 100%; opacity: .32; filter: grayscale(1); }
.stash-chip.got { background: var(--stink); }
.stash-chip.got .item-art { opacity: 1; filter: none; }

/* ---- the flying nose ---- */
.actor { position: fixed; left: 0; top: 0; width: 92px; z-index: 30; pointer-events: none; transition: transform .28s cubic-bezier(.3, 1.3, .5, 1); will-change: transform; }
.actor .snoot { display: block; width: 100%; height: auto; overflow: visible; }
.snoot .nostril { transform-box: fill-box; transform-origin: center; }
.snoot .eyes-out { display: none; }
.actor.sniffing .snoot { animation: inhale .36s ease-in-out 2; transform-origin: 50% 85%; }
.actor.sniffing .nostril { animation: flare-big .36s ease-in-out 2; }
@keyframes inhale { 50% { transform: scale(1.1, .92); } }
@keyframes flare-big { 50% { transform: scale(1.5); } }
.actor.reel .snoot { animation: reel .5s ease-out; transform-origin: 50% 100%; }
@keyframes reel { 20% { transform: rotate(-18deg) scale(1.1); } 50% { transform: rotate(12deg); } 75% { transform: rotate(-6deg); } }
.actor.green .snoot-body { fill: var(--stink); transition: fill .15s; }
.actor.ko .snoot { transform: rotate(92deg) translateY(10px); transition: transform .3s cubic-bezier(.5, 0, .7, 1.6); transform-origin: 50% 100%; }
.actor.ko .eyes, .actor.green .eyes { display: none; }
.actor.ko .eyes-out, .actor.green .eyes-out { display: block; }

/* ---- reactions ---- */
.fly-emoji { position: fixed; z-index: 50; font-size: 58px; pointer-events: none; animation: emoji-up 1.7s ease-out forwards; }
@keyframes emoji-up { 0% { transform: scale(.2); opacity: 0; } 15% { transform: scale(1.25); opacity: 1; } 30% { transform: scale(1); } 80% { opacity: 1; } 100% { transform: translateY(-90px) scale(.9); opacity: 0; } }

/* ---- badges and ladder ---- */
.rung { display: inline-block; margin: 2px 0 2px 0; padding: 0 8px; border: 2px solid var(--ink); border-radius: 9px; font: 400 15px/1.3 var(--hand); font-style: normal; }
.rung.beaten { background: var(--stink); }
.rung.next { background: var(--wall); }
.bot-choice b + .rung { margin-left: 6px; vertical-align: 2px; }
.bot-choice b:has(+ .rung) { display: inline; }
.bot-choice .rung + small { display: block; }
.ladder { list-style: none; margin: 4px 0 12px; padding: 0; display: grid; gap: 6px; }
.ladder li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 5px 12px; border: 3px solid var(--ink); border-radius: 12px; font-size: 19px; }
.ladder li b { font: 400 17px/1.1 var(--display); }
.ladder li.beaten { background: var(--stink); }
.ladder li.next { background: var(--wall); }
.ladder li.later { opacity: .6; }
.badge-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 7px; }
.badge-list li { display: flex; align-items: center; gap: 10px; text-align: left; }
.badge-list .medal { flex: none; width: 46px; height: 46px; display: grid; place-items: center; padding: 6px; background: var(--wall); border: 3px solid var(--ink); border-radius: 50%; overflow: hidden; }
.badge-list .medal svg { width: 100%; height: 100%; display: block; }
.badge-list .what b { display: block; font: 400 16px/1.15 var(--display); }
.badge-list .what small { display: block; font-size: 18px; line-height: 1.1; }
.badge-list li.locked .medal { background: #d9d0bf; filter: grayscale(1) opacity(.55); }
.badge-list li.locked .what b { opacity: .6; }
.sheet .badge-note { font-size: 17px; margin: 0 0 4px; }
.badge-news { background: var(--wall); border: 3px solid var(--ink); border-radius: 12px; padding: 4px 10px; margin: 0 0 10px; }
.badge-news p { margin: 0; font-size: 19px; line-height: 1.15; text-align: center; }
#resultOverlay .badge-news { margin-bottom: 8px; }

/* ---- overlays ---- */
.overlay { position: fixed; inset: 0; background: rgba(42, 21, 56, .62); z-index: 40; display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.overlay.bottom { align-items: flex-end; background: transparent; pointer-events: none; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
.overlay.bottom .sheet { pointer-events: auto; }
.sheet { width: min(100%, 440px); background: var(--paper); border: 4px solid var(--ink); border-radius: 24px 18px 28px 16px / 18px 28px 16px 24px; padding: 18px; box-shadow: 0 8px 0 var(--ink); max-height: calc(100dvh - 32px); overflow-y: auto; }
.sheet h2 { font: 400 28px/1.05 var(--display); margin: 0 0 8px; text-align: center; }
.sheet p { margin: 0 0 12px; font-size: 21px; text-align: center; }
.result-snoot { display: flex; justify-content: center; height: 110px; margin-bottom: 4px; }
.result-snoot .snoot { height: 100%; width: auto; }
.result-snoot.lost .snoot { transform: rotate(90deg); }
.result-snoot.lost .eyes { display: none; }
.result-snoot.lost .eyes-out { display: block; }
.result-snoot.lost .snoot-body { fill: var(--stink); }
.how h3 { font: 400 19px/1.1 var(--display); margin: 14px 0 5px; }
.how p { text-align: left; margin: 0 0 6px; }
.legend { display: grid; grid-template-columns: 40px 1fr; gap: 6px 10px; align-items: center; font-size: 20px; line-height: 1.05; }
.swatch { width: 40px; height: 40px; background: var(--carpet); border: 2px solid var(--ink); border-radius: 8px; display: grid; place-items: center; }
.swatch .mark { width: 80%; height: 80%; }
.swatch.icon { background: none; border: 0; }
.swatch.icon svg { width: 100%; height: 100%; }
.banner { position: fixed; left: 50%; top: 8px; transform: translateX(-50%); z-index: 45; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 12px; font-size: 19px; width: max-content; max-width: calc(100% - 20px); text-align: center; }
#toast { position: fixed; left: 50%; bottom: 18px; transform: translate(-50%, 30px); opacity: 0; z-index: 70; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 14px; font-size: 20px; width: max-content; max-width: calc(100% - 24px); text-align: center; pointer-events: none; transition: transform .2s, opacity .2s; }
#toast.on { transform: translate(-50%, 0); opacity: 1; }

/* ---- the hide phase ---- */
.hide-head { display: flex; align-items: center; justify-content: space-between; width: min(100%, var(--board)); min-width: min(100%, 340px); gap: 8px; }
.hide-head h2 { margin: 0; font: 400 clamp(20px, 6vw, 26px)/1.05 var(--display); }
.hide-time { font: 400 22px/1 var(--display); background: var(--paper); border: 3px solid var(--ink); border-radius: 10px; padding: 5px 8px; flex: none; }
.hide-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hide-actions .go-wide { grid-column: span 2; }

@media (max-width: 500px) and (max-height: 700px) {
  .game.quick { --board: min(calc(100vw - 20px), calc(100dvh - 360px), 560px); }
  .stack { gap: 10px; }
  .menu { padding-top: 12px; gap: 9px; }
  .stack > .btn { min-height: 50px; }
  .foot { display: none; }
}

/* ---- phones held in short windows ---- */
@media (max-height: 640px) {
  :root { --board: min(calc(100vw - 20px), calc(100dvh - 300px), 560px); }
  .bubble { min-height: 48px; font-size: 18px; }
  .trick { min-height: 56px; font-size: 16px; }
  .trick svg { width: 26px; height: 26px; }
}
/* ---- wide screens: both rooms side by side ---- */
@media (min-width: 900px) and (min-height: 500px) {
  :root { --board: min(calc((100vw - 60px) / 2), calc(100dvh - 300px), 500px); }
  .game { gap: 10px; padding-top: 12px; }
  .topbar, .road, .bubble, .controls, .hide-head { width: min(100%, 720px); }
  .tabs { display: none; }
  .board-wrap { display: flex; }
  .board-wrap.only { display: none; }
  .board-wrap.only.show { display: flex; }
  .board-title { display: block; font: 400 18px/1 var(--display); padding: 0 0 6px; }
  .board { border-radius: 12px; }
  .controls { flex-direction: row; align-items: stretch; gap: 14px; }
  .controls > * { flex: 1; }
  .controls > .confirm-row, .controls > .tricks { flex: 1.5; }
  .reacts { align-self: center; }
  .emoji { height: 44px; }
  .hide-controls { max-width: 500px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
[hidden] { display: none !important; }
.chips { flex: 0 0 74px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; align-content: center; }
.stash-chip { width: 100%; height: 32px; }
.board.mine .floor-cell { opacity: .3; }
.confirm-row { flex-wrap: wrap; }
.confirm-row .trick-desc { flex: 1 0 100%; margin: 0; text-align: center; font-size: 19px; line-height: 1.05; }
@media (max-height: 700px) { .confirm-row .trick-desc { display: none; } }
@media (min-height: 780px) and (max-width: 899px) {
  .game { gap: 8px; }
  .bubble { min-height: 66px; font-size: 22px; }
  .trick { min-height: 92px; font-size: 20px; gap: 4px; }
  .trick svg { width: 42px; height: 42px; }
  .chips { flex-basis: 96px; gap: 5px; }
  .stash-chip { height: 44px; }
  .emoji { height: 50px; font-size: 27px; }
  .controls { gap: 10px; margin-top: 4px; }
  .hide-actions { gap: 12px; }
  .hide-actions .btn { min-height: 62px; }
}
@media (min-width: 900px) and (min-height: 500px) {
  .hide-actions { grid-template-columns: 1fr 1fr 1fr; }
  .hide-actions .go-wide { grid-column: span 1; }
  .game[data-phase="hide"] .controls { flex-direction: column; width: var(--board); }
  .game[data-phase="hide"] .bubble { min-height: 46px; }
  .game[data-phase="hide"] .board-title { display: none; }
  .confirm-row { flex-wrap: nowrap; align-items: center; }
  .confirm-row .trick-desc { display: none; }
}
#resultOverlay #btnAnother { white-space: normal; }
.sheet.privacy p { text-align: left; font-size: 19px; line-height: 1.12; }
.sheet.privacy .btn + .btn { margin-top: 10px; width: 100%; }
#resultOverlay .sheet { padding: 12px 14px; }
#resultOverlay h2 { font-size: 26px; margin-bottom: 4px; }
#resultOverlay p { font-size: 19px; line-height: 1.05; margin-bottom: 7px; }
#resultOverlay .btn { white-space: nowrap; font-size: 15px; padding: 6px 8px; }
@media (max-width: 400px) { #resultOverlay .btn { white-space: normal; min-width: 0; } }
