/* Clarity and compact controls for the existing game shell. */
.utility-control img { display:block; flex:0 0 22px; width:22px; height:22px; }
.header-actions :is(#settings-open,#admin-link,#help-open) { position:relative; display:inline-flex; align-items:center; justify-content:center; width:44px; min-width:44px; height:44px; min-height:44px; padding:10px; border:1px solid #d5dfce; border-radius:8px; background:#edf2e7; color:#314e36; }
.header-actions :is(#settings-open,#admin-link,#help-open)[hidden] { display:none; }
.header-actions .utility-label { display:none; }
.header-actions .utility-control:is(:hover,:focus-visible) .utility-label { display:block; position:absolute; z-index:30; top:calc(100% + 7px); left:50%; transform:translateX(-50%); width:max-content; padding:5px 9px; border-radius:5px; background:#29432f; color:white; font:13px/1.4 var(--font-ui); white-space:nowrap; }
#mobile-menu-tools .utility-control { display:inline-flex; align-items:center; justify-content:flex-start; gap:8px; min-height:44px; padding:8px 12px; border:1px solid #d5dfce; border-radius:8px; background:#edf2e7; color:#314e36; }
#mobile-menu-tools .utility-control[hidden] { display:none; }
#mobile-menu-tools .utility-label { display:inline; font:14px/1.4 var(--font-ui); }
.utility-control:focus-visible { outline:3px solid #875026; outline-offset:2px; }
.primary-button { background:#ab4e2a; color:#fff; }
.primary-button:hover { background:#934021; }
dialog p, dialog .help-note, dialog li span, .settings-section small { color:#53664c; }
.inventory-types button { border:0; border-bottom:2px solid transparent; border-radius:0; background:transparent; color:#53664c; font:12px/1.3 var(--font-ui); }
.inventory-types button[aria-pressed="true"] { border-color:#59744b; background:transparent; box-shadow:none; color:#314e36; font-weight:600; }
.inventory-types button:hover { background:#f0f4e9; }
.inventory-filters { gap:2px; padding:3px; margin-bottom:6px; border-radius:8px; background:#edf2e7; }
.inventory-filters button { flex:1; min-width:0; padding:6px 3px; color:#53664c; white-space:nowrap; }
.inventory-filters button[aria-pressed="true"] { background:#fffef9; color:#314e36; box-shadow:0 1px 3px #29432f14; }
#inventory-results:not(.sr-only) { margin:0 0 8px; color:#53664c; font-size:12px; line-height:1.5; }
#inventory-results.sr-only { top:0; left:0; }
#inventory-dialog #inventory-results:not(.sr-only) { position:static; width:auto; height:auto; padding:0; margin:0 0 8px; overflow:visible; clip:auto; white-space:normal; }
#material-grid { overscroll-behavior:contain; scrollbar-gutter:stable; }
.inventory-panel { position:relative; }
.inventory-heading { gap:8px; }
/* The docked catalog is identified by its search and cards; dialogs keep their title. */
#inventory-mount .inventory-heading { position:absolute; top:0; left:0; width:1px; height:1px; min-height:0; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
.inventory-selection { margin-top:8px; padding-top:5px; gap:4px; }
#inventory-selected { flex:1; min-width:0; color:#53664c; font-size:11px; }
.material-favorite { display:inline-flex; align-items:center; justify-content:center; width:32px; min-width:32px; height:32px; min-height:32px; border:0; border-radius:6px; background:transparent; color:#64765a; }
.material-favorite svg { display:block; flex:none; width:18px; height:18px; pointer-events:none; }
.material-favorite[aria-pressed="true"] { background:transparent; color:#95632f; }
.material-favorite[aria-pressed="true"] svg { fill:#e7bc6d; }
.material-favorite:hover { background:#edf2e7; }
@media (pointer:coarse), (max-width:760px) { .material-favorite { width:44px; min-width:44px; height:44px; min-height:44px; } }
#share-status { font-size:13px; line-height:1.5; color:#3d5738; }
.sidebar > .together { order:3; }
.sidebar > #recent-places-card { order:1; }
.sidebar > #inventory-mount { order:2; }
.sidebar > .activity { order:4; }
.sidebar > .world-footer { order:5; }
html:not([data-mobile-shell="true"]) body:not([data-edit-mode="look"]) .sidebar > #recent-places-card { display:none; }
body[data-world-kind="island"] #recent-places-map-open:not([hidden]) { display:inline-flex; }
html:not([data-mobile-shell="true"]) body[data-edit-mode="look"] #material-grid:not([data-color-view="true"]) { max-height:270px; }
#selection-panel #edit-mode-status { color:#3d5738; font-size:13px; margin-bottom:7px; }
#recent-work-copy { display:flex; flex-direction:column; gap:2px; margin:0 2px 7px; padding:6px 8px; border-left:3px solid #79916a; background:#edf2e7; color:#3d5738; font-size:12px; line-height:1.4; }
#recent-work-copy:empty, #undo-status:empty { display:none; }
#recent-work-summary { font-weight:600; }
#undo-status { color:#71502e; overflow-wrap:anywhere; }
#quick-start { display:flex; align-items:center; min-width:0; gap:8px; border-left:3px solid #ae7047; padding:4px 0 4px 8px; margin:0 2px 7px; }
#quick-start-copy { flex:1; min-width:0; margin:0; font-size:12px; line-height:1.5; color:#53664c; white-space:normal; word-break:keep-all; overflow-wrap:anywhere; }
#quick-start-dismiss { flex:0 0 44px; width:44px; height:44px; min-height:44px; padding:0; color:#53664c; background:transparent; font-size:20px; }
#selection-panel #energy-reduce-range { width:100%; min-height:44px; margin-bottom:6px; padding:8px; border:1px solid #a17448; border-radius:7px; background:#fff4dd; color:#684624; font-size:14px; }
#selection-panel #selection-preview { white-space:normal; overflow:visible; }
#scope-panel .brush-sizes button { display:flex; flex-direction:column; justify-content:center; align-items:center; gap:3px; }
#scope-panel .brush-sizes small { font:11px/1.35 var(--font-ui); color:#53664c; }
#scope-panel #brush-summary { display:block; margin-top:7px; color:#53664c; white-space:normal; font-size:12px; }
#world:focus-visible { outline:3px solid #875026; outline-offset:-4px; }
#world-connection-notice { position:absolute; z-index:9; top:112px; left:16px; max-width:min(510px,calc(100% - 32px)); display:flex; align-items:center; gap:12px; padding:10px 12px; border:1px solid #a17448; border-radius:8px; background:#fff4dd; color:#684624; font-size:13px; box-shadow:0 3px 12px #29432f20; }
#world-connection-notice button { flex-shrink:0; min-height:44px; padding:8px; border:1px solid #a17448; border-radius:6px; background:#fffaf0; color:#684624; }
#world-connection-notice[hidden],#view-options[hidden] { display:none!important; }
#address-value { width:100%; margin:8px 0 12px; padding:12px; border:1px solid #9ba98e; border-radius:6px; font:14px var(--font-ui); color:#29432f; background:white; }
.address-actions { display:flex; gap:8px; }
.address-actions button { flex:1; }
#account-logout { width:auto; min-height:44px; margin:6px auto 0; padding:8px 18px; background:transparent; text-decoration:underline; text-underline-offset:3px; }
#account-dialog #account-browse.primary-button { background:#ab4e2a; color:#fff; }
#account-dialog #account-browse.primary-button:hover { background:#934021; }
.help-quick { margin:20px 0; }
.help-quick h3 { font-size:16px; margin-bottom:12px; }
.help-quick ol { padding:0; }
.help-quick li { margin-bottom:14px; }
.help-quick li span { font-size:14px; }
.help-details { margin:18px 0; border-top:1px solid #dce4d5; border-bottom:1px solid #dce4d5; }
.help-details summary { min-height:48px; padding:14px 0; cursor:pointer; font-weight:600; color:#365331; }
.help-details summary:focus-visible { outline:3px solid #875026; outline-offset:2px; }
#help-guide { margin-bottom:6px; }
html[data-mobile-shell="true"] #view-options { position:absolute; z-index:6; top:164px; right:12px; width:170px; padding:8px; border:1px solid #d4dfcd; border-radius:10px; background:#f9faf5; box-shadow:0 4px 16px #29432f25; }
html[data-mobile-shell="true"] #view-options .view-rotation { position:static; display:flex; justify-content:stretch; margin:0 0 6px; transform:none; }
html[data-mobile-shell="true"] #view-options .view-rotation button { flex:1; }
html[data-mobile-shell="true"] #view-options #view-mode { position:static; width:100%; min-width:0; }
html[data-mobile-shell="true"] #world-connection-notice { top:166px; left:12px; max-width:calc(100% - 24px); }
html[data-mobile-shell="true"] .sidebar > #recent-places-card { order:1; }
@media(max-width:370px) { #scope-panel .brush-sizes small { font-size:10px; } }
@media(max-width:1100px) and (max-height:450px) and (orientation:landscape) {
  html[data-mobile-shell="true"] #view-options { top:108px; }
  #recent-work-copy { padding:3px 6px; gap:0; }
  #quick-start, #recent-work-copy, #energy-reduce-range { grid-column:1/-1; }
  #quick-start { margin-bottom:4px; }
  html[data-mobile-shell="true"] #world-connection-notice { top:106px; }
}

/* Secondary presence list: one account per row, at most three rows tall. */
#presence-panel { position:relative; margin-top:0; padding:12px 0 0; border:0; border-top:1px solid #dce4d5; border-radius:0; background:transparent; color:#2f4936; }
#presence-panel .together-heading { flex-wrap:nowrap; min-height:44px; margin:0; gap:8px; }
#presence-panel .presence-summary { display:flex; flex:1; flex-wrap:wrap; align-items:center; gap:4px 7px; min-width:0; }
#presence-title { margin:0; font:600 13px/1.4 var(--font-ui); color:#2f4936; white-space:nowrap; }
#presence-panel .presence-count { display:flex; flex-shrink:0; align-items:center; gap:3px; color:#4e634a; font:12px/1.2 var(--font-ui); }
#presence-panel #online-count { font-size:13px; font-weight:600; line-height:1; letter-spacing:0; font-variant-numeric:tabular-nums; }
#presence-panel .live-dot { flex:0 0 6px; width:6px; height:6px; margin-right:1px; border-radius:50%; background:#7d8679; }
#presence-panel[data-connected="true"] .live-dot { background:#397b50; }
#presence-panel #players { display:block; max-height:96px; margin:4px 0 0; padding:0; overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-gutter:stable; }
#presence-panel #players:empty { display:none; }
#presence-panel .player { display:flex; align-items:center; width:100%; min-width:0; height:32px; min-height:32px; padding:3px 4px; gap:7px; border:0; border-bottom:1px solid #e3e9dd; border-radius:0; background:transparent; color:#3b533b; font:13px/1.4 var(--font-ui); }
#presence-panel .player-avatar { display:block; flex:0 0 24px; width:24px; height:24px; object-fit:contain; pointer-events:none; }
#presence-panel .player-name { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#presence-panel .player-self { flex:none; padding:1px 5px; border-radius:4px; background:#e5edde; color:#46613d; font-size:11px; }
#presence-panel #share { flex-shrink:0; width:auto; min-height:44px; padding:8px; justify-content:center; align-items:center; gap:4px; border:1px solid #d0ddc7; border-radius:7px; background:#edf3e6; color:#365331; font:500 12px/1.4 var(--font-ui); white-space:nowrap; }
#presence-panel #share:hover { background:#e1edd7; }
#presence-panel #share:disabled { cursor:wait; opacity:.8; }
#presence-panel #share[data-copied="true"] { border-color:#7b986b; background:#e8f1e1; color:#355f31; }
#presence-panel .share-symbol { flex-shrink:0; font:15px/1 var(--font-ui); }
#presence-panel .sr-only { top:0; left:0; margin:-1px; padding:0; }
#presence-panel #share:focus-visible, #presence-panel #players:focus-visible { outline:3px solid #875026; outline-offset:3px; }
#mobile-menu #presence-panel { margin:0; }

/* Compact desktop controls; touch layouts retain the larger targets. */
#inventory-search { height:44px; min-height:44px; padding-top:9px; padding-bottom:9px; font-size:16px; line-height:24px; }
#inventory-search-clear { height:44px; }
html[data-mobile-shell="true"] #recent-places-open { min-height:44px; }
@media (pointer:coarse) { #recent-places-open { min-height:44px; } }
.header #account-open { height:44px; min-height:44px; gap:2px; padding-top:4px; padding-bottom:4px; }
.header #account-open strong { font-size:13px; line-height:18px; }
.header #account-open > span { font-size:11px; line-height:14px; }
@media (hover:hover) and (pointer:fine) {
  html:not([data-mobile-shell="true"]) #inventory-search { height:36px; min-height:36px; padding:7px 36px 7px 10px; font-size:14px; line-height:20px; }
  html:not([data-mobile-shell="true"]) #inventory-search-clear { width:36px; height:36px; min-height:36px; font-size:20px; }
  html:not([data-mobile-shell="true"]) .inventory-filters button { min-height:30px; padding:5px 3px; }
  html:not([data-mobile-shell="true"]) .inventory-types button { min-height:32px; padding-top:4px; padding-bottom:4px; }
  html:not([data-mobile-shell="true"]) #presence-panel .together-heading { min-height:32px; }
  html:not([data-mobile-shell="true"]) #presence-panel #share { min-height:32px; padding:6px 8px; line-height:18px; }
  html:not([data-mobile-shell="true"]) #recent-places-open { min-height:32px; }
}

/* Warm surfaces separate the interface from the green terrain. */
:root {
  --ui-surface:#fffdf7;
  --ui-canvas:#f5f3ec;
  --ui-soft:#efede4;
  --ui-border:#dcdcd0;
  --ui-text:#304738;
  --ui-muted:#596752;
  --ui-accent:#ab4e2a;
  --ui-accent-soft:#fae9db;
  --ui-accent-border:#b56c47;
  --ui-accent-text:#764329;
}
.header, .sidebar { background:var(--ui-canvas); border-color:var(--ui-border); color:var(--ui-text); }
html:not([data-mobile-shell="true"]) .header { height:72px; }
html:not([data-mobile-shell="true"]) body > main { height:calc(100dvh - 72px); min-height:0; }
.inventory-panel, dialog { background:var(--ui-surface); border-color:var(--ui-border); }
.inventory-filters { background:var(--ui-soft); }
#inventory-search { background:var(--ui-surface); border-color:#c8cbbf; color:var(--ui-text); }
#inventory-search::placeholder { color:var(--ui-muted); }
.material-choice, .material-color-choice { background:var(--ui-canvas); border-color:transparent; color:var(--ui-text); }
.material-choice:hover, .material-color-choice:hover { background:var(--ui-soft); }
.header-actions :is(#settings-open,#admin-link,#help-open), #mobile-menu-tools .utility-control,
#mobile-menu-tools #header-profile, #mobile-menu-tools #help-open,
html[data-mobile-shell="true"] #mobile-menu-open,
#mobile-menu-close, #menu-blocks, #inventory-close { background:var(--ui-soft); border-color:var(--ui-border); color:var(--ui-text); }
#presence-panel, #presence-panel .player, .world-footer { border-color:var(--ui-border); }
#presence-panel #share { background:var(--ui-soft); border-color:var(--ui-border); color:var(--ui-text); }
#presence-panel #share:hover { background:#e6e6da; }
.world-links > button, .world-links .island-overview, .world-links #changes-open { background:var(--ui-surface); border-color:var(--ui-border); color:var(--ui-text); }
#selection-panel, #selection-panel #scope-panel, #selection-panel #edit-extras { background:var(--ui-surface); border-color:var(--ui-border); }
#selection-panel .tool, #selection-panel .tool.active, #selection-panel #inventory-open,
#selection-panel #material-pick, #selection-panel #scope-toggle, #selection-panel #edit-back,
#selection-panel #edit-close, #selection-panel .brush-sizes button { background:var(--ui-soft); border-color:var(--ui-border); color:var(--ui-text); }
#selection-panel .tool kbd { background:var(--ui-surface); border-color:#c8cbbf; color:var(--ui-muted); }

/* One selection language, with a check or underline as well as color. */
.material-choice[aria-pressed="true"], .material-color-choice[aria-pressed="true"],
#selection-panel .tool[aria-pressed="true"], #selection-panel .brush-sizes button[aria-pressed="true"],
body[data-material-sampling="true"] #selection-panel #material-pick, #selection-panel #material-pick[aria-pressed="true"] {
  background:var(--ui-accent-soft); border-color:var(--ui-accent-border);
  box-shadow:inset 0 0 0 1px var(--ui-accent-border); color:var(--ui-accent-text);
}
.material-choice[aria-pressed="true"]::after, .material-color-choice[aria-pressed="true"]::after { color:var(--ui-accent-text); }
.inventory-filters button[aria-pressed="true"] { background:var(--ui-accent-soft); color:var(--ui-accent-text); box-shadow:0 1px 3px #56361d14; font-weight:600; }
.inventory-types button[aria-pressed="true"] { border-bottom-color:var(--ui-accent-border); color:var(--ui-accent-text); }
.inventory-types button:hover { background:var(--ui-soft); }
#selection-panel #scope-toggle[aria-expanded="true"], #selection-panel #edit-more[aria-expanded="true"] { background:var(--ui-accent-soft); border-color:var(--ui-accent-border); color:var(--ui-accent-text); }
#selection-panel #line-apply:not(:disabled) { background:var(--ui-accent); color:#fff; font-weight:600; }

/* Keep the game face for titles and block names; small commands use the UI face. */
.controls-dock .tool, .inventory-filters button, .inventory-types button, .brush-sizes button,
.world-links > button, .selection-options > button, .material-pick, #precision-toggle,
#scope-toggle, #edit-back, #line-reset, #line-apply, .primary-button, .secondary-button { font-family:var(--font-ui); font-weight:500; }
.inventory-filters button[aria-pressed="true"], .inventory-types button[aria-pressed="true"],
.brush-sizes button[aria-pressed="true"], #selection-panel .tool[aria-pressed="true"] { font-weight:600; }
.header #account-open > span { color:var(--ui-muted); font-size:12px; }
.connection, .section-label, .section-label > span:not(.live-dot),
.activity li, .activity li small, .activity li.empty-history, .world-footer,
.world-footer span:first-child, .inventory-note, #inventory-selected,
.recent-places-intro, .recent-places-message, .recent-places-updated, #recent-places-status,
.recent-place-copy span, .recent-place-copy small, #recent-places-dialog .help-note { color:var(--ui-muted); }
#inventory-selected { font-size:12px; }

/* A successful empty feed needs only its heading and one line of explanation. */
#recent-places-card { padding-top:0; border-top:0; }
#recent-places-card[data-state="empty"] .recent-places-intro { display:none; }
#recent-places-card[data-state="empty"] .places-heading { margin-bottom:4px; }
#recent-places-card[data-state="empty"] .recent-places-message { margin:0; }
.activity { flex-shrink:0; }
.activity:not([open]) { flex-grow:0; min-height:0; }
.activity > summary.section-label { min-height:36px; gap:8px; cursor:pointer; list-style:none; }
.activity > summary::-webkit-details-marker { display:none; }
.activity > summary.section-label > span { margin-left:auto; }
.activity > summary::after { content:""; width:7px; height:7px; margin:0 3px 3px 1px; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:rotate(45deg); flex-shrink:0; }
.activity[open] > summary::after { transform:rotate(225deg); margin-top:5px; }
.activity > summary:focus-visible { outline:3px solid #875026; outline-offset:2px; border-radius:4px; }
.activity ol { margin-top:10px; }
html[data-mobile-shell="true"] .activity > summary.section-label { min-height:44px; }

/* Desktop view controls share one compact panel. Mobile keeps the View popover. */
.map-view-controls { display:contents; }
html:not([data-mobile-shell="true"]) .map-view-controls { position:absolute; z-index:4; top:32px; right:26px; display:flex; flex-direction:column; gap:4px; width:144px; padding:5px; border:1px solid var(--ui-border); border-radius:10px; background:var(--ui-surface); box-shadow:0 2px 10px #35473710; }
html:not([data-mobile-shell="true"]) .map-view-controls .world-controls { position:static; flex-direction:row; width:100%; border-radius:6px; box-shadow:none; }
html:not([data-mobile-shell="true"]) .map-view-controls .world-controls button { flex:1; min-width:0; width:44px; height:44px; background:transparent; color:var(--ui-text); }
html:not([data-mobile-shell="true"]) .map-view-controls .world-controls button + button { border-top:0; border-left:1px solid var(--ui-border); }
html:not([data-mobile-shell="true"]) .map-view-controls button:focus-visible { outline:3px solid #875026; outline-offset:-3px; }
html:not([data-mobile-shell="true"]) #view-options { display:flex; flex-direction:column; gap:4px; }
html:not([data-mobile-shell="true"]) #view-options:not(:has(> :not([hidden]))) { display:none; }
html:not([data-mobile-shell="true"]) #view-options .view-rotation { position:static; width:100%; border:0; border-radius:6px; box-shadow:none; overflow:hidden; }
html:not([data-mobile-shell="true"]) #view-options .view-rotation button { flex:1; min-height:44px; background:var(--ui-soft); color:var(--ui-text); }
html:not([data-mobile-shell="true"]) #view-options .view-rotation button + button { border-color:var(--ui-border); }
html:not([data-mobile-shell="true"]) #view-options #view-mode { position:static; width:100%; min-width:0; min-height:36px; margin:0; border:0; border-radius:6px; box-shadow:none; background:var(--ui-soft); color:var(--ui-text); }
html:not([data-mobile-shell="true"]) body[data-world-kind] .world-links { right:184px; }
html:not([data-mobile-shell="true"]) #view-options #view-mode[aria-pressed="true"], #view-mode[aria-pressed="true"] { background:var(--ui-accent-soft); color:var(--ui-accent-text); box-shadow:inset 0 0 0 1px var(--ui-accent-border); }
@media (pointer:coarse) { html:not([data-mobile-shell="true"]) #view-options #view-mode { min-height:44px; } }

/* A shared two-row layout keeps mobile navigation clear of the camera tools. */
.world-navigation { display:contents; }
.world-heading h2 #world-title { margin:0; padding:0; border:0; color:inherit; font:inherit; letter-spacing:inherit; vertical-align:baseline; }
html[data-mobile-shell="true"] body[data-world-kind="island"] .world-navigation {
  position:absolute; z-index:4; top:12px; left:max(12px,env(safe-area-inset-left)); right:max(12px,env(safe-area-inset-right));
  display:grid; grid-template-columns:minmax(0,1fr) 132px; grid-template-areas:"heading zoom" "links view";
  gap:8px; align-items:start; pointer-events:none;
}
html[data-mobile-shell="true"] body[data-world-kind="island"] .world-heading { position:static; grid-area:heading; display:block; align-self:center; width:100%; min-width:0; max-width:none; }
html[data-mobile-shell="true"] body[data-world-kind="island"] .world-heading h2 { display:flex; align-items:center; min-height:44px; margin:0; overflow:visible; font-size:24px; line-height:1.2; }
html[data-mobile-shell="true"] body[data-world-kind="island"] .world-heading #world-title { display:block; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font:inherit; }
#regions-open[data-region-heading="true"] { display:inline-flex; align-items:center; gap:8px; max-width:100%; min-width:44px; min-height:44px; margin:0; padding:4px 0; border:0; border-radius:6px; background:transparent; color:var(--ui-text); font:inherit; text-align:left; pointer-events:auto; }
#regions-open[data-region-heading="true"] .regions-label { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
#regions-open[data-region-heading="true"]::after { content:""; flex:none; width:7px; height:7px; margin:0 3px 4px; border-right:2px solid currentColor; border-bottom:2px solid currentColor; transform:rotate(45deg); }
#regions-open[data-region-heading="true"]:focus-visible { outline:3px solid #875026; outline-offset:2px; }
html[data-mobile-shell="true"] body[data-world-kind="island"] .world-navigation .world-controls { position:static; grid-area:zoom; width:132px; display:flex; flex-direction:row; pointer-events:auto; }
html[data-mobile-shell="true"] body[data-world-kind="island"] .world-navigation .world-controls button { width:44px; min-width:44px; height:44px; min-height:44px; background:var(--ui-surface); color:var(--ui-text); }
html[data-mobile-shell="true"] body[data-world-kind="island"] .world-navigation .world-controls button + button { border-top:0; border-left:1px solid var(--ui-border); }
html[data-mobile-shell="true"] body[data-world-kind="island"] .world-links { position:static; grid-area:links; display:flex; align-items:center; flex-wrap:wrap; min-width:0; gap:6px; pointer-events:none; }
html[data-mobile-shell="true"] body[data-world-kind="island"] .world-links > button { max-width:100%; min-height:44px; padding:6px; font-size:12px; pointer-events:auto; }
html[data-mobile-shell="true"] body[data-world-kind="island"] .world-links .nav-long { display:none; }
html[data-mobile-shell="true"] body[data-world-kind="island"] .world-links .nav-short { display:inline; }
html[data-mobile-shell="true"] body[data-world-kind="island"] #view-options { top:calc(100% + 6px); right:0; pointer-events:auto; }
html[data-mobile-shell="true"] body[data-world-kind="island"] .world-navigation .world-controls button:focus-visible { outline:3px solid #875026; outline-offset:-3px; }
@media (min-height:451px), (orientation:portrait) {
  html[data-mobile-shell="true"] #selection-panel { padding:5px; }
  html[data-mobile-shell="true"] #selection-panel #edit-mode-status { margin-bottom:4px; }
  html[data-mobile-shell="true"] #selection-panel .tool { min-height:50px; gap:2px; padding:4px 2px; }
}
#loading { padding:24px; text-align:center; }
#loading p { max-width:420px; margin:0; line-height:1.7; word-break:keep-all; overflow-wrap:anywhere; }
