:root { color-scheme: dark; --accent:#5eead4; }
body { background: radial-gradient(ellipse at 20% 10%,#153746 0,transparent 45%),#090f1d; }
button,a,input,select { -webkit-tap-highlight-color:transparent; }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
button:disabled { opacity:.5; cursor:wait; }
[hidden] { display:none !important; }
#startScreen { background:radial-gradient(ellipse at top,#163442 0,#0b1220 70%); overflow-y:auto; justify-content:flex-start; padding-top:max(28px,env(safe-area-inset-top)); }
#startScreen h1 { color:#99f6e4; letter-spacing:-1px; }
.eyebrow { color:#5eead4; font-size:11px; letter-spacing:2px; margin-bottom:12px; }
.auth-panel { width:min(100%,420px); background:#111d30; border:1px solid #2b3b51; border-radius:20px; padding:18px; margin:12px 0; text-align:right; box-shadow:0 20px 60px #0003; }
.auth-panel label { display:block; font-size:12px; color:#cbd5e1; margin:8px 0 4px; }
.auth-panel input,.auth-panel select,.auth-panel textarea { width:100%; min-height:42px; border:1px solid #36485f; border-radius:10px; background:#0a1323; padding:8px 12px; }
.auth-panel button,.portal-button { border-radius:10px; padding:10px 16px; background:#135b58; border:1px solid #2b8c83; color:#dcfff8; margin-top:12px; min-height:44px; }
.auth-panel button[type=submit] { width:100%; }
.auth-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.muted { color:#94a3b8; font-size:12px; line-height:1.9; }
#notice { position:fixed; bottom:max(12px,env(safe-area-inset-bottom)); left:16px; right:16px; z-index:100; margin:auto; max-width:540px; border-radius:12px; padding:10px 16px; background:#122638; color:#e2e8f0; text-align:center; font-size:13px; pointer-events:none; }
#notice:empty { display:none; }
dialog { border:1px solid #385365; border-radius:20px; background:#101c2d; color:#e2e8f0; padding:24px; width:min(92vw,500px); }
dialog::backdrop { background:#020617d9; }
dialog li { padding:12px 0; border-bottom:1px solid #263447; }
#accountPanel { margin-bottom:16px; }
#startScreen > .flex { flex-shrink:0; }
@media (max-height:760px) { #startScreen .mb-8 { margin-bottom:16px; } #startScreen h1 { font-size:26px; } }
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none!important; transition:none!important; } }

#toast {position:fixed;bottom:24px;left:24px;right:24px;max-width:540px;margin:auto;z-index:200;background:#104e42;color:#e5fff5;border:1px solid #46bf97;border-radius:14px;padding:18px;box-shadow:0 12px 40px #0008;}
#toast[data-error=true] {background:#641c30;border-color:#fb7185;}
.shop-image {width:76px;height:76px;object-fit:contain;flex-shrink:0;background:#0a1323;border-radius:12px;padding:6px;}
.filter-bar,.auth-actions {display:flex;gap:10px;flex-wrap:wrap;align-items:center;}
.filter-bar input,.filter-bar select {background:#111d30;border:1px solid #36485f;padding:12px;border-radius:10px;max-width:100%;}
#tabs {margin-top:24px;} #tabs [aria-current=page] {background:#258479;}
#editor {max-height:90vh;overflow:auto;} .auth-panel input[type=checkbox],.auth-panel input[type=radio] {width:22px;min-height:22px;vertical-align:middle;margin-left:8px;}
.auth-page {min-height:100vh;display:grid;place-items:center;padding:24px;}
.auth-shell {width:min(960px,100%);display:grid;grid-template-columns:1fr 1fr;gap:50px;align-items:center;}
.auth-intro h1 {font-size:clamp(30px,5vw,48px);line-height:1.5;font-weight:800;margin:24px 0;color:#99f6e4;}
.auth-intro p {color:#a9bccb;line-height:2;}.auth-intro img {width:140px;height:160px;object-fit:contain;display:block;margin:20px 0;}
.auth-shell h2 {font-size:24px;font-weight:700;margin-bottom:8px;} #authStatus {margin-top:18px;line-height:1.9;color:#99f6e4;}
.game-guide {max-height:65vh;overflow:auto;line-height:1.9;font-size:14px;color:#cbd5e1;padding:0 8px;}
.game-guide h3 {color:#99f6e4;font-weight:bold;margin:16px 0 6px;}.game-guide li {list-style:disc;margin-right:20px;}
#tutorialModal {overflow:auto;} #tutorialModal>div {margin:auto;max-width:600px;}
#dizzyWarning {position:absolute;inset:12px 12px auto;z-index:12;padding:8px;border-radius:8px;background:#7f1d1ddd;color:#fff;font-size:12px;text-align:center;pointer-events:none;}
@media(max-width:640px){.auth-shell{grid-template-columns:1fr;gap:16px}.auth-intro img{display:none}.auth-intro h1{font-size:28px;margin:12px 0}.auth-shell .auth-panel{width:100%}.auth-page{padding:18px}.shop-image{width:56px;height:56px}}
.portal-button {display:inline-flex;align-items:center;justify-content:center;gap:8px;} .auth-panel p {line-height:1.8;} #editorForm>.portal-button {margin-bottom:12px;}
.offline-page { background: #090f1d; color: #e2e8f0; font-family: Tahoma, sans-serif; text-align: center; padding: 15vh 24px; }
.offline-page a { color: #5eead4; }
