:root{--ui-cream:#fffdf2;--ui-gold:#ffd549;--ui-surface:#191919;--ui-edge:#484848;--ui-shadow:#080808;--ui-red-shadow:#9e170d}
.sheet,.welcome .sheet,.home-bottom{position:relative;border:1px solid var(--ui-edge);border-top:3px solid #686868;border-radius:7px;background:linear-gradient(145deg,#242424,#191919 55%);box-shadow:0 7px 0 var(--ui-shadow),0 18px 38px #0004;padding:25px}
.sheet::before,.home-bottom::before{content:'';position:absolute;left:24px;right:24px;top:-3px;height:3px;background:linear-gradient(90deg,var(--red) 0 54px,transparent 54px);pointer-events:none}
.eyebrow{color:#b8b8b8;font-size:10px;letter-spacing:.12em;font-weight:900}
.sheet h1{color:var(--ui-cream);font-size:20px;line-height:1.6;letter-spacing:-.035em;margin:13px 0 20px}
.sheet p{font-size:15px;line-height:1.55;color:#c8c8c8}
.primary,.secondary{border-radius:5px;transition:filter .12s,transform .12s,box-shadow .12s;color:var(--ui-cream)}
.primary{min-height:62px;padding:15px 16px;border-top:3px solid #ff6556;border-left:3px solid #ff382b;border-right:3px solid #b7190e;border-bottom:3px solid #bd1a0e;background:linear-gradient(115deg,#ff2c1b,var(--red) 70%);box-shadow:0 5px 0 var(--ui-red-shadow),0 8px 0 var(--ui-shadow);font:400 15px/1.5 'Press Start 2P';text-shadow:0 2px 0 #a21a10}
.primary:hover{filter:brightness(1.09)}
.primary:active{transform:translateY(4px);box-shadow:0 1px 0 var(--ui-red-shadow),0 4px 0 var(--ui-shadow)}
.secondary{min-height:54px;padding:11px 14px;border:1px solid #626262;border-bottom:3px solid #111111;background:linear-gradient(#363636,#292929);box-shadow:0 3px 0 var(--ui-shadow);font-size:15px;font-weight:900;gap:10px}
.secondary:hover{filter:brightness(1.14)}
.secondary:active{transform:translateY(3px);box-shadow:none}
.secondary>.ui-symbol{width:32px;height:32px;flex:none;display:block;object-fit:contain;filter:drop-shadow(0 2px 0 #0005)}
.primary:focus-visible,.secondary:focus-visible,.icon-button:focus-visible,.text-button:focus-visible{outline:3px solid var(--ui-gold);outline-offset:5px}
.sheet>.primary{margin-top:18px}.sheet>.secondary{margin-top:14px}
.text-button{color:#e2e2e2;font-weight:800;font-size:13px;text-decoration-color:#787878}
.text-button:hover{color:white;text-decoration-color:white}
.home-profile{display:flex;align-items:center;gap:12px;margin-bottom:22px;min-height:46px}
.home-avatar{flex:none;width:49px;height:49px;padding:4px;border-radius:7px;background:#303030;box-shadow:inset 0 1px #606060,0 3px #0c0c0c;object-fit:contain}
.home-name{min-width:0;flex:1}.home-name small{display:block;font-size:9px;letter-spacing:.12em;font-weight:900;color:#b8b8b8;margin-bottom:5px}.home-name strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:20px;font-weight:900;color:var(--ui-cream)}
.home-change{min-height:44px;padding:8px 10px;background:#2d2d2d;border:1px solid #545454;border-radius:5px;font-weight:800;font-size:12px;color:#dddddd}
.home-change:hover{background:#3b3b3b}
.attempts{font-size:13px;font-weight:800;padding:0;gap:10px;margin:0 0 16px;color:#cecece}
.attempts .attempt-charge{display:flex;align-items:center;gap:5px}
.attempt-charge i{display:block;width:22px;height:12px;background:#343434;border:1px solid #626262;transform:skewX(-12deg);box-shadow:inset 0 -3px #0003}
.attempt-charge i.is-charged{background:#ed0f00;border-color:#ff6556;box-shadow:inset 0 -3px #ac160d}
.attempts b{font:900 14px 'Nunito Sans';color:var(--ui-cream);margin-left:7px}.attempts small{font:700 12px 'Nunito Sans';color:#b0b0b0}
.home-bottom>.primary{min-height:76px;font-size:25px;letter-spacing:.025em}
.home-links{gap:12px;margin-top:24px}.home-links>.secondary{font-size:16px;min-height:60px;padding:8px 10px}
.home-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:18px;color:#b0b0b0;font-size:11px}
.home-footer .text-button{margin:0;padding:6px 0;min-height:38px;white-space:nowrap}.home-footer>span{text-align:right;line-height:1.35}
.sheet label{font-size:13px;margin:18px 0 9px;color:#e2e2e2}
.nick-input{height:56px;border:2px solid #626262;border-radius:5px;background:#111111;box-shadow:inset 0 3px #090909;padding:0 15px}
.nick-input span{color:var(--ui-gold);font-size:25px}.nick-input input{font-size:18px}.nick-input:focus-within{border-color:var(--ui-gold);box-shadow:0 0 0 2px #ffd54922}
.sheet .fine{font-size:11px;line-height:1.5;color:#adadad}.sheet .error{color:#ff9a88}
.welcome .sheet .home-links{gap:20px;margin-top:16px}.welcome .sheet .home-links .text-button{font-size:13px;min-height:40px}
.sheet form .primary{margin-top:18px}
.sheet>[data-action=home],.sheet>[data-action=quit]{background:linear-gradient(#363636,#292929);border-color:#626262;min-height:54px;margin-top:16px}
.rank-list{margin:20px 0 16px}.rank-list li{min-height:58px;padding:11px 10px;font-size:16px;grid-template-columns:32px minmax(0,1fr) auto;gap:12px;border-color:#444444}
.rank-no{font:14px 'Press Start 2P';color:#a3a3a3}.rank-list li:nth-child(-n+3) .rank-no{color:var(--ui-gold)}.rank-list li:first-child{border-top:1px solid #81723d;background:#ffd5490b;border-radius:5px 5px 0 0}.rank-list b{font-size:13px;color:var(--ui-cream)}.rank-list .is-you{background:#333333;box-shadow:inset 3px 0 #ed0f00;border-radius:4px}
.distance-leader{border-left:3px solid var(--ui-gold);background:#ffd5490b;padding:12px 14px;border-radius:0 4px 4px 0}.sheet .distance-leader{font-size:14px}
.help-list{gap:18px;margin:18px 0 24px}.help-list li{font-size:14px;line-height:1.5;gap:17px}.help-list li>b{flex:0 0 72px;height:72px;border-radius:8px;background:#303030;box-shadow:inset 0 1px #676767,0 4px #111111}.help-list img{width:79px;height:79px}.help-list strong{font-size:15px;margin-bottom:3px;color:var(--ui-cream)}
.result-score{font-size:54px;color:var(--ui-gold);line-height:1.5;text-shadow:0 4px 0 #7c571b;margin:14px 0 20px}.result-score small{color:#bfbfbf;text-shadow:none;font-size:12px;letter-spacing:.06em;margin-top:3px}
.result-details{border-color:#4c4c4c;padding:18px 0;margin-bottom:20px;gap:18px}.result-details>div+div{padding-left:18px;border-left:1px solid #4c4c4c}.result-details b{font-size:28px;color:var(--ui-cream)}.result-details span{font-size:13px;color:#bfbfbf}.sheet .saved{font-size:13px;padding:11px 13px;background:#111111;border-radius:5px;color:#cecece}
.sheet .player-line{border-block:1px solid #4c4c4c;padding:14px 0;margin:0 0 20px;font-size:17px}.sheet .player-line>span{color:#bbbbbb;font-size:11px}
.sound-settings{border-color:#4c4c4c;padding:18px 0;margin-top:22px;gap:12px}.sheet .sound-settings label{font-size:14px}.sound-settings input{accent-color:#ff3020}.sound-settings>span{font-size:11px;color:#b0b0b0}
.reset-clock{color:var(--ui-gold);font-size:38px;text-align:center;margin:20px 0 24px;text-shadow:0 3px #7c571b}
.hud{background:#191919f5;border-color:#626262;border-top-color:#898989;border-radius:7px;box-shadow:0 4px 0 #0c0c0cb3}.hud-footer{border-color:#575757}.score>span,.best{color:#b9b9b9}.hud .score strong{color:var(--ui-cream)}.coin-counter{color:var(--ui-gold)}
.icon-button{border-color:#626262;border-top-color:#898989;background:linear-gradient(#323232,#202020);border-radius:5px;box-shadow:0 3px 0 #080808}
.start-prompt{background:#191919f2;border:1px solid #666666;border-top:3px solid #ed0f00;border-radius:7px;padding:18px;box-shadow:0 5px 0 #0a0a0ab3}.start-prompt b{font-size:21px;color:var(--ui-cream)}.start-prompt span{font-size:14px;color:#cdcdcd;margin-top:6px}
.hint{background:#1c1c1ced;border:1px solid #666666;border-radius:5px;color:#e5e5e5}.toast{background:#222222;border-color:#777777;border-radius:6px;box-shadow:0 5px 0 #0a0a0a;font-size:14px}
@media(min-aspect-ratio:1/1){
 .welcome{grid-template-columns:minmax(0,1fr) minmax(360px,520px)}
 .welcome .sheet,.home-bottom{padding:28px}.home-bottom{margin-bottom:2dvh}.home-profile{margin-bottom:24px}.home-avatar{width:54px;height:54px}.home-name strong{font-size:23px}.home-bottom>.primary{min-height:82px;font-size:28px}.home-links>.secondary{min-height:64px;font-size:17px}.home-links>.secondary .ui-symbol{width:37px;height:37px}
 .modal>.sheet{width:min(100%,540px);padding:30px}.game[data-view=help] .sheet{width:min(100%,640px);max-width:640px}.sheet h1{font-size:22px}.sheet p{font-size:16px}.game[data-view=rank] .sheet{width:min(100%,600px)}
}
@media(max-aspect-ratio:1/1){
 .welcome .sheet,.home-bottom{padding:21px;margin-inline:16px;width:calc(100% - 32px)}.home-profile{margin-bottom:17px}.home-name strong{font-size:18px}.home-avatar{width:43px;height:43px}.home-change{font-size:11px;padding:7px 9px}.home-bottom>.primary{min-height:65px;font-size:23px}.home-links{margin-top:22px;gap:10px}.home-links>.secondary{font-size:14px;min-height:54px}.secondary>.ui-symbol{width:28px;height:28px}.home-footer{margin-top:13px;font-size:10px}.home-footer .text-button{font-size:12px;min-height:34px}.attempts{margin-bottom:14px}.attempt-charge i{width:19px;height:11px}.attempts b{font-size:13px}
 .sheet h1{font-size:17px;margin:10px 0 17px}.sheet p{font-size:14px}.sheet .primary{font-size:13px;min-height:56px}.sheet .secondary{min-height:50px;font-size:14px}.sheet .home-links>.secondary{min-height:50px}.result-score{font-size:44px}.result-details b{font-size:25px}.rank-list li{min-height:53px;font-size:14px;gap:8px}.rank-list b{font-size:11px}.rank-no{font-size:12px}.help-list li{font-size:13px;gap:13px}.help-list strong{font-size:14px}.help-list li>b{flex-basis:58px;height:58px}.help-list img{width:65px;height:65px}.sound-settings{padding:16px 0}.sheet .sound-settings label{font-size:13px}
}
@media(max-height:700px){
 .welcome .sheet,.home-bottom{padding:18px}.home-profile{margin-bottom:12px;min-height:40px}.home-avatar{width:40px;height:40px}.home-name strong{font-size:17px}.home-name small{font-size:8px;margin-bottom:3px}.home-change{font-size:11px;min-height:40px}.attempts{font-size:12px;margin-bottom:12px}.home-bottom>.primary{min-height:60px;font-size:22px}.home-links{margin-top:20px}.home-links>.secondary{min-height:50px;font-size:14px}.home-footer{margin-top:11px;font-size:10px}.home-footer .text-button{min-height:32px;font-size:12px}.home-links>.secondary .ui-symbol{width:28px;height:28px}.welcome .sheet h1{font-size:15px;margin:8px 0 13px}.welcome .sheet p{font-size:13px}.welcome .sheet .fine{font-size:10px;margin-top:13px}.welcome .sheet label{margin:12px 0 7px;font-size:12px}.welcome .sheet .nick-input{height:49px}.welcome .sheet .primary{min-height:52px;font-size:13px}.welcome .sheet .home-links{margin-top:10px}.welcome .sheet .home-links .text-button{min-height:34px;font-size:12px}
}
@media(min-aspect-ratio:1/1) and (max-height:560px){
 .welcome{grid-template-columns:minmax(0,1fr) minmax(280px,350px);padding:62px 20px 15px;gap:22px}.welcome .sheet,.home-bottom{padding:14px}.home-bottom{margin-bottom:0}.home-profile{margin-bottom:9px;gap:8px}.home-name strong{font-size:16px}.home-name small{display:none}.home-avatar{width:36px;height:36px}.home-change{min-height:36px}.attempts{margin-bottom:9px}.home-bottom>.primary{min-height:50px;font-size:19px}.home-links{margin-top:17px;gap:9px}.home-links>.secondary{min-height:44px;font-size:12px}.home-footer{margin-top:7px;font-size:9px}.home-footer .text-button{font-size:11px;min-height:28px}.home-links>.secondary .ui-symbol{width:25px;height:25px}.modal>.sheet{padding:22px;width:min(100%,540px)}.sheet h1{font-size:18px}.sheet p{font-size:14px}
 .welcome .sheet .eyebrow{font-size:8px}.welcome .sheet h1{font-size:13px;line-height:1.5;margin:6px 0 10px}.welcome .sheet>p{display:none}.welcome .sheet label{margin:7px 0 6px}.welcome .sheet .fine{font-size:9px;margin-top:10px}.welcome .sheet .primary{min-height:45px;margin-top:12px;font-size:12px}.welcome .sheet .nick-input{height:43px}.welcome .sheet .home-links{margin-top:7px;gap:12px}.welcome .sheet .home-links .text-button{min-height:30px;font-size:11px}
}
@media(max-width:350px){.home-name strong{font-size:15px}.home-profile{gap:8px}.home-avatar{width:36px;height:36px}.home-change{padding:6px 7px;font-size:10px}.home-links>.secondary{font-size:12px;gap:6px}.home-footer>span{max-width:125px}.home-bottom>.primary{font-size:21px}.sheet{padding:19px}.sheet h1{font-size:15px}.help-list li{gap:10px}.help-list li>b{flex-basis:48px;height:48px}.help-list img{width:56px;height:56px}}
@media(prefers-reduced-motion:reduce){.primary,.secondary{transition:none}}

@media(min-aspect-ratio:1/1) and (max-height:360px){.welcome .home-bottom{padding:12px}.home-profile{min-height:36px;margin-bottom:6px}.home-bottom .attempts{margin-bottom:7px}.home-bottom>.primary{padding:7px 12px;line-height:1.2;min-height:50px}.home-bottom .home-links{margin-top:15px}.home-bottom .home-links>.secondary{min-height:44px;padding:6px 9px}.home-footer{margin-top:5px}}
.result-score{font-size:clamp(30px,11cqw,54px)}
