/* Phone-only progressive enhancement. Pills remain the native desktop/fallback UI. */
.globe-location-field { display: none; }
.globe-lead { z-index: 1; }
html[data-lang="li"] .globe-stage { position: relative; }
/* F77: the professional globe's glass, land and light canvases (globe.js) exactly under its pins canvas, in that order */
.globe-plate { position: absolute; left: 0; top: 0; width: 100%; aspect-ratio: 1; pointer-events: none; }
.globe-plate[hidden] { display: none; }
html[data-lang="li"] .globe-canvas { position: relative; }
.globe-selected-label { position: absolute; z-index: 2; pointer-events: none; border-radius: 5px; padding: 6px 10px; background: #183b4d; color: #fff; font: 600 13px/18px "Source Sans 3", sans-serif; white-space: nowrap; }
.globe-selected-label[hidden] { display: none; }
/* Both visual styles occupy the same stage; only the globe's rendering changes. */
@media (min-width:901px) {
  /* 560 px in both views (F61), but never taller than a laptop screen leaves under the bar and the heading: at
     1280x720 a fixed 560 ran 76 px off the screen (globe-fit-check) */
  .home .globe { grid-template-columns: minmax(0,min(560px,calc(100svh - 250px))) minmax(280px,1fr); }
  /* The fixed-height side group balances the sphere; changing place never moves the controls or globe. */
  .globe-side { align-self: center; max-width: 620px; }
  .globe-text { font-size: 20px; line-height: 1.45; }
}
@media (max-width:600px) {
  /* the phone layout holds from first paint: globe.js marks the block data-compact only as it mounts (it loads as the
     work comes near), so these rules no longer wait for it */
  .home #work { padding-block: 12px 32px; }
  .home #work .panel-head { padding-bottom: 0; margin-bottom: 8px; border-bottom: 0; }
  .home #work .panel-head h2 { font-size: 28px; }
  .home .globe { gap: 8px; }
  .globe .globe-pins { display: none; }
  .globe[data-compact] .globe-location-field { display: block; grid-row: 1; min-width: 0; }
  .globe-location-select { display: block; width: 100%; min-height: 44px; padding: 9px 36px 9px 12px; border: 1px solid var(--globe-ink); border-radius: 6px; background: var(--bg); color: var(--fg); font: 500 16px/1.4 var(--display); }
  .globe-location-select:focus-visible { outline: 2px solid var(--globe-hot); outline-offset: 3px; }
  .globe .globe-stage { width: min(100%,clamp(176px,calc(100svh - 488px),280px)); height: auto; aspect-ratio: 2 / 1; }
  /* F77: both phone views use the same half globe, leaving the full work log below the chooser and visible pin. */
  html[data-lang="li"] .globe .globe-text { line-height: 1.3; gap: 4px; }
  /* The place's label stays inside the visible half, including the longest, United Kingdom. */
  .globe .globe-selected-label { padding: 5px 8px; font-size: 12px; line-height: 16px; }
  .globe .globe-text { font: 400 16px/1.35 "Source Sans 3", "PingFang TC", "Microsoft JhengHei", sans-serif; gap: 5px; }
  .globe .globe-text li { padding-left: 14px; }
  .globe .globe-text li::before { left: 2px; width: 4px; height: 4px; }
  .globe .globe-say { gap: 10px; }
  .globe .globe-tagrow { gap: 5px 8px; }
  .globe .globe-tags { gap: 4px; }
  .globe .globe-tags li { padding: 3px 5px; font: 400 12px/1.25 var(--display); text-transform: none; letter-spacing: 0; }
  .globe .globe-tagname { min-width: 44px; font: 400 12px/1.25 var(--display); text-transform: none; letter-spacing: 0; }
  /* Until globe.js has mounted the block already has the size it will keep, so a link to About below it lands true
     (QA, 8 Oct 2026: /#about on a phone landed 166 to 203 px too far as this block shrank 179 to 216 px after load):
     the place chooser's 44 px row, and Hong Kong open, the place it opens on (globe.js choose(pins[0])). */
  .home .globe:not([data-compact])::before { content: ""; grid-row: 1; height: 44px; }
  .globe:not([data-pin]) .globe-show[data-pin="hk"][hidden] { display: grid; visibility: visible; }
  .globe:not([data-pin]) .globe-under { display: none; }
}
/* Tablet follows the same controls / globe / details sequence in every view. */
@media (min-width:601px) and (max-width:900px) {
  .globe-side { display: contents; }
  .globe-pins { grid-row: 1; }
  .globe-stage { grid-row: 2; width: min(100%, 420px); }
  .globe-call { grid-row: 3; }
  .home .globe { gap: 16px; }
}
/* No place open: the overview line and every place's modules fill the work's reserved cell (globe.js); hidden like the
   line when a place opens, so the cell keeps its room. Phones keep the line only. */
.globe-overview { display: grid; align-content: start; gap: 12px; }
.globe-overview .globe-under { margin: 0; }
.globe[data-pin] .globe-overview { visibility: hidden; }
@media (max-width:600px) { .globe-overview .globe-tagrow { display: none; } }
/* Playful English and 中文 show a food fact per place, so the work modules stay in the Professional view only (Mike,
   7 Oct 2026, via the Manager): no tag row under a place's fact or under the overview line. The English tags stay in
   the page, since globe.js builds the overview's modules from them for the Professional view. */
.globe-say:is([data-l="en"], [data-l="zh"]) .globe-tagrow,
html:not([data-lang="li"]) .globe-overview .globe-tagrow { display: none; }
/* Compact layouts (F55, Mike 7 Oct 2026: "balance, no blank, things pack well"): only the open place's lines, or the
   overview with none open, take room. At 1135px the desktop side still exceeds the sphere; at 1136px the controls fit
   three rows and the full side fits beside it. Keep the wider desktop's existing centred composition. */
@media (max-width:1135px) {
  .globe .globe-show[hidden] { display: none; }
  .globe[data-pin] .globe-overview { display: none; }
  /* The hidden translation must not reserve the longer language's height either. */
  html:not([data-lang="en"]) .globe-show > [data-l="en"],
  html:not([data-lang="zh"]) .globe-show > [data-l="zh"],
  html:not([data-lang="li"]) .globe-show > [data-l="li"] { display: none; }
}
/* Short copy changes the side's height. Anchor its controls at the top so centring cannot move them (F19). */
@media (min-width:901px) and (max-width:1135px) {
  .globe-side { align-self: start; }
}
