:root{color-scheme:light;--ink:#38291e;--muted:#79674f;--accent:#356551;--paper:#f6efdf;--line:#c9b99c}*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#eee5d3;color:var(--ink);font-family:Tahoma,Arial,sans-serif}body{background-image:url(assets/menu.jpg);background-size:cover}button{font:inherit;border:1px solid var(--line);border-radius:9px;background:#fff9eb;color:var(--ink);padding:10px 16px;cursor:pointer;touch-action:manipulation;transition:background .15s}button:hover:not(:disabled){background:#e8dcc3}button:disabled{opacity:.42;cursor:default}button:focus-visible,canvas:focus-visible{outline:3px solid #3d8970;outline-offset:2px}.primary{background:var(--accent);color:#fff;border-color:var(--accent)}.primary:hover:not(:disabled){background:#284e3e}#game-root{height:100%;height:100dvh;display:flex;flex-direction:column;gap:8px;padding:12px max(12px,env(safe-area-inset-right))max(10px,env(safe-area-inset-bottom))max(12px,env(safe-area-inset-left));max-width:1500px;margin:auto}header{display:flex;align-items:center;justify-content:space-between;flex-shrink:0;gap:8px}.brand{display:flex;align-items:center;gap:10px}.mark{font-size:35px;color:#967341}h1{font-size:22px;margin:0 0 3px}small{display:block;color:var(--muted);font-size:11px}nav{display:flex;gap:6px}nav button{padding:8px 12px;font-size:12px}.players{display:flex;justify-content:space-between;align-items:center;gap:8px;max-width:1080px;width:100%;margin:auto;flex-shrink:0}.player{display:flex;align-items:center;gap:9px;border:1px solid transparent;border-radius:12px;padding:8px 14px;min-width:180px;background:#f7efdfb0}.player.active{border-color:#8a754c;background:#fff9ec;box-shadow:0 2px 8px #5d3d2212}.player strong{font-size:13px}.player small{margin-top:4px}.stone{width:30px;height:30px;border-radius:50%;box-shadow:0 2px 3px #0004,inset 0 0 0 4px #ffffff19;flex-shrink:0}.white{background:#f7ead1;border:1px solid #a89065}.black{background:#333c39;border:1px solid #131e1a}.turn{text-align:center}.turn strong{font-size:14px}.turn small{margin-top:4px}#board-space{min-height:0;min-width:0;flex:1;display:flex;align-items:center;justify-content:center}canvas{display:block;touch-action:none;max-width:100%;max-height:100%;border-radius:12px;box-shadow:0 9px 22px #35200d30}footer{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;flex-shrink:0;max-width:1080px;width:100%;margin:auto}#status{font-size:12px;line-height:1.8;flex:1;margin:0;text-align:center}.actions{display:flex;gap:6px}#dice{display:flex;gap:5px;direction:ltr;min-width:88px;align-items:center}.die{display:grid;grid-template:repeat(3,1fr)/repeat(3,1fr);width:37px;height:37px;background:#f5e8cc url(assets/dice.png)50%/cover;border:1px solid #b5a17e;border-radius:8px;padding:6px;box-shadow:0 2px 3px #503d2025;gap:2px}.die.used{opacity:.25}.pip{width:5px;height:5px;border-radius:50%;background:#3d3329;align-self:center;justify-self:center}.overlay{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;padding:16px;background:#30201166;backdrop-filter:blur(5px);z-index:3}.overlay[hidden]{display:none}.dialog{background:var(--paper)url(assets/menu.jpg)50%/cover;border:1px solid #e5d3ac;box-shadow:0 20px 80px #20160944;border-radius:20px;padding:32px;width:min(520px,100%);max-height:100%;overflow:auto;text-align:center}.eyebrow{font:10px Georgia,serif;letter-spacing:2px;color:#8b7047}h2{font-size:30px;margin:18px 0}#dialog-body{font-size:13px;line-height:2;color:#65523d}#dialog-body ul{text-align:right;padding-right:20px}#dialog-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin-top:22px}.note{font-size:11px;color:#8a765a}kbd{border:1px solid #c7b795;border-radius:3px;padding:0 4px}.menu-ornament{font:50px Georgia;color:#9b7b48;margin:8px}@media(max-width:620px){#game-root{padding:8px;gap:5px}h1{font-size:17px}.brand small{font-size:9px}.mark{display:none}nav button{padding:7px 8px;font-size:11px}.player{min-width:0;padding:6px;gap:5px}.player strong{font-size:10px}.player small{font-size:9px}.stone{width:23px;height:23px}.turn strong{font-size:11px}.turn small{font-size:9px}footer{flex-wrap:wrap;gap:5px;justify-content:space-between}#status{order:3;flex-basis:100%;font-size:11px}.actions button{font-size:12px;padding:9px 12px}.die{width:31px;height:31px;padding:4px}.dialog{padding:23px}h2{font-size:26px}}@media(max-height:480px){#game-root{gap:3px;padding:4px 10px}header{height:31px}h1{font-size:15px}.brand small,.mark,.turn small{display:none}nav button{padding:4px 10px}.players{max-width:850px}.player{padding:3px 10px}.player small{margin-top:1px}.stone{width:23px;height:23px}.turn strong{font-size:11px}footer{min-height:35px;flex-wrap:nowrap}#status{order:0;flex-basis:auto;font-size:10px}.actions button{padding:6px 10px;font-size:11px}.die{width:29px;height:29px;padding:3px}.dialog{padding:16px}h2{margin:8px 0}#dialog-actions{margin-top:10px}}@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}