:root{font-family:Arial,Helvetica,sans-serif;color:#f7f2e7;background:#10191b;font-synthesis:none;-webkit-font-smoothing:antialiased}
*{box-sizing:border-box}
body{margin:0;min-width:320px;background:radial-gradient(circle at 52% 1%,#233536 0,#10191b 52%,#0c1214 100%);min-height:100vh}
button,input{font:inherit}
button{cursor:pointer}
button:focus-visible,input:focus-visible{outline:3px solid #f4c95c;outline-offset:3px}
.hidden{display:none!important}
.shell{max-width:850px;margin:0 auto;padding:18px clamp(16px,3.5vw,56px) 18px}
.masthead{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px;gap:20px}
.brand-lockup{display:flex;align-items:center;gap:12px}
.brand-mark{position:relative;display:grid;place-items:center;width:40px;height:40px;border-radius:11px;background:#e2b954;color:#142021;font-family:'Barlow Condensed',Impact,sans-serif;font-size:22px;line-height:1;font-weight:900;letter-spacing:-3px;box-shadow:0 3px 0 #8e702f,0 10px 24px #0004;padding-right:3px}
.brand-spark{position:absolute;font-family:Arial,sans-serif;font-size:12px;color:#fff0b8;right:-5px;top:-6px;letter-spacing:0}
.brand-copy{display:flex;flex-direction:column;gap:0;line-height:1}
.brand-copy strong{font-family:'Barlow Condensed',Impact,sans-serif;font-size:23px;letter-spacing:.035em}
.brand-copy span{font-size:9px;font-weight:800;letter-spacing:.24em;color:#b8c3bd;margin-top:3px}
.header-right{display:flex;align-items:center;gap:12px}
.pill{display:inline-flex;align-items:center;gap:9px;border:1px solid #38504a;border-radius:99px;padding:9px 12px;color:#c8d5c8;background:#1b2b2a;font-size:10px;font-weight:800;letter-spacing:.13em;white-space:nowrap}
.live-dot{width:7px;height:7px;border-radius:50%;background:#91cc8e;box-shadow:0 0 0 3px #91cc8e24}
.icon-button{display:flex;align-items:center;justify-content:center;gap:7px;min-width:72px;height:36px;border:1px solid #3b4b48;border-radius:9px;background:#1a2828;color:#ebeadb;font-size:10px;font-weight:800;letter-spacing:.08em;transition:background-color .14s ease,border-color .14s ease,scale .14s ease}
.icon-button:hover{background:#263b38;border-color:#587268}
.icon-button:active,.primary-button:active{scale:.96}
.icon-button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.icon-button .sound-wave{display:none}
.icon-button.is-on .sound-wave{display:block}
.icon-button.is-on .sound-slash{display:none}
.layout{display:grid;grid-template-columns:minmax(0,390px) minmax(0,322px);gap:18px;align-items:stretch;justify-content:center}
.game-card,.side-card{background:#1b292a;border:1px solid #344645;border-radius:16px;box-shadow:0 18px 50px #0004,0 2px 9px #0003;overflow:hidden}
.score-strip{height:64px;padding:9px 20px;display:grid;grid-template-columns:repeat(3,1fr);border-bottom:1px solid #3a4b46;background:linear-gradient(180deg,#243436,#1d2c2d)}
.stat{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:0}
.stat-center{align-items:center;border-left:1px solid #40514c;border-right:1px solid #40514c}
.stat-right{align-items:flex-end}
.stat-label,.result-score span{font-size:10px;letter-spacing:.2em;font-weight:800;color:#a3b2aa}
.stat strong{font-family:'Barlow Condensed',Impact,sans-serif;font-size:32px;line-height:.98;font-weight:800;letter-spacing:.02em;font-variant-numeric:tabular-nums}
.stat:first-child strong{color:#f3c75e}
.stat-suffix{font-size:.58em;margin-left:2px}
.game-stage{position:relative;width:100%;aspect-ratio:8/11;overflow:hidden;background:#26322d;touch-action:none}
#gameCanvas{display:block;width:100%;height:100%}
.stage-vignette{pointer-events:none;position:absolute;inset:0;box-shadow:inset 0 0 110px #111c1875,inset 0 -45px 65px #0d161440}
.overlay{position:absolute;inset:0;display:grid;place-items:center;padding:18px;background:linear-gradient(90deg,#0d1917cd,#10211cb8 52%,#0b1916ca);text-align:center}
.overlay-panel{max-width:550px;width:min(100%,520px);display:flex;flex-direction:column;align-items:center}
.eyebrow{font-size:11px;font-weight:800;letter-spacing:.22em;color:#a8d3a7;white-space:nowrap}
.eyebrow-line{display:inline-block;width:19px;height:2px;background:#a8d3a7;vertical-align:middle;margin-right:6px}
.overlay h1,.overlay h2,.side-heading h2{font-family:'Barlow Condensed',Impact,sans-serif;font-weight:900;letter-spacing:.015em;margin:0;text-wrap:balance}
.overlay h1{font-size:clamp(54px,6vw,66px);line-height:.83;margin:19px 0 20px;text-shadow:0 5px 15px #0006}
.overlay h1 em{font-style:normal;color:#f2c358}
.overlay p{font-size:15px;line-height:1.55;color:#d5ded2;max-width:390px;margin:0 0 22px;text-wrap:pretty}
.overlay p strong{color:#fff}
.primary-button{border:0;border-radius:9px;min-height:50px;background:#f0bc4f;color:#182321;font-family:'Barlow Condensed',Impact,sans-serif;font-size:19px;font-weight:900;letter-spacing:.06em;padding:12px 23px;box-shadow:0 4px 0 #9e772e,0 12px 23px #0005;transition:background-color .14s ease,scale .14s ease,box-shadow .14s ease}
.primary-button:hover{background:#ffd173;box-shadow:0 4px 0 #9e772e,0 14px 26px #0007}
.primary-button span{display:inline-block;margin-left:13px;font-family:Arial,sans-serif;font-size:18px;font-weight:400}
.primary-button:disabled{opacity:.55;cursor:wait}
.panel-hint{font-size:11px;letter-spacing:.02em;color:#b8c9b7;margin-top:22px}
.hint-divider{margin:0 5px;color:#789784}
.small-panel h2,.end-panel h2{font-size:clamp(58px,7vw,80px);line-height:1;margin:15px 0 12px;color:#f1c45a}
.end-panel h2{font-size:clamp(48px,6vw,72px)}
.end-panel{max-width:600px}
.result-score{min-width:170px;padding:8px 25px 5px;margin:1px 0 7px;border-top:1px solid #789171;border-bottom:1px solid #789171;display:flex;flex-direction:column;gap:1px}
.result-score strong{font-family:'Barlow Condensed',Impact,sans-serif;font-size:48px;color:#fff5d9;font-variant-numeric:tabular-nums;line-height:1}
.end-panel p{margin:5px 0 11px;font-size:13px}
.initials-form{width:min(100%,355px);margin:0 0 12px}
.initials-form label{display:block;color:#b7d2af;font-size:11px;font-weight:800;letter-spacing:.13em;margin-bottom:8px}
.initials-row{display:flex;gap:8px;align-items:stretch}
.initials-row input{width:90px;min-width:90px;border:2px solid #99b49c;border-radius:8px;background:#f3f0df;color:#20302b;text-align:center;text-transform:uppercase;font-family:'Barlow Condensed',Impact,sans-serif;font-size:28px;font-weight:800;letter-spacing:.1em}
.initials-row .primary-button{flex:1;min-height:46px;font-size:17px;padding:8px 10px}
.initials-row .primary-button span{margin-left:5px}
.form-error{display:block;color:#ffd3a5;font-size:12px;min-height:17px;margin-top:5px}
.end-actions{display:flex;flex-direction:column;align-items:center;gap:7px}
.text-button{color:#d8e5d6;background:none;border:0;text-decoration:underline;text-underline-offset:3px;font-size:12px;padding:6px 14px}
.side-card{display:flex;flex-direction:column;min-height:0}
.side-heading{padding:25px 23px 19px;background:radial-gradient(circle at 90% 0%,#365044 0,#21312e 45%,#1b292a 100%)}
.side-heading h2{font-size:37px;line-height:1;margin:10px 0 6px;color:#faf5e9}
.heading-star{font-family:Arial,sans-serif;color:#e8bf60;font-size:16px;vertical-align:top;margin:0 0 0 5px}
.side-heading p{margin:0;color:#b4c3b7;font-size:12px;line-height:1.45;text-wrap:pretty}
.tabs{display:flex;border-top:1px solid #3a4b44;border-bottom:1px solid #3a4b44;padding:0 12px}
.tab{flex:1;height:47px;border:0;background:transparent;color:#a5b6ab;font-size:11px;font-weight:800;letter-spacing:.13em;position:relative}
.tab.active{color:#f0ca72}
.tab.active::after{content:'';position:absolute;left:15px;right:15px;bottom:-1px;height:3px;background:#eabd61;border-radius:3px 3px 0 0}
.leaderboard{flex:1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(5,42px);grid-auto-flow:column;align-content:start;gap:4px 8px;padding:10px 12px;min-height:305px}
.board-row{display:grid;grid-template-columns:24px minmax(0,1fr) auto;align-items:center;gap:4px;min-width:0;padding:0 6px;border-radius:7px;background:#243432;font-size:11px}
.board-row .rank{font-family:'Barlow Condensed',Impact,sans-serif;color:#9db0a3;font-size:16px;font-weight:800;font-variant-numeric:tabular-nums}
.board-row:nth-child(-n+3) .rank{color:#f1c467}
.board-row .initials{font-weight:800;letter-spacing:.14em;color:#f5f2e5}
.board-row .points{font-family:'Barlow Condensed',Impact,sans-serif;font-weight:800;color:#f4cc74;font-size:19px;font-variant-numeric:tabular-nums}
.board-empty{grid-column:1/-1;grid-row:1/-1;padding:32px 12px;text-align:center;color:#b7c7b8;font-size:13px;line-height:1.55}
.board-footer{border-top:1px solid #3a4b44;min-height:42px;padding:12px 18px;display:flex;justify-content:space-between;gap:8px;color:#8fa495;font-size:9px;font-weight:800;letter-spacing:.07em;white-space:nowrap}
.page-footer{display:flex;justify-content:space-between;gap:16px;margin-top:17px;color:#82998f;font-size:9px;font-weight:800;letter-spacing:.1em}
.page-footer a{color:#e8bf60;text-decoration:none}
.page-footer a:hover{text-decoration:underline;text-underline-offset:3px}
.embed-shell{max-width:850px}
.embed-card{padding:clamp(24px,5vw,48px);background:#1b292a;border:1px solid #344645;border-radius:16px;box-shadow:0 18px 50px #0004,0 2px 9px #0003}
.embed-card h1{font-family:'Barlow Condensed',Impact,sans-serif;font-size:clamp(42px,7vw,68px);line-height:1;margin:13px 0 12px;text-wrap:balance}
.embed-card>p{max-width:550px;color:#c3d0c4;font-size:15px;line-height:1.55;text-wrap:pretty}
.embed-label{display:block;margin:30px 0 10px;color:#a8d3a7;font-size:11px;font-weight:800;letter-spacing:.15em}
.embed-code{display:block;width:100%;min-height:190px;resize:vertical;padding:18px;border:1px solid #587066;border-radius:10px;background:#101b1c;color:#e9e9d7;font:13px/1.55 ui-monospace,SFMono-Regular,Consolas,monospace;white-space:pre;overflow:auto}
.embed-actions{display:flex;align-items:center;flex-wrap:wrap;gap:14px;margin-top:20px}
.embed-actions #copyStatus{color:#a8d3a7;font-size:12px;line-height:1.4}
.embed-card .embed-note{font-size:12px;color:#98aa9c;margin:26px 0 0}
@media(max-width:820px){.layout{grid-template-columns:minmax(0,390px)}.side-card{max-width:none}.side-heading{padding:20px}.side-heading h2{font-size:32px}.page-footer{margin-bottom:10px}}
@media(max-width:540px){.shell{padding:10px 10px 14px}.masthead{margin-bottom:10px;padding:0 3px}.brand-mark{width:35px;height:35px;font-size:19px}.brand-copy strong{font-size:20px}.brand-copy span{font-size:8px}.pill{display:none}.game-card,.side-card{border-radius:12px}.score-strip{height:56px;padding:7px 12px}.stat-label{font-size:8px}.stat strong{font-size:26px}.overlay{padding:12px}.overlay h1{font-size:clamp(58px,13vw,77px);margin:14px 0 15px}.overlay p{font-size:13px;margin-bottom:16px}.panel-hint{font-size:10px;margin-top:15px}.start-panel{transform:translateY(-9px)}.end-panel h2{font-size:54px;margin:9px 0 7px}.result-score strong{font-size:39px}.end-panel p{font-size:12px}.initials-form{max-width:315px}.initials-row .primary-button{font-size:15px}.page-footer{font-size:8px;line-height:1.5;flex-direction:column;gap:4px;text-align:center}.embed-card{padding:23px 17px}.embed-code{font-size:11px}.embed-actions .primary-button{width:100%}}
@media(max-width:390px){.brand-copy strong{font-size:19px}.game-stage{aspect-ratio:11/16}.panel-hint{font-size:9px}.overlay h1{font-size:55px}}
@media(max-width:540px){.shell{padding-top:max(10px,env(safe-area-inset-top));padding-bottom:max(14px,env(safe-area-inset-bottom))}.game-stage{max-height:calc(100svh - 136px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}}
@media(prefers-reduced-motion:reduce){.primary-button,.icon-button{transition:none}}
