:root{font:16px/1.5 system-ui,sans-serif;color:#202932;background:#f4f6f8}*{box-sizing:border-box}body{margin:0;padding:24px}main{max-width:920px;margin:auto}header{border-bottom:1px solid #ccd4dc;margin-bottom:20px}h1{font-size:25px}h1 small{font-size:14px;font-weight:400;color:#596673}h2{font-size:18px}h3{font-size:15px}section{background:white;border:1px solid #d7dfe6;border-radius:8px;padding:20px;margin-bottom:16px}label{display:block;margin-bottom:12px}input{display:block;padding:10px;border:1px solid #a9b5c0;border-radius:4px;width:100%;font:inherit}button{border:0;border-radius:4px;padding:10px 16px;background:#2464a4;color:white;font:inherit;cursor:pointer}button:disabled{opacity:.5;cursor:wait}.secondary{background:#536170}#error{color:#a11b24;min-height:24px}#status,small{color:#536170}.map-layout{display:grid;grid-template-columns:190px minmax(0,1fr);gap:20px}aside{border-right:1px solid #e0e5eb;padding-right:14px}ul{padding-left:20px;overflow-wrap:anywhere}#messages{height:320px;overflow:auto;border:1px solid #d7dfe6;padding:12px;background:#fafbfd;overflow-wrap:anywhere}#messages p{margin:0 0 8px}.system{color:#667787;font-size:14px}#chat-form{display:flex;gap:10px;margin-top:12px;align-items:end}.chat-label{flex:1;margin:0}#characters button{margin-bottom:12px;width:100%;text-align:left}[hidden]{display:none!important}@media(max-width:600px){body{padding:12px}.map-layout{grid-template-columns:1fr}aside{border-right:0;border-bottom:1px solid #e0e5eb}#messages{height:260px}h1 small{display:block}}
/* Game HUD shares the editor's quiet green palette. */
:root{color:#24352c;background:#f2f4ef}button{background:#32634a}input:focus-visible,button:focus-visible{outline:3px solid #92b797;outline-offset:2px}.playing{padding:0;overflow:hidden}.playing main{max-width:none}.playing header{position:absolute;top:0;left:0;right:0;height:65px;margin:0;padding:0 24px;display:flex;align-items:center;gap:24px;background:#fbfcf8;border-bottom:1px solid #d6dfd2;z-index:4}.playing h1{font-size:20px;white-space:nowrap}.playing h1 small{font-size:12px;margin-left:12px}.playing #status{font-size:12px;margin-right:110px}.playing #logout{position:absolute;top:15px;right:20px;z-index:5;font-size:12px;padding:8px 12px;background:#e7ece3;color:#344b3b}.playing #error{position:absolute;top:70px;left:50%;transform:translateX(-50%);z-index:10;background:#fff8ed;border-radius:8px;padding:8px 16px;max-width:90%;font-size:13px;box-shadow:0 3px 12px #263d2b16}.playing #error:empty{display:none}#map-panel{position:absolute;inset:65px 0 0;margin:0;padding:0;border:0;border-radius:0;overflow:hidden;background:#f1f3ef}#game-canvas,#bubbles{position:absolute;inset:0}#game-canvas canvas{display:block;cursor:crosshair}#bubbles{pointer-events:none;z-index:2}.map-heading{position:absolute;top:24px;left:28px;pointer-events:none}.eyebrow{font-size:10px;letter-spacing:2px;color:#6d7e69}.map-heading h2{font-size:21px;margin:5px 0}.map-heading p{font-size:12px;color:#64735e;margin:0}.roster{position:absolute;top:24px;right:24px;width:172px;max-height:35%;overflow:auto;padding:12px 16px;border:1px solid #d8e1d0;border-radius:12px;background:#fbfcf4ec;box-shadow:0 4px 20px #2b3a2810}.roster h3{margin:0 0 8px;font-size:12px}.online-dot{display:inline-block;width:6px;height:6px;background:#4b8c54;border-radius:100%;margin-right:5px}.roster ul{list-style:none;padding:0;margin:0 0 8px;font-size:12px;max-height:100px;overflow:auto}.roster small{font-size:11px;color:#7a8573}.chat-panel{position:absolute;bottom:20px;left:24px;width:340px;max-width:calc(100% - 48px);z-index:3;border:1px solid #d8dfd2;border-radius:12px;background:#fcfdf8ee;box-shadow:0 8px 24px #2f422519;overflow:hidden;backdrop-filter:blur(8px)}.chat-heading{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-bottom:1px solid #e3e7dd;font-size:12px;font-weight:600}.chat-heading small{font-size:10px;font-weight:400;color:#7a8476}#messages{height:145px;padding:12px 14px;border:0;background:transparent;font-size:12px;overscroll-behavior:contain;scrollbar-width:thin}#messages p{margin:0 0 7px}.system{font-size:11px;color:#8a9382}#chat-form{margin:0;padding:9px;gap:7px;border-top:1px solid #e3e7dd;align-items:center}#chat{min-width:0;padding:8px 10px;font-size:12px;border:1px solid #dce2d4;border-radius:6px;background:#fff}#chat-form button{white-space:nowrap;font-size:12px;padding:8px 12px;border-radius:6px}#new-messages{position:absolute;right:10px;bottom:56px;padding:5px 9px;font-size:11px;border-radius:20px}.speech-bubble{position:absolute;transform:translate(-50%,-100%);max-width:230px;width:max-content;white-space:pre-wrap;overflow-wrap:anywhere;padding:9px 13px;background:#fffef8;color:#304031;border:1px solid #c3cebc;border-radius:12px;font:13px/1.45 system-ui,sans-serif;box-shadow:0 3px 12px #20381920}.speech-bubble:after{content:'';position:absolute;bottom:-5px;left:calc(50% - 4px);width:8px;height:8px;background:#fffef8;border-bottom:1px solid #c3cebc;border-right:1px solid #c3cebc;transform:rotate(45deg)}
@media(max-width:680px){.playing header{padding:0 14px;height:58px}.playing h1 small,.playing #status{display:none}.playing #logout{top:13px;right:14px}#map-panel{top:58px}.map-heading{top:15px;left:16px}.map-heading h2{font-size:17px}.map-heading p{font-size:10px}.roster{top:14px;right:12px;width:112px;padding:8px;max-height:125px}.roster h3,.roster ul{font-size:10px}.roster small{display:none}.chat-panel{left:12px;bottom:12px;max-width:calc(100% - 24px);width:300px}#messages{height:108px}.speech-bubble{font-size:12px;max-width:180px;padding:7px 10px}}

.walk-target{position:absolute;transform:translate(-50%,-50%);border:2px solid #fffbed;border-radius:50%;box-shadow:0 0 0 2px #477947,0 0 10px #fff8;pointer-events:none;opacity:.9}.walk-target:after{content:'';position:absolute;inset:25%;border:1px solid #fffbed;border-radius:50%}.walk-target.pending{opacity:.5}.walk-target.rejected{border-color:#e57967;box-shadow:0 0 0 2px #8f3d37}
.map-heading{max-width:calc(100% - 230px)}
@media(max-width:680px){.map-heading{max-width:calc(100% - 140px)}.map-heading p{line-height:1.5}}

/* Minimal controls for testing generic NPC modules. */
.npc-panel{position:absolute;left:20px;top:112px;z-index:4;width:min(290px,calc(100% - 40px));padding:12px;background:rgba(20,34,29,.94);color:#fff;border:1px solid #778d66;border-radius:8px;font-size:13px}
.npc-panel button{font-size:12px;padding:7px;margin-top:6px}.npc-panel p{margin:8px 0}.npc-panel [hidden]{display:none}
@media(max-width:600px){.npc-panel{top:100px;left:10px;width:205px;padding:8px;font-size:11px}}

#create-form{display:flex;flex-direction:column;align-items:stretch;gap:14px;max-width:460px}#character-preset-preview{height:320px;min-width:240px;background:#e2e9df;border-radius:8px;overflow:hidden}#character-preset-preview canvas{display:block}#character-preset-message{font-size:13px;line-height:1.6}#create-form select{max-width:100%;width:100%}

/* Selection reuses the existing game UI and the Studio character renderer. */
.character-selection{display:grid;grid-template-columns:minmax(220px,1fr) minmax(240px,1fr);gap:28px;align-items:center}
.character-preview-shell{position:relative;min-width:0}
#selected-character-preview{height:360px;background:#e2e9df;border:1px solid #d1dbc9;border-radius:8px;overflow:hidden}
#selected-character-preview canvas{display:block}
.look-arrow{position:absolute;z-index:2;top:50%;width:42px;height:42px;padding:0;border-radius:50%;transform:translateY(-50%);background:#fffef5dd;color:#315d48;border:1px solid #93aa95;box-shadow:0 3px 12px #263d2b20;font:600 32px/36px system-ui,sans-serif}
.look-arrow:hover:not(:disabled){background:#fff}.look-arrow:disabled{opacity:.35;cursor:default}.look-arrow-left{left:12px}.look-arrow-right{right:12px}
.selected-look-name{position:absolute;z-index:2;left:50%;bottom:12px;max-width:calc(100% - 100px);transform:translateX(-50%);padding:5px 11px;border-radius:16px;background:#fffef5e8;color:#344b3b;border:1px solid #c8d2c2;font-size:12px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.character-details{display:flex;flex-direction:column;gap:14px;min-width:0}
.character-details p,.character-details label{margin:0}.character-details small{font-size:12px}
#characters button{margin:0;background:#edf1e9;color:#344b3b;border:2px solid transparent;font-weight:600;overflow-wrap:anywhere}
#characters button[aria-pressed=true]{border-color:#32634a;background:#e3ecdb}
#channel-select{display:block;width:100%;margin-top:6px;padding:10px;font:inherit;color:inherit;background:white;border:1px solid #a9b5a1;border-radius:4px}
select:focus-visible{outline:3px solid #92b797;outline-offset:2px}
@media(max-width:600px){.character-selection{grid-template-columns:1fr;gap:18px}#selected-character-preview{height:260px}.look-arrow{width:38px;height:38px;font-size:28px}.playing h1{font-size:16px}}
