html.atlas-dialog-open { overflow: hidden; }

dialog.atlas-dialog {
  inset: 0;
  margin: auto;
  width: min(1060px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
}

dialog.atlas-dialog::backdrop {
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(10px);
}

dialog.atlas-dialog.atlas-dialog-opening { overflow: visible; }
.atlas-dialog-flying-card {
  position: fixed;
  z-index: 1;
  transform-origin: top left;
  object-fit: contain;
  border-radius: 3px;
  box-shadow: 0 10px 30px #0007;
  pointer-events: none;
}

.atlas-dialog-panel {
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  padding: clamp(34px, 5vw, 68px) clamp(22px, 5vw, 72px) 22px;
}

.atlas-dialog-panel::-webkit-scrollbar { display: none; }

.atlas-dialog-close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid #d3b97965;
  border-radius: 50%;
  color: var(--gold);
  cursor: pointer;
}

.atlas-dialog-close { position: absolute; z-index: 2; top: 9px; right: 10px; font-size: 22px; background: #241b2b; }
.atlas-dialog-close:hover { background: #d3b97923; }
.atlas-dialog :focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.atlas-dialog-content {
  overflow: hidden;
  overflow: clip;
  overflow-clip-margin: 20px;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(24px, 5vw, 74px);
}

.atlas-dialog-art {
  width: min(100%, 380px, max(145px, calc((100vh - 175px) * .6667)));
  margin-inline: auto;
  aspect-ratio: 2 / 3;
  perspective: 1000px;
  touch-action: pan-x pinch-zoom;
}
.atlas-dialog-card { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.atlas-dialog-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 3px;
  object-fit: contain;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 0 10px 30px #0007;
}
.atlas-card-back { transform: rotateY(180deg); }

.atlas-dialog-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 3px;
  pointer-events: none;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  mix-blend-mode: screen;
  background: linear-gradient(117deg, transparent 38%, #67aaff88 44%, #bb80ff8c 47%,
    #fff3d0b8 50%, #ff86ba85 53%, #ffda7177 56%, #61e6c380 59%, transparent 65%);
  background-size: 285% 100%;
  background-repeat: no-repeat;
  animation: atlas-dialog-foil 2s ease-in-out infinite;
}

.atlas-dialog-opening .atlas-dialog-card::after { animation-play-state: paused; }

@keyframes atlas-dialog-foil {
  0% { background-position: 100% center; opacity: 0; }
  13%, 35% { opacity: .8; }
  52%, 100% { background-position: 0% center; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .atlas-dialog-card::after {
    animation: none;
    background-position: 50% center;
    opacity: .24;
  }
}

dialog.atlas-dialog h2 { margin: 8px 0 16px; font-size: clamp(29px, 4.5vw, 58px); line-height: 1.16; }
.atlas-dialog-copy .atlas-dialog-description { margin-top: 20px; }
.atlas-dialog-description { color: #d4c8d3; font-size: 14px; line-height: 1.85; }
.atlas-dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
dialog.atlas-dialog .atlas-dialog-actions button { width: auto; margin: 0; min-height: 43px; padding: 0 12px; gap: 7px; font-size: 14.3px; }

.atlas-dialog-copy h2 {
  position: relative;
  width: fit-content;
}

.atlas-swipe-hint {
  position: absolute;
  top: 50%;
  inset-inline-start: calc(100% + .42em);
  width: clamp(48px, 4.4vw, 60px);
  transform: translateY(-50%);
  height: auto;
  color: #fff;
  opacity: .76;
  pointer-events: none;
  filter: drop-shadow(0 1px 2px #000);
}

.atlas-dialog-opening .atlas-swipe-hint { visibility: hidden; }

@media (prefers-reduced-motion: no-preference) {
  .atlas-swipe-hint { animation: atlas-swipe-hint-fade 2.8s linear both; }
  .atlas-swipe-hand {
    transform-box: fill-box;
    transform-origin: center top;
    animation: atlas-swipe-hand 2.8s ease-in-out both;
  }
}

@keyframes atlas-swipe-hint-fade {
  0% { opacity: 0; }
  6%, 86% { opacity: .76; }
  100% { opacity: 0; }
}

@keyframes atlas-swipe-hand {
  0% { transform: translateY(0) scale(1.18); }
  26%, 45% { transform: translateY(0) scale(.88); }
  76%, 100% { transform: translateY(23px) scale(.88); }
}

.about-dialog .about-art { min-height: clamp(180px, 29vw, 340px); order: 0; }
.about-dialog .about-orbit { width: min(90%, 325px); }
.about-dialog .about-copy { padding: 0; }
.about-dialog .about-wordmark { display: block; width: min(100%, 250px); height: auto; }
.about-dialog .atlas-dialog-content { animation: about-overlay-enter .3s ease-out both; }
@keyframes about-overlay-enter {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .about-dialog .atlas-dialog-content { animation: none; }
}

@media (max-width: 640px) {
  .atlas-dialog-panel { padding: 47px 17px 14px; }
  .atlas-dialog-content {
  overflow: hidden;
  overflow: clip;
  overflow-clip-margin: 20px; grid-template-columns: 1fr; gap: 15px; }
  .atlas-dialog-content { --atlas-narrow-card-width: min(180px, 24vh); }
  .atlas-dialog-art { width: var(--atlas-narrow-card-width); }
  .atlas-dialog-copy h2 { width: auto; }
  .atlas-swipe-hint {
    width: 38px;
    inset-inline-start: auto;
    inset-inline-end: calc((100% - var(--atlas-narrow-card-width)) / 2);
  }
  dialog.atlas-dialog h2 { margin-bottom: 9px; }
  .atlas-dialog-copy .atlas-dialog-description, .atlas-dialog-actions { margin-top: 12px; }
  .atlas-dialog-description { font-size: 13px; }
  .about-dialog .about-art {
    --about-symbol-width: min(32%, 100px);
    min-height: 120px;
    justify-content: flex-start;
  }
  .about-dialog .about-symbol { width: var(--about-symbol-width); }
  .about-dialog .about-orbit {
    width: min(42%, 140px);
    inset-inline-start: calc(var(--about-symbol-width) / 2);
    transform: translate(-50%, -50%);
  }
}
