
:root {
 --rack: #1f3a14; 
 --rack-bevel: #2f5420;
 --disc-green: #34802a;
 --disc-gold: #ffc53d;
 --disc-tomato: #e0533d;
 --disc-sky: #3d9be0;
 --disc-violet: #8a5cd6;
 --face: #fbf8f0;
 --pip-ink: #14140f;
 --suit-red: #b3241f;
 --edge: #0c1a07;
 --suit-h: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 92C30 74 4 56 4 32C4 16 16 6 29 6C39 6 46 12 50 21C54 12 61 6 71 6C84 6 96 16 96 32C96 56 70 74 50 92Z'/%3E%3C/svg%3E");
 --suit-d: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 3L88 50L50 97L12 50Z'/%3E%3C/svg%3E");
 --suit-s: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 4C68 26 96 42 96 64C96 78 85 87 73 87C64 87 57 82 53 75C54 85 58 92 66 97H34C42 92 46 85 47 75C43 82 36 87 27 87C15 87 4 78 4 64C4 42 32 26 50 4Z'/%3E%3C/svg%3E");
 --suit-c: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 4a21 21 0 1 1 0 42a21 21 0 1 1 0-42ZM27 38a21 21 0 1 1 0 42a21 21 0 1 1 0-42ZM73 38a21 21 0 1 1 0 42a21 21 0 1 1 0-42ZM40 38h20v24H40ZM47 60C47 80 42 90 33 97H67C58 90 53 80 53 60Z'/%3E%3C/svg%3E");
 --redeal: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 12a7 7 0 1 1-2.05-4.95' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'/%3E%3Cpath d='M19.5 3.5v5h-5z'/%3E%3C/svg%3E");
}
.sheet--play { padding-top: clamp(.55rem, 2.2vw, 1.2rem); }
.turnline {
 display: flex; align-items: center; justify-content: center; gap: .7rem;
 min-height: 1.7rem; margin: 0 0 .35rem;
 font-family: var(--display); font-weight: 700; text-transform: uppercase;
 font-size: clamp(.85rem, 3.2vw, 1.05rem); letter-spacing: .1em; color: var(--ink);
}
.turnline__text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.turnline .sendhome { font-size: .8rem; }
.play {
 display: flex; flex-direction: column; align-items: center; gap: .3rem;
 max-width: 34rem; margin: 0 auto;
}
@media (max-width: 600px) and (max-height: 900px) {
 #paper .masthead { margin-bottom: .3rem; }
 #paper .masthead__logo { width: min(13rem, 58%); }
 #paper .masthead__links { margin-top: .2rem; }
}
.counts {
 margin: .15rem 0 0; min-height: 1.2rem; text-align: center;
 font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
 font-size: .72rem; color: var(--ink-soft); font-variant-numeric: tabular-nums;
}
.table {
 position: relative; flex: none; overflow: hidden;
 --cw: 40px;
 width: calc(var(--cw) * 8); height: calc(var(--cw) * 7.6);
 border-radius: 14px;
 background: var(--rack);
 box-shadow: inset 0 0 0 4px var(--rack-bevel), 0 .4rem .8rem rgba(0, 0, 0, .3);
 touch-action: manipulation;
 user-select: none; -webkit-user-select: none;
}
.table__cards { position: absolute; inset: 0; }
.table__stamps { position: absolute; inset: 0; pointer-events: none; }
.table.is-stuck .table__cards { filter: saturate(.45) brightness(.78); transition: filter .2s; }
.table .card, .table .card:hover {
 position: absolute; box-sizing: border-box; display: block; margin: 0; padding: 0; border: 0;
 left: calc(var(--x) * var(--cw)); top: calc(var(--y) * var(--cw));
 width: var(--cw); height: calc(var(--cw) * 1.4);
 border-radius: calc(var(--cw) * .09); overflow: hidden;
 background: linear-gradient(165deg, #fffefa, var(--face) 60%, #ece6d6);
 font: inherit; text-transform: none; letter-spacing: normal;
 box-shadow: 0 0 0 1px var(--edge), 0 calc(var(--cw) * .03) calc(var(--cw) * .07) rgba(0, 0, 0, .35);
 cursor: default; opacity: 1;
 -webkit-tap-highlight-color: transparent;
}
.table .card--red, .table .card--red:hover { color: var(--suit-red); }
.table .card--black, .table .card--black:hover { color: var(--pip-ink); }
.table:not(.is-locked) button.card { cursor: pointer; }
.table .card:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 1px; z-index: 5; }
.suit {
 display: inline-block; flex: none; background: currentColor;
 -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat;
}
.suit--h { --m: var(--suit-h); }
.suit--d { --m: var(--suit-d); }
.suit--s { --m: var(--suit-s); }
.suit--c { --m: var(--suit-c); }
.card__index {
 position: absolute; left: calc(var(--cw) * .07); top: calc(var(--cw) * .025);
 display: flex; align-items: center; gap: calc(var(--cw) * .02);
 font-family: var(--grid-face); font-weight: 700; font-size: calc(var(--cw) * .27); line-height: 1;
 letter-spacing: -.03em;
}
.card__index b { font-weight: 700; }
.card__index .suit { width: calc(var(--cw) * .2); height: calc(var(--cw) * .2); }
.card__index--foot { left: auto; top: auto; right: calc(var(--cw) * .07); bottom: calc(var(--cw) * .025); transform: rotate(180deg); }
.card__pip {
 position: absolute; display: block;
 left: calc(var(--cw) * .22); top: calc(var(--cw) * .48);
 width: calc(var(--cw) * .56); height: calc(var(--cw) * .56);
}
.card__pip .suit { display: block; width: 100%; height: 100%; }
.card__court {
 position: absolute; box-sizing: border-box;
 left: calc(var(--cw) * .15); right: calc(var(--cw) * .15); top: calc(var(--cw) * .36); bottom: calc(var(--cw) * .2);
 border: calc(var(--cw) * .045) double currentColor; border-radius: 2px;
 display: flex; align-items: center; justify-content: center;
}
.card__letter { font-family: var(--display); font-weight: 700; font-size: calc(var(--cw) * .56); line-height: 1; }
.table .card--back {
 background: var(--player-disc, var(--disc-green));
 box-shadow: inset 0 0 0 calc(var(--cw) * .05) var(--face), inset 0 0 0 calc(var(--cw) * .05 + 1px) rgba(0, 0, 0, .28),
 0 0 0 1px var(--edge), 0 calc(var(--cw) * .02) calc(var(--cw) * .05) rgba(0, 0, 0, .3);
}
.table .card--back::after {
 content: ''; position: absolute; left: 24%; right: 24%; top: calc(var(--cw) * .45); height: calc(var(--cw) * .5);
 background: color-mix(in srgb, var(--player-disc, var(--disc-green)), #000 34%);
 -webkit-mask: url('../assets/globe.png') center / contain no-repeat;
 mask: url('../assets/globe.png') center / contain no-repeat;
}
.table .slot, .table .slot:hover {
 position: absolute; box-sizing: border-box; margin: 0; padding: 0; border: 0;
 left: calc(var(--x) * var(--cw)); top: calc(var(--y) * var(--cw));
 width: var(--cw); height: calc(var(--cw) * 1.4);
 border-radius: calc(var(--cw) * .09);
 background: rgba(0, 0, 0, .16); color: rgba(255, 255, 255, .42);
 box-shadow: inset 0 0 0 calc(var(--cw) * .035) rgba(255, 255, 255, .28);
 font: inherit; text-transform: none; letter-spacing: normal; opacity: 1;
 cursor: default; -webkit-tap-highlight-color: transparent;
}
.table:not(.is-locked) .slot--stock { cursor: pointer; }
.table .slot:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 1px; }
.table .slot .card { left: 0; top: 0; }
.table .slot .card--stack { left: calc(var(--dx) * var(--cw) * -.03); top: calc(var(--dx) * var(--cw) * -.03); }
.slot__mark { position: absolute; left: 25%; right: 25%; top: 30%; height: 32%; width: auto; }
.slot__king { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; font-size: calc(var(--cw) * .5); }
.table .slot--stock.is-redeal::after, .table .slot--stock.is-spent::after {
 content: ''; position: absolute; left: 22%; right: 22%; top: 28%; height: 32%; background: currentColor;
 -webkit-mask: var(--redeal) center / contain no-repeat; mask: var(--redeal) center / contain no-repeat;
}
.table .slot--stock.is-spent::after { opacity: .35; }
.stamp {
 position: absolute; left: 50%; top: 50%; z-index: 5; pointer-events: none;
 transform: translate(-50%, -50%) rotate(-8deg);
 padding: .15em .5em; border: 3px solid currentColor; border-radius: 4px;
 font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
 font-size: clamp(1.3rem, 7vw, 2.2rem); line-height: 1; white-space: nowrap;
 color: #fff; background: rgba(179, 36, 31, .88);
 box-shadow: 0 .4rem 1rem rgba(0, 0, 0, .35);
 animation: stamp-in .26s cubic-bezier(.2, 1.4, .4, 1) both, stamp-out .3s ease-in 1.35s forwards;
}
.stamp--home { font-size: clamp(1rem, 5vw, 1.5rem); background: rgba(20, 20, 15, .82); top: 22%; }
.stamp--stuck, .stamp--won { animation: stamp-in .26s cubic-bezier(.2, 1.4, .4, 1) both; }
.stamp--won { background: rgba(29, 44, 18, .92); }
@keyframes stamp-in { from { opacity: 0; transform: translate(-50%, -50%) rotate(-16deg) scale(1.8); } to { opacity: 1; transform: translate(-50%, -50%) rotate(-8deg) scale(1); } }
@keyframes stamp-out { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
 .stamp, .stamp--stuck, .stamp--won { animation: none; }
 .stamp--home { animation: stamp-out .01s linear 1.5s forwards; }
 .table.is-stuck .table__cards { transition: none; }
}
:root[data-board="cherry"] { --hole-rim: #120000; --edge: #120000; }
:root[data-board="oak"] { --hole-rim: #150c07; --edge: #150c07; }
:root[data-board="birch"] { --hole-rim: #2e1c0c; --edge: #2e1c0c; }
:root[data-board="cherry"] .table { background: linear-gradient(rgba(255,255,255,.16), rgba(255,255,255,0) 45%, rgba(0,0,0,.22)), url('../assets/boards/cherry.jpg') center / cover, var(--rack); }
:root[data-board="oak"] .table { background: linear-gradient(rgba(255,255,255,.16), rgba(255,255,255,0) 45%, rgba(0,0,0,.22)), url('../assets/boards/oak.jpg') center / cover, var(--rack); }
:root[data-board="birch"] .table { background: linear-gradient(rgba(255,255,255,.16), rgba(255,255,255,0) 45%, rgba(0,0,0,.22)), url('../assets/boards/birch.jpg') center / cover, var(--rack); }
:root[data-board="cherry"] .table, :root[data-board="oak"] .table, :root[data-board="birch"] .table {
 box-shadow: inset 0 0 0 4px var(--hole-rim), 0 .4rem .8rem rgba(0, 0, 0, .3);
}
.statusbar { margin-top: .55rem; align-items: center; }
.statusbar__tools { display: flex; gap: .9rem; }
.statusbar__confirm {
 display: flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-end; gap: .3rem .8rem;
 font-size: .68rem; color: var(--ink);
}
.linky:disabled { background: none; color: var(--pencil); opacity: 1; text-decoration: none; cursor: default; }
.edition__state:empty { display: none; }
.edition__today {
 font-family: var(--display); font-weight: 700; font-size: .62rem; letter-spacing: .12em; text-transform: uppercase;
 padding: .1rem .4rem; border: 1.5px solid var(--green); color: var(--green); border-radius: 2px;
}
@media (prefers-reduced-motion: reduce) {
 * { scroll-behavior: auto !important; }
}
.prefs {
 display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 1.2rem;
 margin: 1rem 0 0; padding-top: .9rem; border-top: 1px solid var(--rule);
}
.prefs__buttons { display: flex; flex-wrap: wrap; gap: .5rem; }
.picker { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; }
.prefs__label {
 font-family: var(--display); font-weight: 700; text-transform: uppercase;
 letter-spacing: .14em; font-size: .72rem; color: var(--ink-soft);
}
.picker__swatches { display: flex; gap: .45rem; }
.swatch {
 appearance: none; margin: 0; padding: 6px; width: 44px; height: 44px; border: 0; border-radius: 50%;
 background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.swatch:hover { background: transparent; }
.swatch::before {
 content: ''; display: block; width: 100%; height: 100%; border-radius: 50%;
 background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.5), rgba(255,255,255,0) 40%), var(--disc);
 box-shadow: inset 0 -2px 3px rgba(0,0,0,.25);
 transition: transform .12s ease-out;
}
.swatch[aria-checked="true"]::before { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--ink), inset 0 -2px 3px rgba(0,0,0,.25); }
.swatch:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 1px; }
@media (hover: hover) { .swatch:hover::before { transform: scale(1.08); } }
.swatch--board { border-radius: 10px; }
.swatch--board::before { border-radius: 6px; background: var(--wood, var(--rack)) center / cover; box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); }
.swatch--board[aria-checked="true"]::before { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--ink), inset 0 0 0 1px rgba(0,0,0,.25); }
.soundtoggle, .soundtoggle:hover {
 display: inline-flex; align-items: center; gap: .45rem;
 padding: .7rem .9rem; min-height: 44px;
 background: transparent; color: var(--ink-soft);
 border: 2px solid var(--rule); border-radius: 2px;
 font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: .72rem;
}
.soundtoggle:hover { color: var(--ink); border-color: var(--ink); }
.soundtoggle__icon {
 width: 1rem; height: 1rem; background: currentColor;
 -webkit-mask: var(--speaker) center / contain no-repeat; mask: var(--speaker) center / contain no-repeat;
}
:root {
 --speaker: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9h4l5-4v14l-5-4H3z'/%3E%3Cpath d='M15.5 8.5a5 5 0 0 1 0 7M18 6a8.5 8.5 0 0 1 0 12' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
 --speaker-off: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9h4l5-4v14l-5-4H3z'/%3E%3Cpath d='M16 9l6 6M22 9l-6 6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}
.soundtoggle[aria-pressed="false"] .soundtoggle__icon { -webkit-mask-image: var(--speaker-off); mask-image: var(--speaker-off); }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 30; pointer-events: none; }
.howto__editions { margin: .4rem 0 0; padding-left: 1.1rem; font-size: .92rem; line-height: 1.45; }
@media (min-width: 760px) {
 #paper { max-width: min(72rem, 100%); }
 #paper .masthead { margin-bottom: .45rem; }
 #paper .masthead__logo { width: min(17rem, 40%); }
 #paper .masthead__links { margin-top: .25rem; }
 .play { max-width: none; }
 .counts { font-size: .8rem; }
}
