/* Yahtzee — the same Limestone palette as Farkle, built around a live scorecard. */
:root {
  color-scheme: light;
  --bg: #f5f0e6;
  --paper: #fffdf8;
  --ink: #213c36;
  --muted: #788079;
  --line: #dfdfd3;
  --teal: #174a40;
  --orange: #edb271;
  --die: 74px;
  --dgap: 16px;
  --display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 'Inter', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
button, select, a { -webkit-tap-highlight-color: transparent; }
button, select { font: inherit; }
button, a, select, summary { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button, select { color: inherit; }
a { color: inherit; }
button:focus-visible, a:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #c17c32; outline-offset: 4px; }
button:disabled { opacity: .4; }
.game-shell { width: min(1160px, calc(100% - 64px)); margin: 0 auto; padding-bottom: 48px; }
.site-header { min-height: 78px; display: flex; align-items: center; gap: 24px; border-bottom: 1px solid #213c361c; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 18px var(--display); letter-spacing: -.5px; }
.brand img { mix-blend-mode: multiply; }
.brand-light { font-weight: 500; color: #70776e; }
.nav-divider { width: 1px; height: 20px; background: #213c3629; }
.category-link, .back-link { text-decoration: none; font-size: 12px; font-weight: 500; color: #656f65; }
.back-link { margin-left: auto; }
.back-link span { margin-left: 8px; font-size: 17px; }
.category-link:hover, .back-link:hover { color: #193f33; }
.page-heading { display: flex; justify-content: space-between; align-items: center; padding: 29px 0 28px; gap: 20px; }
.eyebrow { margin: 0; font: 500 9px/1.5 var(--mono); letter-spacing: 1.4px; }
.page-heading .eyebrow { color: #707b6d; }
h1 { margin: 1px 0 2px; font: 800 54px/1.07 var(--display); letter-spacing: -2.6px; }
.title-dot { color: #be7947; }
.subtitle { margin: 8px 0 0; font-size: 13px; color: #73766b; }
.stats { display: flex; align-items: center; gap: 26px; }
.stats > div { display: flex; align-items: center; gap: 12px; }
.stats > div + div { border-left: 1px solid var(--line); padding-left: 26px; }
.stats .l { display: block; font: 400 8px var(--mono); letter-spacing: 1px; color: #758075; margin-bottom: 6px; }
.stats .v { display: block; font: 600 24px/1 var(--display); font-variant-numeric: tabular-nums; }
.stat-icon { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #bcbfac; border-radius: 50%; font-size: 22px; color: #708374; }
.record-icon { border-color: transparent; font-size: 34px; }
.match-toolbar { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; min-height: 41px; }
.mode-control { display: flex; align-items: center; gap: 14px; }
.mode-control .eyebrow { color: #7a8176; }
.mode-control select { min-height: 40px; border: 1px solid #d7dacf; border-radius: 8px; padding: 8px 34px 8px 13px; background: var(--paper); font-size: 12px; font-weight: 600; cursor: pointer; }
.toolbar-actions { display: flex; align-items: center; gap: 18px; }
.icon-button { display: grid; place-items: center; border: none; background: none; padding: 10px; width: 40px; height: 40px; }
.icon-button svg { width: 20px; height: 20px; }
.sound-slash, .muted .sound-waves { display: none; }
.muted .sound-slash { display: block; }
.text-button { border: none; background: none; text-decoration: none; padding: 10px 0; font-size: 11px; font-weight: 600; }
.text-button span { font-size: 17px; vertical-align: -1px; margin-right: 4px; }
.text-button:hover, .icon-button:hover { color: #a7622e; }
.how-strip { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 22px 0; margin: 24px 0 40px; }
.how-strip > div { display: flex; gap: 12px; align-items: center; }
.how-strip > div > span { font: 400 11px var(--mono); color: #ab9b7b; }
.how-strip p { margin: 0; font-size: 10px; color: #7e8173; }
.how-strip b { display: block; color: #53644f; font-size: 11px; font-weight: 600; margin-bottom: 3px; }
.game-overview { max-width: 760px; margin: 0 auto; color: #707768; font-size: 13px; line-height: 1.85; }
.game-overview h2, .game-overview h3 { color: #2f4a3b; font-family: var(--display); line-height: 1.25; }
.game-overview h2 { font-size: 28px; margin: 0 0 16px; letter-spacing: -.6px; }
.game-overview h3 { font-size: 19px; margin: 28px 0 12px; }
.game-overview p { margin: 0 0 13px; }
.game-overview ul { padding-left: 20px; }
.game-overview li { margin: 7px 0; }
.score-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-bottom: 20px; }
.score-table th, .score-table td { padding: 10px 13px; border-bottom: 1px solid var(--line); text-align: left; }
.score-table th { font: 500 9px var(--mono); text-transform: uppercase; background: #e7eadf; }
.score-table td:last-child, .score-table th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.related-games-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0 !important; }
.related-games-list a { display: block; padding: 7px 12px; border: 1px solid #d0d8c8; border-radius: 6px; text-decoration: none; font-size: 11px; }
[hidden] { display: none !important; }
.console { position: relative; }
.match-toolbar { margin-bottom: 16px; }
.play { display: grid; grid-template-columns: 390px minmax(0,1fr); gap: 26px; align-items: start; }
.table-column { min-width: 0; }
.dice-panel { position: relative; overflow: hidden; isolation: isolate; border: 1px solid #123d33; border-radius: 18px; color: #fff9ea; background: radial-gradient(ellipse at 40% 40%, #236554, #194d40 65%, #153e35); box-shadow: inset 0 1px #ffffff24, 0 4px 0 #12382f, 0 14px 26px -15px #193e3766; }
.dice-panel::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .13; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23fff' filter='url(%23n)' opacity='.65' d='M0 0h160v160H0z'/%3E%3C/svg%3E"); }
.scoreboard { display: grid; grid-template-columns: 1fr 80px 1fr; align-items: center; gap: 16px; padding: 21px 24px 18px; border-bottom: 1px solid #bed6c526; background: #082d2629; }
.sb-card { min-width: 0; }
.sb-name { font-size: 10px; color: #c2d5c4; display: flex; align-items: center; gap: 6px; }
.sb-card .sb-name::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #a0bba8; }
.sb-card.active .sb-name::before { background: #efb775; box-shadow: 0 0 0 3px #efb77514; }
.sb-score { display: block; margin-top: 5px; font: 600 34px/1.1 var(--display); letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.round-chip { text-align: center; }
.round-chip > span { font: 400 7px var(--mono); letter-spacing: 1.6px; color: #bdd0bb; }
.round-chip b { display: block; margin-top: 6px; font: 500 23px var(--display); color: #edc68d; }
.round-chip b span { font: 400 11px var(--mono); color: #b2c7b4; }
.solo-target { display: none; }
.solo .solo-target { display: block; }
.solo .cpu-only { display: none !important; }
.two .cpuv .cval, .game-shell:not(.two) .cpuv .cell { display: none; }
.table-body { padding: 21px 24px 17px; }
.turnline { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tray-turn { display: flex; align-items: center; gap: 7px; font-size: 10px; font-weight: 600; }
.tray-turn::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #ecb875; }
.tray-turn.cpu::before { background: #b6cbb6; }
.roll-counter { display: flex; align-items: center; gap: 8px; font-size: 9px; color: #b8cdb9; }
.roll-pips { display: flex; gap: 4px; }
.rp { width: 5px; height: 5px; border-radius: 50%; background: #c5d8bd2b; }
.rp.on { background: #ecc38a; }
.hand-intro { padding: 30px 0 16px; text-align: center; }
.hand-intro .eyebrow { color: #bdd0b8; font-size: 7px; letter-spacing: 1.35px; }
.hand-intro h2 { font: 600 31px/1.14 var(--display); letter-spacing: -1.15px; margin: 8px auto 7px; max-width: 290px; min-height: 36px; }
.hand-intro h2.celebrate { color: #efc18b; }
.hand-intro p { min-height: 30px; margin: 0; color: #c3d5be; font-size: 10px; line-height: 1.5; }
.dice-viewport { width: 100%; }
.dice-row { display: flex; align-items: center; justify-content: center; gap: var(--dgap,12px); min-height: 111px; padding: 8px 0 24px; transform-origin: top center; }
.die { width: var(--die,58px); height: var(--die,58px); position: relative; flex: 0 0 auto; padding: 3px; border: 1px solid #fff7df; border-radius: 12px; background: linear-gradient(140deg,#fffef8 5%,#f3efdf 90%); box-shadow: inset 0 2px 2px #fff, inset 0 -2px 3px #b8ae9326, 0 4px 0 #c6c5ad, 0 10px 15px #05241e66; transition: transform .16s, background .16s, box-shadow .16s; }
.die:disabled { opacity: 1; }
.die svg { display: block; width: 100%; height: 100%; }
.die .pip { fill: #254e41; }
.die-key, .hold-label { position: absolute; bottom: -23px; left: 0; width: 100%; text-align: center; font: 400 8px var(--mono); color: #b7ccb7; }
.die-key { opacity: .65; }
.hold-label { display: none; font-size: 7px; letter-spacing: .8px; color: #f6d29b; }
.die.held { background: linear-gradient(140deg,#ffe1ae,#edbe7d); border-color: #ffe1ae; transform: translateY(-5px); box-shadow: inset 0 2px #fff1ce, 0 4px 0 #b6864e, 0 10px 20px #082e2777, 0 0 0 3px #efbc7540; }
.die.held::after { content: '✓'; position: absolute; top: -6px; right: -6px; width: 17px; height: 17px; border-radius: 50%; background: #f5d296; color: #254b3b; border: 2px solid #235543; font-size: 9px; line-height: 13px; font-weight: 700; }
.die.held .die-key { display: none; }
.die.held .hold-label { display: block; }
.die:hover:not(:disabled) { transform: translateY(-4px); }
.die.held:hover:not(:disabled) { transform: translateY(-7px); }
.die:active:not(:disabled) { transform: translateY(1px); }
.die.ready:nth-child(1) { transform: rotate(-7deg); }
.die.ready:nth-child(2) { transform: translateY(-3px) rotate(4deg); }
.die.ready:nth-child(4) { transform: translateY(-2px) rotate(-5deg); }
.die.ready:nth-child(5) { transform: rotate(6deg); }
.die.ready .die-key { visibility: hidden; }
.die.rolling { animation: tumble .43s ease; animation-delay: calc(var(--order, 0) * 10ms); }
@keyframes tumble { 0% { transform: rotate(-15deg) translateY(-6px); } 25% { transform: rotate(10deg) translateY(3px); } 60% { transform: rotate(-8deg) translateY(-4px); } 100% { transform: rotate(0) translateY(0); } }
.hold-caption { display: flex; justify-content: space-between; align-items: center; gap: 7px; margin: 2px 0 12px; min-height: 30px; color: #bcd0b9; font-size: 9px; }
.release-button { color: #ebcb9b; border: 0; background: transparent; padding: 6px 0 6px 8px; font-size: 9px; white-space: nowrap; }
.release-button:disabled { opacity: .28; }
.roll-btn, #overNew { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 51px; border: 1px solid #f3bd8280; border-radius: 9px; padding: 12px 18px; background: #edb271; color: #303929; box-shadow: inset 0 1px #ffdbad80, 0 3px 0 #ab7945; font: 700 15px var(--display); transition: background .16s, transform .16s; }
.roll-btn > span:last-child { font-size: 21px; font-weight: 400; }
.roll-btn:hover:not(:disabled), #overNew:hover { background: #fac385; transform: translateY(-1px); }
.roll-btn:disabled { opacity: .55; box-shadow: none; }
.tray-status { min-height: 47px; text-align: center; font-size: 10px; color: #bdd1b8; line-height: 1.6; padding-top: 16px; }
.tray-status b { color: #f3ce98; font-weight: 500; }
.bonus-card { padding: 19px 21px 17px; background: #eeeddf; border: 1px solid #dbdecf; border-radius: 12px; margin-top: 18px; }
.bonus-heading { display: flex; align-items: center; gap: 10px; }
.bonus-star { font-size: 25px; line-height: 1; color: #a78650; }
.bonus-heading .eyebrow { font-size: 6px; color: #8a8b73; letter-spacing: 1px; }
.bonus-heading h3 { font: 600 17px var(--display); margin: 2px 0 0; letter-spacing: -.3px; }
.bonus-value { margin-left: auto; color: #8b754a; font: 600 24px var(--display); }
.bonus-progress { height: 4px; border-radius: 3px; overflow: hidden; background: #d7dcca; margin: 14px 0 8px; }
.bonus-progress > span { display: block; height: 100%; width: 0; background: #718e65; transition: width .4s; }
.bonus-caption { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: 9px; color: #7c866f; }
.bonus-caption b { font: 400 9px var(--mono); white-space: nowrap; }
.bonus-card.earned { background: #e5ecda; }
.last-play { min-height: 27px; margin: 13px 4px 5px; color: #75816e; font-size: 10px; line-height: 1.6; }
.keyboard-guide { display: flex; gap: 20px; margin: 8px 4px 0; color: #7b836f; font-size: 9px; }
kbd { display: inline-block; min-width: 19px; padding: 1px 3px; border: 1px solid #cbd0bf; border-radius: 3px; font: 400 8px/1.5 var(--mono); text-align: center; color: #77806b; margin-right: 3px; }
.card-wrap { min-width: 0; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 3px 0 9px; }
.card-heading .eyebrow { font-size: 7px; letter-spacing: 1px; color: #838873; }
.card-heading h2 { font: 600 29px/1.25 var(--display); letter-spacing: -.8px; margin: 3px 0 0; }
.card-completion { font: 400 9px var(--mono); border: 1px solid #d3d9c8; border-radius: 5px; padding: 6px 8px; color: #738168; white-space: nowrap; }
.card-instruction { min-height: 31px; display: flex; justify-content: space-between; align-items: center; gap: 7px; }
.card-instruction p { font-size: 10px; line-height: 1.6; color: #7d8372; margin: 0 0 12px; }
.mobile-hand, .card-tabs { display: none; }
.card-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.card-frame { overflow: hidden; border: 1px solid #d9dfd0; border-radius: 12px; background: #fffdf8; box-shadow: 0 3px 0 #e9e8dc; }
.scard { border-collapse: collapse; width: 100%; table-layout: fixed; }
.scard th, .scard td { border-bottom: 1px solid #e7e9e0; }
.scard thead th { background: #ebeee3; color: #6c7c62; height: 45px; font: 400 8px var(--mono); }
.scard thead .lblh { padding: 9px 0 9px 13px; text-align: left; font-size: 8px; letter-spacing: .5px; }
.scard .valcol { width: 57px; }
.scard .colhead { font-family: 'Inter',sans-serif; font-size: 9px; font-weight: 500; text-align: center; }
.scard .colhead.active { color: #205e43; box-shadow: inset 0 -2px #74916d; }
.scard .lbl { text-align: left; font-size: 11px; font-weight: 500; line-height: 1.2; padding: 9px 7px 9px 13px; }
.category-name { display: inline-block; vertical-align: middle; }
.scard .sub { display: block; font-size: 8px; color: #8a8f7d; font-weight: 400; margin-top: 4px; }
.face-mark { display: inline-flex; align-items: center; width: 22px; height: 22px; margin-right: 8px; border: 1px solid #b9c6ae; border-radius: 4px; background: #f4f5ec; vertical-align: middle; }
.face-mark svg { display: block; width: 100%; height: 100%; fill: #5f7853; }
.scard td { text-align: center; padding: 0; }
.cell { width: 100%; display: block; min-height: 51px; padding: 0; background: transparent; border: 0; font: 500 16px var(--display); font-variant-numeric: tabular-nums; position: relative; }
.cell:disabled { opacity: 1; }
.cell:not(.locked):disabled .val { color: #c4cbb9; font-size: 13px; }
.cell.avail { cursor: pointer; }
.cell.avail .val { display: inline-flex; align-items: center; justify-content: center; gap: 1px; min-width: 41px; min-height: 34px; padding: 4px; border: 1px solid #c4d7b7; border-radius: 6px; background: #eaf0e1; color: #386439; font-size: 15px; }
.cell.avail:not(.zero) .val::before { content: '+'; font: 400 9px var(--mono); color: #79916b; }
.cell.avail.zero .val { background: transparent; border-style: dashed; border-color: #d5dacb; color: #9da58f; font-size: 12px; }
.cell.avail:hover, .cell.avail:focus-visible { background: #e9edde; outline-offset: -4px; }
.cell.avail:hover .val { background: #dbe9cc; border-color: #8ba776; }
.cell.locked { color: #3a5541; background: #f0f1e8; }
.cell.locked .val::after { content: '✓'; font-size: 7px; position: absolute; bottom: 6px; right: 5px; color: #9aaa89; }
.cell.locked.zero { color: #9da48e; }
.scard .cpuv { background: #faf9f1; }
.cval { font: 500 15px var(--display); color: #6a7b60; }
.cval.zero { color: #a0a88f; }
.scard .derived th, .scard .derived td { padding: 11px 8px; font-size: 9px; font-weight: 500; background: #f2f3e9; color: #7c896d; }
.scard .derived th { padding-left: 13px; line-height: 1.5; }
.scard .derived td { font-family: var(--mono); font-size: 9px; }
.scard .derived .earned { color: #437842; }
.scard .total th, .scard .total td { padding: 14px 8px; background: #e4ebd9; color: #416140; border-bottom: 0; font: 600 17px var(--display); }
.scard .total th { font-size: 11px; padding-left: 13px; }
.scard tbody tr:last-child th, .scard tbody tr:last-child td { border-bottom: 0; }
.card-legend { display: flex; gap: 16px; align-items: center; padding: 15px 2px; font-size: 9px; color: #7e886f; }
.card-legend > span { display: flex; align-items: center; gap: 5px; }
.card-legend > span:last-child { margin-left: auto; color: #959b86; }
.preview-swatch { width: 10px; height: 10px; background: #e2ecd6; border: 1px solid #b6cba5; border-radius: 3px; }
.filled-swatch { font-style: normal; font-size: 10px; }
.card-tip { display: flex; align-items: flex-start; gap: 11px; padding: 13px 15px; border-top: 1px solid #d9dfd0; color: #808771; }
.card-tip > span { font-size: 21px; line-height: 1; color: #8b9a7b; }
.card-tip p { margin: 0; font-size: 10px; line-height: 1.65; }
.card-tip b { font-weight: 600; color: #5a7150; }
.flash { animation: score-in .7s ease; }
@keyframes score-in { 0%, 40% { background: #ecc792; } 100% { background: #f0f1e8; } }
.game-over { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 24px; background: #103d32ba; backdrop-filter: blur(6px); }
.game-over.show { display: flex; }
.over-card { width: min(100%,380px); text-align: center; padding: 28px; background: #fbf7eb; border: 1px solid #e1dfcc; border-radius: 17px; box-shadow: 0 22px 60px #05251d55; max-height: 100%; overflow-y: auto; color: #274936; }
.over-emblem { display: block; font-size: 37px; color: #b28045; margin-bottom: 18px; line-height: 1; }
.over-card .eyebrow { color: #8a8b72; font-size: 7px; }
.over-card h2 { font: 700 34px/1.1 var(--display); margin: 12px 0; letter-spacing: -1px; }
.over-card .final { font: 600 23px/1.4 var(--display); padding: 19px 0; border-top: 1px solid #dbdfce; border-bottom: 1px solid #dbdfce; margin: 21px 0 15px; }
.over-card p { font-size: 10px; color: #7a826e; line-height: 1.6; }
.over-card .best { font: 500 9px var(--mono); color: #5f7a43; text-transform: uppercase; letter-spacing: .8px; }
.over-card .actions { margin-top: 19px; }
/* The result column (.over-main) carries Play next and the feedback ask (play-next.js); the leaderboard
   comes after it. With a board (game.js sets .has-board once boards.js renders one) the card goes two
   columns where there is room, so the board never pushes the ask below the card's edge. */
@media (min-width: 801px) {
  .over-card.has-board { width: min(100%, 780px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 32px; align-items: center; }
}
#overNew { min-height: 46px; font-size: 14px; }
.over-card .actions > a { display: block; font-size: 10px; color: #7e876e; padding: 14px 0 3px; text-decoration: none; }
.game-overview .table-scroll { overflow-x: auto; }
.game-overview table { width: 100%; border-collapse: collapse; font-size: 12px; margin-bottom: 20px; }
.game-overview th, .game-overview td { padding: 10px; border-bottom: 1px solid #d9dfcf; text-align: left; }
.game-overview th { background: #e9ecdf; color: #5c7452; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.feedback-link { display: block; width: max-content; margin: 0 auto 30px; color: #73816e; font-size: 11px; text-decoration: none; }
@media (max-width: 1180px) {
  .game-shell { width: calc(100% - 40px); }
  .play { grid-template-columns: 340px minmax(0,1fr); gap: 20px; }
  .table-body, .scoreboard { padding-left: 19px; padding-right: 19px; }
  .card-cols { gap: 10px; }
  .face-mark { display: none; }
  .scard .valcol { width: 51px; }
  .scard .lbl { font-size: 10px; padding-left: 10px; }
  .scard .sub { font-size: 7px; }
  .hand-intro h2 { font-size: 27px; }
  .card-legend { gap: 9px; font-size: 8px; }
}
@media (min-width: 961px) and (max-height: 850px) {
  .site-header { min-height: 55px; }
  .page-heading { padding: 17px 0; }
  h1 { font-size: 44px; }
  .page-heading .eyebrow { font-size: 7px; }
  .subtitle { font-size: 11px; margin-top: 5px; }
  .match-toolbar { margin-bottom: 12px; }
  .scoreboard { padding-top: 16px; padding-bottom: 14px; }
  .sb-score { font-size: 30px; }
  .table-body { padding-top: 15px; padding-bottom: 12px; }
  .hand-intro { padding: 18px 0 8px; }
  .hand-intro h2 { font-size: 27px; }
  .dice-row { min-height: 103px; }
  .tray-status { min-height: 42px; padding-top: 13px; }
  .bonus-card { margin-top: 14px; padding: 14px 18px; }
  .card-heading h2 { font-size: 26px; }
  .cell { min-height: 45px; }
  .scard .lbl { padding-top: 7px; padding-bottom: 7px; }
  .scard thead th { height: 38px; }
  .scard .derived th, .scard .derived td { padding-top: 9px; padding-bottom: 9px; }
  .scard .total th, .scard .total td { padding-top: 11px; padding-bottom: 11px; }
  .card-tip { padding-top: 10px; }
  .keyboard-guide { display: none; }
}
@media (min-width: 961px) and (max-height: 750px) {
  .page-heading { padding: 11px 0; }
  h1 { font-size: 36px; }
  .subtitle { display: none; }
  .hand-intro { padding-top: 13px; }
  .card-tip { display: none; }
}
@media (max-width: 960px) and (min-width: 601px) {
  .game-shell { width: min(800px, calc(100% - 40px)); }
  .play { grid-template-columns: 1fr; gap: 25px; }
  .table-column { display: grid; grid-template-columns: minmax(0,1fr) 210px; gap: 0 20px; }
  .dice-panel { grid-row: 1 / 5; }
  .bonus-card { margin-top: 0; align-self: start; }
  .bonus-heading .eyebrow { display: none; }
  .bonus-heading h3 { font-size: 14px; }
  .bonus-star { display: none; }
  .bonus-caption { flex-wrap: wrap; }
  .keyboard-guide { display: block; margin-top: 0; }
  .keyboard-guide > span { display: block; margin: 7px 0; }
  .last-play { align-self: start; }
  .hand-intro { padding-top: 18px; }
  .hand-intro h2 { font-size: 27px; }
  .face-mark { display: inline-flex; }
  .scard .valcol { width: 65px; }
  .scard .lbl { font-size: 11px; }
  .scard .sub { font-size: 8px; }
  .stats { gap: 18px; }
  .stats > div + div { padding-left: 18px; }
  .stat-icon { display: none; }
}
@media (max-width: 600px) {
  .game-shell { width: calc(100% - 24px); }
  .site-header { min-height: 58px; gap: 14px; }
  .brand { font-size: 15px; gap: 7px; }
  .brand img { width: 24px; height: 24px; }
  .nav-divider, .category-link { display: none; }
  .back-link { font-size: 10px; }
  .page-heading { padding: 16px 2px; align-items: flex-start; gap: 8px; }
  .page-heading .eyebrow { font-size: 6px; letter-spacing: .9px; }
  h1 { font-size: 41px; letter-spacing: -2px; margin-top: 4px; }
  .subtitle { font-size: 10px; max-width: 210px; margin-top: 6px; }
  .stats { gap: 12px; padding-top: 8px; }
  .stats > div + div { padding-left: 12px; }
  .stat-icon { display: none; }
  .stats .l { font-size: 6px; letter-spacing: .5px; margin-bottom: 5px; }
  .stats .v { font-size: 19px; }
  .mode-control > .eyebrow { display: none; }
  .mode-control select { font-size: 10px; min-height: 36px; padding: 7px 20px 7px 9px; }
  .toolbar-actions { gap: 12px; }
  .icon-button { width: 34px; height: 36px; padding: 8px; }
  .text-button { font-size: 10px; }
  .rules-link { display: none; }
  .match-toolbar { min-height: 36px; margin-bottom: 12px; }
  .play { grid-template-columns: 1fr; gap: 19px; }
  .dice-panel { border-radius: 14px; }
  .scoreboard { padding: 12px 18px; grid-template-columns: 1fr 74px 1fr; }
  .sb-name { font-size: 9px; }
  .sb-score { font-size: 26px; margin-top: 3px; }
  .round-chip b { font-size: 20px; margin-top: 3px; }
  .round-chip > span { font-size: 6px; }
  .table-body { padding: 13px 18px 10px; }
  .tray-turn { font-size: 9px; }
  .roll-counter { font-size: 8px; }
  .hand-intro { padding: 11px 0 2px; }
  .hand-intro .eyebrow { display: none; }
  .hand-intro h2 { font-size: 25px; margin: 5px 0 4px; max-width: none; min-height: 29px; }
  .hand-intro p { min-height: 20px; font-size: 9px; }
  .dice-row { min-height: 101px; }
  .die { border-radius: 10px; }
  .hold-caption { margin: 0 0 9px; min-height: 25px; font-size: 8px; }
  .release-button { font-size: 8px; }
  .roll-btn { min-height: 46px; font-size: 14px; padding: 10px 15px; }
  .tray-status { min-height: 43px; font-size: 9px; padding-top: 11px; }
  .bonus-card { display: none; }
  .last-play { margin: 10px 4px 0; min-height: 17px; font-size: 9px; }
  .keyboard-guide { display: none; }
  .card-heading { margin-top: 0; }
  .card-heading .eyebrow { font-size: 6px; }
  .card-heading h2 { font-size: 26px; }
  .card-completion { font-size: 8px; padding: 5px 6px; }
  .card-instruction { position: sticky; top: 0; z-index: 3; min-height: 40px; background: #f5f0e6f5; padding: 8px 2px; border-bottom: 1px solid #dadfce; margin-bottom: 10px; }
  .card-instruction p { font-size: 9px; margin: 0; max-width: 220px; }
  .mobile-hand { display: flex; flex-shrink: 0; gap: 3px; }
  .mobile-hand svg { width: 18px; height: 18px; border: 1px solid #aebb9e; border-radius: 3px; fill: #4d6d45; background: #fffdf7; }
  .card-tabs { display: flex; gap: 5px; background: #e8ecde; padding: 4px; margin-bottom: 11px; border-radius: 8px; }
  .card-tabs button { flex: 1; border: 1px solid transparent; border-radius: 6px; min-height: 38px; background: transparent; color: #7c886d; font-size: 11px; font-weight: 500; }
  .card-tabs button span { font: 400 7px var(--mono); margin-left: 6px; color: #929c84; }
  .card-tabs [aria-selected="true"] { border-color: #d4dbc8; background: #fffdf7; color: #35573b; box-shadow: 0 1px 3px #617a3d12; }
  .card-cols { display: block; }
  .card-cols[data-active="upper"] #lowerFrame, .card-cols[data-active="lower"] #upperFrame { display: none; }
  .face-mark { display: inline-flex; }
  .scard .valcol { width: 72px; }
  .scard thead th { height: 38px; }
  .scard .lbl { font-size: 12px; padding: 9px 13px; }
  .scard .sub { font-size: 9px; }
  .cell { min-height: 51px; }
  .cell.avail .val { min-width: 49px; min-height: 36px; }
  .scard .derived th, .scard .derived td { padding-top: 13px; padding-bottom: 13px; font-size: 10px; }
  .card-legend { font-size: 8px; gap: 12px; }
  .card-legend > span:last-child { display: none; }
  .card-tip { font-size: 10px; padding: 12px 6px; }
  .how-strip { grid-template-columns: 1fr; gap: 15px; padding: 21px 7px; margin-top: 26px; margin-bottom: 30px; }
  .how-strip b { display: inline; margin-right: 4px; }
  .game-overview { padding: 0 7px; font-size: 12px; }
  .game-overview h2 { font-size: 24px; }
  .game-overview table { font-size: 11px; }
  .over-card { padding: 23px; }
  .over-card h2 { font-size: 30px; }
}
@media (max-width: 600px) and (max-height: 750px) {
  .site-header { min-height: 45px; }
  .page-heading { padding: 11px 2px; }
  .subtitle, .page-heading .eyebrow { display: none; }
  h1 { font-size: 34px; margin-top: 0; }
  .stats { padding-top: 0; }
  .hand-intro { padding-top: 7px; }
  .hand-intro h2 { font-size: 22px; min-height: 26px; }
  .hand-intro p { display: none; }
  .dice-row { min-height: 98px; }
  .scoreboard { padding-top: 10px; padding-bottom: 10px; }
  .tray-status { min-height: 39px; }
}
@media (max-width: 350px) {
  .game-shell { width: calc(100% - 16px); }
  .stats { gap: 8px; }
  .stats > div + div { padding-left: 8px; }
  .stats .l { font-size: 5px; }
  .stats .v { font-size: 17px; }
  .table-body { padding-left: 12px; padding-right: 12px; }
  .hand-intro h2 { font-size: 21px; }
  .scard .valcol { width: 61px; }
  .scard .lbl { padding-left: 10px; }
  .card-heading h2 { font-size: 23px; }
  .card-completion { font-size: 7px; }
  .mobile-hand svg { width: 16px; height: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Phones: the desktop micro-labels (6-10px) are too small to read or tap at phone size. */
@media (max-width: 600px) {
  .back-link, .text-button { font-size: 13px; }
  .l, .eyebrow, .round-chip span { font-size: 9px; }
  .sb-name, .tray-turn, .roll-counter, .hold-caption { font-size: 12px; }
  .die-key { font-size: 11px; }
  .release-button { font-size: 13px; padding: 10px 0 10px 12px; }
  .tray-status, .card-instruction { font-size: 13px; }
  .last-play, .lbl, .lblh { font-size: 12px; }
  .card-completion, .sub, .valcol { font-size: 11px; }
}
