:root {
  --bg: #faf7f1;
  --ink: #302a3b;
  --green: #183e35;
  --gold: #d9ab70;
  --rose: #c98690;
  --space: clamp(20px, 5vw, 72px);
  --shop-radius: 18px;
  --shop-shadow: 0 16px 40px #183e3514;
  font-family: Poppins, system-ui, sans-serif;
  background: var(--bg);
}
.shop-nav,
.shop-footer,
body > main {
  max-width: 1280px;
  margin: auto;
}
.shop-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px var(--space);
  gap: 24px;
  border-bottom: 1px solid var(--border);
}
.wordmark {
  font:
    500 1.8rem "Playfair Display",
    serif;
  text-decoration: none;
  color: var(--green);
  white-space: nowrap;
}
.wordmark span {
  display: block;
  font:
    0.5rem Poppins,
    sans-serif;
  letter-spacing: 2px;
  margin-top: 6px;
}
.shop-nav nav,
.shop-footer nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 0.75rem;
}
.shop-nav a {
  text-decoration: none;
}
.shop-nav #menuToggle {
  display: none;
}
.shop-hero {
  padding: 70px var(--space);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: center;
  background: radial-gradient(ellipse at 90% 30%, #e7eadf, transparent 55%);
}
.shop-hero h1 {
  font:
    500 clamp(2.7rem, 5vw, 4.7rem) / 1.08 "Playfair Display",
    serif;
  letter-spacing: -2px;
  margin-bottom: 25px;
}
.shop-hero em {
  color: var(--rose);
}
.shop-hero p {
  font-size: 0.85rem;
  line-height: 1.9;
  color: var(--muted);
}
.shop-hero .text-button {
  margin-left: 20px;
  text-decoration: none;
}
.shop-hero small {
  display: block;
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 20px;
}
.hero-paper {
  text-align: center;
  padding: 42px 25px 20px;
  background: #fff0ed;
  border: 8px solid #fffdfa;
  border-radius: var(--shop-radius);
  box-shadow: var(--shop-shadow);
  transform: rotate(5deg);
}
.hero-paper > span {
  font: 2.4rem Georgia;
  color: var(--rose);
}
.hero-paper h2 {
  font:
    500 1.7rem/1.4 "Playfair Display",
    serif;
  margin-top: 20px;
}
.hero-paper img {
  width: 125px;
  height: 125px;
}
.hero-paper small {
  font-size: 0.5rem;
}
.shop-catalogue,
.how-it-works,
.ai-intro,
.shop-faq {
  padding: 50px var(--space);
  scroll-margin-top: 20px;
}
.shop-catalogue h2,
.how-it-works h2,
.ai-intro h2,
.shop-faq h2 {
  font:
    500 clamp(1.8rem, 3vw, 2.6rem) / 1.3 "Playfair Display",
    serif;
}
.shop-catalogue > p,
.ai-intro p,
.shop-faq p {
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--muted);
}
.shop-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 30px 0 16px;
  align-items: end;
}
.shop-filters label {
  flex: 1 1 150px;
  min-width: 0;
  font-size: 0.65rem;
  display: grid;
  gap: 7px;
}
.shop-filters input,
.shop-filters select {
  width: 100%;
  min-width: 0;
  background: #fffefa;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  font-size: 1rem;
  min-height: 48px;
}
.shop-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}
.shop-card {
  padding: 14px;
  background: #fffefa;
  border: 1px solid var(--border);
  border-radius: var(--shop-radius);
}
.shop-card h3 {
  font:
    500 1.15rem "Playfair Display",
    serif;
  margin: 18px 0 8px;
}
.shop-card p {
  font-size: 0.65rem;
  color: var(--muted);
  line-height: 1.8;
}
.shop-thumbnail {
  aspect-ratio: 3/4;
  overflow: hidden;
  border-radius: 8px;
  padding: 22px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  gap: 20px;
  position: relative;
  background-image: radial-gradient(ellipse at 0 0, #ffffff22, transparent 70%);
}
.shop-thumbnail:before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid currentColor;
  border-radius: 70px 70px 5px 5px;
  opacity: 0.2;
}
.shop-thumbnail strong {
  font:
    500 1.35rem/1.3 var(--thumbnail-font, "Playfair Display"),
    serif;
}
.shop-thumbnail img {
  width: min(100%, 180px);
  height: auto;
  max-height: 155px;
  object-fit: contain;
}
.shop-card .button {
  width: 100%;
  font-size: 0.72rem;
}
.shop-card .text-button {
  width: 100%;
}
.how-it-works {
  background: #edf0e6;
}
.how-it-works > div {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 35px;
}
.how-it-works article b {
  color: #9a6b3c;
  font:
    2rem "Playfair Display",
    serif;
}
.how-it-works h3 {
  font:
    1.2rem "Playfair Display",
    serif;
  margin-top: 20px;
}
.how-it-works p {
  font-size: 0.8rem;
  line-height: 1.8;
  color: var(--muted);
}
.ai-intro {
  background: #f3e9e6;
}
.shop-faq {
  max-width: 850px;
  margin: auto;
}
.shop-faq details {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  font-size: 0.85rem;
}
.shop-faq summary {
  cursor: pointer;
  min-height: 30px;
}
.shop-footer {
  padding: 35px var(--space);
  border-top: 1px solid var(--border);
}
.shop-footer p {
  font-size: 0.75rem;
  color: var(--muted);
}
dialog {
  max-width: min(94vw, 460px);
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg);
  padding: 20px;
  max-height: 94svh;
  overflow: auto;
}
dialog::backdrop {
  background: #183e3588;
}
dialog iframe {
  max-width: 280px;
  margin: 20px auto;
}
dialog h2 {
  font:
    1.5rem "Playfair Display",
    serif;
  margin-top: 20px;
}
.information {
  max-width: 800px !important;
  padding: 40px 24px;
  line-height: 1.8;
}
.information h1,
.information h2 {
  font-family: "Playfair Display", serif;
}
.draft-tools {
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.draft-tools p {
  font-size: 0.7rem;
  margin: 0;
  width: 100%;
}
@media (max-width: 950px) {
  .shop-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .shop-hero {
    gap: 40px;
  }
  .shop-nav nav {
    gap: 12px;
  }
  .shop-nav {
    flex-wrap: wrap;
  }
}
@media (max-width: 600px) {
  .shop-nav #menuToggle {
    display: inline-flex;
  }
  .shop-nav nav {
    display: none;
    width: 100%;
    flex-direction: column;
  }
  .shop-nav nav.is-open {
    display: flex;
  }
  .shop-nav nav a {
    padding: 12px 0;
  }
  .shop-hero {
    grid-template-columns: 1fr;
    padding-block: 40px;
    gap: 35px;
  }
  .hero-paper {
    max-width: 270px;
    width: 100%;
    margin: auto;
  }
  .shop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .shop-card {
    padding: 10px;
  }
  .shop-thumbnail {
    padding: 16px 10px;
    gap: 12px;
  }
  .shop-thumbnail strong {
    font-size: 1rem;
  }
  .shop-thumbnail img {
    width: 100%;
    max-height: 105px;
    height: auto;
  }
  .shop-card h3 {
    font-size: 1rem;
  }
  .shop-filters label {
    flex-basis: 40%;
  }
  .how-it-works > div {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .shop-catalogue,
  .how-it-works,
  .ai-intro,
  .shop-faq {
    padding-block: 35px;
  }
  .shop-footer nav {
    gap: 16px;
  }
}
/* Long labels and enlarged text must wrap inside the existing shop layout. */
.wordmark {
  white-space: normal;
  overflow-wrap: anywhere;
  min-width: 0;
  max-width: 100%;
}
.shop-nav > * {
  min-width: 0;
  max-width: 100%;
}
.shop-card,
.shop-thumbnail,
.shop-card h3 {
  min-width: 0;
  overflow-wrap: anywhere;
}
.shop-nav nav a,
.shop-footer nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
/* Rotation expands with the paper's text height and spills at enlarged text sizes. */
@media (max-width: 950px) {
  .hero-paper {
    transform: none;
  }
}

/* Collection browsing uses the same calm paper surfaces as the creator. */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 25px 0;
}
.collection-tile {
  text-align: left;
  border: 1px solid #cfcbbb;
  background: #f0efe5;
  color: #29483c;
  border-radius: 14px;
  padding: 18px;
  cursor: pointer;
  min-height: 104px;
  font: inherit;
}
.collection-tile strong {
  font:
    500 1.2rem "Playfair Display",
    serif;
  display: block;
  margin-bottom: 8px;
}
.collection-tile span {
  display: block;
  font-size: 0.72rem;
  line-height: 1.6;
}
.collection-tile:nth-child(3n + 2) {
  background: #f5e8e6;
}
.collection-tile:nth-child(3n) {
  background: #ede9df;
}
.collection-tile[aria-pressed="true"] {
  outline: 2px solid #315a4c;
  outline-offset: 2px;
}
.catalogue-count {
  font-weight: 600;
  color: #315a4c !important;
}
.static-promise {
  padding: 12px 16px;
  background: #edf1e9;
  border-radius: 10px;
}
.thumbnail-occasion {
  font:
    500 0.55rem Poppins,
    sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.shop-thumbnail[data-style="gold"]:before {
  border-color: #d7b877;
  border-radius: 0;
  inset: 10px;
  opacity: 0.6;
}
.shop-thumbnail[data-style="minimal"]:before,
.shop-thumbnail[data-style="coastal"]:before {
  border: 0;
}
.shop-thumbnail[data-style="floral"]:before {
  border-radius: 80px 80px 4px 4px;
}
.shop-thumbnail[data-style="midnight"]:before {
  border-radius: 50% 50% 8px 8px;
}
.shop-thumbnail strong {
  position: relative;
  z-index: 1;
}
.card-description {
  min-height: 2.6em;
}
#designPreview {
  padding: 0;
  overflow: hidden;
}
#designPreview[open] {
  display: flex;
  flex-direction: column;
}
.preview-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  flex: none;
  gap: 8px;
  padding: 12px clamp(12px, 4vw, 20px);
  border-bottom: 1px solid var(--border);
}
.preview-actions .button {
  padding-inline: 8px;
  text-align: center;
}
.preview-content {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0 clamp(12px, 4vw, 20px) 20px;
}
.preview-stage-switch {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.preview-stage-switch [aria-pressed="true"] {
  background: #315a4c;
  color: #fff;
}
#designPreview .preview-card-surface {
  position: relative;
}
#shopCinematicEffects {
  position: absolute;
}
#designPreview iframe {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 3/4;
  display: block;
  height: auto;
}
#previewStatus {
  min-height: 2.8em;
}
#catalogueResults {
  scroll-margin-top: 20px;
}
@media (max-width: 600px) {
  .collection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .collection-tile {
    padding: 12px;
  }
  .collection-tile strong {
    font-size: 1.05rem;
  }
  .thumbnail-occasion {
    font-size: 0.48rem;
    letter-spacing: 0.04em;
  }
  .shop-thumbnail {
    gap: 10px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .shop-card {
    transition:
      box-shadow 0.2s,
      transform 0.2s;
  }
  .shop-card:hover {
    box-shadow: 0 15px 30px #183e3514;
    transform: translateY(-2px);
  }
}

.browse-more {
  flex: 1 1 100%;
}
.browse-more summary {
  cursor: pointer;
  font-size: 0.8rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  color: #315a4c;
}
.browse-more summary::before {
  content: "+";
  margin-right: 8px;
}
.browse-more[open] summary::before {
  content: "−";
}
.more-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0;
}
@media (max-width: 600px) {
  .more-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
#previewStages .button[aria-pressed="true"] {
  background: #315a4c;
  color: #fff;
  opacity: 1;
  border-color: #315a4c;
}

.shop-filters .more-filters label {
  min-width: 0;
}

@media (max-width: 600px) {
  .shop-card .card-description {
    display: none;
  }
}

@media (min-width: 900px) {
  .collection-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.help-title {
  margin: 0;
  font: 500 clamp(1.8rem, 4vw, 3.2rem)/1.15 "Playfair Display", Georgia, serif;
  color: var(--green);
}
#catalogue.shop-catalogue {
  padding-top: 12px;
  padding-bottom: 32px;
}
#catalogue .collection-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 8px 0 16px;
  gap: 8px;
}
#catalogue .collection-tile {
  padding: 10px 12px;
  min-height: 44px;
}
.shop-card .text-button {
  min-height: 44px;
}
.shop-card[hidden],
.catalogue-pager[hidden] {
  display: none;
}
.catalogue-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 24px;
}
.help-title {
  padding: 24px var(--space) 0;
}
@media (max-width: 650px) {
  #catalogue .collection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.shop-thumbnail[data-illustrated] {
  gap: 0;
  padding: 0;
  background-image: none;
}
.shop-thumbnail[data-illustrated]:before,
.shop-thumbnail[data-illustrated] .thumbnail-occasion {
  display: none;
}
.shop-thumbnail[data-illustrated] strong {
  padding: 8% 5% 3%;
  font-size: clamp(.8rem, 3vw, 1.35rem);
}
.shop-thumbnail[data-illustrated] img {
  flex: 1 1 0;
  width: 100%;
  min-height: 0;
  height: auto;
  max-height: none;
}
.shop-thumbnail:is([data-illustrated="launch"], [data-illustrated="landscape"]) img {
  order: -1;
}
.shop-thumbnail:is([data-illustrated="launch"], [data-illustrated="record"]) strong {
  font-family: Poppins, sans-serif;
  font-weight: 700;
}
.shop-thumbnail[data-illustrated="playful"] strong {
  font-family: Fredoka, sans-serif;
}
.shop-thumbnail[data-illustrated="lullaby"] strong {
  font-style: italic;
}
