:root{--stone-bg:#f7f2e8;--stone-surface:#fffaf1;--stone-raised:#fffdf8;--stone-border:#d8ccba;--ink:#211d18;--muted-ink:#63584b;--roman-red:#8f2d24;--roman-red-dark:#6f211b;--gold:#b58423;--olive-success:#2f6b55;--danger:#b43a32;--warning-bg:#fff0dc;--focus-ring:#155bb5;color:var(--ink);background:var(--stone-bg);font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}*{box-sizing:border-box}body{min-width:320px;min-height:100vh;margin:0}button,input,select{font:inherit}button,.file-input{border:1px solid var(--roman-red);background:var(--stone-raised);min-height:2.75rem;color:var(--roman-red-dark);border-radius:.5rem;padding:.7rem .9rem;font-weight:800}button:disabled{color:#7d7469;background:#e8e1d7;border-color:#c9c1b5;text-decoration:line-through}:focus-visible{outline:3px solid var(--focus-ring);outline-offset:3px}input,select{background:var(--stone-raised);width:100%;min-height:2.6rem;color:var(--ink);border:1px solid #cfc4b5;border-radius:.45rem;padding:.55rem}input[type=checkbox]{width:1.2rem;min-height:1.2rem}h1,h2,p{margin:0}h1{color:#151515;font-family:Georgia,Times New Roman,serif;font-size:2rem;line-height:1.05}h2{font-size:1.05rem}.app-shell{gap:.9rem;width:min(100%,48rem);min-height:100vh;margin:0 auto;padding:.8rem;display:grid}.topbar{z-index:30;background:var(--stone-bg);color:var(--muted-ink);border-bottom:1px solid #ded4c7;justify-content:space-between;align-items:center;gap:1rem;padding:.55rem 0;display:flex;position:sticky;top:0}.brand-button,.back-button{min-height:2.3rem;color:var(--roman-red-dark);background:0 0;border:0;padding-inline:0}.panel{border:1px solid var(--stone-border);background:var(--stone-surface);border-radius:.5rem;gap:1rem;padding:1rem;display:grid}.home-view{align-content:center;min-height:62vh}.eyebrow{color:var(--olive-success);text-transform:uppercase;font-size:.8rem;font-weight:800}.quick-actions,.setup-section,.creator-row,.profile-grid,.folder-list,.category-grid,.game-list,.plain-list,.stats-grid{gap:.7rem;display:grid}.quick-actions{margin-top:.4rem}.primary-action{background:var(--roman-red);color:#fffefa}.sticky-action{position:sticky;bottom:.75rem;box-shadow:0 .55rem 1.2rem #201f1b29}.setup-section{border-top:1px solid #e3d9cb;padding-top:.85rem}.creator-row{grid-template-columns:1fr 5.5rem}.creator-row button{grid-column:1/-1}.creator-row label,.field-inline,.file-toggle,.folder-list label,.category-chip,.file-input{color:#4e453b;gap:.35rem;font-weight:700;display:grid}.field-inline{grid-template-columns:1fr 5.5rem;align-items:center}.profile-grid{grid-template-columns:repeat(auto-fit,minmax(9rem,1fr))}.selected-row{border-color:var(--olive-success);color:#184a39;background:#e9f3ed}.folder-list label,.file-toggle,.category-chip{background:#fffefa;border:1px solid #ded4c7;border-radius:.5rem;grid-template-columns:auto 1fr;align-items:center;padding:.65rem}.category-chip{grid-template-columns:auto 1rem 1fr}.category-chip span{border-radius:999px;width:1rem;height:1rem}.content-status{gap:.8rem;display:grid}.content-status dl{grid-template-columns:repeat(3,minmax(0,1fr));gap:.5rem;margin:0;display:grid}.content-status dl div{background:#f7f4ee;border:1px solid #ded4c7;border-radius:.45rem;padding:.65rem}.content-status dt{color:#645a50;font-size:.76rem;font-weight:800}.content-status dd{margin:0;font-size:1.25rem;font-weight:900}.error-list,.game-list,.plain-list,.stats-grid{margin:0;padding:0;list-style:none}.error-list{gap:.45rem}.error-list li{color:#77221d;overflow-wrap:anywhere;border-left:.25rem solid #b33a3a;padding:.35rem 0 .35rem .6rem;font-weight:750}.notice{border-left:.25rem solid var(--olive-success);color:#184a39;background:#e9f3ed;padding:.6rem .75rem;font-weight:750}.game-list li,.plain-list li{background:#fffefa;border:1px solid #ded4c7;border-radius:.5rem;gap:.4rem;padding:.8rem;display:grid}.game-list li div{flex-wrap:wrap;gap:.5rem;display:flex}.game-list span{color:#645a50}.profile-list strong{align-items:center;gap:.45rem;display:flex}.stats-grid{grid-template-columns:repeat(auto-fit,minmax(8.5rem,1fr))}.stats-grid div{background:#f7f4ee;border:1px solid #ded4c7;border-radius:.45rem;padding:.65rem}.stats-grid dt{color:#645a50;font-size:.76rem;font-weight:800}.stats-grid dd{margin:.15rem 0 0;font-size:1.25rem;font-weight:900}.table-scroll{width:100%;overflow-x:auto}.stats-table{border-collapse:collapse;width:100%;min-width:34rem;font-size:.92rem}.stats-table th,.stats-table td{text-align:left;vertical-align:top;border-bottom:1px solid #ded4c7;padding:.55rem .45rem}.stats-table th{color:#3f372f;font-weight:900}.stats-table td{color:#4f463c;font-weight:700}.sample-hint{background:var(--warning-bg);color:#744600;border:1px solid #d7ad6a;border-radius:999px;width:fit-content;margin-top:.2rem;padding:.08rem .4rem;font-size:.72rem;font-weight:850;display:block}.backup-preview{gap:.85rem}.restore-alert{color:#6f2418;background:#fff1e9;border:1px solid #c85a3f;border-radius:.5rem;gap:.45rem;padding:.75rem;display:grid}.restore-alert p{overflow-wrap:anywhere}.restore-actions{grid-template-columns:repeat(auto-fit,minmax(10rem,1fr));gap:.6rem;display:grid}.danger-action{border-color:var(--danger);color:#8b211d;background:#fff5f0}.confirmation-panel{z-index:3;background:#fffefa;border:2px solid #b33a3a;border-radius:.5rem;gap:.75rem;padding:.85rem;display:grid;position:sticky;bottom:.8rem;left:.8rem;right:.8rem;box-shadow:0 .75rem 1.5rem #201f1b38}.confirmation-panel div{flex-wrap:wrap;gap:.55rem;display:flex}.file-input input{margin-top:.4rem}.error-panel{border-color:#d6aaa5}.active-game,.pass-phone{gap:.85rem}.game-nav{flex-wrap:wrap;gap:.5rem;display:flex}.player-context,.error-text{color:#4e453b;align-items:center;gap:.5rem;font-weight:800;display:flex}.error-text{color:#77221d;border-left:.25rem solid #b33a3a;padding-left:.6rem}.board-shell{--board-size:clamp(17.5rem, 88vw, 34rem);width:var(--board-size);height:var(--board-size);margin:.25rem auto;position:relative}.game-board{border-radius:999px;width:100%;height:100%;margin:0;padding:0;list-style:none;position:absolute;inset:0}.board-area{gap:.6rem;display:grid}.board-legend-controls{justify-content:end;display:flex}.compact-action{min-height:2.25rem;padding:.45rem .7rem;font-size:.82rem}.category-legend{background:#fffefa;border:1px solid #ded4c7;border-radius:.45rem;grid-template-columns:repeat(auto-fit,minmax(9rem,1fr));gap:.45rem .65rem;padding:.65rem;display:grid}.category-legend>span{color:#3f372f;align-items:center;gap:.45rem;min-width:0;font-size:.86rem;font-weight:800;display:flex}.legend-swatch{border:2px solid #3c3026;border-radius:999px;flex:none;width:1rem;height:1rem}.repeat-swatch{background:var(--stone-raised)}.board-square{--square-size:clamp(1rem, calc(var(--board-size) / 15.5), 1.75rem);width:var(--square-size);height:var(--square-size);margin:calc(var(--square-size) / -2);background:var(--square-color);color:#1e1a16;font-size:clamp(.58rem, calc(var(--square-size) * .3), .7rem);transform:rotate(calc((360deg / var(--square-count,28)) * var(--square-index,0))) translate(calc(var(--board-size) / 2 - var(--square-size) / 1.55)) rotate(calc((360deg / var(--square-count,28)) * var(--square-index,0) * -1));border:2px solid #3c3026;border-radius:999px;place-items:center;font-weight:900;display:grid;position:absolute;top:50%;left:50%}.board-square:nth-child(n){--square-count:28}.game-board:has(.board-square:nth-child(35)) .board-square{--square-count:35}.game-board:has(.board-square:nth-child(42)) .board-square{--square-count:42}.board-square:first-child{--square-index:0}.board-square:nth-child(2){--square-index:1}.board-square:nth-child(3){--square-index:2}.board-square:nth-child(4){--square-index:3}.board-square:nth-child(5){--square-index:4}.board-square:nth-child(6){--square-index:5}.board-square:nth-child(7){--square-index:6}.board-square:nth-child(8){--square-index:7}.board-square:nth-child(9){--square-index:8}.board-square:nth-child(10){--square-index:9}.board-square:nth-child(11){--square-index:10}.board-square:nth-child(12){--square-index:11}.board-square:nth-child(13){--square-index:12}.board-square:nth-child(14){--square-index:13}.board-square:nth-child(15){--square-index:14}.board-square:nth-child(16){--square-index:15}.board-square:nth-child(17){--square-index:16}.board-square:nth-child(18){--square-index:17}.board-square:nth-child(19){--square-index:18}.board-square:nth-child(20){--square-index:19}.board-square:nth-child(21){--square-index:20}.board-square:nth-child(22){--square-index:21}.board-square:nth-child(23){--square-index:22}.board-square:nth-child(24){--square-index:23}.board-square:nth-child(25){--square-index:24}.board-square:nth-child(26){--square-index:25}.board-square:nth-child(27){--square-index:26}.board-square:nth-child(28){--square-index:27}.board-square:nth-child(29){--square-index:28}.board-square:nth-child(30){--square-index:29}.board-square:nth-child(31){--square-index:30}.board-square:nth-child(32){--square-index:31}.board-square:nth-child(33){--square-index:32}.board-square:nth-child(34){--square-index:33}.board-square:nth-child(35){--square-index:34}.board-square:nth-child(36){--square-index:35}.board-square:nth-child(37){--square-index:36}.board-square:nth-child(38){--square-index:37}.board-square:nth-child(39){--square-index:38}.board-square:nth-child(40){--square-index:39}.board-square:nth-child(41){--square-index:40}.board-square:nth-child(42){--square-index:41}.square-repeat-throw{background:var(--stone-raised)}.square-category{--square-size:clamp(1.75rem, calc(var(--board-size) / 10), 3rem);border-width:4px;box-shadow:0 0 0 .18rem #b5842347}.destination-square{outline:6px solid var(--focus-ring);outline-offset:3px;z-index:5}.active-player-square{box-shadow:0 0 0 .26rem #fffdf8, 0 0 0 .48rem var(--olive-success);z-index:4}.destination-square.active-player-square{box-shadow:0 0 0 .26rem #fffdf8, 0 0 0 .52rem var(--olive-success);z-index:6}.destination-button{min-height:0;color:inherit;background:0 0;border:0;border-radius:999px;place-items:center;padding:0;display:grid;position:absolute;inset:0}.destination-button:disabled{background:0 0;text-decoration:none}.destination-button:focus-visible{outline-offset:7px;outline:3px solid #fffdf8}.movement-label{z-index:7;color:#211d18;text-align:center;white-space:normal;background:#fffdf8;border:1px solid #cfc4b5;border-radius:.35rem;min-width:max-content;max-width:8.5rem;padding:.25rem .35rem;font-size:.68rem;line-height:1.1;display:grid;position:absolute;bottom:calc(100% + .45rem);left:50%;transform:translate(-50%);box-shadow:0 .25rem .5rem #201f1b24}.board-center-action{z-index:9;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.square-kind{width:calc(var(--square-size) * .52);height:calc(var(--square-size) * .52);background:var(--gold);color:#1e1a16;font-size:clamp(.45rem, calc(var(--square-size) * .26), .72rem);z-index:1;border:1px solid #3c3026b8;border-radius:999px;place-items:center;font-weight:900;line-height:1;display:grid;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.square-normal .square-kind{display:none}.token-stack{z-index:4;max-width:3rem;font-size:clamp(.78rem, calc(var(--square-size) * .48), 1.05rem);filter:drop-shadow(0 1px 1px #fffdf8d9)drop-shadow(0 0 2px #201f1b8c);pointer-events:none;line-height:1;display:flex;position:absolute;bottom:-.35rem;right:-.25rem;overflow:hidden}.scoreboard,.movement-grid,.answer-grid,.answer-question-review,.answer-review,.learning-links,.winner-surface,.result-surface,.question-surface,.final-stats{gap:.65rem;display:grid}.scoreboard{grid-template-columns:repeat(auto-fit,minmax(8.5rem,1fr))}.scoreboard>div{background:#fffefa;border:1px solid #ded4c7;border-radius:.45rem;gap:.45rem;padding:.65rem;display:grid}.scoreboard .active-score{border-color:var(--olive-success);background:#e9f3ed}.category-wedges{gap:.25rem;display:flex}.category-wedges span{background:#f1ebe2;border:1px solid #bfb4a8;border-radius:999px;width:1.1rem;height:1.1rem}.completed-wedge{border-color:#201f1b}.die-button{text-align:center;border-width:3px;border-radius:999px;place-items:center;min-width:clamp(6.4rem,28vw,8rem);min-height:clamp(6.4rem,28vw,8rem);padding:.8rem;font-size:1rem;line-height:1;display:grid;box-shadow:0 .65rem 1.35rem #201f1b3d}.die-button:disabled{border-color:var(--roman-red-dark);background:var(--roman-red);color:#fffefa;text-decoration:none}.die-face{color:#fffefa;background:#fffdf82e;border:2px solid #fffdf8d1;border-radius:.6rem;place-items:center;width:3.1rem;height:3.1rem;font-size:2rem;font-weight:950;display:grid}.rolling-die .die-face{animation:.38s linear infinite die-tumble}.die-result-badge{border-color:var(--olive-success);color:#fffefa;background:#184a39}.compact-die-result{min-width:clamp(4.2rem,18vw,5.2rem);min-height:clamp(4.2rem,18vw,5.2rem);padding:.5rem;font-size:.78rem;box-shadow:0 .4rem .85rem #201f1b2e}.compact-die-result .die-face{border-radius:.45rem;width:2.25rem;height:2.25rem;font-size:1.45rem}@keyframes die-tumble{0%{transform:rotate(0)translate(0)}30%{transform:rotate(14deg)translate(.16rem,-.08rem)}65%{transform:rotate(-12deg)translate(-.14rem,.1rem)}to{transform:rotate(0)translate(0)}}.movement-grid{grid-template-columns:repeat(auto-fit,minmax(12rem,1fr))}.movement-grid button,.answer-grid button{text-align:left;gap:.3rem;display:grid}.question-surface,.result-surface,.winner-surface{border-top:1px solid #e3d9cb;padding-top:.85rem}.question-surface h2,.result-surface h2,.winner-surface h2{font-size:1.35rem;line-height:1.2}.answer-question-review{gap:.3rem}.answer-question-review h3{font-size:1.05rem;line-height:1.3}.correct-choice{border-left:.25rem solid var(--olive-success);color:#184a39;padding-left:.55rem;font-weight:850}.wrong-choice{border-left:.25rem solid var(--danger);color:#77221d;padding-left:.55rem;font-weight:850}.learning-links{align-items:start}.learning-links a{color:var(--roman-red-dark);font-weight:800}@media (width<=380px){.app-shell{padding-inline:.55rem}.panel{padding:.75rem}.content-status dl,.creator-row,.field-inline{grid-template-columns:1fr}}@media (width<=27rem){.content-status dl,.creator-row{grid-template-columns:1fr}}@media (width>=44rem){.app-shell{padding:1.25rem}.quick-actions{grid-template-columns:repeat(2,minmax(0,1fr))}}
