html,body{height:100%}body{margin:0;background:#0e0f12;font-family:system-ui,-apple-system,Segoe UI,Roboto,PingFang SC,Helvetica,Arial;display:flex;justify-content:center;align-items:center;min-height:100vh}#game-root{display:flex;flex-direction:row;gap:12px;padding:12px;box-sizing:border-box;align-items:center;justify-content:center;width:100%;max-width:1200px;min-height:0;height:100vh;max-height:100vh}#phaser{flex:1 1 auto;display:flex;justify-content:center;align-items:center;min-width:0;min-height:0;height:100%}#phaser canvas{display:block;max-width:100%;max-height:100%}#ui{flex:0 0 300px;background:#14161b;color:#e6e7ea;border-radius:12px;padding:12px;box-shadow:0 4px 20px #00000059;max-height:100%;overflow:auto}.stat{display:flex;justify-content:space-between;margin:4px 0;font-size:14px}.headline{font-size:18px;font-weight:700;margin-bottom:8px}.panel{background:#0f1116;border-radius:10px;padding:10px;margin-top:10px}.panel-controls{margin-top:10px;display:flex;justify-content:flex-start;gap:8px}.btns{display:flex;gap:8px;margin-top:10px}button{background:#2a2f3a;color:#e6e7ea;border:none;padding:8px 12px;border-radius:8px;cursor:pointer}button:hover{background:#344056}button:disabled{background:#1d222c;color:#6f7785;cursor:not-allowed;border:1px solid rgba(255,255,255,.05)}button:disabled:hover{background:#1d222c}.msg{min-height:56px;white-space:pre-line;font-size:13px;color:#cfd2d8}.tip{font-size:12px;color:#9aa3b2;margin-top:6px}.inventory-list{display:flex;flex-direction:column;gap:4px;min-height:24px}.inventory-empty{color:#9aa3b2;font-size:13px}.debug-panel{position:fixed;right:20px;bottom:76px;width:260px;background:#151821;color:#f0f2f6;border-radius:12px;padding:14px;box-shadow:0 12px 32px #0000008c;z-index:1000;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.debug-panel.hidden{display:none}.debug-header{display:flex;justify-content:space-between;align-items:center;font-weight:600;margin-bottom:12px}.debug-header button{padding:4px 8px;line-height:1}.debug-form{display:flex;flex-direction:column;gap:8px}.debug-field{display:flex;flex-direction:column;font-size:13px;gap:4px}.debug-field input{padding:6px 8px;border-radius:6px;border:1px solid rgba(255,255,255,.1);background:#0f1116;color:#f0f2f6}.debug-actions{display:flex;justify-content:flex-end;margin-top:8px}.debug-custom{margin-top:16px;padding-top:12px;border-top:1px solid rgba(255,255,255,.08);display:flex;flex-direction:column;gap:8px}.hidden{display:none}.dialogue{position:fixed;left:50%;bottom:24px;transform:translate(-50%);width:min(90%,720px);z-index:1100;font-family:inherit;color:#f0f2f6}.dialogue-content{background:#10121aeb;border:1px solid rgba(255,255,255,.08);border-radius:12px;padding:16px 20px;box-shadow:0 12px 32px #00000080;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}.dialogue-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;font-weight:600;font-size:16px}.dialogue-header button{padding:4px 8px;line-height:1}.dialogue-text{min-height:64px;font-size:15px;line-height:1.5;margin-bottom:12px;color:#dde1e7}.dialogue-options{display:flex;flex-direction:column;gap:8px;margin-bottom:10px}.dialogue-option{background:#2a2f3a;border:1px solid rgba(255,255,255,.08);border-radius:8px;padding:8px 12px;text-align:left;color:#f0f2f6;cursor:pointer}.dialogue-option:hover{background:#344056}.dialogue-controls{display:flex;justify-content:flex-end;gap:10px}.dialogue-controls button{padding:6px 12px}.mini-game-overlay{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;padding:24px;z-index:2000;background:#000000eb;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .22s ease}.mini-game-overlay.active{visibility:visible;opacity:1;pointer-events:auto}.mini-game-frame-wrapper{width:min(90vw,640px);height:min(90vh,640px);display:flex;flex-direction:column;align-items:center;gap:16px;transform:scale(.7);transition:transform .26s cubic-bezier(.24,.82,.28,1)}.mini-game-overlay.active .mini-game-frame-wrapper{transform:scale(1)}.mini-game-loading{color:#f0f4ff;font-size:1.125rem;letter-spacing:.04em}.mini-game-loading.hidden{display:none}.mini-game-frame-wrapper iframe{width:100%;height:100%;border:none;border-radius:18px;background:#0f1729;box-shadow:0 16px 40px #00000073}.journal-modal{position:fixed;inset:0;background:#07090ecc;display:flex;align-items:center;justify-content:center;z-index:1200;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.journal-modal.hidden,.dialogue.hidden{display:none}.arena-modal{position:fixed;inset:0;background:#080a10c7;display:flex;align-items:center;justify-content:center;z-index:1250;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);padding:24px}.arena-modal.hidden{display:none}.arena-dialog{width:min(600px,92vw);max-height:min(80vh,680px);background:#10141f;border-radius:18px;border:1px solid rgba(114,148,255,.2);box-shadow:0 24px 48px #0000008c;padding:20px;color:#f1f4ff;display:flex;flex-direction:column;gap:20px;overflow:hidden}.arena-header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.arena-title-group{display:flex;flex-direction:column;gap:6px}.arena-header #arena-title{font-size:1.5rem;font-weight:700;letter-spacing:.04em}.arena-season{font-size:.9rem;color:#9cacff;letter-spacing:.03em}.arena-header button{background:#ffffff14;border-radius:999px;padding:6px 12px;font-size:1rem;line-height:1}.arena-body{display:flex;flex-direction:column;gap:24px;overflow-y:auto;padding-right:4px}.workshop-modal{position:fixed;inset:0;background:#090b12c7;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:1250;padding:24px}.workshop-modal.hidden{display:none}.workshop-dialog{width:min(620px,92vw);max-height:min(82vh,700px);background:#10131d;border-radius:20px;border:1px solid rgba(120,164,255,.18);box-shadow:0 26px 52px #0000008c;padding:22px;color:#f5f7ff;display:flex;flex-direction:column;gap:18px;overflow:hidden}.workshop-header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.workshop-title-group{display:flex;flex-direction:column;gap:6px}#workshop-title{font-size:1.45rem;font-weight:700;letter-spacing:.035em}.workshop-subtitle{font-size:.92rem;color:#8ba5ff}.workshop-header button{background:#ffffff14;border-radius:999px;padding:6px 12px;font-size:1rem;line-height:1}.workshop-body{display:flex;flex-direction:column;gap:20px;overflow-y:auto;padding-right:4px}.workshop-section{background:#121620d9;border:1px solid rgba(255,255,255,.06);border-radius:16px;padding:18px;display:flex;flex-direction:column;gap:12px}.workshop-section-title{margin:0;font-size:1.05rem;font-weight:600;letter-spacing:.03em}.workshop-copy{margin:0;font-size:.95rem;color:#d2d7f7;line-height:1.6}.workshop-status{font-size:.85rem;color:#ffd27f;background:#ffd27f2e;border-radius:12px;padding:10px 12px;border:1px solid rgba(255,210,127,.35)}.workshop-form{display:flex;flex-direction:column;gap:16px}.workshop-field{display:flex;flex-direction:column;gap:6px;font-size:.92rem;color:#d7defc}.workshop-field span{font-weight:600;letter-spacing:.02em}.workshop-field select,.workshop-field textarea,.workshop-question textarea,.workshop-option input[type=text]{background:#141827;border:1px solid rgba(255,255,255,.08);border-radius:10px;color:#f1f4ff;padding:10px 12px;font-size:.95rem;font-family:inherit;transition:border .2s ease,box-shadow .2s ease}.workshop-field select:focus,.workshop-field textarea:focus,.workshop-question textarea:focus,.workshop-option input[type=text]:focus{outline:none;border-color:#7ba4ffa6;box-shadow:0 0 0 2px #7ba4ff33}.workshop-hint{font-size:.85rem;color:#9fb5ff}.workshop-question-builder{display:flex;flex-direction:column;gap:12px;background:#1216209e;border:1px dashed rgba(128,158,255,.35);border-radius:14px;padding:14px}.workshop-questions{display:flex;flex-direction:column;gap:12px}.workshop-question{background:linear-gradient(140deg,#2e3b66e6,#131828eb);border-radius:12px;border:1px solid rgba(136,170,255,.26);padding:14px;display:flex;flex-direction:column;gap:10px}.workshop-question-header{display:flex;justify-content:space-between;align-items:center;gap:12px}.workshop-question-header h5{margin:0;font-size:1rem;font-weight:600;color:#dfe6ff}.workshop-question textarea{resize:vertical;min-height:52px}.workshop-option-list{display:flex;flex-direction:column;gap:8px}.workshop-option{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center}.workshop-option input[type=radio]{accent-color:#8fb3ff;width:16px;height:16px}.workshop-option button{padding:6px 10px}.workshop-secondary,.workshop-tertiary,.workshop-danger,.workshop-cta{border:none;cursor:pointer;font-weight:600;border-radius:999px;transition:transform .2s ease,box-shadow .2s ease,filter .2s ease}.workshop-cta{align-self:flex-start;background:linear-gradient(135deg,#ffb96c,#ff6f91);color:#140408;padding:10px 18px;box-shadow:0 12px 28px #ff90aa59}.workshop-secondary{align-self:flex-start;background:#7ba4ff2e;color:#adc4ff;padding:9px 16px;border:1px solid rgba(123,164,255,.35)}.workshop-tertiary{align-self:flex-start;background:#ffffff14;color:#dce4ff;padding:8px 14px;border:1px solid rgba(255,255,255,.12)}.workshop-danger{background:#ff6e6e29;color:#ff9ca8;padding:6px 12px;border:1px solid rgba(255,110,110,.35)}.workshop-cta:hover,.workshop-secondary:hover,.workshop-tertiary:hover,.workshop-danger:hover{filter:brightness(1.05)}.workshop-notice{margin-top:4px;background:#ffffff0f;border-radius:12px;padding:10px 12px;font-size:.9rem;color:#dfe3ff;line-height:1.4;border:1px solid rgba(200,208,255,.28)}.workshop-notice.success{color:#8ff5c3;border-color:#8ff5c359;background:#19463673}.workshop-notice.error{color:#ff9cab;border-color:#ff9cab66;background:#5a172473}.workshop-empty{font-size:.9rem;color:#a6b5d9;text-align:center;padding:20px 12px;background:#121620b3;border-radius:10px;border:1px dashed rgba(150,172,255,.25)}.arena-section{background:#111621d1;border-radius:14px;padding:18px;border:1px solid rgba(255,255,255,.06);display:flex;flex-direction:column;gap:12px}.arena-section-title{margin:0;font-size:1.05rem;font-weight:600;letter-spacing:.03em}.arena-copy{margin:0;font-size:.95rem;color:#c4cbee;line-height:1.6}.arena-leaderboard{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:10px}.arena-leaderboard-item{display:grid;grid-template-columns:48px 1fr 96px 96px;align-items:center;gap:12px;background:linear-gradient(135deg,#243056d9,#1b223ce6);border-radius:12px;padding:12px 16px;border:1px solid rgba(122,156,255,.18)}.arena-leaderboard-rank{font-size:1.1rem;font-weight:700;color:#8fb3ff;text-align:center}.arena-leaderboard-name{font-weight:600;font-size:1rem}.arena-leaderboard-rating,.arena-leaderboard-record{font-size:.9rem;color:#d2d7f5;text-align:right}.arena-find-button{align-self:flex-start;background:linear-gradient(135deg,#66f5ff,#4775ff);color:#061024;font-weight:600;padding:10px 18px;border-radius:999px;border:none;box-shadow:0 12px 28px #3c78ff59}.arena-find-button:hover{filter:brightness(1.05)}.arena-notice{background:#ffffff0f;border-radius:12px;padding:12px 14px;font-size:.9rem;color:#f9d17a;line-height:1.4;border:1px solid rgba(249,209,122,.35)}.player-name-modal{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;padding:24px;background:#080a10d1;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);z-index:3000}.player-name-card{background:#11141b;border-radius:16px;width:min(420px,92vw);padding:28px;display:flex;flex-direction:column;gap:12px;border:1px solid rgba(255,255,255,.08);box-shadow:0 18px 48px #0000008c;color:#f5f7fc;text-align:left}.player-name-title{margin:0;font-size:22px;font-weight:700}.player-name-subtitle{margin:0;font-size:14px;color:#b9c1d3;line-height:1.5}.player-name-label{font-size:13px;font-weight:600;color:#d5daea;display:flex;flex-direction:column;gap:6px}.player-name-input{padding:10px 12px;border-radius:10px;border:1px solid rgba(255,255,255,.1);background:#0e1118;color:#f0f2f6;font-size:15px}.player-name-input:focus{outline:none;border-color:#4b92ff;box-shadow:0 0 0 2px #4b92ff40}.player-name-error{font-size:13px;color:#ff6b6b}.player-name-actions{display:flex;justify-content:flex-end;margin-top:8px}.player-name-actions button{min-width:120px}.player-name-modal.hidden{display:none}.journal-dialog{background:#11141b;border-radius:16px;width:min(960px,92vw);height:min(600px,85vh);display:flex;flex-direction:column;box-shadow:0 18px 48px #0000008c;border:1px solid rgba(255,255,255,.08);overflow:hidden}.journal-header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;font-size:18px;font-weight:600;border-bottom:1px solid rgba(255,255,255,.08);color:#f7f9ff}.journal-header button{padding:4px 8px;line-height:1}.journal-body{flex:1;display:grid;grid-template-columns:220px 1fr;gap:0;height:100%}.journal-nav{background:#0d1016;border-right:1px solid rgba(255,255,255,.06);overflow-y:auto;padding:12px;display:flex;flex-direction:column;gap:8px}.journal-nav-item{background:transparent;border:1px solid rgba(255,255,255,.08);border-radius:10px;color:#e6e7ea;padding:10px 12px;text-align:left;cursor:pointer;transition:background .2s ease,border-color .2s ease}.journal-nav-item:hover,.journal-nav-item.active{background:#353d5099;border-color:#ffffff26}.journal-content{padding:18px 22px;overflow-y:auto;color:#dde1e7;line-height:1.6}.journal-content h1,.journal-content h2,.journal-content h3{margin:0 0 12px;color:#f3f5f9}.journal-content h1{font-size:26px}.journal-content h2{font-size:22px}.journal-content h3{font-size:18px}.journal-content p{margin:0 0 12px}.journal-content ul{margin:0 0 12px 20px;padding:0}.journal-content li{margin-bottom:8px}.journal-content a{color:#7aa7ff}.journal-status{color:#cfd2d8;font-size:14px}.journal-status.error{color:#ff9393}.journal-empty{color:#9aa3b2;font-size:14px;text-align:center}.journal-break{height:12px}.mobile-controls{display:none;position:fixed;left:50%;bottom:20px;transform:translate(-50%);z-index:900;pointer-events:none}.mobile-dpad{display:grid;grid-template-columns:repeat(3,64px);grid-template-rows:repeat(3,64px);gap:10px;pointer-events:auto}.mobile-btn,.mobile-spacer{width:64px;height:64px}.mobile-btn{border-radius:50%;background:#2a2f3aeb;color:#f0f2f6;border:1px solid rgba(255,255,255,.1);font-size:24px;display:flex;justify-content:center;align-items:center;touch-action:manipulation}.mobile-btn:active{background:#40485aeb}@media(max-width:900px){#game-root{flex-direction:column;height:auto;max-width:calc(100vw - 24px)}#phaser{width:100%;height:min(70vh,100vw)}#ui{width:100%;max-width:360px}.debug-panel{right:12px;bottom:68px;width:calc(100% - 24px);max-width:360px}body{align-items:flex-start}.mobile-controls{display:block}.journal-dialog{width:min(96vw,600px);height:min(90vh,640px)}.journal-body{grid-template-columns:1fr}.journal-nav{flex-direction:row;flex-wrap:wrap;gap:8px;border-right:none;border-bottom:1px solid rgba(255,255,255,.06);max-height:160px;overflow-y:auto}.journal-nav-item{flex:1 1 45%}}
