.town-layout { display:grid; grid-template-columns:minmax(0, 2.3fr) minmax(14rem,1fr); gap:1rem; align-items:start; }
.town-stage,.town-guide { border:1px solid #c9d7d1; border-radius:1rem; background:#fff; overflow:hidden; }
.town-stage-header { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:.4rem 1rem; padding:.85rem 1rem; background:#e8f0ec; color:#213f39; }
.town-stage-header span { font-size:.85rem; }
.town-stage canvas { display:block; width:100%; height:auto; image-rendering:pixelated; cursor:crosshair; touch-action:manipulation; }
.town-stage [hidden],.town-dialog [hidden] { display:none; }
.town-stage canvas:focus-visible { outline:3px solid #e6bd60; outline-offset:-4px; }
.town-stage p { padding:0 1rem; font-size:.9rem; }
.town-controls,.town-directions,.town-actions { display:flex; flex-wrap:wrap; gap:.45rem; }
.town-controls { padding:0 1rem; justify-content:space-between; }
.town-layout button,.town-dialog a { min-height:44px; min-width:44px; padding:.55rem .8rem; border:1px solid #aebfb5; border-radius:.5rem; background:#f2f6f2; color:#172e31; font:inherit; cursor:pointer; }
.town-layout button[aria-pressed=true] { background:#304d46; color:#fff; }
.town-status { min-height:2.5em; color:#304d46; }
.town-guide { padding:1rem; }
.town-guide h2 { margin-top:0; }
.town-guide ul { list-style:none; padding:0; }
.town-guide li { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:.35rem .6rem; padding:.7rem 0; border-top:1px solid #e1e8e4; }
.town-guide li span { color:#52625c; font-size:.83rem; }
.town-shared { margin-top:1rem; padding-top:1rem; border-top:1px solid #e1e8e4; }
.town-shared h3 { margin:0; }
.town-shared p { font-size:.9rem; }
.town-shared [hidden] { display:none; }
.town-dialog { width:min(90%,26rem); max-height:90vh; padding:1.3rem; border:1px solid #b5c5be; border-radius:1rem; color:#172e31; }
.town-dialog::backdrop { background:#142b36b3; }
.town-dialog a { display:inline-flex; align-items:center; }
.town-dialog form { margin-top:.75rem; }
.town-dialog [data-town-messages] { max-height:min(32vh,20rem); overflow:auto; list-style:none; margin:.5rem 0; padding:.65rem; border:1px solid #d8e3dc; border-radius:.5rem; }
.town-dialog [data-town-messages] li { display:grid; gap:.1rem; margin-bottom:.6rem; overflow-wrap:anywhere; }
.town-dialog [data-town-messages] span { white-space:pre-wrap; }
.town-dialog .town-message-link { min-width:0; min-height:2rem; padding:0; border:0; background:none; font-size:.83rem; }
.town-dialog [data-town-compose] textarea { display:block; width:100%; box-sizing:border-box; margin:.35rem 0; padding:.5rem; font:inherit; }
.town-dialog [data-town-thread-status] { min-height:1.25em; }
@media(max-width:840px){.town-layout { grid-template-columns:minmax(0,1fr); }}
[data-chat-theme=dark] :is(.town-stage,.town-guide,.town-dialog) { background:var(--chat-surface); color:var(--ink); border-color:var(--line); }
[data-chat-theme=dark] :is(.town-stage-header,.town-layout button,.town-dialog a:not(.town-message-link)) { background:var(--chat-raised); color:var(--ink); border-color:var(--line); }
[data-chat-theme=dark] .town-layout button[aria-pressed=true] { background:#a4ded3; color:#12232b; }
[data-chat-theme=dark] :is(.town-guide li,.town-shared,.town-dialog [data-town-messages]) { border-color:var(--line); }
[data-chat-theme=dark] :is(.town-status,.town-guide li span) { color:var(--muted); }
