/* Farkle — Limestone's warm paper, with a deep teal playing surface. */
: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; }
.console { display: grid; grid-template-columns: minmax(0, 1fr) 272px; gap: 16px 24px; }
.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; }
.stage-area { min-width: 0; }
.felt { position: relative; overflow: hidden; isolation: isolate; border: 1px solid #113c32; border-radius: 19px; background: radial-gradient(ellipse at 45% 35%, #226353 0%, #194c40 60%, #153f36 100%); color: #fff9ea; box-shadow: inset 0 1px #ffffff26, 0 5px 0 #13382f, 0 14px 26px -15px #193e3766; }
.felt::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .14; 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 114px 1fr; align-items: center; gap: 26px; padding: 23px 32px 22px; border-bottom: 1px solid #c0daca26; background: #0a2b222b; }
.sb-card { min-width: 0; }
.sb-meta { display: flex; gap: 7px; align-items: center; min-height: 17px; }
.player-marker { width: 6px; height: 6px; border-radius: 50%; background: #a2b5a8; }
.active .player-marker { background: #eeba7e; box-shadow: 0 0 0 3px #eeba7e14; }
.sb-name { font-size: 11px; font-weight: 500; color: #d1e0d3; white-space: nowrap; }
.active-label { margin-left: auto; color: #e8ba7a; font: 400 7px var(--mono); letter-spacing: 1px; visibility: hidden; }
.active .active-label { visibility: visible; }
.sb-score { display: block; margin: 4px 0 12px; font: 600 38px/1.1 var(--display); letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.score-track { height: 3px; border-radius: 2px; overflow: hidden; background: #c4e4d11a; }
.score-track span { display: block; width: 0; height: 100%; background: #eeba7e; transition: width .6s ease; }
#progressCpu { background: #a4cdb9; }
.sb-goal { text-align: center; font: 400 8px/1.7 var(--mono); letter-spacing: 1.1px; color: #b5cdbd; }
.sb-goal b { display: block; font: 600 22px/1.5 var(--display); letter-spacing: -.3px; color: #f5ddae; }
.sb-goal > span { font-size: 7px; letter-spacing: 2px; }
.sb-goal.final { color: #f6bc7b; }
.sb-goal.final b { font-size: 16px; }
.table-body { padding: 21px 32px 26px; }
.turnline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.who { font-size: 11px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.who::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #edb271; }
.round-label { font: 400 8px var(--mono); letter-spacing: 1.4px; color: #adc8b8; white-space: nowrap; }
.turn-pot { text-align: center; margin: 7px 0 13px; }
.pot-label { font: 400 8px var(--mono); color: #b4ccbb; letter-spacing: 2px; }
.pot-value { display: flex; justify-content: center; align-items: baseline; gap: 8px; margin: -2px 0; }
.pot-value b { font: 600 62px/1.2 var(--display); letter-spacing: -2px; font-variant-numeric: tabular-nums; }
.pot-value > span { font: 400 10px var(--mono); color: #aec7b7; }
.selection-note { display: block; min-height: 18px; font-size: 10px; color: #bed4c0; }
.tray-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 28px; }
.tray-heading > span { font: 400 8px var(--mono); letter-spacing: 1.3px; color: #b4ccbb; }
#bestBtn { background: none; border: none; padding: 8px 0 8px 10px; color: #f0d4a3; font-size: 10px; font-weight: 600; }
#bestBtn span { margin-left: 4px; }
#bestBtn:disabled { opacity: .3; }
.dice-viewport { width: 100%; position: relative; }
.tray { display: flex; align-items: center; justify-content: center; gap: var(--dgap); min-height: 116px; }
#rollTray { transform-origin: top center; }
.die { position: relative; display: grid; grid-template-columns: repeat(3,1fr); grid-template-rows: repeat(3,1fr); flex: 0 0 auto; width: var(--die); height: var(--die); padding: 11px; border: 1px solid #fff7db; border-radius: 14px; 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 8px 0 #0a302724, 0 10px 15px #05241e66; transition: transform .18s, background .18s, box-shadow .18s; }
.die:disabled { opacity: 1; }
.die .pip { place-self: center; width: 10px; height: 10px; border-radius: 50%; background: #244f42; opacity: 0; box-shadow: inset 0 1px 2px #091f1a88; }
.die .pip.on { opacity: 1; }
.die .die-index { position: absolute; bottom: -24px; left: 0; width: 100%; text-align: center; font: 400 8px var(--mono); color: #adc6b6; opacity: .6; }
.die:hover:not(:disabled) { transform: translateY(-4px); }
.die:active:not(:disabled) { transform: translateY(1px); }
.die.sel { background: linear-gradient(140deg,#ffe1ae,#edbe7d); border-color: #ffe1ae; transform: translateY(-8px); box-shadow: inset 0 2px #fff1ce, 0 4px 0 #b6864e, 0 10px 20px #082e2777, 0 0 0 3px #efbc7540; }
.die.sel:hover:not(:disabled) { transform: translateY(-10px); }
.die.sel::after { content: '✓'; position: absolute; top: -7px; right: -6px; background: #f5d296; color: #254b3b; border: 2px solid #235543; width: 18px; height: 18px; border-radius: 50%; font-size: 10px; line-height: 14px; font-weight: 700; }
.die.sel .die-index { opacity: 1; color: #ffdfab; }
.die.ready:nth-child(1) { transform: rotate(-7deg); }
.die.ready:nth-child(2) { transform: translateY(-3px) rotate(4deg); }
.die.ready:nth-child(5) { transform: translateY(-3px) rotate(-5deg); }
.die.ready:nth-child(6) { transform: rotate(7deg); }
.die.rolling { animation: tumble .46s both; animation-delay: calc(var(--order, 0) * 22ms); }
@keyframes tumble { 0% { transform: translateY(-8px) rotate(-18deg); opacity: .45; } 32% { transform: translateY(4px) rotate(14deg); } 65% { transform: translateY(-5px) rotate(-8deg); } 100% { transform: translateY(0) rotate(0); opacity: 1; } }
.readout { text-align: center; min-height: 34px; margin-top: 10px; font-size: 11px; color: #d1dfcc; line-height: 1.6; }
.readout b { color: #f6d29b; font-weight: 600; }
.readout.bad { color: #ffc0a6; }
.kept-row { display: flex; align-items: center; gap: 16px; min-height: 55px; margin-top: 3px; border-top: 1px solid #c0daca20; border-bottom: 1px solid #c0daca20; }
.kept-label { font: 400 8px var(--mono); letter-spacing: 1.2px; white-space: nowrap; color: #b4ccbb; }
.aside-tray { min-height: 52px; gap: 6px; justify-content: flex-start; }
.aside-tray .die { width: 30px; height: 30px; padding: 4px; border-radius: 6px; opacity: .65; box-shadow: 0 2px 0 #96aa91; }
.aside-tray .pip { width: 4px; height: 4px; }
.tray-empty { font-size: 10px; color: #a3bbaa; }
.hot { margin-left: auto; font: 400 8px var(--mono); color: #f6cc91; white-space: nowrap; }
.decision-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 17px 0 10px; font-size: 10px; color: #bfd2bf; }
#riskValue { font: 400 9px var(--mono); color: #f5ce9a; white-space: nowrap; }
.controls { display: grid; grid-template-columns: 1.2fr 1fr; gap: 12px; }
.controls button, #overBtn { min-height: 52px; border-radius: 9px; font: 700 15px var(--display); border: 1px solid transparent; transition: background .18s, transform .18s; }
#rollBtn, #overBtn { color: #2f3827; background: #edb271; box-shadow: inset 0 1px #ffdbad80, 0 3px 0 #ab7945; }
#rollBtn:hover:not(:disabled), #overBtn:hover { background: #fac385; transform: translateY(-1px); }
#bankBtn { color: #f2eddf; border-color: #adc4b64d; background: #91b29b0b; }
#bankBtn:hover:not(:disabled) { background: #adc4b629; }
#bankBtn:disabled { opacity: .35; }
.table-caption { display: flex; align-items: baseline; gap: 8px; min-height: 39px; margin: 12px 5px 0; }
.table-caption p { margin: 0; font-size: 10px; color: #65766b; line-height: 1.6; }
.status-dot { flex: 0 0 4px; height: 4px; border-radius: 50%; background: #678774; }
.decision-panel { display: flex; flex-direction: column; min-width: 0; }
.quick-score { border: 1px solid #dfe0d3; background: #fffdf8b3; border-radius: 14px; overflow: hidden; }
.quick-score summary { display: flex; align-items: center; justify-content: space-between; list-style: none; padding: 23px 21px 0; cursor: pointer; }
.quick-score summary::-webkit-details-marker { display: none; }
.quick-score summary .eyebrow { display: block; color: #8a8d78; font-size: 8px; letter-spacing: 1.1px; }
.guide-title { display: block; font: 600 20px/1.2 var(--display); letter-spacing: -.5px; margin-top: 6px; max-width: 180px; }
.details-chevron { color: #7e8e79; font-size: 16px; }
.quick-score[open] .details-chevron { transform: rotate(180deg); }
.quick-score:not([open]) summary { padding-bottom: 20px; }
.guide-content { padding: 0 21px 19px; }
.guide-intro { font-size: 11px; line-height: 1.7; color: #7a8173; margin: 11px 0 18px; }
.single-scores { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 13px; }
.single-scores > div { display: flex; align-items: center; gap: 7px; background: #edf0e6; border: 1px solid #e0e5d7; border-radius: 8px; padding: 9px 8px; font-size: 9px; color: #6d7b69; }
.single-scores b { display: block; font: 600 19px/1.2 var(--display); color: #335141; }
.mini-die { font: 32px/1 'Segoe UI Symbol', sans-serif; color: #557059; }
.score-list { margin: 0; }
.score-list > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-bottom: 1px solid #e5e6dd; padding: 10px 0; font-size: 10px; }
.score-list dt { color: #64735f; }
.score-list small { display: block; font-size: 8px; color: #878e7d; margin-top: 2px; }
.score-list dd { margin: 0; font-family: var(--mono); font-size: 10px; white-space: nowrap; }
.scoring-footnote { margin: 12px 0 17px; font-size: 9px; line-height: 1.7; color: #858a7b; }
.hot-tip { display: flex; align-items: flex-start; gap: 9px; padding: 13px 11px; border-radius: 8px; background: #f5ecd9; }
.hot-tip > span { color: #ad7846; font-size: 20px; line-height: 1; }
.hot-tip b { font-size: 10px; font-weight: 600; color: #7d663b; }
.hot-tip p { font-size: 9px; line-height: 1.7; color: #8a7c5e; margin: 4px 0 0; }
.keyboard-guide { padding: 18px 6px 0; color: #808777; }
.keyboard-guide .eyebrow { font-size: 7px; }
.keyboard-guide > div { display: flex; gap: 13px; margin: 10px 0 7px; font-size: 9px; }
.keyboard-guide p { margin: 0; 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; }
.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; }
.farkle-flash { display: none; position: absolute; inset: 130px 0 135px; z-index: 4; pointer-events: none; align-items: center; justify-content: center; text-align: center; background: #133f36e8; }
.farkle-flash.show { display: flex; animation: flash-in 1.5s both; }
.farkle-flash > div { display: flex; flex-direction: column; align-items: center; gap: 9px; }
.farkle-flash .eyebrow { font-size: 8px; color: #e9b986; }
.farkle-flash strong { font: 700 64px/1.1 var(--display); color: #f2be87; letter-spacing: -3px; }
.farkle-flash span:last-child { color: #e1d9bd; font-size: 12px; }
@keyframes flash-in { 0% { opacity: 0; } 15%, 85% { opacity: 1; } 100% { opacity: 0; } }
.game-over { position: absolute; inset: 0; z-index: 5; display: none; align-items: center; justify-content: center; padding: 24px; background: #0b3026c9; backdrop-filter: blur(6px); }
.game-over.show { display: flex; }
.over-card { width: min(100%, 340px); text-align: center; border: 1px solid #e1dfcc; border-radius: 17px; padding: 27px; background: #fbf7eb; color: #274936; box-shadow: 0 22px 60px #05251d55; }
.over-emblem { color: #b28045; font-size: 36px; line-height: 1; display: block; margin-bottom: 18px; }
.over-card .eyebrow { color: #8a8b72; font-size: 8px; }
.over-card h2 { font: 700 34px/1.1 var(--display); letter-spacing: -1px; margin: 10px 0; }
.over-card > p:not(.eyebrow) { font-size: 11px; color: #7a826e; }
.final-scores { display: flex; justify-content: space-around; padding: 17px 0 22px; margin-top: 14px; border-top: 1px solid #dbdfce; }
.final-scores span { font-size: 9px; color: #7c836f; }
.final-scores b { display: block; font: 600 26px var(--display); margin-top: 4px; color: #325443; }
#overBtn { width: 100%; min-height: 46px; font-size: 14px; }
#overBtn span { margin-left: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
@media (min-width: 901px) and (max-height: 850px) {
  .site-header { min-height: 62px; }
  .page-heading { padding: 20px 0; }
  h1 { font-size: 46px; }
  .scoreboard { padding-top: 16px; padding-bottom: 17px; }
  .table-body { padding-top: 16px; padding-bottom: 22px; }
  .turn-pot { margin: 2px 0 4px; }
  .pot-value b { font-size: 50px; }
  .tray { min-height: 104px; }
  .aside-tray { min-height: 42px; }
  .kept-row { min-height: 48px; }
  .quick-score summary { padding-top: 18px; }
  .score-list > div { padding: 8px 0; }
  .guide-intro { margin-bottom: 13px; }
}
@media (max-width: 1050px) {
  .game-shell { width: calc(100% - 40px); }
  .console { grid-template-columns: minmax(0,1fr) 240px; gap: 14px 18px; }
  .table-body { padding-left: 22px; padding-right: 22px; }
  .scoreboard { padding-left: 22px; padding-right: 22px; gap: 18px; }
  .quick-score summary { padding-left: 17px; padding-right: 17px; }
  .guide-content { padding-left: 17px; padding-right: 17px; }
  .active-label { font-size: 6px; letter-spacing: .4px; }
}
@media (max-width: 900px) {
  .game-shell { width: min(680px, calc(100% - 32px)); }
  .console { grid-template-columns: 1fr; gap: 12px; }
  .decision-panel { grid-column: 1; }
  .quick-score summary { padding: 17px 20px; }
  .guide-title { max-width: none; font-size: 18px; margin-top: 3px; }
  .guide-content { padding: 0 20px 20px; }
  .single-scores { max-width: 300px; }
  .score-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
  .keyboard-guide { display: none; }
  .stats { gap: 18px; }
  .stats > div + div { padding-left: 18px; }
  .stat-icon { display: none; }
  .page-heading { padding: 23px 0; }
  .how-strip { margin-top: 23px; gap: 14px; }
  .how-strip > div { align-items: flex-start; gap: 8px; }
}
@media (max-width: 540px) {
  .game-shell { width: calc(100% - 24px); }
  .site-header { min-height: 59px; 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: 19px 2px 18px; align-items: flex-start; gap: 8px; }
  .page-heading .eyebrow { font-size: 7px; letter-spacing: 1px; }
  h1 { font-size: 43px; letter-spacing: -2px; margin-top: 4px; }
  .subtitle { font-size: 10px; max-width: 195px; margin-top: 7px; line-height: 1.6; }
  .stats { gap: 12px; padding-top: 8px; }
  .stats > div { gap: 0; }
  .stats > div + div { padding-left: 12px; }
  .stats .l { font-size: 6px; letter-spacing: .6px; margin-bottom: 5px; }
  .stats .v { font-size: 20px; }
  .mode-control { gap: 7px; }
  .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; }
  .console { gap: 10px; }
  .felt { border-radius: 14px; }
  .scoreboard { grid-template-columns: 1fr 75px 1fr; padding: 16px 17px 15px; gap: 14px; }
  .sb-name { font-size: 9px; }
  .sb-score { font-size: 30px; margin-bottom: 10px; }
  .active-label { display: none; }
  .sb-goal { font-size: 6px; }
  .sb-goal b { font-size: 18px; }
  .sb-goal > span { font-size: 6px; }
  .sb-goal.final b { font-size: 12px; }
  .table-body { padding: 14px 17px 20px; }
  .who { font-size: 10px; }
  .round-label { font-size: 7px; }
  .turn-pot { margin: 3px 0 4px; }
  .pot-label { font-size: 7px; }
  .pot-value b { font-size: 48px; }
  .selection-note { font-size: 9px; }
  .tray-heading > span { font-size: 7px; }
  #bestBtn { font-size: 9px; min-height: 38px; }
  .tray { min-height: 90px; }
  .die { border-radius: 10px; padding: 8px; }
  .die .pip { width: 8px; height: 8px; }
  .die .die-index { bottom: -20px; }
  .readout { font-size: 10px; min-height: 33px; margin-top: 5px; }
  .kept-row { min-height: 45px; gap: 10px; }
  .kept-label { font-size: 7px; letter-spacing: .5px; }
  .aside-tray { min-height: 43px; gap: 4px; }
  .aside-tray .die { width: 25px; height: 25px; padding: 3px; }
  .aside-tray .pip { width: 3px; height: 3px; }
  .tray-empty { font-size: 9px; }
  .hot { font-size: 7px; }
  .decision-line { font-size: 9px; margin-top: 13px; }
  #riskValue { font-size: 8px; }
  .controls { gap: 9px; }
  .controls button { font-size: 13px; min-height: 48px; }
  .table-caption { margin-top: 10px; min-height: 30px; }
  .table-caption p { font-size: 9px; }
  .quick-score summary { padding: 14px 17px; }
  .quick-score summary .eyebrow { font-size: 7px; }
  .guide-title { font-size: 17px; }
  .how-strip { grid-template-columns: 1fr; gap: 15px; padding: 21px 7px; margin-bottom: 30px; }
  .how-strip b { display: inline; margin-right: 4px; }
  .how-strip > div { gap: 12px; }
  .game-overview { padding: 0 7px; font-size: 12px; }
  .game-overview h2 { font-size: 24px; }
  .farkle-flash { inset: 106px 0 120px; }
  .farkle-flash strong { font-size: 50px; }
}
@media (max-width: 350px) {
  .game-shell { width: calc(100% - 16px); }
  .stats { flex-direction: column; align-items: flex-start; gap: 8px; }
  .stats > div + div { border: 0; padding: 0; }
  .stats .v { font-size: 16px; }
  .table-body { padding-left: 12px; padding-right: 12px; }
  .scoreboard { padding-left: 13px; padding-right: 13px; gap: 10px; }
  .hot { letter-spacing: -.4px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
/* Keep the entire decision within view on laptops and phones. */
[hidden] { display: none !important; }
@media (min-width: 901px) and (max-height: 1000px) {
  .site-header { min-height: 60px; }
  .page-heading { padding: 18px 0; }
  h1 { font-size: 46px; }
  .scoreboard { padding-top: 16px; padding-bottom: 16px; }
  .table-body { padding-top: 14px; padding-bottom: 21px; }
  .turn-pot { margin: 1px 0 3px; }
  .pot-value b { font-size: 50px; }
  .tray { min-height: 98px; }
  .readout { margin-top: 6px; min-height: 30px; }
  .aside-tray { min-height: 42px; }
  .kept-row { min-height: 45px; }
  .decision-line { margin-top: 13px; }
  .quick-score summary { padding-top: 18px; }
  .score-list > div { padding: 7px 0; }
  .guide-intro { margin-bottom: 13px; }
  .scoring-footnote { margin-bottom: 12px; }
  .hot-tip { padding: 10px; }
}
@media (max-width: 540px) {
  .page-heading { padding-top: 15px; padding-bottom: 15px; }
  .turn-pot { margin: 0; }
  .pot-value b { font-size: 44px; }
  .tray { min-height: 82px; }
  .aside-tray { min-height: 39px; }
  .kept-row { min-height: 41px; }
  .readout { min-height: 30px; }
  .table-body { padding-top: 12px; padding-bottom: 16px; }
  .scoreboard { padding-top: 13px; padding-bottom: 12px; }
  .decision-line { margin-top: 10px; }
}
@media (max-width: 540px) and (max-height: 740px) {
  .site-header { min-height: 48px; }
  .page-heading { padding: 10px 2px; }
  .page-heading .eyebrow, .subtitle { display: none; }
  h1 { font-size: 34px; }
  .stats { padding-top: 0; }
  .scoreboard { padding-top: 11px; padding-bottom: 10px; }
  .sb-score { font-size: 26px; margin-bottom: 7px; }
  .table-body { padding-top: 11px; }
  .pot-value b { font-size: 38px; }
  .selection-note { font-size: 8px; }
}
@media (min-width: 901px) and (max-height: 800px) {
  .site-header { min-height: 48px; }
  .page-heading { padding: 11px 0; }
  .page-heading .eyebrow { font-size: 7px; }
  h1 { font-size: 36px; }
  .subtitle { display: none; }
  .scoreboard { padding-top: 12px; padding-bottom: 12px; }
  .sb-score { font-size: 30px; margin-bottom: 8px; }
  .table-body { padding-top: 10px; padding-bottom: 17px; }
  .pot-value b { font-size: 42px; }
  .tray { min-height: 94px; }
  .aside-tray { min-height: 36px; }
  .kept-row { min-height: 39px; }
  .decision-line { margin-top: 10px; }
  .controls button { min-height: 46px; }
  .guide-intro { margin: 8px 0 10px; }
  .guide-title { font-size: 18px; max-width: none; }
  .score-list > div { padding: 6px 0; }
  .hot-tip { padding: 8px; }
  .keyboard-guide { padding-top: 12px; }
}
@media (max-width: 540px) and (max-height: 740px) {
  .turn-pot { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 3px 0; }
  .selection-note { display: none; }
  .pot-value { margin: 0; }
  .tray { min-height: 78px; }
  .aside-tray { min-height: 34px; }
  .kept-row { min-height: 36px; }
  .tray-heading { min-height: 28px; }
  #bestBtn { min-height: 30px; }
  .readout { min-height: 32px; }
  .table-body { padding-bottom: 14px; }
}
@media (max-width: 540px) and (max-height: 620px) {
  .site-header { min-height: 40px; }
  .page-heading { padding-top: 6px; padding-bottom: 6px; }
  h1 { font-size: 30px; }
  .stats { flex-direction: row; align-items: center; }
  .stats > div + div { padding-left: 8px; }
  .stats .v { font-size: 16px; }
  .scoreboard { padding-top: 8px; padding-bottom: 8px; }
  .sb-score { font-size: 24px; }
  .sb-goal b { font-size: 16px; }
  .pot-value b { font-size: 32px; }
  .decision-line { margin: 7px 0; }
  .controls button { min-height: 44px; }
}
.kept-row { flex-wrap: wrap; column-gap: 12px; row-gap: 0; }

.feedback-link { display: block; width: max-content; margin: 0 auto 30px; color: #73816e; font-size: 11px; text-decoration: none; }
.feedback-link:hover { color: #254b39; }

/* Phones: the desktop micro-labels (6-10px) are too small to read or tap at phone size. */
@media (max-width: 540px) {
  .back-link, .text-button { font-size: 13px; }
  .l, .eyebrow, .sb-goal, .round-label, .pot-label, .kept-label, .tray-heading span { font-size: 9.5px; }
  .sb-name, .who { font-size: 12px; }
  .tray-heading button { font-size: 12px; }
  .die-index { font-size: 11px; }
  .readout, .tray-empty, .decision-line, .table-caption { font-size: 12.5px; }
  .cheat dt, .cheat dd, dl dt, dl dd { font-size: 12px; }
  dl small { font-size: 10.5px; }
}
