.drawer-close-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.phone-page-return, .chain-page-caption { display: none; }

.mobile-interface:has(> .scene:not(.world-mode) > #drawer.phone-panel-page:not([hidden])) > :is(.topbar, .bottombar),
.mobile-interface > .scene:not(.world-mode):has(> #drawer.phone-panel-page:not([hidden])) > :not(#drawer, .scene-notices) {
  visibility: hidden;
}
.mobile-interface > .scene:not(.world-mode):has(> #drawer.phone-panel-page:not([hidden])) > .scene-notices {
  inset-block: auto calc(var(--phone-dock-inset) + 8px);
}

.mobile-interface .scene:not(.world-mode) > #drawer.phone-panel-page {
  --phone-panel-edge: #a78b59;
  --phone-panel-seam: #bc9c6440;
  --phone-panel-surface: #273129;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: var(--game-inset-top, env(safe-area-inset-top, 0px))
    var(--safe-right) var(--phone-dock-inset) var(--safe-left);
  overflow: hidden;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.mobile-interface .scene:not(.world-mode) > #drawer.phone-panel-page:not([data-panel=expeditions]) {
  background: radial-gradient(ellipse at 25% 0%, #323d31, #18221c 64%);
}

.mobile-interface .scene:not(.world-mode) > #drawer.phone-panel-page:not([data-panel=build], [data-panel=expeditions]) > .drawer-head {
  min-height: 48px;
  gap: 8px;
  padding: 0 4px 0 10px;
  border-bottom-color: var(--phone-panel-seam);
  background: linear-gradient(105deg, #3a392a, #242d25 78%);
  box-shadow: inset 0 1px #ffe0a626;
}

.mobile-interface .scene:not(.world-mode) > #drawer.phone-panel-page:not([data-panel=build], [data-panel=expeditions]) > .drawer-head h2 {
  color: #f4dfb5;
  font-size: 21px;
}

.mobile-interface .scene:not(.world-mode) > #drawer.phone-panel-page > .drawer-head #closeDrawer {
  width: auto;
  min-width: 44px;
  min-height: 44px;
  padding: 0 8px;
}
.mobile-interface .scene:not(.world-mode) > #drawer.phone-panel-page:not([data-panel=expeditions]) > .drawer-head #closeDrawer {
  align-self: center;
  border: 1px solid var(--phone-panel-seam);
  border-radius: 8px;
  background: #242a21;
  color: #eed7a8;
}

.mobile-interface .scene:not(.world-mode) > #drawer.phone-panel-page #closeDrawer > :is(svg, .drawer-close-label) { display: none; }
.mobile-interface .scene:not(.world-mode) > #drawer.phone-panel-page .phone-page-return {
  display: flex;
  align-items: center;
  gap: 5px;
  font: 700 12px/1.1 var(--ui);
  white-space: nowrap;
}
.mobile-interface .scene:not(.world-mode) > #drawer.phone-panel-page .phone-page-return svg {
  width: 16px;
  height: 16px;
  rotate: 180deg;
}

.mobile-interface .scene:not(.world-mode) > #drawer.phone-panel-page:not([data-panel=build], [data-panel=expeditions]) > .drawer-body {
  flex: 1 1 auto;
  min-width: 0;
  padding: 12px clamp(10px, 2.2vw, 22px);
  scrollbar-color: #9b8157 #202a22;
}

/* Shared phone catalog controls and cards. */
.mobile-interface .scene:not(.world-mode) > #drawer[data-panel=build] {
  --build-metal: var(--phone-panel-edge);
  --build-seam: var(--phone-panel-seam);
  --build-dark: #19221c;
  --phone-build-control: 44px;
  --phone-build-art: clamp(44px, 14dvh, 57px);
}

.mobile-interface .scene:not(.world-mode) > #drawer[data-panel=build] .build-head {
  grid-template-columns: minmax(0, 3fr) auto minmax(0, 4fr) auto;
  gap: 0;
  min-height: var(--phone-build-control);
  padding: 0;
  border-radius: 12px 12px 0 0;
  border-bottom-color: var(--build-seam);
  background: linear-gradient(110deg, #343b2b, #222a22 72%);
  box-shadow: inset 0 1px #ffe2a529;
}
.mobile-interface .scene:not(.world-mode) > #drawer[data-panel=build] .build-mode {
  border: 0;
}
.mobile-interface .scene:not(.world-mode) > #drawer[data-panel=build] #drawerTitle {
  padding-inline: 8px;
  gap: 6px;
  background: none;
  color: #f4deb4;
  font: 700 clamp(15px, 2.3vw, 19px)/1.1 var(--serif);
}
.mobile-interface .scene:not(.world-mode) > #drawer[data-panel=build] #drawerTitle svg {
  display: block;
  width: 16px;
  height: 16px;
}
.mobile-interface .scene:not(.world-mode) > #drawer[data-panel=build] :is(.build-quick, .build-actions) {
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}
.mobile-interface .scene:not(.world-mode) > #drawer[data-panel=build] .build-actions {
  justify-content: end;
  justify-content: safe end;
}
.mobile-interface .scene:not(.world-mode) > #drawer[data-panel=build] .build-head .icon-button {
  flex: 0 0 var(--phone-build-control);
  width: var(--phone-build-control);
  height: var(--phone-build-control);
  margin: 0;
  border-inline-start-color: var(--build-seam);
}
.mobile-interface .scene:not(.world-mode) > #drawer[data-panel=build] .build-head #closeDrawer {
  border-top-right-radius: 12px;
  background: #0e171247;
}

.mobile-interface .scene:not(.world-mode) > #drawer[data-panel=build] .build-body {
  min-height: 0;
  padding: 0;
}
.mobile-interface .scene:not(.world-mode) > #drawer[data-panel=build] .cards {
  gap: 12px;
  padding: 5px 8px 7px;
  scroll-padding-inline: 8px;
  scrollbar-width: thin;
  scrollbar-color: #987b4d #18211b;
  background: #18211b;
}
.mobile-interface .scene:not(.world-mode) > #drawer[data-panel=build] .build-section {
  padding: 0;
  border: 0;
}
.mobile-interface .scene:not(.world-mode) > #drawer[data-panel=build] .build-section h3 {
  margin: 0 0 4px;
  padding: 1px 2px 3px;
  border-bottom: 1px solid var(--build-seam);
  color: #d8b681;
  font-size: 11px;
}
.mobile-interface .scene:not(.world-mode) > #drawer[data-panel=build] .build-items {
  grid-auto-columns: clamp(84px, 13vw, 104px);
  gap: 5px;
}
.mobile-interface .scene:not(.world-mode) > #drawer[data-panel=build] .build-items > .build-item {
  border: 0;
}
.mobile-interface .scene:not(.world-mode) > #drawer[data-panel=build] .build-items .card {
  grid-template-rows: var(--phone-build-art) 24px;
  padding: 2px 5px 3px;
  border: 1px solid #b494604f;
  border-radius: 9px;
  background: radial-gradient(ellipse at 50% 12%, #455140, var(--phone-panel-surface) 76%);
  box-shadow: inset 0 1px #f5dca216;
}
.mobile-interface .scene:not(.world-mode) > #drawer[data-panel=build] .build-items .card:is(:active, :focus-visible, [aria-expanded=true]) {
  border-color: #dfb975;
  background: radial-gradient(ellipse at 50% 15%, #725b38, #39372a 80%);
}
.mobile-interface .scene:not(.world-mode) > #drawer[data-panel=build] .build-items .card strong {
  color: #f0e4cc;
  font-size: 11px;
}
.mobile-interface .scene:not(.world-mode) > #drawer[data-panel=build] .build-items .card-art img {
  padding: 1px 8px;
}
.mobile-interface .scene:not(.world-mode) > #drawer[data-panel=build] .build-items .build-info {
  top: 3px;
  right: 3px;
  width: 32px;
  height: 32px;
  border-color: #b4946045;
  border-radius: 8px;
  background: #17211bd9;
}
.mobile-interface .scene:not(.world-mode) > #drawer[data-panel=build] .build-page {
  display: none;
}

.mobile-interface .scene:not(.world-mode) > #drawer[data-panel=build] .build-nav {
  align-items: stretch;
  gap: 3px;
  padding: 0 4px;
  border-top-color: var(--build-seam);
  border-radius: 0 0 12px 12px;
  background: #262b21;
}
.mobile-interface .scene:not(.world-mode) > #drawer[data-panel=build] :is(.build-order, .build-tabs button, #openBlueprint) {
  min-height: var(--phone-build-control);
  min-width: var(--phone-build-control);
  padding-inline: 9px;
  border-radius: 0;
  font: 650 12px/1.2 var(--ui);
}
.mobile-interface .scene:not(.world-mode) > #drawer[data-panel=build] .build-tabs {
  gap: 2px;
  scrollbar-color: #987b4d #262b21;
}
.mobile-interface .scene:not(.world-mode) > #drawer[data-panel=build] .build-nav[data-order=progress] .build-tabs button {
  padding-inline: 9px;
  font: 650 12px/1.2 var(--ui);
}
.mobile-interface .scene:not(.world-mode) > #drawer[data-panel=build] .build-tabs button {
  border-inline-end: 0;
}
.mobile-interface .scene:not(.world-mode) > #drawer[data-panel=build] .build-tabs [aria-pressed=true] {
  background: #d7ae6221;
  box-shadow: inset 0 -2px #e8ba73;
}
.mobile-interface .scene:not(.world-mode) > #drawer[data-panel=build] :is(.build-order, #openBlueprint) {
  border-color: var(--build-seam);
  background: #45382066;
  color: #f0d8a8;
}
.mobile-interface .scene:not(.world-mode) > #drawer[data-panel=build] .build-draft-label {
  display: inline;
}
.mobile-interface .scene:not(.world-mode) > #drawer[data-panel=build] #openBlueprint svg,
.mobile-interface .scene:not(.world-mode) > #drawer[data-panel=build] .build-order svg {
  display: block;
  width: 15px;
  height: 15px;
}

.mobile-interface .scene:not(.world-mode) > #drawer[data-panel=build] :is(.build-chain, .build-details) {
  border-color: var(--phone-panel-edge);
  border-radius: 10px;
  background: linear-gradient(#2c3529, #18201a);
}
.mobile-interface .scene:not(.world-mode) > #drawer[data-panel=build] .build-chain-head {
  gap: 4px;
}
.mobile-interface .scene:not(.world-mode) > #drawer[data-panel=build] .build-chain-head .icon-button {
  width: var(--phone-build-control);
  min-height: var(--phone-build-control);
}

/* Keep the player list and the open record independently scrollable on short screens. */
body:has(.app.mobile-interface) :is(#diplomacyPage, #drawer.atlas-panel-page) {
  --atlas-margin: clamp(8px, 1.8vw, 16px);
  --phone-directory-width: clamp(144px, 33%, 232px);
  --phone-party-portrait: clamp(30px, 5vw, 44px);
}

body:has(.app.mobile-interface) :is(#diplomacyPage, #drawer.atlas-panel-page) .diplomacy-heading {
  flex-wrap: nowrap;
  gap: 8px;
  padding-block: 4px;
}
body:has(.app.mobile-interface) #drawer.atlas-panel-page .diplomacy-heading {
  flex-wrap: wrap;
}
body:has(.app.mobile-interface) :is(#diplomacyPage, #drawer.atlas-panel-page) .diplomacy-heading .atlas-nav { width: auto; flex-wrap: nowrap; gap: 6px; }
body:has(.app.mobile-interface) #drawer.atlas-panel-page .diplomacy-heading .atlas-nav {
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 100%;
}
body:has(.app.mobile-interface) :is(#diplomacyPage, #drawer.atlas-panel-page) .diplomacy-heading :is(.atlas-tool, .atlas-return) { min-height: 44px; }
body:has(.app.mobile-interface) .city-planners-canvas-wrap {
  height: clamp(190px, 34vh, 280px);
}
body:has(.app.mobile-interface) .research-node-go {
  min-height: 30px;
  padding: 4px 11px;
}
body:has(.app.mobile-interface) :is(#diplomacyPage, #drawer.atlas-panel-page) .diplomacy-frame { padding: 3px; }

body:has(.app.mobile-interface) :is(#diplomacyPage .diplomacy-sections, #drawer.atlas-panel-page :is(.panel-views, .trade-tabs, .export-tabs)) button {
  flex: 1 0 auto;
  min-height: 44px;
  padding-inline: clamp(7px, 1.6vw, 14px);
  font-size: 12px;
}
body:has(.app.mobile-interface) :is(#diplomacyPage .diplomacy-sections, #drawer.atlas-panel-page :is(.panel-views, .trade-tabs, .export-tabs)) {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}
body:has(.app.mobile-interface) :is(#diplomacyPage, #drawer.atlas-panel-page) .diplomacy-footer { min-height: 0; padding-block: 4px; font-size: 11px; }

body:has(.app.mobile-interface) #diplomacyPage .diplomacy-content {
  display: grid;
  grid-template-columns: var(--phone-directory-width) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
}
body:has(.app.mobile-interface) #diplomacyPage .diplomacy-content-ledger { grid-template-columns: minmax(0, 1fr); }
body:has(.app.mobile-interface) #diplomacyPage .diplomacy-directory {
  border-inline-end: 3px double var(--atlas-rule);
  border-bottom: 0;
}
body:has(.app.mobile-interface) #diplomacyPage .diplomacy-directory-head { padding: 6px 7px 7px; }
body:has(.app.mobile-interface) #diplomacyPage .diplomacy-directory h2 { font-size: 17px; }
body:has(.app.mobile-interface) #diplomacyPage .diplomacy-search { gap: 3px; margin-block-start: 4px; }
body:has(.app.mobile-interface) #diplomacyPage .diplomacy-search input { padding-inline: 5px; font-size: 16px; }
body:has(.app.mobile-interface) #diplomacyPage .diplomacy-search input::placeholder { font-size: 11px; }
body:has(.app.mobile-interface) #diplomacyPage :is(.diplomacy-search input, .diplomacy-button, .diplomacy-support-form select) {
  min-height: 44px;
}
body:has(.app.mobile-interface) #diplomacyPage .diplomacy-search button { min-width: 44px; padding-inline: 5px; }

body:has(.app.mobile-interface) #diplomacyPage :is(.diplomacy-roster, .diplomacy-register) {
  min-height: 0;
  max-height: none;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
body:has(.app.mobile-interface) #diplomacyPage .diplomacy-player { min-height: 48px; gap: 5px; padding: 4px 6px; }
body:has(.app.mobile-interface) #diplomacyPage .diplomacy-player .diplomacy-portrait { width: 31px; }
body:has(.app.mobile-interface) #diplomacyPage .diplomacy-player .diplomacy-player-mark { width: 6px; height: 6px; }
body:has(.app.mobile-interface) #diplomacyPage .diplomacy-identity strong { font-size: 14px; }
body:has(.app.mobile-interface) #diplomacyPage .diplomacy-identity small { font-size: 11px; }
body:has(.app.mobile-interface) #diplomacyPage .diplomacy-roster-empty { padding: 10px 8px; }

body:has(.app.mobile-interface) #diplomacyPage .diplomacy-parties {
  grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  padding: 9px clamp(8px, 1.8vw, 16px);
}
body:has(.app.mobile-interface) #diplomacyPage .diplomacy-party {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  justify-items: start;
  gap: 6px;
  text-align: start;
}
body:has(.app.mobile-interface) #diplomacyPage .diplomacy-party .diplomacy-portrait { width: var(--phone-party-portrait); }
body:has(.app.mobile-interface) #diplomacyPage .diplomacy-link { height: var(--phone-party-portrait); gap: 2px; }
body:has(.app.mobile-interface) #diplomacyPage .diplomacy-handshake { width: 23px; }
body:has(.app.mobile-interface) #diplomacyPage .diplomacy-record { padding: 9px clamp(8px, 1.8vw, 16px); }
body:has(.app.mobile-interface) #diplomacyPage .diplomacy-record > header { padding-bottom: 7px; }
body:has(.app.mobile-interface) #diplomacyPage .diplomacy-pact { padding: 7px; gap: 6px; }
body:has(.app.mobile-interface) #diplomacyPage .diplomacy-pact-summary p { font-size: 12px; }
body:has(.app.mobile-interface) #diplomacyPage .diplomacy-footer { min-height: 0; padding-block: 4px; font-size: 11px; }

/* The catalog and the open production chain share the scrolling area of the phone page. */
.mobile-interface .scene:not(.world-mode) > #drawer.phone-panel-page[data-panel=build] {
  --phone-build-art: clamp(49px, 17dvh, 72px);
  display: grid;
  grid-template:
    'heading' auto
    'catalog' minmax(0, 1fr)
    'categories' auto / minmax(0, 1fr);
  overflow: hidden;
  background: radial-gradient(ellipse at 52% 0, #303d2e, transparent 72%), #19221c;
}

.mobile-interface .scene:not(.world-mode) > #drawer.phone-panel-page[data-panel=build] > .build-head {
  grid-area: heading;
  min-width: 0;
  border-radius: 0;
}

.mobile-interface .scene:not(.world-mode) > #drawer.phone-panel-page[data-panel=build] > .build-body {
  grid-area: catalog;
  min-width: 0;
  padding: 9px 9px 14px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #987b4d #18211b;
}

.mobile-interface .scene:not(.world-mode) > #drawer.phone-panel-page[data-panel=build] .cards {
  display: grid;
  gap: 12px;
  padding: 0;
  overflow: visible;
  background: none;
}

.mobile-interface .scene:not(.world-mode) > #drawer.phone-panel-page[data-panel=build] .build-section h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
  padding-block: 3px 6px;
  font-size: 12px;
}

.mobile-interface .scene:not(.world-mode) > #drawer.phone-panel-page[data-panel=build] .build-section h3 svg {
  display: block;
  width: 15px;
  height: 15px;
}

.mobile-interface .scene:not(.world-mode) > #drawer.phone-panel-page[data-panel=build] .build-items {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, clamp(85px, 13vw, 110px)), 1fr));
  grid-auto-flow: row;
  grid-auto-columns: auto;
  gap: 7px;
}

.mobile-interface .scene:not(.world-mode) > #drawer.phone-panel-page[data-panel=build] .build-items .card {
  grid-template-rows: var(--phone-build-art) minmax(24px, auto);
  row-gap: 3px;
  padding: 4px 5px 5px;
}

.mobile-interface .scene:not(.world-mode) > #drawer.phone-panel-page[data-panel=build] .build-items .card strong {
  font-size: 12px;
}

.mobile-interface .scene:not(.world-mode) > #drawer.phone-panel-page[data-panel=build] .build-items .build-info {
  display: grid;
  place-items: start end;
  width: 44px;
  height: 44px;
  top: 0;
  right: 0;
  padding: 6px;
  border: 0;
  border-radius: 0 9px 0 10px;
  background: linear-gradient(225deg, #101a15d9, transparent 70%);
}

.mobile-interface .scene:not(.world-mode) > #drawer.phone-panel-page[data-panel=build] .build-items .build-info[aria-expanded=true] {
  color: #fff0c9;
  background: linear-gradient(225deg, #73552e, transparent 75%);
}

.mobile-interface .scene:not(.world-mode) > #drawer.phone-panel-page[data-panel=build] .build-items .build-chain-shortcut {
  left: 0;
  right: auto;
  place-items: start;
  border-radius: 9px 0 10px 0;
  background: linear-gradient(135deg, #101a15d9, transparent 70%);
}
.mobile-interface .scene:not(.world-mode) > #drawer.phone-panel-page[data-panel=build] .build-items .build-chain-shortcut[aria-expanded=true] {
  background: linear-gradient(135deg, #73552e, transparent 75%);
}
.mobile-interface .scene:not(.world-mode) > #drawer.phone-panel-page[data-panel=build] .card:has(+ .build-chain-shortcut) .card-lock {
  top: 46px;
}

.mobile-interface .scene:not(.world-mode) > #drawer.phone-panel-page[data-panel=build] > .build-nav {
  grid-area: categories;
  min-width: 0;
  border-radius: 0;
}

.mobile-interface .scene:not(.world-mode) > #drawer.phone-panel-page[data-panel=build]:has(> .build-chain:not([hidden])) > :is(.build-head, .build-body, .build-nav) {
  visibility: hidden;
}

.mobile-interface .scene:not(.world-mode) > #drawer.phone-panel-page[data-panel=build] > .build-chain {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  width: auto;
  max-width: none;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: inherit;
  border: 0;
  border-radius: 0;
  background: radial-gradient(ellipse at 50% 0%, #323d2c, #18221c 68%);
  box-shadow: none;
}

.mobile-interface .scene:not(.world-mode) > #drawer.phone-panel-page[data-panel=build] > .build-chain::after {
  display: none;
}

.mobile-interface .scene:not(.world-mode) > #drawer.phone-panel-page[data-panel=build] :is(.build-chain-head, .chain-source) {
  flex: none;
}

.mobile-interface .scene:not(.world-mode) > #drawer.phone-panel-page[data-panel=build] .build-chain-head {
  min-height: 48px;
  margin: 0;
  padding: 0 4px 0 10px;
  background: linear-gradient(105deg, #3a392a, #242d25 78%);
  box-shadow: inset 0 1px #ffe0a626;
}

.mobile-interface .scene:not(.world-mode) > #drawer.phone-panel-page[data-panel=build] #buildChainTitle {
  padding: 0;
  color: #f4dfb5;
  font: 700 clamp(16px, 2.5vw, 22px)/1.15 var(--serif);
  overflow-wrap: anywhere;
  outline: none;
}

.mobile-interface .scene:not(.world-mode) > #drawer.phone-panel-page .chain-page-caption { display: inline; }
.mobile-interface .scene:not(.world-mode) > #drawer.phone-panel-page #closeBuildChain {
  flex: none;
  width: auto;
  padding: 0 8px;
  border: 1px solid var(--phone-panel-seam);
  border-radius: 8px;
  background: #242a21;
  color: #eed7a8;
}
.mobile-interface .scene:not(.world-mode) > #drawer.phone-panel-page #closeBuildChain > :is(svg, .drawer-close-label) { display: none; }

.mobile-interface .scene:not(.world-mode) > #drawer.phone-panel-page[data-panel=build] .chain-source {
  padding: 4px 10px;
  border-bottom: 1px solid var(--build-seam);
  background: #222c23;
  font-size: 12px;
}
.mobile-interface .scene:not(.world-mode) > #drawer.phone-panel-page[data-panel=build] .chain-source select {
  min-height: 44px;
  padding: 4px 8px;
  border-radius: 6px;
}

.mobile-interface .scene:not(.world-mode) > #drawer.phone-panel-page[data-panel=build] .chain-graph-scroll {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  padding: 12px;
  overscroll-behavior: contain;
  background: radial-gradient(circle, #aa94682e 1px, transparent 1px) 0 0 / 20px 20px;
}
.mobile-interface .scene:not(.world-mode) > #drawer.phone-panel-page[data-panel=build] .chain-graph {
  flex: none;
  margin: auto;
}

.mobile-interface .scene:not(.world-mode) > #drawer.phone-panel-page[data-panel=build] > .build-details {
  inset: auto calc(var(--safe-right) + 9px) calc(max(6px, var(--phone-dock-inset)) + 55px) auto;
  width: min(340px, 55%);
  max-height: calc(100% - var(--hud-top) - max(6px, var(--phone-dock-inset)) - 110px);
  overflow: auto;
  box-shadow: 0 7px 20px #0d130ed1;
}
.mobile-interface .scene:not(.world-mode) > #drawer.phone-panel-page[data-panel=build]:has(> .build-chain:not([hidden])) > .build-details {
  inset-block-end: calc(var(--phone-dock-inset) + 10px);
}
