dialog{width:min(94vw,1540px)!important;height:min(90svh,920px)!important;max-width:1540px!important;max-height:920px!important;inset:0!important;margin:auto!important;border:1px solid rgba(255,255,255,.16)!important;border-radius:18px!important;background:rgba(7,7,7,.88)!important;box-shadow:0 32px 110px rgba(0,0,0,.62)!important;backdrop-filter:blur(22px) saturate(.82);overflow:hidden}
dialog::backdrop{background:rgba(0,0,0,.5)!important;backdrop-filter:blur(12px) saturate(.72)}
dialog .detail{height:100%!important;min-height:0!important;padding:clamp(30px,5vh,52px) clamp(24px,3vw,48px)!important;box-sizing:border-box!important}
dialog .detail figure{height:100%!important;min-height:0!important;max-height:100%!important;padding:0 0 28px!important;box-sizing:border-box!important;overflow:hidden!important}
dialog .detail figure>img,dialog figure>img{max-height:calc(90svh - 160px)!important}
dialog>figure{height:100%!important;padding:clamp(30px,5vh,52px)!important;box-sizing:border-box!important}
dialog .close{position:absolute!important;z-index:8}
@media(max-width:800px){dialog{width:94vw!important;height:90svh!important;border-radius:14px!important;overflow:auto!important}dialog .detail{height:auto!important;min-height:100%!important}dialog .detail figure{height:auto!important;max-height:none!important}dialog .detail figure>img,dialog figure>img{width:auto!important;height:auto!important;max-width:100%!important;max-height:58svh!important}dialog .close{position:fixed!important}}
@media(prefers-reduced-motion:reduce){dialog::backdrop{backdrop-filter:blur(10px)}}

@media(max-width:800px){
  dialog{
    width:calc(100vw - 20px)!important;
    height:calc(100svh - 20px)!important;
    max-height:calc(100svh - 20px)!important;
    margin:10px!important;
    overflow:hidden!important;
  }
  dialog[open]{display:block!important}
  dialog .detail{
    height:100%!important;
    min-height:0!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    grid-template-rows:minmax(0,57%) minmax(0,43%)!important;
    gap:0!important;
    overflow:hidden!important;
    padding:18px 16px 16px!important;
  }
  dialog .detail figure{
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    margin:0!important;
    padding:0 30px 10px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    overflow:hidden!important;
  }
  dialog .detail figure>img,
  dialog figure>img{
    display:block!important;
    width:100%!important;
    height:100%!important;
    max-width:100%!important;
    max-height:100%!important;
    object-fit:contain!important;
  }
  dialog .copy{
    min-width:0!important;
    min-height:0!important;
    max-width:none!important;
    padding:10px 34px 0!important;
    overflow:hidden!important;
  }
  dialog .counter,
  dialog .artist{font-size:.58rem!important;line-height:1.25!important;margin:.15rem 0!important}
  dialog .copy h2{font-size:clamp(2rem,9.5vw,3.25rem)!important;line-height:.9!important;margin:.14em 0!important}
  dialog .description{font-size:.78rem!important;line-height:1.38!important;margin:.55rem 0!important}
  dialog .owner{font-size:.62rem!important;margin:.8rem 0!important}
  dialog .mint{font-size:.62rem!important;margin:.6rem 0!important}
  dialog .links{gap:.55rem!important;flex-wrap:nowrap!important}
  dialog .superrare,
  dialog .opensea{padding:.7rem .82rem!important;font-size:.58rem!important;white-space:nowrap!important}
  dialog .market-icons a,
  dialog .logo-link{width:36px!important;height:36px!important;flex:0 0 36px!important}
  dialog .close{
    position:absolute!important;
    top:10px!important;
    right:10px!important;
    width:42px!important;
    height:42px!important;
    display:grid!important;
    place-items:center!important;
    border-radius:50%!important;
    background:rgba(0,0,0,.68)!important;
    font-size:2rem!important;
  }
  dialog .prev,dialog .next{
    position:absolute!important;
    z-index:7!important;
    top:29%!important;
    width:42px!important;
    height:42px!important;
    padding:0!important;
    display:grid!important;
    place-items:center!important;
    border-radius:50%!important;
    background:rgba(0,0,0,.56)!important;
    font-size:1.45rem!important;
  }
  dialog .prev{left:8px!important}
  dialog .next{right:8px!important}
  dialog>figure{
    width:100%!important;
    height:100%!important;
    margin:0!important;
    padding:54px 48px 24px!important;
    gap:.65rem!important;
  }
  dialog>figure .viewer-info{gap:.65rem!important;font-size:.62rem!important}
}

@media(max-width:800px) and (max-height:700px){
  dialog .detail{grid-template-rows:minmax(0,53%) minmax(0,47%)!important}
  dialog .copy h2{font-size:clamp(1.75rem,8.5vw,2.7rem)!important}
  dialog .description{font-size:.7rem!important;line-height:1.3!important;margin:.35rem 0!important}
  dialog .owner{margin:.5rem 0!important}
  dialog>figure{padding-top:46px!important}
}

/* Keep every artwork fully visible, with equal breathing room above and below. */
dialog .detail figure{
  min-width:0!important;
  min-height:0!important;
  padding:clamp(20px,3vh,32px) 0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:hidden!important;
}
dialog .detail figure>img,
dialog figure>img{
  display:block!important;
  width:auto!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  object-position:center center!important;
  aspect-ratio:auto!important;
  flex:0 1 auto!important;
}
@media(max-width:800px){
  dialog .detail figure{padding:14px 30px!important}
  dialog .detail figure>img,dialog figure>img{width:auto!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;aspect-ratio:auto!important}
}

dialog.is-sold .copy::before{
  content:"Sold";
  display:inline-block;
  margin:0 0 .7rem;
  color:#e64a4a;
  font-size:.62rem;
  font-weight:500;
  letter-spacing:.2em;
  line-height:1;
  text-transform:uppercase;
}

dialog.has-long-title .copy h2{
  max-width:100%!important;
  font-size:clamp(2.5rem,4.2vw,5rem)!important;
  line-height:.92!important;
  overflow-wrap:break-word;
}

@media(min-width:801px){
  dialog .copy{
    min-width:0!important;
    max-width:100%!important;
  }
  dialog .copy h2{
    max-width:100%!important;
    font-size:clamp(2.5rem,4vw,5rem)!important;
    line-height:.94!important;
    overflow-wrap:normal;
    word-break:normal;
  }
}

/* Keep availability text inside narrow artwork dialogs. */
dialog .links{max-width:100%;min-width:0}
@media(max-width:900px){
 dialog .links{flex-wrap:wrap!important}
 dialog .links.is-available{grid-template-columns:minmax(0,1fr)!important;justify-items:start}
 dialog .links.is-available .available{grid-column:1!important;max-width:100%;white-space:normal!important;overflow-wrap:anywhere;line-height:1.6}
 dialog .links.is-available .market-icons{grid-column:1!important}
 dialog .links>a{max-width:100%;white-space:normal;overflow-wrap:anywhere}
}

.modal-action-arrow{display:inline-block;transition:transform .35s ease}dialog a:hover .modal-action-arrow,dialog a:focus-visible .modal-action-arrow,dialog button:hover .modal-action-arrow,dialog button:focus-visible .modal-action-arrow{transform:rotate(45deg)}
@media(prefers-reduced-motion:reduce){.modal-action-arrow{transition:none}}

dialog a.multiple-collectors{border-bottom:0!important;text-decoration:none!important;box-shadow:none!important;background-image:none!important}

/* Keep the three marketplace actions together only when all three exist. */
@media(max-width:800px){
 dialog#viewer .links.has-three-markets{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;gap:8px!important;width:100%!important}
 dialog#viewer .links.has-three-markets>#superrare-link{grid-column:1!important;grid-row:1!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:5px!important;width:100%!important;min-width:0!important;min-height:36px!important;box-sizing:border-box!important;padding:9px 6px!important;font-size:clamp(.47rem,2.05vw,.58rem)!important;letter-spacing:.08em!important;white-space:nowrap!important;overflow-wrap:normal!important}
 dialog#viewer .links.has-three-markets>.market-icons{grid-column:2!important;grid-row:1!important;display:flex!important;align-items:center!important;gap:6px!important;margin:0!important}
 dialog#viewer .links.has-three-markets>.market-icons>a{display:grid!important;place-items:center!important;width:36px!important;height:36px!important;min-width:36px!important;flex:0 0 36px!important;padding:0!important;box-sizing:border-box!important}
}
dialog .primary-availability{display:block;margin:.8rem 0;line-height:1.5}
dialog .owner[hidden]{display:none!important}
/* Collection-wide rule: when SR, OpenSea, and Transient are all available, keep the two marketplace logos beside SuperRare. */
@media(min-width:801px){
 body.collection-market-icons-inline dialog#viewer .links.has-three-markets{display:grid!important;grid-template-columns:max-content max-content!important;align-items:center!important;justify-content:start!important;gap:8px!important;width:max-content!important;max-width:100%!important}
 body.collection-market-icons-inline dialog#viewer .links.has-three-markets>#superrare-link{grid-column:1!important;grid-row:1!important;width:auto!important;min-width:0!important;max-width:100%!important}
 body.collection-market-icons-inline dialog#viewer .links.has-three-markets>.market-icons{grid-column:2!important;grid-row:1!important;display:flex!important;align-items:center!important;gap:6px!important;margin:0!important}
}
