:root{--bg: #0e0f13;--panel: #151821;--text: #ffffff;--muted: #ffffff;--accent: #5bfa8e;--border: #232734;--hud-text-color: #fff;--screen-flash-color: #ff4040;--screen-flash-opacity: .85;--engine-font-size: 8px;--ui-font-family: monospace;--ls-xs: 0;--ls-tight: 0;--ls-normal: 0;--ls-wide: 0;--ls-px-sm: 0;--ls-px-md: 0;--ls-px-md2: 0;--ls-px-lg: 0;--ls-mono: 0;--fw-normal: 400;--fw-medium: 400;--fw-bold: 400;--lh-tight: 1;--lh-normal: 1.3;--lh-text: 1.4;--lh-relaxed: 1.45;--lh-loose: 1.5}*{box-sizing:border-box}*{scrollbar-width:thin;scrollbar-color:var(--border) transparent}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--border);border:2px solid transparent;background-clip:padding-box;border-radius:8px}::-webkit-scrollbar-thumb:hover{background:var(--accent);background-clip:padding-box}::-webkit-scrollbar-corner{background:transparent}html,body{height:100%}hr{border-top:4px solid var(--border)}html,body *{font-size:var(--engine-font-size)}body{margin:0;font-family:var(--ui-font-family);color:var(--text);background:var(--bg);font-kerning:none;font-synthesis:none;text-shadow:none;text-rendering:optimizeSpeed;-webkit-font-smoothing:none;-moz-osx-font-smoothing:auto}body *{border-radius:0!important}.app{min-height:100vh;display:flex;flex-direction:column}header{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;padding:10px clamp(10px,2.5vw,20px);border-bottom:4px solid var(--border);background:var(--panel);position:sticky;top:0;z-index:10}header h1{margin:0;letter-spacing:var(--ls-px-md2)}header input{flex:1 1 220px;max-width:360px;padding:5px 8px;background:var(--panel);border:1px solid var(--border);border-radius:10px;color:var(--text)}main{flex:1;width:min(1100px,100%);margin:0 auto;padding:clamp(10px,2.5vw,20px);display:grid;gap:16px}.tabs{display:flex;flex-wrap:wrap;gap:5px;padding:clamp(3px,1.2vw,6px);border:4px solid var(--border);border-radius:14px;background:var(--panel);width:100%;max-width:720px;margin:clamp(3px,1.2vw,8px) auto;position:relative;z-index:20;pointer-events:auto}body.game-mode .tabs{margin-bottom:0}.tabs-title{flex:1 1 100%;margin:0;text-align:center;letter-spacing:var(--ls-wide);color:var(--muted)}.tabs-links{flex:1 1 auto;display:flex;gap:8px;flex-wrap:wrap;justify-content:center;align-items:center;width:100%}.tab-button{display:flex;align-items:center;justify-content:center;min-height:28px;padding:8px 12px;border:4px solid var(--border);background:#1a2030e6;color:#f2f5ff;cursor:pointer;font-weight:var(--fw-medium);white-space:nowrap}.tab-action-button{flex:0 0 auto;display:flex;align-items:center;justify-content:center;min-height:28px;padding:8px 12px;border:4px solid var(--border);background:#1e2337e0;color:#fff;font-weight:var(--fw-medium);cursor:pointer;white-space:nowrap}.tab-button.active{background:#64b5f633;border-color:#64b5f673;color:#fff}@media(hover:hover){.tab-button:hover,.tab-action-button:hover{background:#64b5f633;border-color:#64b5f673;color:#fff}}@media(max-width:640px){.tabs{gap:3px;padding:3px;border-radius:9px;margin:3px auto 6px}.tabs-links{gap:3px;justify-content:center}.tab-button{min-height:26px;padding:4px 7px}.tab-action-button{padding:4px 7px}.project-save-controls{gap:3px}.btn-manual-save,.btn-history-dropdown,.btn-devlog{padding:4px 7px;min-height:26px}body.game-mode #game-container{justify-content:center;padding-top:4px;padding-bottom:10px;gap:8px;margin-top:0}body.game-mode .game-screen{margin-top:0}}.tab-button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.project-save-controls{display:flex;gap:8px;justify-content:center;width:100%;max-width:720px;margin:0 auto clamp(3px,1.2vw,8px)}body.online-mode .project-save-controls,.btn-manual-save,.history-dropdown-wrapper{display:none}body.editor-mode .btn-manual-save,body.editor-mode .history-dropdown-wrapper{display:block}.history-dropdown-wrapper{position:relative}.btn-manual-save,.btn-history-dropdown,.btn-devlog{padding:8px 12px;background:#1a2030e6;border:4px solid var(--border);color:#fff;cursor:pointer;font-weight:var(--fw-medium);min-height:28px;font-family:var(--ui-font-family);transition:all .2s}@media(hover:hover){.btn-manual-save:hover,.btn-history-dropdown:hover,.btn-devlog:hover{background:#64b5f633;border-color:#64b5f673}}.btn-manual-save:focus-visible,.btn-history-dropdown:focus-visible,.btn-devlog:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.btn-devlog{position:relative}.btn-devlog.has-updates{border-color:var(--accent)}.devlog-badge{position:absolute;top:-6px;right:-6px;width:12px;height:12px;background:var(--accent);border:2px solid var(--bg);border-radius:50%;box-shadow:0 0 0 1px var(--accent);pointer-events:none;animation:devlog-badge-pulse 1.6s ease-in-out infinite}.devlog-badge[hidden]{display:none}@keyframes devlog-badge-pulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(1.25);opacity:.7}}@media(prefers-reduced-motion:reduce){.devlog-badge{animation:none}}.btn-manual-save:disabled{opacity:.6;cursor:not-allowed}.history-dropdown-menu{position:absolute;top:100%;left:0;margin-top:5px;background:var(--panel);border:4px solid var(--border);border-radius:8px;box-shadow:0 4px 12px #0000004d;min-width:200px;max-width:300px;z-index:1000}.history-dropdown-menu[hidden]{display:none}.history-items-container{max-height:300px;overflow-y:auto}.history-item{display:flex;flex-direction:column;gap:3px;width:100%;padding:10px 12px;cursor:pointer;border:none;border-bottom:1px solid var(--border);transition:background .15s;background:transparent;color:var(--text);text-align:left;font-family:var(--ui-font-family)}.history-item-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.history-item-timestamp{opacity:.6}@media(hover:hover){.history-item:hover{background:#64b5f61a}}.history-item:last-child{border-bottom:none}.history-item:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.tab-content{display:none;padding:clamp(10px,2vw,18px);border:4px solid var(--border);border-radius:14px;background:var(--panel)}.tab-content.active{display:block}body.editor-mode main{width:100%;max-width:none;margin:0;padding:0;gap:0;display:flex;flex-direction:column}body.editor-mode #tab-editor.tab-content{border:none;border-radius:0;box-shadow:none;background:var(--panel);padding:0}body.editor-mode #tab-editor.tab-content.active{display:flex;flex:1;flex-direction:column;min-height:0}body.editor-mode #tab-editor .editor-layout{flex:1;min-height:0;padding:clamp(10px,2.5vw,20px);overflow:auto}body.game-mode{overflow:hidden}body.game-mode .app{height:100vh}body.game-mode header{display:flex;background:#0b0d12;border-bottom:2px solid #2a2f3a;-webkit-backdrop-filter:none;backdrop-filter:none;color:#fff;font-family:var(--ui-font-family)}body.game-mode header h1{letter-spacing:var(--ls-mono)}body.game-mode header input{border-radius:0;box-shadow:none;background-image:none;border:2px solid #2a2f3a;background:#0f131b;color:#fff}body.game-mode main{flex:1;width:100%;max-width:none;margin:0;padding:0;gap:0;display:flex;flex-direction:column;min-height:0}body.game-mode .tab-action-button{display:inline-flex;justify-content:center;align-items:center}body.game-mode #tab-game.tab-content{flex:1;padding:0;border:none;border-radius:0;box-shadow:none;background:#000;min-height:0;position:relative;z-index:1}body.game-mode #tab-game.tab-content.active{display:flex}body.game-mode #game-container{flex:1;width:100%;height:100%;min-height:0;padding:0 clamp(12px,3vw,32px) clamp(12px,3vw,32px);display:flex;flex-direction:column;justify-content:center;align-items:center;gap:8px}body.game-mode #tab-game .game-controls{position:absolute;bottom:clamp(12px,4vw,28px);right:clamp(12px,4vw,32px);padding:6px 8px;background:var(--panel);border:4px solid var(--border);border-radius:8px;z-index:3}body.game-mode #tab-game .game-controls button{padding:6px 10px}body.editor-mode{--bg: #0b0d12;--panel: #11151d;--text: #ffffff;--muted: #ffffff;--accent: #5bfa8e;--border: #2a2f3a;background:var(--bg);font-family:var(--ui-font-family)}body.editor-mode header{background:#0b0d12;border-bottom:2px solid var(--border);-webkit-backdrop-filter:none;backdrop-filter:none}body.editor-mode header h1{letter-spacing:var(--ls-mono)}body.editor-mode .tabs,body.editor-mode .tab-content,body.editor-mode .tab-button,body.editor-mode .tab-action-button,body.editor-mode header input,body.editor-mode button,body.editor-mode input,body.editor-mode select,body.editor-mode textarea,body.editor-mode .map-nav-button,body.editor-mode .editor-mobile-nav-button,body.editor-mode [class*=card],body.editor-mode [class*=badge],body.editor-mode [class*=toggle],body.editor-mode [class*=button]{border-radius:0;box-shadow:none;background-image:none}body.editor-mode .tabs,body.editor-mode .tab-content,body.editor-mode [class*=card],body.editor-mode [class*=badge]{border:2px solid var(--border);background:var(--panel)}body.editor-mode .tile-card.selected,body.editor-mode .npc-card.selected,body.editor-mode .enemy-card.selected,body.editor-mode .object-type-card.selected{border-color:var(--accent);background:#64b5f61a;box-shadow:0 0 0 2px #64b5f626}body.editor-mode .tab-button,body.editor-mode .tab-action-button,body.editor-mode button,body.editor-mode .map-nav-button,body.editor-mode .editor-mobile-nav-button{border:2px solid var(--border);background:#141a24;color:var(--text);letter-spacing:var(--ls-normal)}body.editor-mode .tab-button.active{background:#1f2735;border-color:var(--accent);color:#fff}@media(hover:hover){body.editor-mode .tab-button:hover,body.editor-mode .tab-action-button:hover,body.editor-mode button:hover,body.editor-mode .map-nav-button:hover:not(:disabled),body.editor-mode .editor-mobile-nav-button:hover{background:#1f2735;border-color:var(--accent);color:#fff}}body.editor-mode input,body.editor-mode select,body.editor-mode textarea,body.editor-mode header input{border:2px solid var(--border);background:#141a24;color:var(--text)}body.editor-mode input[type=checkbox]{appearance:none;-webkit-appearance:none;width:18px;height:18px;margin:0;border:2px solid var(--border);background:#141a24;display:inline-grid;place-content:center;vertical-align:middle;cursor:pointer;box-shadow:none}body.editor-mode input[type=checkbox]:before{content:"";width:8px;height:8px;transform:scale(0);transition:transform .08s ease-out;box-shadow:inset 1em 1em var(--accent)}body.editor-mode input[type=checkbox]:hover{border-color:#64b5f6a6;background:#1f2735}body.editor-mode input[type=checkbox]:checked{border-color:var(--accent);background:#1f2735}body.editor-mode input[type=checkbox]:checked:before{transform:scale(1)}body.editor-mode input[type=checkbox]:focus-visible{outline:2px solid var(--accent);outline-offset:2px}body.editor-mode .editor-section details,body.editor-mode .world-cell,body.editor-mode .npc-card .npc-preview,body.editor-mode .object-preview,body.editor-mode .game-minimap,body.editor-mode .history-dropdown-menu,body.editor-mode .history-item,body.editor-mode .project-panel__section,body.editor-mode .project-panel__group,body.editor-mode .editor-section summary+*,body.editor-mode [class*=list],body.editor-mode [class*=grid]>[class*=card]{background:var(--panel)}body.editor-mode .enemy-card.boss,body.editor-mode .object-preview{border-color:var(--border)}body.editor-mode .tab-button:focus-visible,body.editor-mode button:focus-visible,body.editor-mode .map-nav-button:focus-visible,body.editor-mode .editor-mobile-nav-button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.game-container{position:relative;display:flex;flex-direction:column;gap:16px;align-items:center;text-align:center}.game-screen{position:relative;display:inline-block;line-height:0}.game-screen canvas{display:block}.combat-indicator{position:absolute;top:45%;left:50%;transform:translate(-50%,-50%);padding:4px 10px;border-radius:6px;font-family:var(--ui-font-family);color:#fff;background:var(--panel);opacity:0;pointer-events:none;z-index:4}.combat-indicator.visible{opacity:1}.screen-flash{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;background:var(--screen-flash-color);mix-blend-mode:screen;opacity:0;transition:opacity .15s ease-out;z-index:3}.screen-flash.visible{opacity:var(--screen-flash-opacity)}#game-canvas{width:clamp(128px,45vw,384px);max-width:100%;height:auto;margin-top:0}.game-dialog-overlay{z-index:6}.game-dialog{display:flex;flex-direction:column;gap:.5em;image-rendering:auto}.game-dialog-box{box-sizing:border-box;padding:.75em .85em;text-align:left;line-height:1.3}.game-dialog-text{white-space:pre-wrap;overflow-wrap:anywhere}.game-dialog-buttons{display:flex;gap:.5em}.game-dialog-button{flex:1 1 0;box-sizing:border-box;padding:.55em .5em;font:inherit;line-height:1.2;text-align:center;cursor:pointer;touch-action:manipulation}.game-levelup-overlay{position:absolute;box-sizing:border-box;pointer-events:auto;z-index:30}.game-levelup{position:absolute;left:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;gap:1em;padding:1em .8em;background:#0a0c14;overflow-y:auto}.game-levelup-title{color:var(--levelup-accent, #FFF1E8);font-size:1.2em;line-height:1;text-transform:uppercase;letter-spacing:.04em;text-align:center}.game-levelup-pending{color:var(--levelup-accent-strong, #FFD700);font-size:.8em;text-align:center}.game-levelup-cards{display:flex;flex-direction:column;gap:.7em;width:100%;max-width:92%}.game-levelup-card{display:flex;flex-direction:column;gap:.45em;box-sizing:border-box;width:100%;padding:.7em .8em;font:inherit;text-align:left;color:#fff;background:#0000008c;border:.16em solid var(--levelup-accent, #C2C3C7);border-radius:.25em;cursor:pointer;pointer-events:auto;touch-action:manipulation}.game-levelup-card--selected{background:#64b5f62e;border-color:var(--levelup-accent-strong, #64b5f6)}.game-levelup-card-name{font-size:1em;line-height:1.1;color:#fff}.game-levelup-card-desc{font-size:.78em;line-height:1.45;color:#ffffffd1}#editor-canvas{width:clamp(220px,90vw,820px);max-width:100%;height:auto;flex:0 1 auto}.editor-map-wrapper{position:relative;display:flex;justify-content:center;padding:36px;margin:0 auto;width:100%;max-width:900px}.editor-hover-highlight{position:absolute;pointer-events:none;box-sizing:border-box;border:2px solid var(--accent);border-radius:4px;box-shadow:0 0 0 2px #5bfa8e40,inset 0 0 0 1px #00000059;z-index:5;transition:left .06s ease-out,top .06s ease-out}.editor-hover-highlight[hidden]{display:none}.editor-map-title{display:flex;align-items:baseline;gap:8px;color:var(--text)}.editor-map-position{color:var(--muted)}.editor-map-wrapper canvas{display:block;width:100%}.reposition-indicator{position:absolute;top:36px;left:36px;right:36px;z-index:10;text-align:center;color:var(--accent);pointer-events:none;padding:4px 8px;background:#000000b8;border-bottom:1px solid rgba(91,250,142,.4)}.editor-map-wrapper canvas.is-repositioning{outline:2px solid var(--accent);box-shadow:0 0 0 2px var(--accent),0 0 18px #5bfa8e40}.map-nav-button{--map-nav-arrow-color: rgba(255, 255, 255, .85);position:absolute;width:28px;height:28px;border-radius:999px;border:1px solid rgba(255,255,255,.25);background:#0a0f19d9;padding:0;display:flex;align-items:center;justify-content:center;cursor:pointer;z-index:3}.map-nav-button:hover:not(:disabled),.map-nav-button:focus-visible:not(:disabled){border-color:#60a5fae6;background:#60a5fa59;outline:none}.map-nav-button:disabled{opacity:.35;cursor:default;--map-nav-arrow-color: rgba(255, 255, 255, .35)}.map-nav-button:after{content:"";display:block;width:0;height:0;border-style:solid}.map-nav-button--up{top:4px;left:50%;transform:translate(-50%)}.map-nav-button--up:after{border-width:0 6px 8px 6px;border-color:transparent transparent var(--map-nav-arrow-color) transparent}.map-nav-button--down{bottom:4px;left:50%;transform:translate(-50%)}.map-nav-button--down:after{border-width:8px 6px 0 6px;border-color:var(--map-nav-arrow-color) transparent transparent transparent}.map-nav-button--left{left:4px;top:50%;transform:translateY(-50%)}.map-nav-button--left:after{border-width:6px 8px 6px 0;border-color:transparent var(--map-nav-arrow-color) transparent transparent}.map-nav-button--right{right:4px;top:50%;transform:translateY(-50%)}.map-nav-button--right:after{border-width:6px 0 6px 8px;border-color:transparent transparent transparent var(--map-nav-arrow-color)}.editor-mobile-nav{display:none;gap:8px;justify-content:center;margin-top:16px;flex-wrap:wrap}.editor-mobile-nav-button{width:40px;height:40px;border-radius:50%;border:1px solid rgba(255,255,255,.2);background:#0f172acc;color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer}.editor-mobile-nav-button .nav-icon{image-rendering:pixelated;image-rendering:crisp-edges}.editor-mobile-nav-button.active{border-color:#60a5fae6;background:#60a5fa40}.editor-mobile-nav-button:focus-visible{outline:2px solid rgba(147,197,253,.8);outline-offset:2px}#tile-canvas{width:clamp(128px,45vw,384px);max-width:100%;height:auto}#selected-tile-preview{width:clamp(64px,24vw,128px);max-width:100%;height:auto}.game-controls{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;align-items:center;color:var(--muted)}.game-controls button{flex:0 0 auto}.project-volume-control{display:grid;grid-template-columns:minmax(120px,1fr) 42px;align-items:center;gap:8px}.project-volume-control input[type=range]{width:100%}.project-volume-control span{text-align:right;color:var(--muted)}.game-audio-controls{position:absolute;right:clamp(12px,4vw,32px);bottom:clamp(54px,8vw,72px);z-index:5;padding:6px 8px;border:2px solid var(--border);background:#0c0f16e6;color:#fff}.game-audio-controls[hidden]{display:none}.game-audio-controls__label{display:grid;grid-template-columns:92px 36px;align-items:center;gap:6px}.game-audio-controls input[type=range]{width:92px}.game-audio-controls span{text-align:right}@media(hover:none),(pointer:coarse){.game-audio-controls{display:none}}.game-fullscreen-button{position:absolute;right:clamp(12px,4vw,24px);bottom:clamp(12px,4vw,24px);width:36px;height:36px;min-height:36px;padding:0;display:inline-flex;align-items:center;justify-content:center;z-index:3;border:4px solid var(--border);background:#0c101873;color:#fff;opacity:.55;transition:opacity .15s ease,background-color .15s ease,border-color .15s ease}.game-fullscreen-button.is-active{background:#12182299;border-color:#64b5f673}.game-fullscreen-button:before,.game-fullscreen-button:after{content:"";position:absolute;width:10px;height:10px;border-color:currentColor;border-style:solid}.game-fullscreen-button:before{top:7px;left:7px;border-width:2px 0 0 2px}.game-fullscreen-button:after{right:7px;bottom:7px;border-width:0 2px 2px 0}.game-fullscreen-button[data-state=exit]:before{top:10px;left:10px;border-width:0 2px 2px 0}.game-fullscreen-button[data-state=exit]:after{right:10px;bottom:10px;border-width:2px 0 0 2px}@media(hover:hover){.game-fullscreen-button:hover{opacity:.85;background:#121822b3;border-color:#64b5f673}}body.online-mode .online-chat-actions{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:8px}body.online-mode .online-chat{position:relative;display:inline-flex}body.online-mode .online-chat__toggle{display:inline-flex;align-items:center;justify-content:center;min-height:28px;padding:6px 14px;border:1px solid rgba(255,255,255,.3);background:#ffffff05;color:#fff;font-weight:var(--fw-medium);cursor:pointer}body.online-mode .online-chat__toggle[aria-expanded=true]{border-color:var(--accent)}body.online-mode .online-chat__panel{position:absolute;left:50%;bottom:calc(100% + 8px);top:auto;transform:translate(-50%);z-index:40;width:clamp(220px,68vw,360px);max-width:calc(100vw - 24px);max-height:min(420px,calc(100vh - 120px));display:flex;flex-direction:column;background:var(--panel);border:4px solid var(--border);color:var(--text);font-family:var(--ui-font-family);text-align:left}body.online-mode .online-chat__header,body.online-mode .online-chat__form{flex:0 0 auto}body.online-mode .online-chat__panel[hidden]{display:none}body.online-mode .online-chat__header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px;border-bottom:4px solid var(--border);color:var(--accent);font-weight:700}body.online-mode .online-chat__close{flex:0 0 auto;width:26px;height:26px;min-height:26px;padding:0;border:1px solid var(--border);background:#0e1118;color:var(--text);font-family:var(--ui-font-family);font-weight:700;cursor:pointer}body.online-mode .online-chat__messages{flex:1 1 auto;display:flex;flex-direction:column;gap:6px;min-height:0;overflow-y:auto;padding:10px}body.online-mode .online-chat__empty{color:#ffffff73}body.online-mode .online-chat__message{display:grid;gap:3px;min-width:0;padding-bottom:6px;border-bottom:1px solid rgba(255,255,255,.12)}body.online-mode .online-chat__message--self .online-chat__name{color:var(--accent)}body.online-mode .online-chat__name{color:#64b5f6;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}body.online-mode .online-chat__text{color:var(--text);overflow-wrap:anywhere;line-height:var(--lh-text)}body.online-mode .online-chat__form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px;padding:8px;border-top:4px solid var(--border)}body.online-mode .online-chat__input{min-width:0;padding:7px 8px;border:1px solid var(--border);background:#0e1118;color:var(--text);font-family:var(--ui-font-family)}body.online-mode .online-chat__send{padding:7px 10px;border:1px solid var(--border);background:var(--accent);color:var(--bg);font-family:var(--ui-font-family);font-weight:700;cursor:pointer}@media(max-height:520px){body.online-mode .online-chat__panel{max-height:calc(100vh - 96px)}body.online-mode .online-chat__header,body.online-mode .online-chat__messages,body.online-mode .online-chat__form{padding:6px}}.game-touch-pad{display:none;z-index:4;flex-direction:column;align-items:center;filter:drop-shadow(0 4px 5px rgba(0,0,0,.6))}.gb-dpad{display:flex;flex-direction:column;align-items:center}.game-touch-pad .pad-middle-row{display:flex}.game-touch-pad .pad-button{width:clamp(30px,8.5vw,38px);height:clamp(30px,8.5vw,38px);padding:0;border:none;display:flex;align-items:center;justify-content:center;font-size:12px;color:#ffffff9e;text-shadow:0 1px 1px rgba(0,0,0,.85);background:linear-gradient(155deg,#2b3340,#12161f 52%,#070910);box-shadow:inset 0 2px #ffffff29,inset 1px 0 #ffffff0d,inset -1px 0 #0009,inset 0 -3px 3px #000000bf,0 0 0 1px #05070b;touch-action:manipulation;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;transition:background .06s,color .06s,box-shadow .06s,transform .04s}.game-touch-pad .pad-center{background:linear-gradient(155deg,#1d2330,#0a0d13);color:transparent;position:relative}.game-touch-pad .pad-center:after{content:"";width:11px;height:11px;background:#05070b;box-shadow:inset 0 1px 1px #000000e6,0 1px #ffffff12}.game-touch-pad .pad-button[data-direction]:active,.game-touch-pad .pad-button[data-direction].is-pressed{color:#ffffff61;text-shadow:0 -1px 1px rgba(0,0,0,.9);background:linear-gradient(155deg,#07090d,#131822);box-shadow:inset 0 6px 7px #000000e6,inset 0 2px 3px #000000f2,inset 0 -2px 1px #ffffff12,0 0 0 1px #05070b;transform:translateY(2px) scale(.95)}.game-touch-pad .pad-up:before{content:"▲"}.game-touch-pad .pad-down:before{content:"▼"}.game-touch-pad .pad-left:before{content:"◀"}.game-touch-pad .pad-right:before{content:"▶"}@media(max-width:720px){.game-touch-pad{display:flex;margin-top:clamp(8px,2.5vw,18px)}body.game-mode #game-container{justify-content:flex-start}body.online-mode .game-touch-pad{position:absolute;left:50%;bottom:clamp(8px,2.5vw,18px);transform:translate(-50%);margin-top:0}body.online-mode.touch-controls-visible .online-chat{position:absolute;bottom:clamp(72px,18vw,128px);left:calc(50% + 84px);z-index:3;margin:0}body.online-mode.touch-controls-visible .online-chat__panel{position:fixed;inset:auto 12px 12px;width:auto;max-width:none;max-height:min(360px,calc(100vh - 136px));transform:none}}@media(max-width:420px){body.online-mode .online-chat-actions{width:100%;padding:0 8px}body.online-mode .online-chat__panel{position:fixed;inset:auto 8px 8px;width:auto;max-width:none;max-height:min(390px,calc(100vh - 24px));transform:none}body.online-mode .online-chat__form{grid-template-columns:minmax(0,1fr)}body.online-mode .online-chat__send{width:100%}}.editor-layout{display:grid;gap:24px;grid-template-columns:minmax(0,360px) minmax(0,1fr) minmax(0,360px);grid-template-areas:"left center right";align-items:start}.editor-left,.editor-right,.editor-center{display:grid;gap:24px;align-content:start;width:100%;min-width:0}.editor-left{grid-area:left;max-width:360px;justify-self:start}.editor-center{grid-area:center;align-content:start;justify-items:center;justify-self:center}.editor-right{grid-area:right;max-width:360px;justify-self:end}.editor-section--map{width:100%;max-width:768px;justify-items:center}.editor-section--map canvas{margin:0 auto}.editor-section{display:grid;gap:16px;padding:16px;border:4px solid var(--border);border-radius:12px;background:var(--panel);min-width:0}.editor-section h3{margin:0;letter-spacing:var(--ls-px-md)}.editor-section canvas{justify-self:center}.editor-section details{display:grid;gap:16px;background:var(--bg);min-width:0}.editor-section details+details{margin-top:12px}.editor-section summary{position:relative;display:flex;align-items:center;gap:10px;cursor:pointer;font-weight:var(--fw-medium);padding:6px 0;list-style:none;-webkit-user-select:none;user-select:none}.editor-section summary::-webkit-details-marker{display:none}.editor-section summary:before{content:"";width:0;height:0;border-style:solid;border-width:4px 0 4px 6px;border-color:transparent transparent transparent #f4f7fb;opacity:.9;transition:transform .12s ease-out,opacity .12s ease-out;transform-origin:35% 50%;flex:0 0 auto}.editor-section summary:hover:before,.editor-section summary:focus-visible:before{opacity:1;border-left-color:var(--accent)}.editor-section details[open] summary{margin-bottom:8px}.editor-section details[open] summary:before{transform:rotate(90deg)}.tile-editor{display:grid;gap:16px}.tile-editor-top{display:grid;justify-items:center}.tile-editor-info{display:grid;gap:12px}.tile-name-line{display:flex;justify-content:space-between;align-items:center}.tile-name-line .label{color:var(--muted)}.tile-editor-info .checkbox{display:flex;align-items:center;gap:6px}.control-group{display:grid;gap:6px}.control-group label{color:var(--muted)}.control-group input[type=text],.control-group input[type=color],.control-group select,.control-group textarea{width:100%}canvas{image-rendering:pixelated;image-rendering:crisp-edges;max-width:100%;height:auto}input,select,textarea,button{font:inherit;padding:10px 12px;border:4px solid var(--border);background:#0f1422;color:var(--text);outline:none}input:focus,select:focus,textarea:focus,button:focus-visible{border-color:var(--accent)}button{cursor:pointer}button:hover{border-color:#2d3242}textarea{width:100%;min-height:160px;resize:vertical}.tile-preset-summary{margin:0;color:var(--muted)}.objects-panel{display:grid;gap:12px}.object-types{display:grid;gap:8px;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));max-height:min(40vh,260px);overflow-y:auto;padding-right:4px}.object-type-card{display:grid;grid-template-columns:48px 1fr;align-items:center;gap:10px;padding:8px 10px;background:var(--panel);border:4px solid var(--border);border-radius:8px;cursor:pointer;position:relative}.object-type-card:hover{border-color:#64b5f699}.object-types::-webkit-scrollbar{width:6px}.object-types::-webkit-scrollbar-thumb{background:#232734;border-radius:999px}.object-type-card.selected{border-color:var(--accent);box-shadow:0 0 0 2px #64b5f626}.object-type-card.placed .object-type-info{color:#8be9a5}.object-type-meta{display:flex;flex-direction:column;gap:4px;align-items:flex-start}.object-type-name{font-weight:var(--fw-medium);color:var(--text)}.object-type-info{color:var(--muted)}.object-type-stats{margin-top:4px;color:var(--muted);line-height:var(--lh-normal)}.objects-list{display:grid;gap:8px}.object-card{display:grid;grid-template-columns:auto 1fr;align-items:flex-start;gap:12px;padding:8px 12px;border:1px dashed var(--border);border-radius:8px;background:var(--panel)}.object-preview,.object-type-preview{width:48px;height:48px;min-width:48px;min-height:48px;max-width:48px;max-height:48px;border:none;border-radius:4px;background:#0f1320a6;image-rendering:pixelated;flex-shrink:0;justify-self:center}.object-body{min-width:0;display:flex;flex-direction:column;gap:6px}.object-card .object-header{display:flex;align-items:center;justify-content:space-between;gap:8px}.object-name{margin:0;font-weight:var(--fw-medium)}.object-card .object-remove{align-self:flex-end;margin-top:4px}.object-position{color:var(--muted)}.object-card .object-config{display:flex;flex-direction:column;gap:4px;padding:6px 8px;border-radius:6px;background:#212f4466}.object-config-label{display:flex;flex-direction:column;gap:4px;color:#cfd8dc}.object-config-label--checkbox{flex-direction:row;align-items:center;gap:6px;cursor:pointer;margin-top:4px}.object-config-select{width:100%;padding:4px 6px;border-radius:4px;border:1px solid #334155;background:#172030;color:#e8f1ff}.object-config-textarea{width:100%;min-height:84px;padding:6px;border-radius:4px;border:1px solid #334155;background:#0f172a;color:#e8f1ff;font-family:var(--ui-font-family);resize:vertical}.object-config-hint{color:var(--muted);text-align:right}.object-status{color:#eceff1}.object-status.is-on{color:#8be9a5}.npc-conditional-group{display:grid;gap:6px;margin:8px 0}.npc-conditional-section{display:grid;gap:8px}.npc-conditional-section[hidden]{display:none}.npc-choice-section{display:grid;gap:12px}.npc-choice-section[hidden]{display:none}.npc-choice-prompt{margin-bottom:2px}.npc-choice-branch{display:grid;gap:8px;padding:10px 12px 12px;border-radius:8px;border:2px solid transparent;background:#ffffff08}.npc-choice-branch--yes{border-color:#00b06b;background:#00b06b14}.npc-choice-branch--no{border-color:#e0405a;background:#e0405a14}.npc-choice-branch__title{font-weight:700;letter-spacing:.02em;margin-bottom:2px}.npc-choice-branch--yes .npc-choice-branch__title{color:#2ee29a}.npc-choice-branch--no .npc-choice-branch__title{color:#ff7d92}.project-about-button{margin-top:8px;width:100%;padding:9px 12px;border-radius:8px;border:1px solid rgba(255,255,255,.18);background:#ffffff0d;color:inherit;cursor:pointer}.project-about-button:hover{background:#ffffff1f}.npc-conditional-toggle{margin:8px 0}.npc-conditional-toggle button{width:100%;padding:8px 10px;border:1px dashed var(--border);border-radius:6px;background:#0f121d80;color:var(--muted);cursor:pointer;transition:border-color .2s ease,color .2s ease,background .2s ease}.npc-conditional-toggle button[aria-expanded=true]{border-style:solid;border-color:var(--accent);color:var(--accent);background:#64b5f614}.npc-conditional-toggle button:hover,.npc-conditional-toggle button:focus-visible{border-color:var(--accent);color:var(--accent);background:#64b5f614;outline:2px solid var(--accent);outline-offset:2px}.npc-reward-group{display:grid;gap:6px;margin:8px 0}.npc-reward-group select,.npc-conditional-group select,.npc-conditional-group textarea{width:100%}.npc-extra{color:var(--muted)}.project-actions{display:grid;gap:0;min-width:0}.project-tab-panel,.project-group,.project-variables,.project-palette__panel{min-width:0}.project-tabs{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(120px,100%),1fr));gap:4px;padding:0;margin-bottom:10px;background:transparent}.project-tab-panel{display:none;padding:4px 0 0;background:var(--panel)}.project-tab-panel.active{display:block}@media(max-width:1280px){.project-tabs{grid-template-columns:repeat(auto-fit,minmax(min(108px,100%),1fr))}}.project-field{display:flex;flex-direction:column;gap:4px;flex:1 1 220px;min-width:200px}.project-field--share-url{flex-basis:100%}.project-field span{color:var(--muted)}.project-field input,.project-field select{width:100%;padding:8px 10px;border-radius:8px;border:1px solid var(--border);background:var(--panel);color:var(--text);box-sizing:border-box}.project-field--share-url input{cursor:text;-webkit-user-select:text;user-select:text}.project-tab-panel>.project-group>button{width:100%}.project-group{flex:1 1 100%;display:flex;flex-direction:column;gap:8px}.project-group .project-field{flex:0 0 auto;min-width:0;width:100%}.project-group__title{margin:0;padding:8px 12px;color:var(--accent);letter-spacing:var(--ls-px-lg);border-left:3px solid var(--accent);background:#5bfa8e0d}.project-online-warning{padding:10px 12px;border:1px solid rgba(247,201,124,.45);border-left:3px solid #f7c97c;border-radius:8px;background:#f7c97c1f;color:#f7d99b;line-height:var(--lh-text)}.project-online-section{display:flex;flex-direction:column;gap:8px}.project-online-controls{display:none;padding:10px;border:1px solid var(--border);border-radius:8px;background:#0003}.project-online-spawn{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:8px;color:var(--muted)}.project-online-spawn__value{color:#29adff}.project-online-actions{display:flex;flex-wrap:wrap;gap:6px}.project-online-url-row{display:none;margin-top:8px}.project-online-url-input{width:100%;padding:7px 8px;border:1px solid var(--border);border-radius:6px;background:var(--panel);color:var(--text);font-size:.85em;box-sizing:border-box}.project-share-hint{flex:1 1 100%;color:var(--muted);margin:4px 0}.project-variables{flex:1 1 100%;background:linear-gradient(135deg,#212635cc,#181c28e6);border:1px solid var(--border);border-radius:12px;padding:12px;display:flex;flex-direction:column;gap:10px}.project-variables__header{display:flex;align-items:center;justify-content:space-between;gap:8px}body.game-mode .tabs{border:2px solid #2a2f3a;border-radius:0;box-shadow:none;background:var(--panel);background-image:none;font-family:var(--ui-font-family)}body.game-mode .tabs-title{color:#fff;letter-spacing:var(--ls-wide)}body.game-mode .tab-button,body.game-mode .tab-action-button{border:2px solid #2a2f3a;border-radius:0;box-shadow:none;background:#141a24;background-image:none;color:#fff;letter-spacing:var(--ls-normal);font-family:var(--ui-font-family)}body.game-mode .tab-button.active{background:#1f2735;border-color:#5bfa8e;color:#fff}@media(hover:hover){body.game-mode .tab-button:hover,body.game-mode .tab-action-button:hover{background:#1f2735;border-color:#5bfa8e;color:#fff}}.project-variables__title{font-weight:var(--fw-bold);letter-spacing:var(--ls-px-sm)}.project-variables__toggle{align-self:stretch;padding:10px 12px;border-radius:10px;border:1px solid var(--border);background:#ffffff0f;color:var(--text);cursor:pointer;transition:background .12s ease,border-color .12s ease;display:flex;align-items:center;justify-content:space-between;gap:10px;text-align:left;font-weight:var(--fw-bold)}.project-variables__toggle:hover{background:#ffffff1a;border-color:#ffffff29}.project-variables__summary{color:var(--muted)}.project-variables__list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:8px}.project-variable-item{display:flex;align-items:center;gap:10px;padding:10px;border-radius:10px;border:1px solid rgba(255,255,255,.06);background:var(--panel)}.project-variable-color{width:16px;height:16px;border-radius:999px;border:1px solid rgba(255,255,255,.25);background:var(--muted);box-shadow:0 0 0 2px #ffffff08}.project-variable-name{flex:1;font-weight:var(--fw-medium);letter-spacing:var(--ls-px-sm)}.project-variable-badge{padding:6px 10px;border-radius:999px;font-weight:var(--fw-bold);letter-spacing:var(--ls-px-sm);border:1px solid rgba(255,255,255,.08)}.project-variable-badge.in-use{color:#a1f5c2;background:#47c48624;border-color:#47c48666}.project-variable-badge.unused{color:#f7c97c;background:#f7c97c24;border-color:#f7c97c59}.project-variables.is-collapsed .project-variables__list{display:none}.project-skills__list{gap:10px}.project-skills-reset-btn{align-self:stretch;padding:7px 12px;border-radius:8px;border:1px solid rgba(255,255,255,.08);background:transparent;color:var(--muted);cursor:pointer;text-align:center;opacity:.8;transition:background .12s ease,border-color .12s ease,opacity .12s ease}@media(hover:hover){.project-skills-reset-btn:hover{background:#ffffff0d;border-color:#ffffff26;opacity:1}}.project-skill-group{display:flex;flex-direction:column;gap:8px}.project-skill-group-title{font-weight:var(--fw-bold);letter-spacing:var(--ls-px-sm);color:var(--text)}.project-skill-item{display:grid;grid-template-columns:auto auto minmax(0,1fr) auto auto;grid-template-rows:auto auto;gap:5px 8px;padding:12px 14px;border-radius:10px;border:1px solid rgba(255,255,255,.08);background:var(--panel);transition:opacity .15s,background .12s ease,border-color .12s ease;-webkit-user-select:none;user-select:none;touch-action:none}@media(hover:hover){.project-skill-item:not(.is-dragging):hover{background:#ffffff08;border-color:#ffffff21}}.project-skill-drag-handle{grid-column:1;grid-row:1 / span 2;align-self:center;color:var(--muted);cursor:grab;padding:0 4px;opacity:.35;line-height:var(--lh-tight);transition:opacity .1s ease}@media(hover:hover){.project-skill-drag-handle:hover{opacity:.75}}.project-skill-drag-handle:active{cursor:grabbing;opacity:1}.project-skill-icon{grid-column:2;grid-row:1 / span 2;align-self:center;line-height:var(--lh-tight)}.project-skill-name{grid-column:3;grid-row:1;display:flex;align-items:center;font-weight:var(--fw-bold);letter-spacing:var(--ls-px-sm);align-self:end;min-width:0}.project-skill-level-badge{grid-column:4;grid-row:1;align-self:end;white-space:nowrap;font-weight:var(--fw-bold);letter-spacing:var(--ls-px-md);padding:2px 8px;border-radius:999px;background:#5bfa8e1a;color:var(--accent);border:1px solid rgba(91,250,142,.22)}.project-skill-desc{grid-column:3 / span 2;grid-row:2;display:flex;align-items:flex-start;color:var(--muted);line-height:var(--lh-relaxed);margin:0;align-self:start;opacity:.7;min-width:0}.project-skill-field-text{min-width:0;overflow-wrap:anywhere}.project-skill-name .project-skill-field-text{overflow:hidden;overflow-wrap:normal;text-overflow:ellipsis;white-space:nowrap}.project-skill-field-controls{display:inline-flex;grid-column:5;align-items:center;justify-content:flex-end;gap:6px;min-width:32px}.project-skill-field-controls--name{grid-row:1;align-self:center}.project-skill-field-controls--description{grid-row:2;align-self:start}.project-skill-edit-btn{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:28px;height:28px;padding:0;border:1px solid rgba(255,255,255,.14);border-radius:6px;background:#ffffff0e;color:#ffffffc7;cursor:pointer;line-height:var(--lh-tight);opacity:1;transition:color .15s,background .15s,border-color .15s,transform .15s}.project-skill-action-icon{display:block;width:15px;height:15px;pointer-events:none}@media(hover:hover){.project-skill-edit-btn:hover,.project-skill-reset-field-btn:hover{color:var(--accent);border-color:#5bfa8e52;background:#5bfa8e1a;transform:translateY(-1px)}}@media(pointer:coarse){.project-skill-edit-btn{display:inline-flex;min-width:44px;min-height:44px;padding:0}}@media(pointer:coarse){.project-skill-drag-handle,.project-skill-icon{grid-row:1 / span 3}.project-skill-name{grid-column:3 / span 2;grid-row:1;align-self:end}.project-skill-name .project-skill-field-text{white-space:normal;overflow:visible;overflow-wrap:break-word;text-overflow:clip}.project-skill-level-badge{grid-column:3;grid-row:2;align-self:center;justify-self:start}.project-skill-desc{grid-column:3 / span 2;grid-row:3}.project-skill-edit-controls{grid-row:1 / span 3}}.project-skill-custom-dot{flex-shrink:0;margin-right:5px;color:var(--accent);line-height:var(--lh-tight)}.project-skill-reset-field-btn{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:28px;height:28px;padding:0;border:1px solid rgba(255,255,255,.14);border-radius:6px;background:#ffffff0e;color:#ffffffc7;cursor:pointer;line-height:var(--lh-tight);opacity:1;transition:color .15s,background .15s,border-color .15s,transform .15s}@media(pointer:coarse){.project-skill-reset-field-btn{min-width:44px;min-height:44px;padding:0}}.project-skill-edit-btn:focus-visible,.project-skill-reset-field-btn:focus-visible,.project-skill-confirm-btn:focus-visible,.project-skill-cancel-btn:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.project-skill-item--editing{border-left:2px solid var(--accent);touch-action:auto}.project-skill-item--editing .project-skill-drag-handle{pointer-events:none;opacity:.3}.project-skill-item--editing .project-skill-field-controls{visibility:hidden}.project-skill-field-editor{display:flex;flex-direction:column;gap:4px;width:100%;min-width:0;margin:0;padding:0}.project-skill-field-editor--name{grid-column:3 / span 2;grid-row:1;align-self:end}.project-skill-field-editor--description{grid-column:3 / span 2;grid-row:2;align-self:start}.project-skill-field-input{width:100%;padding:0 0 3px;border:0;border-bottom:1.5px solid var(--accent);border-radius:0;outline:none;background:transparent;color:inherit;font:inherit;font-weight:inherit;caret-color:var(--accent);-webkit-appearance:none}.project-skill-field-input::placeholder{color:var(--muted);opacity:.55}.project-skill-field-footer{display:flex;align-items:center;justify-content:flex-end;gap:6px}.project-skill-char-counter{color:var(--muted);font-variant-numeric:tabular-nums;-webkit-user-select:none;user-select:none}.project-skill-char-counter--near-limit{color:var(--accent)}.project-skill-confirm-btn,.project-skill-cancel-btn{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;padding:2px 7px;border:0;border-radius:3px;background:none;cursor:pointer}.project-skill-confirm-btn{color:var(--accent)}.project-skill-cancel-btn{color:var(--muted)}@media(hover:hover){.project-skill-confirm-btn:hover{background:#5bfa8e1f}.project-skill-cancel-btn:hover{background:#ffffff0f;color:var(--fg)}}@media(pointer:coarse){.project-skill-confirm-btn,.project-skill-cancel-btn{min-width:44px;min-height:44px;padding:0 12px;border-radius:6px}.project-skill-confirm-btn{border:1px solid rgba(91,250,142,.3);background:#5bfa8e1f}.project-skill-cancel-btn{border:1px solid rgba(255,255,255,.1);background:#ffffff0a;color:var(--fg)}}.project-skill-item.is-dragging{opacity:.25;border-style:dashed;border-color:#ffffff1a;background:transparent}.project-skill-item.is-drag-ghost{position:fixed;pointer-events:none;z-index:9999;opacity:.95;box-shadow:0 12px 32px #00000080,0 4px 12px #00000040;transform:scale(1.03) rotate(.75deg);cursor:grabbing}.project-skill-item.is-drag-over-above{border-top:2px solid var(--accent, #29adff)}.project-skill-item.is-drag-over-below{border-bottom:2px solid var(--accent, #29adff)}.project-test{gap:8px}.project-test__panel{display:flex;flex-direction:column;gap:10px}.project-test__hint{margin:0;color:var(--muted)}.project-test__field{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:10px;border:1px solid rgba(255,255,255,.08);background:var(--panel)}.project-test__field select{flex:1;max-width:160px}.project-test__checkbox,.project-variables__checkbox{cursor:pointer;-webkit-user-select:none;user-select:none}.project-test__checkbox input,.project-variables__checkbox input{width:18px;height:18px}.project-variables__field{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:10px;border:1px solid rgba(255,255,255,.08);background:var(--panel)}.project-appearance__checkbox{margin-top:10px}.project-test__skills{display:flex;flex-direction:column;gap:8px}.project-test__skills-title{font-weight:var(--fw-bold);letter-spacing:var(--ls-px-sm)}.project-test__skill-list{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:8px}.project-test__skill{display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:10px;border:1px solid rgba(255,255,255,.08);background:var(--panel)}.project-test__skill input{width:16px;height:16px}.project-test__skill-label{display:flex;align-items:center;gap:6px;font-weight:var(--fw-medium)}.project-test.is-collapsed .project-test__panel{display:none}.enemies-panel{display:grid;gap:12px}.enemy-types{display:grid;gap:8px;max-height:min(40vh,260px);overflow-y:auto;padding-right:4px;grid-template-columns:1fr}.enemy-xp-block{display:flex;flex-direction:column;gap:6px;padding:10px 12px;border:1px solid var(--border);border-radius:8px;background:linear-gradient(135deg,#111827bf,#182134a6);grid-column:1 / -1;margin-bottom:6px}.enemy-xp-header{display:flex;align-items:center;justify-content:space-between;gap:8px;color:var(--text)}.enemy-xp-label{font-weight:var(--fw-medium);letter-spacing:var(--ls-px-md)}.enemy-xp-value{color:var(--muted)}.enemy-xp-track{position:relative;width:100%;height:12px;border-radius:999px;background:#ffffff14;overflow:hidden;box-shadow:inset 0 1px 2px #00000059}.enemy-xp-fill{position:absolute;inset:0;width:0%;background:linear-gradient(90deg,#5eead4,#22d3ee);box-shadow:0 0 8px #22d3ee73;transition:width .25s ease}.enemy-types::-webkit-scrollbar{width:6px}.enemy-types::-webkit-scrollbar-thumb{background:#232734;border-radius:999px}.enemy-card{display:flex;align-items:center;gap:10px;padding:10px 12px;background:var(--panel);border:4px solid var(--border);border-radius:8px;cursor:pointer;min-width:0;position:relative}.enemy-card.boss{background:#121923}.enemy-card:hover{border-color:#64b5f699}.enemy-card.selected{border-color:var(--accent);box-shadow:0 0 0 2px #64b5f626}.enemy-preview{width:56px;height:56px;border:none;border-radius:6px;background:#0f121d99;flex-shrink:0}.enemy-meta{display:grid;gap:8px;flex:1;min-width:0;overflow:hidden}.enemy-boss-badge{display:inline-flex;align-items:center;justify-content:center;padding:2px 6px;font-weight:var(--fw-bold);letter-spacing:var(--ls-px-lg);color:#fff;background:#1f7f4e;border-radius:0;width:fit-content}.enemy-name{font-weight:var(--fw-medium);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.enemy-damage{color:var(--accent)}.enemy-stats{margin-top:4px;color:var(--muted);line-height:var(--lh-normal)}.tile-list,.npcs-list{display:grid;gap:8px;max-height:min(40vh,260px);overflow-y:auto;padding-right:4px}.npcs-list{grid-template-columns:repeat(2,minmax(0,1fr))}.tile-group{display:grid;gap:6px}.tile-group+.tile-group{margin-top:12px}.tile-group-title{margin:4px 0 0;font-weight:var(--fw-medium);letter-spacing:var(--ls-tight);color:var(--muted)}.tile-group:first-child .tile-group-title{margin-top:0}.tile-list::-webkit-scrollbar,.npcs-list::-webkit-scrollbar{width:6px}.tile-list::-webkit-scrollbar-thumb,.npcs-list::-webkit-scrollbar-thumb{background:#232734;border-radius:999px}.tile-card{display:flex;align-items:center;justify-content:center;padding:8px;width:92px;height:92px;appearance:none;-webkit-appearance:none;background:var(--panel);border:4px solid var(--border);border-radius:0;cursor:pointer;position:relative}.tile-card:hover{border-color:#64b5f699}.tile-card:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.npc-card{display:flex;align-items:center;gap:10px;padding:8px 10px;background:var(--panel);border:4px solid var(--border);border-radius:8px;cursor:pointer;position:relative;min-width:0}.tile-card.selected{border-color:var(--accent);background:#64b5f614;box-shadow:0 0 0 2px #64b5f626}.tile-card-select{display:flex;align-items:center;justify-content:center;width:100%;height:100%;padding:0;border:0!important;background:transparent;color:inherit}.tile-card-select:hover,.tile-card-select:focus,.tile-card-select:focus-visible{border:0!important;background:transparent!important;outline:none;box-shadow:none!important}.tile-card canvas{width:64px;height:64px;flex-shrink:0}.npc-card .meta{flex:1;display:grid;gap:8px;min-width:0}.tile-name{font-weight:var(--fw-medium);color:var(--text)}.npc-card .row{display:flex;flex-wrap:wrap;align-items:center;gap:6px;color:var(--muted)}.npc-card label{display:flex;align-items:center;gap:4px;cursor:pointer}.npc-card.selected{border-color:var(--accent);background:#64b5f61a;box-shadow:0 0 0 2px #64b5f626}.npc-card.npc-card-placed{border-color:#47c486b3!important;box-shadow:0 0 0 1px #47c4862e}.npc-card.npc-card-placed.selected{border-color:#47c486d1!important;box-shadow:0 0 0 1px #47c4863d,0 0 0 3px #47c48614}.npc-card .npc-preview{width:48px;height:48px;border:none;border-radius:4px;background:var(--panel);display:block;image-rendering:pixelated;flex-shrink:0}.world-panel{padding:4px 0}.world-grid{--world-cols: 3;display:grid;grid-template-columns:repeat(var(--world-cols),minmax(0,1fr));gap:6px}.world-cell{outline:none;border:1px solid var(--border);border-radius:6px;background:var(--panel);color:var(--muted);font-weight:var(--fw-medium);padding:10px 0;display:flex;flex-direction:column;align-items:center;gap:6px;cursor:pointer;transition:border-color .2s ease,background .2s ease}.world-cell:hover{border-color:var(--accent)}.world-cell.active{border-color:var(--accent);background:#64b5f61f;color:var(--text);box-shadow:0 0 0 2px #64b5f62e}.world-cell-label{letter-spacing:var(--ls-px-lg)}.world-cell-badges{display:flex;flex-wrap:wrap;gap:4px;justify-content:center}.world-cell-badge{padding:2px 6px;border-radius:999px;background:#64b5f62e;color:var(--text)}.world-cell .badge-start{background:#ffc10740;color:#ffecb3}.world-metrics{margin-top:10px;border:1px solid var(--border);border-radius:6px;padding:8px 10px;background:var(--panel)}.world-metrics-title{color:var(--muted);font-weight:var(--fw-medium);margin:0 0 6px;opacity:.7;font-size:.85em;letter-spacing:var(--ls-px-md);text-transform:uppercase}.world-metrics-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:3px 12px}.world-metric-row{display:flex;justify-content:space-between;align-items:center;gap:4px;padding:2px 0;border-bottom:1px solid var(--border);cursor:help;min-width:0}.world-metric-row:last-child,.world-metric-row:nth-last-child(2):nth-child(odd){border-bottom:none}.world-metric-label{color:var(--muted);opacity:.8;font-size:.82em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.world-metric-value{color:var(--text);font-weight:var(--fw-medium);font-size:.85em;font-variant-numeric:tabular-nums;flex-shrink:0}.npc-card .npc-name{font-weight:var(--fw-medium);color:var(--text);min-width:0;overflow-wrap:break-word}.npc-card .npc-position,.npc-card .npc-dialog{color:var(--muted)}.npc-card .npc-dialog{font-style:italic;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:150px}.npc-variant-selector{display:flex;align-items:center;gap:8px;justify-content:flex-start;margin-bottom:8px}.npc-variant-buttons{display:flex;flex-wrap:wrap;gap:6px}.npc-variant-button,.object-category-button,.project-tab-button{min-width:0;min-height:0;margin:0;padding:6px 10px;border:2px solid var(--border);border-radius:0;background:#141a24;color:var(--text);cursor:pointer;text-align:center;line-height:var(--lh-text);white-space:normal;overflow-wrap:anywhere;box-shadow:none;transition:border-color .15s ease,background .15s ease,color .15s ease}.npc-variant-button.active,.object-category-button.active,.project-tab-button.active{border-color:var(--accent);background:#1f2735;color:#fff;box-shadow:none}@media(hover:hover){.npc-variant-button:hover,.object-category-button:hover,.project-tab-button:hover{border-color:var(--accent);background:#1f2735;color:#fff}}.npc-variant-button:focus-visible,.object-category-button:focus-visible,.project-tab-button:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-color:var(--accent)}.object-category-selector{display:flex;align-items:center;gap:8px;justify-content:flex-start;margin-bottom:8px}.object-category-buttons{display:flex;flex-wrap:wrap;gap:4px}.npc-editor{display:grid;gap:8px}.npc-editor[hidden]{display:none!important}.npc-editor label{color:var(--muted)}.npc-editor textarea{min-height:140px}.npc-editor button{justify-self:flex-start}.json-editor{display:grid;gap:8px}.json-editor textarea{min-height:160px;font-family:var(--ui-font-family)}.app-footer{border-top:1px solid var(--border);color:var(--muted);padding:12px 16px;text-align:center}@media(min-width:1800px){.editor-layout{zoom:1.3}}@media(min-width:2000px){.editor-layout{zoom:1.4}}@media(min-width:2500px){.editor-layout{zoom:1.6}}@media(max-width:1200px){.editor-layout{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-areas:"center center" "left right"}.editor-left,.editor-right{justify-self:stretch;max-width:none}.editor-center{justify-self:stretch}}@media(max-width:960px){main{padding:clamp(16px,5vw,24px)}.editor-layout{grid-template-columns:1fr;grid-template-areas:"center" "left" "right"}.editor-left,.editor-right{max-width:none}.editor-left,.editor-right,.editor-center{justify-self:stretch}}@media(max-width:920px){.editor-mobile-nav{display:flex}.editor-section[data-mobile-panel]{display:none}.editor-section[data-mobile-panel].is-mobile-active{display:block}.editor-left,.editor-right{width:100%}}@media(max-width:700px){header{justify-content:flex-start}header input{max-width:100%}.tab-button{flex:0 0 auto}.game-controls{flex-direction:column}.object-card{grid-template-columns:1fr;text-align:center}.object-preview{justify-self:center}.object-card .object-header{flex-direction:column;align-items:center;gap:4px}}@media(max-width:560px){header{padding:14px 16px}main{padding:16px 14px 28px}.tabs{gap:6px}.tab-button{flex:0 0 auto;min-width:auto}.npc-card{flex-direction:column;align-items:flex-start}.npc-card .npc-preview{margin-bottom:4px}.project-actions button{flex:1 1 100%}.tile-editor-controls{grid-template-columns:1fr}.tile-editor-controls .control-group:last-child{flex-direction:column}}.game-minimap{top:clamp(12px,3vw,28px);right:clamp(12px,4vw,32px);width:72px;height:72px;display:grid;grid-template-columns:repeat(3,1fr);gap:2px;padding:6px;border-radius:10px;background:#0a0d16b3;border:1px solid rgba(255,255,255,.08);pointer-events:none;z-index:3}.game-minimap-cell{width:16px;height:16px;border-radius:4px;background:#ffffff14;border:1px solid rgba(255,255,255,.12);box-shadow:inset 0 0 4px #00000059}.game-minimap-cell-active{background:#64b5f6e6;border-color:#64b5f6e6;box-shadow:0 0 6px #64b5f6a6,inset 0 0 4px #fff6}.world-cell:focus-visible{outline:2px solid var(--accent);outline-offset:2px}@media(max-width:960px){#editor-canvas{width:clamp(200px,80vw,320px)}}.tile-group-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(96px,max-content));gap:8px;justify-content:flex-start}.tile-grid{display:grid;grid-template-columns:repeat(auto-fill,92px);gap:8px;justify-content:flex-start}.project-palette{margin-bottom:16px}.project-palette__panel{padding:12px;background:var(--panel);border-radius:4px;margin-top:8px}.palette-header{display:flex;flex-direction:column;align-items:flex-start;margin-bottom:12px;gap:12px}.palette-preset-field{display:grid;gap:4px;min-width:0}.palette-preset-field select{width:100%;min-width:0;max-width:100%}.palette-description{color:var(--muted);margin:0;opacity:.7}.palette-reset-btn{display:inline-flex;align-self:flex-start;padding:6px 12px;background:#444;color:#fff;border:1px solid #666;border-radius:3px;cursor:pointer;transition:background .2s;white-space:nowrap}.palette-reset-btn:hover{background:#555}.palette-reset-btn:active{background:#333}.palette-grid{display:grid;grid-template-columns:repeat(6,24px);column-gap:8px;row-gap:18px}.palette-color-button{width:24px;height:24px;border:2px solid #444;border-radius:4px;cursor:pointer;position:relative;transition:transform .1s,border-color .2s}.palette-color-button:hover{transform:scale(1.1);border-color:#fff}.palette-color-button:active{transform:scale(.95)}.palette-color-button:after{content:attr(data-color-index);position:absolute;bottom:-16px;left:50%;transform:translate(-50%);color:#666}#skill-edit-modal{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;padding:16px;margin:0;background:#000c;z-index:1000}#skill-edit-modal[hidden]{display:none}#skill-edit-modal .skill-edit-modal__content{background:#0a0d16f2;border:1px solid var(--border);border-radius:10px;padding:10px;width:100%;max-width:420px;display:block}.skill-edit-modal__panel{border:2px solid var(--accent);border-radius:8px;background:var(--panel);padding:14px;margin:0;width:100%;box-sizing:border-box;display:flex;flex-direction:column;gap:12px}.skill-edit-modal__header{display:flex;justify-content:space-between;align-items:center;gap:12px;padding-bottom:8px;border-bottom:1px solid var(--border)}.skill-edit-modal__header h3{margin:0;color:var(--text)}.skill-edit-modal__fields{display:flex;flex-direction:column;gap:10px}.skill-edit-modal__field{display:flex;flex-direction:column;gap:5px}.skill-edit-modal__field label{display:block;font-weight:var(--fw-bold);letter-spacing:var(--ls-tight);color:var(--muted)}.skill-edit-modal__input{width:100%;padding:7px 10px;background:#0c0e18bf;border:1px solid var(--border);border-radius:6px;color:var(--text);font:inherit;box-sizing:border-box;outline:none;transition:border-color .15s;-webkit-appearance:none}.skill-edit-modal__input:focus{border-color:var(--accent);background:#0f121de6}.skill-edit-modal__input::placeholder{color:var(--muted);opacity:.5}.skill-edit-modal__icon-row{display:flex;align-items:center;gap:10px}.skill-edit-modal__icon-preview{line-height:var(--lh-tight);min-width:2.2rem;text-align:center;flex-shrink:0}.skill-edit-modal__input--icon{width:100px;text-align:center;flex:none}.skill-edit-modal__input--desc{resize:none;line-height:var(--lh-loose);min-height:4.5em;overflow-y:auto}.skill-edit-modal__counter{color:var(--muted);text-align:right;font-variant-numeric:tabular-nums;-webkit-user-select:none;user-select:none;line-height:var(--lh-tight)}.skill-edit-modal__counter--near-limit{color:var(--accent)}.skill-edit-modal__actions{display:flex;flex-direction:column;gap:8px;border-top:1px solid var(--border);padding-top:10px}.skill-edit-modal__actions-right{display:flex;gap:8px}.skill-edit-modal__actions-right button{flex:1}#skill-edit-restore{width:100%}.skill-edit-modal__actions button{min-height:40px;padding:10px 12px;font-weight:var(--fw-bold);border-radius:4px;cursor:pointer;transition:background .2s}@media(max-width:768px){#skill-edit-modal .skill-edit-modal__content{width:100%;max-width:none}}@media(pointer:coarse){.skill-edit-modal__actions button{min-height:44px}}.project-skill-edit-controls{grid-column:5;grid-row:1 / span 2;display:flex;align-items:center;justify-content:center}#object-edit-modal,#npc-edit-modal,#enemy-edit-modal{position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;background:#000000b3;padding:16px}#object-edit-modal[hidden],#npc-edit-modal[hidden],#enemy-edit-modal[hidden]{display:none}.object-edit-modal__panel{font-size:var(--engine-font-size);background:var(--panel, #151821);border:1px solid var(--border);border-top:2px solid var(--accent);border-radius:6px;max-width:380px;width:100%;max-height:82vh;overflow-y:auto;display:flex;flex-direction:column;box-shadow:0 8px 32px #0009,0 0 0 1px #5bfa8e14}.object-edit-modal__header{display:flex;align-items:flex-start;gap:12px;padding:14px 14px 13px;background:#ffffff06;border-bottom:1px solid var(--border);flex-shrink:0}.object-edit-modal__preview{flex-shrink:0;border-radius:4px;border:1px solid var(--border);background:#00000059;padding:2px;image-rendering:pixelated}.object-edit-modal__title-group{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px;padding-top:2px}.object-edit-modal__title{margin:0;color:var(--accent);font-weight:var(--fw-bold);text-transform:uppercase;letter-spacing:.05em;line-height:1.1}.object-edit-modal__header .object-position{display:inline-flex;align-items:center;color:#ffffff73;background:#ffffff0d;border:1px solid rgba(255,255,255,.08);border-radius:3px;padding:1px 6px;align-self:flex-start;letter-spacing:.04em}.object-edit-modal__desc{margin:0;color:#ffffff61;line-height:1.45}.editor-modal__badge{align-self:flex-start;display:inline-flex;align-items:center;padding:1px 6px;border-radius:3px;letter-spacing:.04em;text-transform:uppercase;color:var(--accent);background:#5bfa8e1a;border:1px solid rgba(91,250,142,.25)}.object-edit-modal__close{background:none;border:none;color:#ffffff4d;cursor:pointer;padding:2px 4px;line-height:1;flex-shrink:0;border-radius:3px;margin-left:auto;align-self:flex-start;transition:color .15s,background .15s}.object-edit-modal__close:hover{color:var(--text);background:#ffffff14}.object-edit-modal__config{display:flex;flex-direction:column;gap:10px;padding:14px}.object-edit-modal__config:empty{display:none}.enemy-stats-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.enemy-stat-cell{display:flex;flex-direction:column;gap:2px;padding:6px 8px;background:#ffffff0a;border:1px solid var(--border);border-radius:4px}.enemy-stat-cell__label{color:#ffffff73;text-transform:uppercase;letter-spacing:.04em;font-size:.78em}.enemy-stat-cell__value{color:var(--text);font-weight:var(--fw-bold)}.object-edit-modal__footer{display:flex;gap:8px;padding:10px 14px;border-top:1px solid var(--border);background:#00000026;flex-shrink:0}.object-edit-modal__footer .btn-secondary{flex:1;min-height:34px;padding:6px 10px}.object-edit-modal__move{color:var(--accent)!important;border-color:#5bfa8e4d!important}.object-edit-modal__move:hover{background:#5bfa8e14!important;border-color:#5bfa8e99!important}.object-edit-modal__remove{color:#e06060!important;border-color:#e0606059!important}.object-edit-modal__remove:hover{background:#e060601a!important;border-color:#e0606099!important}.npc-edit-modal__body{display:flex;flex-direction:column;gap:10px;padding:14px}.npc-edit-modal__toggle{align-self:stretch;width:100%;box-sizing:border-box;text-align:center;padding:6px 10px;min-height:26px;opacity:.75}.npc-edit-modal__toggle:hover{opacity:1}.npc-conditional-section{display:flex;flex-direction:column;gap:10px;padding:10px 12px;background:#ffffff08;border:1px solid var(--border);border-radius:4px}.object-edit-modal__config .object-status{color:#ffffff73;background:#ffffff0a;border:1px solid rgba(255,255,255,.08);border-radius:3px;padding:3px 8px;align-self:flex-start}.object-edit-modal__config .object-config-label,.npc-edit-modal__body .object-config-label{gap:5px}@media(pointer:coarse){.object-edit-modal__footer .btn-secondary{min-height:42px}.npc-edit-modal__toggle{min-height:34px}}#color-picker-modal{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;padding:16px;margin:0;background:#000c;z-index:1000}#color-picker-modal[hidden]{display:none}#color-picker-modal .color-picker-content{background:#0a0d16f2;border:1px solid var(--border);border-radius:10px;padding:10px;width:100%;max-width:460px;display:block}.color-picker-panel{border:2px solid var(--accent);border-radius:8px;background:var(--panel);padding:14px;margin:0;width:100%;box-sizing:border-box;display:flex;flex-direction:column;gap:12px}.color-picker-header{display:flex;justify-content:space-between;align-items:center;gap:12px;padding-bottom:8px;border-bottom:1px solid var(--border)}.color-picker-header h3{margin:0;color:var(--text)}.color-index-label{color:var(--text);background:#0f121dd9;padding:4px 8px;border-radius:3px;border:1px solid var(--border)}.color-picker-preview{margin:0}.color-preview-box{display:grid;gap:12px;border:1px solid var(--border);border-radius:8px;background:#0c0e18bf;padding:10px;margin:0}.color-preview-row{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#0f121dbf;border:1px solid var(--border);border-radius:6px;padding:10px}.color-preview-meta{display:grid;gap:6px}.color-preview-label{display:block;font-weight:var(--fw-bold);letter-spacing:var(--ls-xs);color:#f2f2f2;min-width:68px}.color-preview-value{display:block;font-family:var(--ui-font-family);color:var(--text)}.color-preview-swatch{width:72px;height:42px;border:1px solid var(--border);border-radius:4px;box-shadow:inset 0 0 0 1px #00000073}.color-picker-input{width:100%;height:50px;padding:0;border:1px solid var(--border);border-radius:4px;cursor:pointer;margin:0;box-sizing:border-box;background:#0f121de6;appearance:none;-webkit-appearance:none}.color-picker-input::-webkit-color-swatch-wrapper{padding:0}.color-picker-input::-webkit-color-swatch{border:none}.color-picker-input::-moz-color-swatch{border:none}.color-picker-actions{display:flex;gap:12px;border-top:1px solid var(--border);padding-top:10px}.color-picker-actions button{flex:1;min-height:40px;padding:10px 12px;font-weight:var(--fw-bold);border-radius:4px;cursor:pointer;transition:background .2s}.btn-secondary{background:#0f121de6;color:var(--text);border:1px solid var(--border)}.btn-secondary:hover{background:#64b5f629;border-color:#64b5f673}.btn-primary{background:#64b5f633;color:#fff;border:1px solid rgba(100,181,246,.45)}.btn-primary:hover{background:#64b5f64d}@media(max-width:768px){.palette-grid{grid-template-columns:repeat(6,20px);column-gap:8px;row-gap:16px}.palette-color-button{width:20px;height:20px}#color-picker-modal .color-picker-content{width:100%;max-width:none}}.tile-card,.npc-card,.enemy-card,.object-type-card{position:relative}.sprite-edit-btn{position:absolute;top:4px;right:4px;width:20px;height:20px;padding:0;display:flex;align-items:center;justify-content:center;border:1px solid rgba(255,255,255,.4);background:#0000008c;color:#fff;cursor:pointer;opacity:0;z-index:10;line-height:var(--lh-tight);text-align:center;box-shadow:0 0 0 1px #00000040;transition:opacity .1s,background .1s,border-color .1s}.tile-card.selected .sprite-edit-btn,.npc-card.selected .sprite-edit-btn,.enemy-card.selected .sprite-edit-btn,.object-type-card.selected .sprite-edit-btn{opacity:1}.pixel-art-editor-modal{position:fixed;inset:0;background:#000000bf;display:flex;align-items:center;justify-content:center;z-index:1000}.pixel-art-editor-modal[hidden]{display:none}.pixel-art-editor{background:var(--panel, #1a1c2c);border:2px solid var(--border, #333);padding:16px;display:flex;flex-direction:column;gap:8px;min-width:320px}.pae-header{display:flex;justify-content:space-between;align-items:center}.pae-title{font-weight:var(--fw-bold);letter-spacing:var(--ls-mono)}.pae-close{cursor:pointer;background:none;border:none;color:inherit;padding:2px 6px}.pae-editor-area{display:flex;align-items:center;justify-content:center;width:100%}#pae-canvas{display:block;cursor:crosshair;image-rendering:pixelated}.pae-palette{display:flex;flex-wrap:wrap;gap:2px}.pae-frame-bar{display:flex;gap:4px;flex-wrap:wrap}.pae-frame-bar[hidden]{display:none}.pae-frame-btn{cursor:pointer;padding:4px 8px;border:2px solid var(--border, #333);background:var(--panel, #1a1c2c);color:inherit}.pae-frame-btn.active{background:var(--accent, #29adff);color:#000}.pae-palette-swatch{width:16px;height:16px;cursor:pointer;border:2px solid transparent}.pae-palette-swatch.active{border-color:#fff}.pae-tools{display:flex;gap:4px}.pae-tool{cursor:pointer;padding:4px 8px;border:2px solid var(--border, #333);background:var(--panel, #1a1c2c);color:inherit}.pae-tool.active{background:var(--accent, #29adff);color:#000}.pae-actions{display:flex;gap:4px;justify-content:flex-end}.pae-save-btn{background:var(--accent, #29adff);color:#000;border:none;padding:4px 12px;cursor:pointer;font-weight:var(--fw-bold)}.pae-copy-code-btn{margin-right:auto;background:transparent;color:var(--text-muted, #90a4ae);border:1px solid var(--border);padding:4px 10px;cursor:pointer;font-size:.85em;border-radius:4px;transition:color .15s,border-color .15s}.pae-copy-code-btn:hover{color:var(--text);border-color:var(--text-muted, #90a4ae)}.project-save-toast{position:fixed;bottom:24px;right:24px;padding:10px 18px;border-radius:4px;font-weight:var(--fw-medium);color:#fff;z-index:9999;pointer-events:none;animation:toast-in .2s ease,toast-out .3s ease 2.7s forwards}.project-save-toast--success{background:#1a6b3c}.project-save-toast--error{background:#8b1a1a}.project-save-toast--info{background:#1a3a6b}@keyframes toast-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes toast-out{0%{opacity:1}to{opacity:0}}.explore-modal{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:#000000e0;z-index:1000;padding:16px}.explore-modal[hidden]{display:none}.explore-modal__panel{display:flex;flex-direction:column;width:100%;max-width:900px;max-height:85vh;background:var(--panel);border:2px solid var(--accent);overflow:hidden}.explore-modal__header{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:2px solid var(--border);flex-shrink:0;gap:12px}.explore-modal__title-group{display:flex;flex-direction:column;gap:2px;min-width:0}.explore-modal__title{color:var(--accent);margin:0}.explore-modal__subtitle{margin:0;color:var(--muted);opacity:.55;font-size:.85em;line-height:var(--lh-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.explore-modal__close{background:none;border:none;color:var(--text);cursor:pointer;font-family:var(--ui-font-family);line-height:var(--lh-tight);padding:4px 8px;opacity:.7;flex-shrink:0}.explore-modal__close:hover,.explore-modal__close:focus{opacity:1;color:var(--accent);outline:none}.explore-modal__body{overflow-y:auto;padding:16px;flex:1;min-height:0}.explore-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.explore-card{display:flex;flex-direction:column;background:var(--bg);border:2px solid var(--border);cursor:pointer;text-align:left;font-family:var(--ui-font-family);color:var(--text);padding:0;transition:border-color .1s}.explore-card:hover,.explore-card:focus{border-color:var(--accent);outline:none}.explore-card__cover{width:100%;aspect-ratio:1 / 1;background:var(--border);display:flex;align-items:center;justify-content:center;overflow:hidden;flex-shrink:0}.explore-card__img{width:100%;height:100%;object-fit:cover;display:block}.explore-card__no-cover{opacity:.2;color:var(--text);pointer-events:none}.explore-card__preview-placeholder{display:block;width:100%;height:100%;background:var(--border);position:relative;overflow:hidden}.explore-card__preview-placeholder:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,.06) 50%,transparent 100%);animation:preview-shimmer 1.4s infinite}@keyframes preview-shimmer{0%{transform:translate(-100%)}to{transform:translate(100%)}}.explore-card__img--hidden{display:none}.explore-card__img{animation:preview-fade-in .2s ease}@keyframes preview-fade-in{0%{opacity:0}to{opacity:1}}.explore-card__info{padding:10px;display:flex;flex-direction:column;gap:6px}.explore-card__title{color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:var(--lh-text)}.explore-card__author{color:var(--accent);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:var(--lh-text)}.explore-card__desc{color:var(--muted);opacity:.6;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.explore-card__itch-link{display:inline-block;margin-top:2px;color:var(--muted);opacity:.55;font-size:.85em;text-decoration:none;line-height:var(--lh-text);transition:opacity .15s}.explore-card__itch-link:hover,.explore-card__itch-link:focus{opacity:1;color:var(--accent);outline:none}.explore-loading{display:flex;align-items:center;justify-content:center;padding:40px}.explore-loading[hidden]{display:none}.explore-spinner{display:block;width:24px;height:24px;border:3px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:explore-spin .8s linear infinite}@keyframes explore-spin{to{transform:rotate(360deg)}}.explore-empty{text-align:center;padding:40px 16px;opacity:.5}.explore-footer{margin-top:16px;display:flex;justify-content:center}.explore-footer[hidden]{display:none}.explore-load-more{background:none;border:2px solid var(--accent);color:var(--accent);font-family:var(--ui-font-family);padding:8px 20px;cursor:pointer;transition:background .1s,color .1s}.explore-load-more:hover,.explore-load-more:focus{background:var(--accent);color:var(--bg);outline:none}.tab-action-button--explore{color:var(--accent)}.explore-back-banner{display:flex;justify-content:center;padding:8px 12px;border-bottom:1px solid var(--border)}.explore-back-banner[hidden]{display:none}.explore-back-btn{font-family:var(--ui-font-family);font-weight:var(--fw-medium);cursor:pointer;padding:6px 16px;min-height:32px;border-radius:4px;transition:background .2s}.explore-back-btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}@media(max-width:640px){.explore-modal{padding:8px}.explore-modal__panel{max-height:94vh}.explore-modal__header{padding:10px 12px}.explore-modal__subtitle{white-space:normal}.explore-modal__body{padding:12px}.explore-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.explore-card__info{padding:8px;gap:4px}}@media(max-width:360px){.explore-grid{gap:8px}.explore-modal__body{padding:10px}}@media(max-width:300px){.explore-grid{grid-template-columns:minmax(0,1fr)}}.devlog-modal{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:#000000e0;z-index:1000;padding:16px}.devlog-modal[hidden]{display:none}.devlog-modal__panel{display:flex;flex-direction:column;width:100%;max-width:560px;max-height:85vh;background:var(--panel);border:2px solid var(--accent);overflow:hidden}.devlog-modal__header{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:2px solid var(--border);flex-shrink:0;gap:12px}.devlog-modal__title-group{display:flex;flex-direction:column;gap:2px;min-width:0}.devlog-modal__title{color:var(--accent);margin:0}.devlog-modal__subtitle{margin:0;color:var(--muted);opacity:.55;font-size:.85em;line-height:var(--lh-text)}.devlog-modal__close{background:none;border:none;color:var(--text);cursor:pointer;font-family:var(--ui-font-family);line-height:var(--lh-tight);padding:4px 8px;opacity:.7;flex-shrink:0}.devlog-modal__close:hover,.devlog-modal__close:focus{opacity:1;color:var(--accent);outline:none}.devlog-modal__body{overflow-y:auto;padding:16px;flex:1;min-height:0;display:flex;flex-direction:column;gap:14px}.devlog-entry{background:var(--bg);border:2px solid var(--border);border-left:4px solid var(--accent);padding:12px 14px}.devlog-entry__date{color:var(--accent);font-size:.8em;opacity:.85;margin-bottom:4px}.devlog-entry__title{margin:0 0 6px;color:var(--text);font-size:1em}.devlog-entry__desc{margin:0;color:var(--text);opacity:.85;line-height:var(--lh-text);font-size:.9em}.devlog-modal__footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-top:2px solid var(--border);flex-shrink:0}.devlog-pager-btn{padding:6px 12px;background:#1a2030e6;border:2px solid var(--border);color:var(--text);cursor:pointer;font-family:var(--ui-font-family);font-weight:var(--fw-medium);transition:all .2s}@media(hover:hover){.devlog-pager-btn:hover:not(:disabled){background:#64b5f633;border-color:#64b5f673}}.devlog-pager-btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.devlog-pager-btn:disabled{opacity:.4;cursor:not-allowed}.devlog-page-indicator{color:var(--muted);opacity:.7;font-size:.85em;text-align:center;flex:1}@media(max-width:640px){.devlog-modal__panel{max-height:90vh}}.tab-action-button--about{color:var(--accent)}.about-modal{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:#000000e0;z-index:1000;padding:16px}.about-modal[hidden]{display:none}.about-modal__panel{display:flex;flex-direction:column;width:100%;max-width:460px;max-height:85vh;background:var(--panel);border:2px solid var(--accent);overflow:hidden}.about-modal__header{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:2px solid var(--border);flex-shrink:0;gap:12px}.about-modal__title-group{display:flex;flex-direction:column;gap:2px;min-width:0}.about-modal__title{color:var(--accent);margin:0}.about-modal__subtitle{margin:0;color:var(--muted);opacity:.55;font-size:.85em;line-height:var(--lh-text)}.about-modal__close{background:none;border:none;color:var(--text);cursor:pointer;font-family:var(--ui-font-family);line-height:var(--lh-tight);padding:4px 8px;opacity:.7;flex-shrink:0}.about-modal__close:hover,.about-modal__close:focus{opacity:1;color:var(--accent);outline:none}.about-modal__body{overflow-y:auto;padding:16px;flex:1;min-height:0;display:flex;flex-direction:column;gap:12px}.about-modal__lead{margin:0;color:var(--text);opacity:.9;line-height:var(--lh-text);font-size:.92em}.about-modal__creators{margin:0;color:var(--text);line-height:var(--lh-text)}.about-modal__free{margin:0;color:var(--accent);font-weight:var(--fw-medium);line-height:var(--lh-text)}.about-modal__link{align-self:flex-start;margin-top:4px;color:var(--accent);text-decoration:none;border-bottom:1px solid transparent}.about-modal__link:hover,.about-modal__link:focus-visible{border-bottom-color:var(--accent);outline:none}@media(max-width:640px){.about-modal__panel{max-height:90vh}}#online-player-list-root{flex-shrink:0}body.game-mode #game-container:has(#online-player-list-root){justify-content:space-between}body.game-mode #game-container:has(#online-player-list-root) .game-screen{flex:1;min-height:0;display:flex;align-items:center;justify-content:center}.server-status-modal{position:fixed;inset:0;z-index:10020;display:flex;align-items:center;justify-content:center;padding:clamp(12px,4vw,24px);background:#0e0f13eb}.server-status-modal[hidden]{display:none}.server-status-modal__panel{width:min(420px,100%);max-height:calc(100vh - 32px);overflow:auto;background:var(--panel);border:4px solid var(--border);color:var(--text);font-family:var(--ui-font-family)}.server-status-modal__header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border-bottom:4px solid var(--border)}.server-status-modal__header h2{margin:0;font-weight:700;color:var(--accent)}.server-status-modal__close{width:28px;height:28px;padding:0;border:2px solid var(--border);background:#141a24;color:var(--text);cursor:pointer}.server-status-modal__content{display:grid;gap:0}.server-status-modal__row{display:grid;grid-template-columns:minmax(90px,34%) minmax(0,1fr);gap:10px;padding:8px 12px;border-bottom:1px solid var(--border)}.server-status-modal__label{color:#ffffff73}.server-status-modal__value{min-width:0;overflow-wrap:anywhere}.server-status-modal__players{padding:10px 12px 12px}.server-status-modal__players-title{margin-bottom:8px;color:var(--accent);font-weight:700}.server-status-modal__player{display:flex;justify-content:space-between;gap:10px;padding:5px 0;border-top:1px solid rgba(255,255,255,.08)}.server-status-modal__player span:last-child,.server-status-modal__empty{color:#ffffff73}.server-status-modal__player span.is-dead{color:#ff4040bf}
