*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;user-select:none}html,body,#app{width:100%;height:100%;overflow:hidden;touch-action:none;font-family:-apple-system,BlinkMacSystemFont,PingFang SC,Helvetica Neue,sans-serif;background:#38bdf8}#game-canvas{position:fixed;inset:0;width:100%;height:100%;display:block;touch-action:none}#ui-root{position:fixed;inset:0;pointer-events:none;z-index:10}.hidden{display:none!important}.screen{position:absolute;inset:0;display:flex;flex-direction:column;padding:env(safe-area-inset-top,12px) env(safe-area-inset-right,14px) env(safe-area-inset-bottom,14px) env(safe-area-inset-left,14px)}.lobby-screen{justify-content:space-between;pointer-events:none}.lobby-header{display:flex;justify-content:space-between;align-items:center;padding:8px 4px;pointer-events:auto}.brand-badge{background:linear-gradient(135deg,#ffd166,#ff922b);color:#3b1d0a;font-weight:900;font-size:18px;padding:9px 18px;border-radius:999px;border:3px solid #fff;box-shadow:0 6px 18px #0000002e}.lobby-spacer{flex:1;display:flex;align-items:flex-end;justify-content:center;padding-bottom:10px}.preview-hint{background:#0f172a73;color:#fff;font-size:12px;padding:5px 14px;border-radius:999px;backdrop-filter:blur(6px)}.lobby-sheet{pointer-events:auto;background:#ffffffeb;backdrop-filter:blur(12px);border-radius:24px;padding:14px;box-shadow:0 12px 32px #0f172a38;max-width:680px;width:100%;margin:0 auto;display:flex;flex-direction:column;gap:10px}.skin-bar{display:flex;gap:8px;overflow-x:auto;padding-bottom:4px;scrollbar-width:none}.skin-bar::-webkit-scrollbar{display:none}.skin-chip{flex:0 0 auto;display:flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;border:2px solid #e2e8f0;background:#fff;font-size:13px;font-weight:700;color:#334155;cursor:pointer}.skin-chip.active{border-color:#ff5e7e;background:#fff1f2;color:#e11d48}.skin-dot{width:14px;height:14px;border-radius:50%;border:1.5px solid rgba(0,0,0,.15)}.level-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}@media(min-width:720px){.level-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}.level-card{text-align:left;background:#fff;border:2.5px solid var(--accent, #60a5fa);border-radius:16px;padding:10px 12px;cursor:pointer;box-shadow:0 4px 10px #0000000f;transition:transform .12s ease}.level-card:active{transform:scale(.96)}.level-card-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:4px}.level-tag{background:var(--accent, #60a5fa);color:#fff;font-size:11px;font-weight:800;padding:2px 8px;border-radius:999px}.level-stars{font-size:11px;color:#f59e0b}.level-card-title{font-size:15px;font-weight:900;color:#0f172a}.level-card-sub{font-size:11px;color:#64748b;margin-top:2px}.primary-btn{width:100%;border:none;border-radius:16px;padding:12px 18px;font-size:15px;font-weight:900;color:#fff;background:linear-gradient(135deg,#ff5e7e,#ff922b);box-shadow:0 5px 14px #ff5e7e59;cursor:pointer}.primary-btn:active{transform:scale(.97)}.secondary-btn{width:100%;border:2px solid #cbd5e1;border-radius:16px;padding:11px 16px;font-size:15px;font-weight:800;color:#1e293b;background:#f8fafc;cursor:pointer}.ghost-btn{border:none;background:transparent;color:#64748b;font-size:14px;font-weight:700;padding:8px 12px;cursor:pointer}.ghost-btn.full{width:100%}.icon-btn{width:44px;height:44px;border-radius:50%;border:2.5px solid #fff;background:#0f172a8c;color:#fff;font-size:18px;display:flex;align-items:center;justify-content:center;cursor:pointer;backdrop-filter:blur(6px)}.icon-btn.small{width:38px;height:38px;font-size:16px}.hud-screen{justify-content:space-between;pointer-events:none}.hud-top{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-top:4px}.hud-pill{background:#0f172a9e;color:#fff;border:2px solid rgba(255,255,255,.35);border-radius:999px;padding:6px 14px;font-size:13px;font-weight:800;backdrop-filter:blur(6px);display:flex;align-items:center;gap:8px}.hud-timer{font-variant-numeric:tabular-nums;color:#fde047}.hud-timer.urgent{color:#fb7185;animation:pulse .5s infinite alternate}.hud-divider{opacity:.4}.hud-top-actions{display:flex;gap:8px;pointer-events:auto}.hud-countdown{position:absolute;top:40%;left:50%;transform:translate(-50%,-50%);font-size:86px;font-weight:900;color:#ffe066;text-shadow:0 6px 0 #d97706,0 12px 28px rgba(0,0,0,.35)}.hud-banner{position:absolute;top:72px;left:50%;transform:translate(-50%);background:linear-gradient(135deg,#ff5e7e,#f59e0b);color:#fff;font-weight:900;font-size:15px;padding:8px 20px;border-radius:999px;border:2px solid #fff;box-shadow:0 6px 18px #00000040;white-space:nowrap}.touch-controls{display:flex;justify-content:space-between;align-items:flex-end;padding:0 6px 8px;width:100%}.joystick-zone{pointer-events:auto;width:156px;height:156px;display:flex;align-items:center;justify-content:center;touch-action:none}.joystick-base{width:124px;height:124px;border-radius:50%;background:#ffffff38;border:3px solid rgba(255,255,255,.55);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;transition:background .12s}.joystick-base.active{background:#ffffff57;border-color:#ffe066}.joystick-knob{width:54px;height:54px;border-radius:50%;background:radial-gradient(circle at 30% 30%,#fff,#ffd166);border:3px solid #fff;box-shadow:0 4px 12px #00000047;pointer-events:none}.action-buttons{pointer-events:auto;position:relative;width:184px;height:164px;touch-action:none}.action-btn{position:absolute;border-radius:50%;border:3px solid rgba(255,255,255,.92);color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;font-weight:900;box-shadow:0 6px 16px #00000047;overflow:hidden;cursor:pointer;transition:transform .08s ease}.action-btn.pressed{transform:scale(.9)}.btn-jump{width:82px;height:82px;right:4px;bottom:6px;background:linear-gradient(145deg,#34d399,#059669)}.btn-roll{width:68px;height:68px;right:14px;bottom:98px;background:linear-gradient(145deg,#fbbf24,#f97316)}.btn-roll.active-skill{border-color:#fef08a;box-shadow:0 0 22px #facc15}.btn-dive{width:66px;height:66px;right:98px;bottom:24px;background:linear-gradient(145deg,#38bdf8,#2563eb)}.btn-icon{font-size:20px;line-height:1}.btn-label{font-size:12px;margin-top:2px}.cd-overlay{position:absolute;left:0;right:0;bottom:0;height:0%;background:#0f172a94;pointer-events:none}.modal-backdrop{position:absolute;inset:0;background:#0f172a8c;backdrop-filter:blur(6px);display:flex;align-items:center;justify-content:center;padding:20px;pointer-events:auto}.modal-card{width:100%;max-width:380px;background:#fff;border-radius:26px;padding:22px;text-align:center;box-shadow:0 20px 44px #0000004d}.modal-card h2{font-size:22px;font-weight:900;color:#0f172a}.modal-tip{font-size:13px;color:#64748b;margin:6px 0 14px}.modal-buttons{display:flex;flex-direction:column;gap:10px}.modal-buttons.row{flex-direction:row;margin-top:12px}.result-trophy{font-size:46px;line-height:1.1}.result-list{display:flex;flex-direction:column;gap:6px;max-height:220px;overflow-y:auto;margin:10px 0}.result-row{display:flex;align-items:center;gap:8px;padding:7px 10px;border-radius:12px;background:#f8fafc;font-size:13px;font-weight:700;color:#334155}.result-row.me{background:#fff1f2;border:2px solid #ff5e7e;color:#be123c}.r-rank{width:28px;text-align:left;font-weight:900}.r-dot{width:12px;height:12px;border-radius:50%}.r-name{flex:1;text-align:left}.r-metric{font-variant-numeric:tabular-nums;color:#64748b}@keyframes pulse{0%{transform:scale(1)}to{transform:scale(1.12)}}input,select{user-select:text;-webkit-user-select:text;touch-action:auto;font-family:inherit}.lobby-actions.two-col{display:grid;grid-template-columns:1fr 1fr;gap:10px}.mp-btn{width:100%;border:none;border-radius:16px;padding:12px 14px;font-size:15px;font-weight:900;color:#fff;background:linear-gradient(135deg,#3b82f6,#8b5cf6);box-shadow:0 5px 14px #3b82f659;cursor:pointer}.mp-btn:active{transform:scale(.97)}.mp-screen{align-items:center;justify-content:center;background:#0f172a52;backdrop-filter:blur(6px);pointer-events:auto}.mp-panel{width:100%;max-width:560px;max-height:92vh;background:#fffffff5;border-radius:26px;padding:16px;box-shadow:0 20px 44px #0f172a47;display:flex;flex-direction:column;gap:12px;overflow:hidden}.mp-header{display:flex;align-items:center;justify-content:space-between;gap:10px}.mp-title{font-size:18px;font-weight:900;color:#0f172a}.icon-btn.dark{background:#f1f5f9;color:#0f172a;border-color:#e2e8f0}.mp-toolbar{display:flex;flex-direction:column;gap:8px}.input-group{display:flex;align-items:center;gap:8px;background:#f8fafc;border:2px solid #e2e8f0;border-radius:14px;padding:6px 12px}.input-group label{font-size:13px;font-weight:800;color:#475569;white-space:nowrap}.input-group input{flex:1;border:none;background:transparent;font-size:14px;font-weight:700;color:#0f172a;outline:none}.join-code-row{display:flex;gap:8px}.join-code-row input{flex:1;min-width:0;border:2px solid #e2e8f0;border-radius:14px;padding:9px 12px;font-size:14px;font-weight:700;outline:none}.join-code-row input:focus{border-color:#3b82f6}.compact{width:auto!important;padding:9px 14px!important;font-size:13px!important;white-space:nowrap}.mp-list-header{display:flex;align-items:center;justify-content:space-between;font-size:13px;font-weight:800;color:#475569}.room-count-badge{background:#e0f2fe;color:#0369a1;padding:2px 10px;border-radius:999px;font-size:12px}.mp-room-list{flex:1;min-height:180px;max-height:46vh;overflow-y:auto;display:flex;flex-direction:column;gap:8px;padding-right:2px}.mp-empty{text-align:center;padding:36px 16px;color:#64748b;font-size:14px;font-weight:700;background:#f8fafc;border-radius:16px;border:2px dashed #cbd5e1}.room-item{width:100%;text-align:left;background:#fff;border:2px solid #e2e8f0;border-radius:16px;padding:12px 14px;cursor:pointer;display:flex;flex-direction:column;gap:6px;transition:transform .1s,border-color .12s}.room-item:not(.disabled):active{transform:scale(.98);border-color:#3b82f6}.room-item.disabled{opacity:.6;cursor:not-allowed}.room-item-top{display:flex;justify-content:space-between;align-items:center;gap:8px}.room-item-name{font-size:15px;font-weight:900;color:#0f172a}.room-status-tag{font-size:11px;font-weight:800;padding:3px 9px;border-radius:999px}.room-status-tag.waiting{background:#dcfce7;color:#15803d}.room-status-tag.playing{background:#fef3c7;color:#b45309}.room-item-meta{display:flex;justify-content:space-between;font-size:12px;font-weight:700;color:#64748b}.room-header-info{flex:1;min-width:0}.room-code-line{display:flex;align-items:center;gap:6px;margin-top:3px}.code-pill{background:#eff6ff;color:#1d4ed8;font-size:12px;font-weight:900;padding:2px 8px;border-radius:8px}.lock-pill{background:#fef3c7;color:#b45309;font-size:11px;font-weight:800;padding:2px 8px;border-radius:8px}.room-members-wrap{display:flex;flex-direction:column;gap:6px}.room-member-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-height:210px;overflow-y:auto}.member-card{display:flex;align-items:center;gap:8px;background:#f8fafc;border:2px solid #e2e8f0;border-radius:14px;padding:8px 10px;font-size:13px;font-weight:800;color:#1e293b}.member-card.me{border-color:#3b82f6;background:#eff6ff}.member-card.bot{border-style:dashed;color:#64748b}.skin-dot.large{width:18px;height:18px;flex-shrink:0}.member-name{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.host-badge{font-size:11px;color:#d97706}.ready-badge{font-size:11px;color:#10b981}.bot-badge{font-size:10px;background:#e2e8f0;color:#475569;padding:1px 6px;border-radius:6px}.host-controls{display:flex;flex-direction:column;gap:10px;background:#f8fafc;border-radius:16px;padding:12px;border:1.5px solid #e2e8f0}.host-row{display:flex;align-items:center;justify-content:space-between;gap:10px}.host-label{font-size:13px;font-weight:800;color:#334155}.room-select{flex:1;max-width:240px;border:2px solid #cbd5e1;border-radius:12px;padding:7px 10px;font-size:13px;font-weight:800;color:#0f172a;background:#fff}.stepper{display:flex;align-items:center;gap:8px}.step-btn{width:32px;height:32px;border-radius:10px;border:2px solid #cbd5e1;background:#fff;font-size:18px;font-weight:900;color:#0f172a;cursor:pointer}.step-val{min-width:22px;text-align:center;font-size:15px;font-weight:900}.mini-pill-btn{border:none;background:#e0f2fe;color:#0369a1;font-size:12px;font-weight:800;padding:6px 10px;border-radius:10px;cursor:pointer}.guest-hint{text-align:center;padding:14px;border-radius:14px;background:#f1f5f9;color:#475569;font-size:14px;font-weight:800}.form-card{text-align:left;display:flex;flex-direction:column;gap:12px}.form-card h2{text-align:center}.form-field{display:flex;flex-direction:column;gap:5px}.form-field label{font-size:13px;font-weight:800;color:#475569}.form-field input[type=text],.form-field input[type=password]{width:100%;border:2px solid #cbd5e1;border-radius:12px;padding:10px 12px;font-size:14px;font-weight:700;outline:none}.form-field input:focus{border-color:#3b82f6}.form-field input[type=range]{width:100%;accent-color:#ff5e7e}.toast{position:fixed;top:24px;left:50%;transform:translate(-50%);background:#0f172ae0;color:#fff;padding:10px 18px;border-radius:999px;font-size:13px;font-weight:800;z-index:100;box-shadow:0 8px 20px #00000040;pointer-events:none}
