/* v64: one generous masthead, with controls in reach instead of in its corners. */
body:is([data-section="menu"],[data-section="shop"]) .ts-header {
  top: env(safe-area-inset-top); width: 100%; height: 0;
}
body:is([data-section="menu"],[data-section="shop"]) .ts-header .brand {
  left: 50%; top: 0; width: min(94vw, 680px); height: auto;
}
body:is([data-section="menu"],[data-section="shop"]) .brand img { aspect-ratio: 1632 / 662; }
body[data-section="shop"] #header-home-slot {
  position: absolute; left: max(16px,env(safe-area-inset-left));
  top: min(29vw, 204px); pointer-events: none;
}
/* Same 44px touch targets; smaller artwork gives the right-side stack air. */
#sound-toggle img { width: 23px; height: 23px; }
.menu-dock {
  flex: none; width: min(var(--ts-column-width),calc(100% - 32px - env(safe-area-inset-left) - env(safe-area-inset-right)));
  display: grid; grid-template-columns: 44px minmax(0,1fr) 44px; gap: 8px; align-items: center;
}
#main-menu .menu-options { width: 100%; }
#main-menu .menu-option { justify-content: center; padding: 12px; }
#main-menu .menu-label-stack { flex: none; }
#main-menu :is(.menu-index,.menu-description,.menu-indicator,.menu-chevron) { display: none; }
.menu-control-slot { display: grid; place-items: center; }
.menu-audio-slot { position: absolute; z-index: 3; right: 16px; bottom: 12px; pointer-events: auto; }
.product-actions { display: grid; grid-template-columns: 48px minmax(0,1fr) 48px; gap: 8px; align-items: center; }
.product-actions :is(#cart-open,#menu-return) { width: 48px; height: 48px; }
.product-actions #count { top: -4px; right: -4px; }
.shop-audio-slot { position: absolute; right: 0; bottom: 52px; pointer-events: auto; }
/* Reduce repeated labels, retaining product identity, sizing and all details. */
body[data-section="shop"] .collection,
body[data-section="shop"] #product-panel .meta > span:first-child,
body[data-section="shop"] #description,
body[data-section="shop"] #product-panel > .panel-rule { display: none; }
body[data-section="shop"] #product-panel .meta { display: none; }
body[data-section="shop"] #product-panel { gap: 8px; }
body[data-section="shop"] #product-panel .product-links { min-height: 44px; }
@media (max-height: 540px) {
  body:is([data-section="menu"],[data-section="shop"]) .ts-header .brand { width: min(72vw,420px); }
  body[data-section="shop"] #header-home-slot { top: min(21vw,122px); }
  body[data-section="shop"] #product-panel { gap: 4px; }
}

/* Short landscape gets a two-column bottom panel so the scan and right stack
   stay clear of the masthead. Portrait retains the single-column app layout. */
@media (max-height: 440px) and (min-width: 600px) {
  body:is([data-section="menu"],[data-section="shop"]) .ts-header .brand { width: min(52vw,320px); }
  body[data-section="shop"] #header-home-slot { top: 104px; }
  body[data-section="shop"] #product-panel {
    width: min(680px,calc(100vw - 32px - env(safe-area-inset-left) - env(safe-area-inset-right)));
    grid-template-columns: minmax(0,1fr) minmax(0,1fr); column-gap: 16px;
  }
  #product-panel .title-row { grid-area: 1 / 1; }
  #product-panel .size-selector { grid-area: 1 / 2; }
  #product-panel .product-links { grid-area: 2 / 1; }
  #product-panel .product-actions { grid-area: 2 / 2; }
  body[data-section="shop"] #stage { width: min(680px,calc(100vw - 32px - env(safe-area-inset-left) - env(safe-area-inset-right))); }
}

/* The masthead stays in front of the Menu projection. */
body[data-entry="entered"][data-section="menu"] .ts-header { z-index: 3; }
body[data-entry="entered"][data-section="menu"] #twin-sections { z-index: 2; }

#shop-back-slot { display: grid; place-items: center; }
body[data-section="shop"] .product-actions #menu-return { pointer-events: auto; }
