*{margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{height:100%;overflow:hidden;background:#070b1f;color:#eef2ff;font-family:-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Noto Sans KR",sans-serif;-webkit-user-select:none;user-select:none}
canvas{display:block;touch-action:none}
#game{position:fixed;top:0;left:0}
.screen{position:fixed;inset:0;display:none;flex-direction:column;align-items:center;overflow-y:auto;padding:calc(22px + env(safe-area-inset-top)) 22px calc(18px + env(safe-area-inset-bottom));text-align:center;z-index:2}
.screen.on{display:flex}
.screen>:first-child{margin-top:auto}.screen>:last-child{margin-bottom:auto}
#over,#rank{background:rgba(5,8,24,.82)}
.brand{font-size:12px;letter-spacing:.42em;color:#c9ff6a;font-weight:800;padding-left:.42em}
h1{font-size:clamp(36px,11.5vw,56px);font-weight:900;line-height:1.1;margin:10px 0 6px;text-shadow:0 0 24px rgba(201,255,106,.45)}
h1 em{font-style:normal;color:#e4ff8f}
.sub{font-size:14px;color:#aeb8e0;line-height:1.6}
#demo{width:200px;height:150px;position:static;margin:8px 0;flex:none}
.rules{display:flex;gap:8px;margin:4px 0 14px;width:100%;max-width:340px}
.rules div{flex:1;background:rgba(255,255,255,.07);border-radius:14px;padding:9px 4px;font-size:11px;line-height:1.5;color:#cdd5f5}
.rules i{display:block;width:12px;height:12px;border-radius:50%;margin:0 auto 5px}
input{width:100%;max-width:300px;padding:13px;border-radius:14px;border:1px solid rgba(255,255,255,.2);background:rgba(10,15,40,.85);color:#fff;font-size:16px;text-align:center;outline:none;-webkit-user-select:text;user-select:text;flex:none}
input:focus{border-color:#c9ff6a}
button{font-family:inherit;border:0;cursor:pointer;border-radius:16px;font-weight:800;font-size:15px;padding:13px 18px;background:rgba(255,255,255,.11);color:#fff;flex:none}
button:active{transform:scale(.97)}
.main{background:linear-gradient(135deg,#e9ff9a,#8ee85a);color:#10220a;font-size:19px;width:100%;max-width:300px;margin-top:10px;padding:16px;box-shadow:0 8px 30px rgba(155,240,90,.35)}
.row{display:flex;gap:8px;width:100%;max-width:300px;margin-top:8px;flex:none}
.row button{flex:1}
footer{font-size:10px;color:#6d78a8;margin-top:16px}
.challenge{display:none;background:rgba(255,196,64,.16);border:1px solid rgba(255,196,64,.5);color:#ffd97a;border-radius:12px;padding:9px 14px;font-size:13px;margin-bottom:10px}
.big{font-size:58px;font-weight:900;color:#e9ff9a;line-height:1.1;font-variant-numeric:tabular-nums}
.title{font-size:20px;font-weight:900;margin:2px 0}
.stats{display:flex;gap:8px;width:100%;max-width:300px;margin:12px 0 2px;flex:none}
.stats div{flex:1;background:rgba(255,255,255,.08);border-radius:14px;padding:10px 2px;font-size:11px;color:#aeb8e0}
.stats b{display:block;font-size:21px;color:#fff}
ol{list-style:none;width:100%;max-width:320px;margin:12px 0;flex:none}
li{display:flex;gap:10px;padding:10px 14px;border-radius:12px;background:rgba(255,255,255,.07);margin-bottom:5px;font-size:14px}
li span:nth-child(2){flex:1;text-align:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
li.me{background:rgba(201,255,106,.22)}
#hud button{position:fixed;z-index:1;right:12px;bottom:calc(12px + env(safe-area-inset-bottom));width:44px;height:44px;padding:0;border-radius:50%;font-size:18px}
@media (max-height:680px){#demo{display:none}h1{font-size:36px}.rules{margin:10px 0}.main{padding:13px}footer{margin-top:8px}.big{font-size:46px}}
#home{padding-bottom:calc(64px + env(safe-area-inset-bottom))}
@media (max-width:350px){.screen{padding-left:14px;padding-right:14px}.rules{gap:5px}.rules div{font-size:10px;padding:8px 1px}.row button{font-size:13px;padding-left:6px;padding-right:6px;white-space:nowrap}}
@media (max-height:480px){.screen{padding-top:8px}#home{padding-bottom:8px}h1{font-size:24px;margin:2px 0}h1 br{display:none}.sub{font-size:12px}.rules{margin:6px 0;max-width:420px}.rules i{display:none}.rules div{padding:4px}input{padding:7px}.main{padding:9px;font-size:16px;margin-top:6px}.row{margin-top:6px}.row button{padding:8px}footer{margin-top:4px}.challenge{margin-bottom:4px;padding:4px 10px}.big{font-size:34px}.title{font-size:16px}.stats{margin:4px 0 0}.stats div{padding:4px 2px}.stats b{font-size:16px}ol{margin:6px 0}li{padding:5px 12px}}
#langs{display:flex;flex-wrap:wrap;justify-content:center;gap:5px;margin-bottom:12px;flex:none}
#langs button{font-size:11px;padding:6px 10px;border-radius:20px;color:#aeb8e0;background:rgba(255,255,255,.08)}
#langs button[aria-pressed="true"]{background:#e4ff8f;color:#10220a}
html:lang(ja),html:lang(ja) body{font-family:-apple-system,"Hiragino Sans","Noto Sans JP","Yu Gothic",sans-serif}
html:lang(zh-CN),html:lang(zh-CN) body{font-family:-apple-system,"PingFang SC","Noto Sans SC","Microsoft YaHei",sans-serif}
html:lang(es) h1{font-size:clamp(30px,10vw,48px)}
.rules div{overflow-wrap:anywhere}
li span:first-child,li span:last-child{flex:none}
@media (max-width:350px){#langs{gap:3px}#langs button{padding:5px 7px;font-size:10px}.row button{white-space:normal}}
@media (max-height:480px){#langs{margin-bottom:3px}#langs button{padding:3px 8px}html:lang(es) h1{font-size:22px}}
