/* A New Dimension: original retro wallpaper collection. */
.nd-invitation,
.new-dimension {
  --nd-night: #271d3b;
  --nd-deep: #1c142b;
  --nd-panel: #322647;
  --nd-line: #68547f;
  --nd-cream: #f8f0e3;
  --nd-muted: #d6c9df;
  --nd-pink: #efb7c1;
  --nd-sans: "Trebuchet MS", Arial, sans-serif;
  color: var(--nd-cream);
}

.nd-invitation {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(180px, .7fr);
  grid-column: 1 / -1;
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
  min-width: 0;
  padding: 30px clamp(24px, 4vw, 48px);
  border: 2px solid var(--nd-line);
  background: var(--nd-night);
  box-shadow: 0 5px 0 var(--nd-deep);
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
  text-decoration: none;
}

.nd-invitation::before,
.nd-console::before {
  content: "";
  position: absolute;
  inset: 9px;
  pointer-events: none;
  background:
    linear-gradient(var(--nd-pink), var(--nd-pink)) left top / 18px 3px no-repeat,
    linear-gradient(var(--nd-pink), var(--nd-pink)) left top / 3px 18px no-repeat,
    linear-gradient(var(--nd-pink), var(--nd-pink)) right bottom / 18px 3px no-repeat,
    linear-gradient(var(--nd-pink), var(--nd-pink)) right bottom / 3px 18px no-repeat;
  opacity: .7;
}

.nd-invitation:hover {
  border-color: var(--nd-pink);
  transform: translateY(-2px);
  box-shadow: 0 7px 0 var(--nd-deep);
}

.nd-invitation:active {
  transform: translateY(2px);
  box-shadow: 0 3px 0 var(--nd-deep);
}

.nd-invitation[aria-selected="true"] {
  border-color: var(--nd-pink);
}

.nd-invitation:focus-visible,
.new-dimension :is(a, button):focus-visible {
  outline: 3px solid var(--nd-pink);
  outline-offset: 5px;
}

.nd-invitation-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.nd-kicker {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--nd-pink);
  font: 700 11px/1.5 var(--nd-sans);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.nd-controller {
  flex: 0 0 auto;
  width: 44px;
  height: 32px;
  overflow: visible;
}

.nd-feature-title,
.nd-heading h2 {
  display: block;
  margin: 16px 0 17px;
  color: var(--nd-cream);
  font: 800 clamp(35px, 4.7vw, 57px)/1.03 var(--nd-sans);
  letter-spacing: -.045em;
  text-wrap: balance;
}

.nd-feature-title span,
.nd-heading h2 span {
  color: var(--nd-pink);
}

.nd-feature-description {
  max-width: 33ch;
  color: var(--nd-muted);
  font: 15px/1.65 Arial, sans-serif;
}

.nd-feature-formats {
  margin-top: 18px;
  color: var(--nd-cream);
  font: 12px/1.6 Arial, sans-serif;
}

.nd-feature-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: 45px;
  margin-top: 19px;
  padding: 11px 15px;
  border: 1px solid #f7d0d5;
  background: var(--nd-pink);
  color: var(--nd-deep);
  box-shadow: 0 3px 0 #997388;
  font: 700 13px/1.4 var(--nd-sans);
}

.nd-feature-cta svg {
  width: 22px;
  height: 18px;
}

.nd-invitation-art {
  display: block;
  width: min(100%, 272px);
  justify-self: end;
  border: 1px solid #9784ad;
  background: var(--nd-deep);
  box-shadow: 8px 8px 0 #171120;
  transform: rotate(2deg);
}

.nd-invitation-art img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1122 / 1402;
  object-fit: contain;
}

.new-dimension {
  margin-top: 44px;
  padding-top: 8px;
}

.new-dimension > .collection-return {
  color: #775266;
}

.nd-console {
  position: relative;
  padding: clamp(23px, 3.7vw, 42px);
  border: 2px solid var(--nd-line);
  background: var(--nd-night);
  box-shadow: 0 5px 0 var(--nd-deep);
}

.nd-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 30px;
}

.nd-heading h2 {
  margin-bottom: 0;
  font-size: clamp(33px, 3.9vw, 48px);
}

.nd-heading > p {
  max-width: 35ch;
  margin: 0 0 3px;
  color: var(--nd-muted);
  font: 14px/1.7 Arial, sans-serif;
}

.nd-studio {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "preview options" "preview download";
  align-items: start;
  gap: 26px 30px;
}

.nd-options {
  grid-area: options;
  min-width: 0;
}

.nd-group {
  min-width: 0;
  margin: 0 0 25px;
  padding: 0;
  border: 0;
}

.nd-group:last-child {
  margin-bottom: 0;
}

.nd-group legend {
  float: none;
  width: 100%;
  padding: 0;
  margin-bottom: 13px;
  color: var(--nd-cream);
  font: 700 14px/1.5 var(--nd-sans);
}

.nd-step {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  margin-right: 8px;
  border: 1px solid var(--nd-line);
  color: var(--nd-pink);
  font: 11px/1 ui-monospace, monospace;
}

.nd-worlds {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.nd-world {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 7px;
  border: 2px solid var(--nd-line);
  background: var(--nd-panel);
  color: var(--nd-cream);
  text-align: left;
  transition: border-color .15s ease, background-color .15s ease;
}

.nd-world[aria-pressed="true"] {
  border-color: var(--nd-pink);
  background: #4a344f;
}

.nd-world:hover {
  border-color: #c4abc9;
}

.nd-world-art {
  position: relative;
  display: block;
  flex: 0 0 auto;
  height: clamp(95px, 12vw, 145px);
  width: 100%;
  overflow: hidden;
  background: var(--nd-deep);
}

.new-dimension .nd-world-art > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}

.nd-world-name {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 9px 3px 2px;
  font: 700 14px/1.4 var(--nd-sans);
}

.nd-world-check {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  color: var(--nd-pink);
  visibility: hidden;
}

.nd-world[aria-pressed="true"] .nd-world-check {
  visibility: visible;
}

.nd-buttons {
  display: flex;
  gap: 8px;
}

.nd-choice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  gap: 7px;
  min-width: 0;
  min-height: 46px;
  padding: 10px 8px;
  border: 1px solid var(--nd-line);
  background: var(--nd-panel);
  color: var(--nd-cream);
  font: 700 12px/1.4 var(--nd-sans);
  transition: background-color .15s ease, border-color .15s ease;
}

.nd-choice[aria-pressed="true"] {
  border-color: var(--nd-pink);
  background: var(--nd-pink);
  color: var(--nd-deep);
  box-shadow: 0 3px 0 #997388;
}

.nd-choice:hover {
  border-color: #d9c0dc;
}

.nd-choice svg {
  flex: 0 0 auto;
  width: 18px;
  height: 20px;
}

.nd-preview {
  grid-area: preview;
  min-width: 0;
  margin: 0;
  padding: 20px;
  border: 1px solid var(--nd-line);
  background: var(--nd-deep);
}

.nd-preview-link {
  display: grid;
  place-items: center;
  min-height: 400px;
}

.nd-preview-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 600px;
  object-fit: contain;
  box-shadow: 0 10px 24px #100b1a;
}

.nd-preview-error {
  max-width: 30ch;
  padding: 36px 10px;
  color: var(--nd-muted);
  font: 14px/1.65 Arial, sans-serif;
  text-align: center;
}

.nd-preview figcaption {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 18px;
  color: var(--nd-muted);
  font: 12px/1.55 Arial, sans-serif;
}

.nd-preview-title {
  color: var(--nd-cream);
  font: 700 15px/1.4 var(--nd-sans);
}

.nd-download-panel {
  grid-area: download;
  min-width: 0;
  padding-top: 22px;
  border-top: 1px solid var(--nd-line);
}

.nd-size-note {
  margin: 0 0 14px;
  color: var(--nd-muted);
  font: 12px/1.65 Arial, sans-serif;
}

.nd-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #f7d0d5;
  background: var(--nd-pink);
  color: var(--nd-deep);
  box-shadow: 0 4px 0 #997388;
  font: 700 14px/1.45 var(--nd-sans);
  text-align: center;
  transition: background-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.nd-download:hover {
  background: #f7cbd2;
}

.nd-download:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #997388;
}

.nd-download svg {
  width: 20px;
  height: 20px;
}

.nd-open-image {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  margin-top: 10px;
  color: var(--nd-cream);
  font: 13px/1.5 Arial, sans-serif;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.nd-open-image svg {
  width: 13px;
  height: 13px;
}

.nd-save-hint {
  max-width: 39ch;
  margin: 0;
  color: var(--nd-muted);
  font: 12px/1.6 Arial, sans-serif;
}

.nd-fallback {
  display: grid;
  grid-template-columns: minmax(140px, .7fr) minmax(0, 1fr);
  align-items: center;
  gap: 30px;
}

.nd-fallback > img {
  width: min(100%, 270px);
  height: auto;
  justify-self: center;
  object-fit: contain;
}

.nd-fallback-note {
  margin: 0 0 18px;
  color: var(--nd-muted);
  font: 14px/1.6 Arial, sans-serif;
}

.nd-fallback-downloads {
  display: grid;
  gap: 15px;
}

@media (max-width: 900px) {
  .nd-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .nd-heading > p {
    max-width: 54ch;
  }

  .nd-studio {
    gap: 24px 20px;
  }

  .nd-preview {
    padding: 14px;
  }

  .nd-preview-link {
    min-height: 330px;
  }

  .nd-choice {
    flex-direction: column;
    gap: 4px;
    min-height: 58px;
  }

  .nd-orientation .nd-choice {
    flex-direction: row;
    min-height: 44px;
  }
}

@media (max-width: 680px) {
  .nd-invitation {
    grid-template-columns: minmax(0, 1fr) minmax(100px, .64fr);
    gap: 18px;
    padding: 25px 22px;
  }

  .nd-invitation .nd-kicker {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    font-size: 9px;
  }

  .nd-feature-title {
    margin-top: 12px;
    font-size: clamp(29px, 5.5vw, 36px);
  }

  .nd-feature-description {
    font-size: 12px;
  }

  .nd-feature-formats {
    margin-top: 13px;
    font-size: 10px;
  }

  .nd-feature-cta {
    gap: 9px;
    padding: 10px 11px;
    font-size: 11px;
  }

  .nd-feature-cta svg {
    flex: 0 0 auto;
    width: 17px;
  }

  .nd-studio {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "options" "preview" "download";
    gap: 24px;
  }

  .nd-world-art {
    height: 125px;
  }

  .nd-choice {
    flex-direction: row;
    min-height: 48px;
  }

  .nd-group {
    margin-bottom: 23px;
  }

  .nd-preview-link {
    min-height: 0;
  }

  .nd-preview-image {
    max-height: 570px;
    max-height: min(570px, 75svh);
  }

  .nd-download-panel {
    padding-top: 0;
    border-top: 0;
  }
}

@media (max-width: 430px) {
  .nd-invitation {
    grid-template-columns: minmax(0, 1fr);
    gap: 25px;
    padding: 28px 24px;
  }

  .nd-invitation .nd-kicker {
    flex-direction: row;
    align-items: center;
    font-size: 10px;
  }

  .nd-invitation-art {
    width: min(100%, 220px);
    justify-self: center;
    order: -1;
  }

  .nd-feature-title {
    font-size: 36px;
  }

  .nd-feature-description {
    max-width: 34ch;
    font-size: 13px;
  }

  .nd-feature-formats {
    font-size: 11px;
  }

  .nd-feature-cta {
    font-size: 12px;
  }

  .nd-console {
    padding: 25px 16px;
  }

  .nd-heading {
    margin-bottom: 25px;
  }

  .nd-heading h2 {
    font-size: 34px;
  }

  .nd-heading .nd-kicker {
    font-size: 9px;
  }

  .nd-world-art {
    height: 108px;
  }

  .nd-worlds {
    gap: 9px;
  }

  .nd-world-name {
    font-size: 13px;
  }

  .nd-buttons {
    gap: 6px;
  }

  .nd-choice {
    gap: 4px;
    padding-inline: 6px;
    font-size: 11px;
  }

  .nd-choice svg {
    width: 15px;
  }

  .nd-fallback {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nd-invitation,
  .nd-world,
  .nd-choice,
  .nd-download {
    transition: none;
  }

  .nd-invitation:hover,
  .nd-invitation:active,
  .nd-download:active {
    transform: none;
  }
}

/* The cartridge label anchors both the home feature and the collection tab. */
.nd-invitation {
  display:block; overflow:hidden; isolation:isolate; padding:clamp(23px,4.5vw,52px);
  border:2px solid #a88b58; border-radius:24px 5px 24px 5px;
  background:#251c38; min-height:260px;
}
.nd-invitation::before {
  inset:0; z-index:-1; opacity:1;
  background:linear-gradient(90deg,#251c38 3%,#251c38f5 26%,#251c38aa 47%,transparent 76%);
}
.nd-invitation .nd-card-panorama {
  position:absolute; inset:0 0 0 auto; width:76%; height:100%; z-index:-2;
  object-fit:cover; object-position:center; border:0; margin:0;
}
.nd-card-copy {display:grid; justify-items:start; gap:9px; position:relative;}
.nd-invitation .nd-cartridge {width:clamp(42px,5.5vw,74px); height:auto;}
.nd-card-title {font:bold italic clamp(32px,5.2vw,67px)/1.04 Georgia,serif; color:#ffe5a8; letter-spacing:-.035em;}
.nd-card-subtitle {font:500 clamp(13px,1.6vw,20px)/1.45 var(--nd-sans); color:#fff3df;}
.nd-card-action {margin-top:12px; padding:13px 20px; color:#32213b; background:#ffde9d; font:700 15px/1.35 var(--nd-sans); clip-path:polygon(0 0,calc(100% - 8px) 0,100% 8px,100% 100%,0 100%);}
.nd-options {
  container-type: inline-size;
}
.nd-worlds {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.nd-world {
  display: grid;
  grid-template-rows: auto 1fr auto;
  place-items: center;
  gap: 4px;
  padding: 10px 6px;
  font: 700 14px/1.35 var(--nd-sans);
  text-align: center;
  text-wrap: balance;
}
.nd-world img {
  width: 36px;
  height: 36px;
}
.nd-world small {
  color: var(--nd-muted);
  font: 400 13px/1.4 var(--nd-sans);
}
@container (max-width: 22rem) {
  .nd-worlds {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
  .nd-world {
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto;
    justify-items: start;
    gap: 8px;
    min-height: 44px;
    padding: 6px 10px;
    text-align: left;
  }
  .nd-world img {
    width: 28px;
    height: 28px;
  }
}
.nd-world[aria-pressed="true"] {border-color:#ffda95; color:#ffe6b2;}
.nd-heading h2,.nd-heading h2 span {color:#ffe5a8;}
.nd-heading .nd-controller {height:44px;}
@media (max-width:550px) {
  .nd-invitation {min-height:235px;}
  .nd-invitation .nd-card-panorama {width:100%; object-position:64% center;}
  .nd-invitation::before {background:linear-gradient(90deg,#21162ff7 0%,#241831d4 32%,#27193484 68%,#251c3830);}
  .nd-card-title {max-width:8.8em; text-shadow:0 1px 3px #201229;}
  .nd-card-subtitle {max-width:17ch; text-shadow:0 1px 3px #201229;}
}
