
*{box-sizing:border-box}body{margin:0;background:#fff;color:#1d1d1d;font-family:Arial,Helvetica,sans-serif;overflow:hidden}.brand{position:absolute;top:27px;left:32px;font-weight:800;letter-spacing:1px;font-size:18px}.brand b{display:inline-grid;place-items:center;width:34px;height:34px;background:#c4eb52;border-radius:9px;margin-right:10px}.form{position:absolute;z-index:3;top:12%;left:50%;transform:translateX(-50%);width:320px;text-align:center}.form h1{font-size:27px;letter-spacing:-1px;margin:10px 0}.form p{color:#888;font-size:12px;margin-bottom:23px}.form label{display:block;text-align:left;font-size:12px;font-weight:bold;margin:12px 0 6px}.form input{width:100%;height:43px;border:1px solid #ddd;border-radius:6px;padding:0 12px;outline:none;font-size:14px}.form input:focus{border-color:#a4cc46;box-shadow:0 0 0 3px #c8e99c77}.form button.submit{width:100%;height:43px;background:#222;color:white;border:0;border-radius:6px;margin-top:17px;font-weight:bold;cursor:pointer}.form small{display:block;margin-top:12px;color:#aaa;font-size:10px}.field{position:relative}.toggle{position:absolute;right:6px;top:6px;height:31px;background:#f1f1f1;border:0;border-radius:5px;padding:0 10px;cursor:pointer;color:#555}.field input{padding-right:92px}#scene{position:absolute;inset:0;width:100%;height:100%;pointer-events:auto;z-index:2;cursor:default}.hint{position:absolute;bottom:12px;left:18px;color:#aaa;font-size:11px}.state{position:absolute;bottom:12px;right:18px;color:#aaa;font-size:11px}@media(max-height:630px){.form{top:5%}.form h1{font-size:23px}.form p{margin-bottom:12px}}@media(max-width:520px){.form{top:13%;width:min(310px,calc(100vw - 30px))}.brand{top:12px;left:12px;font-size:13px}}

.game-overlay{position:fixed;inset:0;z-index:30;display:none;align-items:center;justify-content:center;background:#161b18a8;backdrop-filter:blur(7px);padding:16px}
.game-overlay.open{display:flex}
.game-shell{width:min(860px,100%);background:#fff;border-radius:20px;padding:20px;box-shadow:0 24px 80px #0005}
.game-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.game-top h2{font-size:20px;letter-spacing:-.6px;margin:0}.game-top p{font-size:12px;color:#777;margin:4px 0 0}
.game-close{width:36px;height:36px;border:0;background:#f2f2f2;border-radius:10px;cursor:pointer;font-size:23px}
 .game-entry{display:grid;grid-template-columns:minmax(140px,1fr) minmax(180px,1.5fr);gap:14px;margin:10px 0 14px}.game-entry label{display:block;font-size:12px;font-weight:bold;margin-bottom:5px}.game-entry input{height:39px;width:100%;border:1px solid #d5d5d5;border-radius:9px;padding:0 11px;font-size:14px}.game-leaders{border:1px solid #e5e8e0;background:#f8faf5;border-radius:10px;padding:9px 12px;max-height:112px;overflow:auto}.game-leaders strong{font-size:12px}.game-leaders ol{margin:5px 0 0;padding-left:22px;font-size:12px}.game-leaders li{padding:2px 0}.game-leaders li span{float:right;font-weight:bold}.game-error{font-size:12px;color:#c3293b;min-height:15px;margin:3px 0}.game-stats{display:flex;gap:18px;font-size:13px;font-weight:bold;margin:8px 0 12px}
#gameCanvas{display:block;width:100%;aspect-ratio:800/360;border-radius:13px;background:#fafbf6;touch-action:manipulation;cursor:pointer}
.game-bottom{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:12px}
.game-bottom span{font-size:12px;color:#777}.game-btn{border:0;background:#202020;color:white;padding:11px 18px;border-radius:9px;font-weight:bold;cursor:pointer}
.toy-hint{position:absolute;bottom:38px;left:18px;color:#7d8a60;font-size:11px;z-index:3;pointer-events:none}
@media(max-width:550px){.game-entry{grid-template-columns:1fr}.game-leaders{max-height:85px}.game-shell{padding:12px}.game-top h2{font-size:16px}.game-bottom span{font-size:11px}.toy-hint{bottom:58px}}

/* Mobile and accessibility adaptation: original animation and game are preserved. */
html{min-height:100%;-webkit-text-size-adjust:100%}
body{min-height:100vh;min-height:100dvh;overflow-x:hidden}
.form{max-width:calc(100vw - 32px)}
.form input{font-size:16px}
.form button.submit{min-height:46px}
.form button.submit:disabled{opacity:.65;cursor:wait}
.form small{min-height:16px;line-height:1.5}
.form:focus-within{z-index:4}
.game-overlay{overflow-y:auto;overscroll-behavior:contain}
.game-shell{max-height:calc(100dvh - 32px);overflow-y:auto;overscroll-behavior:contain}
.game-stats{flex-wrap:wrap;row-gap:7px}
.game-bottom{flex-wrap:wrap}
.game-close{flex:0 0 36px}
@media(max-width:600px){
 .brand{top:max(14px,env(safe-area-inset-top));left:18px;font-size:14px;z-index:4}
 .brand b{width:30px;height:30px;margin-right:7px}
 .form{position:relative;top:auto;left:auto;transform:none;width:min(360px,calc(100% - 36px));margin:0 auto;padding-top:clamp(78px,12dvh,116px);text-align:center}
 .form h1{font-size:clamp(25px,7vw,31px);margin:7px 0}
 .form p{font-size:13px;margin:8px 0 20px}
 .form label{font-size:13px;margin:13px 0 7px}
 .form input{height:48px;border-radius:8px}
 .form button.submit{height:48px;margin-top:19px}
 .toggle{height:36px;top:6px;right:6px}
 #scene{position:fixed;inset:0;width:100%;height:100%;z-index:1;pointer-events:auto}
 .hint,.state,.toy-hint{display:none}
 .game-overlay{padding:8px;align-items:flex-start}
 .game-shell{margin:auto 0;max-height:calc(100dvh - 16px);border-radius:14px;padding:12px}
 .game-top h2{font-size:17px}
 .game-top p{line-height:1.35}
 .game-entry{gap:8px;margin:8px 0}
 .game-entry input{font-size:16px}
 .game-stats{font-size:11px;gap:7px 12px}
 .game-bottom span{font-size:11px}
 .game-btn{min-height:44px}
 #gameCanvas{min-height:155px}
}
@media(max-width:600px) and (max-height:700px){
 .form{padding-top:66px}
 .form p{margin-bottom:9px}
 .form label{margin:8px 0 4px}
 .form input,.form button.submit{height:44px}
 .form button.submit{margin-top:11px}
}
@media(max-width:600px) and (max-height:480px){
 body{overflow-y:auto}
 .form{padding-bottom:40px}
 #scene{opacity:.28;pointer-events:none}
}
@media(prefers-reduced-motion:reduce){#scene{opacity:.35;pointer-events:none}}
