.mini-atlas {
  container: atlas / inline-size;
  position: relative;
  isolation: isolate;
  color: var(--ink, #20342c);
  background: #e4ebe1;
  font-family: var(--font-body, Hanken, sans-serif);
}

.mini-atlas *, .mini-atlas *::before, .mini-atlas *::after { box-sizing: border-box; }
.mini-atlas [hidden] { display: none !important; }
.atlas-static { padding: clamp(3rem, 11vw, 12rem) 6%; }
.atlas-static h1 { font-family: var(--font-display, Fraunces, Georgia, serif); }

.atlas-frame {
  --gutter: var(--side, clamp(1rem, 3.6cqw, 4.5rem));
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  min-block-size: max(40rem, calc(100svh - var(--atlas-header-height, 70px)));
  overflow: clip;
}

.atlas-skies, .atlas-sky, .atlas-light {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.atlas-skies { isolation: isolate; background: #e3e9df; }
.atlas-sky {
  opacity: 0;
  transition: opacity 950ms ease;
  background: radial-gradient(ellipse at 52% 49%, #fff8e6a3 0%, #fff8e600 47%),
    linear-gradient(158deg, var(--sky-top) 5%, var(--sky-bottom) 96%);
}
.atlas-sky.is-current { opacity: 1; }
.atlas-light {
  inset: -4%;
  background: radial-gradient(ellipse at 78% 22%, #fffae982 0%, #fff8e500 25%),
    radial-gradient(ellipse at 20% 70%, #ffffff38 0%, #ffffff00 18%);
  animation: atlas-light 15s ease-in-out infinite alternate;
}
@keyframes atlas-light { to { opacity: .46; transform: translate(-2%, 1%); } }

.atlas-stage {
  position: relative;
  grid-area: 1 / 1 / 3 / -1;
  min-width: 0;
  min-height: 0;
  isolation: isolate;
  touch-action: pan-y pinch-zoom;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  cursor: grab;
}
.mini-atlas.is-gripped .atlas-stage,
.mini-atlas.is-gripped .atlas-model-hit { cursor: grabbing; }
.atlas-ghost {
  position: absolute;
  inset: 5.5% 1% auto;
  margin: 0;
  color: #354c3c;
  opacity: .135;
  font: 520 var(--ghost-size, 15cqw)/.91 var(--font-display, Fraunces, Georgia, serif);
  font-optical-sizing: auto;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: -.07em;
  white-space: nowrap;
  pointer-events: none;
}
.atlas-ghost.is-changing { opacity: 0; }
.atlas-ghost, .atlas-caption-text, .atlas-look-items { transition: opacity 165ms ease; }

.atlas-model {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--model-size, 1px);
  height: var(--model-size, 1px);
  transform-origin: 0 0;
  pointer-events: none;
}
.atlas-model-float, .atlas-model-image, .atlas-model-fallback, .atlas-model-hit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.atlas-model-image { display: block; max-width: none; object-fit: contain; }
.atlas-model-float {
  animation: atlas-float 6s ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
}
@keyframes atlas-float { 50% { transform: translateY(-1.55%); } }
.atlas-model-shadow {
  position: absolute;
  left: 19%;
  right: 19%;
  bottom: .5%;
  height: 9%;
  background: radial-gradient(ellipse closest-side, #4d463c50 0%, #4d463c25 41%, #4d463c00 100%);
  animation: atlas-shadow 6s ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
}
@keyframes atlas-shadow { 50% { transform: scale(.9); opacity: .74; } }
.mini-atlas.is-still :is(.atlas-model-float,.atlas-model-shadow,.atlas-light) { animation-play-state: paused; }
.atlas-model-fallback {
  display: grid;
  place-content: center;
  text-align: center;
  color: #536356;
  font: 500 max(1rem, calc(var(--model-size) * .09)) var(--font-display, Georgia, serif);
}
.atlas-model-hit {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  box-shadow: none;
  background: transparent;
  pointer-events: auto;
  cursor: grab;
  border-radius: 50%;
}
.atlas-model-hit:focus-visible { outline: 2px solid var(--ink, #20342c); outline-offset: -.25rem; }

.atlas-caption, .atlas-look, .atlas-controls { position: relative; z-index: 2; }
.atlas-caption {
  grid-area: 2 / 1;
  align-self: end;
  justify-self: start;
  width: min(100%, 28.5rem);
  padding: 0 0 clamp(1.75rem, 4.4vh, 3.75rem) var(--gutter);
}
.atlas-region, .atlas-look h2 {
  margin: 0;
  font-family: var(--font-body, Hanken, sans-serif);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.atlas-caption h1 {
  margin: .28rem 0 .52rem;
  font-family: var(--font-display, Fraunces, Georgia, serif);
  font-size: min(clamp(2.8rem, 5.45cqw, 6rem), var(--title-fit, 1000px));
  font-optical-sizing: auto;
  font-weight: 530;
  letter-spacing: -.06em;
  line-height: 1.02;
  overflow-wrap: anywhere;
}
.atlas-intro {
  margin: 0;
  max-width: 34ch;
  font-size: clamp(1rem, 1.12cqw, 1.16rem);
  line-height: 1.45;
  text-wrap: pretty;
}
.atlas-guide-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  width: fit-content;
  max-width: 100%;
  text-align: center;
  overflow-wrap: anywhere;
  margin-top: .95rem;
  border: 1px solid transparent;
  border-radius: 100px;
  padding: .62rem 1.3rem;
  color: #fffaf2;
  background: var(--atlas-accent, #803825);
  font: 690 1rem/1.2 var(--font-body, Hanken, sans-serif);
  text-decoration: none;
  transition: background-color 160ms ease, transform 140ms ease;
}
.atlas-guide-link:active, .atlas-controls button:active { transform: scale(.975); }
.atlas-look {
  grid-area: 2 / 3;
  align-self: end;
  justify-self: end;
  width: min(15.25rem, calc(100% - var(--gutter)));
  margin: 0 var(--gutter) clamp(1.75rem, 4.4vh, 3.75rem) 0;
  border-top: 1px solid #20342c61;
  padding-top: .7rem;
}
.atlas-look h2 { margin-bottom: .35rem; }
.atlas-look ul { list-style: none; margin: 0; padding: 0; }
.atlas-look li { padding: .35rem 0; border-bottom: 1px solid #20342c2c; line-height: 1.2; }
.atlas-caption-text.is-changing, .atlas-look-items.is-changing { opacity: 0; }

.atlas-controls {
  grid-area: 2 / 2;
  align-self: end;
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .38rem;
  margin: 0 .7rem clamp(1.75rem, 4.4vh, 3.75rem);
  line-height: 1;
}
.atlas-controls button {
  appearance: none;
  display: inline-grid;
  place-items: center;
  min-height: 44px;
  margin: 0;
  padding: .55rem .92rem;
  border: 1px solid #20342c4d;
  border-radius: 99px;
  color: inherit;
  background: #fffdf03d;
  cursor: pointer;
  font: 630 .84rem/1.1 var(--font-body, Hanken, sans-serif);
}
.atlas-count { padding: 0 .28rem; white-space: nowrap; font-size: .78rem; font-variant-numeric: tabular-nums; }
.atlas-dots { display: flex; align-items: center; gap: 0; }
.atlas-dots button {
  position: relative;
  min-width: 24px;
  width: 24px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
}
.atlas-dots button::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 9px;
  background: currentColor;
  opacity: .43;
  transition: transform 170ms ease, opacity 170ms ease;
}
.atlas-dots button[aria-current="true"]::before { transform: scaleX(2.8); opacity: 1; }
.atlas-controls .atlas-play { border-color: transparent; background: transparent; }
.mini-atlas :is(.atlas-controls button,.atlas-guide-link):focus-visible { outline: 2px solid var(--ink, #20342c); outline-offset: 3px; }
.atlas-screen-reader {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
@media (hover: hover) {
  .atlas-guide-link:hover { background: color-mix(in srgb, var(--atlas-accent, #803825), #171c16 22%); }
  .atlas-controls button:hover { background: #fffdf096; }
  .atlas-dots button:hover::before { opacity: 1; }
}
@container atlas (max-width: 1179px) {
  .atlas-dots { display: none; }
}
@container atlas (min-width: 1020px) and (max-width: 1179px) {
  .atlas-frame { min-block-size: max(35rem, calc(100svh - var(--atlas-header-height, 70px))); }
}
@container atlas (max-width: 1019px) {
  .atlas-frame {
    min-block-size: calc(100svh - var(--atlas-header-height, 70px));
    grid-template-columns: minmax(0, 1fr) minmax(0, .65fr);
    grid-template-rows: auto auto auto;
    align-content: center;
  }
  .atlas-stage { grid-area: 1 / 1 / 2 / -1; height: clamp(21rem, min(58svh, 105cqw), 36rem); }
  .atlas-ghost { top: 6%; }
  .atlas-caption { grid-area: 2 / 1; align-self: start; padding: .35rem var(--gutter) 0; width: 100%; }
  .atlas-look { grid-area: 2 / 2; align-self: start; margin: .6rem var(--gutter) 0 0; }
  .atlas-controls { grid-area: 3 / 1 / 4 / -1; margin: 1.15rem var(--gutter) 1.5rem; }
}
@container atlas (max-width: 639px) {
  .atlas-frame { grid-template-columns: minmax(0, 1fr); }
  .atlas-stage { grid-area: 1 / 1; height: clamp(230px, min(59svh, 128cqw), 510px); }
  .atlas-ghost { top: 7%; }
  .atlas-caption { grid-area: 2 / 1; padding: .45rem max(1rem, 5cqw) 0; text-align: center; }
  .atlas-caption h1 { font-size: clamp(2.35rem, 11.7cqw, 3.8rem); margin: .25rem 0 .42rem; }
  .atlas-intro { max-width: 34ch; margin-inline: auto; }
  .atlas-guide-link { margin-top: .83rem; }
  .atlas-look { display: none; }
  .atlas-controls { grid-area: 3 / 1; margin: .85rem .6rem 1rem; }
}
@media (max-height: 520px) {
  @container atlas (min-width: 640px) and (max-width: 1199px) {
    .atlas-frame {
      grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
      grid-template-rows: minmax(0, 1fr) auto;
      min-block-size: max(19rem, calc(100svh - var(--atlas-header-height, 70px)));
      align-content: stretch;
    }
    .atlas-stage { grid-area: 1 / 1 / 3 / 2; min-height: 19rem; height: auto; overflow: clip; }
    .atlas-ghost { top: 3%; }
    .atlas-caption { grid-area: 1 / 2; align-self: end; padding: 1.1rem var(--gutter) 0 .7rem; }
    .atlas-caption h1 { font-size: clamp(2rem, 5cqw, 3.1rem); }
    .atlas-look, .atlas-dots { display: none; }
    .atlas-controls { grid-area: 2 / 2; justify-self: start; justify-content: flex-start; margin: .65rem .4rem 1rem; }
    .atlas-controls button { padding-inline: .63rem; }
  }
}
@media (prefers-reduced-motion: reduce) {
  .mini-atlas :is(.atlas-sky,.atlas-ghost,.atlas-caption-text,.atlas-look-items,.atlas-guide-link,.atlas-dots button::before) { transition: none; }
  .mini-atlas :is(.atlas-model-float,.atlas-model-shadow,.atlas-light) { animation: none; }
}
