/* Shared header and footer geometry across public and protected routes. */
html.desktop-window{overflow-y:hidden;scrollbar-gutter:stable}
html.desktop-window:has(.inventory-site-chrome){overflow-y:scroll}
html.inventory-brand-steady #brandHome .adaptive-logo{transform:var(--inventory-brand-transform,none)!important;transition:none!important}
:root{--mobile-nav-content-height:61px;--mobile-nav-safe-height:34px;--mobile-nav-total-height:calc(var(--mobile-nav-content-height) + var(--mobile-nav-safe-height))}
/* The mobile footer remains in the public document while inventory content mounts. */
.inventory-shell{position:fixed;inset:0 0 var(--mobile-nav-total-height);z-index:15;opacity:0;overflow:auto;background:#fff;isolation:isolate}
.inventory-shell.preparing{visibility:hidden;pointer-events:none}
.inventory-shell.visible{opacity:1}
.inventory-shell[hidden]{display:none!important}
html.inventory-shell-open .nav011-top,html.inventory-shell-open #desktopSearchReveal{visibility:hidden}
html.nav011.inventory-shell-open:not(.desktop-window) body .site-title{z-index:20!important;background:transparent!important;pointer-events:none}
html.inventory-shell-open .site-title #brandHome,html.inventory-shell-open .site-title .utility-nav{pointer-events:auto}
.inventory-shell-message{position:fixed;bottom:calc(var(--mobile-nav-total-height) + 12px);left:50%;transform:translateX(-50%);z-index:30;max-width:calc(100% - 32px);padding:8px 14px;border-radius:20px;background:#eee;color:#575757;font-size:14px}
@media(prefers-reduced-motion:reduce){.inventory-shell{transition:none}}


/* Browser tabs have no app footer or reserved footer space. Installed mode keeps
   the existing 61px controls + 34px safe area, unchanged on every route. */
html:not(.desktop-window):not(.qc-standalone){--mobile-nav-total-height:0px;--bottom-height:0px!important;--inventory-bottom-height:0px}
html.nav011:not(.desktop-window):not(.qc-standalone) body .utility-nav,
html:not(.desktop-window):not(.qc-standalone) .inventory-site-chrome .utility-nav{display:none!important}

/* Private inventory controls are installed-app UI, never browser-tab UI. */
html:not(.qc-standalone) .profile-button{display:none!important}
html.inventory-browser-blocked body{visibility:hidden!important}

/* The installed app requests portrait. Where rotation cannot be controlled,
   keep the active page or dialog ready for the return to portrait. */
#qc-portrait-notice{
  position:fixed;
  inset:0;
  width:100%;
  height:100%;
  max-width:none;
  max-height:none;
  margin:0;
  padding:24px;
  border:0;
  background:Canvas;
  color:CanvasText;
  font:inherit;
  text-align:center;
}
#qc-portrait-notice[open]{display:grid;place-content:center}
#qc-portrait-notice::backdrop{background:Canvas}

/* Reveal the popup surface without moving its layout, focus, or keyboard anchor. */
:root{--qc-dots-image:url('/assets/v014-loading-dots.webp');--qc-dots-palette:none}
@media(prefers-color-scheme:dark){:root{--qc-dots-palette:invert(1)}}
@media(prefers-reduced-motion:reduce){:root{--qc-dots-image:url('/assets/v014-loading-dots-still.webp')}}
#siteLoading,#qc-artist-view[aria-busy="true"]::before{
 width:61px;height:61px;background:var(--qc-dots-image) center/contain no-repeat;filter:var(--qc-dots-palette)
}
#siteLoading{border:0;backdrop-filter:none;-webkit-backdrop-filter:none}
#siteLoading .ink-loading{display:none}
#qc-artist-view[aria-busy="true"]::before{
 content:'';position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);pointer-events:none
}
html:not(.inventory-shell-open) body:not(.artwork-open) #pager:has([data-loading-current][data-awaiting-first-artwork])::after{
 content:'';position:absolute;left:50%;top:50%;width:61px;height:61px;transform:translate(-50%,-50%);
 background:var(--qc-dots-image) center/contain no-repeat;filter:var(--qc-dots-palette);pointer-events:none
}
#pager [data-loading-current][data-awaiting-first-artwork] .masonry{opacity:0}

@media (prefers-reduced-motion:no-preference){
 .desktop-dropdown:not([hidden]),.artwork-publication[open]:not(.is-draft-transition),
 .inventory-access-login[open],#inventory-dialog[open]{
  animation:qc-popup-open var(--qc-popup-duration,250ms) cubic-bezier(.24,.72,.29,1)
 }
 .nav011-searchbar:not([hidden]),.nav011-menu:not([hidden]),.nav011-options:not([hidden]){
  --qc-compact-from:0 2px calc(100% - 38px) calc(100% - 40px);
  --qc-compact-middle:0 0 34% 43%;
  --qc-compact-surface:19px;
  transform-origin:top right;animation:qc-compact-popup-open 310ms cubic-bezier(.24,.68,.29,1)
 }
 .nav011-searchbar:not([hidden]){
  --qc-compact-from:7px 3px 7px calc(100% - 39px);
  --qc-compact-middle:3px 0 3px 56%;
  --qc-compact-surface:999px;
  transform-origin:right center
 }
 .nav011-searchbar:not([hidden])>*,.nav011-menu:not([hidden])>*,.nav011-options:not([hidden])>*{
  animation:qc-compact-content-open 310ms ease-out
 }
 .desktop-dropdown{--qc-popup-from:0 15% 18% 0;--qc-popup-radius:10px}
 .artwork-publication,.inventory-access-login,#inventory-dialog{
  --qc-popup-from:6% 5%;--qc-popup-rebound:.45% .25%;--qc-popup-duration:270ms
 }
 .artwork-publication{--qc-popup-radius:var(--publication-radius,34px)}
 .inventory-access-login{--qc-popup-radius:24px}
 #inventory-dialog{--qc-popup-radius:16px}
 @keyframes qc-popup-open{
  0%{clip-path:inset(var(--qc-popup-from,3% 4%) round var(--qc-popup-radius,16px));opacity:.86}
  68%{clip-path:inset(0 round var(--qc-popup-radius,16px));opacity:1}
  84%{clip-path:inset(var(--qc-popup-rebound,.75%) round var(--qc-popup-radius,16px))}
  100%{clip-path:inset(0 round var(--qc-popup-radius,16px))}
 }
 @keyframes qc-compact-popup-open{
  0%{clip-path:inset(var(--qc-compact-from) round 999px);transform:translateY(-5px);opacity:.82}
  32%{clip-path:inset(var(--qc-compact-middle) round 28px);transform:translateY(-1px)}
  69%{clip-path:inset(-30px round var(--qc-compact-surface));transform:scale(1.026,1.075);opacity:1}
  85%{clip-path:inset(-30px round var(--qc-compact-surface));transform:scale(.994,.982)}
  100%{clip-path:inset(-30px round var(--qc-compact-surface));transform:scale(1)}
 }
 @keyframes qc-compact-content-open{
  0%,26%{opacity:0;filter:blur(1.2px)}
  82%,100%{opacity:1;filter:blur(0)}
 }
}
