@font-face {
  font-family: "Journey Script";
  src: url("/assets/fonts/pinyon-script-latin-400.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@media (max-width: 640px) {
  .moving-choice-grid,
  .moving-setting-grid {
    grid-template-columns: 1fr;
  }

  .moving-photo-item {
    grid-template-columns: 25px 58px minmax(0, 1fr) auto;
  }

  .moving-photo-item img,
  .moving-photo-item .photo-preview-fallback {
    width: 58px;
    height: 50px;
    min-height: 50px;
  }

  .moving-preview-player {
    grid-template-columns: 34px 34px minmax(0, 1fr) 34px;
  }

  .moving-preview-player > button {
    width: 34px;
    height: 34px;
  }
}

@font-face {
  font-family: "Journey Typewriter";
  src: url("/assets/fonts/cutive-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Great Vibes";
  src: url("/assets/fonts/great-vibes-latin-400.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/source-serif-4-latin-400.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("/assets/fonts/cormorant-garamond-latin-italic-400.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light;
  --font-system: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-script: "Journey Script", "Snell Roundhand", "Bradley Hand", "Segoe Print", cursive;
  --font-typewriter: "Journey Typewriter", "American Typewriter", "Courier New", Georgia, serif;
  --font-great-vibes: "Great Vibes", "Journey Script", "Snell Roundhand", cursive;
  --font-source-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-cormorant: "Cormorant Garamond", "Cormorant Garamond Italic", Georgia, serif;
  /* Archive Green: warm paper, green-charcoal type, sage support, terracotta warmth. */
  --ink: #28332e;
  --muted: #716b61;
  --paper: #e4d9c8;
  --paper-deep: #d5c9b8;
  --app-background: #f7f5ef;
  --navigation-background: #fffdf8;
  --panel: #fffdf8;
  --line: #d5c9b8;
  --green: #203d36;
  --green-soft: #e8efeb;
  --danger: #9b433d;
  --archive-green: #294b40;
  --clay: #6f9484;
  --blue: #587b78;
  --plum: #7c6b70;
  --ochre: #c78968;
  --surface: rgba(255, 253, 248, 0.84);
  --surface-strong: rgba(255, 253, 248, 0.96);
  --surface-subtle: rgba(255, 255, 255, 0.42);
  --surface-control: rgba(255, 253, 248, 0.58);
  --surface-control-hover: rgba(255, 253, 248, 0.88);
  --surface-selected: rgba(111, 148, 132, 0.14);
  --surface-selected-border: rgba(32, 61, 54, 0.42);
  --surface-navigation-selected: var(--surface-selected);
  --surface-navigation-selected-border: var(--surface-selected-border);
  --surface-border: rgba(113, 107, 97, 0.13);
  --surface-border-strong: rgba(113, 107, 97, 0.22);
  --surface-radius: 8px;
  --shadow-active: 0 6px 16px rgba(40, 51, 46, 0.08);
  --shadow-overlay: 0 16px 40px rgba(40, 51, 46, 0.14);
  --shadow: 0 12px 32px rgba(40, 51, 46, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--app-background);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--app-background);
  color: var(--ink);
  font-family: var(--font-system);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.app-shell {
  min-height: 100vh;
  background: var(--app-background);
}

.is-auth-returning body::before,
.is-creator-auth-returning body::before,
.is-checkout-returning body::before,
.is-section-returning body::before {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: var(--app-background);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.is-auth-returning body::before {
  content: "Signing in ...";
}

.is-creator-auth-returning body::before {
  content: "Opening your memory…";
}

.is-checkout-returning body::before {
  content: "Redirecting to your memory ...";
}

.is-section-returning body::before {
  content: "Opening Gift history ...";
}

.is-auth-returning .app-shell,
.is-creator-auth-returning .app-shell,
.is-checkout-returning .app-shell,
.is-section-returning .app-shell {
  opacity: 0;
}

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

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.is-hidden,
[hidden] {
  display: none !important;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 62px;
  padding: 9px clamp(16px, 4vw, 44px);
  background: var(--navigation-background);
  border-bottom: 1px solid rgba(32, 61, 54, 0.1);
  backdrop-filter: blur(20px) saturate(1.05);
}

.topbar-left {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.menu-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  box-shadow: none;
}

.menu-button:hover,
.menu-button:focus-visible {
  background: rgba(32, 61, 54, 0.065);
  border-color: rgba(32, 61, 54, 0.08);
}

.menu-lines {
  display: grid;
  gap: 5px;
}

.menu-lines span {
  display: block;
  width: 17px;
  height: 2px;
  background: var(--ink);
  border-radius: 999px;
  transition: transform 160ms ease, width 160ms ease;
}

.menu-lines span:nth-child(2) {
  width: 14px;
}

.menu-button[aria-expanded="true"] .menu-lines span:first-child {
  transform: translateY(3.4px) rotate(45deg);
}

.menu-button[aria-expanded="true"] .menu-lines span:nth-child(2) {
  width: 17px;
  transform: translateY(-3.4px) rotate(-45deg);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  overflow: visible;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  background: var(--green);
  color: #fbf8f0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9px;
  box-shadow: none;
  font-family: var(--font-great-vibes);
  font-size: 24px;
  font-style: normal;
  font-weight: 400;
  line-height: 1;
  padding: 0;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  color: var(--green);
  font-family: var(--font-system);
  font-size: 19px;
  font-style: normal;
  font-weight: 690;
  line-height: 1;
  overflow: visible;
}

.brand-title-full,
.brand-title-short,
.gift-reveal-brand strong {
  align-items: baseline;
  overflow: visible;
}

.brand-title-full {
  display: inline-flex;
}

.brand-script-initial {
  margin-right: 1px;
  font-family: var(--font-great-vibes);
  font-size: 29px;
  font-style: normal;
  font-weight: 400;
  line-height: 0.8;
  -webkit-text-stroke: 0.34px currentColor;
}

.brand-script-initial + span {
  font-family: var(--font-source-serif);
  font-style: italic;
  font-weight: 500;
  -webkit-text-stroke: 0;
}

.brand-title-short {
  display: none;
}

.brand small,
.eyebrow {
  color: var(--muted);
  font-size: 12px;
}

.brand small {
  margin-top: 3px;
  color: #77766f;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
}

.profile-area {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  position: relative;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.new-memory-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  padding: 3px 10px 3px 5px;
  color: var(--green);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  box-shadow: none;
  font-weight: 800;
}

.new-memory-button:hover {
  background: rgba(32, 61, 54, 0.07);
  box-shadow: none;
}

.new-memory-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--green);
  background: transparent;
  border-radius: 8px;
}

.new-memory-icon svg,
.new-memory-sheet-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.new-memory-overlay {
  position: fixed;
  inset: 0;
  z-index: 75;
  display: grid;
  justify-items: end;
  align-items: start;
  padding: 76px clamp(16px, 4vw, 44px) 24px;
  background: rgba(40, 51, 46, 0.1);
  backdrop-filter: blur(2px);
}

.gift-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow: hidden;
  background: var(--app-background);
}

.gift-preview-overlay[hidden] {
  display: none;
}

.gift-preview-overlay iframe {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--app-background);
  border: 0;
}

.gift-preview-close.profile-close {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top));
  right: calc(12px + env(safe-area-inset-right));
  z-index: 2;
  width: 36px;
  height: 36px;
  background: transparent;
  border-color: rgba(40, 51, 46, 0.1);
}

body.is-gift-preview-open {
  overflow: hidden;
}

.finished-memory-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 101;
  overflow: auto;
  padding: calc(24px + env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  background:
    radial-gradient(circle at 88% 8%, rgba(189, 213, 202, 0.34), transparent 34%),
    var(--app-background);
}

.finished-memory-preview-overlay[hidden] {
  display: none;
}

.finished-memory-preview-panel {
  display: grid;
  width: min(980px, 100%);
  min-height: calc(100dvh - 48px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 18px;
  margin: 0 auto;
}

.finished-memory-preview-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}

.finished-memory-preview-head h2 {
  margin: 4px 0 0;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.finished-memory-preview-stage {
  display: grid;
  min-height: 260px;
  place-items: center;
  overflow: hidden;
  padding: clamp(10px, 2vw, 20px);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(40, 51, 46, 0.12);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(40, 51, 46, 0.12);
}

.finished-memory-preview-stage :is(img, video) {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100dvh - 210px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  border-radius: 12px;
  object-fit: contain;
}

.finished-memory-preview-stage iframe {
  width: 100%;
  height: min(72dvh, 820px);
  background: #ffffff;
  border: 0;
  border-radius: 12px;
}

.finished-memory-preview-stage [hidden] {
  display: none;
}

.finished-memory-preview-unavailable {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  text-align: center;
}

.finished-memory-download {
  width: min(360px, 100%);
  min-height: 52px;
  justify-self: center;
  text-decoration: none;
}

body.is-finished-memory-preview-open {
  overflow: hidden;
}

@media (max-width: 600px) {
  .finished-memory-preview-overlay {
    padding: calc(16px + env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  }

  .finished-memory-preview-panel {
    min-height: calc(100dvh - 34px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    gap: 12px;
  }

  .finished-memory-preview-stage {
    padding: 8px;
    border-radius: 16px;
  }

  .finished-memory-preview-stage :is(img, video) {
    max-height: calc(100dvh - 184px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    border-radius: 10px;
  }
}

.new-memory-sheet {
  display: grid;
  width: min(360px, 100%);
  gap: 14px;
  padding: 14px;
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  border-radius: var(--surface-radius);
  box-shadow: var(--shadow-overlay);
  backdrop-filter: blur(18px) saturate(1.14);
}

.new-memory-sheet-head {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.new-memory-sheet-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--green);
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(32, 61, 54, 0.18);
  border-radius: 8px;
}

.new-memory-sheet strong,
.new-memory-sheet small {
  display: block;
}

.new-memory-sheet strong {
  font-size: 16px;
}

.new-memory-sheet small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.new-memory-sheet-actions {
  display: grid;
  gap: 8px;
}

.side-panel-backdrop {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(40, 51, 46, 0.28);
  opacity: 0;
  transition: opacity 180ms ease;
}

.side-panel-backdrop.is-open {
  opacity: 1;
}

.side-panel {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  display: flex;
  width: min(390px, calc(100vw - 24px));
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  overflow: auto;
  background: rgba(251, 248, 240, 0.78);
  border-right: 1px solid var(--surface-border-strong);
  box-shadow: var(--shadow-overlay);
  backdrop-filter: blur(22px) saturate(1.12);
  transform: translateX(-104%);
  transition: transform 190ms ease;
}

.side-panel.is-open {
  transform: translateX(0);
}

.analysis-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(40, 51, 46, 0.18);
  backdrop-filter: blur(3px) saturate(1.02);
}

.analysis-overlay-panel {
  display: grid;
  width: min(460px, 100%);
  justify-items: center;
  gap: 9px;
  padding: 24px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--surface-radius);
  box-shadow: var(--shadow-overlay);
  backdrop-filter: blur(20px) saturate(1.18);
}

.analysis-overlay-panel .eyebrow {
  margin: 4px 0 0;
}

.analysis-overlay-panel strong {
  max-width: 340px;
  font-size: 20px;
  line-height: 1.2;
}

.analysis-overlay-panel small {
  max-width: 330px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.analysis-overlay-spinner {
  width: 46px;
  height: 46px;
  border: 4px solid rgba(88, 123, 120, 0.18);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 780ms linear infinite;
}

.draft-load-panel {
  gap: 10px;
}

.draft-load-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  color: #fbf8f0;
  background: rgba(32, 61, 54, 0.9);
  border-radius: 8px;
  box-shadow:
    0 10px 24px rgba(32, 61, 54, 0.14),
    0 0 0 7px rgba(251, 248, 240, 0.44);
  animation: draft-load-float 960ms ease-in-out infinite;
}

.draft-load-mark svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

@keyframes draft-load-float {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }

  50% {
    transform: translateY(-3px) rotate(1deg);
  }
}

.analysis-progress {
  width: min(320px, 100%);
  height: 8px;
  overflow: hidden;
  background: rgba(88, 123, 120, 0.12);
  border-radius: 999px;
}

.analysis-progress span {
  display: block;
  width: 8%;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--green));
  border-radius: inherit;
  transition: width 220ms ease;
}

.analysis-feed {
  display: grid;
  width: 100%;
  gap: 6px;
  margin-top: 4px;
}

.analysis-feed span {
  padding: 7px 9px;
  color: #3c3328;
  background: rgba(231, 218, 195, 0.54);
  border: 1px solid rgba(113, 107, 97, 0.18);
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.35;
}

.export-progress-feed span {
  text-align: left;
}

.credit-overlay-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: min(320px, 100%);
  margin-top: 8px;
}

.credit-overlay-actions button {
  justify-content: center;
}

.delete-confirm-panel {
  width: min(420px, 100%);
  gap: 10px;
}

.delete-confirm-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  color: #8f3f45;
  background: rgba(143, 63, 69, 0.1);
  border: 1px solid rgba(143, 63, 69, 0.16);
  border-radius: 50%;
}

.delete-confirm-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.delete-confirm-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: min(320px, 100%);
  margin-top: 8px;
}

.delete-confirm-actions button {
  justify-content: center;
}

.print-cancel-icon {
  color: var(--green);
  background: rgba(32, 61, 54, 0.08);
  border-color: rgba(32, 61, 54, 0.14);
}

.print-cancel-refund {
  display: flex;
  width: min(320px, 100%);
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 6px;
  padding: 12px 14px;
  color: var(--muted);
  text-align: left;
  background: var(--surface-subtle);
  border: 1px solid var(--surface-border);
  border-radius: 6px;
  font-size: 12px;
}

.print-cancel-refund strong {
  color: var(--ink);
  font-family: var(--font-source-serif);
  font-size: 20px;
  font-weight: 600;
  white-space: nowrap;
}

.side-panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.side-panel-head strong,
.side-panel-head small {
  display: block;
}

.side-panel-head small,
.profile-status,
.profile-empty,
.memory-meta,
.history-section-head small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.profile-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 4px 8px 4px 4px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 8px;
  box-shadow: none;
  font-size: 13px;
  font-weight: 800;
}

.profile-button:hover {
  background: rgba(32, 61, 54, 0.07);
  box-shadow: none;
}

.credit-pill {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 4px 7px;
  color: var(--green);
  background: transparent;
  border: 0;
  border-radius: 8px;
  box-shadow: none;
  font-size: 13px;
  font-weight: 800;
}

.credit-pill:hover {
  background: rgba(32, 61, 54, 0.07);
}

.credit-pill-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
}

.credit-pill-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.85;
}

.profile-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  overflow: hidden;
  background: rgba(251, 248, 240, 0.72);
  color: var(--green);
  border: 1px solid rgba(32, 61, 54, 0.24);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.profile-avatar svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.profile-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  width: min(360px, calc(100vw - 28px));
  padding: 14px;
  background: rgba(251, 248, 240, 0.98);
  border: 1px solid var(--surface-border-strong);
  border-radius: var(--surface-radius);
  box-shadow: var(--shadow-overlay);
}

.profile-panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.profile-panel-head strong,
.profile-panel-head small {
  display: block;
}

.profile-panel-head small,
.profile-status,
.profile-empty,
.memory-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.profile-close {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  color: #5e4f3f;
  background: rgba(231, 218, 195, 0.62);
  border-radius: 50%;
}

.profile-status {
  margin: 10px 0 12px;
}

.google-signin,
#signOutButton {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.profile-memory-section {
  display: grid;
  gap: 9px;
  padding-top: 12px;
  border-top: 1px solid rgba(113, 107, 97, 0.18);
}

.side-menu {
  display: grid;
  gap: 7px;
}

.history-tab {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 9px 12px 9px 8px;
  text-align: left;
  color: var(--ink);
  background: transparent;
  border-radius: 6px;
  font-weight: 800;
}

.history-tab.is-active {
  background: rgba(251, 248, 240, 0.72);
  box-shadow: inset 3px 0 0 rgba(32, 61, 54, 0.8);
}

.history-tab strong,
.history-tab small {
  display: block;
}

.history-tab small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.side-menu-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--green);
  background: transparent;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 900;
}

.side-menu-mark svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.85;
}

.history-tab.is-active .side-menu-mark {
  color: var(--green);
  background: transparent;
}

.side-menu-arrow {
  color: rgba(40, 51, 46, 0.42);
  font-size: 15px;
  font-weight: 900;
}

.history-section {
  display: grid;
  gap: 12px;
  padding-top: 2px;
}

.side-panel-actions {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.history-section-head strong,
.history-section-head small {
  display: block;
}

.profile-memory-list {
  display: grid;
  gap: 8px;
  max-height: none;
  overflow: auto;
}

.memory-product-filter {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 1px 4px;
  scrollbar-width: none;
}

.memory-product-filter[hidden] {
  display: none;
}

.memory-product-filter::-webkit-scrollbar {
  display: none;
}

.memory-product-filter-button {
  --memory-product-background: rgba(250, 250, 247, 0.86);
  --memory-product-border: rgba(40, 51, 46, 0.14);
  --memory-product-color: #62675f;
  display: inline-grid;
  grid-template-columns: minmax(0, auto) 22px;
  min-height: 36px;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 7px 9px 7px 12px;
  color: var(--memory-product-color);
  background: var(--memory-product-background);
  border: 1px solid var(--memory-product-border);
  border-radius: 999px;
  box-shadow: none;
  font-size: 12px;
  font-weight: 750;
}

.memory-product-filter-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.memory-product-filter-button small {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: inherit;
  background: rgba(32, 61, 54, 0.08);
  border-radius: 999px;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.memory-product-filter-button:hover,
.memory-product-filter-button:focus-visible {
  color: var(--green);
  background: #f4f5f1;
  border-color: rgba(32, 61, 54, 0.24);
}

.memory-product-filter-button.is-all.is-selected {
  color: var(--green);
  background: var(--surface-navigation-selected);
  border-color: var(--surface-navigation-selected-border);
}

.memory-product-filter-button.is-all.is-selected small {
  background: rgba(32, 61, 54, 0.08);
}

.memory-product-filter-button.is-single,
.memory-product-filter-button.is-moving,
.memory-product-filter-button.is-album,
.memory-product-filter-button.is-other {
  --memory-product-background: rgba(250, 250, 247, 0.86);
  --memory-product-border: rgba(40, 51, 46, 0.14);
  --memory-product-color: #62675f;
}

.memory-product-filter-button:not(.is-all).is-selected {
  color: var(--green);
  background: var(--surface-navigation-selected);
  border-color: var(--surface-navigation-selected-border);
  box-shadow: none;
}

.memory-product-icon {
  position: relative;
  display: inline-block;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  overflow: visible;
  color: currentColor;
}

.memory-product-icon.is-single {
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.memory-product-icon.is-single::before {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 3px;
  height: 3px;
  background: currentColor;
  border-radius: 50%;
  content: "";
}

.memory-product-icon.is-single::after {
  position: absolute;
  right: 2px;
  bottom: 2px;
  left: 2px;
  height: 5px;
  border-top: 1.5px solid currentColor;
  content: "";
  transform: skewY(-27deg);
}

.memory-product-icon.is-moving {
  background: currentColor;
  border-radius: 50%;
}

.memory-product-icon.is-moving::after {
  position: absolute;
  top: 3px;
  left: 5px;
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid #f7faf7;
  content: "";
}

.memory-product-icon.is-album::before,
.memory-product-icon.is-album::after {
  position: absolute;
  width: 9px;
  height: 11px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  content: "";
}

.memory-product-icon.is-album::before {
  top: 0;
  left: 0;
}

.memory-product-icon.is-album::after {
  right: 0;
  bottom: 0;
  background: var(--memory-product-background, var(--surface));
}

.memory-product-icon.is-other {
  width: 11px;
  height: 11px;
  margin: 1.5px;
  border: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.credit-card {
  display: grid;
  gap: 5px;
  padding: 14px;
  color: #fbf8f0;
  background:
    linear-gradient(135deg, rgba(88, 123, 120, 0.32), transparent 58%),
    var(--green);
  border: 1px solid rgba(251, 248, 240, 0.18);
  border-radius: var(--surface-radius);
  box-shadow: none;
}

.credit-card span,
.credit-card small {
  color: rgba(251, 248, 240, 0.76);
  font-size: 12px;
}

.credit-card strong {
  font-size: 28px;
  line-height: 1.05;
}

.side-credit-balance {
  color: var(--green);
  font-weight: 850;
}

.menu-page-screen {
  min-height: calc(100vh - 72px);
  padding: clamp(18px, 4vw, 52px);
  background: var(--app-background);
}

.menu-page-shell {
  display: grid;
  width: min(1040px, 100%);
  gap: 18px;
  margin: 0 auto;
}

.menu-page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(113, 107, 97, 0.18);
}

.menu-page-heading h1 {
  margin: 0;
  font-size: clamp(34px, 4.5vw, 56px);
  font-weight: 650;
  line-height: 1.05;
}

.menu-page-heading p:not(.eyebrow) {
  max-width: 560px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.menu-page-back-control {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.menu-page-back-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--green);
  background: rgba(251, 248, 240, 0.86);
  border: 1px solid rgba(32, 61, 54, 0.2);
  border-radius: 50%;
  box-shadow: none;
}

.menu-page-back-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.menu-page-panel {
  gap: 14px;
}

.menu-page-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.74fr) minmax(0, 1fr);
  gap: 14px;
}

.menu-page-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--surface-radius);
  box-shadow: none;
}

.menu-credit-card {
  min-height: 150px;
  align-content: center;
}

.account-profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--surface-subtle);
  border: 1px solid var(--surface-border);
  border-radius: var(--surface-radius);
}

.account-profile-card strong,
.account-profile-card small {
  display: block;
}

.account-profile-card small {
  margin-top: 3px;
  color: var(--muted);
}

.profile-page-card {
  width: min(760px, 100%);
  gap: 24px;
  padding: 22px;
}

.profile-page-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--surface-border);
}

.profile-page-intro .account-profile-card {
  min-width: min(340px, 100%);
  padding: 0;
  background: transparent;
  border: 0;
}

.profile-page-intro > p,
.profile-sign-in-prompt p {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.profile-details-form {
  display: grid;
  gap: 18px;
}

.profile-details-form[hidden],
.profile-sign-in-prompt[hidden] {
  display: none;
}

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

.profile-field {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 750;
}

.profile-field input {
  width: 100%;
  min-height: 48px;
}

.profile-field input[readonly] {
  color: var(--muted);
  background: var(--surface-subtle);
  cursor: default;
}

.profile-readonly-value {
  display: flex;
  min-height: 48px;
  align-items: center;
  overflow-wrap: anywhere;
  padding: 10px 13px;
  color: var(--muted);
  background: var(--surface-subtle);
  border: 1px solid var(--surface-border-strong);
  border-radius: var(--surface-radius);
  font-weight: 650;
  line-height: 1.35;
}

.profile-field small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

.profile-form-actions,
.profile-sign-in-prompt {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-form-status {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.profile-form-status[data-status="success"] {
  color: var(--green);
}

.profile-form-status[data-status="error"] {
  color: var(--danger);
}

.profile-sign-in-prompt {
  justify-content: space-between;
}

@media (max-width: 640px) {
  .profile-page-card {
    gap: 20px;
    padding: 18px;
  }

  .profile-page-intro,
  .profile-sign-in-prompt {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-field-grid {
    grid-template-columns: 1fr;
  }

  .profile-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-form-actions .primary-button,
  .profile-sign-in-prompt .secondary-button {
    width: 100%;
  }
}

.menu-page-screen.is-sign-in-page {
  position: relative;
  min-height: calc(100vh - 72px);
  overflow: hidden;
  isolation: isolate;
  scroll-margin-top: 82px;
  background: var(--app-background);
}

.menu-page-screen.is-sign-in-page .menu-page-shell {
  width: min(920px, 100%);
}

.menu-page-screen.is-sign-in-page .menu-page-heading {
  display: none;
}

.sign-in-layout {
  display: grid;
  width: min(760px, 100%);
  margin: 0 auto;
}

.sign-in-card {
  display: grid;
  min-height: 560px;
  overflow: hidden;
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  border-radius: var(--surface-radius);
  box-shadow: none;
  backdrop-filter: blur(18px);
}

.sign-in-card-body {
  display: grid;
  align-content: center;
  gap: 26px;
  width: min(520px, calc(100% - 40px));
  margin: 0 auto;
  padding: 56px 0 44px;
}

.menu-page-screen.is-creation-sign-in .sign-in-card-head {
  order: 1;
}

.menu-page-screen.is-creation-sign-in.has-social-sign-in .sign-in-option-list {
  order: 2;
}

.menu-page-screen.is-creation-sign-in.has-social-sign-in .sign-in-divider {
  order: 3;
}

.menu-page-screen.is-creation-sign-in.has-social-sign-in .email-auth-shell {
  order: 4;
}

.menu-page-screen.is-creation-sign-in.has-social-sign-in.is-email-auth-active .email-auth-shell {
  order: 2;
}

.menu-page-screen.is-creation-sign-in.has-social-sign-in.is-email-auth-active .sign-in-option-list {
  order: 4;
}

.sign-in-card-head {
  display: grid;
  gap: 8px;
}

.sign-in-card-head h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 44px);
  font-weight: 680;
  line-height: 1.08;
  letter-spacing: 0;
}

.sign-in-card-head p:not(.eyebrow) {
  max-width: 460px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.sign-in-option-list {
  display: grid;
  gap: 11px;
}

.sign-in-option-list[hidden],
.sign-in-divider[hidden],
.sign-in-provider[hidden] {
  display: none;
}

.email-auth-shell,
.email-auth-panel {
  display: grid;
  gap: 13px;
}

.email-auth-panel[hidden] {
  display: none;
}

.email-auth-username {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.email-auth-field {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.email-auth-field small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.email-auth-field input {
  width: 100%;
  min-height: 54px;
  padding: 0 15px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(84, 71, 55, 0.22);
  border-radius: 8px;
  box-shadow: none;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
}

.email-auth-field input:focus {
  border-color: rgba(32, 61, 54, 0.46);
  outline: 3px solid rgba(32, 61, 54, 0.12);
}

.email-auth-field input[aria-invalid="true"] {
  border-color: #9f4d45;
}

.email-auth-input-wrap {
  position: relative;
  display: block;
}

.email-auth-input-wrap input {
  padding-right: 70px;
}

.password-visibility-button {
  position: absolute;
  top: 50%;
  right: 14px;
  min-width: 42px;
  padding: 7px 0;
  color: var(--green);
  background: transparent;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 900;
  transform: translateY(-50%);
}

.password-visibility-button:focus-visible {
  outline: 3px solid rgba(32, 61, 54, 0.15);
  outline-offset: 1px;
}

.email-auth-submit {
  min-height: 48px;
  width: 100%;
  padding-top: 8px;
  padding-bottom: 8px;
}

.email-auth-submit.is-loading:disabled {
  cursor: wait;
  opacity: 0.86;
}

.email-auth-submit.is-loading::before {
  content: "";
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 9px;
  vertical-align: -2px;
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-top-color: #fff;
  border-radius: 50%;
  animation: email-auth-spin 700ms linear infinite;
}

@keyframes email-auth-spin {
  to { transform: rotate(360deg); }
}

.email-auth-status {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.email-auth-status[data-status="error"] {
  color: #873f38;
}

.email-auth-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.46);
  border: 1px solid rgba(84, 71, 55, 0.12);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.email-auth-selected span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.email-auth-selected button,
.email-auth-link {
  padding: 0;
  color: var(--green);
  background: transparent;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.email-auth-link {
  justify-self: center;
}

.sign-in-divider {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.sign-in-divider::before,
.sign-in-divider::after {
  content: "";
  height: 1px;
  background: rgba(84, 71, 55, 0.14);
}

.sign-in-provider {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 0 17px;
  text-align: left;
  text-decoration: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--surface-border-strong);
  border-radius: var(--surface-radius);
  box-shadow: none;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

#googleSignInOption {
  min-height: 54px;
}

.menu-page-screen.is-creation-sign-in #googleSignInOption {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(32, 61, 54, 0.3);
}

.menu-page-screen.is-creation-sign-in.has-social-sign-in [data-email-auth-panel="email"] .email-auth-submit {
  color: var(--green);
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid rgba(32, 61, 54, 0.28);
}

.menu-page-screen.is-creation-sign-in.has-social-sign-in [data-email-auth-panel="email"] .email-auth-submit:hover {
  background: rgba(255, 255, 255, 0.7);
}

.sign-in-provider-active:hover {
  transform: translateY(-1px);
  background: rgba(251, 248, 240, 0.9);
  border-color: rgba(32, 61, 54, 0.3);
  box-shadow: none;
}

.sign-in-provider strong,
.sign-in-provider small {
  display: block;
}

.sign-in-provider small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.sign-in-provider.is-disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.sign-in-provider.is-loading {
  pointer-events: none;
  opacity: 0.72;
}

.provider-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 7px;
  font-size: 15px;
  font-weight: 950;
}

.provider-mark svg {
  width: 20px;
  height: 20px;
}

.provider-google {
  color: #4285f4;
  background: #fff;
  border: 1px solid rgba(66, 133, 244, 0.22);
}

.provider-facebook {
  color: #fff;
  background: #1877f2;
}

.provider-apple {
  color: #fff;
  background: #111;
}

.provider-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.sign-in-card-foot {
  display: grid;
  min-height: 76px;
  place-items: center;
  padding: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.42);
  border-top: 1px solid rgba(84, 71, 55, 0.1);
  font-size: 14px;
  font-weight: 750;
  text-align: center;
}

.sign-in-card-foot button {
  padding: 0;
  color: var(--green);
  background: transparent;
  font-weight: 900;
}

.account-page-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

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

.credit-pack-button {
  min-height: 46px;
  color: var(--ink);
  background: #fbf8f0;
  border: 1px solid var(--surface-border);
  border-radius: var(--surface-radius);
  box-shadow: none;
  font-weight: 900;
}

.discount-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.discount-code-row input {
  min-width: 0;
}

.credit-rates,
.credit-ledger-list,
.payment-history-list {
  display: grid;
  gap: 8px;
}

.admin-rule-metrics,
.admin-analytics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.admin-rule-metrics span,
.admin-analytics-grid span,
.admin-compact-list span,
.admin-rule-card {
  display: grid;
  gap: 7px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.46);
  border: 1px solid rgba(113, 107, 97, 0.18);
  border-radius: 8px;
}

.admin-rule-metrics strong,
.admin-analytics-grid strong {
  display: block;
  color: var(--green);
  font-size: 20px;
}

.admin-analytics-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.admin-analytics-split > div {
  min-width: 0;
}

.admin-analytics-split > div,
.admin-compact-list,
.admin-rule-list,
.admin-evidence-list,
.admin-preview-grid {
  display: grid;
  gap: 10px;
}

.admin-compact-list span {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: start;
  column-gap: 12px;
  min-width: 0;
}

.admin-compact-list strong,
.admin-compact-list small {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.admin-compact-list small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.admin-preview-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.admin-preview-form input {
  min-height: 42px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(113, 107, 97, 0.24);
  border-radius: 8px;
}

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

.admin-preview-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.46);
  border: 1px solid rgba(113, 107, 97, 0.18);
  border-radius: 8px;
}

.admin-preview-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.admin-rule-card.is-approved {
  background: rgba(241, 247, 236, 0.58);
}

.admin-rule-head,
.admin-rule-meta,
.admin-rule-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.admin-rule-head {
  justify-content: space-between;
}

.admin-rule-head span,
.admin-rule-meta span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.admin-rule-head small {
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
}

.admin-rule-card strong {
  line-height: 1.35;
}

.admin-rule-explainer {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.admin-evidence-list span {
  gap: 4px;
  padding: 9px;
  background: rgba(251, 248, 240, 0.62);
  border: 1px solid rgba(113, 107, 97, 0.14);
  border-radius: 8px;
}

.admin-evidence-list small,
.admin-evidence-list em {
  display: block;
}

.admin-evidence-list small {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.admin-evidence-list em {
  color: var(--ink);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.admin-rule-actions {
  padding-top: 3px;
}

.admin-rule-actions button {
  min-height: 36px;
}

.admin-referral-access-form {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.admin-referral-access-form > label {
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 680;
}

.admin-referral-access-form > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.admin-referral-access-list {
  display: grid;
  margin-top: 14px;
  border-top: 1px solid rgba(40, 51, 46, 0.1);
}

.admin-referral-access-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(40, 51, 46, 0.1);
}

.admin-referral-access-row strong,
.admin-referral-access-row small {
  display: block;
}

.admin-referral-access-row strong {
  color: var(--ink);
  font-size: 13px;
}

.admin-referral-access-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.admin-referral-access-row.is-revoked {
  opacity: 0.72;
}

.admin-referral-access-state {
  color: var(--green);
  font-size: 11px;
  font-weight: 680;
}

@media (max-width: 560px) {
  .admin-referral-access-form > div {
    grid-template-columns: 1fr;
  }

  .admin-referral-access-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .admin-referral-access-row > button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

.credit-rates span,
.credit-ledger-item,
.payment-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.46);
  border: 1px solid rgba(113, 107, 97, 0.16);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.35;
}

.credit-rates strong,
.credit-ledger-item strong,
.payment-history-item strong {
  color: var(--ink);
}

.credit-ledger-item.is-credit strong {
  color: var(--green);
}

.credit-ledger-item.is-debit strong {
  color: var(--plum);
}

.payment-history-item small {
  color: var(--muted);
}

.payment-history-item.is-refunded strong {
  color: var(--plum);
}

.memory-card {
  display: grid;
  gap: 6px;
  padding: 10px;
  text-align: left;
  color: var(--ink);
  background: var(--surface-subtle);
  border: 1px solid var(--surface-border);
  border-radius: var(--surface-radius);
}

.memory-card .memory-product-badge {
  --memory-product-background: #f4f5f1;
  --memory-product-border: rgba(40, 51, 46, 0.14);
  --memory-product-accent: var(--green);
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  color: var(--memory-product-accent);
  background: var(--memory-product-background);
  border: 1px solid var(--memory-product-border);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.015em;
}

.memory-card .memory-meta > .memory-product-badge {
  margin-bottom: 5px;
}

.memory-card .memory-product-badge.is-single,
.memory-card .memory-product-badge.is-moving,
.memory-card .memory-product-badge.is-album,
.memory-card .memory-product-badge.is-other {
  --memory-product-background: #f4f5f1;
  --memory-product-border: rgba(40, 51, 46, 0.14);
  --memory-product-accent: var(--green);
}

.memory-card .memory-product-icon,
.memory-card .memory-product-badge > span {
  display: inline-block;
}

.memory-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.memory-card-main {
  display: grid;
  min-width: 0;
  gap: 6px;
  padding: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 0;
}

button.memory-card-main {
  cursor: pointer;
}

.memory-delete-button {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  color: #5b6660;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(86, 95, 89, 0.18);
  border-radius: 50%;
  box-shadow: none;
}

.memory-delete-button:hover,
.memory-delete-button:focus-visible {
  color: #ffffff;
  background: #8f3f45;
  border-color: rgba(143, 63, 69, 0.3);
}

.memory-delete-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.memory-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.export-card {
  background: rgba(251, 248, 240, 0.74);
}

.gift-history-card {
  background: rgba(251, 248, 240, 0.78);
}

@media (min-width: 760px) {
  .gift-history-card {
    grid-template-areas:
      "media body"
      "media actions";
    grid-template-columns: minmax(160px, 210px) minmax(0, 1fr);
    align-items: start;
    gap: 10px 14px;
    padding: 12px;
  }

  .gift-history-card .gift-history-layout {
    display: contents;
  }

  .gift-history-card .gift-history-thumb {
    grid-area: media;
    width: 100%;
    height: auto;
    aspect-ratio: 5 / 7;
  }

  .gift-history-card .memory-card-main {
    grid-area: body;
  }

  .gift-history-card .gift-card-actions {
    grid-area: actions;
    align-self: end;
    justify-self: end;
  }
}

@media (min-width: 1180px) {
  .gift-occasion-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.gift-history-organized {
  display: grid;
  gap: 12px;
}

.gift-history-picker {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 2px 2px 6px;
  scrollbar-width: thin;
}

.gift-recipient-chip {
  display: inline-grid;
  min-width: 96px;
  max-width: min(220px, 62vw);
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  flex: 0 0 auto;
  padding: 8px 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid var(--surface-border);
  border-radius: 999px;
  box-shadow: none;
}

.gift-recipient-chip.is-active {
  color: var(--green);
  background: var(--surface-selected);
  border-color: var(--surface-selected-border);
}

.gift-recipient-chip span {
  overflow: visible;
  line-height: 1.12;
  overflow-wrap: anywhere;
  white-space: normal;
}

.gift-recipient-chip strong {
  display: inline-flex;
  min-width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  color: inherit;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.gift-people-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.gift-summary-stat {
  display: grid;
  gap: 3px;
  min-width: 0;
  align-content: start;
  padding: 9px 7px;
  background: rgba(255, 255, 255, 0.46);
  border: 1px solid rgba(113, 107, 97, 0.16);
  border-radius: 8px;
}

.gift-summary-stat strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gift-summary-stat span {
  display: block;
  overflow: visible;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-transform: uppercase;
  white-space: normal;
}

.gift-history-summary {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.gift-occasion-groups,
.gift-occasion-group,
.gift-occasion-list {
  display: grid;
  gap: 10px;
}

.gift-occasion-group {
  padding-top: 2px;
}

.gift-occasion-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 2px 0;
}

.gift-occasion-head strong {
  color: var(--ink);
  font-size: 14px;
}

.gift-occasion-head small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.gift-history-layout {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.gift-history-thumb {
  display: block;
  width: 72px;
  height: 92px;
  overflow: hidden;
  background: rgba(228, 217, 200, 0.85);
  border: 1px solid rgba(113, 107, 97, 0.2);
  border-radius: 8px;
}

.gift-history-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gift-card-meta-strip,
.gift-card-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.gift-card-meta-strip {
  margin-top: 2px;
}

.memory-card .gift-card-meta-strip span {
  display: inline-flex;
  max-width: 100%;
  min-height: 28px;
  align-items: center;
  padding: 5px 8px;
  color: var(--green);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(32, 61, 54, 0.14);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.gift-card-stat-row {
  margin-top: 2px;
}

.memory-card .gift-card-stat {
  display: grid;
  flex: 1 1 92px;
  min-width: 0;
  gap: 1px;
  padding: 7px 8px;
  overflow: visible;
  background: rgba(255, 255, 255, 0.36);
  border: 1px solid rgba(113, 107, 97, 0.12);
  border-radius: 8px;
  white-space: normal;
}

.gift-card-stat small,
.gift-card-stat em {
  display: block;
  min-width: 0;
  overflow: visible;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-transform: uppercase;
  white-space: normal;
}

.gift-card-stat em {
  color: rgba(116, 107, 95, 0.86);
  font-size: 10px;
  font-weight: 750;
  text-transform: none;
}

.gift-card-stat strong {
  display: block;
  min-width: 0;
  overflow: visible;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
  overflow-wrap: anywhere;
  white-space: normal;
}

.export-download-link {
  display: inline-flex;
  flex: 1 1 auto;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  padding: 8px 10px;
  font-size: 13px;
}

.memory-card strong,
.memory-card span {
  display: block;
}

.memory-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.memory-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.eyebrow {
  margin: 0 0 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  min-height: 42px;
  border-radius: var(--surface-radius);
  padding: 10px 15px;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.primary-button {
  background: var(--green);
  color: #fbf8f0;
  border: 1px solid rgba(32, 61, 54, 0.24);
  box-shadow: none;
}

.secondary-button {
  background: var(--surface-strong);
  color: var(--green);
  border: 1px solid rgba(32, 61, 54, 0.36);
  box-shadow: none;
  font-weight: 800;
}

.ghost-button {
  background: var(--surface);
  color: #3a3228;
  border: 1px solid var(--surface-border-strong);
}

.danger-button {
  background: #8f3f45;
  color: #fbf8f0;
  border: 1px solid rgba(143, 63, 69, 0.35);
  box-shadow: none;
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.danger-button:hover {
  transform: translateY(-1px);
}

.secondary-button:hover {
  background: rgba(251, 248, 240, 0.96);
  border-color: rgba(32, 61, 54, 0.52);
  box-shadow: none;
}

.intro-screen {
  display: grid;
  grid-template-areas: "copy preview";
  grid-template-columns: minmax(420px, 0.96fr) minmax(360px, 0.74fr);
  align-items: center;
  justify-content: center;
  column-gap: clamp(52px, 7vw, 112px);
  min-height: calc(100vh - 62px);
  min-height: calc(100svh - 62px);
  padding: clamp(48px, 6vw, 92px) clamp(24px, 8vw, 132px);
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 48%, rgba(193, 170, 131, 0.2), transparent 28rem),
    radial-gradient(circle at 12% 92%, rgba(111, 148, 132, 0.1), transparent 24rem),
    var(--app-background);
}

.memory-home-screen {
  display: block;
  min-height: calc(100vh - 62px);
  min-height: calc(100svh - 62px);
  padding: clamp(34px, 5vw, 70px) clamp(22px, 6vw, 92px) clamp(54px, 7vw, 96px);
  overflow: visible;
  background:
    radial-gradient(circle at 88% 10%, rgba(193, 170, 131, 0.15), transparent 24rem),
    radial-gradient(circle at 8% 92%, rgba(111, 148, 132, 0.09), transparent 24rem),
    var(--app-background);
}

.memory-home-inner {
  display: grid;
  gap: clamp(42px, 6vw, 72px);
  width: min(1180px, 100%);
  margin: 0 auto;
}

.home-session-loading {
  display: none;
}

.is-session-loading .home-session-loading {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.72fr);
  align-items: center;
  gap: clamp(24px, 5vw, 68px);
  min-height: 330px;
  padding: clamp(30px, 5vw, 58px);
  overflow: hidden;
  background: linear-gradient(145deg, rgba(251, 248, 240, 0.96), rgba(238, 243, 236, 0.9));
  border: 1px solid rgba(32, 61, 54, 0.13);
  border-radius: 28px;
}

.is-session-loading .home-session-loading::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 25%, rgba(255, 255, 255, 0.54) 43%, transparent 61%);
  content: "";
  animation: home-session-shimmer 1.5s ease-in-out infinite;
}

.home-session-loading-copy {
  display: grid;
  gap: 15px;
}

.home-session-loading-copy span,
.home-session-loading-memory {
  display: block;
  background: rgba(32, 61, 54, 0.09);
  border-radius: 999px;
}

.home-session-loading-copy span:first-child {
  width: min(310px, 82%);
  height: 35px;
}

.home-session-loading-copy span:last-child {
  width: min(225px, 62%);
  height: 15px;
}

.home-session-loading-memory {
  width: min(240px, 100%);
  aspect-ratio: 5 / 7;
  justify-self: center;
  border-radius: 18px;
}

.home-session-loading > p {
  position: absolute;
  bottom: 22px;
  left: clamp(30px, 5vw, 58px);
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.is-session-loading .first-memory-welcome,
.is-session-loading .recent-memory-section {
  display: none;
}

@keyframes home-session-shimmer {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

.first-memory-welcome,
.recent-memory-section {
  position: relative;
  display: block;
  min-height: 0;
  padding: clamp(28px, 4vw, 46px) 0 24px;
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 4%, rgba(183, 213, 195, 0.46), transparent 24rem),
    linear-gradient(145deg, rgba(251, 248, 240, 0.96), rgba(238, 243, 236, 0.9));
  border: 1px solid rgba(32, 61, 54, 0.16);
  border-radius: 28px;
  box-shadow: 0 22px 52px rgba(39, 62, 53, 0.1);
}

.first-memory-welcome[hidden] {
  display: none;
}

.first-memory-welcome::before,
.recent-memory-section::before {
  position: absolute;
  top: -132px;
  right: -102px;
  width: 310px;
  height: 310px;
  border: 1px solid rgba(32, 61, 54, 0.1);
  border-radius: 50%;
  content: "";
}

.home-showcase-heading {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  padding: 0 clamp(28px, 4vw, 48px) 27px;
}

.home-showcase-heading .eyebrow {
  margin-bottom: 8px;
  font-size: 10px;
  font-weight: 690;
  letter-spacing: 0.13em;
}

.home-showcase-heading h1 {
  max-width: 18ch;
  margin: 0;
  font-family: var(--font-system);
  font-size: clamp(29px, 3.4vw, 43px);
  font-weight: 570;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.home-showcase-heading > p {
  max-width: 31ch;
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 560;
  line-height: 1.45;
}

.home-showcase-carousel {
  --showcase-slide-width: min(330px, 46vw);
  position: relative;
}

.home-showcase-viewport {
  position: relative;
  z-index: 1;
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.home-showcase-viewport::-webkit-scrollbar {
  display: none;
}

.home-showcase-viewport:focus-visible {
  outline: 2px solid rgba(32, 61, 54, 0.72);
  outline-offset: -2px;
}

.home-showcase-track {
  display: flex;
  gap: clamp(14px, 2.3vw, 25px);
  width: max-content;
  padding: 8px max(30px, calc((100% - var(--showcase-slide-width)) / 2)) 22px;
}

.home-showcase-slide {
  position: relative;
  flex: 0 0 var(--showcase-slide-width);
  width: var(--showcase-slide-width);
  margin: 0;
  overflow: hidden;
  background: #e8ddc8;
  border: 1px solid rgba(32, 61, 54, 0.14);
  border-radius: 20px;
  box-shadow: 0 14px 36px rgba(32, 47, 42, 0.12);
  opacity: 0.58;
  scroll-snap-align: center;
  transform: scale(0.94);
  transition: opacity 320ms ease, transform 420ms cubic-bezier(0.2, 0.75, 0.2, 1), box-shadow 320ms ease;
}

.home-showcase-slide.is-active {
  box-shadow: 0 22px 48px rgba(32, 47, 42, 0.2);
  opacity: 1;
  transform: scale(1);
}

.home-showcase-slide img {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 7;
  object-fit: cover;
}

.home-showcase-slide figcaption {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  display: grid;
  gap: 2px;
  padding: 11px 13px;
  color: #f8f6ef;
  background: rgba(22, 43, 37, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 13px;
  backdrop-filter: blur(12px);
}

.home-showcase-slide figcaption span {
  font-size: 8px;
  font-weight: 720;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.76;
}

.home-showcase-slide figcaption strong {
  overflow: hidden;
  font-family: var(--font-system);
  font-size: 13px;
  font-weight: 620;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-showcase-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.9);
  border: 1px solid rgba(32, 61, 54, 0.14);
  border-radius: 50%;
  box-shadow: 0 10px 26px rgba(32, 47, 42, 0.13);
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
}

.home-showcase-arrow.is-previous {
  left: 20px;
}

.home-showcase-arrow.is-next {
  right: 20px;
}

.home-showcase-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 3px clamp(28px, 4vw, 48px) 0;
}

.home-showcase-dots {
  display: flex;
  align-items: center;
  gap: 7px;
}

.home-showcase-dots button {
  width: 6px;
  height: 6px;
  padding: 0;
  background: rgba(32, 61, 54, 0.22);
  border: 0;
  border-radius: 999px;
  transition: width 220ms ease, background 220ms ease;
}

.home-showcase-dots button.is-active {
  width: 24px;
  background: var(--green);
}

.home-showcase-play {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  background: rgba(255, 253, 248, 0.5);
  border: 1px solid rgba(32, 61, 54, 0.11);
  border-radius: 999px;
}

.home-showcase-play > span:first-child {
  color: var(--green);
  font-size: 9px;
  font-weight: 800;
}

.recent-memory-section,
.home-create-section {
  min-width: 0;
}

.recent-memory-section[hidden] {
  display: none;
}

.memory-home-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.memory-home-heading .eyebrow {
  margin-bottom: 9px;
  font-size: 10.5px;
  font-weight: 680;
  letter-spacing: 0.12em;
}

.memory-home-heading h1,
.memory-home-heading h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-system);
  font-size: clamp(27px, 3vw, 38px);
  font-weight: 590;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.recent-memory-carousel {
  --recent-slide-width: min(330px, 46vw);
  position: relative;
  overflow: hidden;
}

.recent-memory-rail {
  display: flex;
  gap: clamp(14px, 2.3vw, 25px);
  width: 100%;
  padding: 24px max(30px, calc((100% - var(--recent-slide-width)) / 2));
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.recent-memory-rail::-webkit-scrollbar {
  display: none;
}

.recent-memory-rail:focus-visible {
  outline: 2px solid rgba(32, 61, 54, 0.72);
  outline-offset: -2px;
}

.recent-memory-card {
  position: relative;
  flex: 0 0 var(--recent-slide-width);
  width: var(--recent-slide-width);
  aspect-ratio: 5 / 7;
  padding: 0;
  overflow: hidden;
  color: #f8f6ef;
  text-align: left;
  background: #dce5dc;
  border: 1px solid rgba(32, 61, 54, 0.14);
  border-radius: 20px;
  box-shadow: 0 14px 36px rgba(32, 47, 42, 0.12);
  cursor: pointer;
  opacity: 0.58;
  scroll-snap-align: center;
  transform: scale(0.94);
  transition: border-color 200ms ease, box-shadow 320ms ease, opacity 320ms ease, transform 420ms cubic-bezier(0.2, 0.75, 0.2, 1);
}

.recent-memory-card.is-active {
  box-shadow: 0 22px 48px rgba(32, 47, 42, 0.2);
  opacity: 1;
  transform: scale(1);
}

.recent-memory-card:hover,
.recent-memory-card:focus-visible {
  border-color: rgba(32, 61, 54, 0.38);
  opacity: 1;
}

.recent-memory-thumb {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(218, 228, 218, 0.82), rgba(239, 231, 214, 0.86));
}

.recent-memory-thumb img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 28%;
}

.recent-memory-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(32, 61, 54, 0.55);
}

.recent-memory-fallback .memory-product-icon {
  width: 42px;
  height: 42px;
  opacity: 0.72;
}

.recent-memory-status {
  position: absolute;
  z-index: 2;
  top: 13px;
  left: 13px;
  padding: 6px 9px;
  color: #f9f7f0;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
  background: rgba(24, 51, 45, 0.84);
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

.recent-memory-details {
  position: absolute;
  z-index: 3;
  right: 12px;
  bottom: 12px;
  left: 12px;
  display: grid;
  gap: 3px;
  padding: 12px 13px;
  background: rgba(22, 43, 37, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 13px;
  backdrop-filter: blur(12px);
}

.recent-memory-details strong {
  overflow: hidden;
  font-family: var(--font-system);
  font-size: 14px;
  font-weight: 620;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-memory-details > span {
  color: rgba(248, 246, 239, 0.72);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.03em;
}

.recent-memory-footer {
  padding-top: 3px;
}

.recent-memory-empty {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 142px;
  padding: 22px;
  color: var(--muted);
  background: rgba(255, 253, 248, 0.62);
  border: 1px dashed rgba(32, 61, 54, 0.2);
  border-radius: 17px;
}

.recent-memory-empty strong {
  color: var(--ink);
  font-family: var(--font-source-serif);
  font-size: 18px;
  font-weight: 500;
}

.recent-memory-empty span {
  font-size: 12px;
}

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

.home-creator-grid.is-classic-only {
  grid-template-columns: minmax(0, 760px);
}

.home-creator-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 19px;
  min-height: 244px;
  padding: clamp(20px, 2.5vw, 28px);
  color: var(--ink);
  background: rgba(255, 253, 248, 0.88);
  border: 1px solid rgba(32, 61, 54, 0.16);
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 12px 30px rgba(40, 51, 46, 0.055);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.home-creator-card:hover {
  border-color: rgba(32, 61, 54, 0.3);
  box-shadow: 0 18px 40px rgba(40, 51, 46, 0.09);
  transform: translateY(-2px);
}

.home-creator-card.is-studio {
  background: rgba(250, 249, 244, 0.78);
  border-color: rgba(32, 61, 54, 0.13);
  box-shadow: 0 12px 30px rgba(40, 51, 46, 0.055);
}

.home-creator-card.is-studio::after {
  content: none;
}

.home-creator-topline {
  position: absolute;
  z-index: 2;
  top: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.home-price-badge,
.home-recommended-badge {
  padding: 5px 8px;
  font-size: 9px;
  font-weight: 780;
  letter-spacing: 0.05em;
  line-height: 1;
  text-transform: uppercase;
  border-radius: 999px;
}

.home-price-badge {
  color: var(--muted);
  background: rgba(113, 107, 97, 0.08);
}

.home-recommended-badge {
  color: #f8f5ec;
  background: var(--green);
}

.home-creator-copy h3 {
  margin: 0;
  font-family: var(--font-system);
  font-size: clamp(24px, 2.6vw, 31px);
  font-weight: 610;
  letter-spacing: -0.035em;
  line-height: 1.06;
}

.home-creator-copy p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 560;
}

.home-creator-pricing {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  padding: 2px 0;
}

.home-creator-pricing p {
  position: relative;
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 3px 12px 3px 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.home-creator-pricing p + p {
  padding-right: 0;
  padding-left: 14px;
}

.home-creator-pricing p + p::before {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  width: 1px;
  background: rgba(32, 61, 54, 0.12);
  content: "";
}

.home-creator-pricing span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 620;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.home-creator-pricing strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 660;
}

.home-creator-included {
  margin: -10px 1px 0;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 580;
}

.home-classic-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: auto;
}

.home-classic-actions button,
.home-studio-action {
  min-height: 45px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 740;
  cursor: pointer;
}

.home-classic-actions button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 13px;
  color: var(--green);
  background: rgba(223, 235, 227, 0.72);
  border: 1px solid rgba(32, 61, 54, 0.3);
  box-shadow: 0 3px 8px rgba(32, 61, 54, 0.055);
}

.home-classic-actions button span {
  font-size: 15px;
  line-height: 1;
}

.home-classic-actions button:hover,
.home-classic-actions button:focus-visible {
  background: rgba(207, 225, 214, 0.9);
  border-color: rgba(32, 61, 54, 0.48);
  box-shadow: 0 5px 12px rgba(32, 61, 54, 0.09);
}

.home-studio-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: auto;
  padding: 0 16px;
  color: #fbf8f0;
  background: var(--green);
  border: 1px solid var(--green);
}

.home-studio-action span {
  font-size: 18px;
}

.home-studio-action:hover,
.home-studio-action:focus-visible {
  background: #294d44;
}

.home-print-note {
  margin: 13px 2px 0;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 580;
}

.mode-screen {
  min-height: calc(100vh - 72px);
  padding: clamp(24px, 5vw, 76px);
  background: var(--app-background);
}

.mode-heading {
  max-width: 680px;
  margin: 0 auto 34px;
  text-align: center;
}

.mode-heading h1 {
  margin: 0;
  font-family: var(--font-system);
  font-size: clamp(36px, 5.1vw, 64px);
  font-weight: 570;
  line-height: 1.06;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 420px));
  justify-content: center;
  gap: 14px;
}

.mode-tile {
  position: relative;
  display: grid;
  min-height: 268px;
  grid-template-rows: 1fr auto;
  gap: 0;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  background: #fbfaf6;
  border: 1px solid rgba(113, 107, 97, 0.2);
  border-radius: 18px;
  box-shadow: none;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.mode-tile-select {
  display: grid;
  align-content: start;
  gap: 12px;
  width: 100%;
  padding: 26px 26px 8px;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 17px 17px 0 0;
}

.mode-tile:not(.is-selected):hover {
  background: #f7f8f2;
  border-color: rgba(32, 61, 54, 0.34);
  box-shadow: none;
  transform: translateY(-1px);
}

.mode-tile-select:focus-visible {
  outline: 3px solid rgba(111, 148, 132, 0.22);
  outline-offset: -3px;
}

.mode-tile.is-selected {
  background: #e7ede7;
  border-color: rgba(73, 105, 92, 0.58);
}

.mode-tile.is-loading {
  cursor: wait;
}

.mode-tile.is-loading .mode-tile-select {
  opacity: 0.78;
}

.mode-status {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  padding: 7px 10px;
  color: var(--green);
  background: rgba(251, 248, 240, 0.76);
  border: 1px solid rgba(32, 61, 54, 0.18);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.mode-tile-select > strong {
  max-width: 320px;
  color: var(--green);
  font-size: 30px;
  font-weight: 590;
  line-height: 1.08;
}

.mode-tile-select > small {
  max-width: 330px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.mode-tile-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
}

.mode-mark {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--green);
  background: rgba(111, 148, 132, 0.13);
  border: 1px solid rgba(32, 61, 54, 0.12);
  border-radius: 12px;
}

.mode-mark svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.mode-kicker {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mode-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
  padding-top: 6px;
  padding-right: 46px;
}

.mode-benefits span {
  padding: 6px 9px;
  color: var(--green);
  background: rgba(111, 148, 132, 0.1);
  border: 1px solid rgba(32, 61, 54, 0.12);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 760;
}

.mode-tile.is-selected .mode-benefits span {
  background: rgba(251, 248, 240, 0.58);
  border-color: rgba(32, 61, 54, 0.18);
}

.mode-start-button {
  position: absolute;
  right: 20px;
  bottom: 18px;
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  color: var(--green);
  background: #eef2ed;
  border: 1px solid rgba(32, 61, 54, 0.08);
  border-radius: 50%;
  font-size: 19px;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease, opacity 160ms ease;
}

.mode-start-button:disabled {
  cursor: default;
  opacity: 0.48;
}

.mode-tile.is-selected .mode-start-button:not(:disabled),
.mode-start-button.is-loading {
  color: #fbf8f0;
  background: var(--green);
  border-color: var(--green);
  opacity: 1;
}

.mode-tile.is-selected .mode-start-button:not(:disabled):hover {
  background: var(--archive-green);
  transform: translateX(2px);
}

.mode-start-button:focus-visible {
  outline: 3px solid rgba(32, 61, 54, 0.2);
  outline-offset: 3px;
}

.mode-start-spinner {
  display: none;
  width: 17px;
  height: 17px;
  border: 2px solid rgba(251, 248, 240, 0.42);
  border-top-color: #fbf8f0;
  border-radius: 50%;
  animation: mode-start-spin 700ms linear infinite;
}

.mode-start-button.is-loading .mode-start-arrow {
  display: none;
}

.mode-start-button.is-loading .mode-start-spinner {
  display: block;
}

.mode-launch-status {
  min-height: 22px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.mode-launch-status.is-error {
  color: var(--danger);
}

@keyframes mode-start-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .mode-heading {
    margin-bottom: 22px;
  }

  .mode-tile {
    min-height: 248px;
  }

  .mode-tile-select {
    padding: 22px 22px 8px;
  }

  .mode-start-button {
    right: 18px;
    bottom: 16px;
  }
}

.single-typography-controls,
.moving-memory-controls,
.moving-appearance-controls,
.keepsake-size-controls {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  background: rgba(251, 248, 240, 0.52);
  border: 1px solid var(--surface-border);
  border-radius: var(--surface-radius);
}

.single-typography-controls[hidden],
.moving-memory-controls[hidden],
.moving-appearance-controls[hidden],
.keepsake-size-controls[hidden] {
  display: none !important;
}

.single-typography-panel-slot .typography-controls,
.moving-typography-panel-slot .typography-controls {
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.7fr);
  align-items: end;
}

.single-typography-panel-slot .font-select-field,
.single-typography-panel-slot .text-size-field,
.moving-typography-panel-slot .font-select-field,
.moving-typography-panel-slot .text-size-field {
  margin-top: 0;
}

.moving-preserve-color-slot .preserve-color-field {
  margin-top: 2px;
}

.keepsake-size-controls .style-control-body > label {
  display: block;
}

.style-control-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--ink);
  list-style: none;
}

.style-control-summary::-webkit-details-marker {
  display: none;
}

.style-control-summary-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.style-control-summary-copy strong {
  font-size: 14px;
}

.style-control-summary-copy small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.style-control-selection {
  overflow: hidden;
  color: var(--green) !important;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.style-control-chevron {
  display: grid;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--green);
  background: rgba(32, 61, 54, 0.07);
  border-radius: 50%;
  transition: background 160ms ease;
}

.style-control-chevron::before {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: translateY(-2px) rotate(45deg);
  transition: transform 160ms ease;
}

.style-control-accordion[open] .style-control-chevron {
  background: rgba(32, 61, 54, 0.12);
}

.style-control-accordion[open] .style-control-chevron::before {
  transform: translateY(2px) rotate(225deg);
}

.style-control-body {
  display: grid;
  gap: 12px;
}

.style-control-accordion:not([open]) > .style-control-body {
  display: none;
}

@keyframes style-control-open {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 641px) {
  .style-control-summary {
    cursor: default;
    pointer-events: none;
  }

  .style-control-selection,
  .style-control-chevron {
    display: none;
  }
}

.moving-choice-grid,
.moving-download-toggle,
.moving-setting-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.moving-choice,
.moving-download-toggle button {
  color: var(--ink);
  background: var(--surface-control);
  border: 1px solid var(--surface-border-strong);
  border-radius: 8px;
}

.moving-choice {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  padding: 11px;
  text-align: left;
}

.moving-choice.is-selected,
.moving-download-toggle button.is-selected {
  background: var(--surface-selected);
  border-color: rgba(32, 61, 54, 0.42);
}

.moving-choice-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--green);
  background: var(--surface);
  border-radius: 50%;
  font-size: 11px;
}

.moving-choice.is-selected .moving-choice-mark {
  color: #fff;
  background: var(--green);
}

.moving-choice b,
.moving-choice small,
.moving-download-toggle b,
.moving-download-toggle small {
  display: block;
}

.moving-choice b,
.moving-download-toggle b {
  font-size: 12px;
}

.moving-choice small,
.moving-download-toggle small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.moving-setting-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.moving-download-heading {
  padding-top: 4px;
  border-top: 1px solid var(--surface-border);
}

.moving-download-toggle button {
  min-height: 55px;
  padding: 8px 10px;
  text-align: left;
}

.moving-photo-sequence {
  display: grid;
  gap: 7px;
}

.moving-photo-item {
  display: grid;
  grid-template-columns: 28px 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 70px;
  padding: 7px;
  background: rgba(251, 248, 240, 0.72);
  border: 1px solid var(--surface-border);
  border-radius: 7px;
}

.moving-photo-item.is-active {
  border-color: var(--clay);
  box-shadow: inset 0 0 0 1px rgba(111, 148, 132, 0.18);
}

.moving-photo-number {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 850;
}

.moving-photo-item img,
.moving-photo-item .photo-preview-fallback {
  width: 72px;
  height: 56px;
  min-height: 56px;
  object-fit: cover;
  border-radius: 5px;
}

.moving-photo-copy {
  min-width: 0;
}

.moving-photo-copy strong,
.moving-photo-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.moving-photo-copy strong {
  font-size: 11px;
}

.moving-photo-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.moving-photo-actions {
  display: grid;
  grid-template-columns: repeat(2, 28px);
  gap: 3px;
}

.moving-photo-actions button {
  width: 28px;
  height: 28px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
}

.moving-photo-actions button:hover {
  background: var(--surface);
  border-color: var(--surface-border-strong);
}

.moving-photo-actions .moving-remove {
  color: var(--danger);
}

.moving-sequence-tip {
  margin: 9px 0 0;
  padding: 9px 10px;
  color: var(--muted);
  background: rgba(111, 148, 132, 0.09);
  border-radius: 7px;
  font-size: 10px;
  line-height: 1.45;
}

.moving-preview-player {
  display: grid;
  grid-template-columns: 38px 38px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 8px;
  width: min(100%, 620px);
  margin: 12px auto 0;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--surface-border-strong);
  border-radius: 9px;
}

.moving-preview-player > button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0;
  color: var(--green);
  background: var(--green-soft);
  border: 0;
  border-radius: 50%;
  font-size: 20px;
}

.moving-preview-player .moving-preview-play {
  color: #fff;
  background: var(--green);
  font-size: 13px;
}

.moving-preview-player strong {
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
}

.moving-preview-progress {
  display: block;
  height: 4px;
  overflow: hidden;
  background: var(--paper-deep);
  border-radius: 999px;
}

.moving-preview-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--clay);
  border-radius: inherit;
}

.intro-copy {
  grid-area: copy;
  position: relative;
  z-index: 2;
  max-width: 620px;
}

.intro-copy h1 {
  margin: 0;
  font-family: var(--font-system);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: 0;
}

.intro-copy h1 {
  font-family: var(--font-system);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: 0;
}

.intro-copy h1 {
  max-width: 10ch;
  font-size: clamp(50px, 5.2vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.intro-copy p:not(.eyebrow) {
  max-width: 520px;
  margin: 24px 0 0;
  color: #4f5953;
  font-family: var(--font-system);
  font-size: 18px;
  line-height: 1.6;
}

.intro-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
}

.intro-assurance {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 20px !important;
  color: var(--muted) !important;
  font-size: 12px !important;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.intro-assurance span {
  position: relative;
  padding-left: 17px;
}

.intro-assurance span::before {
  position: absolute;
  top: 0.4em;
  left: 0;
  width: 7px;
  height: 7px;
  background: var(--clay);
  border-radius: 50%;
  content: "";
}

.intro-trust {
  grid-area: trust;
  display: grid;
  grid-template-columns: minmax(210px, 0.8fr) minmax(0, 2.2fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  padding: 22px 0 2px;
  border-top: 1px solid rgba(32, 61, 54, 0.14);
}

.intro-learning-note {
  max-width: 310px;
  margin: 0;
  color: #52605a;
  font-size: 14px;
  font-weight: 550;
  line-height: 1.45;
}

.intro-proof-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  max-width: none;
  margin: 0;
}

.intro-proof-grid span {
  display: grid;
  align-content: start;
  min-height: 58px;
  padding: 0 16px;
  background: transparent;
  border: 0;
  border-left: 1px solid rgba(32, 61, 54, 0.12);
  border-radius: 0;
}

.intro-proof-grid span:first-child {
  border-left: 0;
}

.intro-proof-grid strong {
  font-family: var(--font-system);
  font-size: 14px;
  font-weight: 720;
  line-height: 1.25;
}

.intro-proof-grid small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 560;
  line-height: 1.3;
}

.start-button {
  min-width: 160px;
  margin-top: 0;
  padding: 15px 26px;
  font-size: 16px;
}

.intro-launch-preview {
  grid-area: preview;
  position: relative;
  width: min(100%, 440px);
  margin: 0 auto;
  padding: 26px 26px 70px;
}

.intro-launch-preview::before,
.intro-launch-preview::after {
  position: absolute;
  border: 1px solid rgba(32, 61, 54, 0.12);
  border-radius: 50%;
  content: "";
}

.intro-launch-preview::before {
  inset: -62px -76px -42px -56px;
}

.intro-launch-preview::after {
  inset: -10px -24px 14px -4px;
}

.intro-launch-card {
  position: relative;
  z-index: 2;
  width: min(100%, 350px);
  margin: 0 auto;
  overflow: hidden;
  background: #eee1c9;
  border: 1px solid rgba(113, 107, 97, 0.16);
  border-radius: 7px;
  box-shadow: 0 28px 64px rgba(40, 51, 46, 0.2);
  transform: rotate(2.6deg);
}

.intro-launch-card img {
  display: block;
  width: 100%;
  height: auto;
}

.intro-launch-preview figcaption {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 30px;
  width: min(310px, 78%);
  padding: 16px 18px;
  color: var(--ink);
  background: rgba(251, 248, 240, 0.94);
  border: 1px solid rgba(113, 107, 97, 0.18);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(40, 51, 46, 0.14);
  backdrop-filter: blur(12px);
}

.intro-launch-preview figcaption strong,
.intro-launch-preview figcaption span {
  display: block;
}

.intro-launch-preview figcaption strong {
  font-family: var(--font-source-serif);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.22;
}

.intro-launch-preview figcaption span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 620;
  line-height: 1.35;
}

.start-button.is-loading:disabled {
  cursor: wait;
  opacity: 0.88;
}

.start-button.is-loading::before {
  content: "";
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 9px;
  vertical-align: -2px;
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-top-color: #fff;
  border-radius: 50%;
  animation: email-auth-spin 700ms linear infinite;
}

.intro-book {
  grid-area: book;
  display: block;
  min-width: 0;
}

.intro-memory-board {
  position: relative;
  width: min(100%, 640px);
  min-height: 640px;
  margin: 0 auto;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(83, 72, 54, 0.06) 1px, transparent 1px) 0 0 / 18px 18px,
    radial-gradient(circle at 7px 8px, rgba(83, 72, 54, 0.07) 1.4px, transparent 1.7px) 0 0 / 42px 38px,
    linear-gradient(180deg, rgba(251, 248, 240, 0.6), rgba(213, 201, 184, 0.52)),
    var(--paper);
  border: 1px solid rgba(113, 107, 97, 0.28);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.intro-paper-grain {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 48%, rgba(87, 64, 34, 0.08)),
    repeating-linear-gradient(90deg, rgba(58, 47, 33, 0.035) 0 1px, transparent 1px 9px);
  pointer-events: none;
}

.intro-scrap {
  position: absolute;
  z-index: 2;
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 12px 12px 32px;
  background: #fbf8f0;
  box-shadow: 0 12px 30px rgba(40, 51, 46, 0.14);
}

.intro-scrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.12) saturate(0.92) contrast(0.96);
}

.intro-scrap-main {
  top: 64px;
  left: 74px;
  width: 330px;
  height: 390px;
  transform: rotate(-4deg);
}

.intro-scrap-side {
  top: 90px;
  right: 66px;
  width: 250px;
  height: 355px;
  transform: rotate(5deg);
}

.intro-scrap-small {
  left: 88px;
  bottom: 92px;
  width: 210px;
  height: 245px;
  transform: rotate(4deg);
}

.intro-scrap-bottom {
  right: 118px;
  bottom: -34px;
  width: 330px;
  height: 360px;
  transform: rotate(-2deg);
}

.intro-caption-card {
  position: absolute;
  z-index: 4;
  right: 54px;
  bottom: 68px;
  width: min(360px, calc(100% - 82px));
  padding: 22px 24px 20px;
  background: rgba(251, 248, 240, 0.88);
  border: 1px solid rgba(113, 107, 97, 0.26);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(40, 51, 46, 0.12);
  backdrop-filter: blur(12px);
}

.intro-caption-card strong,
.intro-caption-card span {
  display: block;
}

.intro-caption-card strong {
  font-family: var(--font-script);
  font-size: 40px;
  font-weight: 400;
  line-height: 0.96;
}

.intro-caption-card span {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.intro-stamp {
  position: absolute;
  z-index: 5;
  right: 58px;
  bottom: 56px;
  padding: 8px 20px;
  color: rgba(124, 107, 112, 0.78);
  border: 3px solid rgba(124, 107, 112, 0.34);
  border-radius: 8px;
  font-family: var(--font-typewriter);
  font-size: 21px;
  transform: rotate(-5deg);
}

.intro-script-note {
  position: absolute;
  z-index: 5;
  left: 34px;
  bottom: 62px;
  color: rgba(40, 51, 46, 0.62);
  font-family: var(--font-script);
  font-size: 42px;
  transform: rotate(-3deg);
}

.intro-tape {
  position: absolute;
  z-index: 6;
  width: 112px;
  height: 30px;
  background: rgba(247, 235, 190, 0.68);
  box-shadow: 0 1px 8px rgba(75, 54, 30, 0.1);
}

.intro-tape-one {
  top: 44px;
  left: 250px;
  transform: rotate(-9deg);
}

.intro-tape-two {
  top: 294px;
  right: 88px;
  transform: rotate(11deg);
}

.creator {
  display: grid;
  grid-template-columns: minmax(360px, 560px) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 38px);
  min-height: calc(100vh - 62px);
  padding: clamp(16px, 4vw, 44px);
  background: var(--app-background);
  scroll-margin-top: 82px;
}

.wizard-panel {
  align-self: start;
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 110px);
  overflow: auto;
  padding-right: 4px;
}

.album-controls {
  margin-bottom: 14px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--surface-radius);
  box-shadow: none;
}

.album-controls .eyebrow {
  margin-bottom: 4px;
}

.album-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.album-actions .ghost-button {
  min-height: 36px;
  padding: 7px 8px;
}

.album-page-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.album-page-button {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 10px;
  text-align: left;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(113, 107, 97, 0.22);
  border-radius: 8px;
}

.album-page-button[aria-current="true"] {
  background: #fbf8f0;
  border-color: var(--clay);
  box-shadow: inset 0 0 0 1px rgba(111, 148, 132, 0.28);
}

.album-page-button small {
  color: var(--muted);
  font-size: 12px;
}

.progress-track {
  display: grid;
  gap: 9px;
  margin-bottom: 14px;
  padding: 0 8px;
  scroll-margin-top: 96px;
}

.progress-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.progress-meta span:first-child {
  color: var(--green);
  font-weight: 800;
}

.progress-bar {
  height: 7px;
  overflow: hidden;
  background: #dfd2bc;
  border-radius: 999px;
}

.progress-bar span {
  display: block;
  width: calc(100% / 6);
  height: 100%;
  background: var(--green);
  border-radius: inherit;
  transition: width 240ms ease;
}

.step-card {
  scroll-margin-top: 96px;
  padding: 18px;
  background: rgba(255, 253, 248, 0.56);
  border: 1px solid transparent;
  border-radius: var(--surface-radius);
  box-shadow: none;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.step-card.is-active {
  animation: journey-step-enter 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes journey-step-enter {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step-card.is-guiding {
  border-color: transparent;
  box-shadow: 0 0 0 4px rgba(47, 62, 56, 0.08);
  transform: translateY(-2px);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.section-title span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  background: #eadfc9;
  color: #5b4b36;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
}

.section-title h2 {
  margin: 0;
  font-size: 18px;
}

.section-title[tabindex="-1"]:focus {
  outline: none;
}

.upload-zone {
  display: grid;
  min-height: 118px;
  place-items: center;
  padding: 18px;
  text-align: center;
  background: rgba(251, 248, 240, 0.42);
  border: 1px dashed rgba(94, 72, 46, 0.3);
  border-radius: var(--surface-radius);
  color: #564b3b;
  cursor: pointer;
}

.photo-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-zone.is-dragging {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 2px rgba(88, 123, 120, 0.16);
}

.upload-title {
  display: block;
  font-weight: 700;
}

.upload-copy {
  display: block;
  max-width: 310px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.photo-method-fieldset {
  min-width: 0;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
}

.photo-method-fieldset legend {
  margin-bottom: 8px;
  padding: 0;
  color: var(--green-mid);
  font-size: 12px;
  font-weight: 700;
}

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

.photo-method-option {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 94px;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 13px;
  color: var(--ink);
  text-align: left;
  background: var(--surface-control);
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.photo-method-option:hover {
  border-color: var(--surface-border-strong);
}

.photo-method-option[aria-pressed="true"] {
  background: var(--surface-selected);
  border-color: rgba(32, 61, 54, 0.42);
  box-shadow: none;
}

.photo-method-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--green);
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 850;
}

.photo-method-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.photo-method-option[aria-pressed="true"] .photo-method-icon {
  color: var(--green);
  background: rgba(251, 248, 240, 0.78);
  border-color: rgba(32, 61, 54, 0.24);
}

.photo-method-copy {
  min-width: 0;
}

.photo-method-copy strong,
.photo-method-copy small {
  display: block;
}

.photo-method-copy strong {
  font-size: 13px;
  line-height: 1.3;
}

.photo-method-copy small {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.photo-method-badge {
  display: block;
  margin-bottom: 3px;
  color: var(--green-mid);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.photo-preference {
  margin-bottom: 10px;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--surface-border);
  border-bottom: 1px solid var(--surface-border);
  border-radius: 0;
}

.photo-preference[open] {
  background: transparent;
  border-color: var(--surface-border-strong);
}

.photo-preference summary {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 2px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.photo-preference summary::-webkit-details-marker {
  display: none;
}

.photo-preference summary strong,
.photo-preference summary small {
  display: block;
}

.photo-preference summary strong {
  font-size: 13px;
}

.photo-preference summary small {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.photo-preference-title {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.photo-preference-action {
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
}

.photo-preference-action-open {
  display: none;
}

.photo-preference[open] .photo-preference-action {
  color: var(--muted);
}

.photo-preference[open] .photo-preference-action-closed {
  display: none;
}

.photo-preference[open] .photo-preference-action-open {
  display: inline;
}

.photo-preference-body {
  margin: 0 2px;
  padding: 14px 0 12px;
  border-top: 1px solid var(--surface-border);
}

.photo-preference .priority-grid {
  margin: 8px 0 0;
}

.photo-preference-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.photo-preference-label strong {
  color: var(--ink);
  font-size: 13px;
}

.photo-preference-label small {
  color: var(--muted);
  font-size: 11px;
}

.photo-instruction-field {
  margin-top: 15px;
}

.photo-instruction-input-wrap {
  position: relative;
  display: flex;
  min-height: 46px;
  align-items: center;
  margin-top: 8px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--surface-border-strong);
  border-radius: 7px;
}

.photo-instruction-input-wrap:focus-within {
  border-color: rgba(88, 123, 120, 0.8);
  box-shadow: 0 0 0 3px rgba(88, 123, 120, 0.12);
}

.photo-instruction-input-wrap:has(input.is-invalid) {
  border-color: var(--danger);
}

.photo-instruction-input-wrap input {
  width: auto;
  min-width: 0;
  min-height: 44px;
  flex: 1 1 auto;
  padding: 10px 6px 10px 12px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.photo-instruction-input-wrap input:focus {
  border: 0;
  box-shadow: none;
}

.photo-instruction-input-wrap input::placeholder {
  color: #8b877f;
}

.photo-instruction-input-wrap input.is-invalid {
  border: 0;
}

.photo-instruction-tools {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding-right: 10px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.photo-instruction-tools button {
  padding: 2px;
  color: var(--green);
  background: transparent;
  border: 0;
  font-size: 11px;
  font-weight: 800;
}

.photo-instruction-tools .is-invalid,
.photo-instruction-help #photoInstructionError {
  color: var(--danger);
  font-weight: 750;
}

.photo-instruction-help {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.photo-instruction-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.photo-instruction-actions > small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.photo-instruction-actions .secondary-button {
  min-height: 40px;
  flex: 0 0 auto;
  padding: 8px 15px;
}

.photo-analysis-start {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding: 9px 10px;
  color: var(--muted);
  background: rgba(251, 248, 240, 0.46);
  border: 1px solid var(--surface-border);
  border-radius: 6px;
}

.photo-analysis-start[hidden] {
  display: none;
}

.photo-analysis-start strong,
.photo-analysis-start small {
  display: block;
}

.photo-analysis-start strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.photo-analysis-start small {
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.4;
}

.photo-analysis-start button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 6px 9px;
  color: var(--green);
  background: transparent;
  border: 1px solid rgba(32, 61, 54, 0.22);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 750;
}

.photo-assistant,
.selected-photo-panel {
  margin-top: 12px;
  padding: 12px;
  background: rgba(251, 248, 240, 0.52);
  border: 1px solid transparent;
  border-radius: var(--surface-radius);
}

.assistant-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.assistant-heading strong,
.assistant-heading small,
.assistant-heading span {
  display: block;
}

.assistant-heading small,
.assistant-heading span {
  color: var(--muted);
  font-size: 12px;
}

.assistant-heading span {
  padding: 4px 8px;
  background: rgba(47, 62, 56, 0.08);
  border-radius: 999px;
  white-space: nowrap;
}

.analysis-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 5px;
  color: var(--blue);
  font-weight: 800;
}

.spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  padding: 0;
  background: transparent;
  border: 2px solid rgba(88, 123, 120, 0.24);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 780ms linear infinite;
  white-space: normal;
}

.photo-assistant.is-analyzing {
  border-color: rgba(88, 123, 120, 0.34);
  box-shadow: inset 0 0 0 1px rgba(88, 123, 120, 0.08);
}

.photo-assistant.is-analyzing .candidate-grid {
  opacity: 0.68;
}

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

.candidate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: 520px;
  overflow: auto;
  padding-right: 2px;
}

.candidate-card {
  overflow: hidden;
  background: rgba(251, 248, 240, 0.74);
  border: 1px solid var(--surface-border);
  border-radius: var(--surface-radius);
}

.candidate-card[aria-selected="true"] {
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px rgba(47, 62, 56, 0.24);
}

.candidate-card.is-unavailable {
  border-style: dashed;
}

.candidate-main {
  position: relative;
  display: block;
  width: 100%;
  height: 138px;
  overflow: hidden;
  background: #dccbad;
  text-align: left;
}

.candidate-main img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-preview-fallback {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: inherit;
  place-items: center;
  align-content: center;
  gap: 5px;
  padding: 14px;
  color: #5e4f3f;
  background:
    linear-gradient(135deg, rgba(251, 248, 240, 0.72), rgba(220, 203, 173, 0.62)),
    #dccbad;
  text-align: center;
}

.photo-preview-fallback strong,
.photo-preview-fallback small {
  position: relative;
  z-index: 1;
  display: block;
}

.photo-preview-fallback strong {
  font-size: 13px;
}

.photo-preview-fallback small {
  max-width: 18ch;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.candidate-main::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.3), transparent 36%, rgba(0, 0, 0, 0.44));
  content: "";
}

.candidate-rank,
.candidate-check {
  position: absolute;
  z-index: 1;
  left: 8px;
  padding: 4px 7px;
  color: #fbf8f0;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.candidate-rank {
  top: 8px;
  background: rgba(88, 123, 120, 0.88);
}

.candidate-check {
  bottom: 8px;
  background: rgba(40, 51, 46, 0.76);
}

.candidate-card[aria-selected="true"] .candidate-check {
  background: rgba(47, 62, 56, 0.92);
}

.candidate-meta {
  min-height: 92px;
  padding: 9px;
}

.candidate-meta strong,
.candidate-meta span,
.candidate-meta small {
  display: block;
}

.candidate-fit {
  width: fit-content;
  margin-top: 5px;
  padding: 3px 7px;
  color: #587b78;
  background: rgba(88, 123, 120, 0.1);
  border: 1px solid rgba(88, 123, 120, 0.16);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.candidate-fit.is-ai {
  color: #587b78;
  background: rgba(88, 123, 120, 0.12);
  border-color: rgba(88, 123, 120, 0.18);
}

.candidate-fit.is-pending {
  color: #6a5432;
  background: rgba(198, 159, 86, 0.15);
  border-color: rgba(198, 159, 86, 0.28);
}

.candidate-fit.is-skipped,
.candidate-fit.is-fallback {
  color: #765044;
  background: rgba(139, 77, 57, 0.1);
  border-color: rgba(139, 77, 57, 0.18);
}

.candidate-fit.is-local {
  color: #6f9484;
  background: rgba(111, 148, 132, 0.1);
  border-color: rgba(111, 148, 132, 0.16);
}

.candidate-meta small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.candidate-remove {
  width: 100%;
  min-height: 34px;
  color: #5e4f3f;
  background: rgba(231, 218, 195, 0.62);
  border-top: 1px solid rgba(113, 107, 97, 0.16);
  font-size: 12px;
  font-weight: 800;
}

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

.photo-card {
  position: relative;
  overflow: hidden;
  min-height: 128px;
  background: #dccbad;
  border: 1px solid rgba(113, 107, 97, 0.24);
  border-radius: 8px;
}

.photo-card.is-unavailable {
  border-style: dashed;
}

.photo-card img {
  display: block;
  width: 100%;
  height: 128px;
  object-fit: cover;
  filter: sepia(0.34) saturate(0.72) contrast(0.92);
}

.photo-card button {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 28px;
  height: 28px;
  background: rgba(42, 36, 29, 0.76);
  color: white;
  border-radius: 50%;
}

.selected-empty {
  display: grid;
  min-height: 82px;
  place-items: center;
  padding: 12px;
  color: var(--muted);
  background: rgba(251, 248, 240, 0.58);
  border: 1px dashed rgba(113, 107, 97, 0.3);
  border-radius: 8px;
  font-size: 13px;
  text-align: center;
}

.selected-photo-heading > div,
.selected-photo-heading strong,
.selected-photo-heading small {
  display: block;
}

.selected-photo-heading small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.photo-strip {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
}

.selected-photo-slot {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  min-width: 0;
  min-height: 124px;
  overflow: hidden;
  background: rgba(251, 248, 240, 0.78);
  border: 1px solid var(--surface-border);
  border-radius: 7px;
}

.selected-photo-slot.is-target {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 1px rgba(88, 123, 120, 0.28);
}

.selected-photo-slot.is-unavailable {
  border-style: dashed;
}

.selected-photo-image {
  position: relative;
  min-height: 124px;
  overflow: hidden;
  background: #dccbad;
}

.selected-photo-image > img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 124px;
  object-fit: cover;
}

.selected-photo-image > span:not(.photo-preview-fallback) {
  position: absolute;
  top: 7px;
  left: 7px;
  z-index: 2;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: #fbf8f0;
  background: var(--green);
  border: 2px solid rgba(251, 248, 240, 0.82);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 900;
}

.selected-photo-slot.is-empty .selected-photo-image {
  background: rgba(231, 218, 195, 0.54);
}

.selected-photo-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 11px;
}

.selected-photo-role {
  color: var(--green);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.selected-photo-copy > strong,
.selected-photo-copy > small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.selected-photo-copy > strong {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
}

.selected-photo-copy > small {
  display: -webkit-box;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.selected-photo-actions {
  display: flex;
  gap: 6px;
  margin-top: 9px;
}

.selected-photo-actions button,
.photo-swap-row button {
  min-height: 32px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 850;
}

.selected-photo-replace {
  color: var(--green);
  background: rgba(47, 62, 56, 0.08);
  border: 0;
}

.selected-photo-remove {
  color: var(--muted);
  background: transparent;
  border: 0;
}

.photo-swap-row {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
}

.photo-swap-row button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--green);
  background: rgba(251, 248, 240, 0.84);
  border: 1px solid rgba(47, 62, 56, 0.22);
  white-space: nowrap;
}

.photo-swap-row svg,
.photo-selection-rule svg,
.photo-replace-notice svg,
.photo-selection-toast svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.photo-selection-rule {
  display: flex;
  align-items: start;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  color: var(--green);
  background: rgba(47, 62, 56, 0.07);
  border-radius: 6px;
  font-size: 10px;
  line-height: 1.4;
}

.photo-replace-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding: 9px 10px;
  color: var(--blue);
  background: rgba(88, 123, 120, 0.09);
  border: 1px solid rgba(88, 123, 120, 0.2);
  border-radius: 6px;
  font-size: 11px;
}

.photo-replace-notice > span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.photo-replace-notice button {
  color: var(--blue);
  background: transparent;
  border: 0;
  font-size: 10px;
  font-weight: 850;
}

.candidate-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.candidate-card.is-targetable {
  border-color: rgba(88, 123, 120, 0.42);
}

.candidate-main {
  height: 154px;
}

.candidate-main:disabled {
  cursor: default;
}

.candidate-rank {
  max-width: calc(100% - 16px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.candidate-check {
  right: 8px;
  bottom: auto;
  left: auto;
  top: 8px;
  color: var(--green);
  background: rgba(251, 248, 240, 0.94);
}

.candidate-card[aria-selected="true"] .candidate-check {
  background: rgba(251, 248, 240, 0.96);
}

.candidate-meta {
  display: flex;
  min-height: 174px;
  flex: 1;
  flex-direction: column;
}

.candidate-reason {
  display: grid;
  gap: 6px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.42;
}

.candidate-reason p {
  margin: 0;
}

.candidate-tradeoff {
  padding-top: 6px;
  border-top: 1px solid rgba(113, 107, 97, 0.14);
}

.candidate-tradeoff strong {
  display: inline;
  color: var(--green);
  font-size: inherit;
}

.candidate-action {
  width: auto;
  min-height: 32px;
  align-self: flex-start;
  margin-top: 12px;
  padding: 6px 10px;
  color: var(--green);
  background: transparent;
  border: 1px solid rgba(47, 62, 56, 0.26);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 850;
}

.candidate-card[aria-selected="true"] .candidate-action {
  color: #fbf8f0;
  background: var(--green);
  border-color: var(--green);
  opacity: 1;
}

.candidate-remove {
  min-height: 30px;
  margin-top: 5px;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 9px;
  font-weight: 750;
}

.photo-see-all {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.photo-see-all small {
  color: var(--muted);
  font-size: 10px;
}

.photo-see-all button {
  min-height: 36px;
  padding: 7px 10px;
  color: var(--green);
  background: rgba(251, 248, 240, 0.72);
  border: 1px solid rgba(47, 62, 56, 0.24);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 850;
}

.photo-selection-toast {
  position: fixed;
  z-index: 80;
  right: 18px;
  bottom: 18px;
  display: flex;
  max-width: min(390px, calc(100% - 28px));
  align-items: center;
  gap: 9px;
  padding: 11px 12px;
  color: #fbf8f0;
  background: var(--green);
  border-radius: 7px;
  box-shadow: 0 10px 24px rgba(32, 61, 54, 0.16);
  font-size: 11px;
}

.photo-selection-toast span { flex: 1; }

.photo-selection-toast button {
  min-height: 30px;
  padding: 5px 7px;
  color: #fbf8f0;
  background: transparent;
  border: 1px solid rgba(251, 248, 240, 0.42);
  border-radius: 5px;
  font-size: 10px;
  font-weight: 900;
}

textarea,
input,
select {
  width: 100%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--surface-border-strong);
  border-radius: var(--surface-radius);
  outline: none;
}

textarea {
  resize: vertical;
  padding: 13px;
  line-height: 1.5;
}

input,
select {
  min-height: 42px;
  padding: 9px 10px;
}

textarea:focus,
input:focus,
select:focus {
  border-color: rgba(88, 123, 120, 0.8);
  box-shadow: 0 0 0 3px rgba(88, 123, 120, 0.12);
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.field-row > label {
  min-width: 0;
}

.memory-signature-field {
  max-width: 360px;
}

.memory-signature-field > span small {
  display: inline;
  margin-left: 3px;
  font-size: inherit;
  font-weight: 400;
}

.memory-signature-helper {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}

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

.image-size-helper {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 10px 0 0;
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.checkbox-field span {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
}

.step-actions {
  position: sticky;
  bottom: 16px;
  z-index: 20;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 8px 12px;
  margin: 18px -18px -18px;
  padding: 10px 18px calc(10px + env(safe-area-inset-bottom));
  background:
    linear-gradient(180deg, rgba(251, 248, 240, 0.54), rgba(251, 248, 240, 0.78)),
    rgba(251, 248, 240, 0.68);
  border-top: 1px solid rgba(113, 107, 97, 0.16);
  border-radius: 0 0 8px 8px;
  box-shadow: none;
  backdrop-filter: blur(18px) saturate(1.16);
}

.step-actions-forward {
  grid-template-columns: auto minmax(0, 1fr);
}

.step-actions .primary-button,
.step-actions .secondary-button {
  width: 100%;
  min-height: 44px;
  line-height: 1.15;
  white-space: normal;
}

.step-action-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.step-back-control {
  display: inline-flex;
  align-items: center;
  justify-content: start;
  gap: 5px;
  min-height: 44px;
  padding: 8px 4px;
  color: var(--green);
  background: transparent;
  border-radius: 8px;
  font-weight: 800;
}

.step-back-control::before {
  content: "\2039";
  font-size: 22px;
  line-height: 0;
  transform: translateY(-1px);
}

.step-back-control:hover {
  color: var(--clay);
}

.draft-save-strip {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -2px 0 12px;
  padding: 8px 10px;
  color: var(--muted);
  background: var(--surface-subtle);
  border: 1px solid var(--surface-border);
  border-radius: var(--surface-radius);
  font-size: 12px;
  font-weight: 800;
}

.draft-save-button {
  min-height: 32px;
  padding: 6px 10px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

label span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stacked-field {
  display: block;
  margin-top: 12px;
}

.section-title + .stacked-field {
  margin-top: 0;
}

.date-field {
  display: grid;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.date-field select,
.date-field input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  font-size: 16px;
}

.date-field input[type="date"],
.date-field input[type="month"] {
  display: block;
  inline-size: 100%;
  -webkit-appearance: none;
  appearance: none;
}

.date-field input[type="date"]::-webkit-date-and-time-value,
.date-field input[type="month"]::-webkit-date-and-time-value {
  min-width: 0;
  text-align: left;
}

.suggestion-panel {
  margin: 8px 0 12px;
}

.suggestion-panel > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.note-history-helper {
  margin: -2px 0 8px;
}

.suggestion-list,
.note-history-list {
  display: grid;
  gap: 8px;
}

.suggestion-chip,
.note-history-card {
  color: var(--ink);
  background: rgba(251, 248, 240, 0.86);
  border: 1px solid var(--surface-border-strong);
  border-radius: var(--surface-radius);
  font-family: var(--font-system);
  text-align: left;
}

.suggestion-chip {
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 700;
}

.note-history-card {
  overflow: hidden;
}

.note-history-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 58px;
  padding: 11px 12px;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.note-history-summary strong,
.note-history-summary small {
  display: block;
}

.note-history-summary strong {
  font-size: 13px;
}

.note-history-summary small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-history-chevron {
  color: var(--blue);
  font-weight: 900;
  transition: transform 160ms ease;
}

.note-history-card.is-open .note-history-chevron {
  transform: rotate(90deg);
}

.note-history-body {
  padding: 0 10px 10px;
}

.note-history-text {
  user-select: text;
  margin: 0;
  padding: 10px;
  color: rgba(40, 51, 46, 0.94);
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(113, 107, 97, 0.18);
  border-radius: 8px;
  font-family: var(--font-typewriter);
  font-size: 12px;
  line-height: 1.55;
  cursor: text;
}

.note-history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.note-history-use,
.note-history-copy {
  min-height: 34px;
  padding: 0 11px;
  font-size: 12px;
}

.note-history-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.suggestion-chip:hover,
.note-history-card:hover {
  border-color: var(--clay);
}

.step-intro {
  margin-bottom: 12px;
}

.occasion-toggle {
  min-height: 38px;
  margin: -3px 0 14px;
  padding: 8px 11px;
}

.choice-group {
  margin-top: 12px;
}

.choice-group > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.mood-grid,
.memory-type-grid,
.priority-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 14px;
}

.mood-button,
.memory-type-button,
.priority-button,
.template-button {
  display: grid;
  width: 100%;
  text-align: left;
  background: var(--surface-control);
  border: 1px solid transparent;
  border-radius: 8px;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.mood-button:hover,
.memory-type-button:hover,
.priority-button:hover,
.template-button:hover {
  background: var(--surface-control-hover);
}

.mood-button:focus-visible,
.memory-type-button:focus-visible,
.priority-button:focus-visible,
.template-button:focus-visible {
  outline: none;
  border-color: rgba(32, 61, 54, 0.48);
  box-shadow: 0 0 0 3px rgba(32, 61, 54, 0.1);
}

.mood-button {
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 58px;
  padding: 10px;
}

.memory-type-button {
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 64px;
  padding: 10px;
}

.priority-button {
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 66px;
  padding: 10px;
}

.mood-button[aria-checked="true"],
.memory-type-button[aria-checked="true"],
.priority-button[aria-checked="true"],
.template-button[aria-pressed="true"] {
  background: var(--surface-selected);
  border-color: var(--surface-selected-border);
  box-shadow: none;
}

.mood-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  background: #e7dac3;
  border-radius: 50%;
  color: var(--green);
  font-family: var(--font-system);
  font-size: 12px;
  font-weight: 700;
}

.mood-button strong,
.mood-button small,
.memory-type-button strong,
.memory-type-button small,
.priority-button strong,
.priority-button small,
.template-button strong,
.template-button small {
  display: block;
}

.mood-button small,
.memory-type-button small,
.priority-button small,
.template-button small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.generate-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.7fr) minmax(170px, 1fr);
  gap: 10px;
  align-items: end;
  margin: 12px 0 10px;
}

.tone-select-field {
  margin: 0;
}

.tone-select-field span {
  margin-bottom: 5px;
}

.tone-select-field select {
  width: 100%;
  min-height: 48px;
  padding-right: 34px;
  background:
    linear-gradient(45deg, transparent 50%, rgba(49, 40, 29, 0.7) 50%) calc(100% - 18px) 52% / 6px 6px no-repeat,
    linear-gradient(135deg, rgba(49, 40, 29, 0.7) 50%, transparent 50%) calc(100% - 13px) 52% / 6px 6px no-repeat,
    rgba(251, 248, 240, 0.9);
  border-color: rgba(113, 107, 97, 0.3);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 500;
  appearance: none;
}

.tone-select-field small {
  display: block;
  min-height: 17px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.generate-row #generateButton {
  min-height: 48px;
}

.generate-feedback {
  min-height: 18px;
  margin: -3px 0 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.generate-feedback.is-ready {
  color: var(--green);
}

.generate-feedback.is-error {
  color: #8a4337;
}

.memory-form-section + .memory-form-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(113, 107, 97, 0.18);
}

.memory-form-heading {
  display: grid;
  gap: 2px;
  margin-bottom: 12px;
}

.memory-form-heading strong {
  color: var(--ink);
  font-size: 14px;
}

.memory-form-heading small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.memory-note-section #noteInput {
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.memory-note-section.is-note-ready #noteInput {
  background: rgba(247, 252, 247, 0.96);
  border-color: rgba(47, 90, 74, 0.72);
  box-shadow: 0 0 0 4px rgba(47, 90, 74, 0.13);
}

.helper {
  min-height: 20px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.ai-credit-hint {
  margin-top: 6px;
  color: #6f5a25;
  font-weight: 800;
}

.crop-panel {
  display: grid;
  gap: 12px;
  margin: 0 0 14px;
  padding: 14px;
  background: rgba(251, 248, 240, 0.52);
  border: 1px solid var(--surface-border);
  border-radius: var(--surface-radius);
}

.crop-panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.crop-panel-head span,
.crop-panel-head strong {
  display: block;
}

.crop-panel-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.crop-panel-head strong {
  margin-top: 2px;
  font-size: 14px;
}

.crop-preset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.crop-preset-button {
  display: grid;
  min-height: 92px;
  align-content: start;
  gap: 4px;
  padding: 10px;
  text-align: left;
  color: var(--ink);
  background: rgba(251, 248, 240, 0.62);
  border: 1px solid rgba(113, 107, 97, 0.22);
  border-radius: 8px;
}

.crop-preset-button[aria-checked="true"] {
  background: #fbf8f0;
  border-color: var(--clay);
  box-shadow: inset 0 0 0 1px rgba(111, 148, 132, 0.28);
}

.crop-preset-button strong,
.crop-preset-button small {
  display: block;
}

.crop-preset-button strong {
  font-size: 13px;
}

.crop-preset-button small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.crop-panel-helper {
  min-height: 0;
  margin: -2px 0 0;
}

.preview-crop-modes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  background: #f7f4ec;
  border: 1px solid #ddd7ca;
  border-radius: 10px;
}

.crop-mode-button {
  display: inline-flex;
  min-width: 0;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 8px 12px;
  color: #5f625c;
  background: transparent;
  border: 0;
  border-left: 1px solid #ddd7ca;
  border-radius: 0;
  box-shadow: none;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  transition: color 140ms ease, background-color 140ms ease;
}

.crop-mode-button:first-child {
  border-left: 0;
}

.crop-mode-button:disabled {
  cursor: default;
}

.crop-mode-button:not(:disabled):hover {
  color: #20483f;
  background: #edf2ee;
}

.crop-mode-button[aria-pressed="true"],
.crop-mode-button[aria-pressed="true"]:hover,
.crop-mode-button[aria-pressed="true"]:active,
.crop-mode-button[aria-pressed="true"]:focus-visible {
  color: #20483f;
  background: linear-gradient(135deg, #dfe8e2 0%, #e8ebe7 100%);
  box-shadow: none;
}

.crop-mode-button:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid rgba(32, 72, 63, 0.42);
  outline-offset: -3px;
}

.crop-mode-icon {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: currentColor;
}

.crop-mode-icon-position::before {
  position: absolute;
  inset: 1px;
  background: currentColor;
  clip-path: polygon(50% 0, 66% 16%, 57% 16%, 57% 43%, 84% 43%, 84% 34%, 100% 50%, 84% 66%, 84% 57%, 57% 57%, 57% 84%, 66% 84%, 50% 100%, 34% 84%, 43% 84%, 43% 57%, 16% 57%, 16% 66%, 0 50%, 16% 34%, 16% 43%, 43% 43%, 43% 16%, 34% 16%);
  content: "";
}

.crop-mode-icon-zoom::before {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 10px;
  height: 10px;
  border: 1.8px solid currentColor;
  border-radius: 50%;
  content: "";
}

.crop-mode-icon-zoom::after {
  position: absolute;
  right: 1px;
  bottom: 2px;
  width: 7px;
  height: 1.8px;
  background: currentColor;
  border-radius: 99px;
  content: "";
  transform: rotate(45deg);
  transform-origin: right center;
}

.crop-mode-icon-frame::before {
  position: absolute;
  inset: 2px;
  border: 1.8px solid currentColor;
  border-radius: 2px;
  content: "";
}

.preview-crop-dock {
  position: static;
  z-index: 8;
  display: grid;
  width: min(70vh, 100%);
  max-width: 640px;
  gap: 10px;
  margin: 10px auto 14px;
  padding: 10px;
  background: #f7f4ec;
  border: 1px solid #ddd7ca;
  border-radius: 12px;
  box-shadow: none;
}

.preview-crop-dock[hidden] {
  display: none !important;
}

.preview-crop-dock:focus-visible {
  outline: 2px solid rgba(42, 88, 76, 0.42);
  outline-offset: 3px;
}

.preview-crop-hint {
  min-width: 0;
  margin: 0;
  color: #716b61;
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
}

.preview-crop-footer {
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  padding: 0 4px;
}

.preview-crop-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
}

.preview-crop-reset {
  min-height: 30px;
  padding: 4px 2px;
  color: #376457;
  background: transparent;
  border: 0;
  border-radius: 5px;
  box-shadow: none;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.preview-crop-reset:hover,
.preview-crop-reset:focus-visible {
  color: #20483f;
  background: rgba(226, 235, 229, 0.72);
}

.preview-crop-reset:disabled {
  color: rgba(95, 98, 92, 0.46);
  background: transparent;
}

.preview-crop-reset[hidden] {
  display: none;
}

.preview-column {
  min-width: 0;
  padding-left: clamp(8px, 1.6vw, 24px);
  border-left: 1px solid rgba(113, 107, 97, 0.16);
}

.preview-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(70vh, 100%);
  max-width: 640px;
  margin: 2px auto 10px;
}

.preview-tools .eyebrow {
  margin: 0;
}

.preview-heading-accessible {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.preview-cue-header-slot {
  display: inline-flex;
  flex: 0 0 auto;
}

.preview-style-cue[hidden] {
  display: none !important;
}

.preview-style-cue {
  display: inline-flex;
  min-height: 32px;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 4px 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-family: var(--font-system);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.preview-style-cue svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.preview-style-cue:disabled {
  cursor: default;
  opacity: 0.76;
}

.preview-style-cue:disabled svg {
  display: none;
}

.preview-style-cue:not(:disabled) {
  padding: 6px 9px;
  color: var(--green);
  background: rgba(32, 61, 54, 0.07);
  border-radius: 999px;
  cursor: pointer;
}

.preview-style-cue:not(:disabled):hover {
  color: var(--archive-green);
}

.preview-style-cue[aria-pressed="true"] {
  padding-inline: 9px;
  color: #fbf8f0;
  background: var(--green);
  border-radius: 999px;
}

.preview-style-cue[aria-pressed="true"]:hover {
  color: #fbf8f0;
  background: var(--archive-green);
}

.preview-style-cue:focus-visible {
  border-radius: 4px;
  outline: 2px solid rgba(42, 88, 76, 0.46);
  outline-offset: 3px;
}

.preview-template-panel {
  width: min(640px, 100%);
  margin: 0 auto 12px;
  padding-bottom: 2px;
}

.appearance-compact {
  display: none;
}

.appearance-desktop {
  display: grid;
  gap: 16px;
}

.appearance-choice-section {
  min-width: 0;
}

.desktop-template-panel-slot[hidden] {
  display: none !important;
}

.desktop-template-panel-slot .preview-template-panel {
  width: 100%;
  margin: 0 0 12px;
}

.creator:not(.is-style-step) .preview-template-panel {
  display: none;
}

.preview-template-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.preview-template-heading span,
.preview-template-heading strong {
  display: block;
}

.preview-template-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.preview-template-heading strong {
  overflow: hidden;
  font-size: 14px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.template-button {
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 90px;
  padding: 8px;
}

.template-thumbnail,
.appearance-summary-thumbnail {
  --template-thumbnail-palette: linear-gradient(135deg, #eadfc9, #806b4e 58%, #f4ecdc);
  position: relative;
  display: block;
  width: 56px;
  aspect-ratio: 5 / 7;
  overflow: hidden;
  background: var(--template-thumbnail-palette);
  border: 1px solid rgba(46, 41, 33, 0.12);
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(46, 41, 33, 0.12);
}

.template-mini-page {
  position: absolute;
  inset: 3px;
  overflow: hidden;
  background: rgba(255, 253, 248, 0.72);
  border: 1px solid rgba(46, 41, 33, 0.12);
}

.template-mini-photo,
.template-mini-copy,
.template-mini-accent {
  position: absolute;
  z-index: 1;
  display: block;
}

.template-mini-photo {
  top: var(--mini-y);
  left: var(--mini-x);
  width: var(--mini-w);
  height: var(--mini-h);
  background: rgba(49, 88, 77, 0.68);
  border: 1px solid rgba(255, 253, 248, 0.9);
  box-shadow: 0 1px 2px rgba(46, 41, 33, 0.16);
  transform: rotate(var(--mini-rotate));
  transform-origin: center;
}

.template-mini-copy {
  left: 10%;
  height: 2.5%;
  background: rgba(46, 41, 33, 0.48);
  border-radius: 999px;
}

.template-mini-copy-title {
  bottom: 24%;
  width: 50%;
}

.template-mini-copy-note {
  bottom: 18%;
  width: 67%;
  opacity: 0.56;
}

.template-mini-accent {
  right: 9%;
  bottom: 8%;
  width: 18%;
  height: 9%;
  border: 1px solid rgba(111, 78, 48, 0.5);
  border-radius: 2px;
  transform: rotate(-4deg);
}

.template-thumbnail[data-template-id="old-book"] .template-mini-copy-title,
.appearance-summary-thumbnail[data-template-id="old-book"] .template-mini-copy-title {
  top: 18%;
  bottom: auto;
}

.template-thumbnail[data-template-id="old-book"] .template-mini-copy-note,
.appearance-summary-thumbnail[data-template-id="old-book"] .template-mini-copy-note {
  top: 24%;
  bottom: auto;
  width: 64%;
}

.template-thumbnail[data-template-id="film-roll"] .template-mini-page,
.appearance-summary-thumbnail[data-template-id="film-roll"] .template-mini-page,
.template-thumbnail[data-template-id="evening-letter"] .template-mini-page,
.appearance-summary-thumbnail[data-template-id="evening-letter"] .template-mini-page {
  background: rgba(29, 32, 30, 0.88);
}

.template-thumbnail[data-template-id="pressed-flower"] .template-mini-accent,
.appearance-summary-thumbnail[data-template-id="pressed-flower"] .template-mini-accent {
  width: 16%;
  height: 11%;
  border-radius: 50%;
}

.template-thumbnail[data-template-id="cafe-receipt"] .template-mini-page,
.appearance-summary-thumbnail[data-template-id="cafe-receipt"] .template-mini-page {
  inset: 3px 9px;
  box-shadow: 0 1px 4px rgba(46, 41, 33, 0.18);
}

.template-thumbnail[data-template-id="cafe-receipt"] .template-mini-copy,
.appearance-summary-thumbnail[data-template-id="cafe-receipt"] .template-mini-copy {
  left: 13%;
  width: 56%;
}

.template-thumbnail[data-template-id="evening-letter"] .template-mini-copy,
.appearance-summary-thumbnail[data-template-id="evening-letter"] .template-mini-copy {
  background: rgba(255, 253, 248, 0.68);
}

.template-button strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.selected-template-helper {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.paper-tone-field {
  min-width: 0;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid rgba(113, 107, 97, 0.16);
}

.paper-tone-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}

.paper-tone-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.paper-tone-heading strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.paper-tone-scroll-shell {
  position: relative;
  min-width: 0;
}

.paper-tone-scroll-shell::before,
.paper-tone-scroll-shell::after {
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 7px;
  width: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
  content: "";
}

.paper-tone-scroll-shell::before {
  left: 0;
  background: linear-gradient(90deg, var(--surface-strong), transparent);
}

.paper-tone-scroll-shell::after {
  right: 0;
  background: linear-gradient(270deg, var(--surface-strong), transparent);
}

.paper-tone-scroll-shell.can-scroll-left::before,
.paper-tone-scroll-shell.can-scroll-right::after {
  opacity: 1;
}

.paper-tone-scroll-cue {
  position: absolute;
  z-index: 3;
  top: 21px;
  right: 2px;
  color: var(--green);
  font-family: var(--font-system);
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translateX(1px);
  transition: opacity 160ms ease;
}

.paper-tone-scroll-shell.can-scroll-right .paper-tone-scroll-cue {
  opacity: 0.58;
}

.paper-tone-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  padding: 2px;
  scrollbar-width: none;
}

.paper-tone-grid::-webkit-scrollbar {
  display: none;
}

.paper-tone-button {
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 62px;
  grid-template-rows: 30px auto;
  place-items: center;
  gap: 4px;
  padding: 6px;
  color: var(--ink);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

.paper-tone-button:hover,
.paper-tone-button:focus-visible {
  background: rgba(32, 61, 54, 0.05);
  border-color: rgba(32, 61, 54, 0.18);
}

.paper-tone-button[aria-checked="true"] {
  background: rgba(32, 61, 54, 0.075);
  border-color: rgba(32, 61, 54, 0.5);
  box-shadow: inset 0 0 0 1px rgba(32, 61, 54, 0.12);
}

.paper-tone-swatch {
  display: block;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(46, 41, 33, 0.18);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(46, 41, 33, 0.1);
}

.paper-tone-helper {
  min-height: 17px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.appearance-picker {
  width: min(620px, calc(100% - 32px));
  max-height: min(760px, calc(100dvh - 40px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--navigation-background);
  border: 1px solid var(--surface-border-strong);
  border-radius: 8px;
  box-shadow: var(--shadow-overlay);
}

.appearance-picker[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.appearance-picker::backdrop {
  background: rgba(25, 35, 30, 0.32);
  backdrop-filter: blur(2px);
}

.appearance-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--surface-border);
}

.appearance-picker-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 680;
}

.appearance-picker-close {
  position: relative;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  background: transparent;
  border: 1px solid var(--surface-border-strong);
  border-radius: 50%;
}

.appearance-picker-close::before,
.appearance-picker-close::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 1.5px;
  background: currentColor;
  border-radius: 999px;
  content: "";
}

.appearance-picker-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.appearance-picker-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.appearance-picker-body {
  min-height: 0;
  padding: 14px 16px;
  overflow: auto;
}

.appearance-picker-panel[hidden] {
  display: none;
}

.appearance-picker-helper {
  min-height: 16px;
  margin: 0;
  padding: 12px 18px 15px;
  color: var(--muted);
  border-top: 1px solid var(--surface-border);
  font-size: 12px;
  line-height: 1.4;
}

.font-select-field {
  display: block;
  margin-top: 9px;
}

.typography-controls {
  display: grid;
  gap: 9px;
}

.font-select-field span {
  margin-bottom: 5px;
}

.font-select-field select {
  min-height: 40px;
}

.text-size-field {
  display: grid;
  gap: 5px;
  margin-top: 9px;
}

.text-size-field > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.text-size-stepper {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  min-height: 40px;
  overflow: hidden;
  background: rgba(251, 248, 240, 0.76);
  border: 1px solid rgba(113, 107, 97, 0.2);
  border-radius: 8px;
}

.text-size-stepper strong {
  display: grid;
  place-items: center;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.text-size-button {
  display: grid;
  min-width: 40px;
  place-items: center;
  color: var(--green);
  background: transparent;
  font-size: 19px;
  font-weight: 900;
}

.text-size-button:disabled {
  cursor: default;
  opacity: 0.38;
}

.preserve-color-field {
  flex-direction: row-reverse;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 50px;
  margin: 0;
  padding: 9px 0 0;
  border-top: 1px solid rgba(113, 107, 97, 0.18);
  cursor: pointer;
}

.preserve-color-field input {
  position: relative;
  flex: 0 0 auto;
  width: 48px;
  height: 28px;
  min-height: 28px;
  margin: 0;
  background: rgba(113, 107, 97, 0.28);
  border: 1px solid rgba(113, 107, 97, 0.28);
  border-radius: 999px;
  box-shadow: none;
  appearance: none;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.preserve-color-field input::before {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fbf8f0;
  border-radius: 50%;
  box-shadow: none;
  content: "";
  transition: transform 160ms ease;
}

.preserve-color-field input:checked {
  background: var(--green);
  border-color: var(--green);
  box-shadow: none;
}

.preserve-color-field input:checked::before {
  transform: translateX(20px);
}

.preserve-color-field input:focus-visible {
  outline: 3px solid rgba(88, 123, 120, 0.22);
  outline-offset: 3px;
}

.preserve-color-field span {
  flex: 1 1 auto;
  font-size: 14px;
}

.memory-finish-flow {
  width: 100%;
  scroll-margin-top: 78px;
}

.step-card.is-finishing > .section-title,
.step-card.is-finishing > .draft-save-strip,
.step-card.is-finishing > .desktop-template-panel-slot,
.step-card.is-finishing > .single-typography-controls,
.step-card.is-finishing > .moving-memory-controls,
.step-card.is-finishing > .moving-appearance-controls,
.step-card.is-finishing > .crop-panel,
.step-card.is-finishing > .keepsake-size-controls,
.step-card.is-finishing > .finish-actions {
  display: none !important;
}

.step-card.is-finishing {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.creator.is-finish-flow {
  display: block;
}

.creator.is-finish-flow .wizard-panel {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.creator.is-finish-flow .preview-column {
  display: none;
}

.memory-ready-screen,
.memory-checkout-screen {
  display: grid;
  gap: 18px;
}

.memory-ready-screen:not([hidden]),
.memory-checkout-screen:not([hidden]),
.memory-complete-panel:not([hidden]) {
  animation: journey-step-enter 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.memory-finish-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.memory-finish-heading h2,
.memory-order-summary h3 {
  margin: 0;
  font-family: var(--font-source-serif);
  font-weight: 400;
  letter-spacing: 0;
}

.memory-finish-heading h2 {
  font-size: clamp(30px, 4vw, 44px);
}

.memory-ready-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.28fr);
  gap: 28px;
  align-items: center;
}

.memory-ready-layout > *,
.memory-ready-copy,
.print-order-config,
.print-address-search,
.print-address-autocomplete {
  min-width: 0;
  max-width: 100%;
}

.memory-ready-preview {
  width: min(410px, 100%);
  margin: 0 auto;
}

.memory-ready-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 7;
  object-fit: contain;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(40, 51, 46, 0.12);
}

.memory-ready-preview figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
}

.memory-ready-preview figcaption strong {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.memory-ready-copy {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--surface-radius);
}

.memory-ready-check {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  place-items: center;
  color: var(--green);
  background: rgba(32, 61, 54, 0.09);
  border-radius: 50%;
}

.memory-ready-check svg,
.memory-saved-notice svg {
  width: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.memory-ready-copy > p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.memory-product-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 20px 0 0;
  padding: 0;
  border: 0;
}

.memory-product-option {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 13px;
  background: var(--surface-subtle);
  border: 1px solid var(--surface-border);
  border-radius: 7px;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.memory-product-option:has(input:checked) {
  background: rgba(32, 61, 54, 0.055);
  border-color: rgba(32, 61, 54, 0.48);
  box-shadow: 0 0 0 1px rgba(32, 61, 54, 0.08);
}

.memory-product-option:has(input:disabled) {
  opacity: 0.58;
  cursor: not-allowed;
}

.memory-product-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.memory-product-option > span,
.memory-product-option > span strong,
.memory-product-option > span small {
  display: block;
  min-width: 0;
}

.memory-product-option > span small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.memory-product-option > strong {
  align-self: start;
  color: var(--green);
  font-size: 13px;
  white-space: nowrap;
}

.memory-product-mark {
  display: grid !important;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--green);
  background: rgba(32, 61, 54, 0.08);
  border-radius: 6px;
}

.memory-product-mark svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.print-order-config {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--surface-border);
}

.print-order-config-heading,
.print-address-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.print-order-config-heading h3 {
  margin: 2px 0 0;
  font-family: var(--font-source-serif);
  font-size: 25px;
  font-weight: 400;
}

.print-order-config-heading > span,
.print-address-heading > span {
  padding: 5px 8px;
  color: var(--green);
  background: rgba(32, 61, 54, 0.075);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
  text-transform: uppercase;
}

.print-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.print-choice-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.print-choice-group legend {
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 900;
}

.print-choice-group > small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.print-segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  padding: 3px;
  background: var(--surface-muted);
  border-radius: 7px;
}

.print-segmented-control label {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.print-segmented-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.print-segmented-control span {
  display: block;
  padding: 8px 6px;
  color: var(--muted);
  border-radius: 5px;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.print-segmented-control input:checked + span {
  color: var(--green);
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(40, 51, 46, 0.1);
}

.print-address-heading {
  align-items: end;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--surface-border);
}

.print-address-heading strong,
.print-address-heading small {
  display: block;
}

.print-address-heading small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.print-address-search {
  margin-top: 13px;
}

.print-address-search > label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 900;
}

.print-address-autocomplete {
  position: relative;
  width: 100%;
}

.print-address-search-control {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 32px;
  gap: 9px;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 0 8px 0 12px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--surface-border-strong);
  border-radius: 6px;
}

.print-address-search-control:focus-within {
  border-color: rgba(32, 61, 54, 0.72);
  box-shadow: 0 0 0 3px rgba(32, 61, 54, 0.08);
}

.print-address-search-control > svg,
.print-address-search-control button svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.print-address-search-control input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 0;
  outline: 0;
  font: inherit;
  font-size: 14px;
}

.print-address-search-control input::-webkit-search-cancel-button {
  display: none;
}

.print-address-search-control button {
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  color: var(--muted);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.print-address-suggestions {
  position: absolute;
  z-index: 30;
  top: calc(100% + 5px);
  right: 0;
  left: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--surface-border-strong);
  border-radius: 7px;
  box-shadow: 0 12px 28px rgba(40, 51, 46, 0.16);
}

#printAddressSuggestionList {
  max-height: min(280px, 42vh);
  overflow-y: auto;
  overscroll-behavior: contain;
}

#printAddressSuggestionList button {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  color: var(--ink);
  background: var(--surface);
  border: 0;
  border-bottom: 1px solid var(--surface-border);
  font: inherit;
  font-size: 12px;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}

#printAddressSuggestionList button:hover,
#printAddressSuggestionList button:focus-visible,
#printAddressSuggestionList button.is-active {
  background: rgba(32, 61, 54, 0.06);
  outline: 0;
}

#printAddressSuggestionList button span {
  min-width: 0;
  overflow-wrap: anywhere;
}

#printAddressSuggestionList button svg {
  width: 18px;
  fill: none;
  stroke: var(--green);
  stroke-width: 1.7;
}

.print-address-attribution {
  padding: 7px 12px;
  color: #5e5e5e;
  background: var(--surface-subtle);
  font-family: Roboto, Arial, sans-serif;
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
  white-space: nowrap;
  text-align: right;
}

.print-address-suggestion-status {
  margin: 0;
  padding: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.print-manual-toggle {
  margin-top: 10px;
  padding: 0;
  color: var(--green);
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.print-address-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.print-recipient-field {
  display: block;
  margin-top: 18px;
}

.print-recipient-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.print-recipient-label-row label {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.print-recipient-label-row label small,
.print-recipient-field > small {
  color: var(--muted);
  font-weight: 600;
}

.print-recipient-label-row button {
  flex: 0 0 auto;
  padding: 2px 0;
  border: 0;
  color: var(--green);
  background: transparent;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.print-recipient-label-row button:hover {
  color: var(--green-dark);
}

.print-recipient-label-row button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--green) 30%, transparent);
  outline-offset: 3px;
}

.print-recipient-field input {
  width: 100%;
}

.print-recipient-field.is-invalid .print-recipient-label-row label,
.print-recipient-field.is-invalid .print-recipient-label-row label small,
.print-recipient-field.is-invalid > small {
  color: var(--danger);
}

.print-recipient-field input[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 13%, transparent);
}

.print-recipient-field input[aria-invalid="true"]:focus {
  outline-color: color-mix(in srgb, var(--danger) 22%, transparent);
}

.print-recipient-field > small {
  display: block;
  margin-top: 6px;
  font-size: 11px;
}

.print-address-fields .is-wide {
  grid-column: 1 / -1;
}

.print-address-fields label > span {
  display: block;
  margin-bottom: 5px;
  font-size: 11px;
  font-weight: 800;
}

.print-address-fields label > span small {
  color: var(--muted);
  font-weight: 500;
}

.print-address-fields input,
.print-address-fields select {
  width: 100%;
  min-width: 0;
}

.print-quote-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin-top: 13px;
  padding: 11px;
  color: var(--muted);
  background: var(--surface-subtle);
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.4;
}

.print-quote-indicator {
  width: 8px;
  height: 8px;
  background: var(--muted);
  border-radius: 50%;
}

.print-quote-summary.is-loading .print-quote-indicator {
  background: transparent;
  border: 2px solid rgba(32, 61, 54, 0.18);
  border-top-color: var(--green);
  animation: spin 700ms linear infinite;
}

.print-quote-summary.is-ready {
  color: var(--green);
  background: rgba(32, 61, 54, 0.07);
}

.print-quote-summary.is-ready .print-quote-indicator {
  background: var(--green);
}

.print-quote-summary.is-error {
  color: #8a4337;
  background: rgba(138, 67, 55, 0.07);
}

.print-quote-summary.is-error .print-quote-indicator {
  background: #8a4337;
}

.print-branding {
  margin-top: 12px;
  border: 1px solid var(--surface-border);
  border-radius: 7px;
}

.print-branding-toggle {
  display: grid;
  grid-template-columns: 18px 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  cursor: pointer;
}

.print-branding-toggle > input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--green);
}

.print-branding-toggle > img {
  width: 34px;
  height: 34px;
}

.print-branding-toggle span,
.print-branding-toggle strong,
.print-branding-toggle small {
  display: block;
  min-width: 0;
}

.print-branding-toggle strong {
  font-size: 12px;
}

.print-branding-toggle small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.print-branding-toggle > b {
  color: var(--green);
  font-size: 9px;
  text-transform: uppercase;
}

.print-branding-details {
  padding: 0 12px 12px;
  border-top: 1px solid var(--surface-border);
}

.print-branding-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 12px 0 0;
  padding: 0;
  border: 0;
}

.print-branding-choices > legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.print-branding-choices label {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  min-width: 0;
  padding: 10px;
  background: var(--surface-subtle);
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
}

.print-branding-choices label:has(input:checked) {
  background: rgba(32, 61, 54, 0.06);
  border-color: rgba(32, 61, 54, 0.42);
}

.print-branding-choices label.is-unavailable {
  opacity: 0.48;
  cursor: not-allowed;
}

.print-branding-choices input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.print-branding-choices span,
.print-branding-choices strong,
.print-branding-choices small {
  display: block;
  min-width: 0;
}

.print-branding-choices strong,
.print-branding-choices > label > b {
  color: var(--ink);
  font-size: 11px;
}

.print-branding-choices small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.print-branding-availability {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.print-branding-fields {
  display: grid;
  gap: 9px;
  margin-top: 10px;
}

.print-branding-fields label,
.print-branding-fields label > span {
  display: block;
}

.print-branding-fields label > span {
  margin-bottom: 5px;
  font-size: 10px;
  font-weight: 800;
}

.print-branding-fields label > span small {
  color: var(--muted);
  font-weight: 500;
}

.print-branding-fields input,
.print-branding-fields textarea {
  width: 100%;
  min-width: 0;
  resize: vertical;
}

#printPostcardFields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr);
  gap: 9px;
}

.memory-ready-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 20px 0;
}

.memory-ready-facts div {
  padding: 11px;
  background: var(--surface-subtle);
  border-radius: 6px;
}

.memory-ready-facts span,
.memory-ready-facts strong {
  display: block;
}

.memory-ready-facts span {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.memory-ready-facts strong {
  font-size: 13px;
}

.memory-saved-notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  margin-bottom: 18px;
  padding: 12px;
  color: var(--green);
  background: rgba(32, 61, 54, 0.07);
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.45;
}

.memory-saved-notice svg {
  width: 17px;
}

.memory-ready-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.memory-checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(290px, 0.7fr);
  gap: 18px;
  align-items: start;
}

.memory-checkout-panel,
.memory-order-summary {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--surface-radius);
}

.memory-checkout-section {
  padding: 22px;
}

.memory-checkout-section + .memory-checkout-section {
  border-top: 1px solid var(--surface-border);
}

.memory-checkout-section-heading strong,
.memory-checkout-section-heading small {
  display: block;
}

.memory-checkout-section-heading small {
  margin-top: 3px;
  color: var(--muted);
}

.memory-included-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.memory-included-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  padding: 11px;
  background: var(--surface-subtle);
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.4;
}

.memory-included-list li span {
  color: var(--green);
  font-weight: 900;
}

.memory-credit-choice,
.memory-payment-method {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--surface-border);
  border-radius: 6px;
}

.memory-check-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  cursor: pointer;
}

.memory-check-row input {
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  accent-color: var(--green);
}

.memory-check-row span,
.memory-check-row strong,
.memory-check-row small,
.memory-payment-method span,
.memory-payment-method strong,
.memory-payment-method small {
  display: block;
}

.memory-check-row small,
.memory-payment-method small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.memory-payment-method > span:last-child {
  padding: 5px 7px;
  color: var(--green);
  background: rgba(32, 61, 54, 0.08);
  border-radius: 5px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.memory-promo-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.memory-promo-status,
.memory-checkout-status {
  min-height: 17px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.memory-promo-status.is-success,
.memory-checkout-status.is-success {
  color: var(--green);
}

.memory-promo-status.is-error,
.memory-checkout-status.is-error {
  color: #8a4337;
}

.memory-order-summary {
  position: sticky;
  top: 88px;
  padding: 20px;
}

.memory-order-summary h3 {
  font-size: 28px;
}

.memory-summary-preview {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--surface-border);
}

.memory-summary-preview img {
  width: 68px;
  aspect-ratio: 5 / 7;
  object-fit: cover;
  border: 1px solid var(--surface-border);
  border-radius: 4px;
}

.memory-summary-preview span,
.memory-summary-preview strong,
.memory-summary-preview small {
  display: block;
}

.memory-summary-preview small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.memory-price-lines {
  display: grid;
  gap: 8px;
  padding: 16px 0;
  border-bottom: 1px solid var(--surface-border);
}

.memory-price-lines > div,
.memory-price-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.memory-price-lines > div {
  color: var(--muted);
  font-size: 12px;
}

.memory-price-lines strong {
  flex: 0 0 auto;
  color: var(--ink);
  white-space: nowrap;
}

.memory-price-lines .is-credit strong {
  color: var(--green);
}

.memory-price-total {
  padding: 17px 0;
}

.memory-price-total > span {
  flex: 0 0 auto;
  font-weight: 900;
  white-space: nowrap;
}

.memory-price-total strong {
  font-family: var(--font-source-serif);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.08;
  text-align: right;
}

.memory-refund-note {
  margin: 12px 0 0;
  padding: 10px 11px;
  color: var(--muted);
  background: var(--surface-subtle);
  border-left: 3px solid rgba(32, 61, 54, 0.32);
  border-radius: 0 5px 5px 0;
  font-size: 11px;
  line-height: 1.45;
}

.memory-approval-row {
  margin-bottom: 12px;
  padding: 11px;
  background: var(--surface-subtle);
  border-radius: 6px;
}

.memory-order-summary > .primary-button {
  width: 100%;
}

.print-order-list {
  display: grid;
  gap: 12px;
}

.print-order-card {
  overflow: hidden;
  background: var(--surface-subtle);
  border: 1px solid var(--surface-border);
  border-radius: 7px;
}

.print-order-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 14px;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.print-order-summary:hover {
  background: rgba(32, 61, 54, 0.025);
}

.print-order-summary:focus-visible {
  outline: 2px solid rgba(32, 61, 54, 0.34);
  outline-offset: -3px;
}

.print-order-summary-copy,
.print-order-summary-copy strong,
.print-order-summary-copy small,
.print-order-summary-state,
.print-order-summary-state small {
  display: block;
  min-width: 0;
}

.print-order-summary-copy strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.print-order-summary-copy small,
.print-order-summary-state small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.print-order-summary-state {
  text-align: right;
}

.print-order-chevron {
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--green);
  border-bottom: 1.5px solid var(--green);
  transform: rotate(45deg) translate(-2px, 2px);
  transition: transform 180ms ease;
}

.print-order-card.is-expanded .print-order-chevron {
  transform: rotate(225deg) translate(-2px, 2px);
}

.print-order-details {
  padding: 0 16px 16px;
  border-top: 1px solid var(--surface-border);
}

.print-order-details[hidden] {
  display: none;
}

.print-order-meta,
.print-order-route,
.print-order-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.print-order-route,
.print-order-meta {
  color: var(--muted);
  font-size: 11px;
}

.print-order-status {
  flex: 0 0 auto;
  padding: 5px 8px;
  color: var(--green);
  background: rgba(32, 61, 54, 0.08);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.print-order-status.is-problem,
.print-order-status.is-cancelled {
  color: #8a4337;
  background: rgba(138, 67, 55, 0.08);
}

.print-order-timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 18px 0 4px;
  padding: 0;
  list-style: none;
}

.print-order-timeline-step {
  position: relative;
  min-width: 0;
  color: var(--muted);
  text-align: center;
}

.print-order-timeline-step:not(:first-child)::before {
  position: absolute;
  top: 5px;
  right: 50%;
  width: 100%;
  height: 2px;
  background: var(--surface-border);
  content: "";
}

.print-order-timeline-step.is-complete::before,
.print-order-timeline-step.is-current::before {
  background: rgba(32, 61, 54, 0.68);
}

.print-order-timeline-step > span {
  position: relative;
  z-index: 1;
  display: block;
  width: 12px;
  height: 12px;
  margin: 0 auto 7px;
  background: var(--surface-subtle);
  border: 2px solid var(--surface-border);
  border-radius: 50%;
}

.print-order-timeline-step.is-complete > span,
.print-order-timeline-step.is-current > span {
  background: var(--green);
  border-color: var(--green);
}

.print-order-timeline-step.is-current > span {
  box-shadow: 0 0 0 4px rgba(32, 61, 54, 0.1);
}

.print-order-timeline-step.is-current small,
.print-order-timeline-step.is-complete small {
  color: var(--ink);
}

.print-order-timeline.has-problem .print-order-timeline-step.is-current > span,
.print-order-timeline.is-cancelled .print-order-timeline-step.is-current > span {
  background: #8a4337;
  border-color: #8a4337;
  box-shadow: 0 0 0 4px rgba(138, 67, 55, 0.08);
}

.print-order-timeline-step small {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
}

.print-order-meta {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 12px;
}

.print-order-meta span + span::before {
  margin-right: 12px;
  content: "·";
}

.print-order-route {
  align-items: start;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--surface-border);
}

.print-order-route strong {
  color: var(--ink);
  font-size: 11px;
  text-align: right;
}

.print-order-dispatch,
.print-order-reference {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.print-order-dispatch strong,
.print-order-reference strong {
  color: var(--ink);
  text-align: right;
}

.print-order-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 13px;
}

.print-order-actions .danger-button,
.print-order-actions .secondary-button,
.print-order-actions .ghost-button {
  min-height: 36px;
  padding: 7px 10px;
  font-size: 11px;
}

.print-order-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.print-order-note.is-problem {
  color: #8a4337;
}

/* Account histories use a clean product shell; keepsake imagery carries the archival character. */
:is(#draftHistorySection, #exportHistorySection, #giftHistorySection, #printOrderHistorySection) > .menu-page-card {
  gap: 18px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

:is(#draftHistorySection, #exportHistorySection, #giftHistorySection, #printOrderHistorySection) > .menu-page-card > .history-section-head {
  display: grid;
  gap: 4px;
  padding: 0 2px 15px;
  border-bottom: 1px solid rgba(40, 51, 46, 0.12);
}

:is(#draftHistorySection, #exportHistorySection, #giftHistorySection, #printOrderHistorySection) > .menu-page-card > .history-section-head strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 720;
  line-height: 1.25;
}

:is(#draftHistorySection, #exportHistorySection, #giftHistorySection, #printOrderHistorySection) > .menu-page-card > .history-section-head small {
  color: rgba(82, 88, 83, 0.78);
  font-size: 13px;
  font-weight: 480;
  line-height: 1.45;
}

:is(#draftMemoryList, #exportMemoryList, #printOrderList) {
  gap: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(40, 51, 46, 0.11);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(40, 51, 46, 0.035);
}

:is(#draftMemoryList, #exportMemoryList) .memory-card {
  gap: 10px;
  padding: 17px 16px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(40, 51, 46, 0.09);
  border-radius: 0;
  transition: background-color 160ms ease;
}

:is(#draftMemoryList, #exportMemoryList) .memory-card:last-child {
  border-bottom: 0;
}

:is(#draftMemoryList, #exportMemoryList) .memory-card:hover {
  background: rgba(232, 239, 235, 0.34);
}

:is(#draftMemoryList, #exportMemoryList) .memory-card-main {
  gap: 5px;
}

:is(#draftMemoryList, #exportMemoryList) .memory-card-main > strong {
  color: #24312c;
  font-size: 16px;
  font-weight: 720;
  line-height: 1.3;
}

:is(#draftMemoryList, #exportMemoryList) .memory-card-main > span:not(.memory-meta) {
  color: rgba(82, 88, 83, 0.74);
  font-size: 12px;
  font-weight: 480;
  line-height: 1.4;
}

:is(#draftMemoryList, #exportMemoryList) .memory-meta {
  align-items: center;
  margin-bottom: 2px;
}

:is(#draftMemoryList, #exportMemoryList) .memory-meta > span:last-child {
  color: rgba(82, 88, 83, 0.68);
  font-size: 11px;
  font-weight: 560;
}

:is(#draftMemoryList, #exportMemoryList) .memory-product-badge {
  padding: 3px 7px;
  background: #f4f5f1;
  border-color: rgba(40, 51, 46, 0.14);
  font-size: 10px;
  font-weight: 720;
}

:is(#draftMemoryList, #exportMemoryList) .memory-delete-button {
  width: 32px;
  height: 32px;
  color: rgba(59, 77, 69, 0.72);
  background: transparent;
  border-color: transparent;
}

:is(#draftMemoryList, #exportMemoryList) .memory-delete-button:hover,
:is(#draftMemoryList, #exportMemoryList) .memory-delete-button:focus-visible {
  color: #8f3f45;
  background: rgba(143, 63, 69, 0.07);
  border-color: rgba(143, 63, 69, 0.12);
}

#exportMemoryList .memory-card-actions {
  justify-content: flex-start;
}

#exportMemoryList .export-download-link {
  flex: 0 1 210px;
  min-height: 34px;
  margin-top: 0;
  background: transparent;
  border-color: rgba(32, 61, 54, 0.24);
  font-size: 12px;
}

#giftHistorySection .gift-history-organized {
  gap: 16px;
}

#giftHistorySection .gift-history-summary,
#giftHistorySection .gift-occasion-head {
  padding-right: 2px;
  padding-left: 2px;
}

#giftHistorySection .gift-recipient-chip {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(40, 51, 46, 0.11);
}

#giftHistorySection .gift-recipient-chip.is-active {
  color: var(--green);
  background: var(--surface-selected);
  border-color: var(--surface-selected-border);
}

#giftHistorySection .gift-history-card {
  background: rgba(255, 255, 255, 0.76);
  border-color: rgba(40, 51, 46, 0.11);
  box-shadow: 0 8px 24px rgba(40, 51, 46, 0.035);
}

#giftHistorySection .gift-history-thumb {
  background: #f1f1ec;
  border-color: rgba(40, 51, 46, 0.1);
}

#giftHistorySection :is(.gift-summary-stat, .gift-card-stat) {
  background: rgba(248, 249, 246, 0.9);
  border-color: rgba(40, 51, 46, 0.09);
}

#printOrderList .print-order-card {
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(40, 51, 46, 0.09);
  border-radius: 0;
}

#printOrderList .print-order-card:last-child {
  border-bottom: 0;
}

#printOrderList .print-order-summary {
  padding: 17px 16px;
  transition: background-color 160ms ease;
}

#printOrderList .print-order-summary:hover {
  background: rgba(232, 239, 235, 0.34);
}

#printOrderList .print-order-summary-copy strong {
  font-size: 16px;
  font-weight: 720;
}

#printOrderList .print-order-summary-copy small,
#printOrderList .print-order-summary-state small {
  color: rgba(82, 88, 83, 0.7);
  font-size: 11px;
  font-weight: 480;
}

#printOrderList .print-order-status {
  padding: 4px 7px;
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0.035em;
}

#printOrderList .print-order-details {
  margin: 0 16px 16px;
  padding: 16px 0 0;
  border-top-color: rgba(40, 51, 46, 0.1);
}

@media (max-width: 640px) {
  :is(#draftHistorySection, #exportHistorySection, #giftHistorySection, #printOrderHistorySection) > .menu-page-card {
    gap: 14px;
  }

  :is(#draftMemoryList, #exportMemoryList) .memory-card,
  #printOrderList .print-order-summary {
    padding: 14px 13px;
  }

  :is(#draftMemoryList, #exportMemoryList) .memory-card-main > strong,
  #printOrderList .print-order-summary-copy strong {
    font-size: 15px;
  }

  #exportMemoryList .export-download-link {
    flex-basis: 100%;
    width: 100%;
  }

  #printOrderList .print-order-details {
    margin: 0 13px 14px;
  }
}

/* Credits, profile, and sign-in use the same calm modern shell as account histories. */
#creditsSection {
  gap: 26px;
}

.payment-confirmation {
  margin: 0;
  padding: 13px 16px;
  color: var(--green);
  font-weight: 700;
  background: rgba(225, 235, 229, 0.78);
  border: 1px solid rgba(32, 61, 54, 0.18);
  border-radius: var(--surface-radius);
}

#creditsSection .menu-page-grid {
  grid-template-areas:
    "balance packs"
    "balance promo";
  grid-template-columns: minmax(250px, 0.72fr) minmax(0, 1.28fr);
  gap: 12px 18px;
}

#creditsSection .menu-credit-card {
  grid-area: balance;
  min-height: 100%;
  align-content: end;
  gap: 8px;
  padding: 24px;
  background: var(--green);
  border: 0;
  box-shadow: 0 12px 30px rgba(32, 61, 54, 0.11);
}

#creditsSection .menu-credit-card strong {
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 650;
}

#creditsSection .menu-credit-card span,
#creditsSection .menu-credit-card small {
  max-width: 250px;
  font-weight: 520;
  line-height: 1.45;
}

#creditsSection .menu-page-grid > .menu-page-card {
  padding: 18px 0 0;
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(40, 51, 46, 0.12);
  border-radius: 0;
}

#creditsSection .menu-page-grid > .menu-page-card:nth-child(2) {
  grid-area: packs;
}

#creditsSection .menu-page-grid > .menu-page-card:nth-child(3) {
  grid-area: promo;
}

#creditsSection .history-section-head {
  display: grid;
  gap: 4px;
}

#creditsSection .history-section-head strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 720;
}

#creditsSection .history-section-head small {
  color: rgba(82, 88, 83, 0.76);
  font-size: 12px;
  font-weight: 480;
}

#creditsSection .credit-pack-grid {
  gap: 7px;
}

#creditsSection .credit-pack-button {
  min-height: 44px;
  color: var(--green);
  background: rgba(255, 255, 255, 0.74);
  border-color: rgba(40, 51, 46, 0.12);
  font-weight: 720;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

#creditsSection .credit-pack-button:hover,
#creditsSection .credit-pack-button:focus-visible {
  background: #fff;
  border-color: rgba(32, 61, 54, 0.32);
  transform: translateY(-1px);
}

#creditsSection .discount-code-row input {
  background: rgba(255, 255, 255, 0.76);
  border-color: rgba(40, 51, 46, 0.14);
}

#creditsSection .discount-code-row .ghost-button {
  background: transparent;
}

#creditsSection > .menu-page-card {
  gap: 16px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

#creditsSection > .menu-page-card > .history-section-head {
  padding: 0 2px 14px;
  border-bottom: 1px solid rgba(40, 51, 46, 0.12);
}

#creditsSection .credit-rates,
#creditsSection .credit-ledger-list,
#creditsSection .payment-history-list {
  gap: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(40, 51, 46, 0.11);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(40, 51, 46, 0.035);
}

#creditsSection .credit-rates {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#creditsSection :is(.credit-rates span, .credit-ledger-item, .payment-history-item) {
  min-height: 46px;
  padding: 12px 14px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(40, 51, 46, 0.08);
  border-radius: 0;
  font-size: 12px;
  font-weight: 480;
}

#creditsSection .credit-rates span:nth-child(odd) {
  border-right: 1px solid rgba(40, 51, 46, 0.08);
}

#creditsSection .credit-rates span:nth-last-child(-n + 2),
#creditsSection :is(.credit-ledger-item, .payment-history-item):last-child {
  border-bottom: 0;
}

#creditsSection :is(.credit-rates strong, .credit-ledger-item strong, .payment-history-item strong) {
  font-weight: 700;
}

#accountSection .profile-page-card {
  width: min(820px, 100%);
  gap: 28px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

#accountSection .profile-page-intro {
  align-items: center;
  padding: 18px 0 24px;
  border-top: 1px solid rgba(40, 51, 46, 0.12);
  border-bottom-color: rgba(40, 51, 46, 0.12);
}

#accountSection .account-profile-card {
  gap: 14px;
}

#accountSection .account-page-avatar {
  width: 48px;
  height: 48px;
  background: rgba(232, 239, 235, 0.82);
  border-color: rgba(32, 61, 54, 0.14);
  border-radius: 12px;
}

#accountSection .account-profile-card strong {
  font-size: 17px;
  font-weight: 720;
}

#accountSection .account-profile-card small,
#accountSection .profile-page-intro > p,
#accountSection .profile-sign-in-prompt p {
  color: rgba(82, 88, 83, 0.76);
  font-weight: 480;
}

#accountSection .profile-details-form {
  gap: 20px;
}

#accountSection .profile-field {
  gap: 8px;
  font-size: 13px;
  font-weight: 680;
}

#accountSection .profile-field :is(input, .profile-readonly-value) {
  min-height: 50px;
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(40, 51, 46, 0.14);
}

#accountSection .profile-readonly-value {
  color: rgba(82, 88, 83, 0.78);
  font-weight: 520;
}

#accountSection .profile-form-actions {
  padding-top: 2px;
}

#accountSection .profile-form-actions .primary-button {
  min-width: 150px;
}

#accountSection .profile-sign-in-prompt {
  padding: 18px 0;
  border-top: 1px solid rgba(40, 51, 46, 0.12);
}

.menu-page-screen.is-sign-in-page {
  background: var(--app-background);
}

.menu-page-screen.is-sign-in-page .menu-page-shell {
  width: min(760px, 100%);
}

.sign-in-layout {
  width: min(620px, 100%);
}

.sign-in-card {
  min-height: 540px;
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(40, 51, 46, 0.11);
  box-shadow: 0 14px 38px rgba(40, 51, 46, 0.055);
  backdrop-filter: none;
}

.sign-in-card-body {
  width: min(470px, calc(100% - 48px));
  gap: 24px;
  padding: 52px 0 40px;
}

.sign-in-card-head {
  gap: 10px;
}

.sign-in-card-head h2 {
  color: #24312c;
  font-size: clamp(32px, 4vw, 42px);
  font-weight: 620;
}

.sign-in-card-head p:not(.eyebrow) {
  color: rgba(82, 88, 83, 0.78);
  font-weight: 480;
}

.email-auth-field {
  font-weight: 680;
}

.email-auth-field input,
.email-auth-selected,
.sign-in-provider {
  background: #fff;
  border-color: rgba(40, 51, 46, 0.14);
}

.email-auth-field input {
  font-weight: 520;
}

.email-auth-status {
  color: rgba(82, 88, 83, 0.74);
  font-weight: 520;
}

.email-auth-selected {
  font-weight: 600;
}

.sign-in-provider {
  min-height: 56px;
}

.sign-in-provider-active:hover {
  background: #fff;
  border-color: rgba(32, 61, 54, 0.3);
  box-shadow: 0 6px 18px rgba(40, 51, 46, 0.045);
}

.sign-in-card-foot {
  min-height: 68px;
  padding: 16px;
  background: transparent;
  border-top-color: rgba(40, 51, 46, 0.1);
  font-weight: 580;
}

@media (max-width: 1020px) {
  #creditsSection .menu-page-grid {
    grid-template-areas:
      "balance"
      "packs"
      "promo";
    grid-template-columns: minmax(0, 1fr);
  }

  #creditsSection .menu-credit-card {
    min-height: 190px;
  }
}

@media (max-width: 640px) {
  #creditsSection {
    gap: 22px;
  }

  #creditsSection .menu-page-grid {
    gap: 18px;
  }

  #creditsSection .menu-credit-card {
    min-height: 156px;
    padding: 20px;
  }

  #creditsSection .menu-credit-card strong {
    font-size: 34px;
  }

  #creditsSection .credit-pack-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #creditsSection .discount-code-row {
    grid-template-columns: minmax(0, 1fr) 84px;
  }

  #creditsSection .credit-rates {
    grid-template-columns: minmax(0, 1fr);
  }

  #creditsSection .credit-rates span:nth-child(odd) {
    border-right: 0;
  }

  #creditsSection .credit-rates span:nth-last-child(2) {
    border-bottom: 1px solid rgba(40, 51, 46, 0.08);
  }

  #accountSection .profile-page-card {
    gap: 22px;
    padding: 0;
  }

  #accountSection .profile-page-intro {
    gap: 16px;
    padding: 16px 0 20px;
  }

  #accountSection .profile-sign-in-prompt {
    padding: 16px 0;
  }

  .menu-page-screen.is-sign-in-page {
    padding: 18px 14px 28px;
  }

  .sign-in-card {
    min-height: auto;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .sign-in-card-body {
    width: 100%;
    gap: 20px;
    padding: 24px 0 22px;
  }

  .sign-in-card-head h2 {
    font-size: 34px;
    line-height: 1.08;
  }

  .sign-in-provider {
    min-height: 58px;
    padding: 8px 13px;
  }

  .sign-in-card-foot {
    min-height: 60px;
    padding: 15px 0;
  }
}

/* The navigation drawer is a modern product surface, separate from keepsake styling. */
.side-panel-backdrop {
  background: rgba(25, 35, 30, 0.22);
  backdrop-filter: blur(2px);
}

.side-panel {
  width: min(372px, calc(100vw - 18px));
  gap: 0;
  padding: 20px 16px 18px;
  background: var(--navigation-background);
  border-right-color: rgba(40, 51, 46, 0.11);
  box-shadow: 18px 0 46px rgba(31, 42, 36, 0.12);
  backdrop-filter: blur(24px) saturate(1.06);
}

.side-panel-head {
  align-items: center;
  padding: 2px 2px 17px;
  border-bottom: 1px solid rgba(40, 51, 46, 0.1);
}

.side-panel-head .eyebrow {
  margin-bottom: 5px;
  color: rgba(82, 88, 83, 0.68);
  font-size: 10px;
  font-weight: 720;
  letter-spacing: 0.08em;
}

.side-panel-head strong {
  color: #24312c;
  font-size: 18px;
  font-weight: 680;
  line-height: 1.2;
}

.side-panel-head small {
  max-width: 250px;
  margin-top: 3px;
  color: rgba(82, 88, 83, 0.7);
  font-size: 12px;
  font-weight: 480;
}

.profile-close {
  position: relative;
  width: 36px;
  height: 36px;
  overflow: hidden;
  color: transparent;
  background: transparent;
  border: 1px solid rgba(40, 51, 46, 0.1);
  border-radius: 10px;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.profile-close::before,
.profile-close::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 15px;
  height: 1.6px;
  background: rgba(32, 61, 54, 0.82);
  border-radius: 999px;
  content: "";
}

.profile-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.profile-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.profile-close:hover,
.profile-close:focus-visible {
  background: rgba(232, 239, 235, 0.72);
  border-color: rgba(32, 61, 54, 0.18);
}

.profile-status {
  margin: 0;
  padding: 14px 2px 15px;
  color: rgba(82, 88, 83, 0.74);
  border-bottom: 1px solid rgba(40, 51, 46, 0.1);
  font-size: 12px;
  font-weight: 480;
  line-height: 1.45;
}

.side-menu {
  gap: 0;
  padding: 8px 0;
}

.history-tab {
  grid-template-columns: 38px minmax(0, 1fr) 18px;
  gap: 11px;
  min-height: 62px;
  padding: 8px 9px 8px 7px;
  border-bottom: 1px solid rgba(40, 51, 46, 0.07);
  border-radius: 0;
  font-weight: 600;
  transition: background-color 160ms ease, color 160ms ease;
}

.history-tab:last-child {
  border-bottom-color: transparent;
}

.history-tab:has(+ .history-tab.is-active) {
  border-bottom-color: transparent;
}

.history-tab:hover,
.history-tab:focus-visible {
  background: rgba(232, 239, 235, 0.42);
}

.history-tab.is-active {
  background: var(--surface-navigation-selected);
  border-bottom-color: transparent;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px var(--surface-navigation-selected-border);
}

.history-tab strong {
  color: #28332e;
  font-size: 14px;
  font-weight: 680;
  line-height: 1.2;
}

.history-tab small {
  margin-top: 3px;
  color: rgba(82, 88, 83, 0.67);
  font-size: 11px;
  font-weight: 480;
  line-height: 1.3;
}

.history-tab.is-active strong,
.history-tab.is-active small {
  color: var(--green);
}

.side-menu-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
}

.side-menu-mark svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.7;
}

.history-tab.is-active .side-menu-mark {
  color: var(--green);
}

.side-menu-arrow {
  position: relative;
  width: 18px;
  height: 18px;
  overflow: hidden;
  color: transparent;
}

.side-menu-arrow::after {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 6px;
  height: 6px;
  border-top: 1.5px solid rgba(40, 51, 46, 0.44);
  border-right: 1.5px solid rgba(40, 51, 46, 0.44);
  content: "";
  transform: rotate(45deg);
}

.history-tab.is-active .side-menu-arrow::after {
  border-color: rgba(32, 61, 54, 0.72);
}

.side-credit-balance {
  color: inherit;
  font-weight: 680;
}

.side-panel-actions {
  margin-top: auto;
  padding: 16px 0 0;
  border-top: 0;
}

.side-panel-actions .primary-button,
.side-panel-actions .ghost-button {
  min-height: 44px;
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .side-panel {
    width: min(360px, calc(100vw - 14px));
    padding: calc(16px + env(safe-area-inset-top)) 14px calc(16px + env(safe-area-inset-bottom));
  }

  .side-panel-head {
    padding-bottom: 15px;
  }

  .history-tab {
    min-height: 60px;
  }

  .side-panel .profile-close {
    width: 36px;
    height: 36px;
    background: transparent;
    border-color: rgba(40, 51, 46, 0.1);
  }
}

.memory-complete-panel {
  margin-top: 0;
  padding: 22px;
}

.export-tray {
  display: grid;
  grid-template-areas:
    "preview copy"
    "preview actions";
  grid-template-columns: minmax(96px, 118px) minmax(0, 1fr);
  align-items: center;
  gap: 10px 16px;
  margin-bottom: 18px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--surface-radius);
  box-shadow: none;
}

.step-card .export-tray {
  margin: 12px 0 0;
}

.export-tray img {
  grid-area: preview;
  display: block;
  width: 100%;
  aspect-ratio: 5 / 7;
  height: auto;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid rgba(113, 107, 97, 0.24);
}

.export-tray:has(img[hidden]) {
  grid-template-areas:
    "copy"
    "actions";
  grid-template-columns: minmax(0, 1fr);
}

.export-tray-copy {
  grid-area: copy;
  min-width: 0;
}

.export-tray strong,
.export-tray span {
  display: block;
}

.export-tray span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.export-tray:focus {
  outline: 3px solid rgba(88, 123, 120, 0.2);
  outline-offset: 4px;
}

.export-tray-actions,
.gift-send-actions,
.gift-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.export-tray-actions {
  grid-area: actions;
  justify-content: flex-start;
}

.gift-icon-button {
  display: inline-flex;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  color: var(--green);
  background: transparent;
  border: 0;
  border-radius: 50%;
  box-shadow: none;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.gift-icon-button:hover,
.gift-icon-button:focus-visible {
  color: var(--green);
  background: rgba(32, 61, 54, 0.08);
  transform: translateY(-1px);
}

.gift-icon-button.is-copied {
  color: var(--green);
  background: rgba(32, 61, 54, 0.1);
}

.gift-icon-button svg {
  width: 24px;
  height: 24px;
}

.gift-copy-icon {
  display: inline-flex;
  transform: translate(1px, 1px);
}

.gift-icon-button svg path,
.gift-icon-button svg rect,
.gift-icon-button svg circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gift-copy-feedback {
  flex: 1 1 100%;
  min-height: 16px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.export-tray-actions .primary-button,
.export-tray-actions .secondary-button,
.export-tray-actions .ghost-button {
  min-height: 40px;
  white-space: nowrap;
}

.gift-send-panel {
  display: grid;
  gap: 20px;
  margin: 0 0 24px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.gift-flow-screen {
  display: grid;
  gap: 24px;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.gift-flow-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 18px 0 20px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(40, 51, 46, 0.12);
  border-radius: 0;
  box-shadow: none;
}

.gift-flow-heading h1 {
  max-width: 680px;
  margin: 0;
  font-family: var(--font-source-serif);
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 400;
  line-height: 1;
}

.gift-flow-heading p:last-child {
  max-width: 620px;
  margin: 10px 0 0;
  color: var(--muted);
  font-family: var(--font-source-serif);
  font-size: 19px;
  line-height: 1.4;
}

.gift-send-workspace {
  display: grid;
  grid-template-columns: minmax(290px, 0.78fr) minmax(420px, 1.22fr);
  gap: clamp(28px, 4vw, 52px);
  align-items: start;
}

.gift-send-editor {
  display: grid;
  gap: 20px;
  min-width: 0;
  padding-top: 8px;
}

.gift-send-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.gift-send-head strong,
.gift-send-head small,
.gift-share-preview strong,
.gift-share-preview span,
.gift-status {
  display: block;
}

.gift-send-head strong {
  font-family: var(--font-source-serif);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.1;
}

.gift-send-head small,
.gift-share-preview span,
.gift-status {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.gift-form-grid {
  display: grid;
  grid-template-columns: minmax(160px, 0.7fr) minmax(240px, 1.3fr);
  gap: 12px;
}

.gift-send-editor .gift-form-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.gift-form-grid label {
  display: grid;
  gap: 7px;
}

.gift-form-grid textarea {
  min-height: 128px;
  resize: vertical;
}

.gift-share-preview {
  padding: 13px 0 0;
  background: transparent;
  border-top: 1px solid rgba(40, 51, 46, 0.1);
  border-radius: 0;
}

.gift-share-preview strong {
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.gift-share-preview span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.gift-live-preview {
  min-width: 0;
  padding: 10px;
  background: rgba(239, 240, 235, 0.72);
  border: 1px solid rgba(40, 51, 46, 0.11);
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(31, 42, 36, 0.09);
}

.gift-live-preview-head {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 32px;
  padding: 0 5px 9px;
  color: var(--green);
  font-size: 11px;
  font-weight: 720;
  letter-spacing: 0;
}

.gift-live-preview-head i {
  height: 1px;
  flex: 1;
  background: rgba(40, 51, 46, 0.12);
}

.gift-live-preview-head small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 620;
}

.gift-live-reveal {
  display: grid;
  gap: clamp(18px, 2.8vw, 30px);
  min-height: 540px;
  padding: clamp(22px, 3.2vw, 38px);
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.2)),
    repeating-linear-gradient(90deg, rgba(91, 74, 47, 0.025) 0 1px, transparent 1px 7px),
    #f7f1e7;
  border: 1px solid rgba(118, 100, 71, 0.17);
  border-radius: 6px;
}

.gift-live-brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.gift-live-brand img {
  width: 30px;
  height: 30px;
}

.gift-live-brand strong,
.gift-live-brand small {
  display: block;
}

.gift-live-brand strong {
  display: inline-flex;
  color: var(--green);
  font-family: var(--font-source-serif);
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
}

.gift-live-brand small {
  margin-top: 2px;
  color: #756e64;
  font-size: 9px;
  font-weight: 620;
}

.gift-live-copy {
  min-width: 0;
}

.gift-live-copy h2 {
  max-width: 580px;
  margin: 0;
  color: #26362f;
  font-family: var(--font-source-serif);
  font-size: clamp(30px, 4.5vw, 50px);
  font-weight: 400;
  line-height: 1.02;
  overflow-wrap: anywhere;
}

.gift-live-copy > p:last-child {
  max-width: 560px;
  margin: 13px 0 0;
  color: #5c5145;
  font-family: var(--font-source-serif);
  font-size: clamp(15px, 1.8vw, 19px);
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.gift-live-memory {
  position: relative;
  display: grid;
  min-height: 210px;
  place-items: center;
  overflow: hidden;
  background: rgba(255, 253, 247, 0.58);
  border: 1px solid rgba(118, 100, 71, 0.15);
}

.gift-live-memory img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 300px;
  object-fit: contain;
}

.gift-live-memory span {
  max-width: 180px;
  color: #82796d;
  font-family: var(--font-source-serif);
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}

.gift-live-privacy {
  color: #756e64;
  font-size: 10px;
  font-weight: 620;
  text-align: center;
}

.gift-delivery-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(40, 51, 46, 0.12);
}

.gift-delivery-heading strong,
.gift-delivery-heading small {
  display: block;
}

.gift-delivery-heading strong {
  color: var(--green);
  font-size: 15px;
  font-weight: 720;
}

.gift-delivery-heading small {
  max-width: 520px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  text-align: right;
}

.gift-status {
  min-height: 18px;
  margin: 0;
  font-weight: 700;
}

.book-review {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px;
  background: rgba(251, 248, 240, 0.78);
  border: 1px solid rgba(134, 111, 72, 0.22);
  border-radius: 8px;
}

.book-review strong {
  text-align: center;
}

.book-review .ghost-button {
  min-height: 36px;
  padding: 7px 10px;
}

.journal-stage {
  position: relative;
  display: grid;
  min-height: calc(100vh - 220px);
  place-items: start center;
  overflow: visible;
}

.creator.is-style-step .journal-stage {
  min-height: auto;
}

.album-book-stage {
  padding: clamp(18px, 4vw, 40px);
  background:
    radial-gradient(ellipse at 50% 50%, rgba(58, 42, 25, 0.16), transparent 58%),
    linear-gradient(90deg, rgba(82, 61, 34, 0.12), transparent 12%, transparent 88%, rgba(82, 61, 34, 0.12)),
    linear-gradient(180deg, rgba(251, 248, 240, 0.7), rgba(221, 207, 181, 0.7));
  border: 1px solid rgba(134, 111, 72, 0.22);
  border-radius: 8px;
  box-shadow: inset 0 0 50px rgba(75, 58, 34, 0.12);
  overflow: hidden;
}

.album-book-stage::before {
  position: absolute;
  z-index: 1;
  top: 20px;
  bottom: 20px;
  left: 50%;
  width: 14px;
  background:
    linear-gradient(90deg, rgba(50, 36, 20, 0.18), rgba(251, 248, 240, 0.42), rgba(50, 36, 20, 0.16));
  border-radius: 999px;
  box-shadow: 0 0 34px rgba(54, 38, 20, 0.18);
  transform: translateX(-50%);
  content: "";
}

.album-book-stage::after {
  position: absolute;
  z-index: 0;
  top: clamp(34px, 7vw, 72px);
  bottom: clamp(34px, 7vw, 72px);
  left: clamp(18px, 7%, 54px);
  width: min(42%, 330px);
  background:
    linear-gradient(90deg, rgba(251, 248, 240, 0.86), rgba(222, 210, 184, 0.82)),
    radial-gradient(circle at 25% 18%, rgba(110, 88, 56, 0.1), transparent 34%);
  border: 1px solid rgba(126, 100, 63, 0.18);
  border-radius: 4px 2px 2px 4px;
  box-shadow: 0 12px 32px rgba(50, 36, 20, 0.12);
  content: "";
}

.album-book-stage .journal-preview {
  z-index: 2;
  width: min(58vh, 76%);
  max-width: 500px;
  justify-self: end;
  transform: translateX(-2%) rotate(-0.5deg);
}

.journal-preview {
  position: relative;
  container-type: inline-size;
  color-scheme: only light;
  forced-color-adjust: none;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
  --preview-text-scale: 1;
  width: min(70vh, 100%);
  max-width: 640px;
  aspect-ratio: 8 / 11;
  overflow: hidden;
  background: var(--paper);
  border-radius: 4px;
  box-shadow: var(--shadow);
  color: #342c22;
}

.intro-memory-board,
.intro-memory-board *,
.journal-preview,
.journal-preview *,
#checkoutPreviewImage,
#checkoutSummaryImage,
#exportPreviewImage {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.intro-memory-board img,
.journal-preview img,
#checkoutPreviewImage,
#checkoutSummaryImage,
#exportPreviewImage {
  -webkit-user-drag: none;
}

.journal-preview *,
.journal-preview::before,
.journal-preview::after {
  color-scheme: only light;
  forced-color-adjust: none;
}

.journal-preview::before,
.journal-preview::after,
.paper-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
}

.journal-preview::before {
  z-index: 2;
  border: 15px solid rgba(255, 250, 237, 0.36);
  box-shadow:
    inset 0 0 0 1px rgba(75, 59, 38, 0.16),
    inset 18px 0 28px rgba(87, 67, 41, 0.1),
    inset -18px 0 26px rgba(248, 242, 225, 0.18);
}

.journal-preview::after {
  z-index: 1;
  background:
    radial-gradient(ellipse at 0 20%, rgba(68, 50, 30, 0.2), transparent 18%),
    radial-gradient(ellipse at 100% 18%, rgba(80, 42, 30, 0.18), transparent 16%),
    linear-gradient(90deg, rgba(72, 53, 31, 0.16), transparent 6%, transparent 94%, rgba(76, 45, 31, 0.2));
  mix-blend-mode: multiply;
}

.paper-grain {
  z-index: 0;
  opacity: 0.5;
  background-image:
    repeating-linear-gradient(90deg, rgba(67, 51, 33, 0.06) 0 1px, transparent 1px 5px),
    radial-gradient(circle at 25% 18%, rgba(76, 58, 34, 0.14) 0 1px, transparent 1px),
    radial-gradient(circle at 70% 56%, rgba(88, 123, 120, 0.12) 0 1px, transparent 1px);
  background-size: auto, 18px 18px, 24px 24px;
}

.old-book {
  background:
    linear-gradient(100deg, rgba(126, 99, 64, 0.24), transparent 10%, transparent 88%, rgba(92, 57, 38, 0.2)),
    linear-gradient(180deg, #e3dccb 0%, #d5c9b8 100%);
}

.preview-copy {
  position: absolute;
  z-index: 3;
  left: 10%;
  right: 10%;
  bottom: 11%;
  max-height: 32%;
  overflow: hidden;
  color: #31281d;
}

.old-book .preview-copy {
  left: 7%;
  right: 7%;
  top: 7%;
  bottom: auto;
  max-height: 56%;
  color: rgba(20, 18, 14, 0.96);
}

.preview-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
  min-width: 0;
}

.preview-date {
  margin: 0;
  color: rgba(50, 43, 33, 0.64);
  font-family: var(--font-typewriter);
  --preview-date-size: 2.2cqw;
  font-size: calc(var(--preview-date-size) * var(--preview-text-scale));
}

.preview-sender {
  max-width: 46%;
  margin: 0 0 0 auto;
  overflow: hidden;
  color: rgba(50, 43, 33, 0.68);
  font-family: Georgia, "Times New Roman", serif;
  font-size: calc(2cqw * var(--preview-text-scale));
  font-style: italic;
  line-height: 1.2;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-copy h2 {
  margin: 0 0 10px;
  padding-top: 0.08em;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(50, 43, 33, 0.45);
  font-family: Georgia, "Times New Roman", serif;
  --preview-title-size: 4.7cqw;
  font-size: calc(var(--preview-title-size) * var(--preview-text-scale));
  font-weight: 500;
  line-height: 1.14;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.preview-note {
  max-width: 92%;
  margin: 0;
  font-family: var(--font-typewriter);
  --preview-note-size: 2.65cqw;
  font-size: calc(var(--preview-note-size) * var(--preview-text-scale));
  line-height: 1.58;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 7;
}

.old-book .preview-date {
  font-family: var(--font-script);
  color: rgba(18, 16, 12, 0.86);
  --preview-date-size: 3.15cqw;
  font-weight: 400;
  font-synthesis-weight: none;
  -webkit-text-stroke: 0.12px rgba(18, 16, 12, 0.28);
}

.old-book .preview-sender {
  color: rgba(18, 16, 12, 0.7);
  font-size: calc(2.55cqw * var(--preview-text-scale));
}

.old-book .preview-copy h2 {
  font-family: var(--font-script);
  color: rgba(18, 16, 12, 0.96);
  --preview-title-size: 5.9cqw;
  font-weight: 400;
  font-synthesis-weight: none;
  line-height: 1.12;
  -webkit-text-stroke: 0.14px rgba(18, 16, 12, 0.24);
}

.old-book .preview-note {
  font-family: var(--font-script);
  color: rgba(18, 16, 12, 0.9);
  --preview-note-size: 4.15cqw;
  font-weight: 400;
  font-synthesis-weight: none;
  line-height: 1.34;
  max-width: 91%;
  -webkit-line-clamp: 8;
  -webkit-text-stroke: 0.1px rgba(18, 16, 12, 0.22);
}

.preview-photo-area {
  position: absolute;
  z-index: 3;
  inset: 10% 9% auto 9%;
  height: 48%;
}

.old-book .preview-photo-area {
  inset: auto 7% 6.5% 10%;
  height: 32%;
}

.photo-frame {
  position: absolute;
  overflow: hidden;
  background: #d8c4a6;
  border: 0;
  box-shadow: 0 6px 16px rgba(38, 29, 18, 0.14);
  touch-action: pan-y;
  transform: translate(var(--frame-dx, 0), var(--frame-dy, 0));
}

.preview-photo-area .photo-frame.moving-preview-outgoing,
.preview-photo-area .photo-frame.moving-preview-incoming {
  pointer-events: none;
  transition: opacity 450ms ease;
}

.preview-photo-area .photo-frame.moving-preview-outgoing {
  z-index: 4;
  opacity: 1;
}

.preview-photo-area .photo-frame.moving-preview-outgoing.is-leaving {
  opacity: 0;
}

.preview-photo-area .photo-frame.moving-preview-incoming {
  z-index: 5;
  opacity: 0;
}

.preview-photo-area .photo-frame.moving-preview-incoming.is-visible {
  opacity: 1;
}

.journal-preview.is-crop-editing .photo-frame {
  touch-action: none;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  background:
    linear-gradient(135deg, rgba(255, 250, 237, 0.45), rgba(190, 165, 126, 0.35)),
    #d8c4a6;
  object-fit: cover;
  filter: sepia(0.42) contrast(0.9) saturate(0.7);
  cursor: grab;
  transition: transform 120ms ease;
  user-select: none;
  -webkit-user-drag: none;
}

.journal-preview.preserve-color .photo-frame img {
  filter: none;
}

.photo-frame:active img {
  cursor: grabbing;
}

.photo-frame.is-frame-editing {
  outline: 2px solid rgba(88, 123, 120, 0.62);
  outline-offset: 3px;
}

.photo-frame.is-frame-editing,
.photo-frame.is-frame-editing img {
  cursor: move;
}

.photo-frame.is-zoom-editing,
.photo-frame.is-zoom-editing img {
  cursor: ns-resize;
}

.intro-preview .photo-frame {
  touch-action: auto;
}

.intro-preview .photo-frame img {
  cursor: default;
}

.photo-frame.empty {
  display: grid;
  place-items: center;
  color: rgba(49, 40, 29, 0.45);
  font-family: Georgia, serif;
  font-size: 2.8cqw;
  text-align: center;
}

.old-book .photo-frame:first-child {
  inset: 0 20% 0 0;
  border: 8px solid rgba(255, 250, 237, 0.86);
  transform: translate(var(--frame-dx, 0), var(--frame-dy, 0)) rotate(-2deg);
}

.old-book .photo-frame:nth-child(2) {
  inset: 20% 0 0 56%;
  border: 8px solid rgba(255, 250, 237, 0.86);
  transform: translate(var(--frame-dx, 0), var(--frame-dy, 0)) rotate(4deg);
}

.modern-keepsake {
  background:
    linear-gradient(180deg, rgba(250, 249, 245, 0.98), rgba(236, 233, 225, 0.98)),
    #f4f1e9;
}

.modern-keepsake::before {
  border: 1px solid rgba(45, 65, 58, 0.16);
  box-shadow: inset 0 0 0 12px rgba(255, 255, 255, 0.18);
}

.modern-keepsake::after {
  background: none;
}

.modern-keepsake .paper-grain {
  opacity: 0.12;
}

.modern-keepsake .photo-frame {
  box-shadow: none;
}

.modern-keepsake .photo-frame:first-child {
  border: 5px solid rgba(250, 248, 241, 0.94);
  box-shadow: 0 4px 12px rgba(35, 45, 40, 0.1);
}

.modern-keepsake .photo-frame:nth-child(2) {
  border: 6px solid rgba(250, 248, 241, 0.96);
  box-shadow: 0 7px 18px rgba(35, 45, 40, 0.16);
}

.modern-keepsake .photo-frame img {
  filter: sepia(0.08) contrast(0.98) saturate(0.92);
}

.modern-keepsake .preview-copy {
  left: 8%;
  right: 8%;
  bottom: 7%;
  max-height: 34%;
  color: #20332d;
}

.modern-keepsake .preview-meta {
  margin-bottom: 10px;
}

.modern-keepsake .preview-date {
  color: rgba(32, 51, 45, 0.62);
  font-family: var(--font-system);
  --preview-date-size: 1.8cqw;
}

.modern-keepsake .preview-sender {
  color: rgba(32, 51, 45, 0.68);
  font-family: var(--font-source-serif);
  font-style: italic;
}

.modern-keepsake .preview-copy h2 {
  margin-bottom: 11px;
  padding-bottom: 9px;
  border-color: rgba(32, 51, 45, 0.28);
  font-family: var(--font-source-serif);
  --preview-title-size: 4.6cqw;
  font-weight: 400;
}

.modern-keepsake .preview-note {
  max-width: 100%;
  color: rgba(32, 51, 45, 0.9);
  font-family: var(--font-source-serif);
  --preview-note-size: 2.45cqw;
  line-height: 1.52;
  -webkit-line-clamp: 7;
}

.modern-keepsake .preview-stamp {
  color: rgba(49, 88, 77, 0.48);
  border-color: rgba(49, 88, 77, 0.32);
  font-family: var(--font-system);
}

.film-roll {
  background:
    linear-gradient(180deg, rgba(37, 39, 36, 0.98), rgba(24, 26, 24, 0.99)),
    #242623;
}

.film-roll::before {
  border: 12px solid rgba(8, 9, 8, 0.3);
  box-shadow: inset 0 0 0 1px rgba(235, 228, 214, 0.14);
}

.film-roll::after {
  background: radial-gradient(circle at 50% 0, rgba(255, 244, 218, 0.07), transparent 42%);
  mix-blend-mode: screen;
}

.film-roll .paper-grain {
  opacity: 0.16;
}

.film-roll .photo-frame {
  border: 10px solid #111310;
  outline: 1px solid rgba(232, 225, 211, 0.2);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.32);
}

.film-roll .photo-frame::before,
.film-roll .photo-frame::after {
  position: absolute;
  z-index: 2;
  left: 3px;
  right: 3px;
  height: 3px;
  content: "";
  background: repeating-linear-gradient(90deg, rgba(239, 232, 217, 0.78) 0 4px, transparent 4px 10px);
  pointer-events: none;
}

.film-roll .photo-frame::before {
  top: 3px;
}

.film-roll .photo-frame::after {
  bottom: 3px;
}

.film-roll .photo-frame img {
  filter: sepia(0.12) contrast(1.05) saturate(0.82);
}

.film-roll .preview-copy {
  left: 8%;
  right: 8%;
  bottom: 7%;
  max-height: 34%;
  color: #f1eadf;
}

.film-roll .preview-meta {
  padding-top: 0.3em;
}

.film-roll .preview-date,
.film-roll .preview-sender {
  color: rgba(241, 234, 223, 0.68);
  font-family: var(--font-typewriter);
  --preview-date-size: 1.75cqw;
}

.film-roll .preview-sender {
  max-width: 48%;
  overflow: visible;
  padding-top: 0.15em;
  font-size: calc(1.75cqw * var(--preview-text-scale));
  font-style: normal;
  line-height: 1.45;
}

.film-roll .preview-copy h2 {
  border-color: rgba(241, 234, 223, 0.28);
  font-family: var(--font-system);
  --preview-title-size: 4.15cqw;
  font-weight: 500;
}

.film-roll .preview-note {
  max-width: 100%;
  color: rgba(241, 234, 223, 0.9);
  font-family: var(--font-system);
  --preview-note-size: 2.2cqw;
  line-height: 1.48;
  -webkit-line-clamp: 7;
}

.film-roll .preview-stamp {
  color: rgba(241, 234, 223, 0.5);
  border-color: rgba(241, 234, 223, 0.3);
  font-family: var(--font-typewriter);
}

.heritage-album {
  background:
    linear-gradient(90deg, rgba(110, 86, 57, 0.1), transparent 8%, transparent 92%, rgba(110, 86, 57, 0.1)),
    linear-gradient(180deg, #ede3ce, #ddd0b8);
}

.heritage-album::before {
  border: 18px solid rgba(252, 247, 234, 0.28);
  box-shadow: inset 0 0 0 1px rgba(82, 63, 41, 0.22);
}

.heritage-album::after {
  inset: 4.2%;
  border: 3px double rgba(92, 70, 43, 0.28);
  background: none;
  mix-blend-mode: multiply;
}

.heritage-album .paper-grain {
  opacity: 0.34;
}

.heritage-album .photo-frame {
  border: 9px solid rgba(251, 245, 230, 0.9);
  outline: 1px solid rgba(100, 76, 48, 0.3);
  box-shadow: 0 7px 17px rgba(58, 42, 25, 0.16);
}

.heritage-album .photo-frame img {
  filter: sepia(0.4) contrast(0.92) saturate(0.65);
}

.heritage-album .preview-copy {
  left: 10%;
  right: 10%;
  bottom: 8%;
  max-height: 34%;
  color: #3b3024;
}

.heritage-album .preview-date,
.heritage-album .preview-sender {
  color: rgba(59, 48, 36, 0.68);
  font-family: var(--font-cormorant);
  --preview-date-size: 2.65cqw;
  font-style: italic;
}

.heritage-album .preview-sender {
  font-size: calc(2.45cqw * var(--preview-text-scale));
}

.heritage-album .preview-copy h2 {
  border-color: rgba(74, 56, 35, 0.36);
  font-family: var(--font-source-serif);
  --preview-title-size: 4.7cqw;
  font-weight: 400;
}

.heritage-album .preview-note {
  max-width: 100%;
  color: rgba(59, 48, 36, 0.92);
  font-family: var(--font-source-serif);
  --preview-note-size: 2.45cqw;
  line-height: 1.52;
  -webkit-line-clamp: 7;
}

.heritage-album .preview-stamp {
  color: rgba(90, 68, 44, 0.5);
  border-color: rgba(90, 68, 44, 0.34);
  font-family: var(--font-source-serif);
}

.pressed-flower .photo-frame:first-child,
.pressed-flower .photo-frame:nth-child(2),
.cafe-receipt .photo-frame:first-child,
.cafe-receipt .photo-frame:nth-child(2),
.coastal-fieldbook .photo-frame:first-child,
.coastal-fieldbook .photo-frame:nth-child(2),
.evening-letter .photo-frame:first-child,
.evening-letter .photo-frame:nth-child(2),
.gallery-postcard .photo-frame:first-child,
.gallery-postcard .photo-frame:nth-child(2) {
  border: 8px solid rgba(255, 250, 237, 0.8);
}

.pressed-flower {
  background: linear-gradient(180deg, #e7d9bd, #cbb693);
}

.pressed-flower .preview-photo-area .photo-frame:first-child {
  inset: 0 20% 0 0;
  transform: translate(var(--frame-dx, 0), var(--frame-dy, 0)) rotate(-2deg);
}

.pressed-flower .preview-photo-area .photo-frame:nth-child(2) {
  inset: 18% 0 0 54%;
  transform: translate(var(--frame-dx, 0), var(--frame-dy, 0)) rotate(4deg);
}

.cafe-receipt {
  background: linear-gradient(180deg, #e5cfaa, #c8ad7f);
}

.cafe-receipt .preview-photo-area {
  inset: 8% 15% auto 15%;
  height: 46%;
}

.cafe-receipt .photo-frame:first-child {
  inset: 0;
  transform: translate(var(--frame-dx, 0), var(--frame-dy, 0)) rotate(1deg);
}

.cafe-receipt .photo-frame:nth-child(2) {
  right: -4%;
  bottom: -9%;
  width: 43%;
  height: 42%;
  transform: translate(var(--frame-dx, 0), var(--frame-dy, 0)) rotate(-5deg);
}

.cafe-receipt .preview-copy {
  left: 16%;
  right: 16%;
  bottom: 9%;
  max-height: 39%;
  padding-top: 0;
}

.cafe-receipt .preview-copy h2 {
  font-family: var(--font-typewriter);
  --preview-title-size: 4.1cqw;
}

.cafe-receipt .preview-note {
  --preview-note-size: 2.35cqw;
  line-height: 1.5;
  -webkit-line-clamp: 8;
}

.coastal-fieldbook {
  background: linear-gradient(180deg, #dce1d4, #b8c8c0);
}

.coastal-fieldbook::after {
  inset: 5%;
  border: 1px solid rgba(88, 123, 120, 0.28);
}

.coastal-fieldbook .preview-photo-area {
  inset: 12% 8% auto 8%;
  height: 43%;
}

.coastal-fieldbook .photo-frame:first-child {
  inset: 0 48% 0 0;
}

.coastal-fieldbook .photo-frame:nth-child(2) {
  inset: 0 0 0 52%;
}

.coastal-fieldbook .preview-copy {
  left: 9%;
  right: 9%;
  bottom: 12%;
  color: #263b43;
}

.evening-letter {
  background: linear-gradient(180deg, #e0cbbb, #c5a28d);
}

.evening-letter .preview-photo-area {
  inset: 9% 12% auto 12%;
  height: 41%;
}

.evening-letter .photo-frame:first-child {
  inset: 0;
  border-width: 9px;
  transform: translate(var(--frame-dx, 0), var(--frame-dy, 0)) rotate(-1deg);
}

.evening-letter .photo-frame:nth-child(2) {
  left: 7%;
  bottom: -16%;
  width: 36%;
  height: 38%;
  transform: translate(var(--frame-dx, 0), var(--frame-dy, 0)) rotate(5deg);
}

.evening-letter .preview-copy {
  bottom: 10%;
  padding-top: 20px;
  border-top: 1px solid rgba(125, 63, 77, 0.26);
}

.gallery-postcard {
  background: linear-gradient(180deg, #e3dbc8, #c6b896);
}

.gallery-postcard .preview-photo-area {
  inset: 8% 8% auto 8%;
  height: 52%;
}

.gallery-postcard .photo-frame:first-child {
  inset: 0;
  border-width: 0;
  box-shadow: none;
}

.gallery-postcard .photo-frame:nth-child(2) {
  right: 5%;
  bottom: 5%;
  width: 30%;
  height: 28%;
  border-width: 6px;
}

#journalPreview.modern-keepsake .photo-frame.moving-memory-photo-frame {
  border: 5px solid rgba(250, 248, 241, 0.94);
  box-shadow: 0 4px 12px rgba(35, 45, 40, 0.1);
}

#journalPreview.evening-letter .photo-frame.moving-memory-photo-frame {
  border-width: 9px;
}

#journalPreview.gallery-postcard .photo-frame.moving-memory-photo-frame {
  border-width: 0;
  box-shadow: none;
}

.gallery-postcard .preview-copy {
  left: 8%;
  right: 8%;
  bottom: 8%;
  max-height: 39%;
  padding-top: 16px;
  border-top: 1px solid rgba(199, 137, 104, 0.35);
}

#journalPreview .preview-photo-area {
  inset: 0 !important;
  height: auto !important;
}

#journalPreview.pressed-flower .preview-copy,
#journalPreview.cafe-receipt .preview-copy,
#journalPreview.coastal-fieldbook .preview-copy,
#journalPreview.evening-letter .preview-copy {
  left: 9%;
  right: 9%;
}

#journalPreview.gallery-postcard .preview-copy {
  left: 8%;
  right: 8%;
  bottom: 8%;
  max-height: 39%;
  padding-top: 16px;
}

#journalPreview.gallery-postcard .preview-copy h2 {
  margin-bottom: 10px;
  padding-top: 0.08em;
  padding-bottom: 7px;
  --preview-title-size: 4.2cqw;
  line-height: 1.14;
}

#journalPreview.gallery-postcard .preview-meta {
  margin-bottom: 8px;
}

#journalPreview.gallery-postcard .preview-date {
  --preview-date-size: 2.2cqw;
}

#journalPreview.gallery-postcard .preview-note {
  --preview-note-size: 2.3cqw;
  line-height: 1.5;
}

.gallery-postcard .preview-copy h2 {
  --preview-title-size: 4.2cqw;
}

.gallery-postcard .preview-note {
  max-width: 100%;
  --preview-note-size: 2.3cqw;
  line-height: 1.5;
  -webkit-line-clamp: 8;
}

.preview-stamp {
  position: absolute;
  z-index: 4;
  right: 7%;
  bottom: 4%;
  padding: 6px 10px;
  color: rgba(124, 107, 112, 0.68);
  border: 1px solid rgba(124, 107, 112, 0.5);
  border-radius: 4px;
  font-family: Georgia, serif;
  font-size: 2cqw;
  transform: rotate(-4deg);
  text-transform: uppercase;
}

.journal-preview.paper-tone-warm-white {
  --paper-tone-ink: #29322e;
  --paper-tone-muted-ink: rgba(41, 50, 46, 0.66);
  --paper-tone-rule: rgba(41, 50, 46, 0.3);
  --paper-tone-placeholder: #e1ddd2;
  background: linear-gradient(180deg, #faf9f5, #ebe8df);
}

.journal-preview.paper-tone-soft-cream {
  --paper-tone-ink: #332d24;
  --paper-tone-muted-ink: rgba(51, 45, 36, 0.66);
  --paper-tone-rule: rgba(51, 45, 36, 0.3);
  --paper-tone-placeholder: #ddccb0;
  background: linear-gradient(180deg, #f3ead8, #dfd0b6);
}

.journal-preview.paper-tone-parchment {
  --paper-tone-ink: #382f24;
  --paper-tone-muted-ink: rgba(56, 47, 36, 0.66);
  --paper-tone-rule: rgba(56, 47, 36, 0.32);
  --paper-tone-placeholder: #cfba96;
  background: linear-gradient(180deg, #e5dac5, #c9b696);
}

.journal-preview.paper-tone-sepia {
  --paper-tone-ink: #34291d;
  --paper-tone-muted-ink: rgba(52, 41, 29, 0.7);
  --paper-tone-rule: rgba(52, 41, 29, 0.34);
  --paper-tone-placeholder: #b99b72;
  background: linear-gradient(180deg, #d8c39f, #ad8d63);
}

.journal-preview.paper-tone-coastal-blue {
  --paper-tone-ink: #263b43;
  --paper-tone-muted-ink: rgba(38, 59, 67, 0.68);
  --paper-tone-rule: rgba(38, 59, 67, 0.3);
  --paper-tone-placeholder: #aebfb8;
  background: linear-gradient(180deg, #dce1d4, #b8c8c0);
}

.journal-preview.paper-tone-dusty-rose {
  --paper-tone-ink: #493238;
  --paper-tone-muted-ink: rgba(73, 50, 56, 0.68);
  --paper-tone-rule: rgba(73, 50, 56, 0.3);
  --paper-tone-placeholder: #c19b88;
  background: linear-gradient(180deg, #e0cbbb, #c5a28d);
}

.journal-preview.paper-tone-charcoal {
  --paper-tone-ink: #f2ede3;
  --paper-tone-muted-ink: rgba(242, 237, 227, 0.7);
  --paper-tone-rule: rgba(242, 237, 227, 0.32);
  --paper-tone-placeholder: #454740;
  background: linear-gradient(180deg, #3a3c37, #1f211e);
}

.journal-preview[class*="paper-tone-"]:not(.paper-tone-original) {
  color: var(--paper-tone-ink);
}

.journal-preview[class*="paper-tone-"]:not(.paper-tone-original) .preview-copy,
.journal-preview[class*="paper-tone-"]:not(.paper-tone-original) .preview-copy h2,
.journal-preview[class*="paper-tone-"]:not(.paper-tone-original) .preview-note {
  color: var(--paper-tone-ink);
}

.journal-preview[class*="paper-tone-"]:not(.paper-tone-original) .preview-date,
.journal-preview[class*="paper-tone-"]:not(.paper-tone-original) .preview-sender {
  color: var(--paper-tone-muted-ink);
}

.journal-preview[class*="paper-tone-"]:not(.paper-tone-original) .preview-copy h2 {
  border-color: var(--paper-tone-rule);
}

.journal-preview[class*="paper-tone-"]:not(.paper-tone-original) .preview-stamp {
  color: var(--paper-tone-muted-ink);
  border-color: var(--paper-tone-rule);
}

.journal-preview[class*="paper-tone-"]:not(.paper-tone-original) .photo-frame.empty {
  color: var(--paper-tone-muted-ink);
  background: var(--paper-tone-placeholder);
}

.journal-preview.paper-tone-charcoal::before,
.journal-preview.paper-tone-charcoal::after {
  border-color: rgba(242, 237, 227, 0.2);
}

.journal-preview.paper-tone-charcoal .paper-grain {
  opacity: 0.2;
  filter: invert(1);
  mix-blend-mode: screen;
}

.journal-preview.paper-tone-charcoal .preview-date,
.journal-preview.paper-tone-charcoal .preview-copy h2,
.journal-preview.paper-tone-charcoal .preview-note {
  -webkit-text-stroke: 0;
}

.journal-preview.font-script .preview-date,
.journal-preview.font-script .preview-copy h2,
.journal-preview.font-script .preview-note {
  font-family: var(--font-script);
  font-weight: 400;
  font-synthesis-weight: none;
  -webkit-text-stroke: 0;
}

.journal-preview.font-typewriter .preview-date,
.journal-preview.font-typewriter .preview-copy h2,
.journal-preview.font-typewriter .preview-note {
  font-family: var(--font-typewriter);
  font-weight: 400;
  font-synthesis-weight: none;
  -webkit-text-stroke: 0;
}

.journal-preview.font-great-vibes .preview-date,
.journal-preview.font-great-vibes .preview-copy h2,
.journal-preview.font-great-vibes .preview-note {
  font-family: var(--font-great-vibes);
  font-weight: 400;
  font-synthesis-weight: none;
  -webkit-text-stroke: 0;
}

.journal-preview.font-source-serif-4 .preview-date,
.journal-preview.font-source-serif-4 .preview-copy h2,
.journal-preview.font-source-serif-4 .preview-note {
  font-family: var(--font-source-serif);
  font-style: normal;
  font-weight: 400;
  font-synthesis-weight: none;
  -webkit-text-stroke: 0;
}

.journal-preview.font-cormorant-garamond .preview-date,
.journal-preview.font-cormorant-garamond .preview-copy h2,
.journal-preview.font-cormorant-garamond .preview-note {
  font-family: var(--font-cormorant);
  font-style: italic;
  font-weight: 400;
  font-synthesis-weight: none;
  -webkit-text-stroke: 0;
}

.journal-preview.font-script:not(.old-book) .preview-date,
.journal-preview.font-great-vibes:not(.old-book) .preview-date {
  --preview-date-size: 3cqw;
}

.journal-preview.font-script:not(.old-book) .preview-copy h2,
.journal-preview.font-great-vibes:not(.old-book) .preview-copy h2 {
  --preview-title-size: 5.2cqw;
  line-height: 1.1;
}

.journal-preview.font-script:not(.old-book) .preview-note {
  --preview-note-size: 3.3cqw;
  line-height: 1.34;
}

.journal-preview.font-great-vibes:not(.old-book) .preview-note {
  --preview-note-size: 3.35cqw;
  line-height: 1.25;
}

#exportCanvas {
  display: none;
}

.finish-actions {
  grid-template-columns: auto auto minmax(0, 1fr);
}

.finish-actions.step-actions {
  border-top: 1px solid rgba(113, 107, 97, 0.16);
}

.paid-draft-notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  margin-top: 14px;
  padding: 11px 13px;
  color: var(--green);
  background: rgba(32, 61, 54, 0.07);
  border: 1px solid rgba(32, 61, 54, 0.16);
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.45;
}

.paid-draft-notice svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.paid-draft-notice strong {
  margin-right: 3px;
}

.gift-page-body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(120deg, rgba(88, 123, 120, 0.13), transparent 34%),
    linear-gradient(260deg, rgba(124, 107, 112, 0.12), transparent 34%),
    #f4eee3;
}

.gift-reveal-page {
  display: grid;
  gap: 18px;
  width: min(1040px, calc(100% - 32px));
  max-width: 100%;
  margin: 0 auto;
  padding: clamp(22px, 5vw, 56px) 0;
  overflow-x: clip;
}

.gift-preview-return {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 12px 8px 8px;
  color: var(--green);
  background: rgba(251, 248, 240, 0.76);
  border: 1px solid var(--surface-border-strong);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  backdrop-filter: blur(16px) saturate(1.08);
}

.gift-preview-return:hover,
.gift-preview-return:focus-visible {
  background: var(--surface-strong);
  border-color: rgba(32, 61, 54, 0.34);
}

.gift-preview-return svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.gift-reveal-hero,
.gift-memory-stage,
.gift-error-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--surface-radius);
  box-shadow: none;
}

.gift-reveal-hero {
  display: grid;
  gap: clamp(28px, 5vw, 54px);
  min-width: 0;
  padding: clamp(22px, 5vw, 48px);
  overflow: hidden;
}

.gift-reveal-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-symbol {
  display: block;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  object-fit: contain;
}

.gift-reveal-brand span:last-child {
  min-width: 0;
}

.gift-reveal-brand strong,
.gift-reveal-brand small,
.gift-error-card strong,
.gift-error-card span {
  display: block;
}

.gift-reveal-brand strong {
  color: var(--green);
  display: inline-flex;
  font-family: var(--font-source-serif);
  font-size: 20px;
  font-style: normal;
  font-weight: 400;
  line-height: 1;
}

.gift-reveal-brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.gift-reveal-copy {
  min-width: 0;
  max-width: 100%;
}

.gift-reveal-copy,
.gift-reveal-copy h1,
.gift-reveal-copy p,
.gift-reveal-copy .eyebrow,
.gift-reveal-brand strong,
.gift-reveal-brand small {
  overflow-wrap: anywhere;
  word-break: normal;
}

.gift-reveal-copy h1 {
  max-width: 760px;
  margin: 0;
  font-family: var(--font-source-serif);
  font-size: clamp(40px, 8vw, 78px);
  font-weight: 400;
  line-height: 0.98;
}

.gift-reveal-copy p:last-child {
  max-width: 680px;
  margin: 18px 0 0;
  color: #51473a;
  font-family: var(--font-source-serif);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.42;
}

.gift-memory-stage {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: clamp(14px, 3vw, 28px);
  overflow: hidden;
}

.gift-memory-frame {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 280px;
  padding: clamp(14px, 3vw, 28px);
  background:
    linear-gradient(90deg, rgba(83, 72, 54, 0.05) 1px, transparent 1px) 0 0 / 18px 18px,
    radial-gradient(circle at 7px 8px, rgba(83, 72, 54, 0.06) 1.4px, transparent 1.7px) 0 0 / 42px 38px,
    linear-gradient(180deg, rgba(251, 248, 240, 0.7), rgba(205, 189, 158, 0.42)),
    var(--paper);
  border-radius: 8px;
  overflow: hidden;
}

.gift-memory-frame img {
  display: block;
  width: min(620px, 100%);
  max-height: 78vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.gift-moving-stage .journal-preview {
  width: min(620px, 100%);
  margin: 0 auto;
  cursor: grab;
  user-select: none;
}

.gift-moving-stage .journal-preview:active {
  cursor: grabbing;
}

#giftMovingCard .gift-moving-photo-area {
  inset: 0 !important;
  height: auto !important;
}

.gift-moving-count {
  margin: 0 0 6px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gift-moving-photo-frame {
  transform: none !important;
}

.gift-moving-photo-frame img {
  position: absolute;
  inset: 0;
  opacity: 1;
  object-fit: cover;
  transition: opacity 450ms ease;
}

.gift-moving-photo-frame img.gift-moving-photo-incoming {
  opacity: 0;
  z-index: 2;
  pointer-events: none;
}

.gift-moving-photo-frame img.gift-moving-photo-incoming.is-visible {
  opacity: 1;
}

.gift-moving-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.gift-moving-controls button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--green);
  background: var(--surface-strong);
  border: 1px solid var(--surface-border-strong);
  border-radius: 50%;
  font-size: 17px;
}

.gift-moving-controls button:hover {
  background: var(--surface-subtle);
  border-color: var(--green);
}

.gift-moving-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  min-height: 10px;
}

.gift-moving-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  background: rgba(32, 61, 54, 0.25);
  border: 0;
  border-radius: 50%;
  transition: width 160ms ease, background 160ms ease;
}

.gift-moving-dots button.is-active {
  width: 22px;
  background: var(--green);
  border-radius: 999px;
}

.gift-memory-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.gift-privacy-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.gift-error-card {
  padding: 20px;
}

.gift-error-card strong {
  font-family: var(--font-source-serif);
  font-size: 26px;
  font-weight: 400;
}

@media (max-width: 1020px) {
  .intro-screen,
  .mode-grid,
  .creator,
  .menu-page-grid {
    grid-template-columns: 1fr;
  }

  .menu-page-screen.is-sign-in-page .menu-page-shell {
    width: min(760px, 100%);
  }

  .intro-screen {
    grid-template-areas:
      "copy"
      "preview";
    row-gap: 48px;
  }

  .wizard-panel {
    position: static;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .creator.is-style-step {
    display: flex;
    flex-direction: column;
  }

  .creator.is-style-step .wizard-panel,
  .creator.is-style-step .step-card[data-step="6"] {
    display: contents;
  }

  .creator.is-style-step .progress-track {
    order: 1;
    width: 100%;
  }

  .creator.is-style-step .step-card[data-step="6"] > .section-title {
    order: 2;
    margin-bottom: 0;
  }

  .creator.is-style-step .finish-page-title {
    display: none;
  }

  .creator.is-style-step:not(.is-finish-flow) .step-card[data-step="6"] > .section-title,
  .creator.is-style-step:not(.is-finish-flow) .single-typography-controls,
  .creator.is-style-step:not(.is-finish-flow) .moving-memory-controls,
  .creator.is-style-step:not(.is-finish-flow) .moving-appearance-controls,
  .creator.is-style-step:not(.is-finish-flow) .crop-panel,
  .creator.is-style-step:not(.is-finish-flow) .keepsake-size-controls,
  .creator.is-style-step:not(.is-finish-flow) .paid-draft-notice:not([hidden]),
  .creator.is-style-step:not(.is-finish-flow) .finish-actions {
    animation: journey-step-enter 200ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .creator.is-style-step .preview-column {
    order: 3;
  }

  .creator.is-style-step .single-typography-controls,
  .creator.is-style-step .moving-appearance-controls {
    order: 4;
  }

  .creator.is-style-step .moving-memory-controls,
  .creator.is-style-step .crop-panel {
    order: 5;
  }

  .creator.is-style-step .keepsake-size-controls {
    order: 6;
  }

  .creator.is-style-step .paid-draft-notice {
    order: 7;
  }

  .creator.is-style-step .finish-actions {
    order: 8;
  }

  .creator.is-style-step .memory-finish-flow {
    order: 9;
  }

  .creator.is-style-step .export-tray {
    order: 10;
  }

  .preview-tools {
    align-items: center;
    flex-direction: row;
  }

  .preview-column {
    padding-left: 0;
    border-left: 0;
  }

  .menu-page-heading {
    align-items: start;
    flex-direction: column;
  }

  .journal-preview {
    width: min(620px, 100%);
  }

  .intro-copy {
    max-width: 660px;
    margin: 0 auto;
    text-align: center;
  }

  .intro-copy h1 {
    max-width: 11ch;
    margin-right: auto;
    margin-left: auto;
  }

  .intro-copy p:not(.eyebrow),
  .intro-assurance {
    margin-right: auto;
    margin-left: auto;
  }

  .intro-actions,
  .intro-assurance {
    justify-content: center;
  }

  .intro-memory-board {
    min-height: 620px;
  }

  .preview-template-panel {
    margin-bottom: 8px;
  }
}

@media (max-width: 1180px) {
  .admin-analytics-split {
    grid-template-columns: 1fr;
  }

  .admin-compact-list span {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  }
}

@media (min-width: 641px) and (max-width: 820px) {
  .topbar {
    padding: 8px 12px;
  }

  .topbar-left {
    gap: 9px;
    min-width: 0;
  }

  .profile-area {
    gap: 6px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
  }

  .brand {
    min-width: 0;
  }

  .brand strong {
    max-width: none;
    overflow: visible;
    font-size: 19px;
    line-height: 1;
    text-overflow: clip;
    white-space: nowrap;
  }

  .brand-title-full {
    display: none;
  }

  .brand-title-short {
    display: inline-flex;
  }

  .brand-script-initial {
    font-size: 26px;
  }

  .brand small,
  .brand-mark,
  .credit-pill {
    display: none;
  }

  .menu-button,
  .profile-button,
  .new-memory-button {
    width: 36px;
    min-height: 36px;
    justify-content: center;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 12px;
    box-shadow: none;
  }

  .menu-button {
    width: 39px;
    min-height: 39px;
    padding: 10px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
  }

  .new-memory-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  #profileName {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .new-memory-icon {
    width: 34px;
    height: 34px;
  }

  .new-memory-icon svg {
    width: 26px;
    height: 26px;
  }
}

@media (max-width: 640px) {
  body.gift-page-body {
    overflow-x: hidden;
  }

  .menu-page-screen.is-sign-in-page {
    padding: 16px 12px 28px;
  }

  .menu-page-screen.is-sign-in-page::before {
    right: -62vw;
    bottom: -18vh;
    width: 124vw;
    height: 72vh;
    opacity: 0.6;
  }

  .menu-page-screen.is-sign-in-page::after {
    left: -54vw;
    width: 112vw;
    opacity: 0.76;
  }

  .sign-in-card {
    min-height: auto;
  }

  .sign-in-card-body {
    width: calc(100% - 32px);
    gap: 18px;
    padding: 28px 0 24px;
  }

  .sign-in-card-head h2 {
    font-size: clamp(30px, 9vw, 38px);
  }

  .email-auth-field input {
    min-height: 56px;
  }

  .email-auth-submit {
    min-height: 48px;
  }

  .email-auth-status {
    font-size: 12px;
  }

  .sign-in-provider {
    min-height: 72px;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 13px;
    padding: 10px 13px;
  }

  #googleSignInOption {
    min-height: 58px;
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .sign-in-provider strong {
    line-height: 1.12;
  }

  .sign-in-provider small {
    margin-top: 4px;
    line-height: 1.18;
  }

  .provider-mark {
    width: 28px;
    height: 28px;
  }

  .sign-in-card-foot {
    min-height: 66px;
  }

  .gift-reveal-page {
    width: calc(100% - 20px);
    padding: 10px 0 22px;
  }

  .gift-reveal-hero {
    gap: 20px;
    padding: 16px;
  }

  .gift-reveal-brand .brand-mark {
    display: grid;
  }

  .gift-reveal-copy h1 {
    font-size: clamp(30px, 8.6vw, 38px);
    line-height: 1.06;
  }

  .gift-reveal-copy p:last-child {
    margin-top: 14px;
    font-size: 17px;
    line-height: 1.4;
  }

  .gift-memory-stage {
    gap: 12px;
    padding: 10px;
  }

  .gift-memory-frame {
    min-height: auto;
    padding: 8px;
  }

  .gift-memory-frame img {
    width: 100%;
    max-height: 68svh;
    box-shadow: 0 10px 24px rgba(40, 51, 46, 0.14);
  }

  .gift-moving-stage .journal-preview {
    width: 100%;
  }

  .gift-moving-controls button {
    width: 42px;
    height: 42px;
  }

  .gift-memory-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .gift-flow-screen {
    width: calc(100% - 24px);
  }

  .gift-flow-heading {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px 0 16px;
  }

  .gift-flow-heading h1 {
    max-width: 16ch;
    font-size: clamp(30px, 8.8vw, 36px);
    line-height: 1.02;
  }

  .gift-flow-heading p:last-child {
    margin-top: 8px;
    font-size: 15px;
    line-height: 1.42;
  }

  .gift-send-workspace {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .gift-send-editor {
    gap: 16px;
    padding-top: 0;
  }

  .gift-send-head strong {
    font-size: 25px;
  }

  .gift-send-head small {
    font-size: 12px;
  }

  .gift-send-editor .gift-form-grid {
    gap: 13px;
  }

  .gift-form-grid textarea {
    min-height: 108px;
  }

  .gift-share-preview {
    display: none;
  }

  .gift-live-preview {
    padding: 6px;
  }

  .gift-live-reveal {
    gap: 14px;
    min-height: 0;
    padding: 16px;
  }

  .gift-live-copy h2 {
    font-size: clamp(27px, 7.8vw, 33px);
    line-height: 1.03;
  }

  .gift-live-copy > p:last-child {
    margin-top: 10px;
    font-size: 15px;
    line-height: 1.38;
  }

  .gift-live-memory {
    min-height: 150px;
  }

  .gift-live-memory img {
    max-height: 210px;
  }

  .gift-delivery-heading {
    display: grid;
    gap: 5px;
    padding-top: 15px;
  }

  .gift-delivery-heading small {
    text-align: left;
  }

  .topbar {
    align-items: center;
    flex-direction: row;
    min-height: 58px;
    padding: 8px 10px;
  }

  .topbar-left {
    gap: 9px;
    min-width: 0;
  }

  .profile-area {
    gap: 6px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
  }

  .brand {
    min-width: 0;
  }

  .brand strong {
    max-width: none;
    overflow: visible;
    font-size: 19px;
    line-height: 1;
    text-overflow: clip;
    white-space: nowrap;
  }

  .brand-title-full {
    display: none;
  }

  .brand-title-short {
    display: inline-flex;
  }

  .brand-script-initial {
    font-size: 26px;
  }

  .brand small {
    display: none;
  }

  .menu-button {
    width: 36px;
    height: 36px;
  }

  .brand-mark {
    display: none;
  }

  .menu-button {
    padding: 9px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    box-shadow: none;
  }

  .menu-lines span {
    width: 17px;
    height: 2px;
    background: rgba(32, 61, 54, 0.88);
  }

  .menu-lines span:nth-child(2) {
    width: 14px;
  }

  .menu-button[aria-expanded="true"] .menu-lines span:first-child {
    transform: translateY(3.4px) rotate(45deg);
  }

  .menu-button[aria-expanded="true"] .menu-lines span:nth-child(2) {
    width: 17px;
    transform: translateY(-3.4px) rotate(-45deg);
  }

  .photo-instruction-help,
  .photo-instruction-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .photo-instruction-actions .secondary-button {
    width: 100%;
  }

  .profile-button {
    width: 36px;
    min-height: 36px;
    justify-content: center;
    padding: 0;
    background: transparent;
    border-radius: 12px;
    box-shadow: none;
    backdrop-filter: none;
  }

  .credit-pill {
    display: none;
  }

  .new-memory-button {
    width: 36px;
    min-height: 36px;
    justify-content: center;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 12px;
    box-shadow: none;
    backdrop-filter: none;
  }

  .new-memory-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .new-memory-icon {
    width: 34px;
    height: 34px;
  }

  .new-memory-icon svg {
    width: 26px;
    height: 26px;
  }

  .new-memory-overlay {
    align-items: end;
    justify-items: stretch;
    padding: 18px 12px calc(18px + env(safe-area-inset-bottom));
    background: rgba(40, 51, 46, 0.2);
    backdrop-filter: blur(4px) saturate(1.04);
  }

  .new-memory-sheet {
    width: 100%;
  }

  .profile-avatar {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-size: 12px;
  }

  .profile-avatar svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.2;
  }

  .profile-close {
    position: relative;
    width: 34px;
    height: 34px;
    overflow: hidden;
    color: transparent;
    background: rgba(251, 248, 240, 0.82);
    border: 1px solid rgba(32, 61, 54, 0.14);
    border-radius: 12px;
    box-shadow: none;
  }

  .profile-close::before,
  .profile-close::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 1.7px;
    background: rgba(32, 61, 54, 0.86);
    border-radius: 999px;
    content: "";
  }

  .profile-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
  }

  .profile-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
  }

  #profileName {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .intro-screen,
  .mode-screen,
  .menu-page-screen,
  .creator {
    padding: 14px;
  }

  .intro-screen {
    row-gap: 28px;
    padding-top: 44px;
    padding-bottom: 42px;
  }

  .creator {
    scroll-margin-top: 62px;
  }

  #cropPanel,
  #previewView {
    scroll-margin-top: 76px;
  }

  .preview-template-panel {
    scroll-margin-top: 76px;
  }

  .progress-track {
    margin-bottom: 16px;
  }

  .creator.is-style-step .progress-track {
    scroll-margin-top: 120px;
  }

  .intro-copy h1 {
    font-size: clamp(40px, 12vw, 52px);
    line-height: 1.04;
  }

  .intro-copy p:not(.eyebrow) {
    font-size: 16px;
  }

  .intro-actions {
    align-items: center;
    margin-top: 28px;
  }

  .start-button {
    width: min(100%, 260px);
    max-width: 100%;
  }

  .intro-assurance {
    gap: 8px 15px;
    font-size: 11px !important;
  }

  .intro-launch-preview {
    width: min(100%, 365px);
    padding: 18px 18px 58px;
  }

  .intro-launch-card {
    width: min(100%, 285px);
  }

  .intro-launch-preview figcaption {
    right: 3px;
    bottom: 17px;
    width: min(280px, 82%);
    text-align: left;
  }

  .intro-trust {
    display: block;
    padding-top: 20px;
  }

  .intro-learning-note {
    max-width: 330px;
    margin: 0 0 20px;
    font-size: 15px;
  }

  .intro-proof-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin: 0;
    border-top: 1px solid rgba(32, 61, 54, 0.1);
  }

  .intro-proof-grid span {
    width: auto;
    min-height: 86px;
    justify-self: start;
    padding: 14px 12px 12px 0;
    border-top: 0;
    border-left: 0;
    border-bottom: 1px solid rgba(32, 61, 54, 0.1);
  }

  .intro-proof-grid span:nth-child(even) {
    padding-right: 0;
    padding-left: 12px;
    border-left: 1px solid rgba(32, 61, 54, 0.1);
  }

  .intro-memory-board {
    aspect-ratio: 0.76;
    min-height: 0;
    margin-top: 0;
  }

  .intro-scrap {
    padding: clamp(7px, 2.1vw, 12px) clamp(7px, 2.1vw, 12px) clamp(19px, 6vw, 32px);
  }

  .intro-scrap-main {
    top: 7.1%;
    left: 10.7%;
    width: 47.8%;
    height: 42.9%;
  }

  .intro-scrap-side {
    top: 9.9%;
    right: 9.6%;
    width: 36.2%;
    height: 39.1%;
  }

  .intro-scrap-small {
    left: 12.8%;
    bottom: 10.1%;
    width: 30.4%;
    height: 27%;
  }

  .intro-scrap-bottom {
    right: 17.1%;
    bottom: -3.7%;
    width: 47.8%;
    height: 39.7%;
  }

  .intro-caption-card {
    right: 7.8%;
    bottom: 22.5%;
    width: 52.2%;
    padding: 12px 13px;
  }

  .intro-caption-card strong {
    font-size: clamp(20px, 7vw, 29px);
  }

  .intro-caption-card span {
    max-width: 72%;
    font-size: 12px;
  }

  .intro-stamp {
    right: 8.4%;
    bottom: 21.2%;
    font-size: clamp(13px, 4vw, 16px);
  }

  .intro-script-note {
    left: 4.9%;
    bottom: 6.8%;
    font-size: clamp(24px, 7vw, 29px);
  }

  .intro-tape {
    width: 16.2%;
    height: 3.3%;
  }

  .intro-tape-one {
    top: 4.9%;
    left: 36.2%;
  }

  .intro-tape-two {
    top: 32.4%;
    right: 12.8%;
  }

  .field-row,
  .album-actions,
  .candidate-grid,
  .photo-strip,
  .mood-grid,
  .memory-type-grid,
  .priority-grid,
  .crop-preset-grid,
  .generate-row {
    grid-template-columns: 1fr;
  }

  .step-card {
    padding: 14px;
  }

  .section-title {
    margin-bottom: 11px;
  }

  .step-intro {
    margin-bottom: 9px;
  }

  .choice-group {
    margin-top: 9px;
  }

  .mobile-choice-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 58px;
    padding: 10px 12px;
    color: var(--ink);
    text-align: left;
    background: rgba(251, 248, 240, 0.72);
    border: 1px solid rgba(113, 107, 97, 0.24);
    border-radius: 8px;
  }

  .mobile-choice-summary[aria-expanded="true"] {
    border-color: rgba(47, 62, 56, 0.46);
    box-shadow: 0 0 0 3px rgba(47, 62, 56, 0.08);
  }

  .mobile-choice-summary strong,
  .mobile-choice-summary small {
    display: block;
  }

  .mobile-choice-summary strong {
    font-size: 14px;
  }

  .mobile-choice-summary small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.3;
  }

  .mobile-choice-chevron {
    width: 10px;
    height: 10px;
    margin: 0 5px 5px 0;
    border-right: 2px solid var(--green);
    border-bottom: 2px solid var(--green);
    transform: rotate(45deg);
    transition: transform 180ms ease, margin 180ms ease;
  }

  .mobile-choice-summary[aria-expanded="true"] .mobile-choice-chevron {
    margin: 5px 5px 0 0;
    transform: rotate(225deg);
  }

  .mobile-choice-summary[aria-expanded="false"] + .memory-type-grid,
  .mobile-choice-summary[aria-expanded="false"] + .priority-grid {
    display: none;
  }

  .memory-type-grid,
  .priority-grid {
    gap: 7px;
    margin: 8px 0 10px;
  }

  .memory-type-button,
  .priority-button {
    min-height: 56px;
    padding: 8px 10px;
  }

  .upload-zone {
    min-height: 108px;
    margin-top: 12px;
    padding: 14px;
  }

  .photo-method-grid {
    grid-template-columns: 1fr;
  }

  .photo-method-option {
    min-height: 82px;
  }

  .photo-analysis-start {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .upload-copy {
    line-height: 1.35;
  }

  .memory-form-section + .memory-form-section {
    margin-top: 16px;
    padding-top: 16px;
  }

  .memory-form-heading {
    margin-bottom: 10px;
  }

  .step-actions {
    bottom: 0;
    gap: 7px 10px;
    margin: 14px -14px -14px;
    padding: 6px 14px calc(6px + env(safe-area-inset-bottom));
  }

  .step-actions .primary-button,
  .step-actions .secondary-button,
  .step-back-control {
    min-height: 42px;
  }

  .step-action-meta {
    display: none;
  }

  .step-actions-forward {
    grid-template-columns: minmax(0, 1fr);
  }

  .step-nav.step-actions {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .finish-actions.step-actions {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .creator.is-style-step .finish-actions.step-actions {
    margin: 16px 0 0;
    border-radius: 8px;
  }

  .draft-save-strip {
    align-items: start;
    flex-direction: column;
    gap: 7px;
  }

  .draft-save-button {
    width: 100%;
  }

  .preview-template-heading {
    align-items: start;
    flex-direction: column;
    gap: 2px;
  }

  .preview-template-heading strong {
    text-align: left;
  }

  .template-button {
    flex-basis: 132px;
  }

  .creator.is-style-step .style-control-accordion {
    gap: 0;
    padding: 12px;
  }

  .style-control-summary {
    min-height: 40px;
    cursor: pointer;
  }

  .style-control-accordion:not([open]) .style-control-description,
  .style-control-accordion[open] .style-control-selection {
    display: none;
  }

  .style-control-accordion[open] .style-control-body {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(113, 107, 97, 0.18);
    animation: style-control-open 160ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .crop-panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .creator.is-style-step .crop-panel {
    gap: 8px;
  }

  .single-typography-panel-slot .typography-controls,
  .moving-typography-panel-slot .typography-controls {
    grid-template-columns: 1fr;
  }

  .creator.is-style-step .crop-panel-head {
    gap: 4px;
  }

  .creator.is-style-step .crop-panel-head strong {
    font-size: 13px;
  }

  .creator.is-style-step .crop-preset-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .creator.is-style-step .crop-preset-button {
    min-height: 44px;
    align-content: center;
    padding: 8px 6px;
    text-align: center;
  }

  .creator.is-style-step .crop-preset-button strong {
    font-size: 12px;
  }

  .creator.is-style-step .crop-preset-button small {
    display: none;
  }

  .preview-crop-dock {
    width: 100%;
    margin-top: 8px;
    margin-bottom: 10px;
    padding: 9px;
  }

  .crop-mode-button {
    min-height: 44px;
    gap: 6px;
    padding: 6px;
    font-size: 12px;
  }

  .crop-mode-icon {
    width: 17px;
    height: 17px;
    flex-basis: 17px;
  }

  .preview-crop-hint {
    font-size: 11px;
  }

  .preview-crop-footer {
    flex-wrap: wrap;
    gap: 2px 12px;
    padding: 0 3px;
  }

  .preview-crop-actions {
    margin-left: auto;
  }

  .preview-crop-reset {
    font-size: 11px;
  }

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

  .candidate-grid {
    max-height: none;
  }

  .selected-photo-slot {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .photo-swap-row {
    min-height: 42px;
  }

  .candidate-card {
    display: grid;
    grid-template-columns: minmax(120px, 42%) minmax(0, 1fr);
    min-height: 178px;
  }

  .candidate-main {
    height: 100%;
    min-height: 178px;
  }

  .candidate-meta {
    min-height: 178px;
    padding: 10px;
  }

  .candidate-reason {
    font-size: 10px;
    line-height: 1.38;
  }

  .candidate-check {
    top: auto;
    right: auto;
    bottom: 8px;
    left: 8px;
  }

  .photo-see-all {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .photo-see-all small { text-align: center; }

  .photo-see-all button { width: 100%; }

  .photo-selection-toast {
    right: 10px;
    bottom: calc(64px + env(safe-area-inset-bottom));
  }

  .export-tray {
    grid-template-areas:
      "preview copy"
      "actions actions";
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .export-tray:has(img[hidden]) {
    grid-template-areas:
      "copy"
      "actions";
    grid-template-columns: minmax(0, 1fr);
  }

  .export-tray-actions,
  .gift-send-actions,
  .gift-form-grid,
  .gift-send-head,
  .gift-history-layout {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .export-tray-actions .primary-button,
  .export-tray-actions .secondary-button,
  .export-tray-actions .ghost-button,
  .gift-send-actions .primary-button,
  .gift-send-actions .secondary-button,
  .gift-send-actions .ghost-button {
    width: 100%;
  }

  .gift-history-thumb {
    width: 100%;
    height: 160px;
  }

  .gift-card-stat-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .memory-card .gift-card-stat {
    align-content: start;
    min-height: 64px;
    padding: 7px;
  }

  .gift-card-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px 44px 44px;
    gap: 8px;
    align-items: center;
    justify-content: stretch;
  }

  .gift-card-actions .secondary-button {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding-inline: 12px;
  }

  .gift-card-actions .gift-icon-button,
  .gift-card-actions .memory-delete-button {
    width: 44px;
    height: 44px;
  }

  .gift-copy-feedback {
    grid-column: 1 / -1;
  }

  .book-review {
    grid-template-columns: 1fr;
  }

  .album-book-stage {
    padding: 14px;
  }

  .album-book-stage::before,
  .album-book-stage::after {
    display: none;
  }

  .album-book-stage .journal-preview {
    width: min(100%, 362px);
    justify-self: center;
    transform: none;
  }

  .export-tray .primary-button,
  .export-tray-actions {
    grid-column: 1 / -1;
    text-align: center;
  }

  .admin-rule-metrics,
  .admin-analytics-grid,
  .admin-analytics-split,
  .admin-preview-form,
  .admin-preview-grid {
    grid-template-columns: 1fr;
  }

  .admin-compact-list span {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 1020px) {
  .creator.is-style-step.is-finish-flow {
    display: block;
  }

  .creator.is-style-step.is-finish-flow .wizard-panel,
  .creator.is-style-step.is-finish-flow .step-card[data-step="6"] {
    display: block;
  }

  .creator.is-style-step.is-finish-flow .memory-finish-flow {
    width: 100%;
  }

  .memory-ready-layout,
  .memory-checkout-layout {
    grid-template-columns: 1fr;
  }

  .memory-order-summary {
    position: static;
  }

  .preview-template-panel {
    width: 100%;
    margin: 0 0 10px;
    padding: 0;
  }

  .appearance-desktop {
    display: none;
  }

  .appearance-compact {
    display: grid;
    background: transparent;
    border: 0;
    border-radius: 0;
  }

  .appearance-summary-button {
    display: grid;
    min-height: 68px;
    grid-template-columns: minmax(0, 1fr) auto 18px;
    align-items: center;
    gap: 12px;
    padding: 10px 13px;
    color: var(--ink);
    text-align: left;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--surface-border);
    border-radius: 0;
  }

  .appearance-summary-button:last-child {
    border-bottom: 0;
  }

  .appearance-summary-button:hover,
  .appearance-summary-button:focus-visible {
    background: rgba(32, 61, 54, 0.045);
  }

  .appearance-summary-button:focus-visible {
    position: relative;
    z-index: 1;
    outline: 2px solid rgba(32, 61, 54, 0.42);
    outline-offset: -2px;
  }

  .appearance-summary-copy {
    display: grid;
    min-width: 0;
    gap: 3px;
  }

  .appearance-summary-copy small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 720;
  }

  .appearance-summary-copy strong {
    overflow: hidden;
    font-size: 14px;
    font-weight: 680;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .appearance-summary-thumbnail {
    width: 34px;
    height: auto;
  }

  .appearance-summary-tone {
    display: block;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(46, 41, 33, 0.18);
    border-radius: 50%;
    box-shadow: 0 2px 7px rgba(46, 41, 33, 0.12);
  }

  .appearance-summary-chevron {
    width: 8px;
    height: 8px;
    justify-self: end;
    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
    opacity: 0.5;
    transform: rotate(45deg);
  }

  .appearance-picker .template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .appearance-picker .paper-tone-scroll-shell::before,
  .appearance-picker .paper-tone-scroll-shell::after,
  .appearance-picker .paper-tone-scroll-cue {
    display: none;
  }

  .appearance-picker .paper-tone-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 2px;
  }

  .appearance-picker .paper-tone-button {
    min-height: 78px;
  }
}

@media (max-width: 640px) {
  .appearance-picker {
    width: 100%;
    height: min(82svh, 720px);
    max-width: none;
    max-height: none;
    margin: auto 0 0;
    overscroll-behavior: contain;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 8px 8px 0 0;
  }

  .appearance-picker[open] {
    animation: none;
  }

  .appearance-picker[data-picker-kind="tone"] {
    height: min(64svh, 520px);
  }

  .appearance-picker-head {
    padding: 14px 16px 12px;
  }

  .appearance-picker-head h2 {
    font-size: 17px;
  }

  .appearance-picker-body {
    padding: 12px 14px 14px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .appearance-picker-helper {
    padding: 11px 16px calc(13px + env(safe-area-inset-bottom));
  }

  .appearance-picker .template-grid {
    gap: 8px;
  }

  .appearance-picker .template-button {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 8px;
    min-height: 82px;
    padding: 7px;
  }

  .appearance-picker .template-thumbnail {
    width: 46px;
    height: auto;
  }

  .appearance-picker .template-button strong {
    font-size: 12px;
  }

  .appearance-picker .paper-tone-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .appearance-picker .paper-tone-button {
    min-height: 76px;
    padding: 6px 3px;
    font-size: 9.5px;
  }

  .appearance-picker .paper-tone-swatch {
    width: 32px;
    height: 32px;
  }

  .appearance-picker button {
    touch-action: manipulation;
  }
}

/* Local dark-theme comparison: open the app with ?theme=dark. */
html[data-theme="dark"] {
  color-scheme: dark;
  background: #171c19;
  --app-background: #171c19;
  --navigation-background: #202622;
  --ink: #f3f0e8;
  --muted: #b8b5ac;
  --panel: #202622;
  --line: #39433e;
  --green: #9abfad;
  --green-soft: #26352e;
  --archive-green: #aed0bf;
  --clay: #8fb5a3;
  --blue: #8fb7b2;
  --plum: #b9a2aa;
  --ochre: #d29779;
  --danger: #de8f8f;
  --surface: rgba(32, 38, 34, 0.88);
  --surface-strong: rgba(41, 49, 44, 0.96);
  --surface-subtle: rgba(243, 240, 232, 0.055);
  --surface-control: rgba(41, 49, 44, 0.72);
  --surface-control-hover: rgba(49, 59, 53, 0.92);
  --surface-selected: rgba(154, 191, 173, 0.15);
  --surface-selected-border: rgba(174, 208, 191, 0.28);
  --surface-border: rgba(184, 181, 172, 0.13);
  --surface-border-strong: rgba(184, 181, 172, 0.22);
  --shadow-active: 0 6px 18px rgba(0, 0, 0, 0.2);
  --shadow-overlay: 0 22px 56px rgba(0, 0, 0, 0.42);
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
}

html[data-theme="dark"] body {
  background: #171c19;
  color: var(--ink);
}

html[data-theme="dark"] .app-shell {
  background: #171c19;
}

html[data-theme="dark"] .topbar {
  background: rgba(18, 23, 20, 0.91);
  border-bottom-color: rgba(184, 181, 172, 0.12);
}

html[data-theme="dark"] .brand strong,
html[data-theme="dark"] .brand-script-initial + span {
  color: #f3f0e8;
}

html[data-theme="dark"] .brand-script-initial,
html[data-theme="dark"] .new-memory-button,
html[data-theme="dark"] .credit-pill,
html[data-theme="dark"] .profile-button,
html[data-theme="dark"] .menu-button {
  color: #9abfad;
}

html[data-theme="dark"] .brand small {
  color: #918f87;
}

html[data-theme="dark"] .menu-lines span {
  background: #9abfad;
}

html[data-theme="dark"] .menu-button:hover,
html[data-theme="dark"] .menu-button:focus-visible,
html[data-theme="dark"] .new-memory-button:hover,
html[data-theme="dark"] .profile-button:hover,
html[data-theme="dark"] .credit-pill:hover {
  background: rgba(154, 191, 173, 0.1);
  border-color: transparent;
}

html[data-theme="dark"] .profile-avatar {
  color: #aed0bf;
  background: #202622;
  border-color: rgba(154, 191, 173, 0.3);
}

html[data-theme="dark"] .intro-screen,
html[data-theme="dark"] .creator,
html[data-theme="dark"] .mode-screen,
html[data-theme="dark"] .menu-page-screen,
html[data-theme="dark"] .menu-page-screen.is-sign-in-page {
  background: #171c19;
}

html[data-theme="dark"] .intro-copy h1,
html[data-theme="dark"] .mode-heading h1,
html[data-theme="dark"] .preview-tools h1,
html[data-theme="dark"] .menu-page-heading h1,
html[data-theme="dark"] .section-title h2 {
  color: #f3f0e8;
}

html[data-theme="dark"] .intro-copy p:not(.eyebrow),
html[data-theme="dark"] .intro-learning-note,
html[data-theme="dark"] .intro-assurance {
  color: #b8b5ac;
}

html[data-theme="dark"] .intro-launch-preview::before,
html[data-theme="dark"] .intro-launch-preview::after {
  border-color: rgba(184, 181, 172, 0.14);
}

html[data-theme="dark"] .intro-launch-preview figcaption {
  color: #f3f0e8;
  background: rgba(29, 35, 31, 0.94);
  border-color: rgba(184, 181, 172, 0.16);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
}

html[data-theme="dark"] .intro-launch-preview figcaption span {
  color: #aaa79f;
}

html[data-theme="dark"] .intro-trust,
html[data-theme="dark"] .intro-proof-grid,
html[data-theme="dark"] .intro-proof-grid span,
html[data-theme="dark"] .preview-tools,
html[data-theme="dark"] .preview-column,
html[data-theme="dark"] .menu-page-heading {
  border-color: rgba(184, 181, 172, 0.14);
}

html[data-theme="dark"] .intro-proof-grid strong {
  color: #f3f0e8;
}

html[data-theme="dark"] .intro-proof-grid small {
  color: #918f87;
}

html[data-theme="dark"] .intro-memory-board {
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.42);
}

html[data-theme="dark"] .mode-tile {
  color: var(--ink);
  background: #fbfaf6;
  border-color: rgba(113, 107, 97, 0.2);
}

html[data-theme="dark"] .mode-screen {
  background: #faf9f5;
}

html[data-theme="dark"] .mode-heading h1 {
  color: var(--ink);
}

html[data-theme="dark"] .mode-tile:not(.is-selected):hover {
  background: #f7f8f2;
  border-color: rgba(32, 61, 54, 0.34);
}

html[data-theme="dark"] .mode-tile.is-selected {
  background: #e7ede7;
  border-color: rgba(73, 105, 92, 0.58);
}

html[data-theme="dark"] .recent-memory-card,
html[data-theme="dark"] .home-creator-card,
html[data-theme="dark"] .recent-memory-empty {
  color: #f3f0e8;
  background: #202622;
  border-color: rgba(184, 181, 172, 0.18);
}

html[data-theme="dark"] .home-session-loading {
  color: #f3f0e8;
  background: linear-gradient(145deg, #202622, #202823);
  border-color: rgba(184, 181, 172, 0.18);
}

html[data-theme="dark"] .home-session-loading-copy span,
html[data-theme="dark"] .home-session-loading-memory {
  background: rgba(184, 181, 172, 0.12);
}

html[data-theme="dark"] .first-memory-welcome,
html[data-theme="dark"] .recent-memory-section {
  color: #f3f0e8;
  background:
    radial-gradient(circle at 84% 14%, rgba(70, 104, 88, 0.52), transparent 18rem),
    radial-gradient(circle at 8% 100%, rgba(130, 106, 73, 0.2), transparent 20rem),
    #202622;
  border-color: rgba(184, 181, 172, 0.18);
}

html[data-theme="dark"] .first-memory-copy h1 {
  color: #f3f0e8;
}

html[data-theme="dark"] .first-memory-copy > p:not(.eyebrow) {
  color: #aaa79f;
}

html[data-theme="dark"] .first-memory-promise {
  color: #b8d4c5;
}

html[data-theme="dark"] .home-creator-card.is-studio {
  background:
    radial-gradient(circle at 100% 0%, rgba(70, 104, 88, 0.48), transparent 15rem),
    #202823;
  border-color: rgba(154, 191, 173, 0.42);
}

html[data-theme="dark"] .memory-home-heading h1,
html[data-theme="dark"] .memory-home-heading h2,
html[data-theme="dark"] .home-creator-copy h3,
html[data-theme="dark"] .recent-memory-empty strong {
  color: #f3f0e8;
}

html[data-theme="dark"] .home-creator-copy p,
html[data-theme="dark"] .home-creator-pricing span,
html[data-theme="dark"] .home-creator-included,
html[data-theme="dark"] .home-print-note,
html[data-theme="dark"] .recent-memory-details > span,
html[data-theme="dark"] .recent-memory-empty {
  color: #aaa79f;
}

html[data-theme="dark"] .home-creator-pricing strong {
  color: #f3f0e8;
}

html[data-theme="dark"] .home-creator-pricing p {
  background: transparent;
}

html[data-theme="dark"] .home-creator-pricing p + p::before {
  background: rgba(154, 191, 173, 0.2);
}

html[data-theme="dark"] .home-classic-actions button {
  color: #c6ddcf;
  background: rgba(104, 143, 124, 0.18);
  border-color: rgba(154, 191, 173, 0.36);
}

html[data-theme="dark"] .mode-tile-select > strong,
html[data-theme="dark"] .mode-kicker,
html[data-theme="dark"] .mode-mark {
  color: var(--green);
}

html[data-theme="dark"] .mode-mark,
html[data-theme="dark"] .mode-benefits span {
  background: rgba(111, 148, 132, 0.1);
  border-color: rgba(32, 61, 54, 0.14);
}

html[data-theme="dark"] .step-card {
  background: rgba(32, 38, 34, 0.58);
  border-color: rgba(184, 181, 172, 0.08);
}

html[data-theme="dark"] .progress-bar {
  background: #39433e;
}

html[data-theme="dark"] .progress-bar span {
  background: #9abfad;
}

html[data-theme="dark"] .section-title span,
html[data-theme="dark"] .mood-mark {
  color: #d9d4c9;
  background: #354039;
}

html[data-theme="dark"] textarea,
html[data-theme="dark"] input,
html[data-theme="dark"] select {
  color: #f3f0e8;
  background: #242a26;
  border-color: #39433e;
}

html[data-theme="dark"] textarea::placeholder,
html[data-theme="dark"] input::placeholder {
  color: #918f87;
}

html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus {
  border-color: #9abfad;
  box-shadow: 0 0 0 3px rgba(154, 191, 173, 0.17);
}

html[data-theme="dark"] .primary-button {
  color: #142019;
  background: #9abfad;
  border-color: #9abfad;
}

html[data-theme="dark"] .primary-button:hover {
  background: #aed0bf;
  border-color: #aed0bf;
}

html[data-theme="dark"] .secondary-button,
html[data-theme="dark"] .ghost-button {
  color: #dce9e2;
  background: #29312c;
  border-color: #4b5a52;
}

html[data-theme="dark"] .secondary-button:hover,
html[data-theme="dark"] .ghost-button:hover {
  color: #f3f0e8;
  background: #303a34;
  border-color: #6f8f80;
}

html[data-theme="dark"] .upload-zone {
  color: #d9d4c9;
  background: rgba(41, 49, 44, 0.62);
  border-color: rgba(210, 151, 121, 0.42);
}

html[data-theme="dark"] .photo-method-option[aria-pressed="true"],
html[data-theme="dark"] .mood-button[aria-checked="true"],
html[data-theme="dark"] .memory-type-button[aria-checked="true"],
html[data-theme="dark"] .priority-button[aria-checked="true"],
html[data-theme="dark"] .template-button[aria-pressed="true"] {
  border-color: rgba(154, 191, 173, 0.58);
}

html[data-theme="dark"] .photo-method-option[aria-pressed="true"] .photo-method-icon,
html[data-theme="dark"] .suggestion-chip,
html[data-theme="dark"] .note-history-card,
html[data-theme="dark"] .menu-page-back-button {
  color: #dce9e2;
  background: #29312c;
  border-color: #4b5a52;
}

html[data-theme="dark"] .new-memory-sheet,
html[data-theme="dark"] .analysis-overlay-panel,
html[data-theme="dark"] .menu-page-card,
html[data-theme="dark"] .sign-in-card {
  background: rgba(32, 38, 34, 0.96);
}

html[data-theme="dark"] :is(#draftHistorySection, #exportHistorySection, #giftHistorySection, #printOrderHistorySection) > .menu-page-card {
  background: transparent;
}

html[data-theme="dark"] :is(#draftHistorySection, #exportHistorySection, #giftHistorySection, #printOrderHistorySection) > .menu-page-card > .history-section-head,
html[data-theme="dark"] :is(#draftMemoryList, #exportMemoryList) .memory-card,
html[data-theme="dark"] #printOrderList .print-order-card {
  border-color: rgba(184, 181, 172, 0.13);
}

html[data-theme="dark"] :is(#draftMemoryList, #exportMemoryList, #printOrderList),
html[data-theme="dark"] #giftHistorySection .gift-history-card {
  background: rgba(32, 38, 34, 0.78);
  border-color: rgba(184, 181, 172, 0.14);
}

html[data-theme="dark"] :is(#draftMemoryList, #exportMemoryList) .memory-card:hover,
html[data-theme="dark"] #printOrderList .print-order-summary:hover {
  background: rgba(154, 191, 173, 0.07);
}

html[data-theme="dark"] :is(#draftMemoryList, #exportMemoryList) .memory-product-badge {
  color: #aed0bf;
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(184, 181, 172, 0.16);
}

html[data-theme="dark"] :is(#draftMemoryList, #exportMemoryList) .memory-card-main > strong,
html[data-theme="dark"] #printOrderList .print-order-summary-copy strong,
html[data-theme="dark"] :is(#draftHistorySection, #exportHistorySection, #giftHistorySection, #printOrderHistorySection) > .menu-page-card > .history-section-head strong {
  color: #f3f0e8;
}

html[data-theme="dark"] :is(#draftMemoryList, #exportMemoryList) .memory-card-main > span:not(.memory-meta),
html[data-theme="dark"] :is(#draftMemoryList, #exportMemoryList) .memory-meta > span:last-child,
html[data-theme="dark"] #printOrderList .print-order-summary-copy small,
html[data-theme="dark"] #printOrderList .print-order-summary-state small,
html[data-theme="dark"] :is(#draftHistorySection, #exportHistorySection, #giftHistorySection, #printOrderHistorySection) > .menu-page-card > .history-section-head small {
  color: #aaa9a2;
}

html[data-theme="dark"] #giftHistorySection :is(.gift-summary-stat, .gift-card-stat),
html[data-theme="dark"] #giftHistorySection .gift-recipient-chip {
  background: rgba(41, 49, 44, 0.86);
  border-color: rgba(184, 181, 172, 0.14);
}

html[data-theme="dark"] #giftHistorySection .gift-recipient-chip.is-active {
  color: #aed0bf;
  background: var(--surface-selected);
  border-color: var(--surface-selected-border);
}

html[data-theme="dark"] #creditsSection .menu-page-grid > .menu-page-card,
html[data-theme="dark"] #creditsSection > .menu-page-card > .history-section-head,
html[data-theme="dark"] #accountSection .profile-page-intro,
html[data-theme="dark"] #accountSection .profile-sign-in-prompt {
  border-color: rgba(184, 181, 172, 0.14);
}

html[data-theme="dark"] #creditsSection .menu-credit-card {
  color: #f3f0e8;
  background: #294b40;
}

html[data-theme="dark"] .payment-confirmation {
  color: #d9e8df;
  background: rgba(65, 99, 86, 0.42);
  border-color: rgba(174, 208, 191, 0.22);
}

html[data-theme="dark"] #creditsSection :is(.history-section-head strong, .credit-rates strong, .credit-ledger-item strong, .payment-history-item strong),
html[data-theme="dark"] #accountSection .account-profile-card strong,
html[data-theme="dark"] .sign-in-card-head h2 {
  color: #f3f0e8;
}

html[data-theme="dark"] #creditsSection :is(.history-section-head small, .credit-rates span, .credit-ledger-item, .payment-history-item),
html[data-theme="dark"] #accountSection :is(.account-profile-card small, .profile-page-intro > p, .profile-sign-in-prompt p),
html[data-theme="dark"] .sign-in-card-head p:not(.eyebrow) {
  color: #aaa9a2;
}

html[data-theme="dark"] #creditsSection :is(.credit-pack-button, .discount-code-row input),
html[data-theme="dark"] #creditsSection :is(.credit-rates, .credit-ledger-list, .payment-history-list),
html[data-theme="dark"] #accountSection .profile-field :is(input, .profile-readonly-value),
html[data-theme="dark"] :is(.email-auth-field input, .email-auth-selected, .sign-in-provider) {
  color: #f3f0e8;
  background: #242a26;
  border-color: #39433e;
}

html[data-theme="dark"] #creditsSection :is(.credit-rates span, .credit-ledger-item, .payment-history-item) {
  border-color: rgba(184, 181, 172, 0.11);
}

html[data-theme="dark"] #creditsSection .credit-rates span:nth-child(odd) {
  border-right-color: rgba(184, 181, 172, 0.11);
}

html[data-theme="dark"] #accountSection .account-page-avatar {
  background: #29312c;
  border-color: #4b5a52;
}

html[data-theme="dark"] .sign-in-card-foot {
  border-color: rgba(184, 181, 172, 0.12);
}

html[data-theme="dark"] .side-panel {
  background: rgba(24, 30, 26, 0.93);
  border-right-color: rgba(184, 181, 172, 0.14);
  box-shadow: 18px 0 46px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .side-panel-backdrop {
  background: rgba(5, 8, 6, 0.58);
}

html[data-theme="dark"] .side-panel-head,
html[data-theme="dark"] .profile-status,
html[data-theme="dark"] .side-panel-actions {
  border-color: rgba(184, 181, 172, 0.13);
}

html[data-theme="dark"] .side-panel-head strong,
html[data-theme="dark"] .history-tab strong {
  color: #f3f0e8;
}

html[data-theme="dark"] .side-panel-head :is(.eyebrow, small),
html[data-theme="dark"] .profile-status,
html[data-theme="dark"] .history-tab small {
  color: #aaa9a2;
}

html[data-theme="dark"] .history-tab {
  border-bottom-color: rgba(184, 181, 172, 0.08);
}

html[data-theme="dark"] .history-tab:last-child,
html[data-theme="dark"] .history-tab:has(+ .history-tab.is-active) {
  border-bottom-color: transparent;
}

html[data-theme="dark"] .history-tab:hover,
html[data-theme="dark"] .history-tab:focus-visible {
  background: rgba(154, 191, 173, 0.07);
}

html[data-theme="dark"] .history-tab.is-active {
  background: var(--surface-selected);
  border-bottom-color: transparent;
}

html[data-theme="dark"] .history-tab.is-active :is(strong, small),
html[data-theme="dark"] .history-tab.is-active .side-menu-mark {
  color: #aed0bf;
}

html[data-theme="dark"] .side-menu-arrow::after {
  border-color: rgba(184, 181, 172, 0.48);
}

html[data-theme="dark"] :is(.side-panel .profile-close, .gift-preview-close.profile-close) {
  background: transparent;
  border-color: rgba(184, 181, 172, 0.15);
}

html[data-theme="dark"] :is(.side-panel .profile-close, .gift-preview-close.profile-close)::before,
html[data-theme="dark"] :is(.side-panel .profile-close, .gift-preview-close.profile-close)::after {
  background: #9abfad;
}

html[data-theme="dark"] .memory-product-filter-button {
  --memory-product-background: rgba(255, 255, 255, 0.035);
  --memory-product-border: rgba(184, 181, 172, 0.16);
  --memory-product-color: #aaa9a2;
}

html[data-theme="dark"] .memory-product-filter-button:hover,
html[data-theme="dark"] .memory-product-filter-button:focus-visible,
html[data-theme="dark"] .memory-product-filter-button.is-selected {
  color: #aed0bf;
  background: var(--surface-selected);
  border-color: var(--surface-selected-border);
}

/* Referrals stay distinct from the archive without competing with its active state. */
.referral-side-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 66px;
  margin: 8px 0 2px;
  padding: 10px 10px 10px 8px;
  color: var(--green);
  text-align: left;
  background: rgba(255, 253, 248, 0.72);
  border: 1px solid rgba(40, 51, 46, 0.14);
  border-radius: 8px;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.referral-side-card:hover,
.referral-side-card:focus-visible {
  background: var(--surface-control-hover);
  border-color: rgba(32, 61, 54, 0.24);
}

.referral-side-card.is-active {
  background: var(--surface-navigation-selected);
  border-color: var(--surface-navigation-selected-border);
}

.referral-side-icon,
.referral-card-mark {
  display: grid;
  place-items: center;
  color: #9a5e45;
}

.referral-side-icon {
  width: 38px;
  height: 38px;
  color: #315c50;
}

.referral-side-icon svg,
.referral-card-mark svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.referral-side-card > span:nth-child(2) {
  min-width: 0;
}

.referral-side-card strong,
.referral-side-card small {
  display: block;
}

.referral-side-card strong {
  font-size: 14px;
  font-weight: 680;
}

.referral-side-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.referral-side-count {
  padding: 4px 7px;
  color: #315c50;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(49, 92, 80, 0.18);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.referral-page {
  display: grid;
  gap: 16px;
}

.referral-page[hidden] {
  display: none;
}

.referral-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 16px;
}

.referral-invitation-card,
.referral-invite-card,
.referral-progress-card,
.referral-reward-card {
  border-radius: 8px;
}

.referral-invitation-card {
  padding: 24px;
  color: var(--green);
  background: #f4e9e1;
  border: 1px solid #dec4b3;
}

.referral-invitation-card h2,
.referral-card-heading h2 {
  margin: 4px 0 8px;
  color: var(--green);
  font-family: var(--font-source-serif);
  font-size: clamp(25px, 3vw, 36px);
  font-weight: 400;
  line-height: 1.08;
}

.referral-invitation-card > p:not(.eyebrow),
.referral-card-heading p:not(.eyebrow) {
  max-width: 650px;
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.55;
}

.referral-invitation-card .primary-button {
  width: auto;
}

.referral-card-heading {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
}

.referral-card-mark {
  align-self: start;
  width: 48px;
  height: 48px;
  background: #f3e3d8;
  border: 1px solid #dec4b3;
  border-radius: 8px;
}

.referral-card-heading h2 {
  font-size: 30px;
}

.referral-invite-form {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

.referral-invite-form > label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 680;
}

.referral-invite-form > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.referral-invite-form input {
  min-width: 0;
}

.referral-invite-form .primary-button {
  width: auto;
  min-width: 118px;
}

.referral-invite-form > small,
.referral-status {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.referral-status {
  min-height: 18px;
  margin: 0;
}

.referral-status[data-status="success"] {
  color: var(--green);
}

.referral-status[data-status="error"] {
  color: var(--danger);
}

.referral-slot-list,
.referral-reward-list {
  display: grid;
  gap: 0;
  margin-top: 12px;
  border-top: 1px solid rgba(40, 51, 46, 0.1);
}

.referral-slot,
.referral-reward {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(40, 51, 46, 0.1);
}

.referral-slot-number {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--green);
  background: #f2eee6;
  border: 1px solid #d9d2c6;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
}

.referral-slot strong,
.referral-slot small,
.referral-reward strong,
.referral-reward small {
  display: block;
}

.referral-slot strong,
.referral-reward strong {
  color: var(--ink);
  font-size: 13px;
}

.referral-slot small,
.referral-reward small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.referral-slot.is-empty {
  opacity: 0.72;
}

.referral-copy-button {
  min-height: 34px;
  padding: 6px 10px;
  color: var(--green);
  background: transparent;
  border: 1px solid rgba(32, 61, 54, 0.22);
  border-radius: 7px;
  font-size: 11px;
  font-weight: 680;
}

.referral-copy-button:hover,
.referral-copy-button:focus-visible {
  background: var(--green-soft);
}

.referral-state-badge {
  color: #6e513f;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.referral-reward {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.referral-reward code {
  padding: 7px 9px;
  color: var(--green);
  background: #f2eee6;
  border: 1px solid #d9d2c6;
  border-radius: 6px;
  font-family: var(--font-system);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.referral-reward.is-expired code {
  color: var(--muted);
  background: transparent;
}

@media (max-width: 820px) {
  .referral-page-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .referral-invitation-card,
  .referral-invite-card,
  .referral-progress-card,
  .referral-reward-card {
    padding: 18px;
  }

  .referral-invite-form > div {
    grid-template-columns: 1fr;
  }

  .referral-invite-form .primary-button {
    width: 100%;
  }

  .referral-reward {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .referral-reward code {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
  }

  .referral-reward .referral-copy-button,
  .referral-reward .referral-state-badge {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

html[data-theme="dark"] .referral-side-card {
  color: #d7e7de;
  background: rgba(41, 49, 44, 0.72);
  border-color: rgba(184, 181, 172, 0.16);
}

html[data-theme="dark"] .referral-invitation-card {
  color: #f0d6c6;
  background: rgba(159, 94, 65, 0.13);
  border-color: rgba(217, 158, 128, 0.24);
}

html[data-theme="dark"] .referral-side-card:hover,
html[data-theme="dark"] .referral-side-card:focus-visible {
  background: rgba(49, 59, 53, 0.92);
  border-color: rgba(174, 208, 191, 0.24);
}

html[data-theme="dark"] .referral-side-card.is-active {
  background: var(--surface-selected);
  border-color: var(--surface-selected-border);
}

html[data-theme="dark"] .referral-side-card small,
html[data-theme="dark"] .referral-invitation-card > p:not(.eyebrow),
html[data-theme="dark"] .referral-card-heading p:not(.eyebrow),
html[data-theme="dark"] .referral-invite-form > small,
html[data-theme="dark"] .referral-status,
html[data-theme="dark"] .referral-slot small,
html[data-theme="dark"] .referral-reward small {
  color: #aaa9a2;
}

html[data-theme="dark"] .referral-invitation-card h2,
html[data-theme="dark"] .referral-card-heading h2,
html[data-theme="dark"] .referral-slot strong,
html[data-theme="dark"] .referral-reward strong {
  color: #f3f0e8;
}

html[data-theme="dark"] .referral-card-mark,
html[data-theme="dark"] .referral-slot-number,
html[data-theme="dark"] .referral-reward code {
  color: #f0c0a6;
  background: rgba(159, 94, 65, 0.12);
  border-color: rgba(217, 158, 128, 0.2);
}

html[data-theme="dark"] .gift-flow-heading,
html[data-theme="dark"] .gift-share-preview,
html[data-theme="dark"] .gift-delivery-heading {
  border-color: rgba(184, 181, 172, 0.14);
}

html[data-theme="dark"] .gift-live-preview {
  background: rgba(29, 36, 32, 0.82);
  border-color: rgba(184, 181, 172, 0.14);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] .gift-live-preview-head i {
  background: rgba(184, 181, 172, 0.14);
}

html[data-theme="dark"] .gift-live-reveal {
  background:
    linear-gradient(rgba(15, 19, 17, 0.2), rgba(15, 19, 17, 0.2)),
    repeating-linear-gradient(90deg, rgba(235, 225, 205, 0.025) 0 1px, transparent 1px 7px),
    #292b26;
  border-color: rgba(184, 181, 172, 0.15);
}

html[data-theme="dark"] .gift-live-copy h2,
html[data-theme="dark"] .gift-live-copy > p:last-child,
html[data-theme="dark"] .gift-live-brand strong {
  color: #f3f0e8;
}

html[data-theme="dark"] .gift-live-brand small,
html[data-theme="dark"] .gift-live-privacy,
html[data-theme="dark"] .gift-live-memory span {
  color: #aaa9a2;
}

html[data-theme="dark"] .gift-live-memory {
  background: rgba(20, 25, 22, 0.44);
  border-color: rgba(184, 181, 172, 0.14);
}

html[data-theme="dark"] .appearance-compact,
html[data-theme="dark"] .appearance-picker {
  background: #202622;
  border-color: rgba(184, 181, 172, 0.16);
}

html[data-theme="dark"] .appearance-summary-button,
html[data-theme="dark"] .appearance-picker-head,
html[data-theme="dark"] .appearance-picker-helper {
  border-color: rgba(184, 181, 172, 0.13);
}

html[data-theme="dark"] .appearance-summary-button:hover,
html[data-theme="dark"] .appearance-summary-button:focus-visible {
  background: rgba(154, 191, 173, 0.08);
}

html[data-theme="dark"] .step-actions {
  background:
    linear-gradient(180deg, rgba(32, 38, 34, 0.72), rgba(24, 30, 26, 0.94)),
    rgba(24, 30, 26, 0.9);
  border-top-color: rgba(184, 181, 172, 0.16);
}

html[data-theme="dark"] .site-footer {
  color: #918f87;
  border-top-color: rgba(184, 181, 172, 0.14);
}

html[data-theme="dark"] .site-footer a {
  color: #9abfad;
}

/* Keepsakes remain true to their exported light-paper appearance. */
html[data-theme="dark"] .journal-preview,
html[data-theme="dark"] .intro-memory-board {
  --ink: #28332e;
  --muted: #716b61;
  --green: #203d36;
  --archive-green: #294b40;
  --clay: #6f9484;
  --blue: #587b78;
  --plum: #7c6b70;
  --surface: rgba(251, 248, 240, 0.84);
  --surface-strong: rgba(251, 248, 240, 0.96);
  --surface-subtle: rgba(255, 255, 255, 0.42);
  --surface-border: rgba(113, 107, 97, 0.13);
  --surface-border-strong: rgba(113, 107, 97, 0.22);
  color: #28332e;
}

@media (max-width: 640px) {
  .memory-finish-heading {
    align-items: start;
    flex-direction: column;
  }

  .memory-finish-heading h2 {
    font-size: 30px;
  }

  .memory-ready-copy,
  .memory-checkout-section,
  .memory-order-summary,
  .memory-complete-panel {
    padding: 16px;
  }

  .memory-ready-facts,
  .memory-included-list {
    grid-template-columns: 1fr;
  }

  .memory-product-choice,
  .print-option-grid,
  .print-address-fields,
  .print-branding-choices,
  #printPostcardFields {
    grid-template-columns: 1fr;
  }

  .print-branding-toggle > img {
    width: 30px;
    height: 30px;
  }

  .print-address-fields .is-wide {
    grid-column: auto;
  }

  .memory-product-option {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 9px;
    padding: 12px;
  }

  .memory-product-option > span strong,
  .memory-product-option > span small {
    overflow-wrap: anywhere;
  }

  .print-address-suggestions {
    position: absolute;
    max-width: 100%;
  }

  .print-order-config-heading,
  .print-address-heading {
    align-items: start;
  }

  .print-order-summary {
    grid-template-columns: minmax(0, 1fr) 14px;
    align-items: start;
  }

  .print-order-summary-state {
    grid-column: 1;
    grid-row: 2;
    margin-top: 4px;
    text-align: left;
  }

  .print-order-chevron {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
  }

  .print-order-route {
    align-items: start;
    flex-direction: column;
  }

  .print-order-route strong {
    text-align: left;
  }

  .memory-ready-actions > *,
  .memory-promo-row > * {
    width: 100%;
  }

  .memory-promo-row {
    grid-template-columns: 1fr;
  }

  .memory-credit-choice,
  .memory-payment-method {
    align-items: start;
  }

  .memory-summary-preview {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .memory-summary-preview img {
    width: 58px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .step-card.is-active,
  .memory-ready-screen:not([hidden]),
  .memory-checkout-screen:not([hidden]),
  .memory-complete-panel:not([hidden]),
  .creator.is-style-step:not(.is-finish-flow) .step-card[data-step="6"] > .section-title,
  .creator.is-style-step:not(.is-finish-flow) .single-typography-controls,
  .creator.is-style-step:not(.is-finish-flow) .moving-memory-controls,
  .creator.is-style-step:not(.is-finish-flow) .moving-appearance-controls,
  .creator.is-style-step:not(.is-finish-flow) .crop-panel,
  .creator.is-style-step:not(.is-finish-flow) .keepsake-size-controls,
  .creator.is-style-step:not(.is-finish-flow) .paid-draft-notice:not([hidden]),
  .creator.is-style-step:not(.is-finish-flow) .finish-actions,
  .style-control-accordion[open] .style-control-body,
  .email-auth-submit.is-loading::before,
  .start-button.is-loading::before {
    animation: none !important;
  }
}

/* Legal documents and the quiet site-wide legal footer. */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(100% - 40px, 1440px);
  margin: 24px auto 0;
  padding: 24px 4px 30px;
  border-top: 1px solid var(--surface-border-strong);
  color: var(--muted);
  font-size: 13px;
}

.site-footer nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-footer a,
.legal-document a,
.legal-footer a,
.legal-home-link {
  color: var(--green);
  text-decoration-color: rgba(32, 61, 54, 0.3);
  text-underline-offset: 3px;
}

.site-footer a {
  font-weight: 650;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible,
.legal-document a:hover,
.legal-document a:focus-visible,
.legal-footer a:hover,
.legal-footer a:focus-visible,
.legal-home-link:hover,
.legal-home-link:focus-visible {
  color: var(--archive-green);
  text-decoration-color: currentColor;
}

.legal-document-page {
  min-height: 100vh;
  background:
    linear-gradient(rgba(32, 61, 54, 0.022) 1px, transparent 1px),
    #f4f0e8;
  background-size: 100% 34px;
}

.legal-topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
  padding: 14px max(24px, calc((100vw - 1160px) / 2));
  background: rgba(244, 240, 232, 0.92);
  border-bottom: 1px solid var(--surface-border-strong);
  backdrop-filter: blur(12px);
}

.legal-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.legal-brand strong {
  display: inline-flex;
  align-items: baseline;
  font-size: 23px;
  font-weight: 730;
}

.legal-brand .brand-script-initial {
  margin-right: 1px;
  color: var(--green);
  font-size: 32px;
  line-height: 0.8;
}

.legal-brand small {
  color: var(--muted);
  font-size: 13px;
}

.legal-home-link {
  font-size: 14px;
  font-weight: 680;
  text-decoration: none;
}

.legal-document {
  width: min(100% - 48px, 820px);
  margin: 0 auto;
  padding: clamp(54px, 7vw, 88px) 0 72px;
}

.legal-document-heading {
  margin-bottom: 34px;
}

.legal-document-heading .eyebrow {
  margin: 0 0 12px;
  color: var(--archive-green);
}

.legal-document-heading h1 {
  max-width: 720px;
  margin: 0;
  color: #202722;
  font-size: clamp(44px, 6vw, 66px);
  font-weight: 710;
  line-height: 1.02;
  letter-spacing: 0;
}

.legal-updated {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.legal-lead {
  max-width: 740px;
  margin: 22px 0 0;
  color: #4e554f;
  font-family: var(--font-source-serif);
  font-size: clamp(20px, 2.3vw, 23px);
  line-height: 1.55;
}

.legal-draft-notice {
  margin: 0 0 36px;
  padding: 16px 18px;
  background: rgba(199, 137, 104, 0.11);
  border-left: 3px solid var(--ochre);
  color: #594c43;
}

.legal-draft-notice strong {
  display: block;
  margin-bottom: 4px;
  color: #45392f;
  font-size: 14px;
}

.legal-draft-notice p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.legal-summary {
  margin: 0 0 52px;
  padding: 28px 30px 30px;
  background: rgba(111, 148, 132, 0.1);
  border-top: 1px solid rgba(32, 61, 54, 0.22);
  border-bottom: 1px solid rgba(32, 61, 54, 0.22);
}

.legal-summary h2 {
  margin: 0 0 20px;
  color: var(--green);
  font-size: 22px;
  line-height: 1.25;
}

.legal-summary > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 28px;
}

.legal-summary p {
  margin: 0;
  color: #4e554f;
  font-size: 15px;
  line-height: 1.55;
}

.legal-summary strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
}

.legal-section {
  padding: 34px 0;
  border-top: 1px solid var(--surface-border-strong);
}

.legal-section h2 {
  margin: 0 0 18px;
  color: #202722;
  font-size: clamp(23px, 3vw, 28px);
  font-weight: 700;
  line-height: 1.24;
}

.legal-section h3 {
  margin: 26px 0 8px;
  color: var(--green);
  font-size: 17px;
  font-weight: 720;
  line-height: 1.35;
}

.legal-section p,
.legal-section li {
  color: #4b504b;
  font-size: 16px;
  line-height: 1.72;
}

.legal-section p {
  margin: 0 0 15px;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

.legal-section ul {
  margin: 6px 0 18px;
  padding-left: 22px;
}

.legal-section li {
  margin: 0 0 8px;
  padding-left: 4px;
}

.legal-ai-section {
  position: relative;
}

.legal-ai-section::before {
  content: "";
  position: absolute;
  top: 38px;
  bottom: 38px;
  left: -24px;
  width: 2px;
  background: var(--clay);
}

.legal-document-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  padding-top: 30px;
  border-top: 1px solid var(--surface-border-strong);
}

.legal-document-nav a {
  font-size: 15px;
  font-weight: 680;
}

.legal-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-height: 72px;
  padding: 20px 24px;
  background: rgba(32, 61, 54, 0.04);
  border-top: 1px solid var(--surface-border-strong);
  color: var(--muted);
  font-size: 13px;
}

.legal-footer a {
  font-weight: 680;
}

@media (max-width: 640px) {
  .site-footer {
    width: calc(100% - 32px);
    margin-top: 16px;
    padding: 20px 2px 26px;
  }

  .site-footer nav {
    gap: 18px;
  }

  .legal-document-page {
    background-size: 100% 30px;
  }

  .legal-topbar {
    min-height: 68px;
    padding: 12px 18px;
  }

  .legal-brand {
    gap: 0;
  }

  .legal-brand strong {
    font-size: 21px;
  }

  .legal-brand .brand-script-initial {
    font-size: 29px;
  }

  .legal-brand small {
    display: none;
  }

  .legal-home-link {
    font-size: 13px;
  }

  .legal-document {
    width: min(100% - 36px, 820px);
    padding: 44px 0 52px;
  }

  .legal-document-heading {
    margin-bottom: 28px;
  }

  .legal-document-heading h1 {
    font-size: 43px;
    line-height: 1.05;
  }

  .legal-lead {
    font-size: 19px;
    line-height: 1.52;
  }

  .legal-draft-notice {
    margin-bottom: 30px;
    padding: 14px 15px;
  }

  .legal-summary {
    margin: 0 -18px 38px;
    padding: 24px 18px 26px;
  }

  .legal-summary > div {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .legal-section {
    padding: 28px 0;
  }

  .legal-section h2 {
    margin-bottom: 15px;
    font-size: 23px;
  }

  .legal-section p,
  .legal-section li {
    font-size: 15.5px;
    line-height: 1.67;
  }

  .legal-ai-section::before {
    left: -10px;
  }

  .legal-document-nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
}

@media (max-width: 760px) {
  html.is-standalone .step-actions {
    bottom: calc(10px + env(safe-area-inset-bottom));
    margin-bottom: 0;
    padding: 8px 14px;
    border: 1px solid rgba(113, 107, 97, 0.17);
    border-radius: 8px;
    box-shadow: 0 10px 26px rgba(40, 51, 46, 0.1);
  }

  html.is-standalone .new-memory-overlay {
    padding-bottom: calc(22px + env(safe-area-inset-bottom));
  }

  html.is-standalone .side-panel {
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }

  html.is-standalone .appearance-picker-helper {
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }

  html.is-standalone .gift-reveal-page {
    padding-bottom: calc(34px + env(safe-area-inset-bottom));
  }

  html.is-standalone .gift-preview-return {
    position: sticky;
    top: 12px;
    z-index: 10;
    box-shadow: 0 8px 20px rgba(40, 51, 46, 0.1);
  }
}

/* Intro creator previews and the product-ready home layout. */
.creator-tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  align-items: center;
  padding: clamp(14px, 3vw, 36px);
  overflow-y: auto;
  background: rgba(19, 35, 31, 0.6);
  backdrop-filter: blur(18px) saturate(0.86);
}

.creator-tour-overlay[hidden] {
  display: none;
}

.creator-tour-panel {
  position: relative;
  display: grid;
  width: min(1180px, 100%);
  max-height: calc(100dvh - clamp(28px, 6vw, 72px));
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 20px;
  margin: auto;
  padding: clamp(22px, 3vw, 36px);
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 93% 3%, rgba(184, 214, 198, 0.58), transparent 25rem),
    linear-gradient(145deg, rgba(255, 253, 247, 0.99), rgba(239, 244, 238, 0.99));
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 30px;
  box-shadow: 0 36px 100px rgba(8, 25, 20, 0.3);
}

.creator-tour-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
}

.creator-tour-head .eyebrow {
  margin-bottom: 7px;
  font-size: 10px;
  font-weight: 730;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.creator-tour-head h2 {
  margin: 0;
  font-family: var(--font-system);
  font-size: clamp(27px, 3.4vw, 42px);
  font-weight: 590;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.creator-tour-head > div > p:last-child {
  max-width: 64ch;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.creator-tour-layout {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.72fr);
  gap: clamp(20px, 3vw, 38px);
  overflow: hidden;
}

.creator-tour-walkthrough {
  display: grid;
  min-height: 0;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 15px;
  padding: clamp(18px, 2.5vw, 28px);
  overflow-y: auto;
  background: rgba(255, 253, 248, 0.76);
  border: 1px solid rgba(32, 61, 54, 0.13);
  border-radius: 24px;
  box-shadow: 0 18px 46px rgba(40, 61, 53, 0.07);
}

.creator-tour-progress {
  display: grid;
  gap: 9px;
}

.creator-tour-progress > div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 690;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.creator-tour-progress-track {
  height: 5px;
  overflow: hidden;
  background: rgba(32, 61, 54, 0.1);
  border-radius: 999px;
}

.creator-tour-progress-track > span {
  display: block;
  width: 16.666%;
  height: 100%;
  background: linear-gradient(90deg, var(--green), #739784);
  border-radius: inherit;
  transition: width 240ms ease;
}

.creator-tour-steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
}

.creator-tour-steps button {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-width: 0;
  padding: 7px 3px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 670;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 11px;
}

.creator-tour-steps button span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  background: rgba(32, 61, 54, 0.08);
  border-radius: 50%;
}

.creator-tour-steps button.is-active {
  color: var(--green);
  background: rgba(223, 235, 227, 0.65);
  border-color: rgba(32, 61, 54, 0.17);
}

.creator-tour-steps button.is-active span {
  color: #fbf9f2;
  background: var(--green);
}

.creator-tour-step-card {
  align-self: stretch;
  min-height: 0;
  padding: clamp(17px, 2.4vw, 27px);
  overflow-y: auto;
  background:
    radial-gradient(circle at 100% 0%, rgba(216, 231, 220, 0.64), transparent 12rem),
    #fbfaf5;
  border: 1px solid rgba(32, 61, 54, 0.12);
  border-radius: 20px;
}

.creator-tour-step-card .eyebrow {
  margin-bottom: 8px;
  font-size: 9px;
  font-weight: 720;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.creator-tour-step-card h3 {
  max-width: 22ch;
  margin: 0;
  font-family: var(--font-system);
  font-size: clamp(21px, 2.5vw, 31px);
  font-weight: 590;
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.creator-tour-step-card > p:not(.eyebrow) {
  max-width: 55ch;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.creator-tour-answer {
  display: grid;
  gap: 3px;
  margin-top: 18px;
  padding: 13px 15px;
  background: rgba(226, 237, 229, 0.72);
  border: 1px solid rgba(32, 61, 54, 0.15);
  border-radius: 15px;
}

.creator-tour-answer span,
.creator-tour-answer small {
  color: var(--muted);
  font-size: 9.5px;
}

.creator-tour-answer strong {
  color: var(--green);
  font-size: 14px;
  font-weight: 720;
}

.creator-tour-nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.creator-tour-nav button {
  min-height: 42px;
}

.creator-tour-memory {
  position: relative;
  display: grid;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  margin: 0;
  padding: 17px;
  overflow: hidden;
  background: rgba(255, 253, 248, 0.58);
  border: 1px solid rgba(32, 61, 54, 0.13);
  border-radius: 24px;
}

.creator-tour-sample-badge {
  position: absolute;
  z-index: 2;
  top: 28px;
  left: 28px;
  padding: 6px 9px;
  color: #f8f6ef;
  font-size: 8px;
  font-weight: 760;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(24, 51, 45, 0.84);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.creator-tour-memory-frame {
  position: relative;
  display: grid;
  min-height: 0;
  place-items: center;
  overflow: hidden;
  background: #dce5dc;
  border-radius: 17px;
}

.creator-tour-memory-frame img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 58dvh;
  object-fit: contain;
}

.creator-tour-memory[data-preview-mode="moving"] .creator-tour-memory-frame img {
  object-fit: cover;
}

.creator-tour-moving-mark {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: end;
  gap: 3px;
  height: 24px;
  padding: 7px 9px;
  background: rgba(24, 51, 45, 0.78);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.creator-tour-moving-mark span {
  width: 3px;
  height: 7px;
  background: #f8f6ef;
  border-radius: 999px;
  animation: creator-tour-wave 900ms ease-in-out infinite alternate;
}

.creator-tour-moving-mark span:nth-child(2) {
  height: 12px;
  animation-delay: 180ms;
}

.creator-tour-moving-mark span:nth-child(3) {
  height: 9px;
  animation-delay: 360ms;
}

@keyframes creator-tour-wave {
  to { transform: scaleY(1.65); }
}

.creator-tour-memory figcaption {
  display: grid;
  gap: 3px;
}

.creator-tour-memory figcaption > span {
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 720;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.creator-tour-memory figcaption strong {
  font-family: var(--font-source-serif);
  font-size: 21px;
  font-weight: 540;
}

.creator-tour-memory figcaption small {
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.4;
}

.creator-tour-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 2px;
}

.creator-tour-footer p {
  max-width: 62ch;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.creator-tour-footer p strong {
  color: var(--green);
}

.creator-tour-footer .primary-button {
  flex: 0 0 auto;
  min-height: 48px;
  padding-inline: 20px;
}

body.is-creator-tour-open {
  overflow: hidden;
}

.home-showcase-heading-side {
  display: grid;
  max-width: 31ch;
  justify-items: start;
  gap: 13px;
  margin: 0 0 3px;
}

.home-showcase-heading-side > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 560;
  line-height: 1.45;
}

.home-heading-action {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 15px;
  color: #f9f7f0;
  font-size: 11px;
  font-weight: 720;
  background: var(--green);
  border: 1px solid var(--green);
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(32, 61, 54, 0.15);
}

.home-heading-action:hover,
.home-heading-action:focus-visible {
  background: #294d44;
  transform: translateY(-1px);
}

.home-create-intro {
  max-width: 58ch;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.home-creator-grid.is-classic-only {
  width: min(880px, 100%);
  margin-inline: auto;
}

.home-creator-card.is-classic {
  gap: 24px;
  min-height: 0;
  padding: clamp(22px, 3vw, 32px);
  background:
    radial-gradient(circle at 96% 0%, rgba(203, 222, 210, 0.44), transparent 19rem),
    rgba(255, 253, 248, 0.9);
  border-radius: 28px;
}

.home-creator-card-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.home-creator-card.is-classic .home-creator-copy {
  position: relative;
}

.home-creator-badge {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 5px 8px;
  color: var(--green);
  font-size: 8px;
  font-weight: 780;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(218, 232, 221, 0.8);
  border: 1px solid rgba(32, 61, 54, 0.14);
  border-radius: 999px;
}

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

.home-format-option {
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 14px;
  min-width: 0;
  padding: 12px;
  background: rgba(250, 249, 244, 0.78);
  border: 1px solid rgba(32, 61, 54, 0.13);
  border-radius: 20px;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.home-format-option:hover {
  border-color: rgba(32, 61, 54, 0.26);
  box-shadow: 0 14px 32px rgba(32, 61, 54, 0.08);
  transform: translateY(-2px);
}

.home-format-preview {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 9;
  place-items: center;
  padding: 0;
  overflow: hidden;
  background: #dfe7de;
  border: 0;
  border-radius: 14px;
}

.home-format-preview::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 52%, rgba(18, 39, 33, 0.58));
  content: "";
}

.home-format-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.home-format-option:not(.is-moving) .home-format-preview img {
  object-position: 50% 35%;
}

.home-format-preview:hover img,
.home-format-preview:focus-visible img {
  transform: scale(1.035);
}

.home-format-preview > span {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 11px;
  left: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fbf9f2;
  font-size: 10px;
  font-weight: 720;
}

.home-format-copy {
  padding: 0 3px;
}

.home-format-copy > span {
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.home-format-copy h4 {
  margin: 5px 0 0;
  font-family: var(--font-system);
  font-size: 20px;
  font-weight: 620;
  letter-spacing: -0.025em;
}

.home-format-copy p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.home-format-copy .home-format-price {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 9px;
}

.home-format-price strong {
  color: var(--green);
  font-weight: 720;
}

.home-format-price span {
  position: relative;
}

.home-format-price span::before {
  position: absolute;
  top: 50%;
  left: -7px;
  width: 2px;
  height: 2px;
  background: currentColor;
  border-radius: 50%;
  content: "";
}

.home-format-option .home-classic-actions {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 7px;
  margin-top: 0;
}

.home-format-option .home-classic-actions button {
  min-width: 0;
  justify-content: center;
  min-height: 42px;
  padding: 0 10px;
  font-size: 10.5px;
  border-radius: 999px;
}

.home-format-option .home-classic-actions .home-preview-action {
  color: var(--green);
  background: transparent;
  border-color: rgba(32, 61, 54, 0.2);
  box-shadow: none;
}

.home-format-option .home-classic-actions button[id^="startClassic"] {
  color: #fbf9f2;
  background: var(--green);
  border-color: var(--green);
}

.home-create-assurance {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px 22px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 590;
}

.home-create-assurance span::before {
  margin-right: 7px;
  color: #688878;
  content: "✓";
}

@media (max-width: 860px) {
  .creator-tour-panel {
    max-height: none;
    overflow: visible;
  }

  .creator-tour-layout {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .creator-tour-memory {
    min-height: 430px;
  }

  .creator-tour-memory-frame img {
    max-height: 62dvh;
  }
}

@media (max-width: 640px) {
  .creator-tour-overlay {
    align-items: start;
    padding: 0;
    background: var(--app-background);
    backdrop-filter: none;
  }

  .creator-tour-panel {
    width: 100%;
    min-height: 100dvh;
    gap: 16px;
    padding: calc(18px + env(safe-area-inset-top)) 14px calc(20px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .creator-tour-head > div > p:last-child {
    font-size: 11px;
  }

  .creator-tour-walkthrough {
    padding: 14px;
    border-radius: 19px;
  }

  .creator-tour-steps {
    overflow-x: auto;
    grid-template-columns: repeat(6, 62px);
    padding-bottom: 3px;
  }

  .creator-tour-memory {
    min-height: 440px;
    padding: 11px;
    border-radius: 19px;
  }

  .creator-tour-sample-badge {
    top: 22px;
    left: 22px;
  }

  .creator-tour-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .creator-tour-footer .primary-button {
    width: 100%;
  }

  .home-showcase-heading {
    align-items: start;
    flex-direction: column;
    gap: 15px;
  }

  .home-showcase-heading-side {
    max-width: none;
  }

  .home-heading-action {
    min-height: 43px;
  }

  .home-creator-card-head {
    align-items: start;
    flex-direction: column;
  }

  .home-creator-card-head .home-creator-pricing {
    width: 100%;
  }

  .home-format-grid {
    grid-template-columns: 1fr;
  }

  .home-format-option .home-classic-actions {
    grid-template-columns: 1fr;
  }

  .home-format-option .home-classic-actions button {
    min-height: 45px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .creator-tour-moving-mark span {
    animation: none;
  }
}

html[data-theme="dark"] .creator-tour-panel,
html[data-theme="dark"] .creator-tour-walkthrough,
html[data-theme="dark"] .creator-tour-step-card,
html[data-theme="dark"] .creator-tour-memory,
html[data-theme="dark"] .home-format-option {
  background: rgba(22, 29, 25, 0.96);
  border-color: rgba(235, 238, 230, 0.14);
}

/* Compact Intro creation dock and draggable choice sheet. */
.create-memory-sheet-backdrop {
  position: fixed;
  z-index: 89;
  inset: 0;
  opacity: 0;
  background: rgba(23, 36, 31, 0.36);
  backdrop-filter: blur(5px);
  transition: opacity 220ms ease;
}

.create-memory-sheet-backdrop[hidden] {
  display: none;
}

.create-memory-sheet-backdrop.is-open {
  opacity: 1;
}

.home-create-section.create-memory-sheet {
  position: fixed;
  z-index: 90;
  right: max(18px, calc((100vw - 1060px) / 2));
  bottom: 18px;
  left: max(18px, calc((100vw - 1060px) / 2));
  display: grid;
  height: 106px;
  grid-template-rows: auto auto auto;
  gap: 5px;
  padding: 7px clamp(20px, 3vw, 34px) 12px;
  overflow: hidden;
  visibility: visible;
  opacity: 1;
  background: rgba(238, 239, 236, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 34px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 22px 60px rgba(28, 32, 30, 0.18);
  backdrop-filter: blur(36px) saturate(1.2);
  -webkit-backdrop-filter: blur(36px) saturate(1.2);
  transform: translateY(0);
  transition: height 300ms cubic-bezier(0.22, 1, 0.36, 1), transform 280ms cubic-bezier(0.22, 1, 0.36, 1), border-radius 220ms ease;
}

.home-create-section.create-memory-sheet.is-open,
.home-create-section.create-memory-sheet.is-dragging-open {
  height: min(78dvh, 760px);
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  gap: 16px;
  transform: translateY(0);
}

.home-create-section.create-memory-sheet.is-dragging {
  transition: none;
}

.create-memory-sheet-handle {
  order: 1;
  display: grid;
  width: 92px;
  min-height: 18px;
  place-items: center;
  margin: -2px auto -5px;
  padding: 0;
  touch-action: none;
  background: transparent;
  border: 0;
  cursor: grab;
}

.create-memory-sheet-handle span {
  width: 44px;
  height: 5px;
  background: rgba(32, 61, 54, 0.2);
  border-radius: 999px;
}

.create-memory-sheet-handle:active {
  cursor: grabbing;
}

.create-memory-sheet-head {
  order: 2;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
}

.create-memory-sheet-head .eyebrow {
  margin: 0 0 7px;
}

.create-memory-sheet:not(.is-open):not(.is-dragging-open) .create-memory-sheet-head {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.create-memory-sheet:not(.is-open):not(.is-dragging-open) .create-memory-sheet-head .eyebrow {
  margin: 0;
  color: var(--green);
  font-size: 13px;
}

.create-memory-sheet-head h2 {
  margin: 0;
  font-family: var(--font-system);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 600;
  letter-spacing: -0.035em;
}

.create-memory-sheet:not(.is-open):not(.is-dragging-open) .create-memory-sheet-close,
.create-memory-sheet:not(.is-open):not(.is-dragging-open) .profile-close {
  display: none;
}

.create-memory-sheet:not(.is-open):not(.is-dragging-open) .create-memory-sheet-head h2,
.create-memory-sheet:not(.is-open):not(.is-dragging-open) .create-memory-sheet-head .home-create-intro {
  display: none;
}

.create-memory-sheet:not(.is-open):not(.is-dragging-open) .create-memory-switch {
  width: min(520px, 100%);
  gap: 4px;
  padding: 4px;
}

.create-memory-sheet:not(.is-open):not(.is-dragging-open) .create-memory-switch button {
  min-height: 36px;
  gap: 6px;
  padding: 4px 12px;
}

.create-memory-sheet:not(.is-open):not(.is-dragging-open) .create-memory-switch button span {
  font-size: 12px;
}

.create-memory-sheet:not(.is-open):not(.is-dragging-open) .create-memory-switch button small {
  font-size: 7px;
}

.create-memory-switch {
  order: 3;
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-inline: auto;
  padding: 6px;
  background: rgba(139, 145, 144, 0.34);
  border: 1px solid transparent;
  border-radius: 999px;
  box-shadow: none;
  backdrop-filter: blur(28px) saturate(1.15);
  -webkit-backdrop-filter: blur(28px) saturate(1.15);
}

.create-memory-switch button {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 16px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
}

.create-memory-switch button span {
  font-size: 13px;
  font-weight: 780;
}

.create-memory-switch button small {
  font-size: 8px;
  font-weight: 720;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.create-memory-switch button.is-active {
  color: rgba(32, 35, 34, 0.96);
  background: rgba(255, 255, 255, 0.46);
  border-color: transparent;
  box-shadow: none;
}

.create-memory-sheet-content {
  order: 3;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.create-memory-sheet:not(.is-open):not(.is-dragging-open) .create-memory-sheet-content,
.create-memory-sheet:not(.is-open):not(.is-dragging-open) .create-memory-sheet-foot {
  display: none;
}

.create-memory-sheet.is-open .create-memory-switch,
.create-memory-sheet.is-dragging-open .create-memory-switch {
  order: 4;
}

.create-memory-panel[hidden] {
  display: none;
}

.create-memory-panel {
  width: min(860px, 100%);
  margin-inline: auto;
}

.create-memory-panel .home-creator-card {
  min-height: 0;
}

.create-memory-panel .home-creator-card.is-studio {
  width: min(600px, 100%);
  margin-inline: auto;
}

.create-memory-panel .home-creator-card.is-studio,
.create-memory-panel .home-format-option {
  background: rgba(255, 255, 255, 0.38);
  border-color: rgba(53, 57, 55, 0.09);
  box-shadow: none;
  backdrop-filter: blur(14px) saturate(1.04);
  -webkit-backdrop-filter: blur(14px) saturate(1.04);
}

.create-memory-panel .home-creator-card.is-studio:hover,
.create-memory-panel .home-format-option:hover {
  border-color: rgba(53, 57, 55, 0.16);
  box-shadow: none;
  transform: none;
}

.create-memory-sheet-foot {
  order: 5;
  display: grid;
  justify-items: center;
  gap: 4px;
}

.create-memory-sheet .home-create-assurance,
.create-memory-sheet .home-print-note {
  margin: 0;
}

.create-memory-dock {
  position: fixed;
  z-index: 70;
  right: max(16px, calc((100vw - 560px) / 2));
  bottom: max(14px, env(safe-area-inset-bottom));
  left: max(16px, calc((100vw - 560px) / 2));
  display: grid;
  min-height: 72px;
  grid-template-columns: 7px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 14px;
  padding: 10px 14px 10px 18px;
  color: #fbfaf5;
  text-align: left;
  touch-action: none;
  background: rgba(32, 61, 54, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 24px;
  box-shadow: 0 18px 46px rgba(25, 45, 38, 0.25);
  backdrop-filter: blur(16px);
  transition: transform 180ms ease, opacity 180ms ease, box-shadow 180ms ease;
}

.create-memory-dock:hover,
.create-memory-dock:focus-visible {
  box-shadow: 0 22px 54px rgba(25, 45, 38, 0.32);
  transform: translateY(-2px);
}

.is-create-memory-sheet-open .create-memory-dock {
  opacity: 0;
  pointer-events: none;
  transform: translateY(24px);
}

.create-memory-dock-handle {
  width: 5px;
  height: 28px;
  background: rgba(255, 255, 255, 0.36);
  border-radius: 999px;
}

.create-memory-dock-copy {
  display: grid;
  gap: 2px;
}

.create-memory-dock-copy small {
  color: rgba(255, 255, 255, 0.7);
  font-size: 9px;
  font-weight: 690;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.create-memory-dock-copy strong {
  font-family: var(--font-system);
  font-size: 16px;
  font-weight: 680;
}

.create-memory-dock-copy i {
  margin-inline: 5px;
  color: rgba(255, 255, 255, 0.58);
  font-family: var(--font-source-serif);
  font-weight: 400;
}

.create-memory-dock-action {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--green);
  background: #f4f2e9;
  border-radius: 50%;
  font-size: 17px;
}

body.is-create-memory-sheet-open {
  overflow: hidden;
}

/* Navigation must remain reachable above the persistent Intro sheet. */
.side-panel-backdrop {
  z-index: 110;
}

.side-panel {
  z-index: 120;
}

/* The Intro sheet replaces the global new-memory shortcut on this screen. */
body:has(#introScreen:not(.is-hidden)) .new-memory-button {
  display: none;
}

@media (max-width: 640px) {
  .home-create-section.create-memory-sheet {
    right: 0;
    bottom: 0;
    left: 0;
    height: calc(102px + env(safe-area-inset-bottom));
    padding: 7px 14px calc(10px + env(safe-area-inset-bottom));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 26px 26px 0 0;
  }

  .home-create-section.create-memory-sheet.is-open,
  .home-create-section.create-memory-sheet.is-dragging-open {
    height: 82dvh;
  }

  .create-memory-sheet-head h2 {
    font-size: 25px;
  }

  .create-memory-sheet-head .home-create-intro {
    font-size: 11px;
  }

  .create-memory-switch {
    width: 100%;
  }

  .create-memory-switch button {
    min-height: 47px;
    flex-direction: column;
    gap: 1px;
  }

  .create-memory-panel .home-creator-card {
    padding: 17px;
  }

  .create-memory-sheet .home-format-grid {
    grid-template-columns: 1fr;
  }

  .create-memory-sheet-foot .home-create-assurance {
    display: none;
  }

}

@media (prefers-reduced-motion: reduce) {
  .home-create-section.create-memory-sheet,
  .create-memory-sheet-backdrop {
    transition-duration: 0.01ms;
  }
}

/* The sample tour deliberately mirrors the real Classic creator shell. */
.creator-tour-panel {
  width: min(1280px, 100%);
  gap: 16px;
  padding: clamp(20px, 2.5vw, 32px);
  background: var(--app-background);
}

.creator-tour-head h2 {
  font-size: clamp(25px, 3vw, 36px);
}

.creator-tour-layout {
  grid-template-columns: minmax(360px, 560px) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 38px);
}

.creator-tour-walkthrough.wizard-panel {
  position: static;
  display: block;
  align-self: stretch;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  padding: 0 4px 0 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.creator-tour-progress {
  gap: 9px;
  margin-bottom: 14px;
  padding: 0 8px;
}

.creator-tour-progress > .progress-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.creator-tour-progress > .progress-meta span:first-child {
  color: var(--green);
  font-weight: 800;
}

.creator-tour-progress .progress-bar {
  height: 7px;
  background: #dfd2bc;
}

.creator-tour-progress .progress-bar span {
  background: var(--green);
}

.creator-tour-step-card {
  display: block;
  min-height: 0;
  padding: 18px;
  overflow: visible;
  background: rgba(255, 253, 248, 0.56);
  border: 1px solid transparent;
  border-radius: var(--surface-radius);
  box-shadow: none;
}

.creator-tour-step-card .section-title {
  margin-bottom: 14px;
}

.creator-tour-step-card .section-title h2 {
  max-width: none;
  font-family: var(--font-system);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.25;
}

.creator-tour-step-card > .step-intro {
  max-width: none;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.creator-tour-sample-control {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 76px;
  padding: 10px;
  background: var(--surface-selected);
  border: 1px solid var(--surface-selected-border);
  border-radius: var(--control-radius);
}

.creator-tour-sample-control > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.creator-tour-sample-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  background: #e7dac3;
  border-radius: 50%;
}

.creator-tour-sample-control strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 720;
}

.creator-tour-sample-control small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.creator-tour-sample-control #creatorTourStepEyebrow {
  color: var(--green);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.creator-tour-answer-label {
  position: absolute;
  top: 9px;
  right: 10px;
  max-width: 42%;
  text-align: right;
}

.creator-tour-nav.step-actions {
  position: sticky;
  z-index: 5;
  bottom: 0;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 8px 12px;
  margin: 18px -18px -18px;
  padding: 10px 18px;
  background:
    linear-gradient(180deg, rgba(251, 248, 240, 0.54), rgba(251, 248, 240, 0.78)),
    rgba(251, 248, 240, 0.68);
  border-top: 1px solid rgba(113, 107, 97, 0.16);
  border-radius: 0 0 var(--panel-radius) var(--panel-radius);
}

.creator-tour-nav #creatorTourPrevious {
  min-height: 44px;
  padding: 8px 4px;
  color: var(--green);
  background: transparent;
  border: 0;
  font-weight: 800;
}

.creator-tour-nav #creatorTourNext {
  width: 100%;
  min-height: 44px;
}

.creator-tour-preview-column.preview-column {
  min-width: 0;
  padding-left: clamp(8px, 1.6vw, 24px);
  border-left: 1px solid rgba(113, 107, 97, 0.16);
}

.creator-tour-preview-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(70vh, 100%);
  max-width: 640px;
  margin: 2px auto 10px;
}

.creator-tour-preview-tools .eyebrow {
  margin: 0;
}

.creator-tour-preview-cue {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.creator-tour-memory.journal-preview {
  position: relative;
  display: block;
  width: min(70vh, 100%);
  max-width: 640px;
  aspect-ratio: 8 / 11;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
  background: var(--paper);
  border: 0;
  border-radius: 4px;
  box-shadow: var(--shadow);
}

.creator-tour-memory .creator-tour-memory-frame {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  border-radius: 0;
}

.creator-tour-memory .creator-tour-memory-frame img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
}

.creator-tour-memory[data-preview-mode="moving"] .creator-tour-memory-frame img {
  animation: creator-tour-moving-pan 12s ease-in-out infinite alternate;
}

@keyframes creator-tour-moving-pan {
  0%, 16% { object-position: 0% 50%; }
  30%, 46% { object-position: 34% 50%; }
  60%, 76% { object-position: 67% 50%; }
  90%, 100% { object-position: 100% 50%; }
}

.creator-tour-memory figcaption {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.creator-tour-memory .creator-tour-sample-badge {
  top: 14px;
  left: 14px;
}

@media (max-width: 1020px) {
  .creator-tour-panel {
    max-height: none;
    overflow: visible;
  }

  .creator-tour-layout {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .creator-tour-preview-column.preview-column {
    padding-top: 10px;
    padding-left: 0;
    border-top: 1px solid rgba(113, 107, 97, 0.16);
    border-left: 0;
  }
}

@media (max-width: 640px) {
  .creator-tour-panel {
    min-height: 100dvh;
  }

  .creator-tour-layout {
    gap: 24px;
  }

  .creator-tour-walkthrough.wizard-panel {
    padding-right: 0;
  }

  .creator-tour-nav.step-actions {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .creator-tour-nav .step-action-meta {
    grid-column: 1 / -1;
  }

  .creator-tour-answer-label {
    display: none;
  }

  .creator-tour-memory.journal-preview {
    width: min(100%, 520px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .creator-tour-memory[data-preview-mode="moving"] .creator-tour-memory-frame img {
    animation: none;
  }
}

/* Full read-only creator controls used by the first-time-user preview. */
.creator-tour-detail {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.creator-tour-detail .creator-tour-choice-grid {
  margin: 0;
}

.creator-tour-panel .creator-tour-choice-grid .memory-type-button,
.creator-tour-panel .creator-tour-photo-method .photo-method-option,
.creator-tour-panel .creator-tour-template-grid .template-button {
  cursor: default;
}

.creator-tour-panel .creator-tour-choice-grid .memory-type-button[aria-checked="true"],
.creator-tour-panel .creator-tour-photo-method .photo-method-option[aria-pressed="true"],
.creator-tour-panel .creator-tour-template-grid .template-button[aria-pressed="true"] {
  background: var(--surface-selected);
  border-color: var(--surface-selected-border);
  box-shadow: inset 0 0 0 1px rgba(32, 61, 54, 0.035);
}

.creator-tour-detail-note {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.creator-tour-photo-method {
  margin: 0;
}

.creator-tour-photo-selection {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: rgba(255, 255, 252, 0.58);
  border: 1px solid var(--surface-border);
  border-radius: var(--control-radius);
}

.creator-tour-photo-selection > div:first-child {
  display: grid;
  gap: 2px;
}

.creator-tour-photo-selection strong {
  color: var(--ink);
  font-size: 12px;
}

.creator-tour-photo-selection small {
  color: var(--muted);
  font-size: 10px;
}

.creator-tour-photo-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.creator-tour-photo-strip.is-single {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.creator-tour-photo-strip span {
  display: block;
  min-width: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #dce5dc;
  border: 3px solid rgba(255, 253, 248, 0.92);
  border-radius: 7px;
  box-shadow: 0 3px 10px rgba(40, 61, 53, 0.1);
}

.creator-tour-photo-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.creator-tour-photo-strip.is-single span:first-child img { object-position: 23% 28%; }
.creator-tour-photo-strip.is-single span:last-child img { object-position: 78% 29%; }
.creator-tour-photo-strip.is-moving span:nth-child(1) img { object-position: 8% 50%; }
.creator-tour-photo-strip.is-moving span:nth-child(2) img { object-position: 37% 50%; }
.creator-tour-photo-strip.is-moving span:nth-child(3) img { object-position: 66% 50%; }
.creator-tour-photo-strip.is-moving span:nth-child(4) img { object-position: 95% 50%; }

.creator-tour-detail .memory-form-section,
.creator-tour-moving-controls,
.creator-tour-appearance-panel {
  display: grid;
  gap: 11px;
  margin: 0;
  padding: 13px;
  background: rgba(255, 255, 252, 0.52);
  border: 1px solid var(--surface-border);
  border-radius: var(--control-radius);
}

.creator-tour-detail .memory-form-heading {
  display: grid;
  gap: 2px;
}

.creator-tour-detail .memory-form-heading strong {
  font-size: 12px;
}

.creator-tour-detail .memory-form-heading small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.creator-tour-panel .creator-tour-detail :is(input, textarea, select):disabled,
.creator-tour-panel .creator-tour-detail :is(input, textarea, select)[readonly],
.creator-tour-panel .creator-tour-detail button:disabled {
  color: var(--ink);
  opacity: 1;
  -webkit-text-fill-color: var(--ink);
}

.creator-tour-panel .creator-tour-detail textarea {
  resize: none;
}

.creator-tour-appearance-panel.preview-template-panel {
  width: 100%;
  padding-bottom: 13px;
}

.creator-tour-template-grid .template-button {
  min-height: 90px;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  padding: 8px;
}

.creator-tour-template-grid .template-button small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.creator-tour-tone-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.creator-tour-tone {
  display: grid;
  min-width: 0;
  justify-items: center;
  gap: 5px;
  padding: 7px 4px;
  color: var(--muted);
  font-size: 8px;
  text-align: center;
  border: 1px solid transparent;
  border-radius: 8px;
}

.creator-tour-tone i {
  display: block;
  width: 100%;
  height: 24px;
  border: 1px solid rgba(32, 61, 54, 0.12);
  border-radius: 5px;
}

.creator-tour-tone.is-selected {
  color: var(--green);
  font-weight: 750;
  background: var(--surface-selected);
  border-color: var(--surface-selected-border);
}

.creator-tour-moving-controls .moving-setting-grid {
  gap: 8px;
}

.creator-tour-style-control.style-control-accordion:not([open]) > .style-control-body,
.creator-tour-style-control > .style-control-body {
  display: grid;
}

.creator-tour-style-control .style-control-summary {
  pointer-events: none;
}

.creator-tour-style-control .style-control-chevron {
  display: none;
}

.creator-tour-detail :is(button, input, textarea, select):disabled {
  cursor: default;
}

@media (max-width: 1020px) {
  .creator-tour-walkthrough.wizard-panel {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .creator-tour-appearance-panel.preview-template-panel {
    padding: 0;
  }
}

@media (max-width: 640px) {
  .creator-tour-step-card {
    padding: 14px;
  }

  .creator-tour-choice-grid,
  .creator-tour-photo-method .photo-method-grid,
  .creator-tour-moving-controls .moving-setting-grid {
    grid-template-columns: 1fr;
  }

  .creator-tour-style-control {
    gap: 0;
    padding: 12px;
  }

  .creator-tour-style-control > .style-control-body {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(113, 107, 97, 0.18);
  }

  .creator-tour-choice-grid .memory-type-button {
    min-height: 58px;
  }

  .creator-tour-photo-strip.is-moving {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .creator-tour-nav.step-actions {
    margin: 16px -14px -14px;
    padding-inline: 14px;
  }
}

/* Modern creator chrome: preserve the keepsake itself, refresh the interface around it. */
.creator,
.creator-tour-panel {
  --surface: rgba(255, 255, 252, 0.76);
  --surface-strong: rgba(255, 255, 252, 0.94);
  --surface-control: rgba(255, 255, 252, 0.68);
  --surface-control-hover: rgba(235, 243, 237, 0.94);
  --surface-selected: rgba(218, 233, 223, 0.78);
  --surface-selected-border: rgba(32, 61, 54, 0.3);
  --surface-border: rgba(32, 61, 54, 0.1);
  --surface-border-strong: rgba(32, 61, 54, 0.18);
}

.creator {
  background:
    radial-gradient(circle at 94% 4%, rgba(205, 224, 213, 0.36), transparent 28rem),
    radial-gradient(circle at 4% 92%, rgba(214, 225, 217, 0.28), transparent 24rem),
    var(--app-background);
}

.creator .progress-bar,
.creator-tour-progress .progress-bar {
  background: rgba(32, 61, 54, 0.1);
  box-shadow: inset 0 0 0 1px rgba(32, 61, 54, 0.035);
}

.creator .progress-bar span,
.creator-tour-progress .progress-bar span {
  background: linear-gradient(90deg, var(--green), #6e9481);
}

.creator .step-card,
.creator-tour-step-card {
  background: rgba(255, 255, 252, 0.72);
  border-color: rgba(32, 61, 54, 0.09);
  box-shadow: 0 14px 38px rgba(40, 61, 53, 0.045);
  backdrop-filter: blur(14px) saturate(1.05);
}

.creator .section-title > span,
.creator-tour-step-card .section-title > span,
.creator :is(.mood-mark, .memory-type-mark, .priority-mark) {
  color: var(--green);
  background: rgba(210, 228, 216, 0.86);
}

.creator :is(.mood-button, .memory-type-button, .priority-button, .template-button, .photo-method-option) {
  border-color: rgba(32, 61, 54, 0.08);
  box-shadow: 0 4px 14px rgba(40, 61, 53, 0.025);
}

.creator :is(.mood-button, .memory-type-button, .priority-button, .template-button, .photo-method-option):hover {
  border-color: rgba(32, 61, 54, 0.18);
}

.creator :is(.mood-button, .memory-type-button, .priority-button)[aria-checked="true"],
.creator .template-button[aria-pressed="true"],
.creator .photo-method-option[aria-pressed="true"] {
  border-color: rgba(32, 61, 54, 0.3);
  box-shadow: inset 0 0 0 1px rgba(32, 61, 54, 0.035);
}

.creator .step-actions,
.creator-tour-nav.step-actions {
  background:
    linear-gradient(180deg, rgba(250, 251, 247, 0.66), rgba(244, 248, 244, 0.9)),
    rgba(250, 251, 247, 0.82);
  border-top-color: rgba(32, 61, 54, 0.11);
}

.creator :is(input, textarea, select),
.creator .upload-zone,
.creator .photo-preference,
.creator .memory-form-section,
.creator .style-control-accordion {
  border-color: rgba(32, 61, 54, 0.12);
}

.creator .preview-column,
.creator-tour-preview-column.preview-column {
  border-color: rgba(32, 61, 54, 0.11);
}

@media (max-width: 760px) {
  .memory-home-screen {
    padding: 28px 16px 58px;
  }

  .memory-home-inner {
    gap: 42px;
  }

  .is-session-loading .home-session-loading {
    grid-template-columns: minmax(0, 1fr) 112px;
    gap: 18px;
    min-height: 228px;
    padding: 24px 21px 46px;
    border-radius: 22px;
  }

  .home-session-loading-copy span:first-child {
    height: 27px;
  }

  .home-session-loading-memory {
    border-radius: 12px;
  }

  .home-session-loading > p {
    bottom: 18px;
    left: 21px;
  }

  .memory-home-heading {
    margin-bottom: 16px;
  }

  .memory-home-heading h1,
  .memory-home-heading h2 {
    max-width: 19ch;
    font-size: 28px;
    font-weight: 570;
    line-height: 1.1;
  }

  .first-memory-welcome {
    display: block;
    min-height: 0;
    padding: 25px 0 18px;
    border-radius: 22px;
  }

  .first-memory-welcome[hidden] {
    display: none;
  }

  .recent-memory-section {
    padding: 25px 0 18px;
    border-radius: 22px;
  }

  .home-showcase-heading {
    display: block;
    padding: 0 22px 20px;
  }

  .home-showcase-heading h1 {
    max-width: 15ch;
    font-size: 28px;
    line-height: 1.06;
  }

  .home-showcase-heading > p {
    max-width: 31ch;
    margin-top: 9px;
    font-size: 12px;
    line-height: 1.45;
  }

  .home-showcase-carousel {
    --showcase-slide-width: min(288px, 78vw);
  }

  .home-showcase-track {
    gap: 12px;
    padding-top: 4px;
    padding-bottom: 18px;
  }

  .home-showcase-slide {
    border-radius: 17px;
  }

  .home-showcase-arrow {
    display: none;
  }

  .home-showcase-footer {
    padding: 1px 22px 0;
  }

  .recent-memory-carousel {
    --recent-slide-width: min(288px, 78vw);
  }

  .recent-memory-rail {
    gap: 12px;
    margin: 0;
    width: 100%;
    padding: 18px max(20px, calc((100% - var(--recent-slide-width)) / 2));
  }

  .recent-memory-card {
    border-radius: 17px;
  }

  .recent-memory-footer {
    padding-inline: 22px;
  }

  .home-creator-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .home-creator-card {
    min-height: 218px;
    padding: 20px;
    border-radius: 20px;
  }

  .home-creator-copy h3 {
    font-size: 25px;
  }

  .home-print-note {
    max-width: 34ch;
    margin-top: 13px;
    line-height: 1.45;
  }
}

/* Rounded UI draft: brings the app closer to the marketing site's softer shape language. */
:root {
  --surface-radius: 16px;
  --control-radius: 14px;
  --panel-radius: 20px;
  --action-radius: 999px;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button,
.export-download-link,
.email-auth-submit,
.new-memory-sheet-actions button,
.credit-overlay-actions button,
.delete-confirm-actions button {
  border-radius: var(--action-radius);
}

.new-memory-button,
.profile-button,
.sign-in-provider,
.credit-pack-button,
.occasion-toggle,
.candidate-action,
.photo-see-all button,
.photo-swap-row button,
.selected-photo-actions button,
.note-history-actions button {
  border-radius: var(--action-radius);
}

.menu-button,
.new-memory-icon,
.profile-avatar,
.brand-mark,
.new-memory-sheet-icon,
.draft-load-mark,
.password-visibility-button {
  border-radius: 12px;
}

.new-memory-sheet,
.analysis-overlay-panel,
.profile-panel,
.menu-page-card,
.sign-in-card,
.step-card,
.upload-zone,
.photo-preference,
.photo-assistant,
.crop-panel,
.style-control-accordion,
.appearance-picker-helper {
  border-radius: var(--panel-radius);
}

.account-profile-card,
.profile-readonly-value,
.memory-card,
.gift-history-card,
.candidate-card,
.selected-photo-slot,
.note-history-card,
.photo-method-option,
.mood-button,
.memory-type-button,
.priority-button,
.template-button,
.crop-preset-button,
.paper-tone-button,
.analysis-feed span,
.print-cancel-refund,
.selected-empty,
.photo-card,
.photo-replace-notice,
.photo-selection-toast {
  border-radius: var(--control-radius);
}

textarea,
input,
select,
.email-auth-field input,
.email-auth-selected,
.tone-select-field select,
.photo-instruction-input-wrap {
  border-radius: var(--control-radius);
}

.history-tab {
  border-radius: var(--control-radius);
}

.step-actions {
  border-radius: 0 0 var(--panel-radius) var(--panel-radius);
}

@media (min-width: 761px) {
  .side-panel {
    border-radius: 0 var(--panel-radius) var(--panel-radius) 0;
  }
}

@media (max-width: 760px) {
  html.is-standalone .step-actions {
    border-radius: var(--panel-radius);
  }

  .step-card,
  .menu-page-card,
  .sign-in-card {
    border-radius: 18px;
  }
}

/* Shared translucent material for navigation and floating interaction layers. */
:root {
  --glass-panel-background: rgba(238, 239, 236, 0.62);
  --glass-panel-border: rgba(255, 255, 255, 0.22);
  --glass-dock-background: rgba(139, 145, 144, 0.34);
  --glass-selection-background: rgba(255, 255, 255, 0.46);
  --glass-panel-shadow: 0 22px 60px rgba(28, 32, 30, 0.18);
}

.topbar,
.side-panel,
.new-memory-sheet,
.analysis-overlay-panel,
.profile-panel {
  background: var(--glass-panel-background);
  border-color: var(--glass-panel-border);
  box-shadow: var(--glass-panel-shadow);
  backdrop-filter: blur(36px) saturate(1.2);
  -webkit-backdrop-filter: blur(36px) saturate(1.2);
}

.topbar {
  box-shadow: 0 12px 34px rgba(28, 32, 30, 0.09);
}

.side-panel {
  border-right-color: var(--glass-panel-border);
}

.step-actions {
  background: rgba(238, 239, 236, 0.72);
  border-top-color: var(--glass-panel-border);
  box-shadow: 0 -14px 34px rgba(28, 32, 30, 0.09);
  backdrop-filter: blur(30px) saturate(1.16);
  -webkit-backdrop-filter: blur(30px) saturate(1.16);
}

.print-segmented-control {
  background: var(--glass-dock-background);
  border: 1px solid transparent;
  border-radius: 999px;
  backdrop-filter: blur(22px) saturate(1.12);
  -webkit-backdrop-filter: blur(22px) saturate(1.12);
}

.print-segmented-control span {
  border-radius: 999px;
}

.print-segmented-control input:checked + span {
  color: var(--ink);
  background: var(--glass-selection-background);
  box-shadow: none;
}

.memory-product-filter-button.is-selected {
  background: var(--glass-selection-background);
  border-color: transparent;
  box-shadow: none;
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
}

.photo-selection-toast {
  color: var(--ink);
  background: rgba(238, 239, 236, 0.78);
  border: 1px solid var(--glass-panel-border);
  box-shadow: var(--glass-panel-shadow);
  backdrop-filter: blur(28px) saturate(1.16);
  -webkit-backdrop-filter: blur(28px) saturate(1.16);
}

.photo-selection-toast button {
  color: var(--green);
  border-color: rgba(32, 61, 54, 0.2);
}

@media (min-width: 641px) {
  .creator-tour-panel {
    background: rgba(238, 239, 236, 0.72);
    border-color: var(--glass-panel-border);
    box-shadow: 0 30px 86px rgba(15, 24, 21, 0.26);
    backdrop-filter: blur(36px) saturate(1.2);
    -webkit-backdrop-filter: blur(36px) saturate(1.2);
  }
}

html[data-theme="dark"] {
  --glass-panel-background: rgba(31, 36, 34, 0.72);
  --glass-panel-border: rgba(255, 255, 255, 0.11);
  --glass-dock-background: rgba(146, 153, 150, 0.2);
  --glass-selection-background: rgba(255, 255, 255, 0.14);
  --glass-panel-shadow: 0 24px 68px rgba(0, 0, 0, 0.34);
}
