
:root {
 --rack: #1f3a14; 
 --rack-bevel: #2f5420;
 --disc-green: #34802a;
 --disc-gold: #ffc53d;
 --disc-tomato: #e0533d;
 --disc-sky: #3d9be0;
 --disc-violet: #8a5cd6;
 --ivory: #f4efe2;
 --edge: #0c1a07;
}
.sheet--play { padding-top: clamp(.55rem, 2.2vw, 1.2rem); }
.turnline {
 display: flex; align-items: center; justify-content: center; gap: .5rem;
 min-height: 1.6rem; margin: 0 0 .35rem;
 font-family: var(--display); font-weight: 700; text-transform: uppercase;
 font-size: clamp(.9rem, 3.4vw, 1.1rem); letter-spacing: .1em; color: var(--ink);
}
.turnline[data-kind="stuck"] { color: #b3241f; }
.turnline[data-kind="clear"] { color: var(--green); }
.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: .2rem; }
 #paper .masthead__logo { width: min(10.5rem, 46%); }
 #paper .masthead__links { margin-top: .1rem; }
 .sheet--play { padding-top: .45rem; }
 .turnline { min-height: 1.3rem; margin-bottom: .2rem; }
}
.table {
 position: relative; flex: none; overflow: hidden;
 width: 343px; height: 480px;
 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;
 --t: 5px; --tw: 40px; --th: 53px;
}
.table__tiles { position: absolute; inset: 0; }
.table__stamps { position: absolute; inset: 0; pointer-events: none; }
.table .mt, .table .mt:hover {
 position: absolute; z-index: 0; display: block; box-sizing: border-box;
 margin: 0; padding: 0; border: 0; border-radius: 3px;
 background: transparent;
 color: inherit; font: inherit; text-transform: none; letter-spacing: normal; opacity: 1;
 box-shadow: none;
 cursor: pointer;
 -webkit-tap-highlight-color: transparent;
}
.table .mt[hidden] { display: none; }
.mt::before {
 content: ''; position: absolute; z-index: -1; left: 0; top: 0;
 width: calc(var(--tw) + var(--t)); height: calc(var(--th) + var(--t));
 background: linear-gradient(160deg, var(--player-disc, var(--disc-green)) 40%, color-mix(in srgb, var(--player-disc, var(--disc-green)), #000 38%));
 clip-path: polygon(var(--tw) 0, 100% var(--t), 100% 100%, var(--t) 100%, 0 var(--th), var(--tw) var(--th));
 filter: drop-shadow(0 0 .6px var(--edge)) drop-shadow(0 0 .6px var(--edge));
}
.mt::after {
 content: ''; position: absolute; z-index: -2; left: 0; top: 0;
 width: calc(var(--tw) + var(--t) * 1.8); height: calc(var(--th) + var(--t) * 1.8);
 background: rgba(0, 0, 0, .3);
 clip-path: polygon(var(--tw) 0, 100% calc(var(--t) * 1.8), 100% 100%, calc(var(--t) * 1.8) 100%, 0 var(--th), var(--tw) var(--th));
}
.mt .face {
 display: block; pointer-events: none; border-radius: 3px;
 background: linear-gradient(160deg, #fffdf6, var(--ivory) 55%, #e8e1ce);
 box-shadow: inset 0 0 0 1px rgba(27, 27, 22, .45);
}
.table .mt.is-covered { pointer-events: none; cursor: default; }
.table .mt.is-lifted {
 transform: translate(-2px, -3px);
 outline: 3px solid var(--ink); outline-offset: 1px; z-index: 1;
}
.table .mt.is-lifted .face { box-shadow: inset 0 0 0 1px rgba(27, 27, 22, .45), inset 0 0 0 3px var(--paper); }
.table.shade .mt.is-blocked { filter: brightness(.8) saturate(.85); cursor: default; }
.table .mt:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 1px; z-index: 1; }
.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--clear { background: rgba(29, 44, 18, .92); }
.table__stamps .stamp--clear:last-child { animation: stamp-in .26s cubic-bezier(.2, 1.4, .4, 1) both; }
@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; } }
: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; flex-wrap: wrap; row-gap: .35rem; }
.statusbar__tools { display: flex; flex-wrap: wrap; gap: .4rem .9rem; justify-content: flex-end; }
.statusbar__tools [hidden] { display: none; }
#callit { color: #b3241f; }
.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, #8a8a80); 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; }
 .stamp, .table__stamps .stamp--clear:last-child { animation: none; }
 .stamp--stuck { animation: stamp-out .01s linear 1.5s forwards; }
 .quip { animation: none; }
}
.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); }
.sheet--play { position: relative; }
.quip {
 position: absolute; z-index: 3; right: clamp(.6rem, 3vw, 2rem); top: clamp(-.6rem, -1vw, 0rem);
 max-width: min(15rem, 62%); margin: 0; padding: .45rem .7rem;
 font-family: var(--grid-face); font-style: italic; font-size: .92rem; line-height: 1.25; color: var(--ink);
 background: #fff; border: 2px solid var(--ink); border-radius: 12px 12px 2px 12px;
 box-shadow: 0 .35rem .8rem rgba(0,0,0,.2);
 animation: quip-in .22s ease-out;
 pointer-events: none;
}
@keyframes quip-in { from { opacity: 0; transform: translateY(6px) scale(.96); } to { opacity: 1; transform: none; } }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 30; pointer-events: none; }
.howto__example { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.howto__caption { font-size: .85rem; line-height: 1.4; color: var(--ink-soft); flex: 1 1 12rem; }
.minitable { position: relative; display: inline-block; flex: none; }
.minitile {
 position: absolute; display: block; box-sizing: border-box; border-radius: 2px; overflow: visible;
 background: var(--ivory); box-shadow: inset 0 0 0 1px rgba(27, 27, 22, .5), 3px 3px 0 0 var(--player-disc, var(--disc-green)), 3px 3px 0 1px var(--edge);
}
.minitile .face { display: block; }
.minitable__word {
 position: absolute; bottom: 0; text-align: center; font-family: var(--display); font-weight: 700;
 text-transform: uppercase; letter-spacing: .06em; font-size: .56rem; color: var(--ink);
}
.howto__tiles { display: flex; flex-wrap: wrap; gap: .5rem .7rem; }
.howto__tile { display: inline-flex; flex-direction: column; align-items: center; gap: .15rem; width: 4.2rem; text-align: center; }
.howto__tile .face { display: block; background: var(--ivory); border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(27, 27, 22, .5); }
.howto__tile small { font-size: .62rem; line-height: 1.2; color: var(--ink-soft); }
@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; }
}
@media (min-width: 1000px) {
 #paper .masthead__logo { width: min(12rem, 28%); }
 #sheet {
 display: grid; align-items: start; column-gap: 1.6rem;
 grid-template-columns: minmax(0, 1fr) 13rem;
 grid-template-areas: "turn turn" "play status";
 }
 #sheet > .turnline { grid-area: turn; }
 #sheet > .play { grid-area: play; margin: 0; justify-self: stretch; }
 #sheet > .statusbar {
 grid-area: status; flex-direction: column; align-items: flex-start; gap: 1rem;
 margin-top: 0; padding-top: .8rem; border-top: 2px solid var(--ink);
 }
 .statusbar__tools, .statusbar__confirm { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: .7rem; }
 .statusbar__clock { font-size: 2rem; }
}
