:root {
  --wall: #9ED6C9; --wall-2: #8CCDBF; --wall-dot: #C3EAE0;
  --floor: #E3AA76; --floor-line: #C98D58;
  --ink: #3E2A4F; --ink-soft: #6C5A7E; --cream: #FFF4E2; --paper: #FFF9F0;
  --berry: #D9637E; --berry-dark: #A9435E; --butter: #FFD36E; --lilac: #C7B8EC;
  --cat: #8E9DC6; --cat-dark: #3E4A73; --pup: #EBB46A; --pup-dark: #5E3A1A;
  --ui: 'Baloo 2', ui-rounded, system-ui, sans-serif;
  --display: 'Sniglet', 'Baloo 2', ui-rounded, sans-serif;
  --soft-shadow: 0 3px 0 rgba(62, 42, 79, .18), 0 10px 24px rgba(62, 42, 79, .14);
  --board: min(86vw, calc(100dvh - 200px), 660px);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { background: #8CCDBF; }
body.nap {
  font-family: var(--ui); color: var(--ink); font-weight: 600;
  background:
    linear-gradient(to bottom, transparent 0 calc(100% - 26vh), var(--floor-line) calc(100% - 26vh) calc(100% - 26vh + 4px), transparent 0),
    repeating-linear-gradient(90deg, transparent 0 118px, rgba(140, 90, 50, .22) 118px 120px) bottom / 100% 26vh no-repeat,
    linear-gradient(var(--floor), #D89C66) bottom / 100% 26vh no-repeat,
    radial-gradient(circle at 12px 12px, var(--wall-dot) 3px, transparent 3.5px) 0 0 / 36px 36px,
    radial-gradient(circle at 30px 30px, var(--wall-dot) 2px, transparent 2.5px) 0 0 / 36px 36px,
    linear-gradient(var(--wall), var(--wall-2));
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--berry); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

/* ---------- shared pieces ---------- */
.nap-card { background: var(--paper); border-radius: 22px; box-shadow: var(--soft-shadow); position: relative; }
.nap-card::before { content: ''; position: absolute; inset: 8px; border: 2px dashed rgba(217, 99, 126, .35); border-radius: 16px; pointer-events: none; }
.btn {
  --bg: var(--cream); --edge: #D9C4A6;
  display: inline-flex; align-items: center; justify-content: center; gap: .4em; cursor: pointer;
  min-height: 46px; padding: .5em 1.3em; border: 0; border-radius: 999px;
  background: var(--bg); color: var(--ink); font-weight: 800; font-size: 1.05rem;
  box-shadow: 0 4px 0 var(--edge); transition: transform .1s, box-shadow .1s;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 5px 0 var(--edge); }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--edge); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { --bg: #B8475F; --edge: #8E3249; color: #fff; }
.btn.lilac { --bg: var(--lilac); --edge: #9C89CF; }
.btn.small { min-height: 36px; font-size: .95rem; padding: .3em 1em; }
.btn.big { font-size: 1.25rem; padding: .6em 1.8em; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 0; cursor: pointer; min-height: 40px; padding: .3em 1em; border-radius: 999px; background: #F3E7D6; color: var(--ink); font-weight: 700; box-shadow: inset 0 -3px 0 rgba(62, 42, 79, .08); }
.chip.on { background: var(--butter); box-shadow: inset 0 0 0 2px var(--ink); }
input { font: inherit; font-weight: 600; font-size: 1.05rem; color: var(--ink); min-height: 44px; padding: .4em .9em; width: 100%; border: 2px solid #E6D3BA; border-radius: 14px; background: #fff; }
input:focus { outline: none; border-color: var(--berry); }
.code { font-family: var(--display); font-weight: 800; letter-spacing: .14em; background: var(--butter); padding: .05em .45em; border-radius: 8px; }
.form-error { background: #FBE0E4; color: var(--berry-dark); padding: .6em 1em; border-radius: 12px; text-align: center; }
.note, .blurb, .small-note { color: var(--ink-soft); margin: 6px 0 0; }
.blurb { min-height: 2.6em; }
.loading { min-height: 100dvh; display: grid; place-items: center; font-family: var(--display); font-size: 1.6rem; }
.back { position: absolute; top: 14px; left: 14px; z-index: 3; color: var(--ink); text-decoration: none; background: rgba(255, 249, 240, .7); padding: 8px 14px; border-radius: 999px; }
.back:hover { background: var(--paper); }
.prop { position: fixed; z-index: 0; pointer-events: none; filter: drop-shadow(0 6px 4px rgba(80, 40, 20, .25)); }
.prop.yarn { width: 120px; left: 3vw; bottom: 4vh; }
.prop.bone { width: 110px; right: 4vw; bottom: 6vh; }
.icon { border: 0; cursor: pointer; min-height: 36px; padding: .2em .9em; border-radius: 999px; background: rgba(255, 249, 240, .75); color: var(--ink); font-weight: 700; font-size: .92rem; }
.icon:hover { background: var(--paper); }
.mini { border: 0; cursor: pointer; background: var(--butter); border-radius: 999px; font-size: .8rem; padding: .15em .7em; font-weight: 700; }
.tag { font-size: .78rem; background: rgba(62, 42, 79, .08); padding: .05em .6em; border-radius: 999px; }
.tag.away { background: #FBE0E4; color: var(--berry-dark); }

/* ---------- home ---------- */
.nap-home { min-height: 100dvh; display: grid; place-items: center; padding: 56px 16px 32px; position: relative; }
.home-card { width: min(800px, 100%); padding: 26px clamp(18px, 4vw, 42px) 24px; z-index: 1; }
.home-logo { margin: 0; display: grid; place-items: center; }
.home-logo .nap-logo { width: min(440px, 100%); height: auto; }
.tagline { margin: 0; text-align: center; font-family: var(--display); font-size: 1.5rem; color: var(--berry-dark); }
.lede { max-width: 56ch; margin: 8px auto 18px; text-align: center; color: var(--ink-soft); font-weight: 500; line-height: 1.5; }
.field { display: flex; flex-direction: column; gap: 4px; max-width: 320px; margin: 0 auto 20px; }
.field span { font-size: .95rem; color: var(--ink-soft); }
.choices { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; }
.choice { border-radius: 18px; padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.choice.bot { background: #EEF4FB; }
.choice.friends { background: #FFF0DA; }
.choice h2 { margin: 0; font-family: var(--display); font-size: 1.35rem; }
.choice p { margin: 0; color: var(--ink-soft); font-weight: 500; }
.team-pick { display: flex; gap: 10px; }
.team { display: grid; grid-template-columns: 46px auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center; text-align: left; cursor: pointer;
  border: 0; background: #fff; border-radius: 16px; padding: 6px 14px 6px 6px; box-shadow: inset 0 0 0 2px #E6D3BA; }
.team.on { box-shadow: inset 0 0 0 3px var(--ink); background: #FFFBEF; }
.team-face { grid-row: span 2; width: 46px; height: 46px; }
.team-face svg { width: 100%; height: 100%; }
.team b { font-family: var(--display); font-size: 1.1rem; line-height: 1; }
.team small { color: var(--ink-soft); font-weight: 600; line-height: 1.1; }
.join { display: flex; gap: 8px; width: 100%; margin-top: 4px; }
.join input { max-width: 130px; text-transform: uppercase; letter-spacing: .2em; }
.howto { margin-top: 18px; }
.howto summary { cursor: pointer; font-weight: 800; min-height: 32px; }
.howto ul { margin: 6px 0 0; padding-left: 1.2em; line-height: 1.55; font-weight: 500; max-width: 68ch; }

/* ---------- lobby ---------- */
.nap-lobby { min-height: 100dvh; padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.lobby-top { width: min(760px, 100%); display: flex; justify-content: space-between; align-items: center; }
.lobby-top a { display: block; width: 200px; }
.lobby-top svg { width: 100%; height: auto; }
.lobby-card { width: min(760px, 100%); padding: 24px clamp(16px, 4vw, 36px); }
.lobby-card h1 { margin: 0 0 4px; font-family: var(--display); font-size: 1.7rem; }
.lobby-card h2 { font-family: var(--display); font-size: 1.15rem; margin: 18px 0 8px; }
.invite { display: flex; gap: 8px; }
.beds { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 22px 0 6px; }
.vs { font-family: var(--display); font-size: 1.4rem; color: var(--berry); }
.bed { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 12px 14px; border-radius: 50% 50% 22px 22px / 32% 32% 22px 22px; text-align: center; }
.bed.side1 { background: radial-gradient(ellipse at 50% 30%, #E4E9F8, #C9D2EC); }
.bed.side2 { background: radial-gradient(ellipse at 50% 30%, #FFF0D6, #F6D7A9); }
.bed.empty .bed-pet { opacity: .35; filter: grayscale(.6); }
.bed-pet { width: 92px; height: 92px; }
.bed-pet svg { width: 100%; height: 100%; }
.bed b { font-family: var(--display); font-size: 1.25rem; }
.bed small { color: var(--ink-soft); }
.bed .who { margin: 4px 0 6px; font-weight: 700; }
.bed .x { position: absolute; top: 8px; right: 10px; border: 0; background: rgba(255, 255, 255, .7); border-radius: 50%; width: 32px; height: 32px; cursor: pointer; color: var(--berry-dark); }
.lobby-row { display: flex; justify-content: center; margin: 8px 0; }
.lobby-card > .btn.big { margin-top: 18px; }

/* ---------- game layout ---------- */
.nap-game { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; padding: 10px 14px 20px; position: relative; }
.nap-top { width: 100%; max-width: 1180px; display: flex; align-items: center; gap: 14px; position: relative; z-index: 2; }
.top-logo { width: 170px; flex: none; }
.top-logo svg { width: 100%; height: auto; display: block; }
.status { margin: 0 auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
  background: var(--paper); padding: 6px 20px; border-radius: 999px; box-shadow: var(--soft-shadow); min-height: 46px; }
.status b { font-family: var(--display); font-size: 1.2rem; }
.status span { color: var(--ink-soft); }
.my-turn .status { background: #FFF3C9; animation: glow 2.2s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: var(--soft-shadow), 0 0 0 6px rgba(255, 211, 110, .45); } }
.meta { display: flex; gap: 8px; align-items: center; flex: none; }
.table { flex: 1; display: flex; align-items: center; justify-content: center; gap: clamp(12px, 2.5vw, 36px); width: 100%; position: relative; z-index: 1; padding-top: 10px; }

/* badges */
.badge { width: 180px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 12px 16px; border-radius: 26px; background: var(--paper);
  box-shadow: var(--soft-shadow); transition: transform .25s, box-shadow .25s; position: relative; }
.badge.side1 { background: linear-gradient(#F5F7FD, #E3E8F7); }
.badge.side2 { background: linear-gradient(#FFF8EC, #FBE6C6); }
.badge.turn { transform: translateY(-6px) scale(1.04); box-shadow: var(--soft-shadow), 0 0 0 4px var(--butter); }
.badge-bed { width: 118px; height: 92px; border-radius: 50%; display: grid; place-items: end center; padding-bottom: 6px;
  background: radial-gradient(ellipse at 50% 70%, rgba(255, 255, 255, .7) 0 46%, transparent 47%), radial-gradient(ellipse at 50% 60%, var(--berry) 0 62%, transparent 63%); }
.side1 .badge-bed { background: radial-gradient(ellipse at 50% 70%, rgba(255, 255, 255, .7) 0 46%, transparent 47%), radial-gradient(ellipse at 50% 60%, #A7B4DC 0 62%, transparent 63%); }
.side2 .badge-bed { background: radial-gradient(ellipse at 50% 70%, rgba(255, 255, 255, .7) 0 46%, transparent 47%), radial-gradient(ellipse at 50% 60%, #F0BE7C 0 62%, transparent 63%); }
.badge-pet { width: 80px; height: 80px; }
.badge-pet svg { width: 100%; height: 100%; }
.badge.turn .badge-pet { animation: bob 1.2s ease-in-out infinite; }
.badge.turn .badge-pet .sleep-face { display: none; }
.badge.turn .badge-pet .awake-face { display: inline; }
@keyframes bob { 50% { transform: translateY(-5px) rotate(-3deg); } }
.badge-text { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.badge-text b { font-family: var(--display); font-size: 1.35rem; }
.badge-who { font-size: .95rem; color: var(--ink-soft); text-align: center; overflow-wrap: anywhere; }
.badge-count { font-family: var(--display); font-weight: 800; font-size: 2.8rem; line-height: 1; }
.side1 .badge-count { color: var(--cat-dark); } .side2 .badge-count { color: var(--pup-dark); }
.badge-count.bump { animation: bump .35s ease-out; }
@keyframes bump { 40% { transform: scale(1.3); } }
.badge-turn { min-height: 1.3em; font-family: var(--display); color: var(--berry-dark); }
.badge-extra { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }

/* the quilt */
.board-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.quilt { position: relative; padding: calc(var(--board) * .028); background: var(--berry); border-radius: 22px; transform: rotate(-.5deg);
  box-shadow: 0 6px 0 var(--berry-dark), 0 22px 36px rgba(80, 40, 30, .28); }
.quilt::before { content: ''; position: absolute; inset: calc(var(--board) * .011); border: 2px dashed rgba(255, 244, 226, .75); border-radius: 16px; pointer-events: none; }
.board { width: var(--board); height: var(--board); display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); border-radius: 10px; overflow: hidden; position: relative; }
.cell { position: relative; border: 0; padding: 0; margin: 0; cursor: default; outline-offset: -4px; }
.cell::after { content: ''; position: absolute; inset: 3px; border: 1.5px dashed rgba(120, 80, 60, .28); border-radius: 4px; pointer-events: none; }
.cell.sage { background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .38) 0 5px, transparent 5px 10px), repeating-linear-gradient(90deg, rgba(255, 255, 255, .38) 0 5px, transparent 5px 10px), #BFDDB3; }
.cell.blush { background: radial-gradient(circle at 25% 25%, rgba(255, 255, 255, .8) 2px, transparent 2.6px) 0 0 / 11px 11px, #F8CFCB; }
.cell.oat { background: repeating-linear-gradient(45deg, rgba(160, 120, 80, .06) 0 1px, transparent 1px 4px), #F5E8D3; }
.cell.apricot { background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .45) 0 3px, transparent 3px 9px), #FBD9B7; }
.cell.mint { background: radial-gradient(circle, rgba(255, 255, 255, .6) 1.6px, transparent 2px) 0 0 / 9px 9px, #CBEADF; }
.cushion { position: absolute; inset: 4%; width: 92%; height: 92%; }
.cell.last::before { content: ''; position: absolute; inset: 9%; border-radius: 50%; box-shadow: 0 0 0 3px var(--butter), 0 0 14px 4px rgba(255, 211, 110, .8); z-index: 1; }
.paw-hint { position: absolute; inset: 0; display: none; place-items: center; color: rgba(62, 42, 79, .28); }
.paw { width: 42%; height: 42%; }
.my-turn .cell.legal { cursor: pointer; }
.my-turn .cell.legal .paw-hint { display: grid; animation: pawPulse 1.6s ease-in-out infinite; animation-delay: calc(var(--d, 0) * 1s); }
.my-turn .cell.legal:hover .paw-hint, .my-turn .cell.legal:focus-visible .paw-hint { color: rgba(217, 99, 126, .65); }
@keyframes pawPulse { 50% { transform: scale(1.12); } }
.cell.shake { animation: shake .3s; }
@keyframes shake { 25% { translate: -3px 0; } 75% { translate: 3px 0; } }
.ghost-pet { position: absolute; inset: 8%; opacity: .68; pointer-events: none; z-index: 2; animation: ghostIn .2s ease-out; }
.ghost-pet svg { width: 100%; height: 100%; }
.cell.ghost .paw-hint { display: none !important; }
@keyframes ghostIn { from { transform: scale(.7); opacity: 0; } }

/* pets */
.pet { position: absolute; inset: 6%; z-index: 2; perspective: 600px; pointer-events: none; }
.corner .pet { inset: 9% 9% 4%; }
.flipper { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .5s cubic-bezier(.45, 1.6, .5, 1); }
.pet.s2 .flipper { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.face.pup { transform: rotateY(180deg); }
.face svg { width: 100%; height: 100%; display: block; overflow: visible; filter: drop-shadow(0 calc(var(--board) * .005) 0 rgba(60, 30, 20, .28)); animation: breathe 3.4s ease-in-out infinite; animation-delay: calc(var(--breath, 0s) * -1); transform-origin: 50% 80%; }
@keyframes breathe { 50% { transform: scale(1.035, .975); } }
.awake-face { display: none; }
.pet.awake .awake-face { display: inline; }
.pet.awake .sleep-face { display: none; }
.pet.drop { animation: drop .55s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes drop { 0% { transform: translateY(-70%) scale(1.3); opacity: 0; } 55% { transform: translateY(4%) scale(.94, 1.06); opacity: 1; } 75% { transform: translateY(-4%) scale(1.03, .97); } 100% { transform: none; } }
.pet.hop { animation: hop .5s ease-out; }
@keyframes hop { 40% { transform: translateY(-22%) scale(1.08); } 70% { transform: translateY(2%) scale(1.04, .96); } }
.pet.wiggle .flipper { animation: wiggle .5s ease-in-out infinite; }
@keyframes wiggle { 25% { rotate: -7deg; } 75% { rotate: 7deg; } }
.pet.party { animation: party .7s ease-in-out infinite; animation-delay: calc(var(--breath, 0s) * -.3); }
@keyframes party { 50% { transform: translateY(-14%) rotate(-5deg); } }
.pet.snooze { filter: saturate(.75) brightness(.97); }
.zzz { position: absolute; z-index: 3; right: 6%; top: 2%; font-family: var(--display); font-weight: 800; font-size: calc(var(--board) * .028); color: rgba(62, 42, 79, .55); pointer-events: none; animation: zzz 2.6s ease-out forwards; }
@keyframes zzz { 0% { transform: translate(0, 0) scale(.6); opacity: 0; } 20% { opacity: 1; } 100% { transform: translate(40%, -140%) scale(1.15) rotate(10deg); opacity: 0; } }
.bubble { position: absolute; z-index: 5; left: 50%; bottom: 84%; translate: -50% 0; white-space: nowrap; pointer-events: none;
  font-family: var(--display); font-weight: 800; font-size: max(13px, calc(var(--board) * .026)); padding: .15em .6em; background: #fff; border-radius: 999px;
  box-shadow: 0 2px 0 rgba(62, 42, 79, .2); animation: bubble 1.3s ease-out forwards; }
.bubble::after { content: ''; position: absolute; left: 50%; bottom: -6px; translate: -50% 0; border: 6px solid transparent; border-top-color: #fff; border-bottom: 0; }
.bubble.b1 { color: var(--cat-dark); } .bubble.b2 { color: var(--pup-dark); }
@keyframes bubble { 0% { transform: scale(.4) translateY(10px); opacity: 0; } 18% { transform: scale(1.1); opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(-14px); opacity: 0; } }
.chorus { position: absolute; z-index: 6; left: 50%; top: 46%; translate: -50% -50%; white-space: nowrap; pointer-events: none;
  font-family: var(--display); font-weight: 800; font-size: calc(var(--board) * .085); -webkit-text-stroke: calc(var(--board) * .012) #fff; paint-order: stroke fill; animation: chorus 1.8s cubic-bezier(.2, 1.4, .4, 1) forwards; }
.chorus.c1 { color: #6A79A6; } .chorus.c2 { color: #C48638; }
@keyframes chorus { 0% { transform: scale(.3) rotate(-10deg); opacity: 0; } 25% { transform: scale(1.08) rotate(-4deg); opacity: 1; } 75% { opacity: 1; } 100% { transform: scale(1) translateY(-30px) rotate(-4deg); opacity: 0; } }

.tug { width: calc(var(--board) * .8); height: 14px; border-radius: 999px; overflow: hidden; display: flex; box-shadow: inset 0 0 0 2px rgba(62, 42, 79, .15); background: #fff; }
.tug span { display: block; height: 100%; transition: width .4s ease; }
.tug-cats { background: repeating-linear-gradient(45deg, #A7B4DC 0 6px, #8E9DC6 6px 12px); }
.tug-pups { background: repeating-linear-gradient(45deg, #F0BE7C 0 6px, #EBB46A 6px 12px); }

/* end */
.end-backdrop { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 16px; background: rgba(62, 42, 79, .35); animation: fade .4s; }
.end-backdrop.late { animation: fade .4s 1.6s both; }
@keyframes fade { from { opacity: 0; } }
.end-card { width: min(460px, 100%); padding: 22px 26px 22px; text-align: center; }
.end-pets { display: flex; justify-content: center; gap: 6px; margin-top: -60px; }
.end-pets svg { width: 110px; height: 110px; animation: party .8s ease-in-out infinite; }
.end-pets .sleep-face { display: none; } .end-pets .awake-face { display: inline; }
.end-card h2 { margin: 6px 0 0; font-family: var(--display); font-size: 2.1rem; }
.end-score { font-family: var(--display); font-size: 1.6rem; margin: 4px 0; }
.end-score .c1 { color: var(--cat-dark); } .end-score .c2 { color: var(--pup-dark); }
.end-score small { font-size: 1rem; color: var(--ink-soft); }
.end-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 12px; }

.toasts { position: fixed; z-index: 50; top: 74px; left: 50%; translate: -50% 0; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(520px, calc(100vw - 32px)); }
.toast { background: var(--paper); padding: 8px 18px; border-radius: 999px; box-shadow: var(--soft-shadow); text-align: center; animation: toastIn .25s ease-out; transition: opacity .4s, transform .4s; }
.toast.error { background: #FBE0E4; color: var(--berry-dark); }
.toast.out { opacity: 0; transform: translateY(-10px); }
@keyframes toastIn { from { transform: translateY(-10px); opacity: 0; } }
.conn { position: fixed; z-index: 60; bottom: 16px; left: 50%; translate: -50% 0; background: var(--berry); color: #fff; padding: 6px 16px; border-radius: 999px; }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  :root { --board: min(calc(100vw - 48px), calc(100dvh - 300px), 620px); }
  .nap-top { flex-wrap: wrap; gap: 8px; }
  .top-logo { width: 120px; }
  .status { order: 3; width: 100%; padding: 4px 14px; min-height: 40px; }
  .meta { margin-left: auto; }
  .meta .code { display: none; }
  .table { flex-direction: column; gap: 10px; padding-top: 6px; flex: none; }
  .board-wrap { order: 2; }
  .table > .badge { order: 1; }
  .table { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "a b" "board board"; justify-items: center; }
  .badge.side1 { grid-area: a; } .badge.side2 { grid-area: b; } .board-wrap { grid-area: board; }
  .badge { width: 100%; max-width: 230px; flex-direction: row; flex-wrap: wrap; padding: 8px 10px; gap: 2px 8px; border-radius: 18px; justify-content: flex-start; }
  .badge.turn { transform: translateY(-2px); }
  .badge-bed { width: 56px; height: 46px; padding-bottom: 2px; }
  .badge-pet { width: 42px; height: 42px; }
  .badge-text { align-items: flex-start; }
  .badge-text b { font-size: 1.05rem; }
  .badge-who { font-size: .8rem; text-align: left; }
  .badge-count { font-size: 1.8rem; margin-left: auto; }
  .badge-turn { width: 100%; font-size: .9rem; min-height: 0; }
  .badge-extra { width: 100%; justify-content: flex-start; }
  .choices { grid-template-columns: 1fr; }
  .prop { display: none; }
  .beds { grid-template-columns: 1fr; }
  .vs { text-align: center; }
  .toasts { top: auto; bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* about / how to play */
.about { position: relative; z-index: 1; width: min(800px, calc(100% - 32px)); margin: 0 auto 48px; padding: 26px clamp(18px, 4vw, 42px);
  background: var(--paper); border-radius: 22px; box-shadow: var(--soft-shadow); line-height: 1.6; font-weight: 500; }
.about h2 { font-family: var(--display); font-size: 1.35rem; margin: 1.3em 0 .4em; } .about h2:first-child { margin-top: 0; }
.about p, .about li, .about dd { max-width: 68ch; }
.about dt { font-weight: 800; margin-top: .8em; } .about dd { margin: .2em 0 0; }
.about a { color: var(--berry-dark); font-weight: 700; }

/* Reserve the first screen for the app so the text below never shifts. */
#app { min-height: 100dvh; }
