/* Map-only adapter; common heading/output/panel styling comes from shared workspace. */
.ah-builder.my-town #builder{display:grid;grid-template-columns:minmax(0,1fr);gap:24px}
.ah-builder.my-town #builder .builder-play-area{display:flex;overflow:auto;overscroll-behavior:contain}
.ah-builder.my-town #builder #town-map{width:max(360px,min(100cqw,calc(100cqh * var(--town-ratio,1))));max-width:none;margin:auto;flex-shrink:0}
.ah-builder.my-town #builder .town-menu .heading{margin:0 0 8px}
.ah-builder.my-town #builder .town-menu h1{font-size:26px;letter-spacing:-.6px;margin:4px 0}
.ah-builder.my-town #builder .mode-row{gap:8px;margin-bottom:10px}
.ah-builder.my-town #builder .mode-row h2{margin:0}
.ah-builder.my-town #builder #route-status{margin:8px 0;line-height:1.4}
.ah-builder.my-town #builder #place-options{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;max-height:none;min-height:0;overflow:visible;align-content:start;margin:0 0 8px}
.ah-builder.my-town #builder #place-options button{justify-content:center;min-width:0;min-height:68px;padding:6px 2px;gap:3px;font-size:14px;line-height:1.25;overflow-wrap:anywhere}
.ah-builder.my-town #builder #place-options svg{width:36px;height:36px;flex-shrink:0}
.ah-builder.my-town #builder .builder-actions{gap:8px;flex-wrap:nowrap;margin-top:8px}
.ah-builder.my-town #builder .builder-actions>.ah-button{flex:1;min-width:0;justify-content:center}
@media(min-width:740px){
 .ah-builder.my-town #builder{grid-template-columns:minmax(0,1fr) minmax(350px,42%);gap:16px;padding:10px 16px}
 .ah-builder.my-town #builder .mode-row,.ah-builder.my-town #builder .builder-actions,.ah-builder.my-town #builder #remove{flex-shrink:0}
}

/* Height compacts spacing; width alone chooses the two-column layout. */
.town-mode-controls{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.ah-builder.my-town #builder .mode-row{flex-wrap:wrap}
.ah-builder.my-town #builder .mode-row h2{font-size:18px}
.ah-builder.my-town #builder .pantry{padding:10px}
.ah-builder.my-town #builder .hint{margin:0 0 8px;font-size:14px;line-height:1.4}
@media(min-width:740px) and (max-height:700px){.ah-builder.my-town #builder .pantry{padding:8px}}

/* Shared panel-workspace owns the single scrolling choices/sentence column. */
.ah-builder.my-town #builder.panel-workspace #place-options,
.ah-builder.my-town #builder.panel-workspace #build-tools,
.ah-builder.my-town #builder.panel-workspace #route-tools{height:auto;max-height:none;overflow:visible;flex:none}
.ah-builder.my-town #builder.panel-workspace .town-menu>.heading{display:none}
.ah-builder.my-town #builder.panel-workspace .builder-output{overflow-wrap:anywhere}
/* Match the centered Builder prompt row without implying a playback action. */
.ah-builder.my-town #builder .town-workspace>.heading{text-align:center}
.ah-builder.my-town #builder .town-workspace .question{min-height:var(--ah-control-size);display:flex;align-items:center;justify-content:center}

/* One-command map toolbar; no CreativeBuilder editing/gesture assumptions. */
.ah-builder.my-town #builder .builder-play-area{position:relative}
#town-tools{position:absolute;right:10px;top:50%;transform:translateY(-50%);z-index:20;display:flex;flex-direction:column;gap:6px}

/* Keep all six map tools reachable when the stage is shorter than the rail. */
#town-tools{max-height:calc(100% - 20px);overflow-y:auto;overscroll-behavior:contain;padding:3px}
#town-tools>.ah-button{flex-shrink:0}

/* Stay within the sentence row while its parent column (or phone page) scrolls. */
.ah-builder.my-town #builder .order .pronunciation-speaker{align-self:flex-start;position:sticky;top:8px;min-width:44px;min-height:44px;flex:0 0 44px;z-index:1}
