*{box-sizing:border-box}body{margin:0;background:#182629;color:#eef5ef;font:16px/1.6 system-ui,sans-serif}main{max-width:860px;margin:auto;padding:18px}header,form{display:flex;align-items:center;justify-content:space-between;gap:12px}a{color:#b6ded0}small{letter-spacing:.18em}button,input{font:inherit;padding:9px 14px;border-radius:8px;border:1px solid #74978f}button{background:#b6ded0;color:#162a28;cursor:pointer;margin:3px}output{display:block;color:#f2d39b}form[hidden],section[hidden]{display:none}
#account,#outfit{flex-wrap:wrap}#outfit label{flex-basis:100%}#account details{flex-basis:100%}#account details label{display:block;margin:.5em 0}#account details input{display:block;max-width:100%}

#world-camera canvas{display:block;width:100%;height:auto;border-radius:8px;margin-bottom:.5em}#world-camera label{display:inline-flex;align-items:center;gap:.4em;margin:.3em}#world-camera input[type=number]{width:5.5em}

#account,#join,.appearance-form{display:flex;flex-direction:column;align-items:stretch;gap:14px;background:#213639;border:1px solid #46645e;border-radius:12px;padding:20px;margin:18px 0}#account label{display:flex;flex-direction:column;gap:6px}input{max-width:100%}input[type=file]{width:100%;margin-top:6px}label small{display:block;color:#b4c8c1;font-size:13px;letter-spacing:normal}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}#character-count{font-size:16px;font-weight:normal;color:#b4c8c1}.character-card{padding:18px;border:1px solid #46645e;border-radius:12px;margin:12px 0;background:#213639}.character-card h3{margin:0}.character-card p{margin:6px 0 12px;color:#b4c8c1}.secondary{background:transparent;color:#d3e1db}#roster-editor{padding:16px;border:1px solid #b6ded0;border-radius:12px}.reset-choice{font-size:14px}.appearance-help{color:#b4c8c1;font-size:14px}#new-appearance label{display:block;margin-top:14px}button:disabled{opacity:.5;cursor:wait}[hidden]{display:none!important}@media(max-width:550px){.section-heading{align-items:flex-start}.character-card button{display:block;width:100%;margin:8px 0}}

#movement-help{font-size:14px;color:#b4c8c1}kbd{display:inline-block;padding:1px 7px;border:1px solid #74978f;border-radius:4px;color:#eef5ef;background:#213639}#keyboard-status{font-size:14px;color:#f2d39b;min-height:1.4em}

#chat-panel{margin:24px 0;padding:18px;border:1px solid #46645e;border-radius:12px;background:#213639}#chat-panel h2{margin:0}.chat-help{font-size:14px;color:#b4c8c1}#chat-messages{height:250px;overflow:auto;background:#182629;border-radius:8px;padding:12px;overflow-anchor:none}.chat-message{padding:8px 0;border-bottom:1px solid #304547}.chat-meta{display:flex;align-items:center;gap:12px;color:#b6ded0}.chat-meta time{font-size:12px;color:#a7bcb5}.chat-message p{white-space:pre-wrap;overflow-wrap:anywhere;margin:4px 0}#chat-form{display:flex;flex-direction:column;align-items:stretch;margin-top:12px}#chat-input{width:100%;resize:vertical;min-height:65px;max-height:200px;font:inherit;padding:10px;border:1px solid #74978f;border-radius:8px;background:#eef5ef;color:#182629}.chat-toolbar{display:flex;justify-content:space-between;align-items:center}#chat-count,#chat-status{font-size:14px;color:#b4c8c1}#chat-status{min-height:1.4em;margin-bottom:0}

.world-stage{position:relative}.world-stage canvas{margin-bottom:0!important}#speech-bubbles{position:absolute;inset:0;pointer-events:none;overflow:hidden}.speech-bubble{position:absolute;transform:translate(-50%,-100%);max-width:min(250px,70%);min-width:80px;padding:8px 12px;border-radius:12px;background:#f3f7f2;color:#172b29;box-shadow:0 3px 12px #0006;font-size:13px;line-height:1.4}.speech-bubble:after{content:"";position:absolute;bottom:-7px;left:50%;border:8px solid transparent;border-top-color:#f3f7f2;border-bottom:0}.speech-bubble strong{display:block;font-size:11px;color:#4a6c61;margin-bottom:3px}.speech-bubble span{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;white-space:pre-wrap;overflow-wrap:anywhere}

.world-stage{position:relative}.world-stage canvas.world-scene{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.world-stage canvas:not(.world-scene){position:relative;background:transparent}.world-stage #speech-bubbles{z-index:2}

#world-camera canvas[hidden]{display:none}
#unit-query{flex-wrap:wrap;justify-content:flex-start;margin-top:.5em}
.email-auth-dialog{width:min(500px,calc(100% - 28px));max-height:90svh;overflow:auto;padding:20px;background:#213639;color:#eef5ef;border:1px solid #74978f;border-radius:12px}.email-auth-dialog::backdrop{background:#0e171ad9}.email-auth-heading,.email-auth-actions,.email-auth-entry{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.email-auth-heading{justify-content:space-between}.email-auth-heading h2{margin:0}.email-auth-close{min-width:44px;min-height:44px}.email-auth-form,.email-auth-form label{display:flex;flex-direction:column;align-items:stretch;gap:8px}.email-auth-form p{font-size:14px}.email-auth-current,.email-auth-status{overflow-wrap:anywhere}.email-auth-status.error{color:#f6b6a6}
