@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');
:root{color-scheme:dark;font-family:'DM Sans',sans-serif;background:#101421;color:#f2f3fa;--muted:#9098ac}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 85% 0%,#23243c 0,transparent 50%)}main{max-width:1240px;margin:auto;padding:30px 40px}header{display:flex;align-items:center;gap:30px;padding-bottom:25px;border-bottom:1px solid #ffffff14}.brand{font-family:'Space Grotesk',sans-serif;font-size:23px;letter-spacing:-1px;color:white;text-decoration:none}.brand strong{font-weight:700}.brand span{color:#c8fa75;margin-left:5px}.edition{font-size:10px;letter-spacing:2px;color:var(--muted);flex:1}button{font:inherit;cursor:pointer;border:1px solid #ffffff20;border-radius:9px;background:#ffffff06;color:#e9edf6;padding:11px 16px;font-size:12px;transition:.15s}button:hover{background:#ffffff12}button:focus-visible{outline:3px solid white;outline-offset:2px}button:disabled{opacity:.3;cursor:default}.intro{display:flex;justify-content:space-between;align-items:center;padding:35px 0 28px}.eyebrow{font-size:10px;color:#bdde8c;letter-spacing:2px}h1{font:600 clamp(28px,3.2vw,43px)/1.13 'Space Grotesk',sans-serif;letter-spacing:-1.7px;margin:13px 0}h1 em{color:#c8fa75;font-style:normal}.intro p{color:var(--muted);font-size:13px}.stats{display:flex;gap:35px}.stats div{min-width:85px}.stats span{display:block;font-size:10px;letter-spacing:1.5px;color:var(--muted);margin-bottom:10px}.stats strong{font:500 32px 'Space Grotesk',sans-serif}#score{color:#c8fa75}.game{border:1px solid #ffffff15;border-radius:18px;background:#191e2e;overflow:hidden;box-shadow:0 25px 60px #0003}.toolbar{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;font-size:11px;letter-spacing:1px}.live{display:inline-block;width:6px;height:6px;border-radius:50%;background:#c8fa75;margin-right:7px}.toolbar small{color:var(--muted);margin-left:12px}.actions{display:flex;gap:8px;letter-spacing:0}#new{background:#c8fa75;color:#172215;border-color:#c8fa75;font-weight:700}.board-scroll{padding:0 20px 20px;overflow-x:auto}#board{display:grid;grid-template-columns:repeat(20,minmax(0,1fr));gap:5px;min-width:570px;background:#0e1220;border-radius:12px;padding:10px}.tile,.empty{aspect-ratio:1;border-radius:7px;min-width:0;padding:0}.tile{border:0;font:700 clamp(12px,1.4vw,20px) 'Space Grotesk',sans-serif;box-shadow:inset 0 -3px #0002,inset 0 1px #ffffff45;color:#102032;transition:transform .12s,filter .12s}.tile:hover{filter:brightness(1.13);transform:translateY(-2px)}.a{background:#9e98ed}.b{background:#f3ba70}.c{background:#70c8cd}.d{background:#ed91ab}.e{background:#b6d975}.tile.selected{outline:2px solid white;outline-offset:-3px;filter:brightness(1.2);transform:scale(.9);box-shadow:0 0 14px #ffffff30}.empty{background:#ffffff03}.selection{display:flex;justify-content:space-between;align-items:center;gap:15px;min-height:81px;border-top:1px solid #ffffff0e;padding:18px 24px;background:#ffffff02}.selection strong{display:block;font-size:13px;margin-top:5px}#tag{font-size:9px;letter-spacing:1.8px;color:#c8fa75}#preview{font-size:12px;color:var(--muted);text-align:right}.bottom{display:flex;justify-content:space-between;gap:35px;margin-top:23px}#counts{display:flex;gap:10px;align-items:start}.counter{display:flex;align-items:center;gap:9px;border:1px solid #ffffff12;border-radius:10px;padding:9px 12px;font-size:13px;min-width:69px}.counter i{font-style:normal;color:#102032;width:23px;height:23px;border-radius:5px;text-align:center;line-height:23px;font-weight:700}.counter.done{opacity:.35}.tip{max-width:330px}.tip span{color:#c8fa75;font-size:9px;letter-spacing:1px}.tip p{color:var(--muted);font-size:12px;line-height:1.7;margin:6px 0}.tip b{color:#e7ebf4;font-weight:500}footer{display:flex;justify-content:space-between;margin-top:30px;color:#606a82;font-size:9px;letter-spacing:1px}dialog{max-width:480px;border:1px solid #ffffff25;background:#1b2133;color:#f2f3fa;border-radius:20px;padding:30px;line-height:1.7}dialog::backdrop{background:#0009;backdrop-filter:blur(5px)}dialog h2{font-family:'Space Grotesk',sans-serif}dialog p{color:#b2bbcf;font-size:14px}dialog button{background:#c8fa75;color:#162213;width:100%;font-weight:700}@media(max-width:800px){main{padding:20px 15px}.edition{display:none}header{justify-content:space-between}.intro{align-items:start;gap:20px}.stats{gap:12px;flex-wrap:wrap;justify-content:end}.stats div{min-width:58px}.stats strong{font-size:23px}.bottom{flex-direction:column;gap:20px}#counts{gap:5px;flex-wrap:wrap}.counter{min-width:58px;padding:7px}.selection{padding:15px}.board-scroll{padding:0 10px 10px}.toolbar{padding:12px}.actions button{padding:9px 10px}.intro p{max-width:230px}footer{font-size:8px}#preview{max-width:145px}}
#board{position:relative}.game{margin-top:20px}.tile{transition:none}.tile:hover{filter:none;transform:none}.tile.selected{outline:none;filter:none;transform:none;box-shadow:inset 0 -3px #0002,inset 0 1px #ffffff45}.group-outline{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}.group-outline path{fill:none;stroke:#fff;stroke-width:2;stroke-linejoin:miter;stroke-linecap:square;vector-effect:non-scaling-stroke}
#board{gap:0;border-radius:0;padding:6px;background:#252525}.tile,.empty{border-radius:0}.tile,.tile.selected{font-family:Georgia,'Times New Roman',serif;font-weight:900;font-size:clamp(18px,2.8vw,36px);color:#000;border:5px solid;border-color:#bcbcbc #484848 #484848 #bcbcbc;box-shadow:inset 2px 2px #303030,inset -2px -2px #dedede;outline:none;filter:none;transform:none}.tile.a,.counter .a{background:#1010ff}.tile.b,.counter .b{background:#ff1010}.tile.c,.counter .c{background:#f000f0}.tile.d,.counter .d{background:#ffff00}.tile.e,.counter .e{background:#00e52c}.group-outline{z-index:2}.group-outline path{stroke:white;stroke-width:3}.empty{background:#111522}
.toolbar{position:relative;min-height:76px}.toolbar #counts{position:absolute;left:50%;transform:translateX(-50%);gap:7px}.toolbar .counter{padding:5px 8px;min-width:55px;letter-spacing:0}.selection{display:grid;grid-template-columns:1fr auto 1fr}.selection .stats{gap:28px;justify-content:center;align-items:center}.selection .stats div{min-width:65px;text-align:center}.selection .stats span{font-size:9px;margin-bottom:4px}.selection .stats strong{font-size:25px;margin:0}.selection #preview{justify-self:end;max-width:210px}@media(max-width:800px){.toolbar{flex-wrap:wrap;gap:12px}.toolbar #counts{position:static;transform:none;order:3;width:100%;justify-content:center}.selection{grid-template-columns:1fr 1fr}.selection .stats{grid-row:1;grid-column:1/-1;margin-bottom:12px}.selection #preview{max-width:none}.tile,.tile.selected{font-size:20px;border-width:3px}}

.selection #preview{white-space:nowrap;max-width:none}.selection{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}@media(max-width:800px){.selection{grid-template-columns:1fr}.selection #preview{justify-self:end;grid-column:1/-1;font-size:11px}}

.group-outline path{stroke:#000;stroke-width:6;stroke-linecap:butt;stroke-linejoin:miter}
.group-outline path{stroke-width:12}header{position:relative;gap:10px}.brand{margin-right:auto}header #help{margin-left:0}.player-name{position:absolute;left:50%;transform:translateX(-50%);display:flex;align-items:center;flex-direction:column;gap:3px}.player-name span{font-size:8px;letter-spacing:1.6px;color:#a6b1c6}.player-name input{width:200px;text-align:center;background:#101421;border:1px solid #ffffff28;color:#eff2fa;border-radius:8px;padding:8px 10px;font:600 14px 'DM Sans',sans-serif}.player-name small{font-size:9px;color:#9aa8bd}.player-name input:focus{outline:2px solid #c8fa75}.player-name input:disabled{opacity:.6}#leaderboard{width:min(850px,94vw);max-width:850px;padding:30px;background:linear-gradient(145deg,#20283c,#121827);border:1px solid #ffffff25}.rank-heading{display:flex;justify-content:space-between;align-items:start;gap:20px}.rank-heading h2{font-size:30px;line-height:1.12;letter-spacing:-1px;margin:12px 0 24px}.rank-heading button{width:36px;padding:5px}.rank-tabs{display:flex;gap:7px;padding:5px;border:1px solid #ffffff10;border-radius:12px;background:#0c1221}.rank-tabs button{flex:1;border:0;background:none;font-size:13px}.rank-tabs [aria-selected=true]{background:#c8fa75;color:#152011;font-weight:700}.rank-description{font-size:11px;color:#94a3ba;margin:16px 0}.rank-table-wrap{overflow-x:auto;min-height:210px;max-height:48vh}table{width:100%;border-collapse:collapse;text-align:right;font-size:12px;white-space:nowrap}th{font-size:9px;text-transform:uppercase;letter-spacing:.7px;color:#94a3ba;padding:12px 9px;border-bottom:1px solid #ffffff20;position:sticky;top:0;background:#192135}td{padding:15px 9px;border-bottom:1px solid #ffffff0b}th:nth-child(2),td:nth-child(2){text-align:left}td:nth-child(3){font-family:'Space Grotesk',sans-serif;font-size:16px;color:#c8fa75;font-weight:700}.my-rank{background:#c8fa750b}.rank-empty{text-align:center!important;color:#a1afc6;padding:55px 12px}.rank-footer{display:flex;justify-content:space-between;gap:15px;font-size:10px;color:#8797ae;border-top:1px solid #ffffff12;margin-top:15px;padding-top:15px}#ranking{color:#c8fa75}@media(max-width:800px){header{flex-wrap:wrap;padding-bottom:16px}.player-name{position:static;transform:none;order:4;flex-basis:100%;margin-top:12px}.player-name input{width:230px}#leaderboard{padding:20px}.rank-heading h2{font-size:26px}.rank-footer{flex-direction:column;gap:4px}}
.rank-tabs button{color:#c3cde1;width:auto}.rank-tabs button[aria-selected=true]{color:#152011}.rank-heading #rankClose{width:36px;color:#152011}.rank-tabs button:hover{background:#ffffff0a}.rank-tabs button[aria-selected=true]:hover{background:#c8fa75}
@media(max-width:800px){
 main{padding:12px 10px}header{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:7px;padding-bottom:12px}.brand{font-size:20px;white-space:nowrap;margin:0}header>button{padding:9px 8px;font-size:10px;white-space:nowrap;line-height:16px;min-height:36px}.player-name{grid-column:1/-1;order:initial;display:flex;flex-direction:row;align-items:center;justify-content:center;gap:8px;margin:4px 0 0;width:100%;min-width:0}.player-name span{white-space:nowrap;font-size:8px}.player-name input{width:170px;max-width:60%;padding:6px 8px;font-size:12px;min-width:0}.player-name small{display:none}.game{margin-top:12px}.toolbar{padding:10px;gap:9px;min-height:0}.toolbar>div:first-child{font-size:9px;white-space:nowrap}.toolbar small{margin-left:5px;font-size:8px}.toolbar .actions{margin-left:auto;gap:5px}.toolbar .actions button{font-size:10px;padding:7px 9px}.toolbar #counts{display:flex;flex-wrap:nowrap;gap:5px;width:100%;justify-content:center;align-items:center;order:3}.toolbar .counter{flex:0 1 58px;min-width:0;padding:5px 6px;gap:5px;font-size:11px;border-radius:7px;white-space:nowrap}.toolbar .counter i{flex:0 0 19px;width:19px;height:19px;line-height:19px;font-size:11px;border-radius:3px}
}
@media(max-width:370px){.brand{font-size:17px}header{gap:5px}header>button{font-size:9px;padding:8px 6px}.toolbar #counts{gap:4px}.toolbar .counter{padding:4px 5px;gap:4px;font-size:10px}.toolbar .counter i{flex-basis:18px;width:18px;height:18px;line-height:18px}.player-name input{width:165px}}
@media(max-width:800px){header>.brand{grid-column:1;grid-row:1}header>#ranking{grid-column:2;grid-row:1}header>#help{grid-column:3;grid-row:1}header>.player-name{grid-row:2}}
.label-short{display:none}td:nth-child(3){font-family:inherit;font-size:12px;color:inherit;font-weight:400}td:last-child{font-family:'Space Grotesk',sans-serif;font-size:16px;color:#c8fa75;font-weight:700}
@media(max-width:600px){#leaderboard{width:calc(100vw - 12px);max-width:none;padding:14px 9px;margin:auto}.rank-table-wrap{overflow-x:hidden}#leaderboard table{table-layout:fixed;width:100%;font-size:10px;white-space:normal}#leaderboard th{padding:10px 2px;font-size:8px;letter-spacing:0;line-height:1.3;overflow-wrap:normal;word-break:normal}#leaderboard td{padding:12px 2px;font-size:10px;overflow-wrap:anywhere;line-height:1.3}#leaderboard th:nth-child(1){width:7%}#leaderboard th:nth-child(2){width:25%}#leaderboard th:nth-child(3){width:13%}#leaderboard th:nth-child(4){width:17%}#leaderboard th:nth-child(5){width:15%}#leaderboard th:nth-child(6){width:23%}#leaderboard td:last-child{font-size:11px}#leaderboard .label-full{display:none}#leaderboard .label-short{display:inline}#leaderboard td:nth-child(2){font-size:10px}#leaderboard .rank-heading h2{font-size:24px}#leaderboard .eyebrow{font-size:8px;letter-spacing:1px}.rank-description{font-size:10px}.rank-tabs button{padding:10px 8px}.rank-footer{font-size:9px}}
@media(max-width:800px) and (orientation:portrait){
 main{padding:8px 10px 12px}main>footer{display:none}
 .selection{grid-template-columns:minmax(0,1fr) auto;gap:4px 10px;padding:9px 12px;min-height:0}
 .selection .stats{grid-column:1/-1;grid-row:1;gap:24px;margin:0 0 3px;flex-wrap:nowrap}
 .selection .stats div{min-width:60px}.selection .stats span{font-size:8px;margin-bottom:1px;letter-spacing:1px}.selection .stats strong{font-size:22px;line-height:1.1}
 #tag{font-size:8px;letter-spacing:1px}.selection strong#message{font-size:11px;margin-top:1px;line-height:1.3}
 .selection #preview{grid-column:2;grid-row:2;align-self:end;font-size:9px;white-space:normal;max-width:135px;line-height:1.3}
 .board-scroll{padding-bottom:6px}.toolbar{padding-top:8px;padding-bottom:8px;gap:6px}
 #rules{width:calc(100vw - 20px);max-width:480px;max-height:calc(100dvh - 20px);padding:16px;line-height:1.4}
 #rules h2{font-size:clamp(13px,4vw,19px);letter-spacing:-.5px;white-space:nowrap;margin:0 0 12px;line-height:1.25}
 #rules p{font-size:12px;line-height:1.45;margin:9px 0}#rules button{padding:9px 12px;margin-top:5px;font-size:12px}
}
@media(max-width:800px) and (orientation:portrait) and (max-height:650px){#rules{padding:12px}#rules p{font-size:11px;line-height:1.35;margin:7px 0}.selection .stats strong{font-size:20px}}
