/* Domino — table, controls, verification. Original CSS pixel artwork. */
:root {
  color-scheme: dark;
  --bg: #171f24;
  --panel: #202b2d;
  --line: #3d4d43;
  --text: #e7e7d5;
  --muted: #a2b1a1;
  --gold: #e3c080;
  --cream: #f1e5c9;
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { min-width: 340px; min-height: 100%; background: var(--bg); }
body { margin: 0; color: var(--text); font-size: 14px; line-height: 1.6; background: radial-gradient(ellipse at 35% 0, #2b3a3240, transparent 65%), var(--bg); }
h1, h2, h3, h4, p { margin: 0; }
button, input, select { font: inherit; }
button { color: inherit; cursor: pointer; border-radius: 2px; -webkit-tap-highlight-color: transparent; }
button, input, select, a, summary { touch-action: manipulation; outline-offset: 4px; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #f1d39a; }
::selection { color: #18342b; background: var(--gold); }
button:not(:disabled) { transition: background-color .13s, border-color .13s, transform .13s, box-shadow .13s; }
button:not(:disabled):active { transform: translateY(2px); }
.app-shell { width: min(1340px, calc(100% - 56px)); margin: 0 auto; }
.topbar { height: 80px; display: flex; align-items: center; gap: 36px; border-bottom: 1px solid #344039; }
.brand { display: flex; align-items: center; gap: 13px; }
.brand b { color: #f0dfbb; font-size: 22px; letter-spacing: 3px; font-weight: 600; }
.brand-icon { width: 24px; height: 39px; display: block; position: relative; transform: rotate(-11deg); border: 2px solid #edd294; background: #edd294; box-shadow: 3px 3px 0 #0a1519; }
.brand-icon::before { content: ''; position: absolute; left: 2px; right: 2px; top: 17px; height: 2px; background: #8c7951; }
.brand-icon i { position: absolute; width: 5px; height: 5px; background: #343c39; }
.brand-icon i:nth-child(1) { top: 5px; left: 8px; }.brand-icon i:nth-child(2) { top: 22px; left: 3px; }.brand-icon i:nth-child(3) { bottom: 3px; right: 3px; }
.topnav { margin-left: auto; display: flex; gap: 24px; }
.nav-button { padding: 8px 0; border: 0; background: none; font-size: 14px; color: #b4c0ae; }
.nav-button:hover { color: #f4dfaf; }
.account-actions { display: flex; gap: 20px; align-items: center; }
.wallet { display: flex; gap: 9px; align-items: center; background: #27332e; border: 1px solid #4b5743; padding: 8px 13px; }
.wallet:hover { background: #344334; border-color: #93865e; }
.wallet > span:not(.coin-icon) { color: #ead7a7; font: 600 15px var(--mono); }
.wallet small { color: #b0b9a0; font-size: 12px; }
.coin-icon { position: relative; display: inline-block; width: 15px; height: 17px; border: 2px solid #e9c782; background: #b18b4d; box-shadow: 2px 0 0 #756338; }
.coin-icon::after { content: ''; position: absolute; top: 3px; bottom: 3px; left: 5px; width: 2px; background: #f1d696; }
.icon-button { display: grid; place-items: center; width: 34px; height: 36px; border: 0; background: none; color: #acb9a5; }
.icon-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.icon-button:hover { color: #ebcc8e; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 264px; gap: 28px; padding: 26px 0 28px; align-items: start; }
.game-column { min-width: 0; }
.table-heading { display: flex; align-items: center; justify-content: space-between; min-height: 34px; margin-bottom: 14px; gap: 16px; }
.table-heading h1 { color: #dfe5ce; font-size: 19px; font-weight: 500; letter-spacing: .6px; display: flex; align-items: center; gap: 12px; }
.subtle-badge { color: #b1c2a2; border: 1px solid #435844; background: #25382c; padding: 2px 8px; font-size: 12px; letter-spacing: 0; font-weight: 400; }
.table-tools { display: flex; align-items: center; gap: 18px; }
.tool-button { display: inline-flex; align-items: center; gap: 6px; color: #a8baa0; background: none; border: 0; padding: 5px 0; font-size: 19px; line-height: 1.4; }
.tool-button span { color: #acbba5; font-size: 12px; }
.tool-button[aria-pressed='true'] { color: #e4ca8f; }
.tool-button:hover, .tool-button:hover span { color: #f2d59a; }
.table-frame { padding: 7px; position: relative; background: #56503b; border: 1px solid #8e7d59; box-shadow: inset 0 0 0 2px #2e382b, inset 0 0 0 4px #6e6042, 0 5px 0 #0d191b, 0 18px 45px #09131244; }
.table-frame::before, .table-frame::after { content: ''; position: absolute; top: 2px; z-index: 5; width: 3px; height: 3px; background: #b8a783; pointer-events: none; }.table-frame::before { left: 2px; }.table-frame::after { right: 2px; }
.table-topline { min-height: 34px; display: flex; align-items: center; justify-content: space-between; padding: 5px 21px; gap: 10px; color: #b4c3a3; background: #1c3d31; font-size: 12px; }
.table-topline .quiet-button { font-size: 12px; color: #acbc9f; }
.scoreboard { display: flex; align-items: center; position: relative; min-height: 85px; padding: 13px 22px; border-top: 1px solid #5a725240; border-bottom: 1px solid #a2b47a22; background: #224a3a; }
.score-player { display: flex; align-items: center; gap: 12px; min-width: 140px; width: 34%; }
.score-player strong { display: block; color: #eee4c7; font-size: 15px; font-weight: 500; }
.score-player small { display: block; color: #aac19c; font-size: 12px; margin-top: 3px; }
.avatar { position: relative; width: 40px; height: 40px; background: #d4ba7e; border: 2px solid #d7c899; box-shadow: 2px 2px 0 #15382d; flex: 0 0 auto; overflow: hidden; image-rendering: pixelated; }
.avatar.fox::before { content: ''; position: absolute; width: 4px; height: 4px; top: 5px; left: 4px; background: #975636; box-shadow: 4px 0 #975636, 20px 0 #975636, 24px 0 #975636, 0 4px #975636, 4px 4px #e8bd8b, 8px 4px #ba6a3e, 16px 4px #ba6a3e, 20px 4px #e8bd8b, 24px 4px #975636, 0 8px #bb703f, 4px 8px #c6814b, 8px 8px #c6814b, 12px 8px #c6814b, 16px 8px #c6814b, 20px 8px #c6814b, 24px 8px #bb703f, 0 12px #c6814b, 4px 12px #342e25, 8px 12px #d58f52, 12px 12px #d58f52, 16px 12px #d58f52, 20px 12px #342e25, 24px 12px #c6814b, 0 16px #ead0a0, 4px 16px #ead0a0, 8px 16px #ead0a0, 12px 16px #d68f52, 16px 16px #ead0a0, 20px 16px #ead0a0, 24px 16px #ead0a0, 4px 20px #e7d3a5, 8px 20px #e7d3a5, 12px 20px #332d25, 16px 20px #e7d3a5, 20px 20px #e7d3a5, 8px 24px #e7d3a5, 12px 24px #e7d3a5, 16px 24px #e7d3a5; }
.score-display { display: flex; align-items: center; justify-content: center; gap: 18px; position: absolute; left: 50%; top: 9px; transform: translateX(-50%); padding-bottom: 22px; }
.score-display > strong { min-width: 28px; color: #eedeb2; text-align: center; font: 600 30px/1.4 var(--mono); text-shadow: 2px 2px #153b2b; }
.score-display > span { color: #8ba581; font: 22px var(--mono); }
.score-display > small { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); color: #acc299; font-size: 11px; white-space: nowrap; }
.opponent-hand { display: flex; align-items: center; justify-content: flex-end; gap: 3px; margin-left: auto; max-width: 31%; padding-bottom: 3px; }
.tile-back { width: 18px; height: 33px; flex: 0 1 18px; min-width: 5px; border: 2px solid #cabb91; background: repeating-linear-gradient(45deg, #a39677 0 2px, #bbae8a 2px 4px); box-shadow: 1px 2px #15372a; }
.opponent-hand > small { white-space: nowrap; font-size: 12px; color: #aebc98; margin-left: 7px; }
.felt { position: relative; isolation: isolate; min-height: 280px; height: clamp(280px, calc(100vh - 484px), 425px); overflow: hidden; background: radial-gradient(ellipse at 50% 43%, #40846365, transparent 75%), repeating-linear-gradient(0deg, #0f3d2815 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, #bfd59a04 0 1px, transparent 1px 3px), #285f43; box-shadow: inset 10px 0 25px #103c2525, inset -10px 0 25px #103c2525; }
.felt::after { content: ''; position: absolute; inset: 12px; border: 1px solid #afbe7830; z-index: -1; pointer-events: none; }
.corner-deco { position: absolute; width: 18px; height: 18px; border: 2px solid #aaba7855; pointer-events: none; }
.corner-deco::after { content: ''; position: absolute; width: 4px; height: 4px; background: #aaba7860; }
.corner-tl { top: 18px; left: 18px; border-width: 2px 0 0 2px; }.corner-tl::after { top: 4px; left: 4px; }
.corner-tr { top: 18px; right: 18px; border-width: 2px 2px 0 0; }.corner-tr::after { top: 4px; right: 4px; }
.corner-bl { bottom: 18px; left: 18px; border-width: 0 0 2px 2px; }.corner-bl::after { bottom: 4px; left: 4px; }
.corner-br { bottom: 18px; right: 18px; border-width: 0 2px 2px 0; }.corner-br::after { bottom: 4px; right: 4px; }
.felt-watermark { width: 56px; height: 94px; border: 3px solid #b9ce86; position: absolute; left: 50%; top: 47%; transform: translate(-50%, -50%) rotate(-15deg); opacity: .07; pointer-events: none; z-index: -1; }
.felt-watermark::before { content: ''; position: absolute; left: 5px; right: 5px; top: 42px; height: 2px; background: #b9ce86; }
.felt-watermark::after { content: ''; position: absolute; top: 18px; left: 22px; width: 7px; height: 7px; background: #b9ce86; box-shadow: -10px 41px #b9ce86, 10px 57px #b9ce86; }
#board-svg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; overflow: visible; }
#board-svg:empty { pointer-events: none; }
#board-svg text { font-family: inherit; }
.empty-table, .waiting-room { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; padding: 24px; }
.hero-bones { display: flex; align-items: center; gap: 14px; transform: rotate(-8deg); margin-bottom: 31px; }
.hero-bones .domino { --tile-width: 47px; pointer-events: none; }
.hero-bones .domino:first-child { transform: rotate(-12deg) translateY(7px); }.hero-bones .domino:last-child { transform: rotate(17deg) translateY(2px); }
.empty-table h3, .waiting-room h3 { font-size: 21px; font-weight: 500; color: #f0e7c9; }
.empty-table p, .waiting-room p { font-size: 14px; color: #b6cda6; margin-top: 16px; }
.empty-table h3:not([hidden]) { margin-bottom: 14px; }
.room-code { color: #f1d699; border: 1px dashed #9ab77d; background: #214834; padding: 11px 17px 11px 24px; font: 600 29px var(--mono); letter-spacing: 7px; margin-top: 12px; }
.waiting-room small { font-size: 12px; margin-top: 14px; color: #a5bd99; max-width: 95%; overflow-wrap: anywhere; }
.board-ends { position: absolute; left: 27px; right: 27px; bottom: 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; z-index: 3; }
.end-button { border: 1px dashed #8da867; background: #244d35f2; color: #d9e1b4; padding: 9px 14px; min-height: 39px; font-size: 13px; box-shadow: 0 2px 0 #163c28; }
.end-button.available { color: #f2dda2; border-color: #e1d18b; border-style: solid; box-shadow: 0 0 0 2px #c8c18515, 0 3px 0 #183c26; }
.end-button:hover:not(:disabled), .end-button.drag-over { background: #e6c581; color: #2c402a; border-color: #f5deb0; }
.end-button:disabled { opacity: .32; }
.placement-preview { color: #b8cca4; font-size: 12px; text-align: center; }
.turn-strip { min-height: 43px; display: flex; align-items: center; gap: 10px; padding: 9px 22px; border-top: 1px solid #76926166; background: #1c422f; }
.turn-indicator { width: 6px; height: 6px; flex: 0 0 6px; background: #8ca77d; box-shadow: 0 0 0 3px #a1b67a12; }
.turn-indicator.my-turn { background: #ead48a; box-shadow: 0 0 0 3px #ead48a1f; }
.turn-strip strong { color: #dfe4c2; font-size: 14px; font-weight: 500; }
#stock-label { font-size: 12px; color: #a5bc94; margin-left: auto; white-space: nowrap; }
.hand-area { background: linear-gradient(180deg, #2a4c36, #24442f); padding: 13px 22px 16px; }
.hand-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; min-height: 34px; }
.self-label { display: flex; align-items: center; gap: 9px; min-width: 0; }
.mini-avatar { display: block; position: relative; width: 26px; height: 26px; background: #b9c399; border: 1px solid #d6d9b2; box-shadow: 1px 2px 0 #173824; }
.mini-avatar::before { content: ''; position: absolute; left: 6px; top: 7px; width: 3px; height: 3px; background: #43533a; box-shadow: 9px 0 #43533a, 2px 7px #43533a, 5px 7px #43533a, 8px 7px #43533a; }
.self-label strong { color: #e4e6ca; font-size: 14px; font-weight: 500; max-width: 90px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#hand-count { color: #aabd98; font-size: 12px; margin-left: 5px; }
.hand-actions { display: flex; align-items: center; gap: 18px; }
.hand-actions .secondary-button { min-height: 33px; padding: 4px 18px; }
.quiet-button { color: #b2c2a0; background: none; border: 0; padding: 6px 0; font-size: 12px; white-space: nowrap; }
.quiet-button:hover:not(:disabled) { color: #f0d599; }
.hand-tiles { min-height: 129px; display: flex; align-items: flex-end; justify-content: center; gap: 11px; overflow-x: auto; overflow-y: hidden; padding: 19px 2px 8px; scrollbar-width: thin; scrollbar-color: #859664 #24442f; }
.hand-tiles:has(.domino:nth-child(12)) { justify-content: flex-start; }
.hand-placeholder { align-self: center; text-align: center; color: #98b18399; font-size: 14px; padding: 24px 0; width: 100%; }
.hand-caption { color: #a9be97; font-size: 12px; margin-top: 8px; text-align: center; }
.domino { --tile-width: 48px; position: relative; display: inline-flex; flex: 0 0 auto; flex-direction: column; width: var(--tile-width); padding: 2px; border: 1px solid #fff2cc; border-radius: 3px; background: #f0e5c9; box-shadow: inset 0 0 0 1px #d5c8a5, 0 3px 0 #b5a98d, 1px 5px 0 #12291f99; color: #344438; vertical-align: middle; user-select: none; }
.pip-half { display: grid; grid-template: repeat(3, minmax(0, 1fr)) / repeat(3, minmax(0, 1fr)); width: 100%; aspect-ratio: 1; flex: 0 0 auto; padding: 6px; gap: 2px; }
.pip { display: block; aspect-ratio: 1; background: transparent; border-radius: 1px; min-width: 0; }
.pip.on { background: #344437; box-shadow: 0 1px 0 #17261d22; }.pip.off { background: transparent; box-shadow: none; }
.tile-divider { display: block; flex: 0 0 1px; width: calc(100% - 8px); height: 1px; margin: 1px 4px; background: #b9af91; box-shadow: 0 1px 0 #fff9de99; }
.domino.horizontal { width: calc(var(--tile-width) * 2); flex-direction: row; }
.domino.horizontal .tile-divider { width: 1px; height: auto; align-self: stretch; margin: 4px 1px; box-shadow: 1px 0 0 #fff9de99; }
.domino.horizontal .pip-half { width: calc((100% - 3px) / 2); }
.domino.mini { --tile-width: 29px; padding: 1px; border-radius: 2px; box-shadow: 0 2px 0 #aa9b79, 1px 3px 0 #15241d66; }
.domino.mini .pip-half { padding: 3px; gap: 1px; }.domino.mini .pip { border-radius: 0; }
.domino.mini .tile-divider { width: calc(100% - 6px); margin: 0 3px; }
.domino.mini.horizontal .tile-divider { width: 1px; margin: 3px 0; }.domino.mini.horizontal .pip-half { width: calc((100% - 1px) / 2); }
.domino.hand-tile { --tile-width: 48px; touch-action: none; }
.domino.hand-tile:hover:not(:disabled) { transform: translateY(-5px); background: #fff0ca; }
.domino.hand-tile.playable { border-color: #f4dfa1; }
.domino.hand-tile.playable::after { content: ''; position: absolute; width: 4px; height: 4px; left: calc(50% - 2px); bottom: -10px; background: #dace8c; opacity: .8; }
.domino.hand-tile.unplayable { opacity: .54; }
.domino.hand-tile.selected { opacity: 1; transform: translateY(-9px); background: #fff0c5; border-color: #fff0b8; box-shadow: 0 0 0 2px #dec278, 0 0 0 4px #dec2781c, 0 3px 0 #bba772, 1px 6px 0 #13271d88; }
.domino.hand-tile.selected:hover:not(:disabled) { transform: translateY(-9px); }
.domino.dragging { opacity: .3; }
.sidebar { min-width: 0; padding-top: 48px; }
.setup-panel { background: #222e2b; border: 1px solid #465341; box-shadow: 0 3px 0 #101b1d; }
.setup-panel > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 18px; color: #e2ddc2; font-size: 16px; font-weight: 500; cursor: pointer; list-style: none; }
.setup-panel > summary::-webkit-details-marker { display: none; }
.setup-panel > summary > span { color: #8b9c7d; font-size: 16px; transform: rotate(-90deg); }
.setup-panel[open] > summary > span { transform: rotate(0); }
.setup-content { padding: 0 18px 20px; }
.mode-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid #4c5943; margin-bottom: 20px; }
.mode-card { min-height: 39px; padding: 7px 0; border: 0; background: #1a2623; border-radius: 0; color: #a9b69d; }
.mode-card + .mode-card { border-left: 1px solid #4c5943; }
.mode-card strong { font-size: 14px; font-weight: 400; }
.mode-card:hover { background: #314532; color: #e4debc; }
.mode-card.selected { background: #586747; color: #f0e5ba; box-shadow: inset 0 -2px #cbbd7f; }
.setup-fields { display: grid; gap: 13px; margin-bottom: 22px; }
.setup-fields label { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 10px; align-items: center; font-size: 13px; color: #b3c0a4; }
select { width: 100%; min-height: 38px; appearance: none; border: 1px solid #526248; padding: 8px 28px 8px 11px; border-radius: 2px; color: #e0e2c6; background: linear-gradient(45deg, transparent 50%, #afba99 50%) calc(100% - 15px) 17px / 4px 4px no-repeat, linear-gradient(135deg, #afba99 50%, transparent 50%) calc(100% - 11px) 17px / 4px 4px no-repeat, #1c2a23; font-size: 14px; cursor: pointer; }
select:hover { border-color: #a7b380; }select:disabled { opacity: .5; }select option { background: #24382a; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 20px; min-height: 43px; border: 1px solid #f4daa3; border-bottom-color: #a58b55; padding: 9px 19px; background: #e3c080; color: #303f2e; font-size: 15px; font-weight: 600; box-shadow: 0 3px 0 #847246, 0 5px 0 #14271f; }
.primary-button span { font-size: 19px; }
.primary-button:hover:not(:disabled) { background: #f1d49a; border-color: #fbe4b4; }
.primary-button:active:not(:disabled) { box-shadow: 0 1px 0 #847246, 0 2px 0 #14271f; }.primary-button:disabled { opacity: .45; box-shadow: none; }
.start-button { width: 100%; font-size: 14px; padding-inline: 12px; justify-content: space-between; }
.secondary-button { display: inline-flex; justify-content: center; align-items: center; min-height: 40px; padding: 8px 15px; border: 1px solid #718363; color: #dce4c9; background: #344e36; box-shadow: 0 2px 0 #162b20; font-size: 14px; }
.secondary-button:hover:not(:disabled) { background: #4b6543; border-color: #a3b586; }
.secondary-button:disabled { opacity: .5; background: #2a4331; box-shadow: none; }
#join-button { width: 100%; margin-top: 14px; }
.proof-card { margin-top: 23px; padding: 18px; border: 1px solid #697359; background: #2a352b; box-shadow: 0 3px 0 #111d1c; }
.proof-card-heading { display: flex; align-items: center; gap: 9px; }
.proof-card-heading svg { width: 20px; height: 22px; fill: none; stroke: #c6c99c; stroke-width: 1.5; flex-shrink: 0; }
.proof-card h2 { font-size: 16px; font-weight: 500; color: #e6e4c5; }
#proof-status { color: #adbea0; font-size: 13px; line-height: 1.7; margin: 10px 0 0; }
#score-proof-summary { color: #ded2a6; font-size: 13px; margin: 9px 0 0; }
.proof-card-actions { display: grid; gap: 9px; margin-top: 17px; }
.proof-button { min-height: 41px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 12px; border: 1px solid #778063; background: #33432f; color: #e4e5c6; font-size: 14px; text-align: left; }
.proof-button > span:last-child { color: #b7c399; }
.proof-button:hover:not(:disabled) { background: #4b5a3d; border-color: #b0b98c; }
.proof-button:disabled { opacity: .45; }
.sidebar-bottom { display: flex; gap: 8px; align-items: center; margin: 19px 2px 0; font-size: 12px; color: #849c85; }
.status-dot { width: 5px; height: 5px; background: #8ead74; flex: 0 0 5px; }
.connection-lost .status-dot { background: #d69a75; }.connection-lost .sidebar-bottom { color: #d2ad8c; }
.request-busy #start-button, .request-busy #draw-button, .request-busy #join-button { cursor: progress; }
#toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); max-width: min(92vw, 540px); z-index: 100; border: 2px solid #f3e4b8; padding: 13px 20px; background: #e5d9b3; color: #35462f; box-shadow: 4px 4px 0 #07131699; font-size: 14px; text-align: center; }
/* Dialogs: one heading, a result, then details. */
dialog { width: min(580px, calc(100% - 32px)); max-height: calc(100dvh - 48px); padding: 29px; overflow-y: auto; border: 2px solid #9b9570; border-radius: 2px; background: #23302a; color: #e4e6cf; box-shadow: inset 0 0 0 3px #344332, 5px 6px 0 #0b171bad, 0 20px 80px #07131b55; scrollbar-width: thin; scrollbar-color: #7f916b #23302a; }
dialog::backdrop { background: #091418d9; backdrop-filter: blur(3px); }
.modal-close { position: absolute; top: 13px; right: 13px; width: 30px; height: 30px; padding: 0; color: #b3c0a0; background: none; border: 0; font: 27px/1 var(--mono); }
.modal-close:hover { color: #f2d797; }
.modal-eyebrow { display: none; }
.modal-title { color: #ede4c3; font-size: 23px; font-weight: 600; line-height: 1.45; padding-right: 26px; margin-bottom: 18px; }
.modal-copy { color: #b6c6ac; font-size: 14px; line-height: 1.8; margin: 15px 0 20px; }
.modal-copy p + p { margin-top: 13px; }
.modal-copy strong { color: #e5d5a1; font-weight: 500; }
.modal-copy ul, .modal-copy ol { padding-left: 21px; margin: 12px 0; }.modal-copy li { margin: 6px 0; }
.modal-footnote { color: #91a688; font-size: 12px; line-height: 1.7; margin: 18px 0 0; }
.text-button { display: block; margin: 16px auto 0; padding: 5px 8px; border: 0; background: transparent; color: #b5c4a5; font: inherit; font-size: 12px; cursor: pointer; }
.text-button:hover { color: #f0deae; }
.text-button:focus-visible { outline: 2px solid #d8c08a; outline-offset: 3px; }
.field-row { display: grid; gap: 8px; margin: 19px 0; color: #c6ceb3; font-size: 14px; }
.field-row input, dialog input[type='text'], dialog input:not([type]) { width: 100%; min-height: 44px; border: 1px solid #758466; border-radius: 2px; padding: 10px 12px; background: #17281f; color: #eddfb8; font-size: 15px; }
input::placeholder { color: #81967b; }
.choice-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 23px; }
.choice-row > button { flex: 1; min-height: 43px; }
.danger-button { min-height: 41px; padding: 8px 15px; border: 1px solid #987858; color: #edc9ad; background: #5b4235; font-size: 14px; box-shadow: 0 2px 0 #1a2a20; }.danger-button:hover { background: #77523e; }
#modal-content > .primary-button, #modal-content > .secondary-button { margin-top: 10px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.detail-box { border: 1px solid #536849; background: #1b3022; padding: 15px; color: #b2c3a2; font-size: 13px; }
.detail-box strong { display: block; font: 600 25px var(--mono); color: #e5ce94; margin-top: 8px; }.detail-box small { color: #9bb08e; font-size: 12px; }
.result-header { text-align: center; margin-bottom: 22px; }
.result-score { display: flex; align-items: center; justify-content: center; gap: 28px; color: #e9d5a4; font: 600 34px var(--mono); margin: 22px 0; }
.result-score > div { min-width: 75px; display: grid; justify-items: center; gap: 8px; }.result-score > div small { color: #b0c19d; font: 13px/1.5 -apple-system, BlinkMacSystemFont, 'PingFang SC', sans-serif; }.result-score > div b { font: 600 35px var(--mono); }.result-score > span { color: #8b9e7c; padding-top: 23px; }
.result-hands { display: block; border: 1px solid #536b47; background: #1b3724; padding: 2px 16px; margin: 17px 0; }
.result-hands > section { padding: 14px 0; }.result-hands > section + section { border-top: 1px dashed #496843; }
.result-hands > section > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #c2d0ac; font-size: 13px; margin-bottom: 12px; }.result-hands strong { font-weight: 500; }.result-hands > section > div:first-child > span { color: #ead7a2; font-family: var(--mono); }
.mini-hand { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; padding-bottom: 3px; }.mini-hand > small { font-size: 13px; color: #b0caa0; }
.settlement-note { padding: 12px 15px; border-left: 2px solid #b6ac76; background: #34402d; color: #c0c9a6; font-size: 13px; line-height: 1.8; margin: 19px 0; }.settlement-note strong { display: block; color: #e9d59e; margin-top: 4px; font-size: 14px; font-weight: 500; }
.wallet-balance { padding: 20px; margin: 22px 0 18px; border: 1px solid #566345; background: #1b2e21; color: #f1d28c; font: 600 32px/1.4 var(--mono); }.wallet-balance small { margin-left: 5px; color: #b4c0a0; font: 13px -apple-system, BlinkMacSystemFont, 'PingFang SC', sans-serif; }
.journal-title { margin: 27px 0 9px; color: #dce0c2; font-size: 16px; font-weight: 500; }
.ledger-row { display: flex; align-items: center; gap: 15px; padding: 14px 0; border-bottom: 1px solid #42543d; font-size: 13px; }.ledger-row > div { flex: 1; min-width: 0; }.ledger-row strong { font-weight: 500; color: #ccd6ba; }.ledger-row small { display: block; margin-top: 4px; color: #91a787; font-size: 12px; }.ledger-row > b { min-width: 45px; text-align: right; font: 600 14px var(--mono); }.ledger-row > span { color: #9aaf8d; font-size: 12px; min-width: 72px; text-align: right; }
.positive { color: #c2d798 !important; }.negative { color: #d7a184 !important; }
.check-row { display: flex; align-items: center; gap: 11px; margin: 22px 0; color: #c7d2b7; font-size: 14px; }.check-row input { width: 18px; height: 18px; margin: 0; accent-color: #c4c78b; }#settings-form > .primary-button { margin-top: 9px; }
.rule-steps { display: grid; gap: 20px; margin: 23px 0; }.rule-steps > section { display: flex; gap: 13px; }.rule-steps > section > b { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; color: #d6c994; border: 1px solid #647353; background: #31412e; font: 13px var(--mono); }.rule-steps h3 { font-size: 15px; font-weight: 500; color: #dce1c2; margin-bottom: 7px; }.rule-steps p { font-size: 13px; color: #b1c4a5; line-height: 1.8; }
.history-round { margin-top: 14px; padding: 15px; border: 1px solid #52674a; background: #1d3123; font-size: 13px; color: #bdd0ad; }.history-round summary { color: #d9ddbd; cursor: pointer; }.history-round summary > span { float: right; color: #e1cd98; font-family: var(--mono); }.history-round[open] summary { margin-bottom: 15px; }.history-round > p { font-size: 13px; line-height: 1.8; }.history-round > small { display: block; margin: 13px 0 5px; color: #97ab8b; font-size: 12px; }.history-round code { display: block; word-break: break-all; color: #bacc9f; background: #15271a; padding: 11px; font: 12px/1.7 var(--mono); }.history-round .result-hands { border: 0; border-top: 1px solid #425d3c; padding: 0; margin-bottom: 0; background: none; }
.log-full { padding-left: 21px; color: #b1c6a3; font-size: 13px; line-height: 1.9; }.log-full li { margin-bottom: 6px; padding-left: 4px; }.log-full li::marker { color: #849c75; font: 12px var(--mono); }
.empty-note { text-align: center; padding: 28px 18px; border: 1px dashed #5b714f; background: #1e3424; color: #b2c5a3; font-size: 14px; line-height: 1.8; }
/* Verification: readable outcome first; technical values stay in details. */
.proof-workspace { display: grid; gap: 17px; min-width: 0; }
.proof-context { padding-right: 22px; display: flex; align-items: center; justify-content: space-between; gap: 15px; flex-wrap: wrap; color: #c4d0b1; font-size: 14px; }.proof-context strong, .proof-context h3 { color: #eee1b9; font-size: 18px; font-weight: 600; }.proof-context small { color: #9dae8b; font-size: 12px; }
.proof-context .modal-title { margin: 0; padding: 0; font-size: 23px; }
.proof-round-select { width: auto; min-width: 110px; max-width: 200px; margin: 0; }.proof-round-select select { margin: 0; }.proof-round-select label { display: flex; gap: 10px; align-items: center; }
.proof-tabs { display: flex; gap: 0; border-bottom: 1px solid #607451; margin-bottom: 3px; }.proof-tabs button { flex: 1; border: 0; border-bottom: 2px solid transparent; background: none; color: #acbf9d; min-height: 43px; padding: 9px 12px; font-size: 14px; }.proof-tabs button.active, .proof-tabs button[aria-selected='true'] { color: #e9d49a; border-bottom-color: #dec48b; background: #34442e; }
.proof-verdict { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 12px; padding: 16px; border: 1px solid #657651; background: #2c4129; color: #d5e2bb; font-size: 15px; }.proof-verdict > span { font-size: 22px; }.proof-verdict strong { font-size: 18px; line-height: 1.4; font-weight: 600; }.proof-verdict p, .proof-verdict small { width: 100%; color: #bdcfaa; font-size: 13px; line-height: 1.7; }.proof-verdict.passed { border-color: #80945e; background: #2d452a; color: #ddecbd; }.proof-verdict.failed { border-color: #a07657; background: #49362a; color: #f0c4a5; }.proof-verdict.failed p, .proof-verdict.failed small { color: #e0b598; }
.proof-equation { display: grid; gap: 9px; padding: 18px; background: #182d1f; border: 1px solid #5d704b; color: #ddd9b5; font-size: 14px; }.proof-equation strong, .proof-equation b { color: #edd699; }.proof-equation > strong { font: 600 25px/1.6 var(--mono); overflow-wrap: anywhere; color: #f1d59b; }
.proof-equation code { display: block; color: #f0dfb7; font: 600 23px/1.6 var(--mono); overflow-wrap: anywhere; }.proof-equation code strong { color: #f0cc7f; font-size: 27px; }.proof-equation small, .proof-equation em { font-size: 12px; color: #a4b995; font-style: normal; }
#score-check-result, #fairness-result { display: grid; gap: 16px; min-width: 0; }
#score-check-result:empty, #fairness-result:empty { display: none; }
#score-check-result > .result-hands { margin: 0; }
.proof-workspace > .choice-row { margin-top: 0; }
.proof-workspace > .result-hands { margin: 0; }.proof-help { color: #aabd99; font-size: 13px; line-height: 1.75; }.proof-help p + p { margin-top: 10px; }
.proof-stat { min-width: 0; padding: 14px; background: #203622; border: 1px solid #536b46; color: #b8caa4; font-size: 13px; }.proof-stat strong { display: block; color: #e5d09a; font: 600 25px var(--mono); margin-top: 7px; }.proof-stat small { display: block; color: #a4b793; font-size: 12px; margin-top: 5px; }
.proof-details { margin-top: 1px; padding-top: 13px; border-top: 1px solid #516348; min-width: 0; }.proof-details > summary { color: #c1ccae; font-size: 13px; cursor: pointer; padding: 3px 0; }.proof-details[open] > summary { margin-bottom: 14px; }.proof-details p { color: #acbf9b; font-size: 13px; line-height: 1.8; margin: 11px 0; }.proof-details code, .proof-details pre { color: #d1d4af; font: 12px/1.8 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-all; }.proof-details > pre { padding: 12px; background: #16281b; border: 1px solid #415739; }
.proof-fingerprints { display: grid; gap: 10px; min-width: 0; padding: 13px; border: 1px solid #526449; background: #1a2c1d; }.proof-fingerprints > div { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: start; gap: 12px; min-width: 0; }.proof-fingerprints span, .proof-fingerprints small { color: #a5bb95; font-size: 12px; }.proof-fingerprints code { color: #d7d3a6; font: 12px/1.8 var(--mono); overflow-wrap: anywhere; word-break: break-all; }.proof-fingerprints > b { color: #c1d895; font-size: 13px; font-weight: 500; }.proof-fingerprints .different { color: #e6b28d; }
.proof-fingerprint-short { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 15px; background: #1b2e20; border: 1px solid #536547; min-width: 0; }
.proof-fingerprint-short > span { color: #aabd9c; font-size: 13px; white-space: nowrap; }
.proof-fingerprint-short > code { color: #dcd5a7; font: 12px/1.8 var(--mono); overflow-wrap: anywhere; min-width: 0; }
.proof-external { width: fit-content; padding: 3px 0; border: 0; background: none; color: #c2d29f; font-size: 13px; text-decoration: underline; text-decoration-color: #829568; text-underline-offset: 5px; }
.proof-external:hover { color: #eddda8; }
.proof-history { display: grid; gap: 9px; margin-bottom: 20px; }
.history-row { width: 100%; min-height: 53px; display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #52694a; background: #203723; text-align: left; font-size: 14px; color: #b9cba8; }
.history-row > strong { color: #e6d19a; font-weight: 500; }
.history-row > span:last-child { color: #bbce9e; font-size: 13px; }
.history-row:hover { background: #344d2e; border-color: #8c9c6e; }
#modal-content table { width: 100%; border-collapse: collapse; color: #bfd0ac; font-size: 13px; }#modal-content td, #modal-content th { text-align: left; padding: 9px; border-bottom: 1px solid #4c6342; }#modal-content th { color: #e2dab4; font-weight: 500; }
@media (max-width: 1100px) {
  .app-shell { width: calc(100% - 36px); }
  .workspace { grid-template-columns: minmax(0, 1fr) 238px; gap: 20px; }
  .setup-panel > summary, .setup-content, .proof-card { padding-left: 15px; padding-right: 15px; }
  .scoreboard, .table-topline, .hand-area, .turn-strip { padding-left: 17px; padding-right: 17px; }
  .tile-back { width: 13px; height: 27px; flex-basis: 13px; }
  .opponent-hand { gap: 2px; }.opponent-hand > small { margin-left: 4px; }
  .domino.hand-tile { --tile-width: 44px; }.hand-tiles { gap: 9px; }
  .hand-tiles:has(.domino:nth-child(10)) { justify-content: flex-start; }
}
@media (min-width: 851px) and (max-height: 800px) {
  .topbar { height: 64px; }.brand b { font-size: 20px; }.brand-icon { transform: rotate(-11deg) scale(.87); }
  .workspace { padding-top: 17px; padding-bottom: 19px; }
  .table-heading { min-height: 32px; margin-bottom: 12px; }.table-heading h1 { font-size: 18px; }.sidebar { padding-top: 44px; }
  .table-topline { min-height: 29px; padding-top: 3px; padding-bottom: 3px; }
  .scoreboard { min-height: 71px; padding-top: 10px; padding-bottom: 10px; }.score-display { top: 6px; padding-bottom: 20px; }.score-display > strong { font-size: 26px; }.score-display > small { font-size: 11px; }
  .felt { min-height: 224px; height: clamp(224px, calc(100vh - 468px), 315px); }
  .turn-strip { min-height: 39px; padding-top: 8px; padding-bottom: 8px; }.turn-strip strong { font-size: 13px; }
  .hand-area { padding-top: 10px; padding-bottom: 12px; }.hand-heading { min-height: 30px; }.hand-tiles { min-height: 116px; padding-top: 16px; padding-bottom: 7px; }.domino.hand-tile { --tile-width: 44px; }.hand-placeholder { padding: 20px 0; }
  .hero-bones { margin-bottom: 25px; }.hero-bones .domino { --tile-width: 41px; }
  .setup-panel > summary { padding-top: 14px; padding-bottom: 14px; }.setup-content { padding-bottom: 17px; }.mode-list { margin-bottom: 17px; }.setup-fields { gap: 10px; margin-bottom: 17px; }
  .proof-card { margin-top: 20px; padding-top: 16px; padding-bottom: 16px; }.proof-card-actions { margin-top: 14px; }.sidebar-bottom { margin-top: 15px; }
}
@media (max-width: 850px) {
  .app-shell { width: min(720px, calc(100% - 28px)); }.topbar { height: 68px; gap: 24px; }.brand b { font-size: 20px; }.brand-icon { transform: rotate(-11deg) scale(.86); }.topnav { gap: 20px; }.account-actions { gap: 12px; }
  .workspace { display: flex; flex-direction: column; gap: 25px; padding-top: 20px; }.game-column, .sidebar { width: 100%; }.sidebar { padding-top: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
  .proof-card { margin-top: 0; }.sidebar-bottom { grid-column: 1 / -1; margin: 0 2px; }
  .felt { height: 300px; min-height: 260px; }.domino.hand-tile { --tile-width: 47px; }.hand-tiles { min-height: 125px; gap: 10px; }
  .hand-tiles:has(.domino:nth-child(10)) { justify-content: flex-start; }.tile-back { width: 16px; height: 30px; flex-basis: 16px; }
  .setup-panel > summary { min-height: 54px; }.proof-card { min-height: 0; }
}
@media (max-width: 570px) {
  .app-shell { width: calc(100% - 20px); }.topbar { height: 62px; gap: 16px; }.brand { gap: 7px; }.brand b { font-size: 18px; letter-spacing: 1px; }.brand-icon { margin-left: 1px; transform: rotate(-11deg) scale(.76); }.topnav { gap: 17px; }.nav-button { font-size: 13px; }.account-actions { gap: 5px; }.wallet { gap: 6px; padding: 5px; border: 0; background: none; }.wallet > span:not(.coin-icon) { font-size: 12px; }.wallet small { display: none; }.coin-icon { transform: scale(.8); }.icon-button { width: 30px; }
  .workspace { padding-top: 17px; gap: 22px; }.table-heading { margin-bottom: 11px; min-height: 30px; padding: 0 3px; }.table-heading h1 { font-size: 16px; gap: 8px; }.subtle-badge { font-size: 11px; padding: 2px 5px; }.table-tools { gap: 12px; }.tool-button { font-size: 18px; }.tool-button span { display: none; }
  .table-frame { padding: 5px; box-shadow: inset 0 0 0 1px #2e382b, inset 0 0 0 3px #6e6042, 0 4px 0 #0d191b, 0 12px 35px #09131233; }
  .table-topline { padding: 5px 11px; min-height: 31px; font-size: 12px; }.scoreboard { padding: 12px 11px; min-height: 81px; }.score-player { gap: 8px; min-width: 108px; }.score-player strong { font-size: 13px; }.score-player small { font-size: 11px; }.avatar { width: 34px; height: 34px; }.avatar.fox::before { transform: scale(.85); transform-origin: 0 0; top: 4px; left: 3px; }.score-display { gap: 9px; top: 9px; padding-bottom: 23px; }.score-display > strong { font-size: 26px; min-width: 23px; }.score-display > span { font-size: 18px; }.score-display > small { font-size: 10px; }.opponent-hand { gap: 2px; max-width: 25%; flex-wrap: nowrap; }.tile-back { width: 9px; height: 23px; flex-basis: 9px; border-width: 1px; min-width: 4px; }.opponent-hand > small { position: absolute; right: 11px; bottom: 8px; margin: 0; font-size: 10px; }
  .felt { height: 278px; min-height: 255px; }.felt::after { inset: 9px; }.corner-tl, .corner-tr { top: 14px; }.corner-bl, .corner-br { bottom: 14px; }.corner-tl, .corner-bl { left: 14px; }.corner-tr, .corner-br { right: 14px; }
  .hero-bones { gap: 11px; margin-bottom: 29px; }.hero-bones .domino { --tile-width: 42px; }.board-ends { left: 13px; right: 13px; bottom: 16px; gap: 8px; }.end-button { font-size: 12px; padding: 8px 9px; min-height: 37px; }.placement-preview { font-size: 11px; max-width: 32%; line-height: 1.5; }
  .turn-strip { min-height: 43px; padding: 9px 11px; gap: 8px; }.turn-strip strong { font-size: 12px; }#stock-label { font-size: 11px; }.hand-area { padding: 12px 10px 13px; }.hand-heading { min-height: 32px; gap: 8px; }.self-label { gap: 7px; }.self-label strong { font-size: 13px; max-width: 60px; }.mini-avatar { width: 23px; height: 23px; }.mini-avatar::before { left: 5px; top: 6px; }.hand-actions { gap: 11px; }.hand-actions .secondary-button { font-size: 12px; padding-inline: 10px; min-height: 33px; }.hand-actions .quiet-button { font-size: 12px; }#hand-count { font-size: 11px; margin-left: 0; }
  .domino.hand-tile { --tile-width: 37px; }.domino.hand-tile .pip-half { padding: 4px; gap: 2px; }.hand-tiles { gap: 6px; min-height: 111px; padding-top: 18px; padding-bottom: 7px; }.hand-tiles:has(.domino:nth-child(9)) { justify-content: flex-start; }.hand-placeholder { font-size: 13px; }
  .sidebar { display: flex; flex-direction: column; gap: 18px; }.setup-panel, .proof-card { width: 100%; }.setup-content { padding: 0 17px 20px; }.setup-panel > summary { padding: 15px 17px; }.setup-fields { grid-template-columns: 1fr 1fr; gap: 17px; }.setup-fields label { gap: 6px; grid-template-columns: 32px minmax(0, 1fr); }.mode-list { margin-bottom: 19px; }.proof-card { padding: 18px; }.proof-card-actions { grid-template-columns: 1fr 1fr; gap: 12px; }.proof-button { min-height: 44px; }.sidebar-bottom { margin-top: -3px; }
  dialog { width: calc(100% - 24px); padding: 25px 20px; max-height: calc(100dvh - 30px); }.modal-title { font-size: 21px; }.modal-copy { font-size: 14px; }.choice-row { gap: 10px; }.choice-row > button { font-size: 13px; padding-inline: 10px; }.proof-context { gap: 12px; }.proof-context .modal-title { font-size: 21px; }.proof-fingerprint-short { display: grid; gap: 5px; }.history-row { gap: 10px; padding-inline: 11px; font-size: 13px; }.proof-equation { padding: 15px; }.proof-equation code, .proof-equation > strong { font-size: 20px; }.proof-equation code strong { font-size: 24px; }.proof-fingerprints > div { grid-template-columns: 64px minmax(0, 1fr); gap: 9px; }.ledger-row { gap: 10px; }.ledger-row > span { min-width: 65px; font-size: 11px; }.ledger-row > div strong { font-size: 12px; }
}
@media (max-width: 390px) {
  .topbar { gap: 11px; }.brand b { font-size: 16px; }.topnav { gap: 12px; }.nav-button { font-size: 12px; }.domino.hand-tile { --tile-width: 33px; }.hand-tiles { gap: 5px; }.hand-actions { gap: 9px; }.mini-avatar { display: none; }.score-player { gap: 6px; min-width: 98px; }.score-player small { font-size: 10px; }.proof-card-actions { gap: 9px; }.proof-button { padding-inline: 10px; }
}
#quick-proof-button { display: none; }
.felt-watermark { display: none; }
@media (max-width: 850px) { #quick-proof-button { display: inline-flex; } }
@media (max-width: 390px) { .topnav { gap: 9px; }.brand b { font-size: 15px; }.topbar { gap: 8px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
.reduced-motion *, .reduced-motion *::before, .reduced-motion *::after { transition: none !important; animation: none !important; }
