@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800&family=DM+Sans:wght@400;500;600;700&display=swap');
:root{color-scheme:dark;--bg:#101216;--panel:#191c21;--line:#30343b;--muted:#969da8;--lime:#c5fa64}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:#f7f7f2;font-family:'DM Sans',system-ui,sans-serif;font-size:16px}button,a,input{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;color:inherit;border:0}button:focus-visible,a:focus-visible,canvas:focus-visible{outline:3px solid var(--lime);outline-offset:5px}header{max-width:1500px;margin:auto;padding:30px 4%;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:4px;font-weight:800;font-size:24px;letter-spacing:-1px;text-decoration:none;color:white}.brand>span:not(.mark){color:var(--lime)}.brand .mark{font-size:34px;margin-right:10px;color:var(--lime)}.brand small{font-size:10px;letter-spacing:1px;color:var(--muted);border:1px solid var(--line);padding:4px;margin-left:9px}.settings{display:flex;gap:10px}.settings button{background:#23262c;border:1px solid var(--line);border-radius:8px;min-height:42px;padding:8px 14px;font-size:14px}main{max-width:1440px;margin:40px auto;display:grid;grid-template-columns:minmax(230px,1fr) minmax(330px,1.45fr) minmax(175px,.65fr);gap:38px;padding:0 4%;align-items:center}.eyebrow,.side-title,.pill{font-size:12px;font-weight:700;letter-spacing:1.6px}.eyebrow{color:var(--lime);margin-bottom:20px}h1{font:800 clamp(70px,7.3vw,112px)/.88 'Barlow Condensed',Impact,sans-serif;letter-spacing:-2px;margin:0 0 26px}h1 em{font-style:normal;color:var(--lime)}.intro>p{color:#b5bbc4;line-height:1.7;margin-bottom:30px}.modes{display:flex;background:#202329;padding:5px;border:1px solid var(--line);border-radius:10px;gap:4px}.modes button{flex:1;padding:12px 8px;background:transparent;border-radius:6px;font-size:14px;color:var(--muted)}.modes button.selected{background:#3a4149;color:white}.mode-note{font-size:12px;color:var(--muted);min-height:42px;padding-top:10px;line-height:1.5}.how{display:grid;grid-template-columns:24px 1fr;align-items:center;gap:15px 10px;margin:18px 0 30px}.how span{font-size:12px;color:var(--lime)}.how p{margin:0;font-size:14px;color:#c8ccd3}.fine{color:var(--muted);font-size:12px}.arena{background:var(--panel);border:1px solid #3b414a;border-radius:18px;overflow:hidden;box-shadow:0 25px 90px #0004;align-self:stretch;min-height:610px;display:flex;flex-direction:column}.hud{display:flex;justify-content:space-between;padding:25px 28px 0;position:relative;z-index:2;pointer-events:none}.hud span{color:var(--muted);display:block;font-size:11px;letter-spacing:1.5px;font-weight:600}.hud strong{font:700 52px/1.15 'Barlow Condensed',Impact,sans-serif}.hud .best{text-align:right}.best strong{color:var(--lime);font-size:36px}.game-area{flex:1;position:relative;min-height:440px}canvas{width:100%;height:100%;position:absolute;inset:0;touch-action:manipulation}.overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding:38px 22px 10px;text-align:center;background:linear-gradient(#191c21e8,#191c217a 70%,transparent);pointer-events:none}.overlay>*{pointer-events:auto}.overlay[hidden]{display:none}.pill{font-size:10px;border:1px solid #657645;border-radius:30px;color:var(--lime);padding:8px 12px}h2{font:700 57px/.98 'Barlow Condensed',Impact,sans-serif;letter-spacing:-1px;margin:20px 0 10px}.overlay p{color:#bdc3cc;font-size:14px;margin:5px 0 20px;max-width:320px}.primary{background:var(--lime);color:#18220b;border-radius:9px;padding:16px 24px;font-weight:700;min-width:205px;box-shadow:0 4px 0 #86ad40}.primary:hover{background:#d6ff91}.primary span{margin-left:24px}.secondary{background:#262c34;border:1px solid #515b67;margin-top:13px;border-radius:8px;padding:12px 18px;font-size:14px}.arena-foot{border-top:1px solid var(--line);padding:17px 22px;display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:10px;letter-spacing:1px;color:var(--muted)}.arena-foot button{background:transparent;font-size:13px;color:var(--lime)}.key{border:1px solid #464b54;padding:5px 8px;border-radius:5px;font-size:10px}.side-title{color:var(--muted);font-size:11px}.date{font-size:14px;color:#d9dce1;margin-top:10px}.daily-icon{font:700 58px 'Barlow Condensed',Impact,sans-serif;color:var(--lime);margin:24px 0 8px}.daily-icon span{font-size:24px;margin-left:3px}h3{font-size:22px;line-height:1.2;margin:0 0 16px}.side p{color:var(--muted);font-size:14px;line-height:1.7}.text-button{background:none;padding:10px 0;color:var(--lime);font-size:14px;text-align:left}.side-divider{height:1px;background:var(--line);margin:30px 0}.rival{border:1px solid #657645;border-radius:8px;padding:12px;font-size:14px;color:var(--lime)}footer{max-width:1440px;margin:0 auto;padding:10px 4% 30px;display:flex;justify-content:space-between;gap:20px;color:var(--muted);font-size:11px;line-height:1.6}.muted{padding:0 10px;color:#444}#feedback{position:absolute;top:8px;left:0;right:0;text-align:center;color:var(--lime);font-weight:700;font-size:15px;pointer-events:none}#shareFallback{width:100%;max-width:320px;margin-top:12px}#shareFallback input{width:100%;padding:8px;background:#101216;border:1px solid #657645;color:white;border-radius:5px}#shareFallback small{font-size:12px;color:var(--muted)}[hidden]{display:none!important}@media(min-width:1450px){main{margin-top:60px;margin-bottom:60px}}@media(max-width:1000px){main{grid-template-columns:minmax(220px,1fr) minmax(330px,1.4fr);gap:26px}.side{display:none}}@media(max-width:650px){header{padding:15px 5%}.brand{font-size:20px}.brand .mark{font-size:27px}.brand small{font-size:9px}.settings button{padding:6px 10px}main{display:flex;flex-direction:column;margin:16px auto;padding:0 4%;gap:12px}.intro{width:100%}.eyebrow,h1,.intro>p,.how,.fine{display:none}.modes{max-width:none}.mode-note{text-align:center;min-height:24px;padding-top:6px}.arena{width:100%;min-height:560px;height:calc(100svh - 220px)}.game-area{min-height:350px}.hud{padding:18px 22px 0}.hud strong{font-size:42px}.overlay{padding-top:24px}h2{font-size:52px}.arena-foot{padding:12px 18px}footer{flex-direction:column;gap:4px;padding:0 5% 18px;font-size:10px}.side{display:none}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto}}

#profileButton{max-width:210px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.leaderboard{max-width:1325px;margin:25px auto 45px;padding:28px;background:var(--panel);border:1px solid var(--line);border-radius:14px;width:92%}.board-head{display:flex;justify-content:space-between;align-items:center;gap:20px}.board-head h2{font-size:36px;margin:0}.board-head .eyebrow{margin-bottom:8px}.board-controls{display:flex;gap:8px;flex-wrap:wrap}.board-controls button,.name-field button{background:#292f37;padding:10px 14px;border-radius:7px;font-size:14px}.board-controls button.selected{background:var(--lime);color:#18220b}#boardNote,.rank-summary,#boardState{font-size:14px;color:var(--muted);line-height:1.5}.rank-summary{color:var(--lime)}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;font-size:16px}th,td{text-align:left;padding:13px 12px;border-bottom:1px solid var(--line)}th{font-size:14px;color:var(--muted);font-weight:500}td:last-child,th:last-child{text-align:right}td:first-child{width:80px;color:var(--lime)}tr.me{background:#c5fa640c}dialog{color:#f7f7f2;background:var(--panel);border:1px solid #4c5663;border-radius:16px;padding:28px;width:min(480px,94vw);max-height:90svh}dialog::backdrop{background:#000b}.dialog-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.dialog-head h2{font-size:36px;margin:0}.dialog-head button{font-size:28px;background:transparent;min-width:44px;min-height:44px}dialog p{color:#b5bbc4;line-height:1.6;font-size:15px}dialog label{font-size:14px;display:block;margin-bottom:8px}.name-field{display:flex;gap:8px;margin-bottom:10px}.name-field input{min-width:0;flex:1;background:#11151b;color:white;border:1px solid #65717f;border-radius:7px;padding:12px;font:inherit}dialog small,.guest-note{font-size:13px!important;color:var(--muted)}#profileError{min-height:24px;color:var(--lime)}#scoreSync{font-size:13px;margin:12px 0 0;max-width:310px}#retryScore{margin-top:8px}.overlay{overflow-y:auto}.settings{flex-wrap:wrap;justify-content:flex-end}button:disabled{opacity:.6;cursor:wait}@media(max-width:650px){header{gap:12px;flex-wrap:wrap}.settings{gap:6px}#profileButton{max-width:165px}.board-head{align-items:flex-start;flex-direction:column}.leaderboard{padding:20px 16px;margin-top:20px}.board-controls{width:100%}.board-controls button{flex:1;padding:10px 7px}th,td{padding:12px 6px}.arena{height:calc(100svh - 255px)}.brand small{display:none}}

.game-nav{display:inline-flex;align-items:center;color:#c5fa64;font-size:14px;text-decoration:none;padding:8px 10px}.game-nav:hover{text-decoration:underline}footer a{color:#c5fa64;text-decoration:none}@media(max-width:650px){header .settings{width:100%;justify-content:flex-start}.arena{height:calc(100svh - 280px)}}

#countryInput{display:block;width:100%;margin:8px 0 10px;padding:12px;background:#11151b;color:white;border:1px solid #65717f;border-radius:7px;font:inherit}#heightValue{display:block;color:var(--muted);font-size:14px}.board-controls{flex-wrap:wrap}.table-wrap table{min-width:540px}

.scoring-note{font-size:13px;color:var(--muted);line-height:1.6}@media(max-width:650px){.scoring-note{margin:4px 0 8px;font-size:12px;text-align:center}}

.publisher-lockup{display:flex;flex-direction:column;flex-shrink:0;gap:3px}.publisher-logo{display:flex;align-items:center;gap:8px;text-decoration:none;color:#f7f7f2;font:500 24px/1.1 'DM Sans',system-ui,sans-serif;letter-spacing:-.8px}.publisher-logo strong{font-weight:800}.publisher-logo img{width:34px;height:37px;object-fit:contain}.publisher-by{font:400 11px/1.3 'DM Sans',system-ui,sans-serif;letter-spacing:.2px;color:#aab2bd;text-decoration:none;margin-left:42px}.publisher-by:hover{color:#c5fa64}.game-identity{font-size:15px;font-weight:700;color:#c5fa64;text-decoration:none;border-left:1px solid #3a424c;padding-left:20px;white-space:nowrap}.operator-address{font-style:normal;line-height:1.9;color:#bfc6cf}.operator-address a{color:#c5fa64}.site-footer .publisher-logo,footer .publisher-logo{font-size:21px}.site-footer .publisher-logo img,footer .publisher-logo img{width:28px;height:30px}.site-footer .publisher-by,footer .publisher-by{margin-left:36px}footer{flex-wrap:wrap;align-items:center}.site-footer>.publisher-lockup{margin-left:0;display:flex;gap:3px}@media(max-width:650px){.publisher-logo{font-size:21px}.publisher-logo img{width:28px;height:30px}.publisher-by{margin-left:36px;font-size:10px}.game-identity{font-size:13px;padding-left:12px}.site-header{gap:14px}header{gap:14px}.site-footer{gap:20px}}

/* Keep the publisher credit directly below the wordmark, independent of icon height. */
.publisher-lockup{position:relative;gap:1px;min-height:40px;justify-content:center}.publisher-logo{padding-left:42px;line-height:1.05}.publisher-logo img{position:absolute;left:0;top:50%;transform:translateY(-50%)}.publisher-by{margin-top:0;line-height:1.15}.site-footer>.publisher-lockup{gap:1px}.site-footer .publisher-logo,footer .publisher-logo{padding-left:36px}.game-identity{display:inline-flex;align-items:center;gap:7px;color:#f7f7f2;letter-spacing:-.3px}.game-identity img{display:block;width:34px;height:34px;flex-shrink:0;border-radius:7px}.game-accent{color:#c5fa64}@media(max-width:650px){.publisher-logo{padding-left:36px}.publisher-lockup{min-height:34px}.game-identity{gap:5px}.game-identity img{width:28px;height:28px}}

#feedbackDialog{width:min(520px,94vw)}#feedbackDialog textarea{box-sizing:border-box;width:100%;resize:vertical;background:#11151b;color:white;border:1px solid #65717f;border-radius:7px;padding:12px;font:inherit}.star-rating{border:0;padding:0;margin:20px 0}.star-rating legend{font-size:14px;margin-bottom:8px}.star-rating{display:flex;flex-direction:row-reverse;justify-content:flex-end;gap:3px}.star-rating input{position:absolute;opacity:0;pointer-events:none}.star-rating label{font-size:34px;line-height:1;cursor:pointer;color:#59616b;padding:3px;min-width:36px;text-align:center}.star-rating label:hover,.star-rating label:hover~label,.star-rating input:checked~label{color:var(--lime)}.star-rating input:focus-visible+label{outline:2px solid var(--lime);outline-offset:2px;border-radius:4px}@media(max-width:650px){.star-rating label{font-size:38px;min-width:42px;padding:5px}.star-rating{gap:1px}}

/* StackDare closed beta uses English as the single UI language. */
#lang{display:none!important}


/* Shared responsive guardrails: game UI must stay inside the viewport. */
html,body{max-width:100%;overflow-x:hidden}img,svg,canvas,video{max-width:100%}main,section,article,aside,header,footer,nav,div{min-width:0}.actions,.settings,.hud,.arena-foot,.board-head,.board-controls{max-width:100%}.button,button,input,select,textarea{max-width:100%}@media(max-width:430px){.site-header,header{max-width:100%;padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}.numlark-page,.landing,.app-page,.rank-page,.privacy-page,.portal-page,main{max-width:100%;padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}.numlark-card,.arena,.leaderboard,.demo-card{max-width:100%}}
@media(max-width:360px){.button,button{overflow-wrap:anywhere}.actions{gap:8px}}

/* Minimal gameplay header, preserving existing game controls and language switch. */
body>header{gap:12px}
body>header .publisher-by{display:none}
@media(max-width:760px){
 body>header{padding:8px 12px;gap:8px}
 body>header .publisher-lockup{display:none}
 body>header .game-identity{flex:0 0 auto}
 body>header .settings{gap:6px;min-width:0}
 body>header .settings .game-nav{font-size:12px}
 body>header .settings button{min-width:0}
}

/* Compact labeled navigation for StackDare, matching Numlark. */
body>header .settings .game-nav-labeled{display:inline-flex;align-items:center;gap:3px;white-space:nowrap;font-size:12px}
@media(max-width:760px){body>header .settings .game-nav-labeled{font-size:11px;padding:4px 2px}body>header .settings{gap:3px}body>header .settings #profileButton{max-width:64px;overflow:hidden;text-overflow:ellipsis}}

body>header .game-language-toggle{flex:0 0 auto;min-width:38px;min-height:36px;padding:5px 8px;border:1px solid #59616b;border-radius:8px;background:#272d34;color:#f7f7f2;font-size:12px;font-weight:700;cursor:pointer}
body>header #lang{display:none!important}
@media(max-width:760px){body>header .game-language-toggle{padding:5px;min-width:34px}}

/* Language switch sits at the end of the minimal game actions. */
body>header .settings #gameLanguage{order:99;margin-left:2px;width:30px;min-width:30px;min-height:30px;height:30px;padding:2px 3px;font-size:10px;line-height:1;border-radius:6px}
@media(max-width:760px){body>header .settings #gameLanguage{width:28px;min-width:28px;height:28px;min-height:28px;margin-left:0}}

/* Keep legacy controls available to game logic but never show them in the header. */
body>header #profileButton,body>header #sound{display:none!important}
