#world-action-panel{position:fixed;z-index:22;left:50%;bottom:calc(92px + env(safe-area-inset-bottom));transform:translateX(-50%);width:min(500px,calc(100vw - 24px));padding:14px 42px 14px 16px;border:1px solid #d7c6a3;border-radius:16px;background:#fff8e9;color:#213c3b;box-shadow:0 5px 20px #172c3828;pointer-events:auto}
#world-action-panel[hidden]{display:none}#world-action-panel>strong{display:block;font-size:16px}#world-action-panel p{font-size:13px;line-height:1.35;margin:5px 0 10px}.world-action-close{position:absolute;top:7px;right:7px;width:34px;height:34px;border:0;background:transparent;font-size:26px;color:inherit}.world-action-buttons{display:flex;gap:7px;flex-wrap:wrap}.world-action-buttons button{min-height:40px;padding:8px 13px;border:1px solid #3e6658;border-radius:10px;background:#376759;color:#fff9e9;font:inherit;font-size:13px}.world-action-buttons button:disabled{opacity:.5}
#world-action-panel[data-action="travel"]{padding:10px 54px 10px 12px;display:grid;grid-template-columns:1fr auto;column-gap:8px}#world-action-panel[data-action="travel"][hidden]{display:none}#world-action-panel[data-action="travel"]>strong{font-size:13px;align-self:end}#world-action-panel[data-action="travel"] p{font-size:11px;margin:3px 0 0;grid-column:1}#world-action-panel[data-action="travel"] .world-action-buttons{grid-column:2;grid-row:1 / 3;align-self:center}#world-action-panel[data-action="travel"] .world-action-buttons button{padding:8px;min-height:40px}#world-action-panel[data-action="travel"] .world-action-buttons button[hidden]{display:none}
body:has(#world-action-panel:not([hidden])) .context-line{visibility:hidden}
#scene-dialog.in-world-scene{position:fixed;inset:auto 16px calc(90px + env(safe-area-inset-bottom)) auto;margin:0;width:min(510px,calc(100vw - 32px));max-height:48dvh;padding:18px;border:1px solid #d5c29c;border-radius:18px;box-shadow:0 6px 24px #172c3833;background:#fff8e9f7;color:#213c3b;overflow:auto;z-index:24}
#scene-dialog.in-world-scene .scene-heading h2{font-size:23px;margin:4px 0 7px}#scene-dialog.in-world-scene .scene-heading p{font-size:14px;line-height:1.35;margin:4px 0}#scene-dialog.in-world-scene .scene-portrait-wrap{width:66px;height:66px;flex:0 0 66px}#scene-dialog.in-world-scene .scene-choices{gap:6px;margin-top:10px;grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}#scene-dialog.in-world-scene .scene-choice{padding:10px;min-height:46px}#scene-dialog.in-world-scene .scene-choice small{font-size:11px}#scene-dialog.in-world-scene .scene-details>ul{font-size:11px;margin:7px 0;padding-left:16px}#scene-dialog.in-world-scene blockquote{font-size:15px;margin:9px 0}#scene-dialog.in-world-scene .eyebrow{font-size:9px}#scene-dialog.in-world-scene.has-workbench{max-height:55dvh}#scene-dialog.in-world-scene .close{position:sticky;top:0;float:right;width:34px;height:34px;margin:-8px -8px 0 0}
body:has(#scene-dialog.in-world-scene[open]) #world-action-panel{display:none}body:has(#scene-dialog.in-world-scene[open]) .context-line{visibility:hidden}
.decor-direct{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:10px;border:1px dashed #bfa97e;border-radius:12px;margin:5px 0 15px}.decor-direct button{min-height:40px}
#chat-dialog{position:fixed;inset:auto auto calc(90px + env(safe-area-inset-bottom)) 14px;margin:0;width:min(400px,calc(100vw - 28px));max-height:38dvh;padding:13px;border-radius:16px;overflow:auto;box-shadow:0 5px 22px #172c3833;background:#fff8e9f7;z-index:25}
#chat-dialog .dialog-header{margin:0}#chat-dialog .dialog-header h2{font-size:20px;margin:0}#chat-dialog .dialog-header .eyebrow{display:none}#chat-dialog .close{width:34px;height:34px}#chat-dialog .world-chat-panel>strong{display:none}#chat-dialog .world-chat-detail{font-size:10px;line-height:1.3;margin:5px 0}#chat-dialog .world-chat-list{max-height:14dvh;margin:5px 0}#chat-dialog .world-chat-message{padding:5px 0;font-size:13px}#chat-dialog .world-chat-status{margin:4px 0;font-size:11px}#chat-dialog .world-chat-management{font-size:11px}#chat-dialog .world-chat-counter{font-size:10px}
@media(max-width:600px){#chat-dialog{bottom:calc(78px + env(safe-area-inset-bottom));max-height:36dvh}}
@media(max-width:600px){#scene-dialog.in-world-scene .close,#chat-dialog .close,.world-action-close{width:44px;height:44px}#world-action-panel{padding-right:54px}}
@media(max-width:600px){.context-line,.activity-launch{display:none}.game-toolbar{padding:8px 5px}.game-toolbar button{font-size:10px}.scene-tools{gap:6px}.quest-peek{width:min(245px,calc(100vw - 80px))}.save-line[data-state="saved"]{font-size:9px;opacity:.7}}
@media(max-width:600px){#scene-dialog.in-world-scene{left:12px;right:12px;width:auto;bottom:calc(78px + env(safe-area-inset-bottom));max-height:44dvh;padding:13px}#world-action-panel{bottom:calc(78px + env(safe-area-inset-bottom))}.game-toolbar button{min-height:46px}.context-action{min-height:45px}.game-hud{gap:6px}.hud-profile{max-width:45vw}.hud-profile strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hud-profile small{font-size:10px}.scene-tools .round-button{width:40px;height:40px}.quest-peek{max-width:calc(100vw - 80px)}.quest-peek strong{font-size:12px}.activity-launch{font-size:12px;min-height:34px}}

/* Keep the objective beside the menus, clear of faces and sized to the actual dock. */
@media(max-width:600px) and (orientation:portrait){
  .game-hud{top:max(10px,env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));gap:6px}
  .hud-profile{min-height:44px;gap:6px;padding-right:8px;border-radius:12px}.hud-profile canvas{width:36px;height:36px;border-radius:9px}.hud-profile strong{font-size:12px}.hud-profile small{font-size:9px;line-height:1.3}
  .hud-money,.hud-energy{min-height:44px;padding:6px 8px;border-radius:12px}.hud-money b,.hud-energy b{font-size:12px}
  .location-badge{top:calc(max(10px,env(safe-area-inset-top)) + 50px);left:max(12px,env(safe-area-inset-left));max-width:calc(100vw - 80px);flex-direction:row;align-items:center;gap:5px}.location-badge>span{font-size:10px;padding:3px 7px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.location-badge>small{display:block;flex-shrink:0;margin:0;font-size:8px;padding:2px 4px}
  .scene-tools{top:calc(max(10px,env(safe-area-inset-top)) + 50px);right:max(12px,env(safe-area-inset-right));gap:5px}.scene-tools .round-button{width:44px;height:44px;min-height:44px;padding:9px}.scene-tools .round-button svg{width:22px;height:22px}
  .gesture-tray{top:calc(max(10px,env(safe-area-inset-top)) + 100px);right:64px}
  .bottom-ui{padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}.game-toolbar{padding:4px 3px;border-radius:14px;gap:1px}.game-toolbar button{min-height:44px;padding:3px 0;gap:2px;font-size:9px;border-radius:9px}.game-toolbar button svg,.game-toolbar #account-button svg{width:21px;height:21px}.save-line{min-height:18px;font-size:8px}.save-line[data-state="saved"]{font-size:8px}
  .quest-peek{top:auto;bottom:calc(var(--hud-dock-height,80px) + 6px);left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));width:auto;max-width:none;min-height:44px;padding:6px 10px;gap:8px;border-radius:12px}.quest-peek>span:nth-child(2){min-width:0;overflow:visible;flex:1}.quest-peek strong{font-size:12px;line-height:1.35;white-space:normal;overflow:visible;text-overflow:clip;margin-top:2px}.quest-peek small{font-size:7.5px;line-height:1.3}.quest-peek .quest-star{font-size:19px}.quest-peek>span:last-child{font-size:20px;margin-left:0}
  body:has(.bottom-ui.collapsed) .quest-peek,body:has(#world-action-panel:not([hidden])) .quest-peek,body:has(#scene-dialog.in-world-scene[open]) .quest-peek,body:has(#chat-dialog[open]) .quest-peek{display:none}
  #world-action-panel,#scene-dialog.in-world-scene,#chat-dialog{bottom:calc(var(--hud-dock-height,80px) + 6px)}
  #world-action-panel .world-action-buttons button,#world-action-panel[data-action="travel"] .world-action-buttons button{min-height:44px}
  .toast{top:calc(max(10px,env(safe-area-inset-top)) + 80px);bottom:auto;left:max(12px,env(safe-area-inset-left));transform:none;max-width:calc(100% - 88px);padding:8px 10px;font-size:11px}
}
