:root{--peach:#f59b7c;--peach-deep:#e9876a;--sky:#62add3;--sky-deep:#4f9cc4;--coral:#ff5f58;--coral-soft:#ffc9bf;--cyan:#00bfe8;--cyan-soft:#ade6f5;--cream:#fde8d2;--cream-blue:#eaf0e4;--ink:#2f2430;--ink-soft:#5a4a55;--white:#fff;--piece-ring:#160b33;--radius:18%;--bg:var(--peach);--bg-deep:var(--peach-deep);--tile:var(--cream);--wave-ms:.7s;--font:ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}[data-owner=red],[data-last=red],[data-player=red],[data-turn=red]{--c:#ff3b4e;--c-soft:#ffc2c8;--c-ink:#c4102a;--turn-bg:var(--peach);--turn-deep:var(--peach-deep);--turn-tile:var(--cream);--turn-sub:var(--ink-soft)}[data-owner=blue],[data-last=blue],[data-player=blue],[data-turn=blue]{--c:#2e9bff;--c-soft:#bfe0ff;--c-ink:#0062c4;--turn-bg:var(--sky);--turn-deep:var(--sky-deep);--turn-tile:var(--cream-blue);--turn-sub:#1f3c4d}[data-owner=green],[data-last=green],[data-player=green],[data-turn=green]{--c:#5be12c;--c-soft:#cbf5b8;--c-ink:#257a00;--turn-bg:#86c98f;--turn-deep:#6fb87a;--turn-tile:#eef4e0;--turn-sub:#1f4027}[data-owner=yellow],[data-last=yellow],[data-player=yellow],[data-turn=yellow]{--c:#ffd000;--c-soft:#ffefa6;--c-ink:#8a6a00;--turn-bg:#f3c75f;--turn-deep:#e5b443;--turn-tile:#fdf3d8;--turn-sub:#4d3a10}[data-owner=purple],[data-last=purple],[data-player=purple],[data-turn=purple]{--c:#a259ff;--c-soft:#e2ccff;--c-ink:#6a1fd6;--turn-bg:#ae92dc;--turn-deep:#9b7ccf;--turn-tile:#f2ecf8;--turn-sub:#33244d}[data-owner=orange],[data-last=orange],[data-player=orange],[data-turn=orange]{--c:#ff7a1a;--c-soft:#ffd2b0;--c-ink:#b54800;--turn-bg:#f6ad6a;--turn-deep:#ec9952;--turn-tile:#fdecd9;--turn-sub:#4d2e10}[data-owner=teal],[data-last=teal],[data-player=teal],[data-turn=teal]{--c:#00d1c1;--c-soft:#b0f2ec;--c-ink:#007a70;--turn-bg:#6cc3b6;--turn-deep:#55b2a4;--turn-tile:#e5f4ef;--turn-sub:#123f38}[data-owner=pink],[data-last=pink],[data-player=pink],[data-turn=pink]{--c:#ff4fc1;--c-soft:#ffc6eb;--c-ink:#c2117f;--turn-bg:#ee9cc2;--turn-deep:#e486b2;--turn-tile:#fceaf2;--turn-sub:#4d1f36}body[data-turn]{--bg:var(--turn-bg);--bg-deep:var(--turn-deep);--tile:var(--turn-tile)}*,:before,:after{box-sizing:border-box}html,body{height:100%;margin:0}body{font-family:var(--font);color:var(--ink);background:var(--bg);-webkit-tap-highlight-color:transparent;overscroll-behavior:none;touch-action:manipulation;transition:background-color .3s}.sr-only{clip:rect(0 0 0 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.app{min-height:100dvh;padding:max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));display:grid}[hidden]{display:none!important}.btn{font:inherit;appearance:none;cursor:pointer;background:var(--white);min-height:56px;color:var(--ink);border:0;border-radius:999px;flex-direction:column;justify-content:center;align-items:center;gap:2px;padding:12px 22px;font-size:1.1rem;font-weight:800;transition:transform .12s,box-shadow .12s,background-color .2s;display:flex;box-shadow:0 5px #00000021}.btn:hover{transform:translateY(-1px)}.btn:active{transform:translateY(3px);box-shadow:0 2px #00000021}.btn-primary{background:var(--ink);color:var(--white)}.btn-ghost{box-shadow:none;background:#ffffff8c}.btn-title{font-size:1.12rem}.btn-sub{color:var(--ink-soft);font-size:.82rem;font-weight:600}:focus-visible{outline:4px solid var(--ink);outline-offset:3px}.menu{place-self:center;width:min(440px,100%)}.menu-card{text-align:center;flex-direction:column;align-items:center;display:flex}.logo-mark{gap:10px;margin-bottom:4px;display:flex}.logo-mark .piece{width:50px;height:50px;animation:2.6s ease-in-out infinite bob;position:relative}.logo-mark .piece+.piece{animation-delay:-1.3s}.logo-mark .rilto-mark{width:auto;height:50px;animation:2.6s ease-in-out infinite bob;display:block;overflow:visible}.logo{letter-spacing:.01em;text-transform:uppercase;color:var(--white);text-shadow:0 5px #00000029;margin:0;font-size:clamp(3rem,16vw,4.6rem);font-weight:900;line-height:.92}.tagline{margin:10px 0 20px;font-size:1.05rem;font-weight:700}.menu-actions{gap:14px;width:100%;display:grid}.setup{text-align:left;background:#ffffff4d;border-radius:30px;gap:8px;padding:12px 10px 10px;display:grid}.setup-title{margin:0 8px;font-size:1.1rem;font-weight:900}.field{border:0;min-width:0;margin:0;padding:0}.field legend{color:var(--ink-soft);padding:0 10px 4px;font-size:.85rem;font-weight:800}.setup-note{color:var(--ink-soft);margin:2px 10px 0;font-size:.85rem;font-weight:650;line-height:1.35}.setup-keep{color:var(--ink)}.bot-box{background:#ffffff4d;border-radius:34px;gap:8px;padding:8px;display:grid}.segmented{grid-template-columns:repeat(var(--count,3), 1fr);text-align:center;background:#00000014;border:0;border-radius:999px;gap:4px;margin:0;padding:4px;display:grid}.segmented label{position:relative}.segmented input{opacity:0;cursor:pointer;margin:0;position:absolute;inset:0}.segmented span{pointer-events:none;border-radius:999px;padding:10px 4px;font-size:.95rem;font-weight:800;transition:background-color .16s;display:block}.segmented input:checked+span{background:var(--white);box-shadow:0 2px #0000001a}.setup .segmented span{white-space:nowrap;padding:8px 2px;font-size:.9rem}.segmented input:disabled{cursor:not-allowed}.segmented input:disabled+span{opacity:.35;text-decoration:line-through}.segmented input:focus-visible+span{outline:3px solid var(--ink);outline-offset:1px}.game{--board:min(94vw, calc(100dvh - 250px), 560px);grid-template-rows:auto 1fr auto;place-items:center;gap:12px;width:100%;display:grid}.hud{width:min(var(--board), 100%);flex-direction:column;align-items:center;gap:6px;display:flex}.score{background:var(--white);font-variant-numeric:tabular-nums;border-radius:28px;flex-wrap:wrap;justify-content:center;gap:4px 6px;max-width:100%;margin:0;padding:5px 10px;font-size:1.15rem;font-weight:900;list-style:none;display:flex;box-shadow:0 4px #0000001a}body[data-seats="2"] .score{font-size:1.6rem}body[data-seats="3"] .score,body[data-seats="4"] .score{font-size:1.4rem}.chip{color:var(--c-ink);border-radius:999px;align-items:center;gap:5px;padding:2px 8px 2px 3px;transition:background-color .2s,opacity .2s;display:inline-flex}.chip[data-active=true]{background:var(--c-soft)}.chip-seat{background:var(--c);width:1.15em;height:1.15em;color:var(--white);border-radius:50%;place-items:center;font-size:.62em;line-height:1;display:grid}.chip[data-out=true]{opacity:.4}.chip[data-out=true] .chip-count{text-decoration:line-through;text-decoration-thickness:3px}.rule-badge{background:#ffffff73;border-radius:999px;margin:0;padding:3px 12px;font-size:.85rem;font-weight:800}.status{text-align:center;min-height:3.3em}.status p{margin:0}.status-main{font-size:clamp(1.35rem,5vw,1.8rem);font-weight:900}.status-sub{color:var(--ink-soft);font-weight:650}body[data-turn] .status-sub{color:var(--turn-sub)}.board-wrap{width:var(--board);height:var(--board);position:relative}.board{--gap:calc(var(--board) * .11 / var(--n,5));grid-template-rows:repeat(var(--n,5), 1fr);gap:var(--gap);width:100%;height:100%;display:grid}.row{grid-template-columns:repeat(var(--n,5), 1fr);gap:var(--gap);display:grid}.cell{appearance:none;font:inherit;border-radius:var(--radius);background:var(--tile);cursor:default;border:0;place-items:center;margin:0;padding:0;transition:background-color .3s,transform .14s;display:grid;position:relative;box-shadow:inset 0 -4px #0000000d}.cell[data-legal=true]{cursor:pointer}.cell[data-legal=true]:hover{transform:scale(1.04)}.cell[data-legal=true]:active{transform:scale(.96)}.cell[data-last]{background:var(--c-soft)}.cell[data-wall=true]{cursor:not-allowed;background:repeating-linear-gradient(135deg,#2f243057 0 4px,#2f243038 4px 9px);box-shadow:inset 0 3px #0000001f}.cell[data-seat]:before{content:attr(data-seat);z-index:1;font-size:max(10px, calc(var(--board) / var(--n,5) * .2));color:var(--ink);opacity:.7;pointer-events:none;font-weight:900;line-height:1;position:absolute;top:3%;left:7%}body[data-phase=setup]:not([data-seats="2"]) .cell[data-legal=true]{box-shadow:inset 0 -4px #0000000d,inset 0 0 0 3px #ffffffe6}body[data-phase=setup] .cell[data-legal=true]:not(:hover){animation:2.2s ease-in-out infinite invite}.cell:focus-visible{outline:4px solid var(--ink);outline-offset:2px;z-index:1}.piece{background:var(--c,var(--coral));box-shadow:inset 0 0 0 2px var(--piece-ring), inset 0 -5px 0 #0000001f;border-radius:50%;transition:background-color .22s;position:absolute;inset:11%}.piece i{background:var(--white);width:18%;height:18%;transform:translate(var(--pip-x,0%), var(--pip-y,0%));border-radius:50%;margin:-9% 0 0 -9%;transition:transform .1s;position:absolute;top:50%;left:50%}.piece[data-pips="2"] i:first-child{--pip-x:-94.444%;--pip-y:-94.444%}.piece[data-pips="2"] i:nth-child(2){--pip-x:94.444%;--pip-y:94.444%}.piece[data-pips="3"] i:first-child{--pip-x:0.0%;--pip-y:-111.111%}.piece[data-pips="3"] i:nth-child(2){--pip-x:-111.111%;--pip-y:72.222%}.piece[data-pips="3"] i:nth-child(3){--pip-x:111.111%;--pip-y:72.222%}.piece[data-pips="4"] i:first-child{--pip-x:-100.0%;--pip-y:-100.0%}.piece[data-pips="4"] i:nth-child(2){--pip-x:100.0%;--pip-y:-100.0%}.piece[data-pips="4"] i:nth-child(3){--pip-x:-100.0%;--pip-y:100.0%}.piece[data-pips="4"] i:nth-child(4){--pip-x:100.0%;--pip-y:100.0%}.piece[data-pips="5"] i,.piece[data-pips="6"] i,.piece[data-pips="7"] i{width:15%;height:15%;margin:-7.5% 0 0 -7.5%}.piece[data-pips="5"] i:first-child{--pip-x:-133.333%;--pip-y:-133.333%}.piece[data-pips="5"] i:nth-child(2){--pip-x:133.333%;--pip-y:-133.333%}.piece[data-pips="5"] i:nth-child(3){--pip-x:0.0%;--pip-y:0.0%}.piece[data-pips="5"] i:nth-child(4){--pip-x:-133.333%;--pip-y:133.333%}.piece[data-pips="5"] i:nth-child(5){--pip-x:133.333%;--pip-y:133.333%}.piece[data-pips="6"] i:first-child{--pip-x:-113.333%;--pip-y:-153.333%}.piece[data-pips="6"] i:nth-child(2){--pip-x:113.333%;--pip-y:-153.333%}.piece[data-pips="6"] i:nth-child(3){--pip-x:-113.333%;--pip-y:0.0%}.piece[data-pips="6"] i:nth-child(4){--pip-x:113.333%;--pip-y:0.0%}.piece[data-pips="6"] i:nth-child(5){--pip-x:-113.333%;--pip-y:153.333%}.piece[data-pips="6"] i:nth-child(6){--pip-x:113.333%;--pip-y:153.333%}.piece[data-pips="7"] i:first-child{--pip-x:0.0%;--pip-y:0.0%}.piece[data-pips="7"] i:nth-child(2){--pip-x:0.0%;--pip-y:-173.333%}.piece[data-pips="7"] i:nth-child(3){--pip-x:0.0%;--pip-y:173.333%}.piece[data-pips="7"] i:nth-child(4){--pip-x:-153.333%;--pip-y:-86.667%}.piece[data-pips="7"] i:nth-child(5){--pip-x:153.333%;--pip-y:-86.667%}.piece[data-pips="7"] i:nth-child(6){--pip-x:-153.333%;--pip-y:86.667%}.piece[data-pips="7"] i:nth-child(7){--pip-x:153.333%;--pip-y:86.667%}.piece[data-numeric=true]{color:var(--piece-ring);font-variant-numeric:tabular-nums;place-items:center;font-size:clamp(16px,4vmin,30px);font-weight:900;display:grid}.hud{position:relative}.skip-animation{z-index:3;background:var(--white);border-radius:16px;max-width:100%;min-height:44px;padding:6px 12px;font-size:.8rem;position:absolute;top:100%;right:0;box-shadow:0 2px 8px #0002}.cell .piece{transition:none}.cell .piece.pop{animation:.26s ease-out pop}.cell .piece.charged{animation:.9s ease-in-out infinite charge}.cell .piece.bursting{animation:burst var(--wave-ms) ease-in forwards}.fx{pointer-events:none;position:absolute;inset:0}.fly{box-shadow:inset 0 0 0 2px var(--piece-ring), inset 0 -5px 0 #0000001f;background:var(--c);border-radius:50%;position:absolute;transform:translate(-50%,-50%)}.fly i{background:var(--white);border-radius:50%;width:18%;height:18%;position:absolute;top:41%;left:41%}.toolbar{width:min(var(--board), 100%);grid-template-columns:repeat(3,1fr);gap:10px;display:grid}.tool{font:inherit;appearance:none;cursor:pointer;min-height:60px;color:var(--ink);background:#ffffffd9;border:0;border-radius:20px;flex-direction:column;align-items:center;gap:2px;padding:8px 4px;font-size:.85rem;font-weight:800;transition:transform .12s,opacity .2s;display:flex;box-shadow:0 4px #0000001a}.tool:active{transform:translateY(3px);box-shadow:0 1px #0000001a}.tool:disabled{opacity:.45;cursor:not-allowed;transform:none}.tool svg{fill:none;stroke:currentColor;stroke-width:2.4px;stroke-linecap:round;stroke-linejoin:round;width:24px;height:24px}.dialog{background:var(--white);width:min(480px,100vw - 28px);max-height:calc(100dvh - 28px);color:var(--ink);border:0;border-radius:28px;padding:0;box-shadow:0 18px 60px #0000004d}.dialog::backdrop{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);background:#2f243073}.dialog[open]{animation:.22s ease-out rise}.dialog form{padding:24px 22px 20px}.dialog h2{margin:0 0 12px;font-size:1.55rem;font-weight:900}.dialog h3{margin:18px 0 6px;font-size:1.05rem}.dialog p,.dialog li{line-height:1.45}.rules{gap:8px;margin:0;padding-left:1.25em;display:grid}.variants{gap:4px;margin:0;padding-left:1.1em;display:grid}.keys{margin:0;padding-left:1.1em}kbd{font:inherit;background:#f1e7e2;border-bottom:2px solid #d8c8c0;border-radius:6px;padding:1px 6px;font-size:.85em;font-weight:800}.note{color:var(--ink-soft);font-size:.92rem}.dialog-actions{flex-wrap:wrap;justify-content:flex-end;gap:10px;margin-top:18px;display:flex}.dialog-actions .btn{background-color:#f3ebe7;flex:auto;min-height:50px}.dialog-actions .btn-primary{background:var(--ink)}.dialog-over form{text-align:center}.over-badge{width:84px;height:84px;margin:0 auto 8px;position:relative}.over-badge .piece{animation:2s ease-in-out infinite bob;inset:0}.noscript{text-align:center;padding:2rem;font-weight:800}@media (orientation:landscape) and (max-height:620px){.game{--board:min(calc(100dvh - 28px), calc(100vw - 260px), 560px);grid-template-rows:1fr auto;grid-template-columns:200px auto;justify-content:center;column-gap:22px}.hud{grid-area:1/1;align-self:end;width:200px}.board-wrap{grid-area:1/2/span 2}.toolbar{grid-area:2/1;grid-template-columns:repeat(3,1fr);align-self:start;gap:6px;width:200px}}@media (max-width:640px) and (orientation:portrait){.game[data-size="7"],.game[data-size="8"]{--board:min(96vw, 600px)}}@media (min-width:900px) and (min-height:760px){.game{--board:min(calc(100dvh - 300px), 600px)}}body[data-arena]{--bg:var(--arena-bg);--bg-deep:var(--arena-line);--tile:var(--arena-surface);--ink:var(--arena-ink);--ink-soft:var(--arena-muted);background:var(--arena-pattern) center/480px, var(--arena-bg)}.app{grid-template-rows:minmax(0,1fr);height:100dvh;min-height:0}.game{height:100%;min-height:0}body[data-arena] .hud{border:1px solid var(--arena-line);background:var(--arena-surface);border-radius:18px;width:min(600px,100%);padding:12px}body[data-arena] .score{background:var(--arena-bg);box-shadow:none}body[data-arena] .status-main{background:var(--c-soft);color:var(--c-ink);border-left:5px solid var(--c);border-radius:8px;padding:3px 12px}body[data-arena] .status-sub{color:var(--arena-muted)}body[data-arena] .chip[data-active=true]{outline:2px solid var(--c-ink);outline-offset:1px}body[data-arena] .rule-badge{background:var(--arena-bg);color:var(--arena-ink)}body[data-arena] .board-wrap{outline:2px solid var(--arena-line);outline-offset:7px;background:var(--arena-bg);border-radius:16px}body[data-arena=fortress] .board-wrap{border-radius:2px;outline-width:4px}body[data-arena=diagonal] .board-wrap{background:var(--arena-pattern) center/120px,var(--arena-bg)}body[data-arena=crossfire] .board-wrap{box-shadow:0 0 45px #8b7a9c55}body[data-arena] .cell:not([data-last]):not([data-wall=true]){background:var(--arena-surface);outline:1px solid var(--arena-line);outline-offset:-1px}body[data-arena] .cell[data-wall=true]{background:repeating-linear-gradient(135deg,transparent 0 4px,var(--arena-wall) 4px 7px),var(--arena-bg)}body[data-arena] .cell[data-seat]:before{color:#302630}body[data-arena] .tool{background:var(--arena-surface);color:var(--arena-ink);border:1px solid var(--arena-line)}body[data-arena] .dialog{background:var(--arena-surface);color:var(--arena-ink);border:2px solid var(--arena-line);overflow:auto}body[data-arena] .dialog h2{background:var(--arena-emblem) left center/28px no-repeat;padding-left:36px}body[data-arena] .dialog-actions{background:var(--arena-surface);padding:8px 0;position:sticky;bottom:0}body[data-arena] .dialog-actions .btn{background:var(--arena-bg);color:var(--arena-ink)}body[data-arena] .dialog-actions .btn-primary{background:var(--arena-card);color:var(--arena-card-ink)}@media (max-width:640px) and (orientation:portrait){.game,.game[data-size="7"],.game[data-size="8"]{--board:min(calc(100vw - 40px),calc(100dvh - 240px),560px)}body[data-arena] .hud{gap:4px;padding:7px}.game{gap:10px}.tool{min-height:50px}}@media (orientation:landscape) and (max-height:620px){.game{--board:min(calc(100dvh - 48px),calc(100vw - 280px),560px)}body[data-arena] .hud{width:200px;padding:8px}.status-main{font-size:20px}.status-sub{font-size:12px}}@media (max-height:320px){.game{overflow:auto}}.chip-seat{color:var(--piece-ring)}body[data-arena] .chip{color:var(--arena-ink)}body[data-arena] .status-main{color:var(--arena-ink);background:var(--arena-bg);border-left:0}body[data-arena] .status-main:before{content:"";background:var(--c);border:1px solid var(--arena-ink);border-radius:50%;width:12px;height:12px;margin-right:7px;display:inline-block}.piece i,.fly i{background:var(--piece-ring)}.game{grid-template-rows:auto minmax(0,1fr) auto;gap:10px}.board-slot{place-items:center;width:100%;min-width:0;height:100%;min-height:0;padding:10px;display:grid;container-type:size}.game .board-wrap{--board:min(100cqw,100cqh,600px);width:var(--board);height:var(--board);grid-area:auto}body[data-arena] .hud{gap:4px;width:min(600px,100%);padding:6px}.score{grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;width:100%;padding:4px;font-size:16px;display:grid}body[data-seats="2"] .score{grid-template-columns:repeat(2,minmax(0,1fr))}body[data-seats="3"] .score{grid-template-columns:repeat(3,minmax(0,1fr))}.chip{justify-content:center;gap:4px;padding:2px}.chip-seat{width:20px;height:20px;font-size:12px}.status{min-height:0}.status-main{font-size:20px}.status-sub,.rule-badge{font-size:12px}.toolbar{width:min(600px,100%)}.tool{flex-direction:row;justify-content:center;min-height:48px;padding:4px}@media (orientation:landscape) and (max-height:620px){.game{grid-template-rows:minmax(0,1fr) 48px;grid-template-columns:200px minmax(0,1fr);gap:10px 22px}.board-slot{grid-area:1/2/span 2}body[data-arena] .hud,.toolbar{width:200px}.score{grid-template-columns:repeat(4,minmax(0,1fr))}.chip{gap:2px}}@keyframes pop{0%{transform:scale(.6)}70%{transform:scale(1.1)}to{transform:scale(1)}}@keyframes charge{50%{transform:scale(1.06)}}@keyframes burst{0%{opacity:1;transform:scale(1)}45%{opacity:1;transform:scale(1.22)}to{opacity:0;transform:scale(.2)}}@keyframes invite{50%{box-shadow:inset 0 -4px #0000000d,0 0 0 4px #ffffff8c}}@keyframes bob{50%{transform:translateY(-6px)}}@keyframes rise{0%{opacity:0;transform:translateY(16px)scale(.98)}}@media (prefers-reduced-motion:reduce){*,:before,:after{transition-duration:1ms!important;animation-duration:1ms!important;animation-iteration-count:1!important}}[data-arena=classic]{--arena-card:#301e22;--arena-card-ink:#fff3e7;--arena-accent:#ffae96;--arena-bg:#fff1df;--arena-surface:#fffaf2;--arena-ink:#34252a;--arena-muted:#665154;--arena-line:#9a7a6c;--arena-wall:#65534e;--arena-emblem:url(./emblem-CWEUG3qT.svg);--arena-card-art:url(./card-backdrop-CPLzXqiy.svg);--arena-pattern:url(./arena-pattern-CTowpJgm.svg)}[data-arena=fortress]{--arena-card:#182831;--arena-card-ink:#f8f1de;--arena-accent:#ffd078;--arena-bg:#eff2ef;--arena-surface:#fafcf8;--arena-ink:#22323c;--arena-muted:#4c606a;--arena-line:#73858b;--arena-wall:#52626a;--arena-emblem:url(./emblem-BgxyTork.svg);--arena-card-art:url(./card-backdrop-D_6f9RIe.svg);--arena-pattern:url(./arena-pattern-BY1_0rkq.svg)}[data-arena=crossfire]{--arena-card:#251d39;--arena-card-ink:#f7f0ff;--arena-accent:#d8b3ff;--arena-bg:#f3eff8;--arena-surface:#fdfbff;--arena-ink:#322840;--arena-muted:#61546e;--arena-line:#8b7a9c;--arena-wall:#64576d;--arena-emblem:url(./emblem-B5oumel8.svg);--arena-card-art:url(./card-backdrop-CTHrUtH7.svg);--arena-pattern:url(./arena-pattern-DBeK0gz4.svg)}[data-arena=diagonal]{--arena-card:#142f2c;--arena-card-ink:#edf8ed;--arena-accent:#a6e4bd;--arena-bg:#edf5ec;--arena-surface:#fafdf6;--arena-ink:#203b33;--arena-muted:#4b675b;--arena-line:#71907c;--arena-wall:#4f695d;--arena-emblem:url(./emblem-BArk_t3C.svg);--arena-card-art:url(./card-backdrop-BycqIDay.svg);--arena-pattern:url(./arena-pattern-rRXPYr4Y.svg)}[data-arena] .theme-card{background-color:var(--arena-card);color:var(--arena-card-ink)}[data-arena] .theme-arena{background-color:var(--arena-bg);color:var(--arena-ink)}[data-arena] .theme-empty-cell{background-color:var(--arena-surface);border:1px solid var(--arena-line)}[data-arena] .theme-caption{color:var(--arena-muted)}[data-arena] .theme-action{background:var(--arena-accent);color:var(--arena-card);min-height:44px}[data-arena] .theme-action:focus-visible{outline:3px solid var(--arena-card-ink);outline-offset:3px}body[data-screen=menu]{--ink:#2f2430;--ink-soft:#5a4a55;background:var(--peach);color:var(--ink)}#menu{--gap:14px;grid-template-rows:minmax(0,1fr);place-self:center;width:min(440px,100%);height:100%;min-height:0;display:grid}#menu h1,#menu h2,#menu p{margin:0}#menu .setup{background:0 0;border-radius:0;grid-template-rows:minmax(0,100%);height:100%;min-height:0;padding:0;display:grid}.menu-panel{height:100%;min-height:0}#home-screen{align-items:center;gap:var(--gap);flex-direction:column;padding:6px 4px 10px;display:flex;overflow:auto}.menu-brand{text-align:center;flex-direction:column;align-items:center;margin-top:auto;display:flex}#menu .tagline{margin:10px 0 0}#menu .menu-actions{gap:12px;margin-bottom:auto}#menu .btn{text-align:center;width:100%}#menu .btn-primary .btn-sub{color:#fffc}.menu-actions:has(#btn-resume:not([hidden])) #btn-local{background:var(--white);color:var(--ink)}.menu-actions:has(#btn-resume:not([hidden])) #btn-local .btn-sub{color:var(--ink-soft)}.bot-box{padding:6px}#menu .segmented label{min-width:44px;min-height:44px;display:grid}#menu .segmented span{white-space:nowrap;place-items:center;min-height:44px;padding:4px 2px;display:grid}.menu-more{grid-template-columns:minmax(0,1fr) auto;gap:8px;display:grid}#menu .menu-more .btn{min-height:56px;padding:8px 16px}#menu .btn-settings{text-align:left;border-radius:28px;align-items:flex-start}#menu .btn-settings .btn-title{font-size:1rem}#menu .btn-settings .btn-title:after{content:" ›"}#menu .btn-settings .btn-sub{font-size:.78rem;line-height:1.25}#btn-help-menu{font-size:1rem}#setup-screen{text-align:left;background:#ffffff4d;border-radius:30px;grid-template-rows:auto minmax(0,1fr);align-self:center;gap:8px;height:auto;max-height:100%;padding:12px 10px 10px;display:grid}.setup-heading{justify-content:space-between;align-items:center;gap:10px;padding:0 0 0 8px;display:flex}.setup-heading-text{min-width:0}#setup-title{margin:0;font-size:1.1rem;font-weight:900}#setup-summary,#menu-summary{text-wrap:pretty}#setup-summary{color:var(--ink-soft);font-size:.78rem;font-weight:700;line-height:1.25}#menu #btn-back{flex:none;width:auto;min-width:96px;min-height:48px;padding:8px 20px}.setup-body{align-content:start;gap:8px;min-height:0;padding:2px;display:grid;overflow:auto}.setup-col{align-content:start;gap:8px;min-width:0;display:grid}#menu .field legend{padding:0 10px 3px}#menu .setup-note{margin:0 10px;font-size:.78rem;line-height:1.3}#setup-note{display:none}.rule-options{background:#00000014;border-radius:24px;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;padding:4px;display:grid}.rule-option{min-width:0;min-height:44px;position:relative}.rule-option input{opacity:0;cursor:pointer;z-index:1;width:100%;height:100%;margin:0;position:absolute;inset:0}.rule-face{text-align:center;pointer-events:none;border-radius:20px;flex-direction:column;justify-content:center;align-items:center;gap:3px;height:100%;padding:6px 2px;transition:background-color .16s;display:flex}.rule-option input:checked+.rule-face{background:var(--white);box-shadow:0 2px #0000001a}.rule-option input:focus-visible+.rule-face{outline:3px solid var(--ink);outline-offset:1px}.rule-name{-webkit-hyphens:manual;hyphens:manual;font-size:.88rem;font-weight:850;line-height:1.1}.rule-fact{color:var(--ink-soft);font-size:.72rem;font-weight:700}.direction-map{grid-template-rows:repeat(3,13px);grid-template-columns:repeat(3,13px);gap:1px;font-size:10px;font-weight:900;line-height:1;display:grid}.direction-map>span{place-items:center;display:grid}.direction-map .direction-arrow{color:#c8342d}.direction-map .direction-center{background:var(--ink);color:var(--white);border-radius:50%;font-size:9px}#mode-detail #mode-title{font-weight:900}#mode-facts{color:var(--ink);font-weight:800}.reflection-switch{cursor:pointer;align-items:center;gap:10px;min-height:44px;padding:0 10px;font-size:.85rem;font-weight:800;display:flex}.reflection-switch input{width:22px;height:22px;accent-color:var(--ink);flex:none}.reflection-switch:focus-within{outline:3px solid var(--ink);border-radius:12px}.scoring-settings{grid-template-columns:minmax(0,1fr) minmax(0,1.55fr);align-items:end;gap:6px;min-width:0;display:grid}.scoring-settings label{flex-direction:column;gap:2px;min-width:0;font-size:.7rem;font-weight:800;display:flex}#scoring-limits{grid-template-columns:minmax(0,1.4fr) minmax(66px,.8fr);gap:4px;min-width:0;display:grid}.scoring-settings select{width:100%;min-width:44px;min-height:44px;font:inherit;color:inherit;background:var(--white);border:1px solid;border-radius:12px;padding:3px}.game:has(.score[data-scoring=cumulative]) .toolbar .tool{min-width:0;padding-inline:4px}.scoring-progress{text-align:center;max-width:100%;margin:0;font-size:12px;font-weight:800;line-height:1.2}.score[data-scoring=cumulative] .chip[data-out=true] .chip-count{text-decoration:none}.score[data-scoring=cumulative] .chip[data-active=true]{opacity:1}.score[data-scoring=cumulative] .chip-count{overflow-wrap:anywhere;font-variant-numeric:tabular-nums;min-width:0}#reflection-note{display:none}#menu #setup-keep{font-size:.7rem}@media (min-width:700px) and (max-height:850px){#menu:has(#setup-screen:not([hidden])){width:min(780px,100%)}.setup-body{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}}@media (max-width:420px),(orientation:landscape) and (max-height:540px){#mode-detail{display:none}.scoring-settings{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr) minmax(48px,.55fr)}#scoring-limits{display:contents}.scoring-settings label{flex-direction:column;align-items:stretch}#menu #setup-keep{font-size:.7rem;line-height:1.05}#menu .setup-col>.setup-note{margin-block:0}#menu .setup-heading{padding:0}#menu #btn-back{min-height:44px}#menu #setup-screen{gap:1px;padding-block:2px}#menu .setup-body{padding-block:0}#menu .setup-col:has(>.territory-switch){row-gap:0}#menu .setup-col>.reflection-switch,#menu .setup-col>.territory-switch{font-size:.72rem}#menu .field:has(input[name=walls]) .segmented span{font-size:.7rem}}.appearance-setting{align-items:center;gap:8px;min-width:0;min-height:44px;padding:0 6px;font-size:.78rem;font-weight:800;display:flex}.appearance-setting select{min-width:0;min-height:44px;font:inherit;color:inherit;background:var(--white);border:1px solid;border-radius:12px;flex:1;padding:4px}@media (max-height:700px){#menu .setup-col>.field:has(input[name=walls]){grid-area:2/1}#menu .setup-col>.appearance-setting{flex-direction:column;grid-area:2/2;justify-content:end;align-items:stretch;gap:1px;padding:0;font-size:.78rem}#menu .appearance-setting select{flex:none;width:100%}#menu .setup-col>.reflection-switch,#menu .setup-col>.territory-switch{grid-row:3}#menu .field:has(input[name=walls]) .segmented{gap:0;padding:0}#menu .field:has(input[name=walls]) legend{padding-left:4px}}@media (max-height:700px) and (max-width:420px){#menu .setup-col>.field:has(input[name=size]){grid-row:1}#menu .setup-col>#size-note{white-space:nowrap;text-overflow:ellipsis;pointer-events:none;grid-area:1/1/auto/-1;place-self:start end;max-width:calc(100% - 6.5em);margin:0 4px 0 0;line-height:1;overflow:hidden}#menu .setup-col>.setup-note:not(#size-note){margin-block:-1px;padding-block:1px;overflow:hidden}}@media (max-height:700px){#menu{--gap:10px}.logo-mark .rilto-mark{height:40px}#menu .logo{font-size:clamp(2.6rem,13vw,3.6rem)}#menu .tagline{margin-top:6px;font-size:.95rem}#menu .menu-actions{gap:9px}#menu .menu-actions>.btn,#menu #btn-bot{min-height:52px;padding:7px 18px}#mode-description{display:none}.setup-body,.setup-col{gap:5px}#menu .field legend{padding:0 10px 1px;font-size:.78rem}#menu .setup .segmented,.rule-options{gap:2px;padding:2px}}@media (max-width:420px){body[data-screen=menu] .app{padding:max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left))}#menu .segmented:has(input[name=players]){border-radius:24px;grid-template-columns:repeat(4,minmax(44px,1fr))}#menu .setup-note{margin:0 6px;font-size:.7rem;line-height:1.22}#setup-screen{border-radius:24px;gap:3px;padding:4px 6px}.rule-face{gap:1px;padding:3px 1px}.rule-name{font-size:.76rem}.rule-fact{display:none}.direction-map{grid-template-rows:repeat(3,7px);grid-template-columns:repeat(3,8px);font-size:8px}.setup-body,.setup-col{gap:1px}#menu .field legend{line-height:1}#mode-detail{line-height:1.15}#menu .setup-note{line-height:1.1}#menu #btn-back{min-width:84px;padding:6px 16px}}@media (orientation:landscape) and (max-height:540px) and (min-width:560px){#menu{width:min(780px,100%)}#home-screen{flex-direction:row;justify-content:center;align-items:center;gap:28px;padding:4px}.menu-brand{flex:1 1 0;min-width:0;margin:auto 0}#menu .menu-actions{flex:0 360px;gap:7px;min-width:0;margin:auto 0}#menu .menu-actions>.btn,#menu #btn-bot{min-height:48px;padding:5px 16px}#menu .btn-sub{font-size:.74rem}.bot-box{gap:5px;padding:5px}#menu .menu-more .btn{min-height:48px;padding:5px 14px}#menu .tagline{font-size:.9rem}#setup-screen{gap:6px;width:100%;padding:8px 10px}.setup-body{grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:14px}#menu .segmented:has(input[name=players]){border-radius:24px;grid-template-columns:repeat(4,minmax(44px,1fr))}#menu .setup-note{font-size:.7rem;line-height:1.1}.setup-body,.setup-col{row-gap:1px}#menu .field legend{line-height:1}.rule-fact{display:none}}@media (max-height:420px) and (max-width:480px),(max-height:300px){#setup-screen{flex-direction:column;height:100%;display:flex;overflow:auto}#setup-screen .setup-body{flex:none;overflow:visible}.logo-mark .rilto-mark{height:32px}#menu .logo{font-size:2rem}}.sound-button{z-index:2;top:max(8px, env(safe-area-inset-top));right:max(8px, env(safe-area-inset-right));width:44px;height:44px;color:var(--ink);cursor:pointer;background:#ffffffd9;border:0;border-radius:50%;place-items:center;padding:0;display:none;position:fixed;box-shadow:0 3px #0000001a}body[data-screen=menu]:has(#menu[data-panel=home]) .sound-button{display:grid}.sound-button:active{transform:translateY(2px);box-shadow:0 1px #0000001a}.sound-button:focus-visible{outline:3px solid var(--ink);outline-offset:2px}.sound-button svg{fill:none;stroke:currentColor;stroke-width:2.2px;stroke-linecap:round;stroke-linejoin:round;width:24px;height:24px}.sound-button .sound-off,.sound-button[data-muted=true] .sound-waves{display:none}.sound-button[data-muted=true] .sound-off{display:inline}.dialog-sound form{gap:6px;display:grid}.dialog-sound h2{margin-bottom:4px}.sound-switch{cursor:pointer;align-items:center;gap:12px;min-height:48px;font-weight:800;display:flex}.sound-switch input{width:24px;height:24px;accent-color:var(--ink);cursor:pointer;flex:none;margin:0}.sound-channels{border:0;gap:2px;margin:0;padding:0 0 0 4px;transition:opacity .16s;display:grid}.sound-channels:disabled{opacity:.45}.sound-line{grid-template-columns:minmax(7.5em,auto) minmax(0,1fr);align-items:center;column-gap:12px;display:grid}.sound-level{align-items:center;min-width:0;min-height:48px;display:flex}.sound-level input{width:100%;min-width:0;height:44px;accent-color:var(--ink);cursor:pointer;margin:0}.dialog-sound .note{margin:4px 0 0}@media (max-width:360px){.sound-line{grid-template-columns:1fr}}.territory{display:none}.board-slot[data-chart]{--strip-min:40px;--strip-max:56px;--strip-gap:20px;--edge:2px;--frame:calc(7px + var(--edge));place-content:center;place-items:center;gap:var(--strip-gap);grid-auto-flow:row;display:grid}body[data-arena=fortress] .board-slot[data-chart]{--edge:4px}.game .board-slot[data-chart]>*{--strip:clamp(var(--strip-min), calc(100cqh - min(100cqw, 600px) - var(--strip-gap)), var(--strip-max));--board:min(100cqw, calc(100cqh - var(--strip) - var(--strip-gap)), 600px)}.game .board-slot[data-chart]>.board-wrap{width:var(--board);height:var(--board)}.board-slot[data-chart]>.territory:not([hidden]){--long:calc(var(--board) + 2 * var(--frame));width:var(--long);height:var(--strip);border:var(--edge) solid var(--arena-line,#9a7a6c);background:var(--arena-bg,#fff1df);border-radius:10px;margin:0;display:block;position:relative;overflow:hidden}body[data-arena=fortress] .territory{border-radius:2px}.territory-plot{width:100%;height:100%;display:block;position:absolute;inset:0;overflow:visible}.territory .band{fill:var(--c)}.territory .edge{fill:none;stroke:var(--arena-surface,#fff);stroke-opacity:.9;stroke-width:1px;vector-effect:non-scaling-stroke;stroke-linejoin:miter}@media (max-height:600px),(max-width:360px){.board-slot[data-chart]{--strip-min:32px;--strip-gap:18px}}.territory-switch{cursor:pointer;align-items:center;gap:10px;min-height:44px;padding:0 10px;font-size:.85rem;font-weight:800;display:flex}.territory-switch input{width:22px;height:22px;accent-color:var(--ink);flex:none}.territory-switch:focus-within{outline:3px solid var(--ink);border-radius:12px}@media (max-height:700px){.setup-col:has(>.territory-switch){grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-auto-flow:dense;column-gap:4px}.setup-col:has(>.territory-switch)>*{grid-column:1/-1}.setup-col>.reflection-switch{grid-column:1}.setup-col>.territory-switch{grid-column:2}.setup-col>.reflection-switch,.setup-col>.territory-switch{gap:8px;padding:0 6px;font-size:.78rem;line-height:1.15}}body[data-appearance=rilto],body[data-appearance=auto][data-arena=classic],body[data-appearance=auto][data-screen=menu][data-arena]{--appearance-bg:#5b2eff;--appearance-on-bg:#fff;--appearance-surface:#fff9f0;--appearance-well:#ece4ff;--appearance-ink:#160b33;--appearance-muted:#4e4270;--appearance-line:#160b33;--appearance-accent:#c6ff1a;--appearance-on-accent:#160b33;--appearance-select:#5b2eff;--appearance-on-select:#fff;--appearance-pop:#160b33;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}body[data-appearance=neon]{--appearance-bg:#0e0727;--appearance-on-bg:#fff;--appearance-surface:#1d1245;--appearance-well:#2c1d66;--appearance-ink:#f7f3ff;--appearance-muted:#c9bff2;--appearance-line:#a898f0;--appearance-accent:#19e3ff;--appearance-on-accent:#0e0727;--appearance-select:#19e3ff;--appearance-on-select:#0e0727;--appearance-pop:#ff3dc8;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}body[data-appearance=mango],body[data-appearance=auto][data-arena=crossfire]{--appearance-bg:#ff7a1a;--appearance-on-bg:#160b33;--appearance-surface:#fff8ee;--appearance-well:#ffe1c4;--appearance-ink:#160b33;--appearance-muted:#5c3b45;--appearance-line:#160b33;--appearance-accent:#5b2eff;--appearance-on-accent:#fff;--appearance-select:#5b2eff;--appearance-on-select:#fff;--appearance-pop:#fff8ee;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}body[data-appearance=lagune],body[data-appearance=auto][data-arena=fortress]{--appearance-bg:#00c2f0;--appearance-on-bg:#06223d;--appearance-surface:#f2fcff;--appearance-well:#c9f1ff;--appearance-ink:#06223d;--appearance-muted:#2d4f66;--appearance-line:#06223d;--appearance-accent:#ff2e93;--appearance-on-accent:#06223d;--appearance-select:#06223d;--appearance-on-select:#f2fcff;--appearance-pop:#ff2e93;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}body[data-appearance=auto][data-arena=diagonal]{--appearance-bg:#b8f200;--appearance-on-bg:#160b33;--appearance-surface:#fbffef;--appearance-well:#e4f9b0;--appearance-ink:#160b33;--appearance-muted:#47513a;--appearance-line:#160b33;--appearance-accent:#5b2eff;--appearance-on-accent:#fff;--appearance-select:#5b2eff;--appearance-on-select:#fff;--appearance-pop:#fbffef;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}body[data-appearance],body[data-appearance] [data-arena]{--arena-bg:var(--appearance-bg);--arena-surface:var(--appearance-surface);--arena-ink:var(--appearance-ink);--arena-muted:var(--appearance-muted);--arena-line:var(--appearance-line);--arena-wall:var(--appearance-line);--arena-card:var(--appearance-accent);--arena-card-ink:var(--appearance-on-accent);--arena-pattern:none;--ink:var(--appearance-ink);--ink-soft:var(--appearance-muted);--bg:var(--appearance-bg);--tile:var(--appearance-surface);--white:var(--appearance-surface);background:var(--appearance-bg);color:var(--appearance-ink)}body[data-appearance] #setup-screen,body[data-appearance] .bot-box,body[data-appearance] .hud,body[data-appearance] .dialog{background:var(--appearance-surface);color:var(--appearance-ink);outline:2px solid var(--appearance-line);outline-offset:0;box-shadow:6px 7px 0 var(--appearance-line)}body[data-appearance] .dialog{box-shadow:8px 9px 0 var(--appearance-line), 0 18px 60px #00000059}body[data-appearance] :is(.btn,.tool,.sound-button,select,kbd){background:var(--appearance-surface);color:var(--appearance-ink);border:1px solid var(--appearance-line)}body[data-appearance] :is(.btn,.tool,.sound-button){box-shadow:0 4px 0 var(--appearance-line)}body[data-appearance] :is(.btn,.tool,.sound-button):active{box-shadow:0 1px 0 var(--appearance-line)}body[data-appearance] kbd{background:var(--appearance-well);border-bottom-width:2px}body[data-appearance] :is(.setup-note,.note,.btn-sub,.rule-fact,.status-sub,.field legend,.scoring-settings label),body[data-appearance] #setup-summary{color:var(--appearance-muted)}body[data-appearance] .direction-arrow,body[data-appearance] #menu :is(#mode-facts,.setup-keep){color:var(--appearance-ink)}body[data-appearance] .btn.btn-primary,body[data-appearance] .dialog-actions .btn.btn-primary{background:var(--appearance-accent);color:var(--appearance-on-accent)}body[data-appearance] #menu .btn.btn-primary .btn-sub{color:var(--appearance-on-accent)}body[data-appearance] .dialog-actions .btn{background:var(--appearance-surface);color:var(--appearance-ink)}body[data-appearance] .dialog-actions{background:var(--appearance-surface)}body[data-appearance] .menu-actions:has(#btn-resume:not([hidden])) #btn-local{background:var(--appearance-surface);color:var(--appearance-ink)}body[data-appearance] .menu-actions:has(#btn-resume:not([hidden])) #btn-local .btn-sub{color:var(--appearance-muted)}body[data-appearance] #menu .logo{color:var(--appearance-on-bg);text-shadow:4px 5px 0 var(--appearance-pop)}body[data-appearance] #menu .tagline{color:var(--appearance-on-bg)}body[data-appearance] :is(.segmented,.rule-options){background:var(--appearance-well);outline:1px solid var(--appearance-line);outline-offset:-1px}body[data-appearance] .segmented input:checked+span,body[data-appearance] .rule-option input:checked+.rule-face{background:var(--appearance-select);color:var(--appearance-on-select);box-shadow:none}body[data-appearance] .rule-option input:checked+.rule-face :is(.rule-name,.rule-fact,.direction-arrow){color:var(--appearance-on-select)}body[data-appearance] .rule-option input:checked+.rule-face .direction-center{background:var(--appearance-on-select);color:var(--appearance-select)}body[data-appearance] :is(.reflection-switch,.territory-switch,.sound-switch) input,body[data-appearance] .sound-level input{accent-color:var(--appearance-select)}body[data-appearance] .score,body[data-appearance] .rule-badge,body[data-appearance] .status-main{background:var(--appearance-well);color:var(--appearance-ink)}body[data-appearance] .chip{color:var(--appearance-ink)}body[data-appearance] .chip[data-active=true]{color:#160b33;outline-color:var(--appearance-ink)}body[data-appearance] .status-main:before{border-color:var(--appearance-ink)}body[data-appearance] .board-wrap{background:var(--appearance-bg);outline-color:var(--appearance-on-bg)}body[data-appearance] .board-slot[data-chart]>.territory:not([hidden]){border-color:var(--appearance-on-bg)}body[data-appearance] .cell[data-seat]:before{color:var(--appearance-ink)}body[data-appearance] .cell[data-last][data-seat]:before{color:var(--piece-ring)}body[data-appearance] :focus-visible{outline-color:var(--appearance-ink)}body[data-appearance] :is(.menu-actions>.btn,.menu-more .btn,.sound-button,.toolbar .tool,.cell):focus-visible{outline-color:var(--appearance-on-bg)}
