:root {
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Jost", Inter, system-ui, sans-serif;
  --paper: #fffdf9;
  --shell: #fbf7f5;
  --ink: #382c35;
  --muted: #654c57;
  --line: rgba(234, 216, 207, 0.9);
  --rose: #9f5964;
  --teal: #6fa99a;
  --gold: #c7a574;
  --champagne: #f3e6d6;
  --shadow: 0 18px 42px rgba(82, 61, 72, 0.08);
  --container: 1280px;
  --page-padding: clamp(16px, 4vw, 48px);
  --card-radius: 18px;
  --control-height: 48px;
  --section-gap: clamp(22px, 4vw, 40px);
  --focus-ring: 0 0 0 3px rgba(199, 165, 116, 0.32);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 253, 249, 0.82), rgba(251, 247, 245, 0.94)),
    radial-gradient(circle at 12% 0%, rgba(199, 165, 116, 0.13), transparent 32%),
    radial-gradient(circle at 90% 12%, rgba(159, 89, 100, 0.10), transparent 30%),
    var(--shell);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body.modal-open {
  overflow: hidden;
}

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

button,
input {
  font: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

.page-shell {
  width: min(var(--container), calc(100% - (var(--page-padding) * 2)));
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(16px, 3vw, 32px) 0 clamp(24px, 4vw, 44px);
}

.site-home-link {
  display: inline-flex;
  align-items: center;
  margin-bottom: 24px;
  color: var(--plum);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(184, 148, 95, 0.42);
}

.hero {
  min-height: auto;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  align-items: center;
  gap: var(--section-gap);
  padding: clamp(14px, 3vw, 28px) 0 clamp(18px, 3vw, 28px);
}

.hero-copy {
  padding: 20px 0;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--rose);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 570px;
  margin-bottom: 18px;
  font-family: var(--font-display);
  font-size: clamp(42px, 7vw, 92px);
  font-weight: 400;
  line-height: 0.94;
  color: var(--ink);
}

.intro {
  max-width: 520px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.55;
}

.hero-media {
  margin: 0;
  min-height: clamp(300px, 36vw, 460px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: clamp(300px, 36vw, 460px);
  object-fit: cover;
  object-position: 64% 50%;
}

.quiz-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1.28fr);
  gap: var(--section-gap);
  align-items: start;
  padding-top: 18px;
}

.quiz-panel,
.result-panel {
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  background: linear-gradient(165deg, var(--paper) 0%, rgba(255, 253, 249, 0.96) 48%, var(--shell) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.72) inset,
    0 1px 2px rgba(56, 44, 53, 0.06),
    var(--shadow);
}

.quiz-panel {
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: clamp(16px, 2.4vw, 24px);
}

.quiz-progress {
  display: grid;
  gap: 10px;
  color: var(--rose);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(234, 216, 207, 0.56);
  box-shadow: inset 0 1px 2px rgba(56, 44, 53, 0.08);
}

.progress-fill {
  display: block;
  width: 33.333%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--rose));
  transition: width 220ms ease;
}

.question {
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 600;
}

.step-question {
  margin: -4px 0 18px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.step-help {
  margin: -8px 0 16px;
  color: rgba(101, 76, 87, 0.82);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
}

.generation-error {
  margin: -4px 0 16px;
  padding: 10px 14px;
  border: 1px solid rgba(157, 80, 91, 0.24);
  border-radius: 14px;
  background: rgba(255, 246, 242, 0.86);
  color: #8b3f50;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  box-shadow: 0 10px 24px rgba(112, 74, 55, 0.08);
}

.generation-error[hidden] {
  display: none;
}

.step-options {
  display: grid;
  gap: clamp(10px, 1.8vw, 14px);
}

.colour-step {
  grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr));
}

.weather-step,
.destination-step {
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.bead-choice-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  max-height: 26rem;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid rgba(234, 216, 207, 0.7);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.3);
  scrollbar-width: thin;
  scrollbar-color: rgba(132, 73, 84, 0.28) transparent;
}

.bead-choice-grid::-webkit-scrollbar {
  width: 8px;
}

.bead-choice-grid::-webkit-scrollbar-thumb {
  background: rgba(132, 73, 84, 0.24);
  border-radius: 999px;
}

.choice {
  min-height: 96px;
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--muted);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.choice,
.step-button,
.premium-button,
.reset-button,
.saved-match-actions button,
.viewer-expand,
.viewer-reset,
.viewer-close {
  touch-action: manipulation;
}

.choice:focus-visible,
.step-button:focus-visible,
.premium-button:focus-visible,
.reset-button:focus-visible,
.saved-match-actions button:focus-visible,
.viewer-expand:focus-visible,
.viewer-reset:focus-visible,
.viewer-close:focus-visible {
  outline: 2px solid rgba(199, 165, 116, 0.94);
  outline-offset: 3px;
  box-shadow: var(--focus-ring);
}

.choice:hover {
  transform: translateY(-2px);
  border-color: rgba(234, 216, 207, 0.95);
  background: var(--paper);
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice:has(input:checked) {
  border-color: rgba(199, 165, 116, 0.95);
  background: var(--paper);
  box-shadow:
    inset 0 0 0 2px rgba(199, 165, 116, 0.18),
    0 12px 24px rgba(132, 73, 84, 0.1);
}

.choice.selected {
  border-color: rgba(199, 165, 116, 0.95);
  background: var(--paper);
  box-shadow:
    inset 0 0 0 2px rgba(199, 165, 116, 0.18),
    0 12px 24px rgba(132, 73, 84, 0.1);
}

.choice.selected::after,
.choice:has(input:checked)::after {
  content: "Selected";
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  padding: 4px 8px;
  border: 1px solid rgba(199, 165, 116, 0.46);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.94);
  color: #6e5532;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.large-swatch {
  min-height: 154px;
  padding: 18px 12px;
}

.large-swatch .choice-bead {
  width: 70px;
  height: 70px;
}

.bead-choice {
  min-height: 108px;
  gap: 9px;
  padding: 10px 8px;
}

.choice-bead {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.86) 0 10%, transparent 22%),
    radial-gradient(circle at 70% 76%, rgba(56, 44, 53, 0.18), transparent 32%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.44), transparent 42%),
    var(--bead-color);
  box-shadow:
    inset -9px -10px 13px rgba(56, 44, 53, 0.18),
    inset 7px 8px 14px rgba(255, 255, 255, 0.52),
    0 9px 18px rgba(56, 44, 53, 0.14),
    0 0 0 1px rgba(56, 44, 53, 0.1);
  color: var(--bead-text, #382c35);
  font-size: 11px;
  font-weight: 600;
  transition: transform 180ms ease;
}

.bead-choice:hover .choice-bead {
  transform: scale(1.05);
}

.bead-choice span:last-child,
.weather-choice > span:last-child {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
}

.large-swatch span:last-child {
  font-size: 13px;
}

.image-choice {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  min-height: 160px;
  padding: 0;
  border-radius: var(--card-radius);
  background: linear-gradient(135deg, #f7e7ce, #9f5964);
  color: var(--paper);
  isolation: isolate;
}

.option-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.option-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(
      to top,
      rgba(38, 30, 33, 0.5) 0%,
      rgba(38, 30, 33, 0.08) 55%,
      rgba(38, 30, 33, 0) 100%
    );
}

.option-label {
  position: absolute;
  left: clamp(18px, 4vw, 32px);
  bottom: clamp(16px, 3vw, 28px);
  z-index: 2;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--paper);
  font-family: inherit;
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 600;
  line-height: 1.15;
  text-shadow: 0 2px 18px rgba(56, 44, 53, 0.52);
}

.option-card.selected,
.option-card:has(input:checked) {
  outline: 3px solid #c9a76a;
  outline-offset: 3px;
}

.option-card.selected::after,
.option-card:has(input:checked)::after {
  content: "Selected";
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 3;
  width: auto;
  height: auto;
  padding: 5px 9px;
  border-radius: 50%;
  background: rgba(255, 250, 241, 0.95);
  color: #6e5532;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.option-card.image-fallback .option-image {
  display: none;
}

.fallback-sunny,
.fallback-golden-hour {
  background: linear-gradient(135deg, #f8d68b, #d59b63);
}

.fallback-rainy {
  background: linear-gradient(135deg, #453743, #9f5964);
}

.fallback-snowy,
.fallback-iceland,
.fallback-switzerland {
  background: linear-gradient(135deg, #edf6f8, #8fa7b3);
}

.fallback-windy-coast,
.fallback-sydney {
  background: linear-gradient(135deg, #6fa99a, #a9cbe8);
}

.fallback-starry-night,
.fallback-new-york {
  background: linear-gradient(135deg, #1f1d1c, #654c57);
}

.fallback-spring-morning,
.fallback-kyoto {
  background: linear-gradient(135deg, #f4d8d6, #a9b7a0);
}

.fallback-paris,
.fallback-santorini {
  background: linear-gradient(135deg, #f7e7ce, #c7a574);
}

.fallback-bali {
  background: linear-gradient(135deg, #6fa99a, #d9b56f);
}

.quiz-nav {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: 12px;
}

.step-button {
  min-height: var(--control-height);
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: transform 180ms ease, opacity 180ms ease, box-shadow 180ms ease;
}

.step-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.step-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.step-button.primary {
  border: 1px solid rgba(159, 89, 100, 0.78);
  background: #8f4e5b;
  color: var(--paper);
  box-shadow: 0 14px 28px rgba(143, 78, 91, 0.16);
}

.step-button.secondary {
  border: 1px solid rgba(234, 216, 207, 0.92);
  background: rgba(255, 253, 249, 0.78);
  color: var(--muted);
}

.weather-grid {
  gap: 12px;
}

.weather-choice {
  min-height: 176px;
  position: relative;
  align-content: end;
  justify-items: center;
  overflow: hidden;
  padding: 16px;
  background-image: var(--weather-image);
  background-position: center;
  background-size: cover;
  color: var(--paper);
  isolation: isolate;
}

.weather-choice::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(56, 44, 53, 0.02), rgba(56, 44, 53, 0.64)),
    radial-gradient(circle at 50% 12%, rgba(255, 253, 249, 0.13), transparent 32%);
}

.weather-scene {
  display: none;
}

.weather-scene::before,
.weather-scene::after,
.weather-scene span {
  content: "";
  position: absolute;
  display: block;
}

.weather-scene.sunny::before {
  inset: 9px 15px 4px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.9), transparent 21%),
    linear-gradient(145deg, #f7e7ce, #d9b56f 58%, #c7a574);
  box-shadow: 0 0 0 9px rgba(217, 181, 111, 0.18);
}

.weather-scene.rainy::before {
  left: 8px;
  top: 18px;
  width: 60px;
  height: 30px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.9), transparent 18%),
    linear-gradient(145deg, #fffdf9, #cfd2d2);
}

.weather-scene.rainy::after {
  left: 20px;
  top: 46px;
  width: 6px;
  height: 16px;
  border-radius: 999px;
  background: #a9cbe8;
  box-shadow: 18px 4px 0 #6fa99a, 36px -1px 0 #a9cbe8;
  transform: rotate(12deg);
}

.weather-scene.snowy::before {
  left: 34px;
  top: 8px;
  width: 7px;
  height: 50px;
  border-radius: 999px;
  background: linear-gradient(#fffdf9, #c7dced);
  box-shadow: 0 0 0 1px rgba(199, 220, 237, 0.55);
}

.weather-scene.snowy::after {
  left: 34px;
  top: 8px;
  width: 7px;
  height: 50px;
  border-radius: 999px;
  background: linear-gradient(#fffdf9, #c7dced);
  transform: rotate(60deg);
  box-shadow: 0 0 0 1px rgba(199, 220, 237, 0.55);
}

.weather-scene.snowy span {
  left: 34px;
  top: 8px;
  width: 7px;
  height: 50px;
  border-radius: 999px;
  background: linear-gradient(#fffdf9, #c7dced);
  transform: rotate(-60deg);
}

.weather-scene.breezy::before {
  left: 4px;
  top: 19px;
  width: 64px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #f7e7ce 25%, #bc8b80);
  box-shadow: 0 18px 0 -2px rgba(111, 169, 154, 0.7);
}

.weather-scene.breezy::after {
  left: 35px;
  top: 2px;
  width: 30px;
  height: 30px;
  border: 5px solid #fffdf9;
  border-left-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  transform: rotate(18deg);
}

.weather-choice > span:last-child {
  position: relative;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(56, 44, 53, 0.28);
  color: var(--paper);
  text-shadow: 0 2px 18px rgba(56, 44, 53, 0.55);
  backdrop-filter: blur(10px);
}

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

.destination-choice {
  min-height: 184px;
  position: relative;
  align-content: end;
  justify-items: start;
  overflow: hidden;
  padding: 16px;
  background-image: var(--destination-image);
  background-position: center;
  background-size: cover;
  color: var(--paper);
  isolation: isolate;
}

.destination-choice::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(56, 44, 53, 0.06), rgba(56, 44, 53, 0.62)),
    radial-gradient(circle at 24% 18%, rgba(255, 253, 249, 0.2), transparent 28%);
}

.destination-choice span {
  position: relative;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  text-shadow: 0 2px 18px rgba(56, 44, 53, 0.34);
}

.result-panel {
  position: relative;
  z-index: 10;
  padding: 0;
  overflow: visible;
  background:
    linear-gradient(rgba(234, 216, 207, 0.26) 1px, transparent 1px),
    linear-gradient(90deg, rgba(234, 216, 207, 0.26) 1px, transparent 1px),
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.96), transparent 38%),
    radial-gradient(circle at 50% 66%, rgba(199, 165, 116, 0.16), transparent 34%),
    linear-gradient(180deg, #fffdf9 0%, #fbf7f5 100%);
  background-size:
    42px 42px,
    42px 42px,
    auto,
    auto,
    auto;
}

.result-stage {
  padding: clamp(18px, 2.8vw, 28px) clamp(14px, 2.4vw, 24px) 18px;
  text-align: center;
}

.result-viewer-shell {
  position: relative;
  width: 100%;
  max-width: 1040px;
  height: clamp(680px, 70vw, 760px);
  min-height: 680px;
  margin: 18px auto 0;
  padding: 40px 40px 64px;
  border: 1px solid rgba(234, 216, 207, 0.96);
  border-radius: 32px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.96), transparent 32%),
    radial-gradient(ellipse at 50% 72%, rgba(199, 165, 116, 0.14), transparent 42%),
    linear-gradient(rgba(234, 216, 207, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(234, 216, 207, 0.22) 1px, transparent 1px),
    #fffdf9;
  background-size: auto, auto, 42px 42px, 42px 42px, auto;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 24px 54px rgba(82, 61, 72, 0.09);
}

.result-creator-frame {
  width: 100%;
  height: 100%;
  min-height: 0;
  flex: 1 1 auto;
  align-self: stretch;
  border: 0;
  border-radius: inherit;
  background: transparent;
  box-shadow: none;
  position: relative;
  z-index: 2;
  opacity: 1;
  transition: opacity 220ms ease;
}

.result-viewer-shell:not(.viewer-loaded) .result-creator-frame {
  opacity: 0;
  pointer-events: none;
}

.preview-state {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 24px;
  border-radius: 22px;
  color: rgba(87, 71, 65, 0.74);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.82), transparent 34%),
    rgba(255, 253, 249, 0.62);
  backdrop-filter: blur(8px);
}

.preview-loader {
  width: 34px;
  height: 34px;
  border: 2px solid rgba(199, 165, 116, 0.26);
  border-top-color: rgba(158, 124, 75, 0.72);
  border-radius: 50%;
  animation: previewLoaderSpin 900ms linear infinite;
}

.result-viewer-shell.is-empty .preview-loader,
.result-viewer-shell.is-error .preview-loader {
  display: none;
}

.result-viewer-shell.viewer-loaded .preview-state {
  display: none;
}

.result-viewer-shell:not(.viewer-loaded) .viewer-expand,
.result-viewer-shell:not(.viewer-loaded) .viewer-reset,
.result-viewer-shell:not(.viewer-loaded) .preview-interaction-hint {
  display: none;
}

.preview-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.preview-toolbar {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  pointer-events: none;
}

.viewer-expand,
.viewer-reset {
  position: absolute;
  top: 16px;
  z-index: 4;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(234, 216, 207, 0.9);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.88);
  color: var(--muted);
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(56, 44, 53, 0.12);
  backdrop-filter: blur(14px);
}

.preview-toolbar .viewer-expand,
.preview-toolbar .viewer-reset {
  position: static;
  top: auto;
  right: auto;
  z-index: auto;
  pointer-events: auto;
}

.viewer-expand {
  right: 16px;
}

.viewer-reset {
  right: 112px;
}

.preview-interaction-hint {
  position: absolute;
  left: 50%;
  bottom: clamp(18px, 3.4vw, 34px);
  z-index: 4;
  width: min(calc(100% - 40px), 760px);
  max-width: calc(100% - 40px);
  transform: translateX(-50%);
  padding: 14px 24px;
  border: 1px solid rgba(234, 216, 207, 0.84);
  border-radius: 24px;
  background: rgba(255, 253, 249, 0.9);
  color: rgba(87, 71, 65, 0.76);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.3;
  text-align: center;
  white-space: normal;
  pointer-events: none;
  user-select: none;
  box-shadow:
    0 16px 34px rgba(82, 61, 72, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(14px);
  opacity: 1;
  transition: opacity 260ms ease, transform 260ms ease;
}

.desktop-hint,
.touch-hint {
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.desktop-hint {
  display: inline-flex;
}

.result-viewer-shell.touch-preview .desktop-hint,
.viewer-modal.touch-preview .desktop-hint {
  display: none;
}

.result-viewer-shell.desktop-preview .desktop-hint,
.viewer-modal.desktop-preview .desktop-hint {
  display: inline-flex;
}

.hint-icon {
  font-size: 24px;
  line-height: 1;
}

.hint-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.hint-dot {
  color: rgba(87, 71, 65, 0.72);
  padding: 0 4px;
}

.result-viewer-shell.interaction-used .preview-interaction-hint {
  opacity: 1;
  transform: translateX(-50%);
}

.touch-hint {
  display: none;
}

.result-viewer-shell.touch-preview .touch-hint,
.viewer-modal.touch-preview .touch-hint {
  display: inline-flex;
}

.result-viewer-shell.desktop-preview .touch-hint,
.viewer-modal.desktop-preview .touch-hint {
  display: none;
}

@keyframes previewLoaderSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes previewProductReveal {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.match-label {
  margin-bottom: 8px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.result-panel h2 {
  margin-bottom: 0;
  font-family: var(--font-display);
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 400;
  line-height: 1.05;
}

.result-panel p {
  color: var(--muted);
  line-height: 1.55;
}

.match-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 18px);
  padding: 0 clamp(14px, 2.4vw, 24px) clamp(18px, 3vw, 28px);
}

.match-score-card,
.match-actions,
.reset-button {
  grid-column: 1 / -1;
}

.match-score-card,
.match-info-card {
  border: 1px solid rgba(234, 216, 207, 0.82);
  border-radius: 18px;
  background: rgba(255, 253, 249, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 12px 26px rgba(82, 61, 72, 0.06);
  backdrop-filter: blur(18px);
}

.match-score-card {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 18px;
  text-align: center;
}

.match-score-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(52px, 7vw, 76px);
  font-weight: 400;
  line-height: 0.9;
  color: var(--ink);
}

.match-score-card p:last-child {
  max-width: 620px;
  margin-bottom: 0;
  font-size: 18px;
  line-height: 1.45;
}

.match-info-card {
  padding: 16px;
}

.match-info-card h3 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
}

.match-info-card p {
  margin-bottom: 0;
  font-size: 16px;
  line-height: 1.5;
}

.travel-colour-name {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
}

.travel-colour-shade {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.traits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin: 0;
}

.trait {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(212, 135, 136, 0.24);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255, 248, 244, 0.96), rgba(248, 225, 226, 0.58));
  box-shadow: 0 8px 20px rgba(82, 61, 72, 0.06);
  color: #6f4c59;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  text-transform: capitalize;
}

.trait-icon {
  color: var(--accent);
  font-size: 19px;
  line-height: 1;
}

.lucky-colours {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.lucky-colour {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 12px 8px;
  border: 1px solid rgba(234, 216, 207, 0.72);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.46);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
}

.lucky-colour-bead {
  width: 38px;
  height: 38px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.86) 0 10%, transparent 22%),
    radial-gradient(circle at 70% 76%, rgba(56, 44, 53, 0.18), transparent 32%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.44), transparent 42%),
    var(--bead-color);
  box-shadow:
    inset -7px -8px 12px rgba(56, 44, 53, 0.16),
    inset 6px 7px 12px rgba(255, 255, 255, 0.54),
    0 7px 14px rgba(56, 44, 53, 0.12);
}

.match-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.premium-button,
.reset-button {
  width: auto;
  min-width: min(100%, 150px);
  flex: 1 1 150px;
  min-height: var(--control-height);
  padding: 0 16px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.premium-button:hover,
.reset-button:hover {
  transform: translateY(-1px);
}

.premium-button.primary {
  border: 1px solid rgba(159, 89, 100, 0.78);
  background: #8f4e5b;
  color: var(--paper);
  box-shadow: 0 14px 28px rgba(143, 78, 91, 0.18);
}

.premium-button.secondary {
  border: 1px solid rgba(199, 165, 116, 0.58);
  background: rgba(255, 253, 249, 0.78);
  color: var(--muted);
}

.premium-button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
  transform: none;
}

.compact-button {
  width: auto;
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 16px;
}

.reset-button {
  min-height: 42px;
  border: 1px solid rgba(234, 216, 207, 0.78);
  background: transparent;
  color: var(--muted);
}

.saved-matches-panel {
  position: relative;
  z-index: 10;
  margin-top: 32px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(165deg, var(--paper) 0%, rgba(255, 253, 249, 0.96) 48%, var(--shell) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.72) inset,
    0 1px 2px rgba(56, 44, 53, 0.06),
    var(--shadow);
}

.saved-matches-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.saved-matches-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 400;
  line-height: 1.05;
}

.saved-matches-list {
  display: grid;
  gap: 12px;
}

.saved-match-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(234, 216, 207, 0.82);
  border-radius: 16px;
  background: rgba(255, 253, 249, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 12px 26px rgba(82, 61, 72, 0.06);
}

.saved-match-card h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
}

.saved-match-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.saved-match-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.saved-match-actions button {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(199, 165, 116, 0.58);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.82);
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.empty-saved-matches {
  padding: 18px;
  border: 1px dashed rgba(234, 216, 207, 0.9);
  border-radius: 16px;
  color: var(--muted);
  text-align: center;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 500;
  max-width: min(92vw, 440px);
  padding: 12px 16px;
  border: 1px solid rgba(199, 165, 116, 0.52);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.94);
  color: var(--ink);
  box-shadow: 0 18px 42px rgba(82, 61, 72, 0.18);
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, 14px);
  transition: opacity 180ms ease, transform 180ms ease;
  backdrop-filter: blur(18px);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.viewer-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: rgba(56, 44, 53, 0.42);
  backdrop-filter: blur(18px);
}

.viewer-modal.open {
  display: grid;
}

.viewer-panel {
  width: min(760px, 100%);
  max-height: calc(100dvh - 44px);
  position: relative;
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(165deg, var(--paper), var(--shell));
  box-shadow: 0 30px 90px rgba(56, 44, 53, 0.25);
}

.viewer-panel::before {
  content: "";
  display: block;
  width: 46px;
  height: 5px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: rgba(159, 89, 100, 0.28);
}

.viewer-panel h2 {
  margin-bottom: 18px;
  font-family: var(--font-display);
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 400;
}

.viewer-close,
.modal-reset {
  position: absolute;
  top: 18px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(234, 216, 207, 0.9);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.8);
  color: var(--muted);
  cursor: pointer;
}

.viewer-close {
  right: 18px;
}

.modal-reset {
  right: 98px;
}

.creator-frame {
  width: 100%;
  height: min(68dvh, 620px);
  min-height: 440px;
  display: block;
  position: relative;
  z-index: 2;
  border: 1px solid rgba(234, 216, 207, 0.9);
  border-radius: 18px;
  background: var(--paper);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.72) inset,
    0 18px 42px rgba(82, 61, 72, 0.12);
}

.viewer-panel .creator-frame {
  overscroll-behavior: contain;
}

@media (min-width: 1024px) {
  .quiz-panel {
    position: sticky;
    top: 24px;
  }
}

@media (max-width: 900px) {
  .hero,
  .quiz-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-media img {
    object-position: 62% 50%;
  }

  .result-panel {
    position: static;
  }

  .result-viewer-shell {
    height: 600px;
    min-height: 600px;
    padding: 32px 28px 60px;
    border-radius: 24px;
  }

  .result-creator-frame {
    height: 100%;
    min-height: 0;
  }

  .bead-choice-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .colour-step,
  .weather-step,
  .destination-step {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  :root {
    --page-padding: 16px;
  }

  .page-shell {
    width: min(100% - 32px, 1200px);
    padding: 12px 0 26px;
  }

  h1 {
    font-size: clamp(40px, 13vw, 52px);
    line-height: 0.98;
  }

  .intro {
    font-size: 16px;
  }

  .hero-media,
  .hero-media img {
    min-height: 280px;
  }

  .hero-media img {
    object-position: 66% 50%;
  }

  .choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .colour-step,
  .weather-step,
  .destination-step,
  .quiz-nav {
    grid-template-columns: 1fr;
  }

  .large-swatch {
    min-height: 126px;
  }

  .image-choice {
    aspect-ratio: 16 / 9;
    min-height: 154px;
  }

  .bead-choice-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: 24rem;
  }

  .destination-grid {
    grid-template-columns: 1fr;
  }

  .destination-choice {
    min-height: 156px;
  }

  .quiz-panel,
  .result-panel {
    padding: 0;
  }

  .quiz-panel {
    padding: 16px;
  }

  .result-panel {
    padding: 0;
  }

  .result-stage {
    padding: 18px 12px 14px;
  }

  .result-viewer-shell {
    height: 540px;
    min-height: 500px;
    padding: 24px 14px 56px;
    border-radius: 24px;
  }

  .result-creator-frame {
    height: 100%;
    min-height: 0;
  }

  .preview-interaction-hint {
    bottom: 14px;
    width: calc(100% - 32px);
    max-width: calc(100% - 32px);
    padding: 7px 12px;
    font-size: 11px;
    white-space: normal;
  }

  .preview-interaction-hint .hint-dot {
    display: none;
  }

  .match-details {
    grid-template-columns: 1fr;
    padding: 0 12px 16px;
  }

  .viewer-panel {
    padding: 18px;
  }

  .creator-frame {
    height: 62dvh;
    min-height: 360px;
  }

  .result-creator-frame {
    height: 100%;
    min-height: 0;
  }

  .match-actions {
    flex-direction: column;
  }

  .premium-button,
  .reset-button {
    width: 100%;
    flex-basis: auto;
  }

  .saved-matches-panel {
    padding: 14px;
  }

  .saved-matches-heading,
  .saved-match-card {
    grid-template-columns: 1fr;
  }

  .saved-matches-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .saved-match-actions {
    justify-content: stretch;
  }

  .saved-match-actions button {
    flex: 1 1 9rem;
  }
}

@media (hover: none), (pointer: coarse) {
  .result-viewer-shell:not(.desktop-preview) .desktop-hint,
  .viewer-modal:not(.desktop-preview) .desktop-hint {
    display: none;
  }

  .result-viewer-shell:not(.desktop-preview) .touch-hint,
  .viewer-modal:not(.desktop-preview) .touch-hint {
    display: inline-flex;
  }
}

@media (max-width: 480px) {
  .page-shell {
    width: min(100% - 24px, 1200px);
  }

  .hero {
    gap: 16px;
  }

  .hero-copy {
    padding: 10px 0 0;
  }

  .hero-media,
  .hero-media img {
    min-height: 250px;
  }

  .colour-step,
  .weather-step,
  .destination-step {
    grid-template-columns: 1fr;
  }

  .large-swatch {
    min-height: 108px;
    grid-template-columns: auto 1fr;
    justify-items: start;
    text-align: left;
    padding-inline: 16px;
  }

  .large-swatch .choice-bead {
    width: 58px;
    height: 58px;
  }

  .option-label {
    font-size: 24px;
  }

  .lucky-colours {
    grid-template-columns: 1fr;
  }

  .viewer-modal {
    align-items: end;
    padding: 12px;
  }

  .viewer-panel {
    width: 100%;
    max-height: min(92dvh, 760px);
    padding: 16px;
    border-radius: 22px 22px 16px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}

.result-viewer-shell {
  align-items: stretch;
}

.result-viewer-shell > iframe.result-creator-frame,
.result-viewer-shell.viewer-loaded > iframe.result-creator-frame {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  flex: 1 1 auto;
  align-self: stretch;
}
