@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700;800&display=swap');
:root{color-scheme:dark;--bg:#151719;--line:#343a3e;--muted:#969ea3;--green:#b8f28b;--blue:#9ac5fa}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:#f0f1ed;font:16px 'Be Vietnam Pro',system-ui,sans-serif}button,input,select{font:inherit}button{cursor:pointer;color:inherit}button,a,input,select{outline-offset:5px}button:focus-visible,a:focus-visible{outline:2px solid var(--green)}a{text-decoration:none;color:inherit}header{max-width:1256px;margin:auto;display:flex;justify-content:space-between;align-items:center;padding:30px 36px;border-bottom:1px solid var(--line)}.brand{font-size:25px;font-weight:800;letter-spacing:-1px}.brand b{color:var(--green);margin-right:16px;letter-spacing:-5px}.brand span{color:var(--muted)}button{background:none;border:0}header button{color:var(--muted);font-size:14px}main{max-width:1184px;margin:auto;padding:64px 24px 0;display:grid;grid-template-columns:minmax(0,1fr) 480px;gap:42px 80px;align-items:center}.intro>small{font-size:11px;letter-spacing:2px;color:var(--green)}h1{font-size:clamp(32px,3.6vw,50px);line-height:1.3;letter-spacing:-2px;margin:24px 0}h1 span{color:var(--muted)}.intro p{color:var(--muted);font-size:15px;line-height:1.9}.art{height:190px;display:flex;align-items:center;gap:30px;margin-top:20px}.art b{font-size:180px;font-weight:400;color:var(--green);transform:rotate(-12deg)}.art i{font-size:200px;font-style:normal;color:var(--blue)}.intro .note{font-size:13px;margin-left:25px;transform:rotate(-4deg)}.game{background:#1e2124;border:1px solid var(--line);padding:24px 28px;border-radius:24px;box-shadow:0 20px 80px #0002}.toolbar{display:flex;align-items:center;justify-content:space-between}.modes{display:flex;background:#141719;padding:4px;border-radius:10px}.modes button{font-size:14px;padding:10px 23px;border-radius:7px;color:var(--muted)}.modes .active{background:#363e31;color:var(--green)}#sound{border:1px solid var(--line);width:36px;height:36px;border-radius:50%;font-size:22px;color:var(--muted)}#sound[aria-pressed=true]{color:var(--green)}.settings{display:flex;align-items:center;gap:10px;margin-top:24px;color:var(--muted);font-size:14px}.settings select{background:#2a2f32;border:0;border-radius:6px;color:#eee;padding:7px 26px 7px 10px;font-size:14px;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='10'%3E%3Cpath d='m2 3 4 4 4-4' fill='none' stroke='%23949b9f'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 8px center}#restart{margin-left:auto;font-size:14px;color:var(--muted);padding:0}#status{text-align:center;font-size:14px;min-height:22px;margin:26px 0 20px}#status:before{content:'●';font-size:9px;color:var(--green);margin-right:9px}#board{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;max-width:342px;margin:auto}.cell{position:relative;display:block;width:100%;min-width:0;min-height:0;padding:0;appearance:none;-webkit-appearance:none;border:1px solid #383e42;border-radius:12px;background:#262b2f;font-size:64px;line-height:1;transition:background .15s,transform .15s}.cell:not(:disabled):hover{background:#343e32;transform:translateY(-2px)}.cell:disabled{cursor:default}.X{color:var(--green)}.O{color:var(--blue)}.cell.win{background:#384d2e;border-color:var(--green)}.scores{display:grid;grid-template-columns:repeat(3,1fr);text-align:center;margin-top:28px}.scores>div{min-width:0;display:flex;flex-direction:column;gap:8px}.scores>div:nth-child(2){border-inline:1px solid var(--line)}.scores span{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.scores small{font-size:8px;letter-spacing:1px;color:var(--muted)}.scores strong{font-size:28px;font-weight:500}#scoreX{color:var(--green)}#scoreO{color:var(--blue)}#scoreD{color:var(--muted)}.bottom{display:flex;gap:14px;align-items:center;border-top:1px solid var(--line);margin-top:20px;padding-top:18px}.bottom button{padding:0;color:var(--muted);font-size:14px}.bottom span{font-size:9px;color:#818b90;margin-left:auto}aside{grid-column:1/-1;display:flex;gap:20px;align-items:center;border:1px solid var(--line);border-radius:14px;padding:24px 28px;margin-bottom:35px}aside>b{font-size:36px;color:var(--green)}aside h2{font-size:14px;font-weight:500;margin:0 0 8px}aside p{font-size:14px;color:var(--muted);margin:0;line-height:1.7}aside>small{margin-left:auto;white-space:nowrap;font-size:9px;color:var(--muted);letter-spacing:1px}footer{max-width:1184px;margin:auto;padding:24px;border-top:1px solid var(--line);display:flex;justify-content:space-between;font-size:11px;color:#818b90}dialog{max-width:450px;width:calc(100% - 32px);background:#1e2124;color:#eee;border:1px solid var(--line);border-radius:20px;padding:30px}dialog::backdrop{background:#000b;backdrop-filter:blur(4px)}dialog h2{font-size:24px}dialog p{color:var(--muted);font-size:14px;line-height:1.9}dialog form{display:flex;flex-direction:column;gap:12px}dialog label{font-size:14px;color:var(--muted)}input{background:var(--bg);border:1px solid var(--line);border-radius:8px;color:white;padding:12px}.primary{padding:13px 20px;background:var(--green);color:#182014;border-radius:8px;margin-top:12px}button:hover{filter:brightness(1.2)}@media(max-width:850px){header{padding:22px 24px}.brand{font-size:21px}main{grid-template-columns:minmax(0,1fr);max-width:540px;padding-top:32px;gap:28px}.intro{text-align:center}.intro h1{font-size:34px;margin:14px 0}.intro>small{font-size:9px}.intro p{font-size:14px}.art,.intro .note{display:none}.game{padding:20px}aside{padding:18px;gap:13px;margin-bottom:20px}aside>small{display:none}aside p{font-size:12px}footer{flex-wrap:wrap;justify-content:center;gap:15px}footer span:nth-child(2){display:none}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}
/* Room for English labels. */
.modes button{padding-inline:17px;font-size:13px}.scores small{font-size:8px;letter-spacing:.6px}.bottom{gap:12px}.bottom button{font-size:12px}.bottom span{font-size:8px}@media(max-width:420px){.game{padding:18px 15px}.modes button{padding-inline:12px}.settings{font-size:12px}.settings select,#restart{font-size:12px}.bottom{flex-wrap:wrap}.bottom span{font-size:9px}.cell{font-size:58px}}
/* Game variants and the catalog managed by the restored admin kit. */
.public-nav{display:flex;align-items:center;gap:24px;font-size:14px;color:var(--muted)}.public-nav button{padding:0;font-size:14px}.variant-tabs{display:flex;gap:8px;margin-bottom:22px;overflow-x:auto;padding-bottom:2px}.variant-tabs a{display:flex;flex:1;min-width:85px;flex-direction:column;align-items:center;gap:4px;padding:10px 8px;border:1px solid var(--line);border-radius:9px;color:var(--muted);font-size:16px}.variant-tabs a.active{color:var(--green);background:#303b2a;border-color:#59744a}.variant-tabs small{font-size:10px}.large-board{gap:6px!important}.large-board .cell{font-size:clamp(22px,4vw,44px);border-radius:7px}#board{width:100%}.library-section{grid-column:1/-1;width:100%;margin:0 0 20px;scroll-margin-top:25px}.section-heading{display:flex;justify-content:space-between;align-items:end;gap:20px;margin-bottom:24px}.section-heading h2{font-size:30px;margin:12px 0 0;letter-spacing:-1px}.section-heading>a{font-size:14px;color:var(--green);white-space:nowrap}.eyebrow{font-size:10px;letter-spacing:1.8px;color:var(--green)}.game-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}.game-card{border:1px solid var(--line);border-radius:14px;overflow:hidden;background:#1e2124;transition:transform .15s,border-color .15s}.game-card:hover{transform:translateY(-3px);border-color:#6c8a56}.game-card-art{aspect-ratio:1.65;display:grid;place-items:center;position:relative;background:linear-gradient(135deg,#29372b,#243041);overflow:hidden}.game-card-art>span{font-size:46px;color:var(--blue);letter-spacing:8px}.builtin-art>span{color:var(--green)}.game-card-art img{width:100%;height:100%;object-fit:cover;position:absolute;inset:0}.hot-badge{position:absolute;top:10px;left:10px;background:var(--green);color:#162014;border-radius:4px;padding:4px 7px;font-size:9px;font-weight:700}.game-card-copy{padding:16px}.game-card h3{font-size:16px;margin:0 0 8px;font-weight:500;line-height:1.5}.game-card p{font-size:11px;color:var(--muted);margin:0}.catalog-main{display:block;min-height:60vh;padding-bottom:40px}.catalog-heading{margin-bottom:30px}.catalog-heading h1{margin:18px 0;font-size:42px}.catalog-heading>p{color:var(--muted);line-height:1.8}.game-search{max-width:530px;display:flex;gap:10px;margin:24px 0}.game-search input{flex:1;min-width:0;background:#1e2326;border:1px solid var(--line);color:#eee;padding:12px 15px;border-radius:8px}.game-search button{background:var(--green);color:#172014;border-radius:8px;padding:12px 22px;font-size:14px}.category-chips{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:28px}.category-chips a{font-size:14px;color:var(--muted);border:1px solid var(--line);border-radius:20px;padding:9px 15px}.category-chips a:hover{color:var(--green)}.catalog-results{margin:26px 0 40px}.catalog-main .community{margin-top:30px}.catalog-main .homepage-article{margin:28px 0}.back-link{font-size:14px;color:var(--green)}.embedded-game{width:100%;border:1px solid var(--line);border-radius:16px;overflow:hidden;background:#1e2124}.embedded-game iframe{display:block;width:100%;height:min(72vh,740px);min-height:400px;border:0;background:#111}.embed-layout{display:flex;gap:20px;align-items:start}.embed-layout>.ad-slot{max-width:220px;flex-shrink:0}.ad-slot{grid-column:1/-1;max-width:100%;overflow:hidden;margin:16px auto;text-align:center}.game .ad-slot{margin-block:12px}.game .ad-slot:empty{display:none}.public-footer{gap:28px;align-items:start;font-size:13px}.public-footer>div{display:flex;flex-direction:column;gap:12px;max-width:300px}.public-footer p{margin:0;line-height:1.8}.footer-name{font-size:20px;font-weight:700;color:#eee}.public-footer nav{display:flex;flex-wrap:wrap;gap:16px;max-width:330px;line-height:1.7}.footer-socials{align-items:end}.footer-socials span{font-size:11px}.footer-image{max-width:180px;max-height:80px;object-fit:contain;object-position:left}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}@media(max-width:850px){.public-nav{gap:14px;font-size:12px}.public-nav button{font-size:12px}.game-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.game-card-copy{padding:13px}.game-card h3{font-size:14px}.section-heading{align-items:start;flex-direction:column;gap:14px}.section-heading h2{font-size:27px}.library-section{margin-bottom:10px}.catalog-heading h1{font-size:34px}.public-footer{justify-content:space-between;gap:24px}.public-footer>div{max-width:100%}.public-footer nav{font-size:12px}.footer-socials{align-items:start}.embed-layout{flex-direction:column}.embed-layout>.ad-slot{max-width:100%}.embedded-game iframe{min-height:400px;height:70vh}.variant-tabs a{min-width:72px}.variant-tabs small{font-size:9px}.large-board .cell{font-size:30px}.public-footer span:nth-child(2){display:inline}}@media(max-width:400px){header{padding-inline:20px}.public-nav{gap:12px}.brand{font-size:20px}.large-board{gap:4px!important}.large-board .cell{font-size:25px}.game-card-art>span{font-size:32px;letter-spacing:4px}}

.embedded-game.orientation-portrait{max-width:480px;margin:auto}.embedded-game.orientation-landscape iframe{aspect-ratio:16/9;height:auto;min-height:0}.catalog-main>article{line-height:1.9;color:var(--muted);border:1px solid var(--line);border-radius:14px;padding:28px}.catalog-main>article h2,.catalog-main>article h3{color:#eee}

dialog.room-panel{padding:24px}.room-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}.room-heading h2{margin:0 0 16px;font-size:22px}.room-heading button{font-size:26px;align-self:flex-start;color:var(--muted)}.room-actions{display:flex;flex-direction:column;gap:20px}.room-panel form{display:flex;flex-direction:column;gap:10px}.room-panel #createRoom,.room-panel form button{background:var(--green);color:#182014;border-radius:8px;padding:12px 16px}.room-panel #roomLink{width:100%;margin:10px 0}.room-panel #copyRoom,.room-panel #leaveRoom{padding:10px;color:var(--green)}.room-panel [hidden]{display:none}.room-panel button:disabled{opacity:.5;cursor:default}.toolbar{gap:10px}.toolbar .modes{flex:1;min-width:0}.toolbar .modes button{flex:1;padding-inline:8px;white-space:nowrap}.toolbar #sound{flex-shrink:0}@media(max-width:380px){.toolbar .modes button{font-size:11px;padding-inline:5px}}


.room-summary{margin-top:20px;padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--bg)}.room-summary[hidden]{display:none}.room-summary p{margin:0 0 10px;color:var(--green);font-size:13px;overflow-wrap:anywhere}.room-summary label{font-size:12px;color:var(--muted)}.room-summary #roomLink{width:100%;min-width:0;margin:8px 0;padding:9px;font-size:12px}.room-summary button{padding:8px;font-size:12px;color:var(--green)}.room-summary [hidden]{display:none}

.variant-tabs{flex-wrap:wrap;overflow:visible}.variant-tabs a{min-width:100px;font-size:14px}#board.ultimate-board{gap:3px!important;background:var(--line);padding:5px;border-radius:10px;max-width:390px}#board.ultimate-board .cell{font-size:clamp(15px,3vw,28px);border-radius:3px;min-width:0}#board.ultimate-board .cell.allowed{border-color:#86a96b;background:#2d3828}#board.ultimate-board .cell.closed-X{background:#354b2a}#board.ultimate-board .cell.closed-O{background:#283e57}#board.ultimate-board .cell.closed-D{background:#343434;opacity:.6}#board.gomoku-board{gap:2px!important;max-width:420px}#board.gomoku-board .cell{min-width:0;border-radius:2px;padding:0;font-size:clamp(10px,2.5vw,19px)}@media(max-width:400px){.variant-tabs a{min-width:80px;font-size:12px}#board.ultimate-board .cell{font-size:18px}#board.gomoku-board .cell{font-size:12px}}

/* Keep button content out of intrinsic grid sizing, including older Safari. */
main>.game{min-width:0;max-width:100%}#board{min-width:0}.cell::before{content:'';display:block;padding-top:100%}.cell-mark{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none}
#board.board-sized .cell{height:var(--cell-size)}#board.board-sized .cell::before{display:none}
.brand{display:inline-flex;align-items:center;gap:10px;white-space:nowrap;letter-spacing:-.8px}.brand img{flex-shrink:0}.brand .brand-word{color:#f0f1ed}.brand .brand-word>span{color:var(--muted)}.brand .brand-domain{font-size:.75em;letter-spacing:0}.breadcrumbs{max-width:1184px;margin:20px auto 0;padding:0 24px;display:flex;flex-wrap:wrap;gap:10px;font-size:12px;color:var(--muted)}.breadcrumbs a:hover{color:var(--green)}@media(max-width:420px){header{gap:12px}.brand{font-size:19px;gap:7px}.brand img{width:28px;height:28px}.public-nav{gap:10px;font-size:11px}.public-nav button{font-size:11px}}
@media(max-width:420px){header{flex-wrap:wrap}}

/* Give the new-round action a clear, touch-friendly outline. */
#restart{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:9px 14px;border:1px solid #71895d;border-radius:9px;background:#2b3525;color:var(--green);font-weight:600;line-height:1.2;white-space:nowrap;box-shadow:0 2px 6px #0002;transition:background .15s,border-color .15s,box-shadow .15s}
#restart:not(:disabled):hover{background:#36442d;border-color:var(--green);box-shadow:0 2px 10px #b8f28b18;filter:none}
#restart:not(:disabled):active{background:#405334;box-shadow:inset 0 1px 3px #0003}
#restart:disabled{opacity:.45;cursor:default;box-shadow:none}
@media(max-width:420px){.settings{gap:8px}#restart{padding:9px 10px;font-size:12px}}

/* Optimized neon wordmark: 1x/2x WebP with PNG fallback. */
header .brand{display:inline-flex;gap:0;line-height:0;flex-shrink:0}header .brand picture{display:block}header .brand img.brand-logo{display:block;width:240px;height:90px;object-fit:contain}header{padding-top:16px;padding-bottom:16px}@media(max-width:850px){header .brand img.brand-logo{width:208px;height:78px}header{padding-top:12px;padding-bottom:12px}}@media(max-width:420px){header .brand img.brand-logo{width:176px;height:66px}}@media(max-width:360px){header .brand img.brand-logo{width:160px;height:60px}}

.public-nav{flex-wrap:wrap;justify-content:flex-end}.language-switcher{position:relative;font-size:13px;line-height:1.5}.language-switcher summary{cursor:pointer;border:1px solid var(--line);border-radius:8px;padding:7px 10px;color:var(--green)}.language-switcher ul{position:absolute;right:0;top:100%;z-index:30;min-width:160px;list-style:none;margin:6px 0 0;padding:6px;background:#1e2124;border:1px solid var(--line);border-radius:10px;box-shadow:0 10px 30px #0008}.language-switcher a{display:block;padding:8px 12px;border-radius:6px}.language-switcher a:hover,.language-switcher a[aria-current]{background:#303b2a;color:var(--green)}.game-guide h3{margin-top:24px;color:#f0f1ed}.game-faq{border-top:1px solid var(--line);padding:12px 0}.game-faq summary{cursor:pointer;color:#eee}.game-faq p{margin-bottom:0}.intro h1{overflow-wrap:anywhere}.toolbar .modes button{white-space:normal}.settings{flex-wrap:wrap}.bottom{flex-wrap:wrap}.scores span{font-size:12px}.scores small{overflow-wrap:anywhere}@media(max-width:600px){header{flex-wrap:wrap;gap:10px;justify-content:center}.public-nav{justify-content:center;gap:12px}.language-switcher{font-size:12px}#restart{white-space:normal}.game{min-width:0}}.game-guide p{max-width:85ch}

/* End-of-round replay stays inside the board so scores and controls remain visible. */
.board-stage{position:relative;width:100%;max-width:342px;margin-inline:auto;isolation:isolate}
.board-stage.round-ended #board{filter:blur(4px);pointer-events:none}
.board-replay{position:absolute;inset:0;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;width:100%;padding:24px;border-radius:12px;background:rgba(16,18,20,.62);color:#f0f1ed;cursor:pointer}
.board-replay[hidden]{display:none}
.board-replay:hover{background:rgba(16,18,20,.72);filter:none}
.board-replay:focus-visible{outline:3px solid var(--green);outline-offset:4px}
.board-replay .replay-icon{width:clamp(64px,22vw,104px);height:auto;flex-shrink:0;animation:replay-turn 3s linear infinite}
.board-replay span{font-size:14px;line-height:1.6;text-align:center}
.board-replay:disabled{cursor:default}
.board-replay:disabled .replay-icon{animation:none;opacity:.5}
@keyframes replay-turn{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.board-replay .replay-icon{animation:none}}

/* Compact flag picker with a native keyboard-accessible dropdown. */
.language-switcher summary{display:flex;align-items:center;justify-content:center;gap:10px;min-width:56px;min-height:44px;padding:8px 6px;border:0;list-style:none;color:#f0f1ed}
.language-switcher summary::-webkit-details-marker{display:none}
.language-switcher summary:focus-visible{outline:2px solid var(--green);outline-offset:3px;border-radius:8px}
.language-flag{display:block;width:28px;height:28px;flex:0 0 28px;border-radius:50%;object-fit:cover;box-shadow:0 0 0 1px #ffffff26}
.language-flag-fallback{display:grid;place-items:center;background:#343a3e;color:#f0f1ed;font-size:11px;font-weight:600}
.language-chevron{display:block;width:8px;height:8px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:translateY(-2px) rotate(45deg)}
.language-switcher[open] .language-chevron{transform:translateY(2px) rotate(225deg)}
.language-switcher ul{min-width:190px;max-width:calc(100vw - 48px)}
.language-switcher a{display:flex;align-items:center;gap:12px;min-height:44px}

/* Online rooms replace the intro with a temporary chat panel. */
.online-layout>.intro{display:none}
.room-chat[hidden]{display:none}
.room-chat{min-width:0;height:480px;align-self:end;display:flex;flex-direction:column;background:#1e2124;border:1px solid var(--line);border-radius:24px;overflow:hidden}
.room-chat-heading{flex-shrink:0;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:20px 24px;border-bottom:1px solid var(--line);background:#262d32}
.room-chat-heading h2{font-size:18px;margin:0}
.room-chat-heading>span{font-size:12px;color:var(--muted)}
.chat-notice{font-size:12px;color:var(--muted);line-height:1.6;margin:16px 24px 0}
.room-chat-log{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:20px 24px;scrollbar-width:thin}
#chatEmpty{font-size:14px;color:var(--muted);text-align:center;margin-top:40px}
.chat-message{width:fit-content;max-width:92%;margin:0 0 14px;padding:10px 14px;border-radius:12px;background:#2b3339;overflow-wrap:anywhere}
.chat-message strong{font-size:11px;color:var(--blue);font-weight:500}
.chat-message p{white-space:pre-wrap;font-size:14px;line-height:1.6;margin:5px 0 0}
.chat-mine{margin-left:auto;background:#303e2b}
.chat-mine strong{color:var(--green)}
#roomChatForm{flex-shrink:0;margin:0;border-top:1px solid var(--line);padding:16px 20px}
.chat-compose{display:flex;gap:8px}
.chat-compose input{flex:1;min-width:0;width:100%;font-size:14px}
.chat-compose button{padding:10px 16px;border-radius:8px;background:var(--green);color:#182014;font-size:14px}
.chat-compose button:disabled{opacity:.5;cursor:wait}
.chat-input-label{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#roomChatError{font-size:12px;color:#ffb4a7;line-height:1.5;margin:8px 0 0}
#roomChatError:empty{display:none}
@media(min-width:851px){.online-layout{align-items:stretch}.online-layout>.room-chat{grid-column:1;grid-row:1}.online-layout>.game{grid-column:2;grid-row:1}}
@media(max-width:850px){.online-layout>.game{grid-row:1}.online-layout>.room-chat{grid-row:2;height:auto}.room-chat-log{flex:none;height:280px;min-height:0}.room-chat-heading{padding:16px 20px}.room-chat-heading>span{font-size:11px}}

/* A missing page is another way back to the board. */
.error-body{min-height:100vh;min-height:100svh;display:flex;flex-direction:column}
.error-body>header{width:100%;margin-block:0}
.error-page{display:block;width:100%;max-width:1184px;margin:auto;padding:72px 24px 56px}
.error-card{position:relative;display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);align-items:center;gap:56px;padding:64px 56px;border:1px solid var(--line);border-radius:28px;background:radial-gradient(ellipse at 95% 5%,#b8f28b0b,transparent 60%),#1b1f21;overflow:hidden}
.error-kicker{display:inline-flex;align-items:center;gap:12px;color:var(--green);font-size:11px;font-weight:600;letter-spacing:1.6px;line-height:1.8}
.error-kicker>span{color:#67736c}
.error-copy h1{max-width:12em;margin:22px 0 18px;font-size:clamp(30px,3.8vw,48px);line-height:1.2;letter-spacing:-1.6px;text-wrap:balance}
.error-copy>p{max-width:38em;font-size:15px;line-height:1.9;color:var(--muted);margin:0}
.error-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-top:32px}
.error-actions>a{display:inline-flex;align-items:center;justify-content:space-between;gap:20px;padding:14px 18px;border-radius:10px;font-size:14px;line-height:1.5}
.error-play{background:var(--green);color:#182014;font-weight:600}
.error-play:hover{background:#c9ffa2}
.error-browse{border:1px solid #465046;color:#e4ebe0}
.error-browse:hover{background:#2b322b}
.error-art{position:relative;display:flex;align-items:center;justify-content:center;gap:4px;padding-block:28px;user-select:none}
.error-art svg{width:44%;min-width:0;transform:rotate(-9deg);filter:drop-shadow(0 16px 20px #0003)}
.error-digit{font-size:clamp(70px,9vw,124px);line-height:1;font-weight:700;color:#dce7d5;letter-spacing:-8px}
.error-spark{position:absolute;font-size:32px;font-weight:400;line-height:1}
.error-spark-one{top:-8px;right:26%;color:var(--green);transform:rotate(12deg)}
.error-spark-two{bottom:-8px;left:17%;color:var(--blue)}
.error-caption{text-align:center;color:var(--muted);font-size:13px;line-height:1.7;margin:24px 0 0}
.error-footer{width:100%;margin-top:auto;gap:20px}
@media(max-width:850px){.error-page{max-width:660px;padding-top:40px}.error-card{grid-template-columns:1fr;padding:36px 28px;gap:40px}.error-art{grid-row:1;width:260px;max-width:100%;margin:auto;padding-block:10px}.error-digit{font-size:82px}.error-copy{text-align:center}.error-copy h1{margin-inline:auto}.error-copy>p{margin-inline:auto}.error-actions{justify-content:center}.error-kicker{font-size:10px}.error-spark-one{top:-12px}.error-spark-two{bottom:-12px}}
@media(max-width:380px){.error-card{padding:32px 20px}.error-art{width:220px}.error-digit{font-size:70px}.error-actions{flex-direction:column;align-items:stretch}.error-page{padding-inline:16px}.error-copy h1{letter-spacing:-1px}}

.piece-picker{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.piece-picker button{padding:8px 12px;border:1px solid var(--line);border-radius:8px;background:transparent;color:inherit;cursor:pointer}.piece-picker button[aria-pressed=true]{outline:2px solid #a5c78b}.piece-picker small{flex-basis:100%;line-height:1.5}.cell.selected-piece{outline:3px solid #a5c78b;outline-offset:-4px}.cell.fading-piece .cell-mark{opacity:.42}.variant-tabs small{white-space:normal}
