/* Shared room / neighborhood shell. Keep the renderer's 16:9 coordinate space. */
body.world-ui {
  --world-gap: 12px;
  --world-width: min(calc(100vw - 24px), calc(177.7778vh - 42.6667px));
  --hud-surface: #251e2bf5;
  --hud-border: #ba9dcb40;
  --hud-text: #f4edf7;
}
@supports (height: 100dvh) {
  body.world-ui { --world-width: min(calc(100vw - 24px), calc(177.7778dvh - 42.6667px)); }
}
.world-ui .room-viewport { padding: var(--world-gap); place-items: center; }
.world-ui .canvas-shell { width: var(--world-width); height: auto; aspect-ratio: 16 / 9; border: 1px solid #ba9dcb66; border-radius: 10px; }
.world-ui :is(.brand-logo,.floating-tools,.right-orb-rail,.app-footer) { display: none !important; }
.world-ui .map-page, .world-ui .map-page.has-village { background: transparent; }
.world-ui .map-page .map-page-shell { padding: var(--world-gap); display: grid; place-items: center; }
.world-ui .map-page .map-page-layout { width: var(--world-width); height: auto; aspect-ratio: 16 / 9; margin: 0; filter: none; }
.world-ui .map-board { border-radius: 10px; border: 1px solid #ba9dcb66; }
.world-ui.is-map-open .canvas-shell { visibility: hidden; }
#worldHud { position: fixed; inset: 24px; z-index: 35; pointer-events: none; color: var(--hud-text); }
#worldHud [hidden], .world-ui .quick-chat [hidden] { display: none !important; }
#worldHud button, #worldHud a, #worldHud select { pointer-events: auto; }
#worldHud button { cursor: pointer; }
#worldHud button:disabled { cursor: not-allowed; opacity: .5; }
#worldHud svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.world-location,.world-utilities button,.world-dock,.world-chat-toggle>button,.world-group-drawer,.world-restore {
  border: 1px solid var(--hud-border); background: var(--hud-surface); color: var(--hud-text); box-shadow: 0 6px 24px #100b1540; border-radius: 12px;
}
.world-location { position: absolute; top: 0; left: 0; width: 164px; max-width: calc(100% - 70px); padding: 8px 10px; display: grid; gap: 2px; text-align: left; }
.world-location small { font-size: 10px; letter-spacing: .08em; color: #c5b8cc; }
.world-location span { overflow: hidden; text-overflow: ellipsis; text-wrap: balance; font-size: 12px; line-height: 1.35; }
.world-utilities { position: absolute; right: 0; top: 0; display: flex; flex-direction: column; gap: 6px; }
.world-utilities button { width: 40px; height: 40px; font-size: 20px; }
.world-dock { position: absolute; left: 0; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; width: 64px; max-height: calc(100% - 160px); overflow-y: auto; scrollbar-width: thin; gap: 2px; padding: 3px; pointer-events: auto; }
.world-dock button { display: grid; justify-items: center; gap: 3px; flex: 0 0 auto; min-width: 0; min-height: 48px; padding: 6px 3px; background: transparent; color: inherit; border: 1px solid transparent; border-radius: 8px; font-size: 10px; }
#worldHud .world-dock svg { width: 19px; height: 19px; }
#worldHud [data-world-group][aria-expanded="true"], .world-dock button:hover { background: #594164; border-color: #bea4ca66; }
.world-chat-toggle { position: absolute; left: 0; bottom: 0; }
#worldHud .world-chat-toggle>button { position: static; display: grid; grid-template-columns: 1fr; gap: 3px; justify-items: center; min-width: 0; width: 64px; height: 52px; min-height: 44px; transform: none; padding: 6px; font-size: 11px; }
.world-chat-open .world-chat-toggle { visibility: hidden; }
#worldHud .world-chat-toggle>button::after { content: 'Chat'; color: inherit; font-size: 11px; white-space: nowrap; }
#worldHud .world-chat-toggle>button.is-active { background: #594164; color: #f4edf7; }
.world-group-drawer { position: absolute; right: 0; top: 64px; width: min(370px,100%); max-height: calc(100% - 150px); padding: 14px; overflow: auto; pointer-events: auto; scrollbar-width: thin; }
.world-group-drawer>header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.world-group-drawer h2 { font-size: 17px; margin: 0; }
.world-group-drawer>header button { width: 36px; height: 36px; background: transparent; border: 1px solid var(--hud-border); color: inherit; border-radius: 8px; font-size: 22px; }
.world-group-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.world-group-options :is(p,small,.world-room-tools,.world-lot-tools,.world-neighborhood-options,.world-site-links,.world-expressions) { grid-column: 1 / -1; }
.world-group-options>p { margin: 0 0 6px; font-size: 13px; color: #d7c8df; }
#worldHud .world-option { position: static; display: flex; align-items: center; justify-content: flex-start; gap: 9px; transform: none; min-width: 0; width: 100%; min-height: 48px; height: auto; padding: 10px; margin: 0; border: 1px solid var(--hud-border); border-radius: 8px; background: #101014; color: #ded7e2; box-shadow: none; text-align: left; text-decoration: none; }
#worldHud .world-option::after { font-size: 13px; font-weight: 750; line-height: 1.25; color: inherit; content: attr(title); }
#worldHud .world-option[data-mode="paint"] { background: #ffe2f1; color: #a12968; }
#worldHud .world-option:hover { border-color: #c7a9da; }
#worldHud .world-option.room-back-button { display: flex !important; }
#worldHud .world-option.room-back-button[hidden] { display: none !important; }
#worldHud .world-option.room-back-button.world-outdoor-hidden { display: none !important; }
#worldHud .world-option.room-back-button>span { display: none; }
.world-site-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
#worldHud .world-site-links .world-option { width: auto; min-height: 36px; padding: 7px 10px; font-size: 12px; background: transparent; }
#worldHud .world-site-links .world-option::after { content: none; }
.world-expressions { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.world-expressions button { min-height: 44px; }
.world-ui .floating-drawer, .world-ui .tool-panel, .world-ui .debug-panel {
  left: auto !important; right: 24px !important; top: 88px !important; bottom: auto !important;
  width: min(420px,calc(100vw - 48px)) !important; min-width: 0; height: auto !important;
  max-height: calc(100dvh - 190px); min-height: 0; z-index: 36; transform: none; border-radius: 12px;
}
.world-ui .floating-drawer { height: min(700px,calc(100dvh - 190px)) !important; }
.world-ui :is(.floating-drawer,.tool-panel,.debug-panel):not(.is-open) { visibility: hidden; }
.world-ui :is(.floating-drawer-resize-handle,.floating-drawer-reset-button,.floating-drawer-grip,.tool-panel-resize-handle,.tool-panel-reset-button,.tool-panel-grip) { display: none; }
.world-ui :is(.floating-drawer-chrome,.tool-panel-chrome) { cursor: default; }
.world-panel-back { align-self: center; flex: 0 0 auto; border: 1px solid #cab9d1; border-radius: 7px; padding: 6px 8px; background: #f3edf7; color: #4a3754; cursor: pointer; font-size: 12px; }
.world-ui #quickChat { display: none !important; position: fixed; z-index: 36; left: 24px; right: auto; bottom: 105px; width: min(460px,calc(100vw - 48px)); height: auto; max-height: calc(100dvh - 190px); overflow: auto; pointer-events: auto; padding: 12px; border: 1px solid var(--hud-border); border-radius: 12px; background: var(--hud-surface); }
.world-ui #quickChat.is-open { display: block !important; }
.world-ui .quick-chat-info { display: grid; position: static; width: auto; min-height: 0; background: transparent; padding: 0 40px 10px 0; border: 0; box-shadow: none; gap: 3px; }
.world-ui .quick-chat-info strong { display: none; }
.world-ui .quick-chat-channel-label { color: #f4edf7; font-size: 14px; }
.world-ui .quick-chat-status { min-height: 0; }
.world-ui .quick-chat-form, .world-ui .quick-chat.is-open .quick-chat-form { position: static; width: auto; display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; gap: 6px; padding: 0; background: transparent; border: 0; box-shadow: none; transform: none; }
.world-ui .quick-chat-form>input { width: 100%; }
.world-ui #worldSpeechToggle { border: 1px solid var(--hud-border); border-radius: 7px; padding: 6px 8px; background: transparent; color: #eadced; font-size: 12px; min-height: 42px; cursor: pointer; }
.world-ui .quick-chat-emote-picker { grid-column: 1 / -1; grid-template-columns: repeat(4,minmax(0,1fr)); order: 5; padding: 8px 0 0; background: transparent; }
.world-ui .quick-chat-emote-picker .speech-emote-button { min-height: 38px; }
.world-ui .quick-chat-close-button { display: block; position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; background: transparent; border: 1px solid var(--hud-border); border-radius: 8px; color: #f4edf7; cursor: pointer; }
.world-ui :is(.quick-chat-send-button,.quick-chat-log-button) { padding: 6px 9px; min-width: 0; }
.world-ui .drawer-chat-emote-picker { display: none; }
#worldHud .map-info-panel { position: static; width: auto; max-height: none; padding: 0; margin: 0; background: transparent; color: #f4edf7; border: 0; box-shadow: none; }
#worldHud .map-info-panel :is(strong,p,span) { color: inherit; }
#worldHud .map-current-house { display: none; }
#worldHud .map-wallet, #worldHud .map-selection { background: #372b40; padding: 12px; border: 0; border-radius: 8px; }
#worldHud .map-wallet { display: flex; justify-content: space-between; }
#worldHud .map-selection p { font-size: 13px; }
#worldHud .map-primary-button { min-height: 44px; }
#worldHud .map-page-header { position: static; display: grid; width: auto; height: auto; padding: 0; background: transparent; border: 0; color: inherit; box-shadow: none; }
#worldHud .map-page-header :is(h1,.map-onboarding-card,.map-neighborhood-strip) { display: none; }
#worldHud .map-neighborhood-picker { display: grid; width: 100%; max-width: none; margin: 0; }
#worldHud .map-neighborhood-picker select { width: 100%; }
#worldHud .map-close-button { position: static; width: auto; height: 44px; background: #594164; border: 1px solid var(--hud-border); border-radius: 8px; color: inherit; font-size: 14px; }
#worldHud .map-private-house-button { margin: 0; }
.world-neighborhood-options { display: grid; gap: 14px; }
#worldHud .village-toolbar { position: static; display: grid; gap: 12px; margin-top: 12px; }
#worldHud .village-view-switch { display: flex; flex-wrap: wrap; }
#worldHud .village-jump { display: grid; padding: 8px; color: #304c40; }
#worldHud .village-jump select { max-width: 100%; width: 100%; }
#worldHud .village-approach { display: block; }
#worldHud .house-exterior-editor { color: #f4edf7; }
#worldHud :is(.exterior-description,.exterior-save-note) { color: #d7c8df !important; }
.world-ui .village-bottom { bottom: 100px; justify-content: center; }
.world-ui .village-hint { display: none; }
.world-ui .village-touch { bottom: 90px; }
.world-ui .standee-walk-hint { display: none; }
.world-ui .room-presence-strip { position: fixed; top: 124px; right: 24px; left: auto; bottom: auto; width: 40px; max-width: 40px; max-height: calc(100dvh - 270px); flex-direction: column; flex-wrap: nowrap; overflow-y: auto; transform: none; padding: 0; gap: 8px; }
.world-ui .room-presence-avatar { flex: 0 0 auto; width: 36px; height: 36px; }
.world-controls-help { position: absolute; right: 0; bottom: 0; pointer-events: auto; }
.world-controls-help summary { display: grid; place-items: center; list-style: none; width: 40px; height: 40px; border: 1px solid var(--hud-border); border-radius: 10px; background: var(--hud-surface); color: var(--hud-text); cursor: pointer; font-size: 17px; }
.world-controls-help summary::-webkit-details-marker { display: none; }
.world-controls-help summary:focus-visible { outline: 2px solid #97e2d6; outline-offset: 3px; }
.world-controls-help>div { position: absolute; right: 0; bottom: 48px; width: min(260px,calc(100vw - 32px)); display: grid; gap: 10px; padding: 16px; border: 1px solid var(--hud-border); border-radius: 12px; background: #251e2bf5; font-size: 12px; box-shadow: 0 8px 28px #100a1840; }
.world-controls-help kbd { font: inherit; color: #e8c8f3; }
.world-ui .conversation-camera-badge { position: fixed; left: auto; top: auto; right: 24px; bottom: 78px; transform: none; max-width: 100px; padding: 7px; font-size: 10px; border-radius: 9px; }
.world-ui-quiet :is(.standee-walk-hint,.village-toolbar,.village-bottom,.village-touch,.room-presence-strip,.pocket-location-bar) { display: none !important; }
#worldHud.is-quiet>:not(.world-restore) { display: none !important; }
.world-restore { position: absolute; top: 0; right: 0; padding: 10px 14px; pointer-events: auto; }
.world-ui.is-news-open #worldHud, .world-ui.is-news-open #quickChat { display: none !important; }
@media(max-width:700px) {
  #worldHud { inset: max(12px,env(safe-area-inset-top)) 12px max(12px,env(safe-area-inset-bottom)); }
  .world-location { max-width: calc(100% - 104px); padding: 8px 10px; }
  .world-location span { font-size: 12px; }
  .world-dock { width: 56px; }
  .world-dock button { min-height: 44px; padding: 5px 2px; }
  .world-chat-toggle { bottom: 0; }
  #worldHud .world-chat-toggle>button { width: 56px; }
  .world-ui .room-presence-strip { right: 12px; top: 112px; }
  .world-ui .conversation-camera-badge { right: 12px; bottom: 64px; max-width: 80px; }
  .world-group-drawer { top: 62px; max-height: calc(100% - 220px); padding: 12px; width: min(420px,100%); }
  .world-ui .floating-drawer, .world-ui .tool-panel, .world-ui .debug-panel { top: 74px !important; right: 12px !important; width: calc(100vw - 24px) !important; max-height: calc(100dvh - 230px); }
  .world-ui .floating-drawer { height: calc(100dvh - 230px) !important; }
  .world-ui #quickChat { left: 12px; bottom: 144px; width: calc(100vw - 24px); max-height: calc(100dvh - 220px); }
  .world-ui .quick-chat-form { grid-template-columns: auto minmax(0,1fr) auto; }
  .world-ui .quick-chat-log-button { grid-column: 3; }
  .world-ui .quick-chat input[type="text"] { font-size: 16px; }
  .world-ui .standee-walk-hint { display: none; }
  .world-ui .village-bottom { bottom: 12px; }
  .world-ui .village-touch { bottom: 62px; right: 10px; }
}
@media(max-width:700px) and (orientation:portrait) {
  .world-ui .room-viewport, .world-ui .map-page .map-page-shell { padding-top: 80px; place-items: start center; }
}
@media(prefers-reduced-motion:reduce) {
  .world-ui :is(.floating-drawer,.tool-panel,.map-page,.quick-chat) { transition: none; }
}
/* Outdoor scenes give the landscape most of the screen. */
.is-map-open .world-location { padding: 8px 12px; }
.is-map-open .world-location small { display: none; }
.is-map-open .world-location span { font-size: 13px; }
.is-map-open .world-dock { padding: 3px; gap: 1px; border-radius: 10px; }
.is-map-open .world-dock button { min-width: 0; min-height: 45px; padding: 5px 3px; gap: 2px; font-size: 10px; }
.is-map-open #worldHud .world-dock svg { width: 18px; height: 18px; }
.is-map-open .world-utilities button { width: 36px; height: 36px; }
.is-map-open .pocket-location-bar { top: 16px; left: 50%; transform: translateX(-50%); padding: 4px; gap: 4px; border-radius: 9px; box-shadow: 0 3px 14px #253c3720; white-space: nowrap; }
.is-map-open .pocket-location-bar span { padding: 0 9px; font-size: 11px; }
.is-map-open .pocket-location-bar button { padding: 7px 10px; min-height: 32px; font-size: 12px; background: transparent; color: #3e574b; border: 0; }
.is-map-open .pocket-location-bar .property-view { background: #486353; color: #fff8e8; min-width: 54px; }
.is-map-open .village-bottom { bottom: 78px; }
.is-map-open .village-enter { padding: 9px 16px; font-size: 13px; }
.is-property-open .world-neighborhood-options :is(.village-toolbar,.map-neighborhood-picker,.map-private-house-button) { display: none; }
@media(pointer:fine) { .is-map-open .village-touch { display: none; } }
@media(max-width:700px) { .is-map-open .pocket-location-bar { top: 58px; right: auto; } .is-map-open .pocket-location-bar span { display: none; } }
/* Scene actions stay near the pointer without escaping the screen edge. */
.object-context-menu {
  position: fixed; z-index: 60; width: 246px; max-width: calc(100vw - 16px);
  max-height: calc(100dvh - 16px); overflow-y: auto; padding: 8px;
  border: 1px solid #b299bc80; border-radius: 14px;
  background: #211a2bf5; color: #f4edf5;
  box-shadow: 0 12px 38px #09060d80; backdrop-filter: blur(16px);
}
.object-context-menu[hidden], .object-context-menu button[hidden] { display: none; }
.object-context-menu.is-surface-menu { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.object-context-menu.is-surface-menu[hidden] { display: none; }
.object-context-menu .object-context-title {
  grid-column: 1 / -1; padding: 4px 8px 8px; color: #e4cbef;
  font-size: .84rem; font-weight: 700;
}
.object-context-menu button {
  display: flex; align-items: center; gap: 9px; min-height: 40px; padding: 8px;
  color: #f6edf8; font-size: .84rem; border-radius: 8px;
}
.object-context-menu button svg { width: 19px; height: 19px; flex: 0 0 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.object-context-menu button:hover { background: #b58aca30; }
.object-context-menu button:focus-visible { outline: 2px solid #84dfd0; outline-offset: -2px; background: #84dfd020; }
.object-context-menu [data-object-context-action="paint"] { color: #ffc1e4; }
.object-context-hint { grid-column: 1 / -1; padding: 8px 6px 2px; color: #c3b6cc; font-size: .65rem; line-height: 1.4; }
.npc-conversation { display: grid; gap: 8px; margin: 8px 0; color: #f4edf7; }
.npc-chat-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.npc-chat-tools label { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 11px; }
.npc-chat-tools :is(select,button) { border: 1px solid #84648e; border-radius: 7px; padding: 6px 8px; background: #302337; color: #f4edf7; font: inherit; font-size: 12px; }
.npc-chat-tools button { cursor: pointer; }
.npc-chat-tools :is(select,button):focus-visible { outline: 2px solid #97e2d6; outline-offset: 2px; }
.npc-transcript { max-height: 145px; overflow-y: auto; padding: 2px 10px; border-left: 2px solid #bf8bd2; scrollbar-width: thin; }
.npc-transcript p { margin: 7px 0; font-size: 13px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.npc-transcript strong { display: block; color: #dcb2ee; font-size: 11px; }
.npc-connection { margin: 0; color: #cbbcd3; font-size: 11px; line-height: 1.4; }
.npc-connection.is-error { color: #ffcfb8; }
.npc-conversation [hidden] { display: none !important; }
.npc-conversation[hidden], .world-ui #quickChatLogButton[hidden] { display: none !important; }

/* A reply bar belongs below the cast; menus and history open independently. */
.world-ui #quickChat { left: 50%; right: auto; bottom: max(12px,env(safe-area-inset-bottom)); width: min(640px,calc(100vw - 192px)); transform: translateX(-50%); padding: 8px 10px; overflow: visible; max-height: none; background: #241a2df2; box-shadow: 0 8px 28px #100a1840; }
.world-ui #quickChat.is-open { display: grid !important; grid-template-columns: minmax(0,1fr) auto; gap: 5px 12px; }
.world-ui .quick-chat-info { grid-column: 1; grid-row: 1; padding: 0; display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.world-ui .quick-chat-channel-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: #e8c8f3; }
.world-ui .quick-chat-status { font-size: 10px; color: #c8b8ce; white-space: nowrap; }
.world-ui .quick-chat-status:not(.is-error):not([data-locked-message]) { display: none; }
.world-ui .quick-chat-status:is(.is-error,[data-locked-message]) { position: absolute; left: 0; bottom: calc(100% + 8px); max-width: 100%; padding: 6px 10px; border-radius: 8px; background: #251e2bf5; white-space: normal; }
.world-ui .quick-chat-form { grid-column: 1 / -1; grid-row: 2; }
.world-ui #quickChat .quick-chat-form > input { background: #ffffff0c; color: #fff5fc; border: 1px solid #b49bc344; border-radius: 8px; height: 36px; min-height: 36px; font-size: 14px; padding: 6px 10px; }
.world-ui #quickChat :is(#worldSpeechToggle,.quick-chat-send-button,.quick-chat-log-button) { min-height: 36px; font-size: 12px; padding: 6px 8px; }
.world-ui .quick-chat-form > input::placeholder { color: #baa8c3; }
.world-ui .quick-chat-form > input:focus { outline: 2px solid #d7a4e8; outline-offset: 1px; }
.world-ui #worldSpeechToggle.has-style { background: #745284; border-color: #d6ace8; }
.world-ui .quick-chat-send-button { background: #d3b0e1; color: #251b2c; border: 0; border-radius: 8px; }
.world-ui .quick-chat-log-button { color: #dfcfe7; background: transparent; border: 1px solid #b49bc344; border-radius: 8px; font-size: 12px; }
.world-ui .quick-chat-close-button { top: 6px; right: 7px; width: 28px; height: 28px; border: 0; }
.world-ui .quick-chat-emote-picker { position: absolute; left: 0; bottom: calc(100% + 10px); width: min(420px,calc(100vw - 32px)); padding: 12px; border: 1px solid #b89acb66; border-radius: 12px; background: #251e2bf7; box-shadow: 0 12px 32px #100a1866; max-height: min(310px,55dvh); overflow-y: auto; z-index: 2; }
.world-ui .npc-conversation { grid-column: 2; grid-row: 1; margin: 0 26px 0 0; display: flex; justify-content: flex-end; align-items: baseline; gap: 10px; min-width: 0; }
.npc-chat-options { position: relative; }
.npc-chat-options > summary { cursor: pointer; font-size: 11px; color: #d9c7e1; white-space: nowrap; }
.npc-chat-options > summary:focus-visible { outline: 2px solid #d7a4e8; outline-offset: 4px; }
.npc-chat-options .npc-chat-tools { position: absolute; bottom: calc(100% + 20px); right: -28px; width: min(320px,calc(100vw - 32px)); padding: 14px; border-radius: 12px; border: 1px solid #b89acb66; background: #251e2bf7; box-shadow: 0 12px 32px #100a1866; z-index: 3; }
.npc-chat-tools label, .npc-chat-tools small { width: 100%; }
.npc-chat-tools small { font-size: 11px; color: #bfaec8; line-height: 1.5; margin-top: 4px; }
.npc-connection { max-width: 230px; font-size: 11px; }
.npc-history { position: fixed; z-index: 44; top: 88px; right: 24px; width: min(400px,calc(100vw - 32px)); max-height: calc(100dvh - 220px); display: flex; flex-direction: column; border: 1px solid #b89acb66; border-radius: 14px; background: #251e2bf7; box-shadow: 0 16px 48px #100a1866; color: #f4edf7; }
.npc-history[hidden] { display: none !important; }
.npc-history header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 18px; border-bottom: 1px solid #b89acb33; }
.npc-history h2 { font-size: 14px; margin: 0; color: #e8c8f3; }
.npc-history button { background: transparent; border: 0; font-size: 22px; color: inherit; cursor: pointer; padding: 2px 8px; }
.npc-history .npc-transcript { max-height: none; min-height: 0; overflow-y: auto; border: 0; padding: 6px 18px 16px; }
.npc-history .npc-transcript p { padding: 6px 0; font-weight: 400; }
.npc-history .npc-transcript strong { margin-bottom: 4px; }
.world-ui-quiet .npc-history { display: none; }
@media(max-width:700px) {
  .world-ui #quickChat { bottom: max(12px,env(safe-area-inset-bottom)); width: calc(100vw - 24px); padding: 8px; gap: 6px; }
  .world-ui .quick-chat-form, .world-ui .quick-chat.is-open .quick-chat-form { grid-template-columns: auto minmax(0,1fr) auto auto; }
  .world-ui #quickChat .quick-chat-form > input { min-width: 0; font-size: 16px; min-height: 40px; height: 40px; }
  .world-ui #quickChat :is(#worldSpeechToggle,.quick-chat-send-button,.quick-chat-log-button) { min-height: 40px; padding: 6px; }
  .world-ui .quick-chat-form .quick-chat-log-button { grid-column: auto; }
  .world-chat-open .world-controls-help { bottom: 94px; }
  .world-ui.world-chat-open .conversation-camera-badge { bottom: 160px; }
  .world-ui .npc-conversation { gap: 4px; }
  .npc-connection { position: absolute; bottom: calc(100% + 8px); right: 0; padding: 5px 8px; background: #251e2bf5; border-radius: 6px; }
  .npc-history { top: 70px; right: 12px; max-height: calc(100dvh - 250px); }
}

.is-map-open .pocket-location-bar select { border: 0; border-radius: 6px; background: transparent; color: #3e574b; font: 700 12px system-ui; padding: 7px 5px; max-width: 160px; }
.is-map-open .pocket-location-bar [aria-pressed="true"] { background: #d8e1c8; }
.is-map-open #worldHud .village-view-switch { display: none; }
.is-property-open #worldHud .village-toolbar { display: none; }

/* Outdoor navigation shares the right rail, leaving the landscape unobstructed. */
.is-map-open .pocket-location-bar { position: fixed; top: 50%; right: 24px; left: auto; width: 144px; max-height: calc(100dvh - 240px); overflow-y: auto; transform: translateY(-50%); flex-direction: column; align-items: stretch; white-space: normal; }
.is-map-open .pocket-location-bar :is(select,button) { width: 100%; max-width: 100%; }
.is-map-open .pocket-location-bar span { text-align: center; white-space: normal; }
.world-ui.is-map-open .village-bottom { position: fixed; left: 24px; right: auto; bottom: 92px; max-width: 164px; justify-content: flex-start; }
@media(max-width:700px) {
  .is-map-open .pocket-location-bar { right: 12px; width: 112px; }
  .world-ui.is-map-open .village-bottom { left: 12px; bottom: 104px; max-width: 144px; }
}

/* Keep the optional alpha reward guide inside the shop, off the play area. */
.alpha-credits-guide { margin: .4rem 1rem .75rem; font-size: .85rem; line-height: 1.5; }
.alpha-credits-guide summary { cursor: pointer; color: inherit; }
.alpha-credits-guide p { margin: .5rem 0; color: inherit; opacity: .85; }

.bawoon-creator-help { margin: 0; font-size: .8rem; line-height: 1.45; opacity: .8; }

