:root {
  color-scheme: light;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;

  --ink: #242033;
  --ink-soft: #4f4a60;
  --muted: #6c6680;
  --line: #d8d5df;
  --line-strong: #aaa5b5;
  --canvas: #f7f7f8;
  --surface: #ffffff;
  --surface-subtle: #f0eff3;
  --rose: #d9486f;
  --rose-soft: #ffe8ee;
  --rose-strong: #a62c4f;
  --mint: #8ee1d2;
  --mint-soft: #e6f7f3;
  --blue: #8fb7ff;
  --blue-soft: #eaf2ff;
  --gold: #ffc857;
  --gold-soft: #fff4d0;
  --success: #176b52;
  --warning: #704d00;
  --error: #9b1c31;
  --info: #174b8b;
  --focus: #184fb8;
  --danger: #a11c36;

  --radius: 8px;
  --radius-small: 5px;
  --target: 44px;
  --topbar-height: 64px;
  --content-max: 1480px;
  --measure: 72ch;

  --z-sticky: 20;
  --z-dialog-backdrop: 40;
  --z-dialog: 50;
  --z-toast: 60;
  --z-prototype: 70;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.55;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select,
input[type="checkbox"],
input[type="radio"] {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
figure {
  margin-block-start: 0;
}

h1,
h2,
h3,
h4 {
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  margin-block-end: 0.75rem;
  font-size: 1.75rem;
}

h2 {
  margin-block-end: 0.75rem;
  font-size: 1.35rem;
}

h3 {
  margin-block-end: 0.5rem;
  font-size: 1.125rem;
}

p {
  max-width: var(--measure);
  text-wrap: pretty;
}

a {
  color: #864060;
  text-decoration-thickness: 0.1em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--rose-strong);
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: calc(var(--z-prototype) + 1);
  inset-block-start: 0.5rem;
  inset-inline-start: 0.5rem;
  padding: 0.65rem 0.9rem;
  transform: translateY(-160%);
  border: 2px solid var(--ink);
  border-radius: var(--radius-small);
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

#app {
  min-height: 100vh;
  min-height: 100dvh;
}

#app:focus {
  outline: none;
}

[data-current-task]:focus {
  outline: none;
}

[data-lyric-editor] {
  scroll-margin-top: calc(var(--topbar-height) + 1rem);
}

[data-lyric-editor]:focus {
  outline: none;
}

.app-loading {
  width: min(100% - 2rem, 42rem);
  margin-inline: auto;
  padding-block: 4rem;
}

.skeleton {
  display: block;
  overflow: hidden;
  border-radius: var(--radius-small);
  background: #dedce4;
}

.skeleton-line {
  width: 100%;
  height: 1rem;
  margin-block-end: 0.75rem;
}

.skeleton-line-short {
  width: 62%;
}

.analytics-consent {
  position: fixed;
  z-index: var(--z-dialog);
  inset-inline: 1rem;
  inset-block-end: 1rem;
  width: min(calc(100% - 2rem), 42rem);
  margin-inline: auto;
  padding: 1.25rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 6px 8px rgb(36 32 51 / 12%);
  color: var(--ink);
}

.analytics-consent h2 {
  margin: 0;
  font-size: 1.125rem;
}

.analytics-consent__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-block-end: 0.4rem;
}

.analytics-consent .analytics-consent__close {
  display: none;
  min-width: var(--target);
  min-height: var(--target);
  flex: 0 0 auto;
}

.analytics-consent__description-mobile {
  display: none;
}

.analytics-consent p {
  margin-block-end: 1rem;
  color: var(--ink-soft);
}

.analytics-consent__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.analytics-consent__actions .button {
  min-height: var(--target);
}

.analytics-settings {
  position: fixed;
  z-index: var(--z-sticky);
  inset-inline-end: 0.75rem;
  inset-block-end: 0.75rem;
  min-height: var(--target);
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  background: var(--surface);
  color: var(--ink-soft);
  font-weight: 600;
}

.analytics-settings:hover {
  color: var(--ink);
}

@media (max-width: 520px) {
  .analytics-consent {
    inset-inline: 0.75rem;
    inset-block-end: 0.75rem;
    width: calc(100% - 1.5rem);
    padding: 0.9rem;
  }

  .analytics-consent__header {
    gap: 0.5rem;
    margin-block-end: 0.25rem;
  }

  .analytics-consent .analytics-consent__close {
    display: inline-flex;
  }

  .analytics-consent__description-desktop {
    display: none;
  }

  .analytics-consent__description-mobile {
    display: inline;
  }

  .analytics-consent p {
    margin-block-end: 0.7rem;
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .analytics-consent__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .analytics-consent__actions .button {
    width: 100%;
    min-height: 48px;
    padding-inline: 0.55rem;
    font-size: 0.85rem;
    line-height: 1.2;
    text-align: center;
  }

  .analytics-consent__actions a {
    grid-column: 1 / -1;
    min-height: 36px;
    padding-block: 0.35rem;
    text-align: center;
  }
}

@media (max-width: 350px) {
  .analytics-consent__actions {
    grid-template-columns: 1fr;
  }

  .analytics-consent__actions a {
    grid-column: 1;
  }
}

@media (max-width: 767.98px) {
  .analytics-consent .analytics-consent__close {
    display: inline-flex;
  }

  .analytics-consent__description-desktop {
    display: none;
  }

  .analytics-consent__description-mobile {
    display: inline;
  }

  .analytics-settings {
    position: static;
    z-index: auto;
    display: flex;
    width: fit-content;
    margin-block: 1rem max(1rem, env(safe-area-inset-bottom));
    margin-inline: auto max(1rem, env(safe-area-inset-right));
    font-size: 0.875rem;
  }

  body:has(.mobile-task-dock) > .analytics-settings {
    display: none;
  }
}

.lyric-generation-screen {
  max-width: 52rem;
}

.lyric-generation-status {
  padding-block: 2rem;
}

.lyric-generation-status h2 {
  max-width: 34ch;
}

.lyric-generation-preview {
  width: min(100%, 38rem);
  margin-block: 2rem 1.25rem;
}

.lyric-generation-preview .skeleton-line {
  height: 1.1rem;
}

@media (prefers-reduced-motion: no-preference) {
  .lyric-generation-preview .skeleton {
    animation: lyric-writing-pulse 1.4s ease-in-out infinite alternate;
  }

  .lyric-generation-preview .skeleton:nth-child(2) {
    animation-delay: 140ms;
  }

  .lyric-generation-preview .skeleton:nth-child(3) {
    animation-delay: 280ms;
  }
}

@keyframes lyric-writing-pulse {
  from { background-color: #dedce4; }
  to { background-color: #c9c5d2; }
}

/* App shell */
.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  padding-block-end: calc(5.5rem + env(safe-area-inset-bottom));
}

.app-topbar {
  position: sticky;
  z-index: var(--z-sticky);
  inset-block-start: 0;
  display: flex;
  min-height: var(--topbar-height);
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  border-block-end: 1px solid var(--line);
  background: var(--surface);
}

.app-topbar__brand,
.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 750;
  text-decoration: none;
}

.app-topbar__brand-mark,
.brand-mark {
  display: grid;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid var(--rose-strong);
  border-radius: 50%;
  color: var(--rose-strong);
  font-size: 0.8rem;
  font-weight: 800;
}

.app-topbar__title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-actions,
.app-topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.app-frame {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
}

.stage-nav {
  position: static;
  z-index: calc(var(--z-sticky) - 1);
  inset-block-start: var(--topbar-height);
  overflow-x: auto;
  border-block-end: 1px solid var(--line);
  background: var(--surface);
  scrollbar-width: thin;
}

.stage-nav__heading {
  display: none;
}

.stage-list {
  display: none;
  min-width: max-content;
  margin: 0;
  padding: 0 1rem;
  list-style: none;
}

.mobile-stage-summary {
  display: flex;
  min-height: var(--target);
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
}

.stage-item {
  display: flex;
}

.stage-link {
  position: relative;
  display: inline-flex;
  min-height: var(--target);
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0.85rem;
  border: 0;
  border-block-end: 3px solid transparent;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.stage-link:hover {
  background: var(--surface-subtle);
  color: var(--ink);
}

.stage-link[aria-current="step"],
.stage-link[data-state="current"] {
  border-block-end-color: var(--rose-strong);
  color: var(--rose-strong);
}

.stage-done {
  color: var(--success);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.stage-link[data-state="locked"],
.stage-link[aria-disabled="true"] {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.72;
}

.workspace {
  min-width: 0;
  padding: 1.25rem 1rem 2rem;
}

.app-shell > .workspace {
  width: 100%;
  max-width: 76rem;
  margin-inline: auto;
}

.workspace-main,
.workspace-aside {
  min-width: 0;
}

.workspace-aside {
  margin-block-start: 1.5rem;
}

.workspace-aside[data-mobile-state="closed"] {
  display: none;
}

.mobile-tools-button {
  width: 100%;
  margin-block-end: 1rem;
}

.sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-block-end: 1rem;
}

.sheet-header h2 {
  margin: 0;
}

.screen {
  min-width: 0;
}

.screen-header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-block-end: 1.25rem;
  padding-block-end: 1rem;
  border-block-end: 1px solid var(--line);
}

.screen-header > :last-child,
.screen-header p:last-child {
  margin-block-end: 0;
}

.screen-header__text {
  min-width: 0;
}

.screen-kicker {
  margin-block-end: 0.3rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
}

.screen-actions,
.actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.screen-actions > *,
.button-row > * {
  flex: 1 1 auto;
}

.section {
  margin-block: 0 2rem;
}

.section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-block-end: 0.8rem;
}

.section-heading > * {
  margin-block-end: 0;
}

.lyric-version-statuses {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

@media (max-width: 640px) {
  .lyric-version-statuses {
    justify-content: flex-start;
  }
}

.choice-grid,
.checkout-grid {
  display: grid;
  gap: 1rem;
  align-items: start;
}

.prototype-payment-box {
  padding: 1rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-subtle);
}

.prototype-payment-box p:last-child {
  margin-block-end: 0;
}

.cassette-builder {
  display: grid;
  gap: 1.5rem;
  padding-block: 0.5rem;
}

.cassette-builder__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding-block-end: 1.25rem;
  border-block-end: 1px solid var(--line);
}

.cassette-builder__heading h2 {
  margin-block-end: 0.35rem;
  font-size: 1.45rem;
}

.cassette-builder__heading p:last-child {
  max-width: 52ch;
  margin: 0;
}

.cassette-preview {
  --cassette-shell: #f8f7f3;
  --cassette-edge: #9a9591;
  --cassette-detail: #252229;
  --cassette-highlight: rgba(255, 255, 255, 0.82);
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 180px;
  aspect-ratio: 1.56;
  overflow: hidden;
  border: 2px solid var(--cassette-edge);
  border-radius: 8px;
  background: var(--cassette-shell);
  box-shadow: inset 0 0 0 3px var(--cassette-highlight), inset 0 -8px 14px rgba(39, 34, 42, 0.08);
  color: var(--cassette-detail);
  isolation: isolate;
}

.cassette-preview::after {
  position: absolute;
  z-index: 2;
  inset: auto 0 0;
  height: 24%;
  background: var(--cassette-shell);
  box-shadow: inset 0 1px color-mix(in srgb, var(--cassette-edge), transparent 35%);
  content: "";
}

.cassette-preview[data-shell="black"] {
  --cassette-shell: #17151c;
  --cassette-edge: #09080c;
  --cassette-detail: #f4f0ec;
  --cassette-highlight: rgba(255, 255, 255, 0.1);
}

.cassette-preview__screws {
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
}

.cassette-preview__screws i {
  position: absolute;
  width: 4.5%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--cassette-edge);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.cassette-preview__screws i:nth-child(1) { inset: 6% auto auto 4%; }
.cassette-preview__screws i:nth-child(2) { inset: 6% 4% auto auto; }
.cassette-preview__screws i:nth-child(3) { inset: auto auto 7% 4%; }
.cassette-preview__screws i:nth-child(4) { inset: auto 4% 7% auto; }

.cassette-preview__artwork {
  position: absolute;
  z-index: 1;
  inset: 7% 4% auto;
  width: 92%;
  height: auto;
  border-radius: 4px;
  object-fit: contain;
}

.cassette-preview__label {
  position: absolute;
  z-index: 1;
  inset: 9% 9% 25%;
  overflow: hidden;
  border-radius: 4px;
  background: #f5e8d5;
  box-shadow: inset 0 0 0 1px rgba(39, 34, 42, 0.12);
}

.cassette-preview__title {
  position: absolute;
  inset: 8% 7% auto;
  overflow: hidden;
  color: #27222a;
  font-size: clamp(0.48rem, 0.8vw, 0.66rem);
  font-weight: 800;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.cassette-preview__stripe {
  position: absolute;
  inset: auto 0 0;
  height: 38%;
  background: linear-gradient(to bottom, #ec5f85 0 33%, #f7a14e 33% 66%, #65bdb1 66%);
}

.cassette-preview[data-design="checkerboard"] .cassette-preview__label { background: #f2f0ed; }
.cassette-preview[data-design="checkerboard"] .cassette-preview__stripe {
  height: 30%;
  background: conic-gradient(#26222a 25%, #f6f3ef 0 50%, #26222a 0 75%, #f6f3ef 0) 0 0 / 9% 42%;
}
.cassette-preview[data-design="colour-block"] .cassette-preview__label { background: #d9d1ff; }
.cassette-preview[data-design="colour-block"] .cassette-preview__stripe { height: 40%; background: linear-gradient(to right, #ef6f61 0 50%, #f3b55a 50%); }

.cassette-preview__reels {
  position: absolute;
  z-index: 3;
  inset: 39% 20% auto;
  display: flex;
  height: 28%;
  align-items: center;
  justify-content: space-between;
  padding-inline: 4%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 0 0 1px rgba(39, 34, 42, 0.16);
}

.cassette-preview__reels i {
  width: 24%;
  aspect-ratio: 1;
  border: max(3px, 0.28em) dotted #3b3540;
  border-radius: 50%;
  background: #f9f7f2;
}

.cassette-preview__reels b { width: 29%; height: 44%; border-radius: 2px; background: #242028; }

.cassette-preview__window {
  position: absolute;
  z-index: 2;
  inset: 44% 42% auto;
  height: 17%;
  border-radius: 2px;
  background: #242028;
  box-shadow: inset 0 0 0 2px #4d4652;
}

.cassette-preview__base {
  position: absolute;
  z-index: 3;
  inset: auto 17% 0;
  display: flex;
  height: 24%;
  align-items: center;
  justify-content: space-around;
  padding: 8% 9% 0;
  clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%);
  box-shadow: inset 1px 0 color-mix(in srgb, var(--cassette-edge), transparent 35%), inset -1px 0 color-mix(in srgb, var(--cassette-edge), transparent 35%);
}

.cassette-preview__base i { width: 12%; aspect-ratio: 1; border-radius: 50%; background: var(--cassette-edge); }
.cassette-preview__base b { width: 12%; aspect-ratio: 1; border-radius: 2px; background: var(--cassette-edge); }

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

.cassette-preview__stickers i {
  position: absolute;
  display: grid;
  width: 18%;
  height: 22%;
  place-items: center;
  color: #27222a;
  font-size: clamp(0.65rem, 1.5vw, 1rem);
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.cassette-preview__stickers img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 1px 1px rgba(39, 34, 42, 0.32));
}

.cassette-preview__stickers i:nth-child(1) { inset: 13% auto auto 8%; transform: rotate(-9deg); }
.cassette-preview__stickers i:nth-child(2) { inset: 11% 8% auto auto; transform: rotate(8deg); }
.cassette-preview__stickers i:nth-child(3) { inset: 54% auto auto 8%; transform: rotate(-5deg); }
.cassette-preview__stickers i[data-sticker="surprise"] {
  border: 2px solid #fffdf8;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(39, 34, 42, 0.28);
}

.cassette-choice-group {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.cassette-choice-group > legend {
  margin-block-end: 0.75rem;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 800;
}

.cassette-design-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.cassette-design-option,
.cassette-colour-options label,
.cassette-sticker-options label { position: relative; cursor: pointer; }

.cassette-design-option > input,
.cassette-colour-options input,
.cassette-sticker-options input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.cassette-design-option > span {
  display: grid;
  height: 100%;
  justify-items: center;
  gap: 0.45rem;
  padding: 0.8rem;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  text-align: center;
}

.cassette-builder__heading > .cassette-preview { width: min(100%, 240px); }
.cassette-design-option .cassette-preview { width: min(100%, 144px); }
.cassette-design-option strong { margin-block-start: 0.15rem; }
.cassette-design-option small { color: var(--ink-soft); line-height: 1.35; }
.cassette-design-option > input:checked + span { border-color: var(--rose-strong); background: var(--rose-soft); }
.cassette-design-option > input:focus-visible + span,
.cassette-colour-options input:focus-visible + span,
.cassette-sticker-options input:focus-visible + span { outline: 3px solid rgba(212, 20, 90, 0.25); outline-offset: 2px; }

.cassette-colour-options { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.cassette-colour-options label { min-width: 130px; }
.cassette-colour-options label > strong {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.8rem 0.65rem 2.8rem;
  border: 2px solid var(--line);
  border-radius: 10px;
}
.cassette-colour-options input:checked ~ strong { border-color: var(--rose-strong); background: var(--rose-soft); }
.cassette-colour-swatch { position: absolute; z-index: 1; inset: 12px auto auto 12px; width: 24px; height: 24px; border: 1px solid #8b858e; border-radius: 5px; background: #151319; }
.cassette-colour-swatch[data-colour="white"] { background: #fff; }

.cassette-sticker-count { margin: 0; color: var(--rose-strong); font-weight: 800; }
.cassette-sticker-mode-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.cassette-sticker-mode-options label { position: relative; cursor: pointer; }
.cassette-sticker-mode-options input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.cassette-sticker-mode-options span { display: grid; min-height: 92px; align-content: center; gap: 0.25rem; padding: 0.85rem 1rem; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); }
.cassette-sticker-mode-options strong { color: var(--ink); }
.cassette-sticker-mode-options small { color: var(--ink-soft); line-height: 1.45; }
.cassette-sticker-mode-options input:checked + span { border-color: var(--rose-strong); background: var(--rose-soft); }
.cassette-sticker-mode-options input:focus-visible + span { outline: 3px solid rgba(212, 20, 90, 0.25); outline-offset: 2px; }
.cassette-sticker-picker { display: grid; gap: 0.85rem; margin-block-start: 0.35rem; padding-block-start: 1rem; border-block-start: 1px solid var(--line); }
.cassette-sticker-picker[hidden] { display: none; }
.cassette-sticker-picker__tools { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.cassette-sticker-search { display: grid; width: min(100%, 18rem); gap: 0.3rem; color: var(--ink); font-weight: 700; }
.cassette-sticker-search input { min-height: 44px; padding: 0.55rem 0.7rem; border: 2px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; }
.cassette-sticker-search input:focus { border-color: var(--rose-strong); outline: 3px solid rgba(212, 20, 90, 0.18); outline-offset: 1px; }
.cassette-sticker-results { margin: -0.2rem 0 0; color: var(--ink-soft); font-size: 0.9rem; }
.cassette-sticker-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.6rem; }
.cassette-sticker-options > label[hidden] { display: none; }

.cassette-message-layout,
.cassette-finish-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 0.72fr);
  gap: 1.25rem;
  align-items: start;
}

.cassette-insert-preview {
  overflow: hidden;
  border: 2px solid #e7c7c7;
  border-radius: 16px;
  background: #fffaf4;
  color: #343044;
}

.cassette-insert-preview__brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem 1.1rem;
  background: #f8d6d8;
}

.cassette-insert-preview__brand span { color: #d94d78; font-size: 1.4rem; }
.cassette-insert-preview__body { min-height: 9rem; padding: 1.35rem 1.1rem; }
.cassette-insert-preview__body p { margin-block-start: 0; white-space: pre-wrap; }
.cassette-insert-preview__download {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 0.9rem;
  align-items: center;
  padding: 1rem 1.1rem;
  background: #d7eeea;
}
.cassette-insert-preview__download img,
.cassette-download-summary img,
.qr-placeholder { width: 7.5rem; aspect-ratio: 1; background: #fff; }
.cassette-insert-preview__download small { display: block; margin-block-start: 0.35rem; overflow-wrap: anywhere; color: #514b5d; }
.qr-placeholder { display: grid; place-items: center; border: 1px solid #877f91; font-weight: 800; }
.cassette-order-check { margin-block-start: 1.25rem; }
.cassette-finish-grid blockquote { margin-inline: 0; font-size: 1.05rem; line-height: 1.6; }
.cassette-download-summary img { display: block; margin-block: 0.75rem; }
.cassette-download-summary a { overflow-wrap: anywhere; }
.cassette-finish-stage address { font-style: normal; line-height: 1.65; }

@media (max-width: 840px) {
  .cassette-message-layout,
  .cassette-finish-grid { grid-template-columns: 1fr; }
}
.cassette-sticker-options label > span {
  display: grid;
  min-height: 74px;
  place-items: center;
  gap: 0.15rem;
  padding: 0.5rem;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  text-align: center;
}
.cassette-sticker-options b { display: grid; width: 52px; height: 52px; place-items: center; }
.cassette-sticker-options b img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cassette-sticker-options small { color: var(--ink-soft); font-weight: 700; }
.cassette-sticker-options input:checked + span { border-color: var(--rose-strong); background: var(--rose-soft); }
.cassette-sticker-options input:checked + span::after { position: absolute; inset: 5px 7px auto auto; color: var(--rose-strong); content: "✓"; font-weight: 900; }
.cassette-sticker-options input:disabled + span { cursor: not-allowed; opacity: 0.48; }

.delivery-address {
  padding-block-start: 1.25rem;
  border-block-start: 1px solid var(--line);
}
.delivery-address__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.delivery-address .field--postcode { max-width: 15rem; }

@media (min-width: 768px) {
  .checkout-grid:has(.cassette-builder) { grid-template-columns: minmax(0, 1fr); }
  .checkout-grid:has(.cassette-builder) > aside { max-width: none; }
}

@media (max-width: 700px) {
  .cassette-builder__heading { align-items: flex-start; flex-direction: column; }
  .cassette-builder__heading > .cassette-preview { align-self: center; width: min(100%, 260px); }
  .cassette-design-options { grid-template-columns: 1fr; }
  .cassette-design-option > span { grid-template-columns: 112px minmax(0, 1fr); align-items: center; justify-items: start; text-align: start; }
  .cassette-design-option .cassette-preview { grid-row: 1 / 3; }
  .cassette-sticker-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cassette-sticker-mode-options { grid-template-columns: 1fr; }
  .cassette-sticker-picker__tools { align-items: stretch; flex-direction: column; }
  .cassette-sticker-search { width: 100%; }
  .delivery-address__row { grid-template-columns: 1fr; gap: 0; }
}

.panel {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.panel + .panel {
  margin-block-start: 1rem;
}

.panel[data-selected="true"],
.panel[data-state="chosen"] {
  border-color: var(--rose-strong);
  background: var(--rose-soft);
}

.panel-subtle {
  background: var(--surface-subtle);
}

.character-count {
  margin: -0.75rem 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  text-align: end;
}

.card-family-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.75rem;
}

.card-family-choice {
  display: grid;
  min-width: 0;
  padding: 0.65rem;
  gap: 0.55rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  background: var(--surface);
  color: var(--ink);
  text-align: start;
}

.card-library-thumbnail,
.card-library-choice img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--surface-subtle);
}

.card-generated-preview {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  background: var(--surface-subtle);
}

.card-library-thumbnail {
  border-radius: var(--radius-small);
}

.card-family-choice__label,
.card-family-choice__label strong,
.card-family-choice > .selection-text {
  display: block;
}

.card-family-choice > .selection-text {
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.card-family-choice[aria-pressed="true"] {
  border: 2px solid var(--focus);
  background: var(--blue-soft);
}

.card-family-choice[aria-pressed="true"] .selection-text {
  color: var(--info);
}

.card-library-variants {
  margin-block-start: 1.5rem;
  padding-block-start: 1.5rem;
  border-block-start: 1px solid var(--line);
}

.card-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.75rem;
}

.card-library-choice {
  display: grid;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  background: var(--surface);
  color: var(--ink);
  text-align: start;
}

.card-library-choice > span {
  display: block;
  padding: 0.65rem;
}

.card-library-choice:hover,
.card-family-choice:hover {
  border-color: var(--focus);
}

.card-library-choice[aria-pressed="true"] {
  border: 3px solid var(--focus);
  background: var(--blue-soft);
}

.card-library-choice[aria-pressed="true"] > span {
  color: var(--info);
}

.card-image-method {
  margin: 0;
  border-block-start: 1px solid var(--line);
}

.card-image-method:last-of-type {
  border-block-end: 1px solid var(--line);
}

.card-image-method > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.15rem 1rem;
  align-items: center;
  min-height: var(--target);
  padding: 0.9rem 0;
  cursor: pointer;
  list-style: none;
}

.card-image-method > summary::-webkit-details-marker {
  display: none;
}

.card-image-method > summary::after {
  grid-column: 2;
  grid-row: 1 / span 2;
  content: "Open";
  color: var(--focus);
  font-size: 0.875rem;
  font-weight: 750;
}

.card-image-method[open] > summary::after {
  content: "Hide";
}

.card-image-method > summary span {
  grid-column: 1;
  display: block;
  color: var(--muted);
  font-size: 0.875rem;
}

.card-image-method__body {
  padding-block: 0.5rem 1.5rem;
}

/* Mobile Card is a choice-first task: keep both artwork routes obvious, then
   reveal the full preview only after an artwork choice exists. Desktop keeps
   its existing spacious review layout. */
@media (max-width: 767px) {
  .card-artwork-chooser > .section-heading {
    margin-block-end: 1rem;
  }

  .card-image-method,
  .card-image-method:last-of-type {
    margin-block-start: 0.75rem;
    border: 0;
  }

  .card-image-method > summary {
    position: relative;
    display: grid;
    min-height: 5.5rem;
    padding: 1rem 6rem 1rem 1rem;
    gap: 0.35rem;
    border: 2px solid var(--rose-strong);
    border-radius: var(--radius-small);
    background: var(--surface);
  }

  .card-image-method[data-image-method="custom"] > summary {
    border-color: var(--card-method-custom-border);
    background: var(--card-method-custom-surface);
  }

  .card-image-method[data-image-method="preset"] > summary {
    border-color: var(--card-method-preset-border);
    background: var(--card-method-preset-surface);
  }

  .card-image-method > summary strong {
    color: var(--focus);
    font-size: 1.05rem;
    line-height: 1.25;
  }

  .card-image-method[data-image-method="custom"] > summary strong {
    color: var(--card-method-custom-ink);
  }

  .card-image-method[data-image-method="preset"] > summary strong {
    color: var(--card-method-preset-ink);
  }

  .card-image-method > summary span {
    color: var(--ink-soft);
    font-size: 0.95rem;
    line-height: 1.35;
  }

  .card-image-method > summary::after {
    position: absolute;
    inset-inline-end: 1rem;
    inset-block-start: 50%;
    grid-column: auto;
    grid-row: auto;
    display: grid;
    min-width: 4.75rem;
    min-height: 44px;
    place-items: center;
    padding: 0.3rem 0.55rem;
    border: 1px solid currentColor;
    border-radius: 999px;
    background: var(--surface);
    content: "Choose";
    font-size: 0.82rem;
    font-weight: 750;
    line-height: 1;
    transform: translateY(-50%);
  }

  .card-image-method[open] > summary {
    background: var(--rose-soft);
  }

  .card-image-method[data-image-method="custom"][open] > summary {
    background: var(--card-method-custom-active);
  }

  .card-image-method[data-image-method="preset"][open] > summary {
    background: var(--card-method-preset-active);
  }

  .card-image-method[data-image-method="custom"] > summary::after {
    color: var(--card-method-custom-ink);
  }

  .card-image-method[data-image-method="preset"] > summary::after {
    color: var(--card-method-preset-ink);
  }

  .card-image-method[open] > summary::after {
    content: "Hide";
  }

  .card-image-method > summary:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
  }

  .card-image-method__body,
  .card-image-method > .card-style-picker {
    padding: 1rem 0 0;
  }

  .card-recipient-preview[data-artwork-ready="false"] {
    display: none;
  }
}

.card-style-picker {
  margin-block-start: 1.5rem;
  padding-block-start: 1.25rem;
  border-block-start: 1px solid var(--line);
}

.custom-image-route-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.custom-image-route-option {
  display: contents;
}

.custom-image-route-option[data-custom-route-option="upload"] > .custom-image-route-choice {
  grid-column: 1;
  grid-row: 1;
}

.custom-image-route-option[data-custom-route-option="generate"] > .custom-image-route-choice {
  grid-column: 2;
  grid-row: 1;
}

.custom-image-route-option > .custom-image-route-content {
  grid-column: 1 / -1;
  grid-row: 2;
}

.custom-image-route-choice {
  position: relative;
  min-height: var(--target);
  padding: 1rem 1rem 1rem 3.25rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  background: var(--surface);
  color: var(--ink);
  text-align: start;
}

.custom-image-route-choice::before {
  position: absolute;
  inset-block-start: 1rem;
  inset-inline-start: 1rem;
  display: grid;
  width: 1.35rem;
  height: 1.35rem;
  place-items: center;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  content: "";
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1;
}

.custom-image-route-choice:hover {
  background: var(--surface-subtle);
}

.custom-image-route-choice[aria-pressed="true"] {
  border: 2px solid var(--rose-strong);
  background: var(--rose-soft);
}

.custom-image-route-choice[aria-pressed="true"]::before {
  border-color: var(--rose-strong);
  background: var(--rose-strong);
  content: "✓";
}

.custom-image-route-choice strong,
.custom-image-route-choice span {
  display: block;
}

.custom-image-route-choice span {
  margin-block-start: 0.2rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.custom-image-route-choice[aria-pressed="true"] span {
  color: var(--ink-soft);
}

.custom-image-route-content {
  margin-block-start: 1.25rem;
  padding-block-start: 1.25rem;
  border-block-start: 1px solid var(--line);
}

.custom-image-route-content > h3 {
  margin-block-end: 0.35rem;
}

.crop-stage {
  position: relative;
  width: min(100%, 38rem);
  aspect-ratio: 2 / 1;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--ink);
}

.upload-draft-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-block-end: 0.75rem;
}

.upload-draft-heading p {
  margin: 0;
}

.crop-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center;
}

.crop-required-outline {
  position: absolute;
  inset: 0;
  border: 3px dashed #ffffff;
  box-shadow: inset 0 0 0 1px #161616;
  pointer-events: none;
}

.crop-required-outline span {
  position: absolute;
  inset: 0.5rem auto auto 0.5rem;
  padding: 0.2rem 0.35rem;
  background: #ffffff;
  color: #161616;
  font-size: 0.8rem;
  font-weight: 700;
}

.crop-stage--confirmed .crop-required-outline {
  border-style: solid;
}

.crop-controls {
  display: grid;
  gap: 0.75rem;
  width: min(100%, 38rem);
  margin-block-start: 1rem;
}

.crop-controls .field {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) minmax(10rem, 2fr) 3.5rem;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
}

.crop-controls output {
  text-align: end;
}

@media (min-width: 900px) {
  .custom-image-route-content:has(> .crop-controls) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(19rem, 22rem);
    grid-template-areas:
      "heading heading"
      "intro intro"
      "upload upload"
      "actions actions"
      "preview controls"
      "help controls";
    column-gap: 1.5rem;
    align-items: start;
  }

  .custom-image-route-content:has(> .crop-controls) > h3 {
    grid-area: heading;
  }

  .custom-image-route-content:has(> .crop-controls) > h3 + p {
    grid-area: intro;
  }

  .custom-image-route-content:has(> .crop-controls) > .field {
    grid-area: upload;
  }

  .custom-image-route-content:has(> .crop-controls) > .upload-draft-heading {
    grid-area: actions;
  }

  .custom-image-route-content:has(> .crop-controls) > .crop-stage {
    grid-area: preview;
    width: 100%;
  }

  .custom-image-route-content:has(> .crop-controls) > .crop-stage + .field-help {
    grid-area: help;
    max-width: 65ch;
    margin-block: 0.5rem 0;
  }

  .custom-image-route-content:has(> .crop-controls) > .crop-controls {
    grid-area: controls;
    width: 100%;
    margin-block-start: 0;
    position: sticky;
    top: 6.5rem;
  }

  .custom-image-route-content:has(> .crop-controls) > .crop-controls .field {
    grid-template-columns: minmax(0, 1fr) 3.5rem;
  }

  .custom-image-route-content:has(> .crop-controls) > .crop-controls .field label {
    grid-column: 1 / -1;
  }
}

/* Customer dashboard and creation journey, local design pass.
   These selectors are intentionally scoped away from the public homepage,
   checkout, account screens and recipient experience. */

/* My Melograms is one continuous account page, separated by rules rather
   than a grid of floating cards. */
#app .product-shell .workspace.customer-dashboard {
  display: block;
  width: min(calc(100% - 2rem), 80rem);
  max-width: 80rem;
  padding-block: 0 5rem;
}

.product-shell .customer-dashboard > .workspace-main {
  width: 100%;
}

.product-shell .customer-dashboard .dashboard-welcome {
  display: grid;
  min-height: 24rem;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem);
  align-items: center;
  gap: 3.5rem;
  margin: 0;
  padding: 4rem 0 3.5rem;
  overflow: visible;
  border: 0;
  border-block-end: 1px solid #e9ceda;
  background: transparent;
}

.product-shell .customer-dashboard .dashboard-welcome::before {
  inset: 1rem -3rem 1rem auto;
  width: min(44vw, 30rem);
  height: auto;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 218, 232, 0.72), rgba(255, 245, 249, 0) 68%);
}

.product-shell .customer-dashboard .dashboard-welcome > div {
  max-width: 42rem;
}

.product-shell .customer-dashboard .dashboard-welcome .screen-kicker {
  margin-block-end: 1rem;
  color: #b70a4c;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.product-shell .customer-dashboard .dashboard-welcome h1 {
  margin-block-end: 1rem;
  color: #3d3553;
  font-family: "Poppins", ui-sans-serif, system-ui, sans-serif;
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.product-shell .customer-dashboard .dashboard-welcome h1 em {
  position: relative;
  top: 0.03em;
  margin-inline-start: 0.03em;
  color: #d4145a;
  font-family: "brushberry-script", "Dancing Script", cursive;
  font-size: 0.96em;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0;
}

.product-shell .customer-dashboard .dashboard-welcome p:not(.screen-kicker) {
  max-width: 39rem;
  margin-block-end: 0;
  color: #514b63;
  font-size: 1.15rem;
  line-height: 1.65;
}

.product-shell .customer-dashboard .dashboard-welcome .screen-actions {
  margin-block-start: 2rem;
  gap: 1rem;
}

.product-shell .customer-dashboard .dashboard-welcome .button {
  min-height: 3.5rem;
  padding-inline: 1.4rem;
}

.product-shell .customer-dashboard .dashboard-welcome > img {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: 19rem;
  justify-self: end;
  object-fit: contain;
  mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(ellipse 75% 82% at center, #000 58%, transparent 100%);
  mask-image: radial-gradient(ellipse 75% 82% at center, #000 58%, transparent 100%);
  filter: drop-shadow(0 10px 12px rgba(91, 42, 79, 0.1));
}

.product-shell .customer-dashboard .overview-grid {
  display: block;
}

.product-shell .customer-dashboard .dashboard-section {
  margin: 2rem 0 0;
  padding: 2rem 1.5rem 1.5rem;
  border: 1px solid #eadbe2;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: none;
}

.product-shell .customer-dashboard .dashboard-section:first-child {
  border-block-start: 1px solid #eadbe2;
}

.product-shell .customer-dashboard .dashboard-section .section-heading {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem 1.25rem;
  margin-block-end: 1.6rem;
}

.product-shell .customer-dashboard .section-heading__icon {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border-radius: 50%;
  background: #fff0f5;
  color: #dc0c5c;
  font-size: 1.3rem;
  font-weight: 800;
}

.product-shell .customer-dashboard .dashboard-section .section-heading h2 {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
}

.product-shell .customer-dashboard .dashboard-section .section-heading p {
  max-width: 42rem;
  margin: 0;
  color: #625c70;
  font-size: 1rem;
}

.product-shell .customer-dashboard .dashboard-section .badge {
  display: grid;
  min-width: 2.35rem;
  min-height: 2.35rem;
  place-items: center;
  padding: 0.25rem;
  border: 0;
  border-radius: 50%;
  background: #ffe3ed;
  color: #b90a4d;
  font-size: 0.95rem;
  font-weight: 800;
}

.product-shell .customer-dashboard .order-list {
  display: block;
  border-block-start: 0;
}

.product-shell .customer-dashboard .melogram-entry {
  display: grid;
  min-width: 0;
  grid-template-columns: 5rem minmax(0, 1fr) auto;
  align-items: start;
  gap: 1.75rem;
  padding: 1.65rem;
  border: 1px solid #ecdce4;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: none;
}

.product-shell .customer-dashboard .melogram-entry:last-child {
  border-block-end: 1px solid #ecdce4;
}

.product-shell .customer-dashboard .order-card__accent {
  display: grid;
  width: 5rem;
  height: 5rem;
  place-items: center;
  border: 1px solid #f3c1d4;
  border-radius: 12px;
  background: #fff0f5;
  color: #d80b5b;
  font-size: 1.65rem;
}

.product-shell .customer-dashboard .order-card__accent--image {
  overflow: hidden;
  padding: 0;
  background: #ffffff;
}

.product-shell .customer-dashboard .order-card__accent--image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.product-shell .customer-dashboard .order-card__body {
  min-width: 0;
}

.product-shell .customer-dashboard .order-card__eyebrow {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
}

.product-shell .customer-dashboard .order-card__eyebrow .screen-kicker {
  margin: 0;
  color: #8b3157;
  font-size: 0.92rem;
  letter-spacing: 0;
  text-transform: none;
}

.product-shell .customer-dashboard .order-card__eyebrow .status {
  min-height: 2rem;
  padding-inline: 0.7rem;
  font-size: 0.85rem;
}

.product-shell .customer-dashboard .melogram-entry h3 {
  margin: 0.55rem 0 1rem;
  overflow-wrap: anywhere;
  font-size: 1.45rem;
}

.product-shell .customer-dashboard .meta-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(12rem, max-content));
  gap: 0.55rem 2rem;
  margin: 0;
  padding: 0;
  color: #615b6d;
  font-size: 0.98rem;
  line-height: 1.5;
  list-style: none;
}

.product-shell .customer-dashboard .meta-list li:last-child {
  grid-column: 1 / -1;
  color: #756f7d;
}

.product-shell .customer-dashboard .melogram-entry .supporting-text {
  margin-block-start: 0.65rem;
  color: #625c70;
  font-size: 0.95rem;
}

.product-shell .customer-dashboard .melogram-entry .order-card__actions {
  display: flex;
  width: auto;
  max-width: 24rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-self: center;
  gap: 0.65rem;
}

.product-shell .customer-dashboard .melogram-entry .order-card__actions > .button {
  min-width: 10.5rem;
  flex: 0 1 auto;
}

.product-shell .customer-dashboard .melogram-entry[data-order-state="ready"] .order-card__actions {
  display: grid;
  width: min(23rem, 30vw);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-shell .customer-dashboard .melogram-entry[data-order-state="ready"] .order-card__actions > .button {
  width: 100%;
  min-width: 0;
}

.product-shell .customer-dashboard .melogram-entry[data-order-state="ready"] .order-card__actions > .button:nth-child(3) {
  grid-column: 1 / -1;
}

.product-shell .customer-dashboard .dashboard-empty {
  display: flex;
  min-height: 3.5rem;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0 0.25rem 4.25rem;
  border: 0;
  background: transparent;
}

.product-shell .customer-dashboard .dashboard-empty > span {
  color: #dc0c5c;
  font-size: 1.35rem;
}

.product-shell .customer-dashboard .dashboard-empty p {
  margin: 0;
}

/* The five-stage creation flow is a wide work surface with a supporting rail.
   Existing panels remain in the DOM for behaviour, but top-level panels render
   as full sections rather than cards. */
.product-shell .app-frame:has(> .stage-nav) {
  width: 100%;
  max-width: none;
}

.product-shell .app-frame:has(> .stage-nav) > .stage-nav {
  position: sticky;
  z-index: calc(var(--z-sticky) - 1);
  inset-block-start: var(--topbar-height);
  padding: 0;
  overflow: visible;
  border-block-end: 1px solid #e8ced9;
  background: rgba(255, 251, 253, 0.98);
  box-shadow: 0 4px 10px rgba(65, 32, 65, 0.035);
}

.product-shell .app-frame:has(> .stage-nav) .stage-list {
  display: grid;
  width: min(calc(100% - 2rem), 74rem);
  min-width: 0;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0 auto;
  padding: 0;
}

.product-shell .app-frame:has(> .stage-nav) .stage-item {
  position: relative;
  min-width: 0;
}

.product-shell .app-frame:has(> .stage-nav) .stage-item:not(:last-child)::after {
  position: absolute;
  z-index: 0;
  inset-block-start: 50%;
  inset-inline: calc(50% + 2.3rem) calc(-50% + 2.3rem);
  height: 1px;
  background: #dfc0cd;
  content: "";
}

.product-shell .app-frame:has(> .stage-nav) .stage-link {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  min-height: 5rem;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 0.4rem;
  border: 0;
  border-block-end: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #686174;
  font-size: 0.9rem;
}

.product-shell .app-frame:has(> .stage-nav) .stage-link:hover {
  background: #fff2f7;
}

.product-shell .app-frame:has(> .stage-nav) .stage-link[data-state="current"] {
  border-block-end-color: #dc0c5d;
  background: #fff5f8;
  color: #b70849;
}

.product-shell .app-frame:has(> .stage-nav) .stage-number {
  display: grid;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1.5px solid #cdb6c1;
  border-radius: 50%;
  background: #fff;
  color: #686174;
  font-size: 0.82rem;
  font-weight: 800;
}

.product-shell .app-frame:has(> .stage-nav) .stage-link[data-state="current"] .stage-number {
  border-color: #dc0c5d;
  background: #dc0c5d;
  color: #fff;
}

.product-shell .app-frame:has(> .stage-nav) .stage-link[data-state="complete"] .stage-number {
  border-color: #188363;
  background: #e6f7f0;
  color: #11654c;
}

.product-shell .app-frame:has(> .stage-nav) .workspace {
  display: grid;
  width: min(calc(100% - 2rem), 74rem);
  max-width: 74rem;
  grid-template-columns: minmax(0, 1fr) 17.5rem;
  align-items: start;
  gap: 3rem;
  margin-inline: auto;
  padding: 3rem 0 6rem;
}

.product-shell .app-frame:has(> .stage-nav) .workspace-main {
  min-width: 0;
}

.product-shell .app-frame:has(> .stage-nav) .workspace-main > .screen > .screen-header {
  margin-block-end: 0;
  padding-block-end: 2.25rem;
  border-block-end: 1px solid #e7ccd8;
}

.product-shell .app-frame:has(> .stage-nav) .workspace-main > .screen > .screen-header h1 {
  max-width: 22ch;
  margin-block-end: 0.75rem;
  font-size: 2.35rem;
  letter-spacing: -0.035em;
}

.product-shell .app-frame:has(> .stage-nav) .workspace-main > .screen > .screen-header p {
  max-width: 62ch;
  margin-block-end: 0.65rem;
  font-size: 1rem;
  line-height: 1.65;
}

.product-shell .app-frame:has(> .stage-nav) .workspace-main > .screen > :is(.panel, .section, .stage-next-action, .details-moments, .details-moment-progress) {
  margin: 0;
  padding: 2.25rem 0;
  border: 0;
  border-block-end: 1px solid #ead5df;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.product-shell .app-frame:has(> .stage-nav) .workspace-main > .screen > .details-moments {
  padding-block: 1.4rem;
}

.product-shell .app-frame:has(> .stage-nav) .details-moments ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  border: 0;
  background: transparent;
}

.product-shell .app-frame:has(> .stage-nav) .details-moment {
  min-height: 3rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid #ddc1ce;
  border-radius: 10px;
  background: #fff;
}

.product-shell .app-frame:has(> .stage-nav) .details-moment[aria-current="step"] {
  border-color: #d80c5b;
  background: #fff0f5;
  color: #a90643;
}

.product-shell .app-frame:has(> .stage-nav) .details-moment-progress {
  padding-block: 1rem;
  color: #6c6575;
  font-size: 0.9rem;
}

.product-shell .app-frame:has(> .stage-nav) .details-moment-panel {
  padding-block: 2.25rem;
}

.product-shell .app-frame:has(> .stage-nav) .details-moment-panel > h2,
.product-shell .app-frame:has(> .stage-nav) .workspace-main > .screen > .panel > h2,
.product-shell .app-frame:has(> .stage-nav) .workspace-main > .screen > .section .section-heading h2 {
  font-size: 1.5rem;
}

.product-shell .app-frame:has(> .stage-nav) .form-grid,
.product-shell .app-frame:has(> .stage-nav) .field-row {
  gap: 1.25rem 1.5rem;
}

.product-shell .app-frame:has(> .stage-nav) .field > label,
.product-shell .app-frame:has(> .stage-nav) .field-label,
.product-shell .app-frame:has(> .stage-nav) legend {
  color: #312c49;
  font-size: 1rem;
  font-weight: 700;
}

.product-shell .app-frame:has(> .stage-nav) input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
.product-shell .app-frame:has(> .stage-nav) select,
.product-shell .app-frame:has(> .stage-nav) textarea {
  min-height: 3.4rem;
  border: 1.5px solid #bfa9b5;
  border-radius: 10px;
  background: #fff;
  font-size: 1rem;
}

.product-shell .app-frame:has(> .stage-nav) :is(input, select, textarea):hover {
  border-color: #987d8b;
}

.product-shell .app-frame:has(> .stage-nav) :is(input, select, textarea):focus {
  border-color: #d40b58;
  box-shadow: 0 0 0 3px rgba(212, 11, 88, 0.12);
}

.product-shell .app-frame:has(> .stage-nav) :is(.version-item, .player-row, .history-item, .allowance-item, .empty-state) {
  border: 0;
  border-block-end: 1px solid #ead8e0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.product-shell .app-frame:has(> .stage-nav) .stage-next-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: transparent;
}

.product-shell .app-frame:has(> .stage-nav) .workspace-aside {
  position: sticky;
  inset-block-start: calc(var(--topbar-height) + 6.5rem);
  display: block;
  max-height: calc(100dvh - var(--topbar-height) - 8rem);
  margin: 0;
  padding-inline-start: 1.75rem;
  overflow: auto;
  border-block-start: 0;
  border-inline-start: 1px solid #e2c6d2;
}

.product-shell .app-frame:has(> .stage-nav) .workspace-aside > :is(.panel, .section) {
  margin: 0;
  padding: 0 0 1.5rem;
  border: 0;
  border-block-end: 1px solid #ead8e0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.product-shell .app-frame:has(> .stage-nav) .workspace-aside > :is(.panel, .section) + :is(.panel, .section) {
  padding-block-start: 1.5rem;
}

.product-shell .app-frame:has(> .stage-nav) .workspace-aside h3 {
  font-size: 1.05rem;
}

.product-shell .app-frame:has(> .stage-nav) .workspace-aside p,
.product-shell .app-frame:has(> .stage-nav) .workspace-aside li {
  font-size: 0.88rem;
  line-height: 1.55;
}

@media (max-width: 900px) {
  #app .product-shell .workspace.customer-dashboard {
    width: min(calc(100% - 2rem), 46rem);
  }

  .product-shell .customer-dashboard .dashboard-welcome {
    grid-template-columns: minmax(0, 1fr) 12rem;
    gap: 1.5rem;
  }

  .product-shell .customer-dashboard .dashboard-welcome h1 {
    font-size: 2.15rem;
  }

  .product-shell .customer-dashboard .melogram-entry {
    grid-template-columns: 5rem minmax(0, 1fr);
  }

  .product-shell .customer-dashboard .melogram-entry .order-card__actions {
    grid-column: 2;
    width: auto;
    max-width: none;
    justify-content: flex-start;
    margin-block-start: 0.25rem;
  }

  .product-shell .customer-dashboard .melogram-entry[data-order-state="ready"] .order-card__actions {
    width: min(100%, 23rem);
  }

  .product-shell .app-frame:has(> .stage-nav) .workspace {
    display: block;
    width: min(calc(100% - 2rem), 46rem);
    padding-block-start: 2.25rem;
  }

  .product-shell .app-frame:has(> .stage-nav) .workspace-aside {
    position: static;
    max-height: none;
    margin-block-start: 2.5rem;
    padding: 2rem 0 0;
    overflow: visible;
    border-inline-start: 0;
    border-block-start: 1px solid #e2c6d2;
  }
}

@media (max-width: 767.98px) {
  #app .product-shell .workspace.customer-dashboard {
    width: 100%;
    padding: 0 1rem 4rem;
  }

  .product-shell .customer-dashboard .dashboard-welcome {
    display: block;
    min-height: 0;
    padding: 2rem 0 2.5rem;
  }

  .product-shell .customer-dashboard .dashboard-welcome::before,
  .product-shell .customer-dashboard .dashboard-welcome > img {
    display: none;
  }

  .product-shell .customer-dashboard .dashboard-welcome h1 {
    font-size: 1.95rem;
  }

  .product-shell .customer-dashboard .dashboard-welcome p:not(.screen-kicker) {
    font-size: 1rem;
  }

  .product-shell .customer-dashboard .dashboard-welcome .screen-actions {
    display: grid;
  }

  .product-shell .customer-dashboard .dashboard-welcome .button {
    width: 100%;
    min-width: 0;
    padding-inline: 0.9rem;
    white-space: normal;
  }

  .product-shell .customer-dashboard .dashboard-section {
    margin-block-start: 1.25rem;
    padding: 1.25rem 1rem;
  }

  .product-shell .customer-dashboard .dashboard-section .section-heading {
    grid-template-columns: 2.75rem minmax(0, 1fr) auto;
    gap: 0.75rem;
    margin-block-end: 1.1rem;
  }

  .product-shell .customer-dashboard .section-heading__icon {
    width: 2.75rem;
    height: 2.75rem;
  }

  .product-shell .customer-dashboard .dashboard-section .section-heading h2 {
    font-size: 1rem;
  }

  .product-shell .customer-dashboard .melogram-entry {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.8rem;
    padding: 1.25rem;
  }

  .product-shell .customer-dashboard .order-card__accent {
    display: none;
  }

  .product-shell .customer-dashboard .order-card__eyebrow {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-shell .customer-dashboard .meta-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.35rem;
  }

  .product-shell .customer-dashboard .meta-list li:last-child {
    grid-column: auto;
  }

  .product-shell .customer-dashboard .melogram-entry .order-card__actions {
    display: grid;
    width: 100%;
    max-width: none;
    margin-block-start: 0.35rem;
    grid-column: auto;
  }

  .product-shell .customer-dashboard .melogram-entry[data-order-state="ready"] .order-card__actions {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }

  .product-shell .customer-dashboard .melogram-entry[data-order-state="ready"] .order-card__actions > .button:nth-child(3) {
    grid-column: auto;
  }

  .product-shell .customer-dashboard .melogram-entry .order-card__actions > .button {
    width: 100%;
    min-width: 0;
  }

  .product-shell .app-frame:has(> .stage-nav) > .stage-nav {
    position: static;
  }

  .product-shell .app-frame:has(> .stage-nav) .mobile-stage-summary {
    display: flex;
    min-height: 3.25rem;
    padding-inline: 1rem;
    border-block-end: 1px solid #ead5df;
    background: #fff7fa;
  }

  .product-shell .app-frame:has(> .stage-nav) .stage-list {
    width: 100%;
  }

  .product-shell .app-frame:has(> .stage-nav) .stage-item:not(:last-child)::after {
    display: none;
  }

  .product-shell .app-frame:has(> .stage-nav) .stage-link {
    min-height: 4rem;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.35rem 0.1rem;
    font-size: 0.68rem;
  }

  .product-shell .app-frame:has(> .stage-nav) .stage-number {
    width: 1.55rem;
    height: 1.55rem;
    font-size: 0.7rem;
  }

  .product-shell .app-frame:has(> .stage-nav) .stage-done {
    display: none;
  }

  .product-shell .app-frame:has(> .stage-nav) .workspace {
    width: 100%;
    padding: 1.5rem 1rem 7.5rem;
  }

  .product-shell .app-frame:has(> .stage-nav) .workspace-main > .screen > .screen-header {
    padding-block-end: 1.75rem;
  }

  .product-shell .app-frame:has(> .stage-nav) .workspace-main > .screen > .screen-header h1 {
    max-width: none;
    font-size: 1.85rem;
  }

  .product-shell .app-frame:has(> .stage-nav) .workspace-main > .screen > :is(.panel, .section, .stage-next-action, .details-moments, .details-moment-progress) {
    padding-block: 1.75rem;
  }

  .product-shell .app-frame:has(> .stage-nav) .details-moments ol {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-shell .app-frame:has(> .stage-nav) .details-moment {
    width: 100%;
    min-width: 0;
  }

  .product-shell .app-frame:has(> .stage-nav) .stage-next-action {
    align-items: stretch;
    flex-direction: column;
  }

  .product-shell .app-frame:has(> .stage-nav) .stage-next-action .button {
    width: 100%;
  }

  .product-shell .app-frame:has(> .stage-nav) .workspace-aside[data-mobile-state="closed"] {
    display: none;
  }
}

@media (max-width: 374px) {
  .product-shell .app-frame:has(> .stage-nav) .stage-link {
    font-size: 0.62rem;
  }

  .product-shell .app-frame:has(> .stage-nav) .details-moments ol {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-shell .customer-dashboard *,
  .product-shell .app-frame:has(> .stage-nav) * {
    scroll-behavior: auto;
    transition-duration: 0.01ms !important;
  }
}

.photo-output-choices {
  margin-block-start: 1.25rem;
  padding-block-start: 1.25rem;
  border-block-start: 1px solid var(--line);
}

.photo-output-choices > .button-row + .form-grid {
  margin-block-start: 1.25rem;
}

.photo-output-choices > .field-help + .button {
  margin-block-start: 0.75rem;
}

.card-upload-preview .crop-required-outline span {
  display: none;
}

@media (max-width: 560px) {
  .custom-image-route-picker {
    grid-template-columns: 1fr;
  }

  .custom-image-route-option {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .custom-image-route-option[data-custom-route-option] > .custom-image-route-choice,
  .custom-image-route-option > .custom-image-route-content {
    grid-column: 1;
    grid-row: auto;
  }

  .custom-image-route-option[data-state="selected"] > .custom-image-route-choice {
    border-end-start-radius: 0;
    border-end-end-radius: 0;
  }

  .custom-image-route-option > .custom-image-route-content {
    margin-block-start: -2px;
    padding: 1.1rem 1rem 1.25rem;
    border: 2px solid var(--rose-strong);
    border-block-start: 0;
    border-radius: 0 0 var(--radius-small) var(--radius-small);
    background: var(--surface);
  }

  .crop-controls .field {
    grid-template-columns: 1fr 3.5rem;
  }

  .crop-controls .field label {
    grid-column: 1 / -1;
  }
}

.card-artwork-placeholder {
  position: relative;
  display: grid;
  min-height: 6.5rem;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface-subtle);
  color: var(--ink);
  text-align: center;
}

.card-artwork-placeholder span {
  position: absolute;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

.card-artwork-placeholder span:nth-child(1) { inset: 0.7rem auto auto 0.7rem; }
.card-artwork-placeholder span:nth-child(2) { inset: auto 0.7rem 0.7rem auto; }
.card-artwork-placeholder span:nth-child(3) { width: 3.25rem; height: 1rem; inset: auto auto 0.65rem 0.7rem; }
.card-artwork-placeholder[data-layout="2"] span:nth-child(1) { inset: 0.7rem 0.7rem auto auto; border-radius: 50%; }
.card-artwork-placeholder[data-layout="2"] span:nth-child(2) { inset: auto auto 0.7rem 0.7rem; border-radius: 50%; }
.card-artwork-placeholder[data-layout="3"] span:nth-child(1) { width: 70%; height: 1rem; inset: 0.7rem auto auto; }
.card-artwork-placeholder[data-layout="3"] span:nth-child(2) { width: 70%; height: 1rem; inset: auto auto 0.7rem; }
.card-artwork-placeholder[data-layout="4"] span { transform: rotate(45deg); }
.card-artwork-placeholder strong { position: relative; z-index: 1; max-width: 8rem; padding: 0.35rem; background: var(--surface); }

.card-artwork-placeholder--large {
  min-height: 16rem;
}

.composed-card-preview {
  display: grid;
  gap: 1.25rem;
}

.card-preview-marker,
.card-preview-frame__bar {
  display: none;
}

.composed-card-preview__copy {
  align-self: center;
}

.composed-card-preview__copy p {
  white-space: pre-wrap;
}

.stack > * + * {
  margin-block-start: 1rem;
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  margin: 0;
  padding: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  list-style: none;
}

.meta-list strong {
  color: var(--ink);
}

/* Buttons and links */
.button {
  display: inline-flex;
  min-height: var(--target);
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-small);
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.button:hover {
  text-decoration: none;
}

.button:active {
  transform: translateY(1px);
}

.button-primary {
  border-color: var(--rose-strong);
  background: var(--rose-strong);
  color: #ffffff;
}

.button-primary:hover {
  border-color: #86203e;
  background: #86203e;
  color: #ffffff;
}

.button-secondary {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.button-secondary:hover {
  border-color: var(--ink-soft);
  background: var(--surface-subtle);
}

.button-quiet,
.button-link {
  border-color: transparent;
  background: transparent;
  color: var(--rose-strong);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.button-quiet:hover,
.button-link:hover {
  background: var(--rose-soft);
}

.button-danger {
  border-color: var(--danger);
  background: var(--surface);
  color: var(--danger);
}

.button-danger:hover {
  background: #ffedf0;
}

.button-small {
  min-height: var(--target);
  padding-inline: 0.75rem;
  font-size: 0.9rem;
}

.button[aria-busy="true"] {
  cursor: wait;
  opacity: 0.82;
}

.button:disabled,
.button[aria-disabled="true"] {
  border-color: var(--line);
  background: #e9e8ec;
  color: #676272;
  opacity: 1;
}

/* Forms */
.form-grid,
.field-row {
  display: grid;
  gap: 1rem;
}

.field {
  min-width: 0;
}

.field > label,
.field-label,
legend {
  display: block;
  margin-block-end: 0.35rem;
  color: var(--ink);
  font-weight: 700;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
select,
textarea {
  width: 100%;
  min-height: var(--target);
  padding: 0.65rem 0.75rem;
  border: 1px solid #817b8e;
  border-radius: var(--radius-small);
  background: var(--surface);
  color: var(--ink);
}

textarea {
  min-height: 10rem;
  resize: vertical;
  line-height: 1.55;
}

input::placeholder,
textarea::placeholder {
  color: #5f596d;
  opacity: 1;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--ink-soft);
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"],
.field[data-state="error"] :where(input, select, textarea) {
  border-width: 2px;
  border-color: var(--error);
}

.field-help,
.field-count,
.supporting-text {
  margin-block: 0.35rem 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.field-error {
  margin-block: 0.35rem 0;
  color: var(--error);
  font-size: 0.9rem;
  font-weight: 700;
}

.locked-field-value {
  display: flex;
  min-height: var(--target);
  padding: 0.65rem 0.75rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  background: var(--surface-subtle);
  color: var(--ink);
}

.locked-field-value span {
  color: var(--muted);
  font-size: 0.875rem;
}

.genre-change-link {
  min-height: auto;
  margin-block-start: 0.3rem;
  padding: 0.2rem 0;
}

.genre-change-warning {
  margin-block: 0.5rem 0;
}

.choice-list {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.choice {
  display: flex;
  min-height: var(--target);
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.55rem 0;
  cursor: pointer;
}

.choice input {
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 auto;
  margin-block-start: 0.1rem;
  accent-color: var(--rose-strong);
}

.choice label {
  flex: 1 1 auto;
}

.choice-list {
  display: grid;
  gap: 0.75rem;
  margin-block-start: 1rem;
}

.choice-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border: 1px solid #f0bfd0;
  border-radius: 12px;
  background: #fffafd;
  transition: border-color 160ms ease-out, background-color 160ms ease-out;
}

.choice-row:first-child {
  border-block-start: 1px solid #f0bfd0;
}

.choice-row:hover,
.choice-row:focus-within {
  border-color: #e35f8c;
  background: #fff3f7;
}

.choice-row h3,
.choice-row p {
  margin-block-end: 0.3rem;
}

.choice-row .button {
  align-self: stretch;
}

.ai-improve-panel {
  margin-block-start: 1rem;
  padding-block-start: 1rem;
  border-block-start: 1px solid var(--line);
}

/* Status, errors and feedback */
.badge,
.status,
.save-status {
  display: inline-flex;
  min-height: 1.75rem;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 750;
  line-height: 1.25;
}

:where(.badge, .status, .save-status)[data-state="saved"],
:where(.badge, .status, .save-status)[data-state="success"],
:where(.badge, .status)[data-state="ready"],
:where(.badge, .status)[data-state="complete"] {
  border-color: #60a995;
  background: var(--mint-soft);
  color: var(--success);
}

:where(.badge, .status, .save-status)[data-state="saving"],
:where(.badge, .status)[data-state="queued"],
:where(.badge, .status)[data-state="creating"] {
  border-color: #7294cf;
  background: var(--blue-soft);
  color: var(--info);
}

:where(.badge, .status, .save-status)[data-state="warning"],
:where(.badge, .status)[data-state="attention"] {
  border-color: #b88718;
  background: var(--gold-soft);
  color: var(--warning);
}

:where(.badge, .status, .save-status)[data-state="error"],
:where(.badge, .status)[data-state="failed"] {
  border-color: #d26a7c;
  background: #ffedf0;
  color: var(--error);
}

.alert,
.banner,
.error-summary {
  margin-block: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  background: var(--surface);
}

:where(.alert, .banner)[data-state="success"] {
  border-color: #60a995;
  background: var(--mint-soft);
  color: #104f3e;
}

:where(.alert, .banner)[data-state="warning"] {
  border-color: #b88718;
  background: var(--gold-soft);
  color: #5a3e00;
}

:where(.alert, .banner)[data-state="info"] {
  border-color: #7294cf;
  background: var(--blue-soft);
  color: #123d70;
}

.music-waiting progress {
  display: block;
  width: 100%;
  height: 0.75rem;
  margin-block: 0.75rem 1rem;
  accent-color: var(--rose-strong);
}

.music-waiting__activity {
  font-weight: 700;
}

.music-waiting[data-delayed="true"] {
  border-color: #b88718;
  background: var(--gold-soft);
  color: #5a3e00;
}

:where(.alert, .banner)[data-state="error"],
.error-summary {
  border-color: #d26a7c;
  background: #ffedf0;
  color: #7c1529;
}

.alert > :last-child,
.banner > :last-child,
.error-summary > :last-child {
  margin-block-end: 0;
}

.progress {
  overflow: hidden;
  height: 0.65rem;
  border-radius: 999px;
  background: #dedce4;
}

.progress > span,
.progress__value {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--rose-strong);
}

/* Dashboard, history and versions */
.dashboard-section + .dashboard-section {
  margin-block-start: 2rem;
}

.order-list,
.version-list,
.player-list,
.history-list,
.allowance-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.order-card,
.order-row,
.version-item,
.player-row,
.history-item,
.allowance-item {
  min-width: 0;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.order-card,
.order-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.order-card__body,
.order-row__body,
.version-item__body,
.player-row__body {
  min-width: 0;
  flex: 1 1 auto;
}

.order-card__actions,
.order-row__actions,
.version-item__actions,
.player-row__actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chosen-track-actions {
  display: grid;
  justify-items: stretch;
  gap: 0.5rem;
}

.player-row__actions {
  align-items: flex-start;
}

.chosen-track-actions .status {
  justify-content: center;
}

.version-item,
.player-row {
  display: grid;
  gap: 0.75rem;
}

.version-item__summary.has-thumbnail {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  align-items: start;
  gap: 0.85rem;
}

.version-item__thumbnail {
  display: block;
  width: 5.5rem;
  aspect-ratio: 4 / 3;
  border-radius: 0.45rem;
  object-fit: cover;
  background: var(--surface-subtle);
}

.version-item__body > :first-child {
  display: block;
}

.version-item__body > :last-child {
  margin-block-end: 0;
}

.version-item[data-selected="true"],
.version-item[data-state="chosen"],
.player-row[data-selected="true"],
.player-row[data-state="chosen"] {
  border-color: var(--rose-strong);
  background: var(--rose-soft);
}

.version-item[data-current="true"]::before,
.player-row[data-current="true"]::before {
  content: "Chosen for your Melogram";
  color: var(--rose-strong);
  font-size: 0.82rem;
  font-weight: 800;
}

.version-preview,
.lyrics-preview {
  max-height: 18rem;
  overflow: auto;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--canvas);
  white-space: pre-wrap;
}

.lyrics-copy-actions {
  display: flex;
  justify-content: flex-end;
  margin-block-start: 0.65rem;
}

.lyric-copy-button {
  min-width: 7rem;
}

.lyric-copy-button[data-copy-state="copied"] {
  border-color: var(--success);
  background: var(--mint-soft);
  color: var(--success);
}

.line-editor {
  margin-block-start: 1rem;
  border-block-start: 1px solid var(--line);
}

.line-editor > .section-heading {
  padding-block: 1rem;
}

.lyric-section-heading {
  margin-block: 1.1rem 0.35rem;
  font-size: 1rem;
}

.lyric-line-spacer {
  height: 0.7rem;
}

.lyric-line-row {
  border-block-start: 1px solid var(--line);
}

.lyric-line-row[data-state="selected"] {
  background: var(--blue-soft);
}

.lyric-line-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.5rem 0.75rem;
  align-items: center;
  min-height: var(--target);
  padding-block: 0.65rem;
}

.lyric-line-select {
  display: grid;
  width: 2rem;
  height: 2rem;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
}

.lyric-line-select[aria-pressed="true"] {
  border-color: var(--focus);
  background: var(--blue-soft);
  color: var(--info);
}

.lyric-line-number {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
}

.lyric-line-text {
  grid-column: 2 / -1;
  min-width: 0;
}

.lyric-line-main > .button {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
}

.line-length-guide {
  display: block;
  margin-block-start: 0.25rem;
  color: var(--success);
  font-size: 0.8rem;
  font-weight: 700;
}

.line-length-guide[data-state="short"],
.line-length-guide[data-state="long"] {
  color: var(--warning);
}

.selected-lines-copy {
  width: 100%;
  resize: vertical;
  background: var(--surface);
}

.lyric-line-edit,
.ai-line-instruction {
  padding: 0.9rem;
  border-block-start: 1px solid var(--line);
  background: var(--surface-subtle);
}

.ai-line-instruction {
  margin-block-start: 1rem;
  scroll-margin-top: calc(var(--topbar-height) + 1rem);
}

.ai-line-instruction > .field + .field {
  margin-block-start: 1.25rem;
}

.ai-line-instruction > .button-row {
  margin-block-start: 0.85rem;
}

.lyric-rewrite-assurances {
  display: grid;
  gap: 0.35rem;
  margin: 1rem 0;
  padding: 0;
  list-style: none;
}

.lyric-rewrite-assurances li {
  position: relative;
  padding-inline-start: 1.5rem;
}

.lyric-rewrite-assurances li::before {
  content: "✓";
  position: absolute;
  inset-inline-start: 0;
  color: var(--success);
  font-weight: 800;
}

.player-row audio {
  width: 100%;
  min-height: var(--target);
}

.player-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.history-item {
  border-color: var(--line-strong);
}

.allowance-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.empty-state {
  padding: 2rem 1rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}

.empty-state p {
  margin-inline: auto;
}

/* Dialogs, sheets and transient feedback */
dialog,
.dialog {
  width: min(100% - 2rem, 36rem);
  max-height: min(85vh, 48rem);
  max-height: min(85dvh, 48rem);
  overflow: auto;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 16px 48px rgb(36 32 51 / 24%);
}

dialog::backdrop,
.dialog-backdrop {
  background: rgb(36 32 51 / 58%);
}

.dialog-card,
.dialog__body {
  padding: 1.25rem;
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-block-end: 1rem;
}

.dialog-header > * {
  margin-block-end: 0;
}

.dialog-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1rem 1.25rem;
  border-block-start: 1px solid var(--line);
  background: var(--canvas);
}

.sheet {
  position: fixed;
  z-index: var(--z-dialog);
  inset-inline: 0;
  inset-block-end: 0;
  max-height: 85dvh;
  overflow: auto;
  padding: 1.25rem 1rem calc(1.25rem + env(safe-area-inset-bottom));
  border-block-start: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: 0 -10px 32px rgb(36 32 51 / 18%);
}

.toast-region {
  position: fixed;
  z-index: var(--z-toast);
  inset-inline: 1rem;
  inset-block-end: calc(5.75rem + env(safe-area-inset-bottom));
  display: grid;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  width: min(100%, 30rem);
  margin-inline: auto;
  padding: 0.8rem 1rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--ink);
  color: #ffffff;
  box-shadow: 0 8px 24px rgb(36 32 51 / 22%);
  pointer-events: auto;
}

.toast[data-state="error"] {
  background: #7c1529;
}

.toast[data-state="success"] {
  background: #104f3e;
}

/* Mobile app-specific controls */
.mobile-only {
  display: block;
}

.desktop-only {
  display: none !important;
}

.mobile-back {
  display: inline-flex;
  min-width: var(--target);
  min-height: var(--target);
  align-items: center;
  justify-content: center;
}

.stage-next-action {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-block-start: 2rem;
  padding-block-start: 1.5rem;
  border-block-start: 1px solid var(--line);
}

.stage-next-action__copy strong {
  display: block;
}

.stage-next-action__copy p {
  max-width: 55ch;
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.stage-next-action .button {
  width: 100%;
}

.details-moments {
  margin-block-end: 0.75rem;
}

.details-moments ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  border-block: 1px solid var(--line);
  list-style: none;
}

.details-moment {
  width: 100%;
  min-height: var(--target);
  padding: 0.65rem 0.75rem;
  border: 0;
  border-inline-end: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-align: start;
}

.details-moments li:last-child .details-moment {
  border-inline-end: 0;
}

.details-moment:hover {
  background: var(--surface-subtle);
}

.details-moment[aria-current="step"] {
  background: var(--blue-soft);
  box-shadow: inset 0 -3px 0 var(--focus);
}

.details-moment span,
.details-moment small {
  display: block;
}

.details-moment span {
  font-weight: 750;
}

.details-moment small {
  margin-block-start: 0.15rem;
  color: var(--muted);
}

.details-moment-progress {
  margin-block: 0 1rem;
  color: var(--ink-soft);
}

.details-moment-panel > h2:not(:first-child) {
  margin-block-start: 1.75rem;
  padding-block-start: 1.5rem;
  border-block-start: 1px solid var(--line);
}

.details-moment-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin-block-start: 1.5rem;
  padding-block-start: 1rem;
  border-block-start: 1px solid var(--line);
}

.details-moment-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-inline-start: auto;
}

.character-progress {
  margin-block: -0.75rem 1rem;
  color: var(--warning);
  font-size: 0.875rem;
  font-weight: 700;
}

.character-progress[data-state="complete"] {
  color: var(--success);
}

.missing-detail-list {
  margin-block-end: 0;
  padding-inline-start: 1.25rem;
}

.missing-detail-list .button-link {
  min-height: var(--target);
  padding: 0.3rem 0.4rem;
  border: 0;
  background: transparent;
  color: var(--rose-strong);
  font-weight: 700;
  text-align: start;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

@media (max-width: 720px) {
  .details-moments ol {
    grid-template-columns: 1fr 1fr;
  }

  .details-moment {
    border-block-end: 1px solid var(--line);
  }

  .details-moments li:nth-child(2n) .details-moment {
    border-inline-end: 0;
  }

  .details-moment-actions {
    flex-direction: column-reverse;
  }

  .details-moment-actions .button {
    width: 100%;
  }

  .details-moment-actions--choice,
  .details-moment-choice {
    flex-direction: column;
  }

  .details-moment-choice {
    width: 100%;
    margin-inline-start: 0;
  }
}

/* Throwaway prototype control: deliberately unlike the product surface. */
.prototype-switcher {
  position: fixed;
  z-index: var(--z-prototype);
  inset-inline: 0.5rem;
  inset-block-end: calc(0.5rem + env(safe-area-inset-bottom));
  display: flex;
  width: fit-content;
  max-width: calc(100% - 1rem);
  min-height: var(--target);
  margin-inline: auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem;
  border: 2px solid #ffffff;
  border-radius: var(--radius);
  background: #14121a;
  color: #ffffff;
  box-shadow: 0 4px 8px rgb(20 18 26 / 35%);
}

.prototype-switcher__label {
  display: none;
  padding-inline-start: 0.45rem;
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

.prototype-switcher__choices {
  display: flex;
  min-width: 0;
  gap: 0.2rem;
}

.prototype-switcher__button {
  min-height: var(--target);
  padding: 0.45rem 0.65rem;
  border: 1px solid #77727f;
  border-radius: var(--radius-small);
  background: #2a2731;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
}

.prototype-switcher__button:hover {
  border-color: #ffffff;
  background: #3b3743;
}

.prototype-switcher__button[aria-pressed="true"],
.prototype-switcher__button[data-current="true"] {
  border-color: #ffffff;
  background: #ffffff;
  color: #14121a;
}

.prototype-switcher__button:focus-visible {
  outline-color: #ffc857;
  outline-offset: 2px;
}

/* The variants intentionally disagree about information hierarchy. */
:is(body, #app)[data-variant="guided"] .app-frame,
.variant-guided .app-frame {
  display: block;
}

:is(body, #app)[data-variant="guided"] .workspace,
.variant-guided .workspace {
  width: min(100%, 52rem);
  margin-inline: auto;
}

:is(body, #app)[data-variant="guided"] .workspace-aside,
.variant-guided .workspace-aside {
  border-block-start: 1px solid var(--line);
  padding-block-start: 1.25rem;
}

:is(body, #app)[data-variant="workspace"] .workspace,
.variant-workspace .workspace {
  width: 100%;
}

:is(body, #app)[data-variant="overview"] .app-frame,
.variant-overview .app-frame {
  display: block;
}

:is(body, #app)[data-variant="overview"] .workspace,
.variant-overview .workspace {
  width: min(100%, 90rem);
  margin-inline: auto;
}

.overview-grid {
  display: grid;
  gap: 1rem;
}

.overview-grid > .dashboard-section {
  min-width: 0;
  margin-block-start: 0;
}

.overview-grid .order-card,
.overview-grid .order-row {
  align-items: stretch;
}

.overview-grid .order-card__body,
.overview-grid .order-row__body,
.overview-grid .order-card h3,
.overview-grid .order-row h3 {
  overflow-wrap: anywhere;
}

.overview-grid .order-card__actions,
.overview-grid .order-row__actions {
  width: 100%;
  min-width: 0;
}

.overview-grid .order-card__actions > .button,
.overview-grid .order-row__actions > .button {
  min-width: 0;
  flex: 1 1 11rem;
}

.overview-grid .dashboard-section[data-empty="true"] .empty-state {
  padding: 1rem;
  text-align: left;
}

.overview-grid .dashboard-section[data-empty="true"] .empty-state p {
  margin-inline: 0;
}

:is(body, #app)[data-variant="overview"] .order-card,
.variant-overview .order-card {
  border-block-start: 4px solid var(--line-strong);
}

@media (min-width: 480px) {
  .prototype-switcher__label {
    display: block;
  }

  .prototype-switcher__button {
    padding-inline: 0.8rem;
  }
}

/* Tablet: responsive desktop model, with contextual content below the task. */
@media (min-width: 768px) {
  .composed-card-preview {
    grid-template-columns: minmax(14rem, 0.8fr) minmax(0, 1.2fr);
  }

  .app-shell {
    padding-block-end: 5.25rem;
  }

  .choice-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .choice-row > div {
    flex: 1 1 auto;
  }

  .choice-row .button {
    min-width: 12rem;
    flex: 0 0 auto;
  }

  .stage-next-action {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .stage-next-action .button {
    width: auto;
    min-width: 12rem;
  }

  .app-topbar {
    padding-inline: 1.5rem;
  }

  .app-frame {
    display: grid;
    grid-template-columns: 13rem minmax(0, 1fr);
    align-items: start;
  }

  .stage-nav {
    position: sticky;
    inset-block-start: var(--topbar-height);
    height: calc(100vh - var(--topbar-height));
    height: calc(100dvh - var(--topbar-height));
    overflow-x: visible;
    overflow-y: auto;
    padding: 1.25rem 0.75rem;
    border-inline-end: 1px solid var(--line);
    border-block-end: 0;
  }

  .stage-nav__heading {
    display: block;
    margin: 0 0 0.75rem 0.75rem;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 800;
  }

  .stage-list {
    display: grid;
    min-width: 0;
    gap: 0.2rem;
    padding: 0;
  }

  .mobile-stage-summary {
    display: none;
  }

  .stage-link {
    width: 100%;
    justify-content: flex-start;
    border: 1px solid transparent;
    border-block-end: 0;
    border-radius: var(--radius-small);
  }

  .stage-link[aria-current="step"],
  .stage-link[data-state="current"] {
    border-color: var(--rose-strong);
    background: var(--rose-soft);
  }

  .workspace {
    padding: 2rem 1.5rem 3rem;
  }

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

  .checkout-grid {
    grid-template-columns: minmax(0, 1fr) minmax(17rem, 22rem);
  }

  .workspace-aside[data-mobile-state="closed"] {
    display: block;
  }

  .screen-header {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
  }

  .screen-actions,
  .screen-actions > *,
  .button-row > * {
    flex: 0 0 auto;
  }

  .field-row[data-columns="2"],
  .form-grid[data-columns="2"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-row[data-columns="3"],
  .form-grid[data-columns="3"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .order-card,
  .order-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .version-item,
  .player-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .dialog-actions {
    flex-direction: row;
    justify-content: flex-end;
  }

  .toast-region {
    inset-inline: auto 1.5rem;
    width: min(30rem, calc(100% - 3rem));
  }

  .mobile-only {
    display: none !important;
  }

  .desktop-only {
    display: block !important;
  }

  :is(body, #app)[data-variant="guided"] .app-frame,
  .variant-guided .app-frame,
  :is(body, #app)[data-variant="overview"] .app-frame,
  .variant-overview .app-frame {
    display: block;
  }

  :is(body, #app)[data-variant="guided"] .stage-nav,
  .variant-guided .stage-nav,
  :is(body, #app)[data-variant="overview"] .stage-nav,
  .variant-overview .stage-nav {
    position: sticky;
    inset-block-start: var(--topbar-height);
    height: auto;
    overflow-x: auto;
    overflow-y: visible;
    padding: 0 1.5rem;
    border-inline-end: 0;
    border-block-end: 1px solid var(--line);
  }

  :is(body, #app)[data-variant="guided"] .stage-nav__heading,
  .variant-guided .stage-nav__heading,
  :is(body, #app)[data-variant="overview"] .stage-nav__heading,
  .variant-overview .stage-nav__heading {
    display: none;
  }

  :is(body, #app)[data-variant="guided"] .stage-list,
  .variant-guided .stage-list,
  :is(body, #app)[data-variant="overview"] .stage-list,
  .variant-overview .stage-list {
    display: flex;
    width: fit-content;
    min-width: max-content;
    margin-inline: auto;
  }

  :is(body, #app)[data-variant="guided"] .stage-link,
  .variant-guided .stage-link,
  :is(body, #app)[data-variant="overview"] .stage-link,
  .variant-overview .stage-link {
    width: auto;
    border: 0;
    border-block-end: 3px solid transparent;
    border-radius: 0;
  }

  :is(body, #app)[data-variant="guided"] .stage-link[aria-current="step"],
  :is(body, #app)[data-variant="guided"] .stage-link[data-state="current"],
  .variant-guided .stage-link[aria-current="step"],
  .variant-guided .stage-link[data-state="current"],
  :is(body, #app)[data-variant="overview"] .stage-link[aria-current="step"],
  :is(body, #app)[data-variant="overview"] .stage-link[data-state="current"],
  .variant-overview .stage-link[aria-current="step"],
  .variant-overview .stage-link[data-state="current"] {
    border-block-end-color: var(--rose-strong);
    background: transparent;
  }

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

  .overview-grid .order-card,
  .overview-grid .order-row {
    flex-direction: column;
    align-items: stretch;
  }

  :is(body, #app)[data-variant="overview"] .dashboard-section:first-child,
  .variant-overview .dashboard-section:first-child {
    grid-column: 1 / -1;
  }
}

/* Desktop workspace: persistent stages, task and contextual history together. */
@media (min-width: 1024px) {
  .app-frame {
    grid-template-columns: 15rem minmax(0, 1fr);
  }

  .field-row[data-columns="3"],
  .form-grid[data-columns="3"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .workspace {
    padding: 2.25rem 2rem 3.5rem;
  }

  :is(body, #app)[data-variant="workspace"] .workspace,
  .variant-workspace .workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(17rem, 20rem);
    gap: 2rem;
    align-items: start;
  }

  :is(body, #app)[data-variant="workspace"] .workspace-aside,
  .variant-workspace .workspace-aside {
    position: sticky;
    inset-block-start: calc(var(--topbar-height) + 2rem);
    max-height: calc(100vh - var(--topbar-height) - 4rem);
    max-height: calc(100dvh - var(--topbar-height) - 4rem);
    margin-block-start: 0;
    overflow: auto;
  }

  :is(body, #app)[data-variant="guided"] .workspace,
  .variant-guided .workspace {
    padding-block-start: 2.75rem;
  }

  :is(body, #app)[data-variant="guided"] .workspace-aside,
  .variant-guided .workspace-aside {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
  }

  :is(body, #app)[data-variant="overview"] .order-list,
  .variant-overview .order-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  :is(body, #app)[data-variant="overview"] .order-card,
  .variant-overview .order-card {
    align-items: flex-start;
  }

  .overview-grid .order-card,
  .overview-grid .order-row {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (min-width: 1280px) {
  :is(body, #app)[data-variant="workspace"] .workspace,
  .variant-workspace .workspace {
    grid-template-columns: minmax(0, 1fr) 21rem;
    gap: 2.5rem;
  }
}

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

@media (prefers-contrast: more) {
  :root {
    --line: #817b8e;
    --line-strong: #5f596d;
  }

  .button,
  input,
  select,
  textarea,
  .panel,
  .order-card,
  .order-row,
  .version-item,
  .player-row {
    border-width: 2px;
  }
}

@media (forced-colors: active) {
  :where(.panel, .version-item, .player-row)[data-state="chosen"],
  :where(.panel, .version-item, .player-row)[data-selected="true"],
  .stage-link[aria-current="step"] {
    border: 2px solid Highlight;
  }

  :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline-color: Highlight;
  }
}

@media print {
  .app-topbar,
  .stage-nav,
  .prototype-switcher,
  .stage-next-action,
  .toast-region,
  .screen-actions,
  .button-row {
    display: none !important;
  }

  .app-shell,
  .workspace {
    padding: 0;
  }

  body {
    background: #ffffff;
  }
}

/* Functional-test wireframe. These rules deliberately remove brand and
   presentation decisions while preserving hierarchy, focus, and touch size. */
:root {
  --ink: #161616;
  --ink-soft: #303030;
  --muted: #555555;
  --line: #d0d0d0;
  --line-strong: #777777;
  --canvas: #ffffff;
  --surface: #ffffff;
  --surface-subtle: #f5f5f5;
  --rose: #222222;
  --rose-strong: #222222;
  --rose-soft: #f2f2f2;
  --focus: #005fcc;
  --radius: 0;
  --radius-small: 0;
}

html,
body {
  background: #ffffff;
}

html {
  scroll-behavior: auto;
}

h1,
h2,
h3,
h4 {
  letter-spacing: 0;
}

.button:active {
  transform: none;
}

.app-topbar__brand-mark,
.brand-mark,
.prototype-switcher {
  display: none !important;
}

.app-shell {
  padding-block-end: 2rem;
}

.toast-region {
  inset-block-end: calc(1rem + env(safe-area-inset-bottom));
}

.public-shell .overview-grid,
.choice-grid {
  display: block;
}

.public-shell .overview-grid > * + *,
.choice-grid > * + * {
  margin-block-start: 1rem;
}

.public-shell :where(section, article, blockquote).panel {
  margin: 0;
  padding: 1rem 0;
  border: 0;
  border-block-start: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.public-shell :where(.history-item, .player-row) {
  padding: 0.75rem 0;
  border: 0;
  border-block-start: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.public-shell .screen-kicker {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 400;
}

.panel,
.order-card,
.order-row,
.version-item,
.player-row,
.history-item,
.allowance-item,
.empty-state,
.button,
input,
select,
textarea,
.badge,
.status,
.save-status,
.progress {
  border-radius: 0;
  box-shadow: none;
}

.panel-subtle {
  background: var(--surface-subtle);
}

:where(.panel, .version-item, .player-row)[data-state="chosen"],
:where(.panel, .version-item, .player-row)[data-selected="true"] {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}

/* Mobile tester build: keep the current task and chosen recipient content in reach. */
.mobile-task-dock {
  display: none;
}

@media (max-width: 767.98px) {
  html:has(.mobile-task-dock) {
    --mobile-task-dock-space: 11.5rem;
    scroll-padding-block-end: calc(var(--mobile-task-dock-space) + env(safe-area-inset-bottom));
  }

  .product-shell:has(.mobile-task-dock) {
    padding-block-end: calc(var(--mobile-task-dock-space) + env(safe-area-inset-bottom));
  }

  .product-shell:has(.mobile-task-dock) main :where(
    [id],
    input,
    select,
    textarea,
    button,
    .alert
  ) {
    scroll-margin-block-end: calc(var(--mobile-task-dock-space) + env(safe-area-inset-bottom));
  }

  .product-shell:has(.mobile-task-dock) .stage-nav {
    position: sticky;
    inset-block-start: var(--topbar-height);
  }

  .product-shell .app-topbar__brand,
  .product-shell .app-topbar__actions .button {
    min-height: 44px;
  }

  .product-shell:has(.mobile-task-dock) .stage-list {
    display: flex;
    overflow-x: auto;
    padding-inline: 0.5rem;
    scrollbar-width: thin;
  }

  .product-shell:has(.mobile-task-dock) .mobile-stage-summary {
    border-block-end: 1px solid var(--line);
  }

  .product-shell:has(.mobile-task-dock) .stage-link[data-state="locked"] {
    cursor: pointer;
    opacity: 1;
  }

  .mobile-task-dock.mobile-only {
    position: fixed;
    z-index: var(--z-sticky);
    inset-inline: 0;
    inset-block-end: 0;
    display: grid;
    gap: 0.5rem;
    padding: 0.65rem 1rem calc(0.65rem + env(safe-area-inset-bottom));
    border-block-start: 2px solid var(--ink);
    background: var(--surface);
  }

  .mobile-task-dock p {
    display: grid;
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.35;
  }

  .mobile-task-dock__summary {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
  }

  .mobile-task-dock__summary p {
    min-width: 0;
    flex: 1 1 auto;
  }

  .mobile-task-dock__summary .button {
    width: auto;
    flex: 0 0 auto;
  }

  .mobile-task-dock__links {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.45rem;
  }

  .mobile-task-dock__links .button {
    min-height: var(--target);
    padding-inline: 0.35rem;
    font-size: 0.78rem;
  }

  .mobile-task-dock p span {
    color: var(--muted);
    font-size: 0.9rem;
    white-space: normal;
  }

  .mobile-task-dock .button {
    width: 100%;
  }

  .mobile-task-dock__blocked {
    display: grid;
    gap: 0.35rem;
  }

  .mobile-task-dock__blocked p {
    margin: 0;
    font-size: 0.9rem;
  }

  .product-shell:has(.mobile-task-dock) .toast-region {
    inset-block-end: calc(8.75rem + env(safe-area-inset-bottom));
  }

  .product-shell .app-frame:has(> .stage-nav) .workspace-aside.sheet {
    position: fixed;
    z-index: var(--z-dialog);
    inset: auto 0 0;
    display: block;
    width: 100%;
    max-height: 85dvh;
    margin: 0;
    padding: 1.25rem 1rem calc(1.25rem + env(safe-area-inset-bottom));
    overflow: auto;
    border-block-start: 1px solid var(--line-strong);
    border-inline-start: 0;
    background: var(--surface);
    box-shadow: 0 -10px 32px rgb(36 32 51 / 18%);
  }
}

@media print {
  .mobile-task-dock {
    display: none !important;
  }
}

/* Branded public homepage: v2 Melogram personality on the functional test journey. */
.public-shell {
  --melogram-navy: #252947;
  --melogram-pink: #ef0b68;
  --melogram-pink-dark: #d9085c;
  --melogram-blush: #fff2f7;
  --melogram-shadow: 0 12px 35px rgba(52, 31, 67, 0.1);
  padding-block-end: 0;
  overflow: hidden;
  background: #fef8fa;
  color: var(--melogram-navy);
  font-family: "Poppins", ui-sans-serif, system-ui, sans-serif;
}

.public-shell :where(h1, h2, h3, h4) {
  color: var(--melogram-navy);
  font-family: inherit;
  font-weight: 700;
}

.melogram-public-header {
  position: sticky;
  inset-block-start: 0;
  min-height: 92px;
  padding: 1rem max(1.25rem, calc((100vw - 1180px) / 2));
  border-block-end: 1px solid rgba(212, 20, 90, 0.09);
  background: rgba(255, 249, 252, 0.92);
  box-shadow: 0 2px 20px rgba(212, 20, 90, 0.06);
  backdrop-filter: blur(20px);
}

.melogram-public-header__logo {
  width: 152px;
  height: auto;
}

@media (min-width: 900px) {
  .melogram-public-header {
    min-height: 122px;
    padding: 0.75rem max(2.6rem, calc((100vw - 1760px) / 2));
    background: rgba(255, 249, 252, 0.97);
  }

  .melogram-public-header__logo { width: 156px; }
  .melogram-public-nav { gap: 1.8rem; margin-inline-start: auto; }
  .melogram-public-nav .button { padding-inline: 0; font-size: 1rem; }
  .melogram-public-header .app-topbar__actions { margin-inline-start: 2.5rem; }

  .public-shell .melogram-account-button {
    min-width: 200px;
    min-height: 48px;
    justify-content: center;
    font-size: 1rem;
  }

  .public-shell .melogram-account-button::after {
    margin-inline-start: 0.45rem;
    content: "\203A";
    font-size: 1.45rem;
    font-weight: 400;
    line-height: 1;
  }
}

.melogram-public-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.melogram-public-nav .button,
.melogram-public-footer .button {
  min-height: 42px;
  padding: 0.55rem 0.8rem;
  border: 0;
  background: transparent;
  color: var(--melogram-navy);
  font-weight: 600;
  text-decoration: none;
}

.melogram-public-nav .button:hover,
.melogram-public-nav .button[aria-current="page"] {
  color: var(--melogram-pink);
}

.public-shell .melogram-account-button,
.public-shell .melogram-main-cta {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(100deg, var(--melogram-pink-dark), #f21a72);
  box-shadow: 0 8px 20px rgba(239, 11, 104, 0.22);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.public-shell .melogram-account-button:hover,
.public-shell .melogram-main-cta:hover {
  background: linear-gradient(100deg, #c80751, var(--melogram-pink));
  color: #fff;
  transform: translateY(-1px);
}

.melogram-mobile-menu {
  position: relative;
}

.melogram-mobile-menu summary {
  display: grid;
  width: 48px;
  height: 48px;
  place-content: center;
  gap: 5px;
  list-style: none;
  cursor: pointer;
}

.melogram-mobile-menu summary::-webkit-details-marker { display: none; }
.melogram-mobile-menu summary span { width: 25px; height: 2px; background: var(--melogram-navy); }
.melogram-mobile-menu nav {
  position: absolute;
  z-index: 30;
  inset-block-start: 56px;
  inset-inline-end: 0;
  display: grid;
  width: min(82vw, 320px);
  gap: 0.35rem;
  padding: 1rem;
  border: 1px solid #f2dce6;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--melogram-shadow);
}

.melogram-mobile-menu nav .button { justify-content: flex-start; border-radius: 12px; }
.melogram-mobile-menu nav .button-primary { justify-content: center; border-radius: 999px; }

.melogram-home {
  width: min(100% - 2.5rem, 1180px);
  margin-inline: auto;
  outline: none;
}

.melogram-hero {
  display: grid;
  min-height: 560px;
  grid-template-columns: 0.92fr 1.08fr;
  align-items: center;
  gap: 2rem;
  padding: 2rem 0 2.75rem;
}

.melogram-hero h1 {
  max-width: 13ch;
  margin-block-end: 1rem;
  font-family: "brushberry-script", "Dancing Script", cursive;
  font-size: clamp(3.2rem, 4.7vw, 4.6rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: 0;
}

.melogram-hero h1 em,
.melogram-final-cta h2 em {
  color: var(--melogram-pink);
  font-style: normal;
}

.melogram-hero__intro { margin-block-end: 1rem; color: #4d5068; font-size: clamp(1.05rem, 2vw, 1.28rem); }
.melogram-rating { display: flex; align-items: center; gap: 0.8rem; margin-block-end: 1.25rem; }
.melogram-rating span { color: var(--melogram-pink); font-size: 1.25rem; letter-spacing: 0.08em; }
.melogram-rating strong { font-size: 0.9rem; }
.public-shell .melogram-main-cta { display: inline-flex; min-width: 285px; min-height: 56px; justify-content: center; padding-inline: 1.5rem; font-size: 1rem; }
.public-shell .melogram-main-cta::before { margin-inline-end: 0.65rem; content: "\2665"; font-size: 1.12rem; }
.public-shell .melogram-main-cta::after { margin-inline-start: auto; content: "\203A"; font-size: 1.6rem; font-weight: 400; line-height: 0; }
.melogram-listen-link { display: flex; width: fit-content; align-items: center; gap: 0.55rem; margin: 0.9rem 0 0.25rem 1.15rem; color: var(--melogram-pink); font-size: 0.88rem; font-weight: 600; }
.melogram-listen-link span { display: grid; width: 27px; height: 27px; place-items: center; border: 2px solid currentColor; border-radius: 50%; }
.melogram-hero__art { display: grid; place-items: center; }
.melogram-hero__art img { width: min(100%, 600px); filter: drop-shadow(0 20px 24px rgba(83, 41, 91, 0.11)); }

.melogram-trust {
  margin-block-end: 2.4rem;
  padding: 1rem 1.5rem;
  border-radius: 16px;
  background: linear-gradient(90deg, #fff3f8, #fff8fb);
  text-align: center;
}

.melogram-trust p { max-width: none; margin: 0; color: #55516b; font-size: 0.84rem; font-weight: 600; }
.melogram-trust p span { color: var(--melogram-pink); letter-spacing: 0.08em; }
.melogram-trust p b { margin-inline: 0.7rem; color: #eda5c1; }

.melogram-section { padding: 1rem 0 2.5rem; }
.melogram-section > h2 { margin-block-end: 1.3rem; text-align: center; font-size: clamp(1.45rem, 2.5vw, 1.9rem); }
.melogram-section__intro { margin: -0.8rem auto 1.5rem; color: #6e6d7e; text-align: center; }
.melogram-example-grid,
.melogram-step-grid,
.melogram-price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.35rem; }

.melogram-example-card,
.melogram-step-card,
.melogram-price-card,
.melogram-reaction-grid blockquote {
  overflow: hidden;
  border: 1px solid #f1e8ee;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--melogram-shadow);
}

.melogram-example-card__image { position: relative; aspect-ratio: 16 / 8.5; overflow: hidden; }
.melogram-example-card__image img { width: 100%; height: 100%; object-fit: cover; }
.melogram-example-card__body { display: grid; justify-items: start; padding: 0.9rem 1rem 1rem; }
.melogram-example-card h3 { margin: 0; font-size: 1rem; }
.melogram-example-card p { margin: 0.15rem 0 0.7rem; color: var(--melogram-pink); font-size: 0.76rem; font-weight: 600; }
.melogram-example-card audio { display: none; }
.melogram-example-play { display: inline-flex; min-height: 44px; align-items: center; gap: 0.55rem; margin-block-end: 0.65rem; padding: 0; border: 0; background: transparent; color: var(--melogram-navy); font: inherit; font-size: 0.8rem; cursor: pointer; }
.melogram-example-play > span { display: grid; width: 34px; height: 34px; place-items: center; padding-inline-start: 2px; border-radius: 50%; background: var(--melogram-pink); color: #fff; font-size: 0.72rem; box-shadow: 0 5px 14px rgba(212, 20, 90, 0.24); }
.melogram-example-play[aria-pressed="true"] > span { padding: 0; }
.melogram-example-play:hover { color: var(--melogram-pink); }
.melogram-example-card a { display: inline-block; margin-block-start: 0.15rem; color: var(--melogram-pink); font-size: 0.78rem; font-weight: 600; }

.melogram-step-card { position: relative; display: grid; grid-template-columns: 82px 1fr; align-items: center; gap: 0.8rem; min-height: 156px; padding: 1.2rem 1.25rem; }
.melogram-step-card__number { position: absolute; inset: 0.8rem auto auto 0.8rem; display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: #f45591; color: #fff; font-size: 0.78rem; font-weight: 700; }
.melogram-step-card img { width: 82px; }
.melogram-step-card h3 { margin: 0 0 0.35rem; font-size: 0.95rem; }
.melogram-step-card p { margin: 0; color: #666879; font-size: 0.78rem; line-height: 1.45; }

.melogram-price-grid { align-items: stretch; }
.public-shell .melogram-price-card { position: relative; display: flex; min-width: 0; flex-direction: column; align-items: center; padding: 1.5rem 1.35rem 1.25rem; overflow: visible; }
.public-shell .melogram-price-card--featured { border: 2px solid #f5367f; }
.melogram-price-card__badge { position: absolute; inset-block-start: 0; transform: translateY(-50%); border-radius: 999px; padding: 0.25rem 0.8rem; background: #ed1769; color: #fff; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; }
.melogram-price-card__icon { display: grid; width: 58px; height: 58px; place-items: center; margin-block-end: 0.8rem; border-radius: 50%; background: #ffeaf2; color: var(--melogram-pink); font-size: 1.75rem; }
.melogram-price-card h3 { margin: 0; text-align: center; font-size: 1rem; }
.melogram-price-card__price { margin: 0.4rem 0 0.7rem; color: var(--melogram-pink); font-size: 1.7rem; font-weight: 700; }
.public-shell .melogram-price-card .history-list { width: 100%; margin: 0 0 1rem; padding: 0; list-style: none; }
.public-shell .melogram-price-card .history-item { position: relative; padding: 0.24rem 0 0.24rem 1.5rem; border: 0; color: #5e6073; font-size: 0.76rem; }
.public-shell .melogram-price-card .history-item::before { position: absolute; inset: 0.35rem auto auto 0; display: grid; width: 16px; height: 16px; place-items: center; border-radius: 50%; background: #ffe2ed; color: var(--melogram-pink); content: "\2713"; font-size: 0.65rem; font-weight: 800; }
.public-shell .melogram-price-card .button { width: 100%; margin-block-start: auto; border: 1.5px solid #f65c96; border-radius: 999px; background: transparent; box-shadow: none; color: var(--melogram-pink); }
.public-shell .melogram-price-card--featured .button { border: 0; background: linear-gradient(100deg, var(--melogram-pink-dark), #f21a72); color: #fff; }
.melogram-coming-soon { margin-block-start: auto; color: #7d7d89; font-weight: 700; }

.melogram-reaction-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.35rem; }
.melogram-reaction-grid blockquote { position: relative; margin: 0; padding: 1.7rem 1.8rem 1.4rem 4.4rem; }
.melogram-quote-mark { position: absolute; inset: 0.4rem auto auto 1.35rem; color: #f47fab; font-family: Georgia, serif; font-size: 4.4rem; line-height: 1; }
.melogram-reaction-grid blockquote > p { min-height: 4.5em; margin-block-end: 1.2rem; font-size: 0.9rem; font-weight: 600; }
.melogram-reaction-grid footer { display: flex; align-items: center; gap: 0.7rem; }
.melogram-avatar { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: linear-gradient(145deg, #ffd8e6, #caabd5); color: var(--melogram-navy); font-weight: 800; }
.melogram-reaction-grid footer span:last-child { display: grid; }
.melogram-reaction-grid footer small { color: var(--melogram-pink); font-size: 0.7rem; }

.melogram-final-cta { display: grid; min-height: 310px; grid-template-columns: minmax(180px, 0.7fr) 1.3fr; align-items: center; gap: 1.8rem; margin: 0 0 3.5rem; padding: 2.6rem 4rem; border-radius: 22px; background: linear-gradient(100deg, #fff1f6, #fff8fb); }
.melogram-final-cta > img { width: min(100%, 290px); justify-self: center; }
.melogram-final-cta h2 { margin: 0 0 0.3rem; font-size: clamp(1.7rem, 3vw, 2.5rem); }
.melogram-final-cta > div > p { margin: 0 0 0.9rem; }
.melogram-final-cta__trust { margin: 0.8rem 0 0 !important; color: #65677b; font-size: 0.72rem; }

.melogram-public-footer { display: grid; justify-items: center; gap: 0.75rem; padding: 2.1rem max(1.25rem, calc((100vw - 1180px) / 2)); background: linear-gradient(120deg, #222743, #2f345c); color: #fff; text-align: center; }
.melogram-public-footer__home { display: inline-flex; border-radius: 10px; line-height: 0; }
.melogram-public-footer__home:focus-visible { outline: 3px solid #ff91bb; outline-offset: 5px; }
.melogram-public-footer__logo { width: 128px; max-height: 60px; object-fit: contain; }
.melogram-public-footer > p { margin: 0; color: #e9e8f3; font-size: 0.78rem; }
.melogram-public-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.1rem; }
.melogram-public-footer .button { min-height: 36px; color: #fff; font-size: 0.68rem; }
.melogram-public-footer .button:hover { color: #ff91bb; }

@media (max-width: 899px) {
  .melogram-public-header { min-height: 78px; }
  .melogram-public-header__logo { width: 125px; }
  .melogram-home { width: min(100% - 2rem, 760px); }
  .melogram-hero { min-height: auto; grid-template-columns: 1fr 1.1fr; padding-block: 1.5rem 2rem; }
  .melogram-example-grid,
  .melogram-step-grid,
  .melogram-price-grid { gap: 0.85rem; }
  .melogram-step-card { grid-template-columns: 65px 1fr; padding-inline: 1rem; }
  .melogram-step-card img { width: 65px; }
}

@media (max-width: 767.98px) {
  .melogram-home { width: min(100% - 1.5rem, 520px); }
  .melogram-hero { display: flex; flex-direction: column-reverse; gap: 0.4rem; padding: 0.8rem 0 1.6rem; text-align: center; }
  .melogram-hero__copy { display: grid; justify-items: center; }
  .melogram-hero__art img { width: min(86vw, 330px); }
  .melogram-hero h1 { max-width: 12ch; font-size: clamp(3.1rem, 14vw, 4.2rem); }
  .melogram-hero__intro { max-width: 20ch; }
  .melogram-rating { margin-block: 0.4rem 1rem; }
  .public-shell .melogram-main-cta { width: min(100%, 340px); min-width: 0; }
  .melogram-listen-link { margin-inline-start: 0; }
  .melogram-trust { padding-inline: 0.8rem; }
  .melogram-trust p { font-size: 0.72rem; line-height: 1.8; }
  .melogram-trust p span { display: block; }
  .melogram-trust p b { margin-inline: 0.3rem; }
  .melogram-section { padding-block-end: 2rem; }
  .melogram-example-grid { grid-template-columns: repeat(3, minmax(230px, 78vw)); overflow-x: auto; padding: 0.25rem 0.1rem 1.25rem; scroll-snap-type: x mandatory; }
  .melogram-example-card { scroll-snap-align: center; }
  .melogram-step-grid { grid-template-columns: 1fr; }
  .melogram-price-grid { grid-template-columns: repeat(3, minmax(270px, 84vw)); overflow-x: auto; padding: 0.8rem 0.1rem 1.25rem; scroll-snap-type: x mandatory; }
  .melogram-price-card { scroll-snap-align: center; }
  .melogram-reaction-grid { grid-template-columns: repeat(2, minmax(280px, 86vw)); overflow-x: auto; padding: 0.2rem 0.1rem 1.25rem; scroll-snap-type: x mandatory; }
  .melogram-reaction-grid blockquote { scroll-snap-align: center; }
  .melogram-step-card { min-height: 124px; grid-template-columns: 74px 1fr; }
  .melogram-step-card img { width: 74px; }
  .public-shell .melogram-price-card { padding: 1.6rem 1.35rem 1.25rem; }
  .melogram-reaction-grid blockquote { padding-inline: 3.8rem 1.2rem; }
  .melogram-final-cta { grid-template-columns: 1fr; gap: 0.2rem; padding: 1.4rem 1rem 1.6rem; text-align: center; }
  .melogram-final-cta > img { width: 180px; }
  .melogram-final-cta > div { display: grid; justify-items: center; }
  .melogram-final-cta__trust { max-width: 25ch; line-height: 1.7; }
  .melogram-public-footer nav { display: grid; }
}

@media (prefers-reduced-motion: reduce) {
  .public-shell .button { transition: none; }
}

/* Local customer journey skin — the familiar v2 Melogram character, rebuilt on
   the more robust product structure. This deliberately does not affect public pages. */
.product-shell {
  --ink: #292b4a;
  --ink-soft: #55536b;
  --muted: #706d80;
  --line: #eedfe7;
  --line-strong: #d9bdca;
  --canvas: #fff8fb;
  --surface: #ffffff;
  --surface-subtle: #fff2f7;
  --rose: #ef0b68;
  --rose-strong: #df0c60;
  --rose-soft: #ffedf4;
  --focus: #6d3288;
  --card-method-custom-surface: #ffedf4;
  --card-method-custom-active: #ffe0ec;
  --card-method-custom-border: #df0c60;
  --card-method-custom-ink: #9b1550;
  --card-method-preset-surface: #f3ecf8;
  --card-method-preset-active: #e9dcf2;
  --card-method-preset-border: #6d3288;
  --card-method-preset-ink: #55246f;
  --radius: 20px;
  --radius-small: 12px;
  --topbar-height: 88px;
  --content-max: 1440px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 7% 8%, rgba(239, 11, 104, 0.06), transparent 22rem),
    linear-gradient(180deg, #fffafd 0%, #fff7fa 100%);
  color: var(--ink);
  font-family: "Poppins", ui-sans-serif, system-ui, sans-serif;
}

body:has(.product-shell) {
  background: #fff8fb;
  color: #292b4a;
}

.product-shell :where(h1, h2, h3, h4) {
  color: var(--ink);
  font-family: inherit;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.product-shell h1 { font-size: clamp(2rem, 4vw, 3rem); }
.product-shell h2 { font-size: clamp(1.35rem, 2.5vw, 1.75rem); }
.product-shell h3 { font-size: 1.15rem; }
.product-shell p { color: var(--ink-soft); }

.product-shell .app-topbar {
  min-height: var(--topbar-height);
  padding: 0.65rem clamp(1rem, 4vw, 3.5rem);
  border-block-end: 1px solid rgba(212, 20, 90, 0.1);
  background: rgba(255, 250, 252, 0.95);
  box-shadow: 0 3px 22px rgba(70, 39, 77, 0.06);
  backdrop-filter: blur(18px);
}

.product-shell .app-topbar__brand {
  gap: 1.25rem;
  color: var(--ink);
}

.product-shell .app-topbar__home,
.product-shell .app-topbar__title {
  color: inherit;
  text-decoration: none;
}

.product-shell .app-topbar__home:hover,
.product-shell .app-topbar__title:hover {
  color: inherit;
}

.product-shell .app-topbar__logo {
  width: 5.5rem;
  height: 3.5rem;
  flex: 0 0 auto;
  object-fit: contain;
}

.product-shell .app-topbar__title {
  max-width: 32ch;
  padding-inline-start: 1.25rem;
  border-inline-start: 1px solid var(--line-strong);
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 600;
}

.product-shell .app-topbar__actions { gap: 0.75rem; }
.product-shell .save-status { border-color: #f2c5d7; background: #fff; color: #5b5268; }

.product-shell .button {
  min-height: 48px;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.product-shell .button:active { transform: translateY(1px); }
.product-shell .button-primary {
  border-color: transparent;
  background: linear-gradient(100deg, #d90b5c, #f31a73);
  box-shadow: 0 9px 22px rgba(223, 12, 96, 0.2);
  color: #fff;
}

.product-shell .button-primary:hover {
  border-color: transparent;
  background: linear-gradient(100deg, #c50850, #e70d65);
  box-shadow: 0 11px 26px rgba(223, 12, 96, 0.26);
  color: #fff;
  transform: translateY(-1px);
}

.product-shell .button-secondary {
  border: 1.5px solid #e9a9c2;
  background: #fff;
  color: #c90b56;
}

.product-shell .button-secondary:hover { border-color: #df0c60; background: #fff5f8; color: #b6094c; }
.product-shell .button-quiet,
.product-shell .button-link { color: #be0a51; }
.product-shell .button-small { min-height: 44px; }

.product-shell .workspace {
  width: min(100%, 1240px);
  margin-inline: auto;
  padding: clamp(1.4rem, 4vw, 3rem) clamp(1rem, 4vw, 2.5rem) 4rem;
}

.product-shell .screen-header {
  gap: 1.25rem;
  margin-block-end: 1.6rem;
  padding-block-end: 1.4rem;
  border-color: var(--line);
}

.product-shell .screen-header > div:first-child { max-width: 54rem; }
.product-shell .screen-header p { font-size: 1rem; line-height: 1.65; }
.product-shell .screen-kicker {
  margin-block-end: 0.45rem;
  color: #c40b54;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.product-shell .panel,
.product-shell .order-card,
.product-shell .order-row,
.product-shell .version-item,
.product-shell .player-row,
.product-shell .history-item,
.product-shell .allowance-item,
.product-shell .empty-state {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 34px rgba(65, 37, 71, 0.075);
}

.product-shell .panel { padding: clamp(1.1rem, 3vw, 1.6rem); }
.product-shell .panel-subtle { background: #fff1f6; }

.product-shell input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
.product-shell select,
.product-shell textarea {
  min-height: 52px;
  padding: 0.8rem 0.9rem;
  border: 1.5px solid #cbb6c1;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 1rem;
}

.product-shell textarea { min-height: 9rem; }
.product-shell :where(input, select, textarea):focus { border-color: var(--rose-strong); }
.product-shell .field > label,
.product-shell .field-label,
.product-shell legend { margin-block-end: 0.5rem; font-size: 1rem; }
.product-shell .field-help,
.product-shell .supporting-text { color: #6b6679; font-size: 0.9rem; }

/* My Melograms */
#app .product-shell .workspace.customer-dashboard {
  width: min(100%, 80rem);
  max-width: 80rem;
}
.product-shell .dashboard-welcome {
  position: relative;
  min-height: 255px;
  align-items: center;
  margin-block-end: 0;
  padding: clamp(1.5rem, 4vw, 3rem) 0 clamp(2rem, 5vw, 4rem);
  overflow: hidden;
  border: 0;
  border-block-end: 1px solid #ead7e0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.product-shell .dashboard-welcome::before {
  position: absolute;
  inset: auto auto -90px -80px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: rgba(239, 11, 104, 0.045);
  content: "";
}

.product-shell .dashboard-welcome > div { position: relative; z-index: 1; }
.product-shell .dashboard-welcome h1 { margin-block-end: 0.6rem; }
.product-shell .dashboard-welcome p:not(.screen-kicker) { max-width: 43rem; font-size: 1.04rem; }
.product-shell .dashboard-welcome .screen-actions { margin-block-start: 1.35rem; }
.product-shell .dashboard-welcome > img {
  width: min(260px, 25vw);
  max-height: 210px;
  object-fit: contain;
  mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(ellipse 72% 78% at center, #000 54%, transparent 100%);
  mask-image: radial-gradient(ellipse 72% 78% at center, #000 54%, transparent 100%);
  filter: drop-shadow(0 14px 18px rgba(89, 48, 92, 0.12));
}

.product-shell .customer-dashboard .overview-grid {
  display: block;
}

.product-shell .dashboard-section {
  min-width: 0;
  margin: 0;
  padding: 2.5rem 0;
  border: 0;
  border-block-start: 1px solid #ead7e0;
  border-radius: 0;
  background: transparent;
}

.product-shell .dashboard-section:first-child { border-block-start: 0; }
.product-shell .dashboard-section + .dashboard-section { margin-block-start: 0; }
.product-shell .dashboard-section .section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  margin-block-end: 1.25rem;
}
.product-shell .dashboard-section .section-heading h2 { margin-block-end: 0.25rem; }
.product-shell .dashboard-section .section-heading p { margin: 0; font-size: 0.92rem; }
.product-shell .dashboard-section .badge {
  min-width: 2rem;
  min-height: 2rem;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: #ffe5ef;
  color: #c90b56;
}

.product-shell .dashboard-section .order-list {
  display: block;
  border-block-start: 1px solid #ead7e0;
}

.product-shell .melogram-entry {
  display: grid;
  min-width: 0;
  grid-template-columns: 46px minmax(0, 1fr) minmax(11rem, auto);
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem 0;
  border: 0;
  border-block-end: 1px solid #ead7e0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.product-shell .order-card__accent {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #ffedf4;
  color: #e31365;
  font-size: 1.15rem;
}

.product-shell .order-card__eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.product-shell .order-card__eyebrow .screen-kicker { margin: 0; }
.product-shell .melogram-entry h3 { margin: 0.35rem 0 0.75rem; font-size: 1.25rem; }
.product-shell .customer-dashboard .meta-list { display: flex; gap: 0.35rem 1.25rem; color: #686477; font-size: 0.86rem; }
.product-shell .melogram-entry .order-card__actions {
  width: auto;
  max-width: 22rem;
  align-content: center;
  justify-content: flex-end;
}
.product-shell .melogram-entry .order-card__actions > .button { min-width: 11rem; flex: 0 1 auto; }
.product-shell .dashboard-empty {
  display: flex;
  min-height: 88px;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 0;
  border-block-end: 1px solid #ead7e0;
}
.product-shell .dashboard-empty span { color: #df0c60; font-size: 1.6rem; }
.product-shell .dashboard-empty p { margin: 0; }

/* Creation journey */
.product-shell .stage-nav {
  border-color: #efdce5;
  background: rgba(255, 252, 253, 0.96);
  box-shadow: 0 5px 18px rgba(68, 38, 73, 0.045);
}

.product-shell .stage-list { gap: 0; }
.product-shell .stage-item { position: relative; }
.product-shell .stage-item:not(:last-child)::after {
  position: absolute;
  z-index: 0;
  inset-block-start: 50%;
  inset-inline-end: -0.55rem;
  width: 1.1rem;
  height: 2px;
  background: #e8ccd8;
  content: "";
}

.product-shell .stage-link {
  position: relative;
  z-index: 1;
  min-height: 64px;
  gap: 0.55rem;
  padding-inline: 1.1rem;
  color: #656174;
  font-size: 0.9rem;
}

.product-shell .stage-number {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border: 1.5px solid #d6c0ca;
  border-radius: 50%;
  background: #fff;
  color: #746c79;
  font-size: 0.8rem;
  font-weight: 700;
}

.product-shell .stage-link[data-state="current"] { color: #c90b56; font-weight: 700; }
.product-shell .stage-link[data-state="current"] .stage-number { border-color: #df0c60; background: #df0c60; color: #fff; }
.product-shell .stage-link[data-state="complete"] .stage-number { border-color: #c95c88; background: #ffebf3; color: #b5084a; }
.product-shell .stage-link[data-state="locked"] { color: #918a95; opacity: 0.78; }
.product-shell .stage-done { font-size: 0.68rem; }

.product-shell .details-moments,
.product-shell .stage-next-action {
  border-color: #f0d6e1;
  border-radius: 18px;
  background: #fff7fa;
}

.product-shell .details-moments ol {
  gap: 0.5rem;
  padding: 0.45rem;
  border: 1px solid #ecd5df;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.product-shell .details-moment {
  min-height: 64px;
  padding: 0.7rem 0.8rem;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
}

.product-shell .details-moment:hover { background: #fff1f6; }
.product-shell .details-moment[aria-current="step"] {
  border-color: #f1bfd1;
  background: #ffedf4;
  box-shadow: none;
  color: #b6094c;
}
.product-shell .details-moment small { font-size: 0.78rem; }

.product-shell .details-moment-panel { padding: clamp(1.15rem, 3vw, 1.8rem); }
.product-shell .choice { min-height: 48px; }
.product-shell .choice input { width: 1.4rem; height: 1.4rem; accent-color: #df0c60; }
.product-shell .alert,
.product-shell .banner,
.product-shell .error-summary { border-radius: 14px; }

@media (min-width: 768px) {
  .product-shell .customer-dashboard .overview-grid { grid-template-columns: none; }
}

@media (max-width: 767.98px) {
  .product-shell { --topbar-height: 74px; }
  .product-shell .app-topbar { padding: 0.45rem 0.8rem; }
  .product-shell .app-topbar__logo { width: 3.5rem; height: 2.625rem; }
  .product-shell .app-topbar__title { display: none; }
  .product-shell .app-topbar__actions .save-status { display: none; }
  .product-shell .app-topbar__actions .button { min-height: 42px; padding-inline: 0.8rem; font-size: 0.82rem; }
  .product-shell .workspace { padding: 1rem 0.85rem 3rem; }
  .product-shell .dashboard-welcome { min-height: auto; padding: 1.25rem 0 2rem; }
  .product-shell .dashboard-welcome > img { display: none; }
  .product-shell .dashboard-welcome .screen-actions { display: grid; }
  .product-shell .dashboard-welcome .button { width: 100%; }
  .product-shell .dashboard-section { padding: 2rem 0; }
  .product-shell .melogram-entry { grid-template-columns: minmax(0, 1fr); gap: 0.9rem; padding-block: 1.25rem; }
  .product-shell .order-card__accent { display: none; }
  .product-shell .order-card__eyebrow { align-items: flex-start; flex-direction: column; }
  .product-shell .melogram-entry .order-card__actions { width: 100%; max-width: none; justify-content: stretch; }
  .product-shell .melogram-entry .order-card__actions .button { width: 100%; }
  .product-shell .customer-dashboard .meta-list { display: grid; gap: 0.25rem; }

  .product-shell .card-preview-intro {
    display: grid;
    gap: 0.65rem;
    margin-block-end: 1.15rem;
  }

  .product-shell .card-preview-intro h2,
  .product-shell .card-preview-intro p {
    margin: 0;
  }

  .product-shell .card-preview-intro p {
    margin-block-start: 0.45rem;
    color: var(--ink-soft);
  }

  .product-shell .card-preview-marker {
    display: inline-flex;
    width: fit-content;
    min-height: 32px;
    align-items: center;
    padding-inline: 0.8rem;
    border-radius: 999px;
    background: #352e4c;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 750;
  }

  .product-shell .card-preview-frame {
    overflow: hidden;
    border: 2px solid #352e4c;
    border-radius: 14px;
    background: #ffffff;
  }

  .product-shell .card-preview-frame__bar {
    display: flex;
    min-height: 52px;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 0.9rem;
    background: #352e4c;
    color: #ffffff;
  }

  .product-shell .card-preview-frame__bar span {
    color: #f8dce8;
    font-size: 0.78rem;
    font-weight: 650;
    text-align: end;
  }

  .product-shell .card-preview-frame[data-state="selected"] .card-preview-frame__bar {
    background: #0b6b55;
  }

  .product-shell .card-preview-frame[data-state="selected"] .card-preview-frame__bar span {
    color: #d8f5eb;
  }

  .product-shell .card-preview-frame > .composed-card-preview {
    padding: 1rem;
  }

  .product-shell .card-preview-frame > .stage-next-action {
    margin: 0;
    padding: 1rem;
    border-block-start: 2px solid #ead5df;
    border-radius: 0;
    background: #fff3f7;
  }

  .product-shell .card-preview-frame > .stage-next-action[data-state="complete"] {
    background: #edf9f5;
  }
  .product-shell .stage-nav { box-shadow: 0 4px 14px rgba(68, 38, 73, 0.07); }
  .product-shell .mobile-stage-summary { min-height: 52px; background: #fff7fa; }
  .product-shell .stage-list {
    width: 100%;
    min-width: 0;
    gap: 0;
    overflow: visible;
    padding-inline: 0.25rem;
  }
  .product-shell .stage-item { min-width: 0; flex: 1 1 20%; }
  .product-shell .stage-item:not(:last-child)::after { display: none; }
  .product-shell .stage-link {
    width: 100%;
    min-height: 62px;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.4rem 0.15rem;
    font-size: 0.75rem;
  }
  .product-shell .stage-number { width: 26px; height: 26px; }
  .product-shell .stage-label { overflow: hidden; text-overflow: ellipsis; }
  .product-shell .stage-done { display: none; }
  .product-shell .screen-header { padding-block-end: 1rem; }
  .product-shell .screen-header h1 { font-size: 2rem; }
  .product-shell .mobile-task-dock.mobile-only {
    border-block-start: 1px solid #edc9d8;
    background: rgba(255, 251, 253, 0.98);
    box-shadow: 0 -10px 28px rgba(73, 39, 77, 0.12);
  }

  .product-shell .mobile-task-dock .mobile-task-dock__links .button {
    width: auto;
    min-height: var(--target);
    padding: 0.35rem 0.45rem;
    font-size: 0.78rem;
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-shell .button { transition: none; }
}

/* V2-faithful homepage skin. The layout uses full-width section shells with one shared inner grid. */
.public-shell .v2-home {
  width: 100%;
  margin: 0;
  background: #fef8fa;
  color: #3d3553;
}

.v2-home__inner {
  width: min(100% - 80px, 1160px);
  margin-inline: auto;
}

.v2-hero {
  padding: 0;
  background: #fef9fa;
}

.v2-hero__inner {
  display: grid;
  width: min(100% - clamp(160px, 17.2vw, 254px), 1500px);
  min-height: 690px;
  grid-template-columns: 0.49fr 0.51fr;
  align-items: center;
  gap: 0;
}

.v2-hero__copy {
  position: relative;
  z-index: 2;
  align-self: start;
  padding-block: 3.75rem 0;
}

.v2-hero__copy::before {
  position: absolute;
  z-index: -1;
  inset: -4rem auto auto -4rem;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 20, 90, 0.08), transparent 70%);
  content: "";
}

.v2-hero__tag,
.v2-section-tag {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  margin: 0 0 1.35rem;
  padding: 0.55rem 1rem;
  border: 1px solid rgba(212, 20, 90, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #5a5070;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.v2-hero__tag { margin-block-end: 2rem; }

.v2-hero h1 {
  max-width: 740px;
  margin: 0 0 1.4rem;
  color: #3d3553;
  font-family: "brushberry-script", "Dancing Script", cursive;
  font-size: clamp(3.4rem, 4.15vw, 5rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: 0;
}

@media (min-width: 768px) {
  .v2-hero h1 { line-height: 1.2; }
}

.v2-hero h1 em,
.v2-section-header :is(h1, h2) em,
.v2-cta-band h2 em {
  color: #d4145a;
  font-family: "brushberry-script", "Dancing Script", cursive;
  font-style: normal;
  font-weight: 700;
}

.v2-hero__intro {
  width: min(100%, 560px);
  max-width: 560px;
  margin: 0 0 1.55rem;
  color: #4a4a5e;
  font-size: 1.08rem;
  line-height: 1.65;
}

.v2-rating {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-block-end: 1.35rem;
  font-size: 0.86rem;
}

.v2-rating span { color: #d4145a; font-size: 1.2rem; letter-spacing: 0.08em; }
.v2-rating strong { color: #3d3553; }
.v2-hero__actions { display: flex; align-items: center; gap: 0.25rem; }
.v2-burst {
  position: relative;
  width: 24px;
  height: 30px;
  flex: 0 0 auto;
  background: linear-gradient(currentColor, currentColor) center / 20px 3px no-repeat;
  color: #f7567c;
}

.v2-burst::before,
.v2-burst::after {
  position: absolute;
  left: 2px;
  width: 20px;
  height: 3px;
  border-radius: 2px;
  background: currentColor;
  content: "";
  transform-origin: center;
}

.v2-burst::before { top: 5px; transform: rotate(18deg); }
.v2-burst::after { bottom: 5px; transform: rotate(-18deg); }
.v2-hero__actions > .v2-burst:last-child { transform: scaleX(-1); }

.public-shell .v2-primary-cta {
  display: inline-flex;
  min-width: 250px;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.7rem;
  border: 0;
  border-radius: 999px;
  background: #d4145a;
  box-shadow: 0 12px 32px rgba(212, 20, 90, 0.3);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.public-shell .v2-primary-cta::before { margin-inline-end: 0.7rem; content: "\2726"; }
.public-shell .v2-primary-cta::after { margin-inline-start: auto; content: "\203A"; font-size: 1.5rem; font-weight: 400; }
.public-shell .v2-primary-cta:hover { background: #b8104e; color: #fff; transform: translateY(-1px); }

@media (min-width: 768px) {
  .v2-hero .v2-hero__actions {
    gap: clamp(0.6rem, 1vw, 1.15rem);
  }

  .public-shell .v2-hero .v2-primary-cta {
    width: clamp(312px, 18.6vw, 343px);
    min-width: 312px;
    min-height: 72px;
    padding: 1rem 1.9rem;
    font-size: 1.25rem;
  }

  .public-shell .v2-hero .v2-primary-cta::before {
    margin-inline-end: 1rem;
  }
}

.v2-listen-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin: 1rem 0 0 2.2rem;
  color: #d4145a;
  font-size: 0.9rem;
  font-weight: 600;
}

.v2-listen-link > span {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  padding-inline-start: 2px;
  border-radius: 50%;
  background: #d4145a;
  box-shadow: 0 4px 14px rgba(212, 20, 90, 0.3);
  color: #fff;
  font-size: 0.65rem;
}

.v2-hero__art {
  align-self: start;
  display: grid;
  place-items: center;
  overflow: visible;
  padding-block-start: 0;
  background: #fef9fa;
}

.v2-hero__art img {
  width: 130%;
  max-width: none;
  margin-inline-start: 0;
  background: #fef9fa;
  filter: none;
}

.v2-trust {
  padding: 2rem 0;
  border-block: 1px solid rgba(212, 20, 90, 0.07);
  background: #fff;
}

.v2-trust__items {
  display: grid;
  grid-template-columns: repeat(4, max-content);
  justify-content: space-between;
  gap: 2rem;
  margin: 0;
  padding: 0;
  color: #3d3553;
  font-size: 1rem;
  list-style: none;
}

.v2-trust__items li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  white-space: nowrap;
}

.v2-trust__items strong { color: #302943; font-weight: 800; }

.v2-trust__icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 50%;
  background: #fff0f5;
  color: #302943;
  font-size: 1rem;
  font-weight: 700;
}

.v2-section { padding: 5rem 0; }
.v2-section-header { max-width: 650px; margin: 0 auto 3.15rem; text-align: center; }
.v2-section-header--left { max-width: none; margin-inline: 0; text-align: left; }
.v2-section-header .v2-section-tag { margin-block-end: 0.65rem; background: rgba(212, 20, 90, 0.08); color: #d4145a; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; }
.v2-section-header :is(h1, h2) { margin: 0 0 0.7rem; color: #3d3553; font-size: clamp(2.2rem, 4vw, 3.35rem); font-weight: 800; line-height: 1.06; letter-spacing: -0.02em; }
.v2-section-header :is(h1, h2) em { margin-inline-start: 0.18em; }
.v2-section-header > p:last-child { max-width: 540px; margin: 0 auto; color: #6b6580; font-size: 1rem; line-height: 1.6; }
.v2-section-header--left > p:last-child { margin-inline: 0; }

.v2-examples { background: #fff4f7; }
.v2-example-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.public-shell .v2-example-card {
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  background: #fffafb;
  box-shadow: 0 8px 28px rgba(60, 20, 60, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.public-shell .v2-example-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(60, 20, 60, 0.13); }
.v2-example-card__image { width: 100%; height: 180px; object-fit: cover; }
.v2-example-card__body { display: grid; justify-items: stretch; padding: 1.1rem 1.25rem 1.25rem; }
.v2-example-card h3 { margin: 0 0 1rem; font-family: "brushberry-script", "Dancing Script", cursive; font-size: 1.55rem; font-weight: 500; }
.v2-example-card__genre { display: flex; align-items: center; gap: 0.4rem; margin: 0 0 0.75rem; color: #d4145a; font-size: 0.75rem; font-weight: 600; }
.v2-example-card__genre span { width: 6px; height: 6px; border-radius: 50%; background: #d4145a; }
.v2-example-card .public-example-audio { display: none; }

.public-shell .v2-audio-player {
  display: flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.8rem;
  padding: 0.45rem 0.7rem;
  border: 0;
  border-radius: 999px;
  background: #fff0f5;
  color: #5a5070;
  font: inherit;
  font-size: 0.7rem;
  cursor: pointer;
}

.melogram-example-play.v2-audio-player > .v2-audio-player__button {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  padding-inline-start: 2px;
  border-radius: 50%;
  background: #d4145a;
  box-shadow: 0 3px 10px rgba(212, 20, 90, 0.35);
  color: #fff;
  font-size: 0.65rem;
}

.melogram-example-play.v2-audio-player > .v2-audio-player__bars {
  display: flex;
  width: auto;
  min-width: 0;
  height: 22px;
  flex: 1;
  align-items: center;
  gap: 2px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.v2-audio-player__bars i { width: 3px; height: calc(3px + var(--bar) * 2.2px); flex: 1 1 3px; border-radius: 2px; background: #f49ac1; }
.v2-audio-player[aria-pressed="true"] .v2-audio-player__bars i { opacity: 0.75; animation: v2-wave 0.9s ease-in-out infinite alternate; }
.v2-audio-player[aria-pressed="true"] .v2-audio-player__bars i:nth-child(2n) { animation-delay: -0.35s; }
.melogram-example-play.v2-audio-player > .v2-audio-player__duration {
  display: block;
  width: auto;
  height: auto;
  flex: 0 0 auto;
  margin-inline-start: 0.15rem;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #9187b0;
  font-size: 0.72rem;
  font-weight: 600;
}
.v2-card-link { width: fit-content; color: #d4145a; font-size: 0.78rem; font-weight: 600; }

@keyframes v2-wave { to { transform: scaleY(0.45); } }

.v2-how { position: relative; background: #fff; }
.v2-how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.v2-how-card { overflow: hidden; border: 1px solid rgba(61, 53, 83, 0.08); border-radius: 20px; background: #fff; box-shadow: 0 4px 20px rgba(61, 53, 83, 0.07); transition: transform 0.25s ease, box-shadow 0.25s ease; }
.v2-how-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(61, 53, 83, 0.11); }
.v2-how-card__image { position: relative; height: 220px; overflow: hidden; }
.v2-how-card__image img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.v2-how-card__image span { position: absolute; inset: auto auto -16px 50%; display: grid; width: 34px; height: 34px; place-items: center; transform: translateX(-50%); border-radius: 50%; background: #d4145a; box-shadow: 0 0 0 4px #fff, 0 4px 12px rgba(212, 20, 90, 0.3); color: #fff; font-size: 0.78rem; font-weight: 700; }
.v2-how-card__body { padding: 2rem 1.5rem 1.75rem; }
.v2-how-card h3 { margin: 0 0 0.55rem; color: #3d3553; font-size: 1.15rem; }
.v2-how-card__body i { display: block; width: 38px; height: 2px; margin-block-end: 0.7rem; border-radius: 2px; background: #d4145a; opacity: 0.55; }
.v2-how-card p { margin: 0; color: #5a5070; font-size: 0.84rem; line-height: 1.65; }

.v2-pricing { background: #fff4f7; }
.v2-price-grid { display: grid; max-width: 940px; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; align-items: stretch; margin-inline: auto; }
.public-shell .v2-price-card { position: relative; display: flex; min-width: 0; flex-direction: column; padding: 2rem 1.75rem; border: 0; border-radius: 20px; background: #fff; box-shadow: 0 2px 16px rgba(60, 20, 60, 0.08); transition: transform 0.25s ease, box-shadow 0.25s ease; }
.public-shell .v2-price-card:hover { transform: translateY(-4px); box-shadow: 0 16px 48px rgba(60, 20, 60, 0.13); }
.public-shell .v2-price-card--featured { z-index: 2; border: 1px solid rgba(255, 255, 255, 0.06); background: linear-gradient(155deg, #2e163a 0%, #1a0c25 100%); box-shadow: 0 20px 60px rgba(40, 10, 50, 0.35); transform: scale(1.04); }
.public-shell .v2-price-card--featured:hover { transform: scale(1.04) translateY(-4px); }
.v2-price-card__badge { position: absolute; inset: -12px auto auto 50%; transform: translateX(-50%); padding: 0.25rem 0.9rem; border-radius: 999px; background: #d4145a; color: #fff; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.v2-price-card__tier { margin: 0 0 0.5rem; color: #d4145a; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.v2-price-card__price { margin: 0 0 0.35rem; color: #3d3553; font-size: 2.45rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.v2-price-card__description { margin: 0 0 1.2rem; color: #9e98b8; font-size: 0.8rem; line-height: 1.5; }
.v2-price-card hr { width: 100%; margin: 0 0 1.1rem; border: 0; border-block-start: 1px solid rgba(212, 20, 90, 0.09); }
.public-shell .v2-price-card .history-list { width: 100%; margin: 0 0 1.4rem; padding: 0; list-style: none; }
.public-shell .v2-price-card .history-item { position: relative; padding: 0.32rem 0 0.32rem 2rem; border: 0; color: #5a5070; font-size: 0.8rem; line-height: 1.4; }
.public-shell .v2-price-card .history-item::before { position: absolute; inset: 0.3rem auto auto 0; display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: #fff0f5; color: #d4145a; content: "\2713"; font-size: 0.68rem; font-weight: 800; }
.v2-price-card--featured :where(.v2-price-card__price, .v2-price-card__tier) { color: #fff; }
.v2-price-card--featured .v2-price-card__description { color: rgba(255, 255, 255, 0.54); }
.v2-price-card--featured hr { border-color: rgba(255, 255, 255, 0.09); }
.public-shell .v2-price-card--featured .history-item { color: rgba(255, 255, 255, 0.78); }
.public-shell .v2-price-card--featured .history-item::before { background: rgba(212, 20, 90, 0.18); color: #ff7baa; }
.public-shell .v2-price-card__button { width: 100%; min-height: 46px; justify-content: center; margin-block-start: auto; border: 2px solid rgba(212, 20, 90, 0.25); border-radius: 999px; background: transparent; color: #d4145a; font-weight: 600; text-decoration: none; }
.public-shell .v2-price-card--featured .v2-price-card__button { border: 0; background: #d4145a; box-shadow: 0 6px 20px rgba(212, 20, 90, 0.42); color: #fff; }
.v2-coming-soon { margin-block-start: auto; color: #9e98b8; font-weight: 700; }

.v2-testimonials { background: #fff; }
.v2-testimonial-grid { display: grid; max-width: 1024px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; margin-inline: auto; }
.v2-testimonial { position: relative; display: flex; min-height: 280px; flex-direction: column; margin: 0; padding: 2.75rem 2.5rem 2.4rem; border: 1px solid #f0dce4; border-radius: 16px; background: #fff4f7; box-shadow: 0 5px 8px rgba(61, 53, 83, 0.07); }
.v2-testimonial__stars { display: block; margin: 0 0 1.35rem; color: #26214b; font-size: 1rem; letter-spacing: 0.12em; line-height: 1; }
.v2-testimonial__quote { position: absolute; inset: 1.25rem 1.75rem auto auto; color: #f9dce7; font-family: Georgia, serif; font-size: 4.6rem; font-weight: 700; line-height: 1; }
.v2-testimonial > p { max-width: 34ch; min-height: 5em; margin: 0 0 1.5rem; color: #26214b; font-size: 1rem; font-style: italic; font-weight: 700; line-height: 1.6; }
.v2-testimonial footer { display: flex; align-items: center; gap: 0.75rem; margin-top: auto; }
.v2-testimonial__avatar { display: grid; width: 52px; height: 52px; flex: 0 0 52px; place-items: center; border-radius: 50%; background: #eb1b61; color: #fff; font-weight: 800; }
.v2-testimonial footer span:last-child { display: grid; }
.v2-testimonial footer strong { color: #26214b; font-size: 0.95rem; }
.v2-testimonial footer small { margin-top: 0.1rem; color: #9d91ad; font-size: 0.78rem; line-height: 1.35; }

.v2-cta-band { padding: 3rem 0 4rem; background: #fef8fa; }
.v2-cta-band__inner { display: grid; min-height: 330px; grid-template-columns: 0.72fr 1.28fr; align-items: center; gap: 2.5rem; padding: 2.5rem 4rem; overflow: hidden; border-radius: 26px; background: linear-gradient(105deg, #fff0f5, #fff8fb); box-shadow: 0 8px 30px rgba(212, 20, 90, 0.08); }
.v2-cta-band img { width: min(100%, 300px); justify-self: center; mix-blend-mode: multiply; }
.v2-cta-band h2 { margin: 0 0 0.4rem; color: #3d3553; font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 800; line-height: 1.08; }
.v2-cta-band > .v2-home__inner > div > p { margin: 0 0 1.2rem; color: #5a5070; }
.v2-cta-band__trust { margin: 1rem 0 0 !important; color: #7a7089 !important; font-size: 0.72rem; }

@media (max-width: 899px) {
  .v2-home__inner { width: min(100% - 40px, 760px); }
  .v2-hero__inner { min-height: 520px; grid-template-columns: 0.95fr 1.05fr; }
  .v2-hero h1 { font-size: clamp(3.3rem, 7vw, 4.3rem); }
  .v2-example-grid,
  .v2-how-grid,
  .v2-price-grid { gap: 1rem; }
  .v2-how-card__image { height: 175px; }
  .public-shell .v2-price-card { padding-inline: 1.25rem; }
  .v2-trust__items { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 2rem; }
  .v2-trust__items li { white-space: normal; }
}

@media (max-width: 767.98px) {
  .v2-home__inner { width: min(100% - 32px, 520px); }
  .v2-hero__inner { display: flex; min-height: auto; flex-direction: column; gap: 1rem; padding-block: 1.5rem 2.2rem; }
  .v2-hero__copy { display: grid; justify-items: center; order: 1; padding: 0; text-align: center; }
  .v2-hero__copy::before { display: none; }
  .v2-hero__art { order: 2; }
  .v2-hero__art img { width: min(88vw, 390px); margin: 0; }
  .v2-hero__tag { margin-block-end: 1rem; }
  .v2-desktop-break { display: none; }
  .v2-hero h1 { max-width: 12ch; font-size: clamp(3.1rem, 13vw, 4rem); }
  .v2-hero__intro { max-width: 24ch; font-size: 1rem; }
  .v2-rating { margin-block: 0.2rem 1rem; }
  .v2-hero__actions { width: 100%; justify-content: center; }
  .public-shell .v2-primary-cta { width: min(100%, 330px); min-width: 0; }
  .v2-listen-link {
    min-height: 44px;
    margin-inline-start: 0;
    padding-block: 0.35rem;
  }
  .v2-card-link,
  .v2-example-list__copy > a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    padding-block: 0.65rem;
  }
  .v2-trust { padding-block: 1rem; }
  .v2-trust__items {
    width: min(100%, 18rem);
    grid-template-columns: 1fr;
    gap: 0;
    margin-inline: auto;
    font-size: 0.95rem;
    line-height: 1.4;
  }
  .v2-trust__items li {
    min-height: 58px;
    gap: 1rem;
    padding-block: 0.55rem;
  }
  .v2-trust__items li + li { border-block-start: 1px solid rgba(212, 20, 90, 0.08); }
  .v2-trust__icon { width: 42px; height: 42px; flex-basis: 42px; }
  .v2-section { padding-block: 3.5rem; }
  .v2-section-header { margin-block-end: 2rem; }
  .v2-section-header--left { text-align: center; }
  .v2-section-header--left .v2-section-tag { margin-inline: auto; }
  .v2-section-header--left > p:last-child { margin-inline: auto; }
  .v2-example-grid { grid-template-columns: repeat(3, minmax(260px, 82vw)); overflow-x: auto; padding: 0.4rem 0.1rem 1.1rem; scroll-snap-type: x mandatory; }
  .v2-example-card { scroll-snap-align: center; }
  .v2-how-grid { grid-template-columns: 1fr; }
  .v2-how-card { display: grid; grid-template-columns: 125px 1fr; }
  .v2-how-card__image { height: 100%; min-height: 145px; }
  .v2-how-card__image span { inset: 50% -16px auto auto; transform: translateY(-50%); }
  .v2-how-card__body { padding: 1.35rem 1rem 1.35rem 1.5rem; }
  .v2-price-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    overflow-x: visible;
    padding: 1rem 0 0;
    scroll-snap-type: none;
  }
  .public-shell .v2-price-card {
    width: 100%;
    scroll-snap-align: none;
  }
  .public-shell .v2-price-card--featured { transform: none; }
  .public-shell .v2-price-card--featured:hover { transform: translateY(-4px); }
  .melogram-public-footer .button { min-height: 44px; }
  .v2-testimonial-grid { grid-template-columns: 1fr; gap: 1rem; padding: 0; }
  .v2-testimonial { min-height: 0; padding: 1.75rem 1.35rem 1.5rem; }
  .v2-testimonial__stars { margin-bottom: 1.1rem; }
  .v2-testimonial__quote { inset: 0.7rem 1rem auto auto; font-size: 3.8rem; }
  .v2-testimonial > p { min-height: 0; }
  .v2-cta-band { padding-block: 2rem 3rem; }
  .v2-cta-band__inner { min-height: auto; grid-template-columns: 1fr; gap: 0; padding: 1.5rem 1.2rem 2rem; text-align: center; }
  .v2-cta-band img { width: 210px; }
  .v2-cta-band__inner > div { display: grid; justify-items: center; }
  .v2-cta-band__trust { max-width: 28ch; line-height: 1.8; }
}

@media (prefers-reduced-motion: reduce) {
  .v2-home *,
  .v2-home *::before,
  .v2-home *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* V2 public subpages. These use broad page sections and dividing rules rather
   than stacking the content inside floating cards. */
.public-shell .v2-subpage {
  width: 100%;
  margin: 0;
  background: #fff;
  color: #3d3553;
}

.v2-subpage-hero {
  overflow: hidden;
  border-block-end: 1px solid rgba(212, 20, 90, 0.08);
  background:
    radial-gradient(circle at 18% 34%, rgba(212, 20, 90, 0.07), transparent 30%),
    #fef8fa;
}

.v2-subpage-hero__inner {
  display: grid;
  min-height: 470px;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  padding-block: 3.6rem;
}

.v2-subpage-hero__inner > div { max-width: 690px; }
.v2-subpage-hero .v2-section-tag { margin-block-end: 1.2rem; }
.v2-subpage-hero h1 {
  margin: 0 0 1.25rem;
  color: #302943;
  font-size: clamp(2.8rem, 5vw, 4.7rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.045em;
}
.v2-subpage-hero h1 em {
  color: #d4145a;
  font-family: "brushberry-script", "Dancing Script", cursive;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0;
}
.v2-subpage-hero__inner > div > p:not(.v2-section-tag) {
  max-width: 600px;
  margin: 0 0 1.65rem;
  color: #5f5872;
  font-size: 1.08rem;
  line-height: 1.7;
}
.v2-subpage-hero img {
  width: min(100%, 430px);
  justify-self: center;
  mix-blend-mode: multiply;
}

.v2-subpage-section { padding: 5rem 0; background: #fff; }
.v2-subpage-section:nth-of-type(even) { background: #fff8fa; }
.v2-subpage-section .v2-section-header :is(h1, h2) em {
  color: #d4145a;
  font-family: "brushberry-script", "Dancing Script", cursive;
  font-style: normal;
  font-weight: 500;
}

.v2-journey,
.v2-example-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.v2-journey > li {
  display: grid;
  min-height: 170px;
  grid-template-columns: 58px minmax(0, 1fr) 180px;
  align-items: center;
  gap: 2rem;
  padding: 1.6rem 0;
  border-block-start: 1px solid rgba(61, 53, 83, 0.12);
}
.v2-journey > li:last-child { border-block-end: 1px solid rgba(61, 53, 83, 0.12); }
.v2-journey__number {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(212, 20, 90, 0.22);
  border-radius: 50%;
  background: #fff0f5;
  color: #d4145a;
  font-weight: 800;
}
.v2-journey li > div > p:first-child,
.v2-example-list__copy > p:first-child {
  margin: 0 0 0.35rem;
  color: #d4145a;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.v2-journey h3 { margin: 0 0 0.4rem; color: #302943; font-size: 1.45rem; }
.v2-journey li > div > p:last-child { max-width: 720px; margin: 0; color: #665d76; line-height: 1.65; }
.v2-journey img { width: 160px; max-height: 130px; object-fit: contain; mix-blend-mode: multiply; }

.v2-example-list > li {
  display: grid;
  min-height: 260px;
  grid-template-columns: minmax(250px, 0.82fr) minmax(0, 1.18fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  padding: 2rem 0;
  border-block-start: 1px solid rgba(61, 53, 83, 0.12);
}
.v2-example-list > li:last-child { border-block-end: 1px solid rgba(61, 53, 83, 0.12); }
.v2-example-list > li:nth-child(even) { grid-template-columns: minmax(0, 1.18fr) minmax(250px, 0.82fr); }
.v2-example-list > li:nth-child(even) > img { grid-column: 2; grid-row: 1; }
.v2-example-list > li:nth-child(even) > div { grid-column: 1; grid-row: 1; }
.v2-example-list > li > img { width: 100%; height: 220px; object-fit: cover; }
.v2-example-list__copy h3 {
  margin: 0 0 1rem;
  color: #302943;
  font-family: "brushberry-script", "Dancing Script", cursive;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
}
.v2-example-list__copy .v2-audio-player { max-width: 580px; }
.v2-example-list__copy .public-example-audio { display: none; }
.v2-example-list__copy > a { color: #d4145a; font-size: 0.86rem; font-weight: 700; }

.v2-plan-list { border-block: 1px solid rgba(61, 53, 83, 0.13); }
.v2-plan-list > section {
  display: grid;
  grid-template-columns: minmax(230px, 0.9fr) minmax(300px, 1.35fr) minmax(190px, 0.6fr);
  align-items: center;
  gap: 3rem;
  padding: 2.2rem 0;
  border-block-end: 1px solid rgba(61, 53, 83, 0.13);
}
.v2-plan-list > section:last-child { border-block-end: 0; }
.v2-plan-list__intro > span {
  display: inline-block;
  margin-block-end: 0.6rem;
  color: #d4145a;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.v2-plan-list h3 { margin: 0; color: #302943; font-size: 1.35rem; }
.v2-plan-list__price { margin: 0.3rem 0; color: #d4145a; font-size: 2.25rem; font-weight: 800; }
.v2-plan-list__intro > p:last-child { margin: 0; color: #6b6580; font-size: 0.86rem; line-height: 1.55; }
.public-shell .v2-plan-list .history-list { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.public-shell .v2-plan-list .history-item { position: relative; padding: 0 0 0 1.65rem; border: 0; color: #5a5070; font-size: 0.85rem; }
.public-shell .v2-plan-list .history-item::before { position: absolute; inset: 0 auto auto 0; color: #d4145a; content: "\2713"; font-weight: 800; }
.v2-plan-list > section > div:last-child { justify-self: end; }
.v2-plan-list .v2-primary-cta { min-width: 190px; }

.v2-faq-list { border-block-start: 1px solid rgba(61, 53, 83, 0.13); }
.v2-faq-list details { border-block-end: 1px solid rgba(61, 53, 83, 0.13); }
.v2-faq-list summary {
  display: grid;
  min-height: 86px;
  grid-template-columns: 130px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 0;
  color: #302943;
  cursor: pointer;
  list-style: none;
}
.v2-faq-list summary::-webkit-details-marker { display: none; }
.v2-faq-list summary > span { color: #d4145a; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; }
.v2-faq-list summary > strong { font-size: 1.08rem; }
.v2-faq-list summary > i { position: relative; width: 24px; height: 24px; }
.v2-faq-list summary > i::before,
.v2-faq-list summary > i::after { position: absolute; inset: 11px 4px auto; height: 2px; background: #d4145a; content: ""; }
.v2-faq-list summary > i::after { transform: rotate(90deg); transition: transform 0.2s ease; }
.v2-faq-list details[open] summary > i::after { transform: rotate(0); }
.v2-faq-list details > p { max-width: 760px; margin: -0.4rem 0 1.6rem 154px; color: #665d76; line-height: 1.7; }

.v2-content-flow { border-block-start: 1px solid rgba(61, 53, 83, 0.13); }
.v2-content-flow > section {
  display: grid;
  grid-template-columns: minmax(220px, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(2rem, 7vw, 6rem);
  padding: clamp(2rem, 5vw, 3.7rem) 0;
  border-block-end: 1px solid rgba(61, 53, 83, 0.13);
}
.v2-content-flow > section > div:first-child > p {
  margin: 0 0 0.55rem;
  color: #d4145a;
  font-size: 0.82rem;
  font-weight: 700;
}
.v2-content-flow h2 {
  max-width: 15ch;
  margin: 0;
  color: #302943;
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.v2-content-flow > section > div:last-child {
  align-self: center;
  max-width: 70ch;
}
.v2-content-flow > section > div:last-child > p {
  position: relative;
  margin: 0 0 0.9rem;
  color: #5f5872;
  font-size: 1rem;
  line-height: 1.72;
  text-wrap: pretty;
}
.v2-content-flow > section > div:last-child > p:last-child { margin-block-end: 0; }
.v2-content-flow > section > div:last-child > p + p { padding-inline-start: 1.45rem; }
.v2-content-flow > section > div:last-child > p + p::before {
  position: absolute;
  inset: 0.15rem auto auto 0;
  color: #f7567c;
  content: "\2665";
  font-size: 0.7rem;
}
.v2-content-flow a { color: #d4145a; font-weight: 700; }

.v2-inline-links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-block-start: 1.4rem; }
.v2-inline-links .button { margin: 0; }
.v2-legal-page .v2-subpage-hero__inner { min-height: 390px; }
.v2-legal-page .v2-subpage-hero img { width: min(100%, 330px); }
.v2-legal-page .v2-content-flow > section:first-child { padding-block: 1.7rem; }

.v2-package-hero .v2-subpage-hero__inner { min-height: 390px; }
.v2-package-hero .v2-subpage-hero img { width: min(100%, 340px); }
.v2-package-form .v2-subpage-section { background: #fff; }
.v2-package-options { border-block-start: 1px solid rgba(61, 53, 83, 0.14); }
.v2-package-option {
  display: grid;
  grid-template-columns: minmax(270px, 0.95fr) minmax(360px, 1.05fr);
  gap: clamp(2rem, 6vw, 5rem);
  margin: 0;
  padding: 2.35rem clamp(1rem, 2.5vw, 2rem);
  border: 0;
  border-block-end: 1px solid rgba(61, 53, 83, 0.14);
  background: transparent;
  transition: background-color 180ms ease-out;
}
.v2-package-option:has(input:checked) { background: #fff3f7; }
.v2-package-option[data-state="locked"] { background: #faf8fa; color: #756d7e; }
.v2-package-option__choice {
  position: relative;
  display: grid;
  min-width: 0;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: start;
  gap: 1rem;
  cursor: pointer;
}
.v2-package-option__choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.v2-package-option__radio {
  position: relative;
  display: block;
  width: 28px;
  height: 28px;
  margin-block-start: 0.15rem;
  border: 2px solid #c9a9b8;
  border-radius: 50%;
  background: #fff;
}
.v2-package-option__radio::after {
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: #d4145a;
  content: "";
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 180ms ease-out, transform 180ms ease-out;
}
.v2-package-option__choice input:checked + .v2-package-option__radio { border-color: #d4145a; }
.v2-package-option__choice input:checked + .v2-package-option__radio::after { opacity: 1; transform: scale(1); }
.v2-package-option__choice input:focus-visible + .v2-package-option__radio { outline: 3px solid rgba(212, 20, 90, 0.24); outline-offset: 3px; }
.v2-package-option__choice:has(input:disabled) { cursor: not-allowed; }
.v2-package-option__choice:has(input:disabled) .v2-package-option__radio { border-color: #d6cdd2; background: #f2eef0; }
.v2-package-option__summary { display: grid; justify-items: start; }
.v2-package-option__summary > strong { color: #302943; font-size: 1.45rem; line-height: 1.2; }
.v2-package-option__summary > b { margin: 0.35rem 0 0.65rem; color: #d4145a; font-size: 2.4rem; line-height: 1; }
.v2-package-option__summary > small { max-width: 52ch; color: #5f5872; font-size: 0.92rem; line-height: 1.6; }
.v2-package-option__badge {
  display: inline-block;
  margin: 0 0 0.55rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: #d4145a;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.v2-package-option__features { align-self: center; }
.v2-package-option__features h3 { margin: 0 0 0.8rem; color: #302943; font-size: 1rem; }
.public-shell .v2-package-option__features .history-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.public-shell .v2-package-option__features .history-item {
  position: relative;
  min-width: 0;
  padding: 0 0 0 1.55rem;
  border: 0;
  color: #51495f;
  font-size: 0.84rem;
  line-height: 1.45;
}
.public-shell .v2-package-option__features .history-item::before {
  position: absolute;
  inset: 0 auto auto 0;
  color: #d4145a;
  content: "\2713";
  font-weight: 800;
}
.v2-package-option__unavailable { grid-column: 1 / -1; padding-block-start: 0.25rem; color: #675f70; }
.v2-package-option__unavailable strong { color: #a24567; }
.v2-package-option__unavailable p { margin: 0.25rem 0 0; }
.v2-package-next { padding: 2.5rem 0; border-block: 1px solid rgba(212, 20, 90, 0.1); background: #fff0f5; }
.v2-package-next > .v2-home__inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.v2-package-next strong { color: #302943; font-size: 1.08rem; }
.v2-package-next p { max-width: 64ch; margin: 0.3rem 0 0; color: #5f5872; line-height: 1.55; }
.v2-package-next__actions { display: flex; flex: 0 0 auto; align-items: center; gap: 0.75rem; }
.v2-package-next__actions .v2-primary-cta { min-width: 230px; }

.v2-subpage-note { padding: 2.3rem 0; border-block: 1px solid rgba(212, 20, 90, 0.08); background: #fff0f5; }
.v2-subpage-note > .v2-home__inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.v2-subpage-note strong { color: #302943; font-size: 1.08rem; }
.v2-subpage-note p { margin: 0.25rem 0 0; color: #665d76; }
.v2-subpage-note > .v2-home__inner > p { flex: 1; }
.v2-subpage-note .button-secondary { flex: 0 0 auto; }

@media (max-width: 899px) {
  .v2-subpage-hero__inner { min-height: 390px; grid-template-columns: minmax(0, 1fr) 270px; gap: 1.5rem; }
  .v2-journey > li { grid-template-columns: 52px minmax(0, 1fr) 125px; gap: 1.3rem; }
  .v2-journey img { width: 120px; }
  .v2-plan-list > section { grid-template-columns: minmax(190px, 0.85fr) minmax(260px, 1.15fr); gap: 1.5rem 2rem; }
  .v2-plan-list > section > div:last-child { grid-column: 1 / -1; justify-self: start; }
  .v2-package-option { grid-template-columns: minmax(230px, 0.8fr) minmax(300px, 1.2fr); gap: 2rem; }
  .public-shell .v2-package-option__features .history-list { grid-template-columns: 1fr; }
  .v2-package-next > .v2-home__inner { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 767.98px) {
  .v2-subpage-hero__inner { display: flex; min-height: auto; flex-direction: column-reverse; gap: 0.5rem; padding-block: 1.5rem 2.8rem; text-align: center; }
  .v2-subpage-hero__inner > div { display: grid; justify-items: center; }
  .v2-subpage-hero img { width: min(78vw, 300px); }
  .v2-subpage-hero h1 { font-size: clamp(2.6rem, 12vw, 3.7rem); }
  .v2-subpage-hero__inner > div > p:not(.v2-section-tag) { font-size: 1rem; }
  .v2-subpage-section { padding-block: 3.5rem; }
  .v2-journey > li { grid-template-columns: 42px minmax(0, 1fr); gap: 1rem; }
  .v2-journey__number { width: 40px; height: 40px; }
  .v2-journey img { display: none; }
  .v2-example-list > li,
  .v2-example-list > li:nth-child(even) { display: grid; min-height: 0; grid-template-columns: 1fr; gap: 1.25rem; padding: 1.6rem 0 2rem; }
  .v2-example-list > li:nth-child(even) > img,
  .v2-example-list > li:nth-child(even) > div { grid-column: 1; grid-row: auto; }
  .v2-example-list > li > img { height: 190px; }
  .v2-plan-list > section { grid-template-columns: 1fr; gap: 1.25rem; padding: 2rem 0; }
  .v2-plan-list > section > div:last-child { grid-column: auto; justify-self: stretch; }
  .v2-plan-list .v2-primary-cta { width: 100%; }
  .v2-faq-list summary { min-height: 80px; grid-template-columns: minmax(0, 1fr) 24px; gap: 0.75rem; }
  .v2-faq-list summary > span { grid-column: 1; margin-block-end: -0.45rem; }
  .v2-faq-list summary > strong { grid-column: 1; }
  .v2-faq-list summary > i { grid-column: 2; grid-row: 1 / 3; }
  .v2-faq-list details > p { margin: 0 2rem 1.5rem 0; }
  .v2-content-flow > section { grid-template-columns: 1fr; gap: 1rem; padding-block: 2.2rem; }
  .v2-content-flow h2 { max-width: none; }
  .v2-content-flow > section > div:last-child > p { font-size: 0.95rem; }
  .v2-inline-links { display: grid; width: 100%; }
  .v2-inline-links .button { width: 100%; justify-content: center; }
  .v2-package-option { grid-template-columns: 1fr; gap: 1.4rem; padding: 1.8rem 0.4rem; }
  .v2-package-option__summary > strong { font-size: 1.3rem; }
  .v2-package-option__summary > b { font-size: 2.1rem; }
  .v2-package-option__features { padding-inline-start: 48px; }
  .v2-package-option__unavailable { padding-inline-start: 48px; }
  .v2-package-next__actions { display: grid; width: 100%; }
  .v2-package-next__actions .v2-primary-cta,
  .v2-package-next__actions .button-secondary { width: 100%; justify-content: center; }
  .v2-subpage-note > .v2-home__inner { align-items: flex-start; flex-direction: column; gap: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .v2-subpage *,
  .v2-subpage *::before,
  .v2-subpage *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

@media (min-width: 900px) {
  .public-shell .melogram-public-header .melogram-public-nav {
    display: flex !important;
    align-items: center;
    gap: 1.8rem;
    margin-inline-start: auto;
  }

  .public-shell .melogram-public-header .melogram-public-nav .button {
    padding-inline: 0;
    font-size: 1rem;
  }
}

/* Keep the customer journey layout above the prototype variant rules. */
#app .product-shell .app-frame:has(> .stage-nav) .stage-list {
  display: grid;
  width: min(calc(100% - 2rem), 74rem);
  min-width: 0;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-inline: auto;
}

#app .product-shell .app-frame:has(> .stage-nav) .stage-link {
  width: 100%;
  justify-content: center;
}

#app .product-shell .app-frame:has(> .stage-nav) .workspace {
  display: grid;
  width: min(calc(100% - 2rem), 74rem);
  max-width: 74rem;
  grid-template-columns: minmax(0, 1fr) 17.5rem;
  gap: 3rem;
}

#app .product-shell .app-frame:has(> .stage-nav) .workspace-aside {
  display: block;
  grid-template-columns: none;
}

@media (min-width: 901px) {
  #app .product-shell .app-frame:has(> .stage-nav) .workspace-aside {
    padding-inline-end: 0.75rem;
    scrollbar-gutter: stable;
  }
}

@media (max-width: 900px) {
  #app .product-shell .app-frame:has(> .stage-nav) .workspace {
    display: block;
    width: min(calc(100% - 2rem), 46rem);
    max-width: 46rem;
  }
}

@media (max-width: 767.98px) {
  #app .product-shell .app-frame:has(> .stage-nav) .stage-list {
    width: 100%;
  }

  #app .product-shell .app-frame:has(> .stage-nav) .stage-link {
    flex-direction: column;
    justify-content: center;
  }

  #app .product-shell .app-frame:has(> .stage-nav) .workspace {
    width: 100%;
    max-width: none;
  }

  #app .product-shell .app-frame:has(> .stage-nav) .workspace-aside[data-mobile-state="closed"] {
    display: none;
  }
}

/* Hierarchy correction: the five-stage journey is orientation only. The four
   Details sections are the primary navigation while the customer fills in the
   form. */
#app .product-shell .app-frame:has(> .stage-nav) > .stage-nav {
  box-shadow: none;
}

#app .product-shell .app-frame:has(> .stage-nav) .stage-list {
  width: min(calc(100% - 2rem), 64rem);
}

#app .product-shell .app-frame:has(> .stage-nav) .stage-item:not(:last-child)::after {
  display: none;
}

#app .product-shell .app-frame:has(> .stage-nav) .stage-link {
  min-height: 3.5rem;
  gap: 0.45rem;
  padding: 0.45rem 0.35rem;
  border-block-end-width: 2px;
  color: #6c6675;
  font-size: 0.84rem;
  font-weight: 650;
}

#app .product-shell .app-frame:has(> .stage-nav) .stage-number {
  width: 1.55rem;
  height: 1.55rem;
  border-width: 1px;
  font-size: 0.7rem;
}

#app .product-shell .app-frame:has(> .stage-nav) .stage-done {
  color: #396b58;
  font-size: 0.66rem;
}

#app .product-shell .app-frame:has(> .stage-nav) .details-form-label {
  margin: 1.75rem 0 0;
  color: #3b354c;
  font-size: 1rem;
  font-weight: 700;
}

#app .product-shell .app-frame:has(> .stage-nav) .workspace-main > .screen > .details-moments {
  padding-block: 0.75rem 0;
  border-block-end: 0;
}

#app .product-shell .app-frame:has(> .stage-nav) .details-moments ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-block: 1px solid #d9c5cf;
}

#app .product-shell .app-frame:has(> .stage-nav) .details-moments li + li {
  border-inline-start: 1px solid #d9c5cf;
}

#app .product-shell .app-frame:has(> .stage-nav) .details-moment {
  width: 100%;
  min-height: 5.25rem;
  align-content: center;
  padding: 0.85rem 1rem;
  border: 0;
  border-block-end: 3px solid transparent;
  border-radius: 0;
  background: #fff;
  color: #2f2a45;
}

#app .product-shell .app-frame:has(> .stage-nav) .details-moment:hover {
  background: #fff5f8;
}

#app .product-shell .app-frame:has(> .stage-nav) .details-moment:disabled {
  background: #f6f3f5;
  color: #746d78;
  cursor: not-allowed;
  opacity: 0.72;
}

#app .product-shell .app-frame:has(> .stage-nav) .details-moment:disabled:hover {
  background: #f6f3f5;
}

#app .product-shell .app-frame:has(> .stage-nav) .details-moment[aria-current="step"] {
  border-color: #df0c60;
  background: #ffedf4;
  color: #a90846;
}

#app .product-shell .app-frame:has(> .stage-nav) .details-moment span {
  display: block;
  font-size: 0.96rem;
  font-weight: 750;
  line-height: 1.3;
}

#app .product-shell .app-frame:has(> .stage-nav) .details-moment small {
  display: block;
  margin-block-start: 0.25rem;
  color: #6d6676;
  font-size: 0.78rem;
  font-weight: 500;
}

#app .product-shell .app-frame:has(> .stage-nav) .details-moment-progress {
  padding-block: 1rem 1.5rem;
  border-block-end: 1px solid #ead5df;
}

@media (max-width: 767.98px) {
  #app .product-shell .app-frame:has(> .stage-nav) .stage-link {
    min-height: 3.4rem;
    gap: 0.1rem;
    padding: 0.3rem 0.05rem;
    font-size: 0.65rem;
  }

  #app .product-shell .app-frame:has(> .stage-nav) .stage-number {
    width: 1.35rem;
    height: 1.35rem;
    font-size: 0.62rem;
  }

  #app .product-shell .app-frame:has(> .stage-nav) .details-form-label {
    margin-block-start: 1.4rem;
  }

  #app .product-shell .app-frame:has(> .stage-nav) .details-moments ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #app .product-shell .app-frame:has(> .stage-nav) .details-moments li:nth-child(3) {
    border-inline-start: 0;
  }

  #app .product-shell .app-frame:has(> .stage-nav) .details-moments li:nth-child(n + 3) {
    border-block-start: 1px solid #d9c5cf;
  }

  #app .product-shell .app-frame:has(> .stage-nav) .details-moment {
    height: 100%;
    min-height: 4.75rem;
    padding: 0.65rem 0.7rem;
  }
}

/* Keep the memories helper and its live character status as two readable
   lines. The legacy negative margin caused them to overlap. */
#app .product-shell .app-frame:has(> .stage-nav) .details-moment-panel .character-progress {
  margin-block: 0.5rem 1.5rem;
  line-height: 1.45;
}

/* Present the selected lyrics as a page section rather than a nested card. */
#app .product-shell .app-frame:has(> .stage-nav) [data-current-lyric-version] {
  margin: 0;
  padding: 2.25rem 0;
  border: 0;
  border-block-end: 1px solid #ead5df;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: 0;
}

#app .product-shell .app-frame:has(> .stage-nav) [data-current-lyric-version] .lyrics-preview {
  max-height: 28rem;
  margin-block: 1.5rem 0;
  padding: 1.5rem 0;
  border: 0;
  border-block-start: 1px solid #ead5df;
  border-radius: 0;
  background: transparent;
  line-height: 1.6;
}

#app .product-shell .app-frame:has(> .stage-nav) [data-current-lyric-version] > .screen-actions {
  margin-block-start: 1.5rem;
  padding-block-start: 1.5rem;
  border-block-start: 1px solid #ead5df;
}

@media (max-width: 767.98px) {
  #app .product-shell .app-frame:has(> .stage-nav) [data-current-lyric-version] > .screen-actions .button {
    width: 100%;
  }
}

/* Disabled journey actions must never look like active pink primary actions. */
#app .product-shell .button:disabled,
#app .product-shell .button[aria-disabled="true"] {
  border-color: var(--line);
  background: #e9e8ec;
  color: #676272;
  box-shadow: none;
  opacity: 1;
  cursor: not-allowed;
  transform: none;
}

/* Keep each explanation grouped with its field and away from the next label. */
#app .product-shell .app-frame:has(> .stage-nav) [data-details-moment-panel="message"] > .field + .field {
  margin-block-start: 1.5rem;
}

/* Hosted dashboard compatibility.
   The test server still uses the earlier dashboard and topbar markup. Keep the
   HTML, copy and controls intact while giving it the approved V2 treatment. */
#app .product-shell .app-topbar__brand-mark {
  display: block !important;
  width: 9rem;
  height: 6.75rem;
  flex: 0 0 9rem;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: url("/assets/recipient-logo.png") center / 100% 100% no-repeat;
  color: transparent;
  font-size: 0;
  line-height: 0;
}

#app .product-shell .app-topbar {
  min-height: 7.25rem;
  padding-block: 0.5rem;
}

#app .product-shell .workspace-main.screen:has(> .overview-grid) {
  width: 100%;
  max-width: none;
}

#app .product-shell .workspace-main.screen:has(> .overview-grid) > .screen-header:not(.dashboard-welcome) {
  position: relative;
  display: block;
  min-height: 21rem;
  margin: 0;
  padding: clamp(2.5rem, 6vw, 4.5rem) min(24rem, 34vw) clamp(2.5rem, 6vw, 4.5rem) 0;
  overflow: hidden;
  border-block-end: 1px solid #ead7e0;
}

#app .product-shell .workspace-main.screen:has(> .overview-grid) > .screen-header:not(.dashboard-welcome)::before {
  position: absolute;
  z-index: 0;
  inset: 2rem 0 1.5rem auto;
  width: min(24rem, 34vw);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 220, 234, 0.82), rgba(255, 247, 250, 0) 70%);
  content: "";
}

#app .product-shell .workspace-main.screen:has(> .overview-grid) > .screen-header:not(.dashboard-welcome)::after {
  position: absolute;
  z-index: 1;
  inset: 1rem 0 1rem auto;
  width: min(23rem, 33vw);
  background: url("/assets/cards/musical/musical-variant-98.webp") center / contain no-repeat;
  filter: drop-shadow(0 12px 16px rgba(91, 42, 79, 0.11));
  content: "";
}

#app .product-shell .workspace-main.screen:has(> .overview-grid) > .screen-header:not(.dashboard-welcome) > * {
  position: relative;
  z-index: 2;
}

#app .product-shell .workspace-main.screen:has(> .overview-grid) > .screen-header h1 {
  margin-block-end: 0.85rem;
  font-size: clamp(2.15rem, 4vw, 3.2rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

#app .product-shell .workspace-main.screen:has(> .overview-grid) > .screen-header p:not(.screen-kicker) {
  max-width: 39rem;
  margin-block-end: 0;
  font-size: 1.05rem;
  line-height: 1.65;
}

#app .product-shell .workspace-main.screen:has(> .overview-grid) > .screen-header .screen-actions {
  justify-content: flex-start;
  margin-block-start: 1.5rem;
}

#app .product-shell .workspace-main.screen:has(> .overview-grid) > .overview-grid {
  display: block;
}

#app .product-shell .workspace-main.screen:has(> .overview-grid) .dashboard-section {
  margin-block-start: 1.75rem;
  padding: 1.75rem;
  border: 1px solid #eadbe2;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: none;
}

#app .product-shell .workspace-main.screen:has(> .overview-grid) .dashboard-section:first-child {
  border-block-start: 1px solid #eadbe2;
}

#app .product-shell .workspace-main.screen:has(> .overview-grid) .dashboard-section .section-heading {
  align-items: center;
  margin-block-end: 1.25rem;
}

#app .product-shell .workspace-main.screen:has(> .overview-grid) .dashboard-section .section-heading h2 {
  margin: 0 0 0.2rem;
  font-size: 1.15rem;
}

#app .product-shell .workspace-main.screen:has(> .overview-grid) .dashboard-section .order-list {
  border-block-start: 1px solid #ead7e0;
}

#app .product-shell .workspace-main.screen:has(> .overview-grid) :is(.order-card, .order-row) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border: 0;
  border-block-end: 1px solid #ead7e0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#app .product-shell .workspace-main.screen:has(> .overview-grid) .order-card__eyebrow {
  justify-content: flex-start;
}

#app .product-shell .workspace-main.screen:has(> .overview-grid) :is(.order-card, .order-row) h3 {
  margin: 0.35rem 0 0.75rem;
  font-size: 1.25rem;
}

#app .product-shell .workspace-main.screen:has(> .overview-grid) .meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  font-size: 0.9rem;
  line-height: 1.55;
}

#app .product-shell .workspace-main.screen:has(> .overview-grid) .order-card__actions {
  display: flex;
  width: min(100%, 23rem);
  min-width: 12rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
}

#app .product-shell .workspace-main.screen:has(> .overview-grid) .order-card__actions > .button {
  min-width: 10.5rem;
  flex: 1 1 10.5rem;
}

#app .product-shell .workspace-main.screen:has(> .overview-grid) [data-dashboard-section="ready"] .order-card__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#app .product-shell .workspace-main.screen:has(> .overview-grid) [data-dashboard-section="ready"] .order-card__actions > :nth-child(3) {
  grid-column: 1 / -1;
}

#app .product-shell .workspace-main.screen:has(> .overview-grid) .empty-state {
  min-height: 5rem;
  padding: 1.25rem 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
}

@media (max-width: 767.98px) {
  #app .product-shell .app-topbar__brand-mark {
    width: 7rem;
    height: 5.25rem;
    flex-basis: 7rem;
  }

  #app .product-shell .app-topbar {
    min-height: 5.875rem;
  }

  #app .product-shell .app-topbar__brand {
    gap: 0.75rem;
  }

  #app .product-shell .app-topbar__title {
    display: block;
    max-width: 12ch;
    padding-inline-start: 0.75rem;
    font-size: 0.85rem;
  }

  #app .product-shell .workspace-main.screen:has(> .overview-grid) > .screen-header:not(.dashboard-welcome) {
    min-height: 0;
    padding: 2rem 0 2.5rem;
  }

  #app .product-shell .workspace-main.screen:has(> .overview-grid) > .screen-header:not(.dashboard-welcome)::before,
  #app .product-shell .workspace-main.screen:has(> .overview-grid) > .screen-header:not(.dashboard-welcome)::after {
    display: none;
  }

  #app .product-shell .workspace-main.screen:has(> .overview-grid) > .screen-header h1 {
    font-size: 2rem;
  }

  #app .product-shell .workspace-main.screen:has(> .overview-grid) .dashboard-section {
    margin-block-start: 1.25rem;
    padding: 1.25rem 1rem;
  }

  #app .product-shell .workspace-main.screen:has(> .overview-grid) :is(.order-card, .order-row) {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    padding: 1.25rem 0;
  }

  #app .product-shell .workspace-main.screen:has(> .overview-grid) .meta-list {
    display: grid;
    gap: 0.3rem;
  }

  #app .product-shell .workspace-main.screen:has(> .overview-grid) .order-card__actions,
  #app .product-shell .workspace-main.screen:has(> .overview-grid) [data-dashboard-section="ready"] .order-card__actions {
    display: grid;
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
  }

  #app .product-shell .workspace-main.screen:has(> .overview-grid) [data-dashboard-section="ready"] .order-card__actions > :nth-child(3) {
    grid-column: auto;
  }

  #app .product-shell .workspace-main.screen:has(> .overview-grid) .order-card__actions > .button {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 479.98px) {
  #app .product-shell .app-topbar__title {
    display: none;
  }
}

/* Keepsake Cassette: product photo on the homepage price card and postage note beside prices */
.public-shell .v2-price-card__media { margin: 1rem 0 0.25rem; border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 11; background: #eee; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08); }
.public-shell .v2-price-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 68% 50%; }
.price-postage { display: block; margin-top: 0.2rem; font-size: 0.8rem; font-weight: 600; letter-spacing: 0; opacity: 0.75; }

/* Limited-offer Keepsake Cassette: wide card above the other two tiers */
.public-shell .v2-offer-card { display: grid; max-width: 940px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); margin: 0 auto 1.75rem; overflow: hidden; border: 2px solid rgba(212, 20, 90, 0.35); border-radius: 22px; background: linear-gradient(135deg, #fff 0%, #fff4f8 100%); box-shadow: 0 18px 50px rgba(212, 20, 90, 0.14); }
.public-shell .v2-offer-card__media { margin: 0; min-height: 100%; background: #eee; }
.public-shell .v2-offer-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 68% 50%; }
.public-shell .v2-offer-card__body { display: flex; flex-direction: column; align-items: flex-start; padding: 2rem 2rem 1.75rem; }
.v2-offer-card__badge { margin-block-end: 0.9rem; padding: 0.3rem 0.9rem; border-radius: 999px; background: #d4145a; color: #fff; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.v2-offer-card__price { margin: 0 0 0.5rem; color: #3d3553; font-size: 2.45rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.v2-offer-card__price .price-postage { letter-spacing: 0; color: #5a5070; }
.v2-offer-card__description { margin: 0 0 0.6rem; color: #6f6888; font-size: 0.85rem; line-height: 1.5; }
.v2-offer-card__note { margin: 0 0 1rem; color: #d4145a; font-size: 0.8rem; font-weight: 700; }
.public-shell .v2-offer-card .history-list { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; margin: 0 0 1.4rem; padding: 0; list-style: none; }
.public-shell .v2-offer-card .history-item { position: relative; padding: 0.32rem 0 0.32rem 2rem; border: 0; color: #5a5070; font-size: 0.8rem; line-height: 1.4; }
.public-shell .v2-offer-card .history-item::before { position: absolute; inset: 0.3rem auto auto 0; display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: #fff0f5; color: #d4145a; content: "\2713"; font-size: 0.68rem; }
.public-shell .v2-offer-card__button { min-height: 46px; margin-block-start: auto; padding-inline: 2rem; border: 0; border-radius: 999px; background: #d4145a; box-shadow: 0 6px 20px rgba(212, 20, 90, 0.35); color: #fff; font-weight: 600; text-decoration: none; }
.v2-price-grid--pair { max-width: 940px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 767px) {
  .public-shell .v2-offer-card { grid-template-columns: 1fr; }
  .public-shell .v2-offer-card__media { aspect-ratio: 16 / 10; min-height: 0; }
  .public-shell .v2-offer-card__body { padding: 1.5rem 1.35rem; }
  .public-shell .v2-offer-card .history-list { grid-template-columns: 1fr; }
  .public-shell .v2-offer-card__button { width: 100%; justify-content: center; }
  .v2-price-grid--pair { grid-template-columns: 1fr; }
}
.public-shell .v2-price-grid--pair .v2-price-card--featured { transform: none; }
.public-shell .v2-price-grid--pair .v2-price-card--featured:hover { transform: translateY(-4px); }
/* Limited offer badge sits on the top edge, centred, like "Most popular" */
.public-shell .v2-offer-card { position: relative; overflow: visible; }
.public-shell .v2-offer-card__media { overflow: hidden; border-radius: 20px 0 0 20px; }
.v2-offer-card__badge { position: absolute; z-index: 2; inset: -12px auto auto 50%; margin: 0; padding: 0.25rem 0.9rem; transform: translateX(-50%); white-space: nowrap; }
@media (max-width: 767px) {
  .public-shell .v2-offer-card__media { border-radius: 20px 20px 0 0; }
}
/* Bigger "Limited offer" badge */
.v2-offer-card__badge { inset: -18px auto auto 50%; padding: 0.5rem 1.5rem; font-size: 0.9rem; letter-spacing: 0.1em; box-shadow: 0 6px 18px rgba(212, 20, 90, 0.35); }
