/* v15.00 GALLERY — sole owner of gallery visual/layout rules. Shared canvas mechanics live in stage.css. */

/* This artwork-first portal never exposes the generic fallback shell. */
body.gallery-page .site-shell,
body.gallery-page .skip-link{display:none}
.gallery-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-top:20px}.art-tile{aspect-ratio:4/5;border:1px solid var(--line);border-radius:18px;background:linear-gradient(180deg,rgba(69,46,120,.75),rgba(17,13,31,.96));padding:18px;display:flex;flex-direction:column;justify-content:flex-end;position:relative;overflow:hidden}.art-tile::before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 50% 20%,rgba(239,198,107,.12),transparent 36%),linear-gradient(180deg,transparent,rgba(8,6,14,.58));}.art-tile>*{position:relative;z-index:1}
/* Sonam Zangmo v14.01 — extracted page-local styles from gallery.html */

/* GALLERY DESKTOP v12.32 — artwork-first canvas + SZ-only navigation. Scoped to /gallery only.
   Mobile/tablet (<=767px) stays exactly as before. */
.gallery-page .gallery-desktop-artwork,
.gallery-page .gallery-sz-home{display:none;}

@keyframes gallerySzHomeIn{
  to{opacity:1;transform:translateY(0);}
}


  html,
  body.gallery-page{
    width:100%;
    min-width:100%;
    height:100%;
    min-height:100%;
    margin:0;
    padding:0;
    overflow:hidden;
    background:#17111f;
  }
  body.gallery-page > .skip-link,
  body.gallery-page > .site-shell{
    display:none;
  }
  body.gallery-page .gallery-desktop-artwork{
    position:fixed;
    inset:0;
    z-index:1;
    display:grid;
    place-items:start center;
    overflow:hidden;
    background:#17111f;
  }
  body.gallery-page .gallery-desktop-artwork-stage{
    position:relative;
    width:max(100vw,177.683vh);
    aspect-ratio:1672 / 941;
    flex:0 0 auto;
    line-height:0;
    overflow:hidden;
  }
  body.gallery-page .gallery-desktop-artwork-stage > .gallery-desktop-artwork-picture,
  body.gallery-page .gallery-desktop-artwork-stage > .gallery-desktop-artwork-picture > img{
    position:absolute;
    inset:0;
    display:block;
    width:100%;
    height:100%;
    max-width:none;
    object-fit:cover;
    object-position:50% 50%;
    user-select:none;
    -webkit-user-drag:none;
  }
  /* Gallery desktop navigation — only the SZ sigil, matching About Sonam. */
  body.gallery-page .gallery-sz-home{
    position:fixed;
    top:24px;
    left:clamp(24px,3vw,54px);
    z-index:5;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    text-decoration:none;
    opacity:0;
    transform:translateY(-8px);
    animation:gallerySzHomeIn .62s cubic-bezier(.2,.72,.22,1) .22s forwards;
  }
  body.gallery-page .gallery-sz-home .mini-sigil{
    display:grid;
    place-items:center;
    width:44px;
    height:44px;
    box-sizing:border-box;
    border-radius:50%;
    border:1px solid rgba(239,198,107,.55);
    background:rgba(8,6,15,.12);
    color:#efc66b;
    font-family:Georgia,"Times New Roman",serif;
    font-size:1.35rem;
    font-weight:400;
    line-height:1;
    box-shadow:0 0 0 1px rgba(239,198,107,.12) inset,0 2px 12px rgba(0,0,0,.20);
    text-shadow:0 2px 12px rgba(0,0,0,.72);
    -webkit-backdrop-filter:blur(2px);
    backdrop-filter:blur(2px);
    transition:background .2s ease,border-color .2s ease,transform .2s ease;
  }
  body.gallery-page .gallery-sz-home:hover .mini-sigil,
  body.gallery-page .gallery-sz-home:focus-visible .mini-sigil{
    background:rgba(8,6,15,.22);
    border-color:rgba(239,198,107,.78);
    transform:translateY(-1px);
  }
  body.gallery-page .gallery-sz-home:focus-visible{
    outline:none;
  }


@media (prefers-reduced-motion:reduce){
  body.gallery-page .gallery-sz-home{
    animation:none;
    opacity:1;
    transform:translateY(0);
  }
}

/* =========================================================
   TOUCH MASTER CANVAS — GALLERY PAGE CONTENT ONLY
   ========================================================= */
html.sz-stage-active body.gallery-page .gallery-desktop-artwork{
  display:block;position:absolute;left:0;top:0;right:auto;bottom:auto;
  width:1672px;height:941px;overflow:hidden;background:#17111f;z-index:1;
}
html.sz-stage-active body.gallery-page .gallery-desktop-artwork-stage,
html.sz-stage-active body.gallery-page .gallery-desktop-artwork-picture,
html.sz-stage-active body.gallery-page .gallery-desktop-artwork-picture > img{
  display:block;position:absolute;inset:0;width:1672px;height:941px;max-width:none;
  min-width:0;min-height:0;margin:0;padding:0;object-fit:fill;object-position:0 0;
}
html.sz-stage-active body.gallery-page .gallery-sz-home{
  display:inline-flex;position:absolute;top:24px;left:50px;right:auto;bottom:auto;
  z-index:5;opacity:1;transform:none;animation:none;
}
