*{box-sizing:border-box} :root{--ink:#23372e;--paper:#f7f5ec;--line:#d9d9c9;--green:#214f3d;--coral:#cc644d}body{margin:0;background:var(--paper);color:var(--ink);font:16px/1.45 "Segoe UI",system-ui,sans-serif}button,a{touch-action:manipulation}button{font:inherit;color:inherit;cursor:pointer}button:disabled{cursor:default}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible{outline:3px solid #1884aa;outline-offset:2px;z-index:3}.mast{height:67px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding-inline:max(5vw,calc((100vw - 1180px)/2));background:#fbfaf3}.brand{display:flex;align-items:center;gap:10px;font:bold 24px Georgia,serif;letter-spacing:-.04em}.brandmark{display:grid;place-items:center;width:34px;height:34px;background:var(--green);color:white;font:28px/1 system-ui;border-radius:9px;transform:rotate(-6deg);box-shadow:0 3px 0 #112f22}.local{font-size:12px;font-weight:650;color:#56705c}main{width:min(1180px,90%);margin:auto;padding:40px 0 54px}.intro{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);padding:12px 0 28px}.eyebrow,small,.shelfcount span{font-size:11px;letter-spacing:.09em;font-weight:700}.eyebrow{color:#687665}.intro h1,.gamehead h1{font:normal clamp(44px,6vw,80px)/1.08 Georgia,serif;letter-spacing:-.065em;margin:8px 0}.intro h1 span{color:var(--coral)}.intro p,.description,.caption p{color:#5b685c;margin:4px 0}.shelfcount{font:italic 54px Georgia;color:#7c8c70;text-align:center}.shelfcount span,.score small,.trick small{display:block;font-family:system-ui}.filters{display:flex;gap:7px;flex-wrap:wrap;margin:23px 0}.filters button,.secondary,.primary{border:1px solid #cbd1be;background:#fafaf2;border-radius:30px;padding:8px 17px;font-weight:600;font-size:14px}.filters .chosen,.primary{background:var(--green);color:white;border-color:var(--green)}.shelf{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:19px}.tile{display:block;overflow:hidden;border:1px solid #cccfc0;border-radius:15px;background:#fffdf6;box-shadow:0 3px 0 #d9dacd;transition:transform .15s}.tile:hover{transform:translateY(-3px)}.cover{position:relative}.cover img{display:block;width:100%;aspect-ratio:16/9}.resume{position:absolute;top:9px;right:9px;background:#fffff0;color:#294835;padding:3px 10px;font-size:11px;border-radius:20px}.caption{padding:15px;display:flex;align-items:center;justify-content:space-between;gap:6px}.caption small,.gamehead small{text-transform:uppercase;color:#637657}.caption h2{font:600 clamp(19px,2vw,26px)/1.15 Georgia,serif;letter-spacing:-.04em;margin:4px 0}.caption p{font-size:12px}.caption>b{border:1px solid var(--line);border-radius:50%;padding:1px 7px}.back{font-size:14px;color:#4a6554}.gamehead{display:flex;align-items:center;justify-content:space-between;margin-top:20px;gap:10px}.gamehead h1{font-size:clamp(34px,5vw,56px)}.status{margin:16px 0 10px;font-weight:650}.board,.felt{border-radius:12px;overflow:hidden;box-shadow:0 5px 0 #9a8d71,0 9px 18px #4842241a}.board{width:min(100%,min(64vh,580px));display:grid;aspect-ratio:1}.primary,.secondary{margin:6px 0}.board+.primary,.board+.secondary,.felt+.primary{margin-top:16px}.board button{padding:0;border:0}.chess{grid-template-columns:repeat(8,1fr);grid-template-rows:repeat(8,1fr);border:6px solid #786449}.chess button{position:relative;font:clamp(23px,5.3vmin,51px)/1 "Segoe UI Symbol",serif;color:#21261e;text-shadow:0 1px 0 #fff8}.chess button small{position:absolute;top:2px;left:3px;font:8px system-ui}.pale{background:#ebdfc0}.dark{background:#94a783}.chess .selected{background:#ebbf67}.chess .target:after{content:'';position:absolute;inset:33%;border-radius:50%;background:#235f4159;pointer-events:none}.four{grid-template-columns:repeat(7,1fr);background:#3a5568;padding:10px;gap:4px;aspect-ratio:7/6}.four button{display:grid;gap:4px;background:none}.disc{display:block;border-radius:50%;background:#e1ddd0;box-shadow:inset 0 4px 6px #0005}.d0,.t0{background:#bc553f;color:white}.d1,.t1{background:#454477;color:white}.win{outline:3px solid #e9b842;outline-offset:-5px}.memory{grid-template-columns:repeat(4,1fr);gap:7px;padding:12px;background:#cbbaa0}.memory button{border-radius:9px;font:clamp(24px,5vw,48px) Georgia;box-shadow:0 3px 0 #6a654e}.covered{background:#45746d;color:#cae3ca}.turned{background:#fff2d4}.matched{background:#d0e0ad;color:#41613e}.snakes{position:relative;grid-template-columns:repeat(10,1fr);border:4px solid #937954;background:#f1e8cd}.square{position:relative;display:flex;align-items:center;justify-content:center;border:.5px solid #b5ac8d}.square:nth-child(3n){background:#e2e6cc}.square small{position:absolute;top:0;left:2px;font:clamp(8px,1.3vw,12px) system-ui}.trails{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;opacity:.8}.token{position:relative;z-index:1;display:inline-grid;place-items:center;min-width:1.35em;height:1.35em;border-radius:50%;font:bold 12px system-ui;box-shadow:inset 0 1px 1px #fff9,0 2px 1px #0005}.ludo{grid-template:repeat(15,1fr)/repeat(15,1fr);padding:5px;background:#bea982}.ludo>div{display:flex;flex-wrap:wrap;align-content:center;justify-content:center;align-items:center;line-height:1;color:#717d5e;min-width:0}.track,.yard0,.yard1{border:.5px solid #b7a58c}.track{background:#fbf0d9}.yard0{background:#ebac8f}.yard1{background:#b5b2d2}.wood{background:#d9caab}.ludo .token{font-size:clamp(7px,1.3vw,13px);min-width:47%;height:47%}.felt{background:#235b49;padding:clamp(6px,2vw,24px);width:min(780px,100%);color:#f8f3de}.deal{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:clamp(3px,1vw,12px)}.columns{margin-top:18px;min-height:210px}.card,.slot,.stock,.faceback{border-radius:5px;width:100%;aspect-ratio:.74;border:1px solid #dbd1b7}.card{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;background:#fff9e9;color:#242d28;font:bold clamp(15px,2vw,23px)/1 Georgia;padding:5%;box-shadow:0 2px 1px #10291c75}.card b{align-self:center;margin:auto;font-size:1.45em}.card.red{color:#b54436}.slot{background:#204d3f;color:#a3c1a0;border:1px dashed #a3c1a0}.stock,.faceback{background:repeating-linear-gradient(45deg,#48698a 0 4px,#395672 4px 7px);color:white}.stock,.slot{font-size:clamp(16px,3vw,30px)}.pile{min-width:0}.pile>*:not(:last-child){height:clamp(21px,3.1vw,32px);aspect-ratio:auto;border-radius:5px 5px 0 0;overflow:hidden}.pile .card:not(:last-child){flex-direction:row;gap:2px;align-items:center}.pile .card:not(:last-child) b{font-size:inherit;margin:0}.selected.card{background:#f9d68c;outline:2px solid #d9a638;outline-offset:-2px}.score{display:flex;justify-content:space-around;text-align:center}.score small,.trick small{font-size:11px;letter-spacing:0}.trick,.hand{display:flex;justify-content:center;flex-wrap:wrap;gap:5px}.trick{min-height:110px;align-items:center;margin:12px 0}.trick>div{text-align:center}.hearts .card{width:clamp(39px,6vw,69px);padding:3px}.hand .inactive{background:#c3c9b9}.notice{color:#8c492f}iframe{border:1px solid var(--line);border-radius:12px;width:100%;height:75vh;margin-top:14px}
@media(max-width:950px){.shelf{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:720px){.shelf{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}main{width:94%;padding-top:20px}.mast{padding:0 4%}.caption{padding:10px}.caption>b{display:none}.shelfcount{font-size:35px}.board{width:min(100%,540px)}.filters{margin:17px 0}.score{font-size:13px}.shelfcount span{font-size:9px}.gamehead .secondary{white-space:nowrap}.hearts .hand{gap:4px}}@media(prefers-reduced-motion:reduce){.tile{transition:none}}
.game-actions,.dice-controls{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.game-actions{justify-content:flex-end}.dice-controls{margin-top:16px}.dice-controls select,.roll-number{background:#fffdf6;color:var(--ink);border:1px solid #bcc8b7;border-radius:8px;padding:9px;font:inherit}.dice-controls fieldset{border:0;padding:0;margin:0}.dice-controls legend{font-size:14px;margin-bottom:4px}.roll-number{min-width:42px;margin:2px;font-weight:650}.roll-number:hover{background:#dcead9}.rulebook{max-width:min(520px,94vw);max-height:84vh;border:1px solid var(--line);border-radius:16px;padding:22px;color:var(--ink);background:var(--paper)}.rulebook h2{margin:0;font:600 27px Georgia}.rulebook ul{padding-left:21px}.rulebook li{margin-block:10px}.rulebook::backdrop{background:#15251dd0}
.playing .mast{height:48px;padding-inline:clamp(12px,2vw,32px)}
.playing main{width:100%;padding:10px clamp(10px,2vw,32px) 14px}
.playing .gamehead{margin:3px 0 9px}.playing .gamehead h1{font-size:clamp(25px,3.4vw,44px);margin:0}.gamehead small{font-size:10px}
.play-area{display:grid;grid-template-columns:minmax(0,1fr) clamp(220px,24vw,330px);gap:12px;align-items:stretch}
.surface{min-width:0;min-height:calc(100svh - 160px);display:grid;place-items:center;padding:12px;border:1px solid #b7b6a1;border-radius:18px;background:radial-gradient(ellipse at 50% 36%,#e9e5d3,#ccc5ac);box-shadow:inset 0 1px 7px #5e57442b}
.surface .board{width:min(100%,max(320px,calc(100svh - 187px)));max-width:none}
.surface .felt{width:100%;align-self:stretch;min-width:0}.surface .hearts{display:flex;flex-direction:column;justify-content:space-between;gap:20px}.surface .trick{flex:1;align-items:center}
.surface .deal{grid-template-columns:repeat(7,minmax(0,1fr))}.deal .card,.deal .slot,.deal .stock{max-height:clamp(66px,17vh,160px)}
.table-side{padding:clamp(14px,2vw,26px);border:1px solid var(--line);background:var(--panel,#fffdf6);border-radius:18px;overflow-wrap:anywhere}
.table-side h2,.atlas h2{font:600 23px Georgia,serif;margin:0 0 12px}.roster{display:flex;gap:6px;flex-wrap:wrap;border-bottom:1px solid var(--line);padding-bottom:14px;margin-bottom:14px}
.roster>span{display:flex;align-items:center;gap:5px;font-weight:600;font-size:14px}.table-side .description{font-size:14px}.table-side .status{border-block:1px solid var(--line);padding-block:12px}
.t2,.yard2{background:#487b5a;color:white}.yard2{background:#aed0ae}.t3{background:#9b6923;color:white}.yard3{background:#dfc787}.t4{background:#885474;color:white}.t5{background:#337895;color:white}.snakes .square{flex-wrap:wrap}.curtain{display:grid;place-items:center}
.setup form>label,.name-fields label{display:flex;flex-direction:column;gap:3px;font-weight:600}.setup input,.setup select{font:inherit;padding:9px;border:1px solid var(--line);color:var(--ink);background:var(--panel,#fffdf6);border-radius:8px}.name-fields{display:grid;gap:8px;margin:15px 0}.setup-actions{display:flex;gap:8px}
.ox,.sudoku,.reversi{display:grid;gap:2px;padding:5px}.ox{grid-template:repeat(3,1fr)/repeat(3,1fr);background:#897b61}.ox button{background:#eee5cf;font:bold clamp(32px,9vmin,90px) Georgia;color:#344f47}.ox .winning{background:#e2c477}
.reversi{grid-template:repeat(8,1fr)/repeat(8,1fr);background:#345c45}.reversi button{background:#659778;color:#253f2d;font-size:24px;display:grid;place-items:center}.stone{width:78%;aspect-ratio:1;border-radius:50%;box-shadow:0 3px 3px #19342688}.stone0{background:linear-gradient(145deg,#515955,#131815)}.stone1{background:linear-gradient(145deg,#fffdf3,#cbc3ac)}
.sudoku{grid-template:repeat(9,1fr)/repeat(9,1fr);gap:0;background:#788574}.sudoku button{background:#fffaf0;border:.5px solid #aeb9a8;font:600 clamp(16px,3.7vmin,42px) Georgia;color:#37669c}.sudoku .given{color:#303c32;background:#e5e8da}.sudoku .pick{background:#eed297}.sudoku button:nth-child(3n){border-right:3px solid #778675}.sudoku button:nth-child(n+19):nth-child(-n+27),.sudoku button:nth-child(n+46):nth-child(-n+54){border-bottom:3px solid #778675}.digits{display:flex;flex-wrap:wrap;gap:3px}.digits button{min-width:42px}
.atlas{background:#28503e}.atlas-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.atlas progress{accent-color:#e4c071;width:36%}.state-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(100px,1fr));gap:6px}.state-grid button{min-height:42px;background:#f5f0de;color:#263f33;border:0;border-radius:7px;box-shadow:0 3px 0 #142d20;font-weight:600}.state-grid .collected{background:#bdd9ab}
[data-theme=dark]{color-scheme:dark;--ink:#e6eee1;--paper:#18241f;--line:#47584b;--panel:#25352d;--green:#477457}
[data-theme=dark] .mast,[data-theme=dark] .tile,[data-theme=dark] .secondary,[data-theme=dark] .filters button,[data-theme=dark] .roll-number,[data-theme=dark] .dice-controls select{background:#26372e;color:var(--ink);border-color:var(--line)}
[data-theme=dark] .filters .chosen{background:#42654b}[data-theme=dark] .surface{background:radial-gradient(ellipse at center,#34483e,#21332a);border-color:#455b4c}
[data-theme=dark] :is(.caption p,.intro p,.description,.back,.eyebrow,.caption small,.gamehead small,.shelfcount){color:#bccdb7}
[data-theme=dark] .tile{box-shadow:0 3px 0 #0e1c14}[data-theme=dark] .notice{color:#f2bd88}
@media(max-width:760px){.play-area{grid-template-columns:1fr;gap:8px}.surface{min-height:0;padding:6px;border-radius:10px}.surface .board{width:min(100%,72svh)}.surface .felt{min-height:40svh}.table-side{padding:10px 13px}.table-side h2{font-size:18px}.roster{padding-bottom:6px;margin-bottom:5px}.table-side .status{margin:5px 0}.playing .gamehead{align-items:center}.game-actions{gap:4px}.game-actions button{font-size:12px;padding:6px 9px}.state-grid{grid-template-columns:repeat(auto-fit,minmax(80px,1fr))}.atlas h2{font-size:19px}.gamehead small{letter-spacing:0}.playing .back{font-size:12px}.setup{width:min(380px,92vw)}}
:root{--ui-bg:#fffcf3;--ui-edge:#b8c3b3;--ui-hover:#e6edde;--ui-ring:#367f70;--ui-shadow:#75837133}
[data-theme=dark]{--ui-bg:#2a3b32;--ui-edge:#566c5b;--ui-hover:#374d40;--ui-ring:#91d5b9;--ui-shadow:#08150d66}
.control-icon{width:1.12em;height:1.12em;flex:none;vertical-align:-.15em}
button.primary,button.secondary,.roll-number,.back{display:inline-flex;align-items:center;justify-content:center;gap:.45em}
button.primary,button.secondary,.roll-number,.filters button{min-height:38px;border-radius:10px;font-weight:650;line-height:1.15;box-shadow:0 2px 0 var(--ui-shadow);transition:background .15s,transform .15s}
button.secondary,.roll-number{color:var(--ink);background:var(--ui-bg);border:1px solid var(--ui-edge)}
button.primary{background:#28593e;border:1px solid #204831;color:#fff}
button.primary:disabled,.digits button:disabled{opacity:.55;box-shadow:none}
@media(hover:hover){button.secondary:hover,.filters button:not(.chosen):hover,.roll-number:hover{background:var(--ui-hover)}button.primary:not(:disabled):hover{background:#376e50}}
button:is(.secondary,.primary,.roll-number):active:not(:disabled){transform:translateY(1px);box-shadow:none}
.setup{width:min(410px,92vw);box-shadow:0 20px 65px #10201655}
.setup label,.dice-controls label{font-size:13px;font-weight:650}
.setup input,.setup select,.dice-controls select{min-height:44px;width:100%;border-radius:9px;background:var(--ui-bg);border:1px solid var(--ui-edge);color:var(--ink);font:500 16px/1.3 inherit;font-family:inherit;font-size:16px;padding:9px 12px;box-shadow:inset 0 1px 2px var(--ui-shadow)}
.setup select,.dice-controls select{appearance:none;padding-right:31px;background-image:linear-gradient(45deg,transparent 50%,var(--ink) 50%),linear-gradient(135deg,var(--ink) 50%,transparent 50%);background-position:calc(100% - 16px) 50%,calc(100% - 11px) 50%;background-size:5px 5px;background-repeat:no-repeat}
.setup select:disabled{opacity:.72}.setup-actions{justify-content:flex-end}.setup h2{margin:4px 0 15px}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--ui-ring);outline-offset:2px}
.dice-controls label{display:grid;gap:4px;width:100%}.dice-controls fieldset{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;width:100%}.dice-controls legend{padding:5px 0}.roll-number{margin:0;min-height:42px}.die-face{width:19px;height:19px;border:1px solid currentColor;border-radius:4px;fill:currentColor}
@media(max-width:760px){.dice-controls fieldset{grid-template-columns:repeat(6,minmax(0,1fr))}.roll-number{min-width:0;padding:4px;gap:2px}.die-face{width:15px;height:15px}.game-actions{max-width:58%}.game-actions button{min-height:34px}.back{min-height:28px}}
body.playing{height:100vh;height:100dvh;display:flex;flex-direction:column;overflow:hidden}
.playing .mast{flex:none;gap:12px;justify-content:flex-start}.playing .mast .theme{margin-left:auto}
#game-title{font:bold clamp(17px,2vw,26px) Georgia;letter-spacing:-.035em}#game-title:empty{display:none}
.playing main{flex:1;min-height:0;display:grid;grid-template-rows:minmax(0,1fr);position:relative}
.playing .gamehead{display:none}.playing main>.back{display:none}
.playing .mast .brand{font-size:0;gap:0}.playing .mast .brand:after{content:'Library';font:600 14px system-ui;margin-left:6px}
.play-area{min-height:0;height:100%;overflow:hidden}
.surface{min-height:0;min-width:0;overflow:auto;display:flex;align-items:safe center;justify-content:safe center;container-type:size}
.surface .board{width:min(100cqw,100cqh);flex:none}
.surface .felt{min-height:100%;align-self:flex-start;flex:none}
.table-side{min-height:0;overflow:auto}.table-side .game-actions{max-width:none;justify-content:flex-start;margin-bottom:14px}
.surface .atlas{padding:clamp(12px,1.7vw,28px)}.atlas .state-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,145px),1fr));gap:9px}
.atlas .state-grid button{font-size:clamp(16px,1.25vw,21px);min-height:62px;padding:8px;line-height:1.16;overflow-wrap:anywhere}
.setting{display:grid;gap:5px;margin:12px 0;font-weight:650}.setting select{max-width:100%;width:100%;padding:10px;border:1px solid var(--ui-edge);border-radius:8px;background:var(--ui-bg);color:var(--ink);font:inherit}
#atlas-clock{font-variant-numeric:tabular-nums;white-space:nowrap}.rolled-die{display:grid;place-items:center;width:58px;height:58px;border-radius:12px;color:#22392c;background:#fff6df;box-shadow:0 4px 0 #c4b79b,0 6px 12px #0002;font:45px/1 'Segoe UI Symbol',system-ui}
.number-picker{position:fixed;inset:auto;margin:0;padding:8px;width:180px}.number-picker::backdrop{background:#0002}.number-grid,.answer-board{display:grid;grid-template-columns:repeat(3,1fr);gap:3px}
.number-picker button{background:var(--ui-bg);color:var(--ink);border:1px solid var(--ui-edge);border-radius:6px;padding:8px;font-weight:bold}.number-grid button{min-height:42px}.number-picker>button{margin:5px 4px 0 0}
.answers{width:min(380px,95vw)}.answer-board{grid-template-columns:repeat(9,1fr);gap:0;margin:12px 0}.answer-board span{display:grid;place-items:center;aspect-ratio:1;border:1px solid var(--line)}.answer-board span:nth-child(3n){border-right:2px solid var(--ink)}.answer-board span:nth-child(n+19):nth-child(-n+27),.answer-board span:nth-child(n+46):nth-child(-n+54){border-bottom:2px solid var(--ink)}
@media(max-width:760px){.play-area{grid-template-rows:minmax(0,1fr) auto}.table-side{max-height:35dvh}.table-side .game-actions{float:right;margin:0 0 4px 5px}.table-side .description{display:none}.surface .board{width:min(100cqw,100cqh)}.atlas .state-grid{grid-template-columns:repeat(auto-fit,minmax(105px,1fr))}.atlas .state-grid button{min-height:54px}.playing .mast{height:46px}.playing main{padding:5px}.surface .felt{min-height:100%}}
@media(max-height:480px) and (orientation:landscape){.play-area{grid-template-columns:minmax(0,1fr) 34%;grid-template-rows:minmax(0,1fr)}.table-side{max-height:none}}
/* Card width controls the entire deal, including stock and empty piles. */
.surface .felt:not(.atlas):not(.hearts):not(.curtain) .deal{width:min(100%,calc(7 * min(17cqh,140px) + 6 * clamp(3px,1vw,12px)));margin-inline:auto;align-items:start}
.surface .deal :is(.card,.stock,.slot,.faceback),.surface .hearts .card{aspect-ratio:5/7;height:auto;max-height:none;border-radius:6%;box-shadow:0 2px 4px #10281955}
.surface .deal .card,.surface .hearts .card{position:relative;display:block;padding:0;overflow:hidden;border:1px solid #c8bb9c;background:linear-gradient(130deg,#fffef6,#f8f1df);color:#202b29}
.surface .card.red{color:#ae313e}.surface .card.selected{outline:3px solid #e4b147;outline-offset:-3px;background:#ffefc3}
.card svg{width:100%;height:100%;display:block;pointer-events:none}.surface .hearts .card.inactive{filter:brightness(.78)}
.surface .pile>*:not(:last-child){position:relative;height:auto;aspect-ratio:5/7;margin-bottom:-112%;display:block}
.surface .pile .faceback{border:1px solid #d7d4ba}.surface .pile{min-height:90px}
.surface .stock:not(:disabled),.faceback{background-color:#365771;background-image:repeating-linear-gradient(45deg,#ffffff14 0 1px,transparent 1px 5px),repeating-linear-gradient(-45deg,#ffffff14 0 1px,transparent 1px 5px);box-shadow:inset 0 0 0 3px #e1ddc6,inset 0 0 0 5px #527383}
.surface .slot{background:#174534;color:#c4d9bd}.surface .card svg text{user-select:none}
.memory button.covered{background:linear-gradient(135deg,#1d4853,#12323b);color:#fff4cf;border:2px solid #92aca2}.memory button.turned{background:#fff5dc;color:#302219;border:2px solid #b87232}.memory button.matched{background:#dcebbd;color:#23442e;opacity:1;border:2px solid #7d9b64}
.token{--pawn:#d46951;display:inline-grid;position:relative;place-items:center;min-width:0;width:23px;height:26px;border-radius:0;background:none;box-shadow:none;flex:none;color:var(--pawn)}.token.t1{--pawn:#8078c9}.token.t2{--pawn:#60a37d}.token.t3{--pawn:#d4a13e}.token.t4{--pawn:#b0719e}.token.t5{--pawn:#559dbc}
.token svg{position:absolute;width:100%;height:100%;inset:0;filter:drop-shadow(0 1px 1px #0004)}.token b{position:relative;color:#fff;font:bold 9px/1 system-ui;text-shadow:0 1px 2px #111;margin-top:32%}
.ludo>div{position:relative}.ludo .token{width:48%;height:48%;min-width:0}.ludo .token:only-child{width:85%;height:85%}.ludo .token b{font-size:clamp(6px,1.1vmin,12px)}
.snakes{grid-template-rows:repeat(10,minmax(0,1fr))}.snakes .square{min-width:0;min-height:0}.snakes .occupants{position:absolute;inset:18% 1% 1%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));place-items:center;z-index:2;pointer-events:none}.occupants .token{width:100%;height:100%}.occupants .token b{font-size:clamp(5px,.85vmin,10px)}.occupants[data-count="1"]{grid-template:1fr/1fr}.occupants:is([data-count="2"],[data-count="3"]){grid-template-rows:1fr}.snakes .trails{opacity:1}
.chessman{display:inline-block;position:relative;z-index:1}.draggable-piece{touch-action:none;cursor:grab;user-select:none}.lifting{opacity:.55}.drop-ready{outline:2px dashed #d2ae56;outline-offset:-3px}.drop-over{outline:3px solid #ffcc53;outline-offset:-3px}.drag-ghost{position:fixed!important;pointer-events:none!important;z-index:1000;transform:translate(-50%,-50%) rotate(-4deg);opacity:.9;max-width:120px;max-height:165px;padding:0}.piece-tray{display:flex;align-items:center;gap:8px;margin-top:10px;font-size:13px}.piece-tray span{display:grid;place-items:center;width:38px;height:38px;background:var(--ui-bg);border:1px solid var(--line);border-radius:50%;font-size:24px}.setup input[type="checkbox"]{min-height:auto;width:auto}
.board.memory{grid-template-columns:repeat(var(--columns),1fr);grid-template-rows:repeat(var(--rows),1fr);aspect-ratio:var(--columns)/var(--rows);max-height:100%}
.board.ludo{grid-template-columns:repeat(6,minmax(0,.8fr)) repeat(3,minmax(0,1.8fr)) repeat(6,minmax(0,.8fr));grid-template-rows:repeat(6,minmax(0,.8fr)) repeat(3,minmax(0,1.8fr)) repeat(6,minmax(0,.8fr));background:#e7ddbf}
.ludo>div:is(.yard0,.yard1,.yard2,.yard3){border:0}.ludo>div:nth-child(n+106):nth-child(-n+120),.ludo>div:nth-child(15n+8){box-shadow:inset 0 0 0 1px #645a4333}
.drag-ghost.chessman{display:grid!important;place-items:center;opacity:1;background:transparent!important;transform:translate(-50%,-68%);filter:drop-shadow(0 4px 3px #0006);color:#14241b;text-shadow:0 0 2px ivory}
.dice-stage{display:flex;align-items:center;gap:20px;padding:18px 14px;perspective:440px}.dice-cube{width:40px;height:40px;position:relative;transform-style:preserve-3d;transform:rotateX(var(--rx)) rotateY(var(--ry))}
.cube-face{box-sizing:border-box;position:absolute;inset:0;border-radius:8px;border:1px solid #bbae91;background:linear-gradient(145deg,#fffdf5,#e3d7bc);display:grid;grid-template:repeat(3,1fr)/repeat(3,1fr);gap:2px;padding:6px;backface-visibility:hidden}
.cube-face i{border-radius:50%;background:#273a32;box-shadow:inset 0 1px 2px #0008}.face-0{transform:translateZ(20px)}.face-1{transform:rotateY(90deg) translateZ(20px)}.face-2{transform:rotateX(90deg) translateZ(20px)}.face-3{transform:rotateX(-90deg) translateZ(20px)}.face-4{transform:rotateY(-90deg) translateZ(20px)}.face-5{transform:rotateY(180deg) translateZ(20px)}
.ludo .legal-pawn{filter:drop-shadow(0 0 2px #fff) drop-shadow(0 0 2px #234b43);cursor:grab}.ludo .legal-pawn:after{content:'';position:absolute;inset:auto 0 -4% 0;height:16%;border-radius:50%;background:#386b5a77;z-index:-1}
.dice-cube{transform:rotateX(-13deg) rotateY(-15deg) rotateX(var(--rx)) rotateY(var(--ry))}
.board.snakes .square{container-type:inline-size}
.board.snakes .square small{position:absolute;left:2%;top:1%;z-index:4;padding:0 .13em;border-radius:3px;background:#fff5db;color:#172c27;font:750 clamp(9px,27cqw,21px)/1.05 system-ui;letter-spacing:-.035em;font-variant-numeric:tabular-nums;pointer-events:none}
.board.snakes .occupants{inset:29% 1% 0}

.mast #motion-toggle{margin-left:auto;white-space:nowrap;flex:none}
.mast .theme,.playing .mast .theme{margin-left:6px}
.roster>span[aria-current=true]{border-radius:6px;outline:2px solid currentColor;outline-offset:-1px;padding:3px 7px}
.roster>span[aria-current=true]::before{content:'';width:.55em;height:.55em;border-radius:50%;background:currentColor;animation:turn-pulse 1.7s ease-in-out infinite}
@keyframes turn-pulse{50%{opacity:.3;transform:scale(.76)}}
.motion-off *,.motion-off *::before,.motion-off *::after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:0s!important}
@media(prefers-reduced-motion:reduce){.roster>span[aria-current=true]::before{animation:none}}
@media(max-width:580px){.motion-label{display:none}.mast #motion-toggle{padding:6px 9px}.playing .mast{gap:6px}.playing #game-title{min-width:0;line-height:1.05}}

.mast button[data-tip]{position:relative;display:grid;place-items:center;width:40px;height:40px;padding:0!important;flex:none;z-index:8}
.mast button[data-tip] svg{width:20px;height:20px;margin:0}
.mast button[data-tip]::after{content:attr(data-tip);position:absolute;top:calc(100% + 6px);right:0;padding:5px 9px;border-radius:6px;background:#20342c;color:white;font:600 12px/1.5 system-ui;white-space:nowrap;pointer-events:none;visibility:hidden}
.mast button[data-tip]:is(:hover,:focus-visible)::after{visibility:visible}
.roster>span[aria-current=true]{background:var(--ink);color:var(--paper)}
.board .token[data-current=true]{outline:2px solid currentColor;outline-offset:1px;border-radius:50%}
@media(prefers-reduced-motion:no-preference){
 body:not(.motion-off) :is(.roster>span[aria-current=true],.board .token[data-current=true]){animation:player-blink 1.6s ease-in-out infinite}
}
@keyframes player-blink{0%,100%{opacity:1}50%{opacity:.55}}
