/* Mobile scenes: the artwork gets the clear centre, actions share a quiet dock. */
@media (max-width:700px) {
  :root { --mobile-edge:16px; --mobile-safe:env(safe-area-inset-bottom,0px); }
  .gallery {height:100svh;height:100dvh;}
  .gallery .site-header {top:0;left:0;right:0;padding:8px var(--mobile-edge);padding-top:max(8px,env(safe-area-inset-top));display:block;min-height:60px;}
  .site-header .scene-sections.fap-site-nav {position:relative;inset:auto;display:flex;width:100%;max-width:none;flex-wrap:nowrap;min-height:44px;justify-content:space-between;gap:8px;}
  .site-header .fap-site-nav__home {font-size:12px;}
  .site-header .fap-site-nav__toggle {min-height:44px;padding:8px 10px;font-size:12px;gap:7px;}
  .site-header .header-utilities {position:absolute;z-index:6;left:50%;top:max(8px,env(safe-area-inset-top));height:44px;transform:translateX(-50%);gap:13px;white-space:nowrap;}
  .site-header .header-utilities .text-link {font-size:12px;min-height:44px;padding:0;gap:5px;}
  .site-header #about-button {display:none;}
  .gallery .scene-location {top:calc(66px + max(8px,env(safe-area-inset-top)));left:var(--mobile-edge);right:var(--mobile-edge);font-size:9px;letter-spacing:.13em;gap:10px;}
  .gallery .scene-return {top:calc(52px + max(8px,env(safe-area-inset-top)));left:var(--mobile-edge);font-size:11px;min-height:44px;}
  .scene-location .scene-line {width:18px;}
  .gallery .scene-nav {display:none;}
  body:not(.config-open) .scene-caption {left:var(--mobile-edge);right:var(--mobile-edge);bottom:calc(168px + var(--mobile-safe));width:auto;max-width:none;min-height:120px;display:flex;flex-direction:column;justify-content:end;}
  .gallery .scene-caption #collection-name,.gallery .scene-caption #selection-readout {display:none;}
  .gallery .scene-caption h1 {font-size:clamp(23px,6.5vw,29px);line-height:1.08;letter-spacing:-.04em;margin:0;max-width:none;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;}
  .gallery .scene-caption .artist {font-size:12px;line-height:1.4;margin:8px 0 0;}
  .gallery .scene-caption #scene-status {font-size:11px;line-height:1.4;margin:6px 0 0;}
  .gallery .scene-caption #scene-status:empty {display:none;}
  .gallery .home-art-search {left:var(--mobile-edge);right:var(--mobile-edge);bottom:calc(108px + var(--mobile-safe));height:44px;min-height:44px;width:auto;padding-left:14px;border-radius:14px;}
  .home-art-search input {font-size:16px;}
  .home-art-search button {width:44px;height:44px;}
  body:not(.config-open):not(.search-open) #configure,
  body:not(.config-open):not(.search-open) #ar-access {position:fixed;bottom:calc(52px + var(--mobile-safe));width:calc((100% - 40px)/2);height:48px;min-height:48px;max-width:none;padding:9px 12px;border-radius:15px;gap:5px;transform:none;}
  body:not(.config-open):not(.search-open) #configure {left:auto;right:var(--mobile-edge);font-size:13px;}
  body:not(.config-open):not(.search-open) #ar-access {left:var(--mobile-edge);right:auto;}
  body:not(.search-open) #ar-access .ar-access-label {font-size:12px;gap:5px;}
  body:not(.search-open) #configure small,body:not(.search-open) #ar-access small {display:none;}
  body:not(.search-open) #configure .circle-arrow,body:not(.search-open) #ar-access .button-caret {width:10px;height:12px;}
  .gallery .gallery-footer {left:var(--mobile-edge);right:var(--mobile-edge);bottom:calc(4px + var(--mobile-safe));height:44px;min-height:0;justify-content:center;}
  .gallery .gallery-footer .materials-footer,.gallery .gallery-footer .scene-counter {display:none;}
  .gallery .scroll-cue {min-height:44px;padding:6px 12px;font-size:10px;border:0;background:transparent;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;gap:9px;}
  .gallery .scroll-cue .scroll-mark {width:15px;height:20px;}
  .gallery .scene-shade {background:linear-gradient(180deg,rgba(0,0,0,.26),transparent 19%,transparent 56%,rgba(0,0,0,.42));}
  .audience-entry {padding:var(--mobile-edge);align-items:end;padding-bottom:calc(168px + var(--mobile-safe));}
  .audience-entry-content {width:100%;max-width:390px;min-height:120px;display:flex;flex-direction:column;justify-content:end;}
  .audience-entry .audience-entry-heading h2 {font-size:23px;line-height:1.15;margin:0 0 16px;text-align:center;}
  .audience-entry .audience-choices {gap:10px;}
  .audience-entry .audience-choice {min-height:48px;height:48px;padding:10px 14px;font-size:15px;gap:12px;border-radius:24px;}
  .audience-entry-close {min-height:44px;font-size:12px;}
  body.audience-choosing:not(.search-open) .scene-caption,
  body.audience-choosing:not(.search-open) #configure,
  body.audience-choosing:not(.search-open) #ar-access {visibility:hidden;pointer-events:none;}
  .search-open .audience-entry {align-items:center;padding-bottom:var(--mobile-edge);}
  /* A room occupies the upper half; the paper and controls scroll below it. */
  body.config-open:not(.wall-artwork-view) .gallery {height:52svh;height:52dvh;width:100%;}
  body.config-open:not(.wall-artwork-view) .config-panel {top:52svh;top:52dvh;bottom:0;left:0;right:0;width:100%;height:48svh;height:48dvh;padding:16px 20px calc(28px + var(--mobile-safe));border-radius:20px 20px 0 0;overscroll-behavior:contain;}
  body.config-open:not(.wall-artwork-view) .gallery .site-header,
  body.config-open:not(.wall-artwork-view) .gallery .scene-caption,
  body.config-open:not(.wall-artwork-view) .gallery .scene-location {display:none;}
  body.config-open:not(.wall-artwork-view) .scene-return {top:8px;left:var(--mobile-edge);min-height:44px;max-width:calc(100% - 32px);font-size:11px;padding:8px 0;}
  body.config-open:not(.search-open):not(.wall-artwork-view) #ar-access,
  body.config-open:not(.search-open):not(.wall-artwork-view) #scene-next-room {bottom:calc(48svh + 12px);bottom:calc(48dvh + 12px);height:44px;min-height:44px;width:calc((100% - 40px)/2);padding:8px 10px;}
  body.config-open:not(.search-open) #ar-access {left:var(--mobile-edge);right:auto;}
  body.config-open:not(.search-open) #scene-next-room {left:auto;right:var(--mobile-edge);}
  .config-panel .panel-art {margin:12px 0 18px;}
  .config-panel .panel-art h2 {font-size:24px;line-height:1.15;}
  .config-panel .panel-collection {display:none;}
  .config-panel .panel-top {margin-bottom:10px;}
  .config-panel .configured-print-preview {height:40svh;min-height:210px;max-height:360px;}
  .config-panel .custom-dimensions {font-size:32px;}
  .config-panel .fap-print-quality {margin:10px 0 18px;padding:12px 0;}
  .config-panel .fap-print-quality__metrics {margin-top:8px;}
  .config-panel .fap-print-quality__note {max-width:40em;}
}
@media (max-width:359px) {
  .site-header .header-utilities {gap:8px;}
  .site-header .header-utilities .text-link,.site-header .fap-site-nav__home,.site-header .fap-site-nav__toggle {font-size:11px;}
  body:not(.search-open) #ar-access .ar-access-label {font-size:11px;}
  body:not(.config-open):not(.search-open) #configure {font-size:12px;}
}
@media (max-width:380px) and (max-height:700px) {
  body:not(.config-open) .scene-caption,.audience-entry-content {min-height:84px;}
  .gallery .scene-caption h1 {font-size:22px;-webkit-line-clamp:2;}
  .audience-entry .audience-entry-heading h2 {font-size:20px;margin-bottom:12px;}
}
