:root {
  --paper: #fbf8f3;
  --surface: #ffffff;
  --surface-2: #f3ede5;
  --ink: #292331;
  --muted: #6e6575;
  --brand: #9c3f5d;
  --brand-deep: #752c46;
  --brand-soft: #f2dce4;
  --gold: #b8863e;
  --line: #dfd5cc;
  --success: #26735b;
  --shadow: 0 18px 50px rgba(57, 40, 47, .11);
  --radius: 22px;
  --max: 1180px;
  color-scheme: light;
}

[data-theme="dark"] {
  --paper: #17151a;
  --surface: #211e25;
  --surface-2: #2a2630;
  --ink: #f7f1ea;
  --muted: #c6bcc8;
  --brand: #df7898;
  --brand-deep: #f09ab4;
  --brand-soft: #3c2732;
  --gold: #e3b65f;
  --line: #443d47;
  --success: #7ed3b1;
  --shadow: 0 18px 50px rgba(0, 0, 0, .24);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { max-width: 100%; overflow-x: clip; scroll-behavior: smooth; }
body { margin: 0; max-width: 100%; overflow-x: clip; background: var(--paper); color: var(--ink); font: 17px/1.65 Arial, Helvetica, sans-serif; }
@supports not (overflow-x: clip) { body { overflow-x: hidden; } }
img, canvas, svg, video, table, pre { max-width: 100%; }
a { color: var(--brand-deep); text-decoration-thickness: .08em; text-underline-offset: .16em; }
a:hover { text-decoration-thickness: .13em; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
[hidden] { display: none !important; }

.skip-link { position: fixed; left: 12px; top: 12px; z-index: 9999; transform: translateY(-160%); background: var(--ink); color: var(--paper); padding: .75rem 1rem; border-radius: 10px; }
.skip-link:focus { transform: translateY(0); }

.container { width: min(calc(100% - 32px), var(--max)); margin-inline: auto; }
.narrow { width: min(calc(100% - 32px), 800px); margin-inline: auto; }

.site-header { position: relative; z-index: 30; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(14px); }
.header-row { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 800 1.22rem/1 Georgia, 'Times New Roman', serif; letter-spacing: -.02em; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; background: var(--brand); color: #fff; box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 28%, transparent); }
.site-nav { display: flex; align-items: center; gap: 8px; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 700; padding: .65rem .75rem; border-radius: 999px; }
.site-nav a:hover { color: var(--ink); background: var(--surface-2); }
.site-nav a.button-primary { color: #fff; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-button { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); display: grid; place-items: center; font-weight: 800; }
.menu-toggle { display: none; }
.mobile-menu { border-top: 1px solid var(--line); padding: 12px 16px 18px; background: var(--surface); }
.mobile-menu a { display: block; min-height: 48px; padding: 12px; color: var(--ink); text-decoration: none; font-weight: 750; border-radius: 12px; }
.mobile-menu a:hover { background: var(--surface-2); }

.button { appearance: none; min-height: 44px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); padding: .65rem 1rem; font-weight: 800; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; box-shadow: 0 4px 12px rgba(40, 25, 32, .04); }
.button:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.button-primary { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 10px 24px color-mix(in srgb, var(--brand) 25%, transparent); }
.button-primary:hover { background: var(--brand-deep); color: #fff; }
.button-secondary { background: var(--brand-soft); border-color: transparent; color: var(--brand-deep); }
.button-quiet { box-shadow: none; background: transparent; }
.button-small { min-height: 38px; padding: .45rem .75rem; font-size: .88rem; }
.button-large { min-height: 54px; padding: .82rem 1.35rem; font-size: 1.04rem; }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; }

.hero { padding: 72px 0 56px; position: relative; overflow: clip; }
.hero::before { content: ''; position: absolute; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--brand-soft) 85%, transparent), transparent 68%); right: -160px; top: -230px; pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: 1.07fr .93fr; gap: 50px; align-items: center; }
.eyebrow { margin: 0 0 10px; color: var(--brand-deep); font-size: .83rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3 { font-family: Georgia, 'Times New Roman', serif; line-height: 1.12; letter-spacing: -.025em; }
h1 { margin: 0 0 20px; font-size: clamp(2.6rem, 6vw, 5.2rem); max-width: 13ch; }
h2 { margin: 0 0 16px; font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { margin: 0 0 10px; font-size: 1.35rem; }
.lede { color: var(--muted); font-size: 1.15rem; max-width: 62ch; }
.answer-block { border-left: 5px solid var(--brand); padding: 14px 18px; margin: 18px 0 26px; background: var(--surface); color: var(--ink); border-radius: 0 14px 14px 0; box-shadow: 0 8px 22px rgba(45, 28, 34, .05); }
/* The answer panel uses theme tokens only, so it flips correctly in light and dark.
   .editorial-hero and .hero follow the theme, so they need no override at all. */
/* .tool-hero is the one section that is dark in BOTH themes, so it gets light text explicitly. */
.tool-hero .answer-block {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  border-left: 4px solid var(--gold); color: #f2ece2; box-shadow: none;
  backdrop-filter: blur(10px); max-width: 690px; border-radius: 14px;
}
.answer-block p { margin: 0; }
.trust-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 22px; color: var(--muted); font-size: .9rem; font-weight: 700; }
.trust-row span::before { content: '✓'; color: var(--success); margin-right: .35rem; }

.hero-card-stage { position: relative; min-height: 520px; display: grid; place-items: center; }
.hero-card { width: min(390px, 88vw); aspect-ratio: 5 / 7; border-radius: 28px; padding: 38px; display: flex; flex-direction: column; justify-content: space-between; color: #fffaf0; background: linear-gradient(145deg, #2e2939, #503548); box-shadow: 0 35px 70px rgba(47, 28, 38, .3); transform: rotate(3deg); position: relative; overflow: hidden; }
.hero-card::before, .hero-card::after { content: ''; position: absolute; width: 190px; height: 190px; border: 5px solid rgba(218, 172, 83, .2); border-radius: 50%; }
.hero-card::before { left: -90px; top: -75px; }
.hero-card::after { right: -80px; bottom: -90px; }
.hero-card-label { color: #efc867; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; font-size: .78rem; }
.hero-card-message { font: 700 clamp(1.65rem, 4vw, 2.35rem)/1.25 Georgia, serif; position: relative; z-index: 1; }
.hero-card-footer { font-size: .78rem; opacity: .75; }
.floating-chip { position: absolute; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 999px; padding: .65rem .9rem; font-weight: 800; }
.chip-one { left: 0; top: 18%; }
.chip-two { right: 0; bottom: 18%; }

.section { padding: 68px 0; }
.section-soft { background: var(--surface-2); }
.section-heading { max-width: 720px; margin-bottom: 30px; }
.section-heading p { color: var(--muted); }
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: 0 10px 35px rgba(49, 31, 38, .05); }
.card p:last-child { margin-bottom: 0; }
.occasion-card { min-height: 230px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.occasion-card::after { content: ''; position: absolute; width: 130px; height: 130px; border-radius: 50%; background: var(--brand-soft); right: -55px; top: -55px; }
.occasion-icon { width: 52px; height: 52px; border-radius: 17px; background: var(--brand-soft); color: var(--brand-deep); display: grid; place-items: center; font-size: 1.4rem; margin-bottom: 18px; position: relative; z-index: 1; }
.occasion-card .button { margin-top: auto; align-self: flex-start; }
.steps { counter-reset: steps; }
.step-card { position: relative; padding-top: 78px; }
.step-card::before { counter-increment: steps; content: counter(steps); position: absolute; top: 22px; left: 22px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 900; }
.comparison { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.comparison th, .comparison td { padding: 16px 18px; border-bottom: 1px solid var(--line); text-align: left; }
.comparison th { background: var(--brand-soft); color: var(--brand-deep); }
.comparison tr:last-child td { border-bottom: 0; }
.check { color: var(--success); font-weight: 900; }

.page-hero { padding: 54px 0 24px; }
.page-hero h1 { font-size: clamp(2.4rem, 5vw, 4.3rem); max-width: 18ch; }
.breadcrumbs { color: var(--muted); font-size: .9rem; margin-bottom: 18px; }
.breadcrumbs a { color: inherit; }
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 42px; align-items: start; }
.prose { font-size: 1.03rem; }
.prose h2 { margin-top: 46px; font-size: 2.15rem; }
.prose h3 { margin-top: 30px; }
.prose table { width: 100%; border-collapse: collapse; margin: 24px 0; }
.prose th, .prose td { border: 1px solid var(--line); padding: 12px; text-align: left; }
.prose th { background: var(--surface-2); }
.side-card { position: sticky; top: 24px; }
.message-list { display: grid; gap: 14px; margin: 24px 0; }
.message-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.message-card p { margin: 0 0 12px; }
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 850; font-family: Georgia, serif; font-size: 1.1rem; }
.faq details p { color: var(--muted); }

.resume-card { margin: 28px 0 0; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: flex; justify-content: space-between; align-items: center; gap: 18px; box-shadow: 0 8px 28px rgba(45, 27, 35, .06); }
.resume-card p { margin: 0; }

.app-shell { padding: 26px 0 70px; }
.app-intro { text-align: center; max-width: 760px; margin: 0 auto 20px; }
.app-intro h1 { max-width: none; font-size: clamp(2rem, 4vw, 3.25rem); }
.app-intro p { color: var(--muted); }
.resume-notice { margin: 14px auto; width: min(100%, 760px); background: var(--brand-soft); color: var(--brand-deep); border-radius: 14px; padding: 11px 14px; text-align: center; font-weight: 750; }
.app-grid { display: grid; grid-template-columns: minmax(340px, .88fr) minmax(0, 1.12fr); gap: 22px; align-items: start; }
.preview-column { position: sticky; top: 18px; }
.preview-card { background: color-mix(in srgb, var(--surface) 92%, var(--brand-soft)); border: 1px solid var(--line); border-radius: 26px; padding: 20px; box-shadow: var(--shadow); }
.canvas-wrap { min-height: 440px; display: grid; place-items: center; background: color-mix(in srgb, var(--paper) 70%, var(--surface)); border-radius: 18px; padding: 16px; overflow: hidden; }
#cardCanvas { display: block; width: auto; height: auto; max-width: 100%; max-height: 67vh; border-radius: 12px; box-shadow: 0 18px 38px rgba(29, 22, 29, .22); background: #fff; }
.preview-caption { text-align: center; margin: 12px 0 0; color: var(--muted); font-size: .88rem; }
.panel-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 12px; }
.panel-tabs button { min-width: max-content; border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 999px; padding: .5rem .75rem; font-weight: 750; }
.panel-tabs button.active { background: var(--brand-soft); color: var(--brand-deep); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.control-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: clamp(18px, 3vw, 30px); box-shadow: var(--shadow); }
.control-section + .control-section { border-top: 1px solid var(--line); margin-top: 26px; padding-top: 24px; }
.control-section h2 { font-size: 1.65rem; }
.control-section h3 { font: 900 .78rem/1.2 Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 20px 0 9px; }
.choice-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.choice { min-height: 44px; border: 1px solid var(--line); border-radius: 999px; padding: .58rem .85rem; background: var(--surface); color: var(--ink); font-weight: 780; }
.choice.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.occasion-choices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.occasion-choice { min-height: 72px; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 8px; }
.occasion-choice span:first-child { font-size: 1.25rem; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; gap: 7px; }
.field-full { grid-column: 1 / -1; }
.field label, .field-label { color: var(--muted); font-size: .8rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); color: var(--ink); padding: .75rem .85rem; }
textarea { resize: vertical; min-height: 104px; }
.help { margin: 6px 0 0; color: var(--muted); font-size: .83rem; }
.message-options { display: grid; gap: 10px; max-height: 420px; overflow: auto; padding-right: 3px; }
.message-option { border: 1px solid var(--line); border-radius: 15px; padding: 14px; background: var(--paper); }
.message-option.selected { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.message-option p { margin: 0 0 10px; }
.message-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.preset-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.preset { border: 1px solid var(--line); border-radius: 15px; background: var(--surface); padding: 7px; color: var(--ink); text-align: left; font-weight: 760; }
.preset.active { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.preset-preview { display: block; aspect-ratio: 5 / 4; border-radius: 10px; margin-bottom: 6px; position: relative; overflow: hidden; }
.preset-preview::before { content: ''; position: absolute; width: 55%; height: 7px; border-radius: 99px; background: rgba(255,255,255,.82); left: 22%; top: 43%; box-shadow: 0 14px 0 rgba(255,255,255,.6); }
.preset-floral { background: linear-gradient(135deg, #f6ede2, #d9a5b0); }
.preset-minimal { background: linear-gradient(135deg, #f4f1ea, #294354); }
.preset-photo { background: linear-gradient(135deg, #718899, #26343f); }
.preset-bold { background: linear-gradient(135deg, #d84d65, #ffd56a); }
.preset-luxury { background: linear-gradient(135deg, #161b28, #c49542); }
.preset-playful { background: linear-gradient(135deg, #fff0d8, #ef7772, #77bdad); }
.preset-festive { background: linear-gradient(135deg, #174a3a, #cf4747); }
.preset-peaceful { background: linear-gradient(135deg, #e4f0f1, #e8c7a2); }
.preset-botanical { background: linear-gradient(135deg, #dce5d4, #718365); }
.preset-cute { background: linear-gradient(135deg, #ffe4df, #f4ad91); }
.colour-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.colour-input { width: 54px; height: 48px; border: 1px solid var(--line); border-radius: 13px; padding: 4px; }
.photo-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.photo-row input[type=file] { max-width: 310px; }
.more-options { border: 1px solid var(--line); border-radius: 16px; padding: 0 16px; margin-top: 18px; }
.more-options summary { min-height: 52px; display: flex; align-items: center; font-weight: 850; cursor: pointer; }
.toggle-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.toggle-row input { width: 20px; height: 20px; }
.download-card { background: var(--brand-soft); border-radius: 18px; padding: 18px; margin: 18px 0; }
.download-card strong { display: block; color: var(--brand-deep); }
.primary-download { width: 100%; }
.secondary-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 10px; }
.info-note { border-left: 4px solid var(--gold); background: var(--surface-2); padding: 12px 14px; border-radius: 0 12px 12px 0; color: var(--muted); font-size: .9rem; }
.step-footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }

.site-footer { background: #211c24; color: #e9e0e7; padding: 52px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 34px; }
.site-footer h3 { color: #fff; font-size: 1.05rem; }
.site-footer a { color: #d9cfd8; text-decoration: none; display: block; padding: .25rem 0; }
.site-footer a:hover { color: #fff; }
.footer-brand { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); margin-top: 34px; padding-top: 20px; color: #b8aeb7; font-size: .88rem; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

@media (max-width: 1020px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preset-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .occasion-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  body { font-size: 16px; }
  .site-nav { display: none; }
  .menu-toggle { display: grid; }
  .hero { padding-top: 48px; }
  .hero-grid, .content-layout { grid-template-columns: 1fr; }
  .hero-card-stage { min-height: 460px; }
  .chip-one { left: 3%; }
  .chip-two { right: 3%; }
  .app-grid { grid-template-columns: 1fr; }
  .preview-column { position: sticky; top: 8px; z-index: 10; }
  .preview-card { padding: 10px; border-radius: 0 0 20px 20px; }
  .canvas-wrap { min-height: 0; max-height: 42vh; padding: 8px; }
  #cardCanvas { max-height: 38vh; }
  .preview-caption { display: none; }
  .panel-tabs { margin-bottom: 7px; }
  .control-panel { box-shadow: none; }
  .side-card { position: static; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .container, .narrow { width: min(calc(100% - 22px), var(--max)); }
  .header-row { min-height: 68px; }
  .brand { font-size: 1.05rem; }
  .brand-mark { width: 36px; height: 36px; }
  h1 { font-size: 2.55rem; }
  h2 { font-size: 2rem; }
  .hero-card-stage { min-height: 410px; }
  .floating-chip { font-size: .78rem; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .occasion-choices { display: flex; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 6px; scrollbar-width: none; }
  .occasion-choice { min-width: 112px; }
  .field-grid { grid-template-columns: 1fr; }
  .field-full { grid-column: auto; }
  .preset-grid { display: flex; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; }
  .preset { min-width: 122px; }
  .secondary-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr; }
  .resume-card { align-items: flex-start; flex-direction: column; }
  .comparison { font-size: .88rem; }
  .comparison th, .comparison td { padding: 11px 9px; }
}

@media print {
  .site-header, .site-footer, .step-tabs, .control-panel, .panel-tabs, .preview-caption { display: none !important; }
  body { background: #fff; }
  .app-shell, .preview-card, .canvas-wrap { padding: 0; border: 0; box-shadow: none; background: #fff; }
  .app-grid { display: block; }
  #cardCanvas { max-height: none; width: 100%; box-shadow: none; }
}

/* Card Maker Messages premium presentation */
:root {
  --paper: #f8f4ec;
  --surface: #fffdf9;
  --surface-2: #efe9de;
  --ink: #18212b;
  --muted: #69717a;
  --brand: #7c3f55;
  --brand-deep: #56283a;
  --brand-soft: #ead9df;
  --gold: #b88a42;
  --gold-light: #ead3a5;
  --navy: #152331;
  --line: #ddd4c7;
  --shadow: 0 24px 70px rgba(40, 32, 26, .12);
  --shadow-soft: 0 14px 42px rgba(40, 32, 26, .075);
  --radius: 24px;
  --max: 1220px;
}
[data-theme="dark"] {
  --paper: #10161d;
  --surface: #17212a;
  --surface-2: #202c36;
  --ink: #f7f2e9;
  --muted: #b7bec5;
  --brand: #bd718c;
  --brand-deep: #e49ab4;
  --brand-soft: #3b2832;
  --gold: #deb66d;
  --gold-light: #5a4930;
  --navy: #091017;
  --line: #34414c;
}
body { font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; letter-spacing: -.006em; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; }
.site-header { position: sticky; top: 0; background: color-mix(in srgb, var(--paper) 84%, transparent); box-shadow: 0 1px 0 rgba(90,70,55,.08); }
.header-row { min-height: 86px; }
.brand { gap: 12px; }
.brand-mark { width: 44px; height: 44px; border-radius: 14px; background: linear-gradient(145deg, var(--brand), var(--brand-deep)); border: 1px solid color-mix(in srgb, var(--gold) 42%, transparent); }
.brand-mark svg { width: 30px; height: 30px; fill: none; stroke: #fff7ea; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.brand-wordmark { display: grid; line-height: .95; }
.brand-wordmark strong { font: 800 1.02rem/1 Georgia, serif; letter-spacing: -.025em; }
.brand-wordmark em { margin-top: 4px; color: var(--gold); font: normal 800 .66rem/1 Arial, sans-serif; letter-spacing: .22em; text-transform: uppercase; }
.site-nav { gap: 2px; }
.site-nav a { font-size: .91rem; letter-spacing: -.01em; }
.site-nav a.button-primary { padding-inline: 1.1rem; }
.button { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease; }
.button-primary { background: linear-gradient(135deg, var(--brand), var(--brand-deep)); border-color: transparent; box-shadow: 0 12px 30px rgba(86,40,58,.24); }
.button-light { background: rgba(255,255,255,.82); border-color: rgba(255,255,255,.7); color: #202a34; box-shadow: 0 12px 30px rgba(20,28,34,.12); }
.button-gold { background: linear-gradient(135deg, #d3aa60, #ad7c31); border-color: #c99949; color: #17212b; box-shadow: 0 12px 30px rgba(184,138,66,.22); }
.button-dark-outline { background: transparent; color: #fff8eb; border-color: rgba(255,255,255,.28); }
.button-dark-outline:hover { border-color: var(--gold); color: #fff; }
.premium-hero { min-height: 720px; padding: 92px 0 82px; background: linear-gradient(135deg, #142330 0%, #1d2d3a 52%, #442b3a 100%); color: #fff9ee; isolation: isolate; }
.premium-hero::before { display: none; }
.premium-hero .hero-grid { grid-template-columns: 1.02fr .98fr; gap: 70px; }
.hero-copy { position: relative; z-index: 2; }
.premium-hero h1 { max-width: 12ch; font-size: clamp(3.2rem, 6.8vw, 6.2rem); line-height: .98; letter-spacing: -.055em; text-wrap: balance; }
.eyebrow-gold { color: #e1bf7a; }
.answer-block-hero { background: rgba(255,255,255,.075); border: 1px solid rgba(255,255,255,.12); border-left: 4px solid var(--gold); color: #e7e2da; box-shadow: none; backdrop-filter: blur(10px); max-width: 690px; }
.premium-hero .trust-row { color: #cfcbc4; }
.trust-row span::before { content: none; }
.trust-row b { color: #e2bd70; margin-right: .35rem; }
.hero-glow { position: absolute; border-radius: 50%; filter: blur(4px); z-index: -1; }
.hero-glow-one { width: 500px; height: 500px; left: -240px; top: -220px; background: radial-gradient(circle, rgba(184,138,66,.22), transparent 68%); }
.hero-glow-two { width: 640px; height: 640px; right: -280px; bottom: -340px; background: radial-gradient(circle, rgba(124,63,85,.5), transparent 68%); }
.premium-card-stage { min-height: 560px; position: relative; display: grid; place-items: center; }
.stage-orbit { position: absolute; border: 1px solid rgba(225,191,122,.18); border-radius: 50%; }
.orbit-one { width: 510px; height: 510px; }
.orbit-two { width: 400px; height: 400px; }
.showcase-card { position: absolute; width: min(340px, 72vw); aspect-ratio: 5/7; border-radius: 26px; padding: 38px 34px; display: flex; flex-direction: column; justify-content: center; text-align: center; overflow: hidden; box-shadow: 0 38px 85px rgba(0,0,0,.34); }
.showcase-card::before, .showcase-card::after { content:""; position:absolute; border-radius:50%; border: 3px solid rgba(205,164,87,.22); }
.showcase-card::before { width: 180px; height: 180px; left: -96px; top: -80px; }
.showcase-card::after { width: 145px; height: 145px; right: -70px; bottom: -65px; }
.showcase-card span { color: #d8af62; font-size: .68rem; letter-spacing: .22em; font-weight: 900; margin-bottom: 25px; }
.showcase-card strong { position: relative; z-index: 1; font: 700 2rem/1.24 Georgia, serif; }
.showcase-card small { position: relative; z-index: 1; margin-top: 26px; opacity: .72; }
.showcase-front { z-index: 2; background: linear-gradient(145deg, #342c3b, #5a3447); color: #fff9ec; transform: rotate(4deg) translate(34px, 12px); }
.showcase-back { z-index: 1; background: linear-gradient(145deg, #f6eddf, #e8d2b5); color: #24323b; transform: rotate(-8deg) translate(-95px, -16px); }
.premium-float { position: absolute; z-index: 4; display: flex; align-items: center; gap: 10px; background: rgba(255,253,249,.94); color: #26313a; border: 1px solid rgba(255,255,255,.65); border-radius: 999px; padding: 10px 15px 10px 10px; box-shadow: 0 18px 45px rgba(0,0,0,.22); backdrop-filter: blur(12px); font-size: .82rem; }
.premium-float span { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; background: #7c3f55; color: #fff; font-size: .68rem; }
.float-message { left: 0; top: 17%; }
.float-design { right: -10px; top: 46%; }
.float-download { left: 9%; bottom: 10%; }
.premium-proof { background: #fffdf9; border-bottom: 1px solid var(--line); }
.proof-row { min-height: 72px; display: flex; align-items: center; justify-content: center; gap: clamp(14px, 3vw, 38px); color: #5c646c; font-weight: 800; font-size: .86rem; letter-spacing: .05em; text-transform: uppercase; overflow-x: auto; white-space: nowrap; }
.proof-row i { width: 4px; height: 4px; border-radius: 50%; background: var(--gold); flex: 0 0 auto; }
.premium-section { padding: 88px 0; }
.split-heading { max-width: none; display: grid; grid-template-columns: 1.05fr .95fr; gap: 70px; align-items: end; }
.split-heading p:last-child { max-width: 600px; font-size: 1.05rem; }
.centred-action { margin-top: 34px; text-align: center; }
.occasion-card { min-height: 265px; border-radius: 26px; padding: 26px; transition: transform .2s ease, box-shadow .2s ease; }
.occasion-card:hover { transform: translateY(-5px); box-shadow: 0 24px 58px rgba(40,32,26,.11); }
.occasion-card::after { background: linear-gradient(135deg, var(--brand-soft), transparent); }
.occasion-icon { border: 1px solid color-mix(in srgb, var(--brand) 15%, var(--line)); }
.create-type-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 22px; }
.feature-panel { min-height: 360px; border-radius: 30px; padding: 30px; position: relative; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-soft); }
.feature-panel::after { content:""; position:absolute; width:200px; height:200px; border-radius:50%; right:-85px; bottom:-90px; border: 30px solid rgba(255,255,255,.2); }
.feature-card { background: linear-gradient(145deg,#f6e8ec,#fffdf9); }
.feature-invite { background: linear-gradient(145deg,#1a2b38,#3a2d39); color:#fff9ed; border-color:#354451; }
.feature-post { background: linear-gradient(145deg,#e7dfcc,#f9f5ed); }
.feature-number { position:absolute; right:24px; top:20px; font: 700 3.4rem/1 Georgia,serif; opacity:.14; }
.feature-icon { width:60px; height:60px; display:grid; place-items:center; border-radius:20px; background:rgba(255,255,255,.58); font-size:1.7rem; margin-bottom:44px; box-shadow: inset 0 0 0 1px rgba(80,60,45,.1); }
.feature-panel h3 { font-size:2rem; }
.feature-panel p { color: inherit; opacity:.76; }
.feature-panel a { margin-top:auto; position:relative; z-index:1; font-weight:900; text-decoration:none; color:inherit; }
.section-dark { background: linear-gradient(135deg,#142330,#202c36 62%,#402c38); color:#fff8ed; }
.light-heading p { color:#c6c8c8; }
.process-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1px; background:rgba(255,255,255,.13); border:1px solid rgba(255,255,255,.13); border-radius:28px; overflow:hidden; }
.process-grid article { padding:38px; background:rgba(14,24,32,.76); min-height:270px; }
.process-grid span { display:grid; place-items:center; width:48px; height:48px; border-radius:50%; border:1px solid #d7ae61; color:#e5c47f; font-weight:900; margin-bottom:48px; }
.process-grid p { color:#c8c9c7; }
.benefit-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); border:1px solid var(--line); border-radius:28px; overflow:hidden; background:var(--surface); }
.benefit-grid div { padding:30px; display:grid; gap:7px; border-bottom:1px solid var(--line); }
.benefit-grid div:nth-child(odd) { border-right:1px solid var(--line); }
.benefit-grid div:nth-last-child(-n+2) { border-bottom:0; }
.benefit-grid b { font:700 1.25rem/1.2 Georgia,serif; }
.benefit-grid span { color:var(--muted); }
.premium-cta { padding-top:20px; }
.cta-panel { padding:50px; border-radius:34px; background:linear-gradient(135deg,#172734,#3e2938); color:#fff8ed; display:flex; align-items:center; justify-content:space-between; gap:40px; box-shadow:0 35px 75px rgba(27,30,35,.2); }
.cta-panel h2 { max-width:720px; }
.cta-panel p { color:#ccc9c3; }
.footer-topline { display:flex; justify-content:space-between; align-items:center; gap:30px; padding-bottom:36px; border-bottom:1px solid rgba(255,255,255,.13); }
.footer-topline > div { max-width:650px; }
.footer-topline p { color:#bdb7bd; }
.footer-grid { grid-template-columns: repeat(4,1fr); padding-top:38px; }

/* Tool landing pages */
.tool-hero { padding:76px 0 84px; background:linear-gradient(135deg,#172734,#263642 58%,#49313f); color:#fff8ed; overflow:clip; }
.tool-hero-grid { display:grid; grid-template-columns:1.03fr .97fr; gap:64px; align-items:center; }
.tool-hero h1 { font-size:clamp(2.9rem,5.6vw,5.3rem); max-width:14ch; }
.tool-hero .breadcrumbs { color:#c5c4c0; }
.tool-mockup { position:relative; }
.mock-browser { background:#f9f6f0; border:1px solid rgba(255,255,255,.35); border-radius:24px; padding:12px; box-shadow:0 35px 80px rgba(0,0,0,.34); transform:rotate(1.5deg); }
.mock-toolbar { min-height:38px; display:flex; align-items:center; gap:7px; padding:0 8px; color:#77808a; font-size:.68rem; }
.mock-toolbar i { width:8px; height:8px; border-radius:50%; background:#c9aa70; }
.mock-toolbar span { margin-left:8px; }
.mock-content { display:grid; grid-template-columns:1.05fr .95fr; gap:12px; min-height:390px; }
.mock-card { border-radius:18px; padding:28px; display:flex; flex-direction:column; justify-content:center; text-align:center; background:linear-gradient(145deg,#312b3a,#623a4c); color:#fff7ea; }
.mock-card small { color:#dfb96d; letter-spacing:.15em; font-weight:900; }
.mock-card strong { margin:34px 0 25px; font:700 2rem/1.2 Georgia,serif; }
.mock-card em { font-style:normal; opacity:.7; font-size:.8rem; }
.mock-controls { border-radius:18px; padding:24px 18px; background:#fff; display:flex; flex-direction:column; gap:15px; }
.mock-controls span { display:block; height:44px; border:1px solid #e3ddd5; border-radius:12px; background:#faf8f4; }
.mock-controls button { margin-top:auto; min-height:48px; border:0; border-radius:99px; background:#7c3f55; color:#fff; font-weight:800; }
.mini-feature-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.mini-feature { display:flex; gap:16px; padding:24px; background:var(--surface); border:1px solid var(--line); border-radius:20px; box-shadow:var(--shadow-soft); }
.mini-feature > span { flex:0 0 auto; width:36px; height:36px; display:grid; place-items:center; border-radius:50%; background:var(--brand-soft); color:var(--brand-deep); font-weight:900; }
.mini-feature h3 { font-size:1.22rem; }
.mini-feature p { margin:0; color:var(--muted); }
.premium-steps { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin:0; padding:0; list-style:none; }
.premium-steps li { min-height:180px; padding:24px; background:var(--surface); border:1px solid var(--line); border-radius:20px; }
.premium-steps span { display:grid; place-items:center; width:38px; height:38px; border-radius:50%; background:var(--navy); color:#fff; font-weight:900; margin-bottom:28px; }
.premium-steps p { margin:0; font-weight:700; }
.related-panel { padding:36px; border-radius:28px; background:linear-gradient(135deg,var(--surface-2),var(--surface)); border:1px solid var(--line); display:grid; grid-template-columns:.8fr 1.2fr; gap:40px; align-items:center; }
.related-links { display:flex; flex-wrap:wrap; gap:10px; }
.related-links a { padding:.72rem 1rem; border-radius:999px; background:var(--surface); border:1px solid var(--line); text-decoration:none; font-weight:800; }

/* Premium app */
.app-shell { background:linear-gradient(180deg,var(--surface-2) 0, var(--paper) 250px); }
.app-intro { padding:20px 0 8px; }
.app-intro h1 { font-size:clamp(2.4rem,4.5vw,4rem); }
.app-grid { gap:28px; grid-template-columns:minmax(360px,.9fr) minmax(0,1.1fr); }
.preview-card, .control-panel { border-radius:30px; }
.preview-card { background:linear-gradient(145deg,var(--surface),color-mix(in srgb,var(--brand-soft) 35%,var(--surface))); padding:18px; }
.canvas-wrap { background:linear-gradient(145deg,#e5ddd2,#f7f3ec); }
.control-panel { padding:clamp(22px,3vw,34px); }
.creation-type-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-bottom:22px; }
.creation-type { min-height:112px; display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:4px; padding:15px; border:1px solid var(--line); border-radius:18px; background:var(--paper); color:var(--ink); text-align:left; }
.creation-type > span { font-size:1.35rem; color:var(--brand-deep); }
.creation-type strong { font-size:.93rem; }
.creation-type small { color:var(--muted); font-size:.72rem; }
.creation-type.active { background:linear-gradient(145deg,var(--brand),var(--brand-deep)); color:#fff; border-color:transparent; box-shadow:0 12px 28px rgba(86,40,58,.2); }
.creation-type.active > span, .creation-type.active small { color:#fff; }
.invitation-fields { padding:18px; border:1px solid color-mix(in srgb,var(--gold) 45%,var(--line)); border-radius:18px; background:color-mix(in srgb,var(--gold-light) 24%,var(--surface)); }
.invitation-fields-heading { display:flex; justify-content:space-between; gap:12px; margin-bottom:14px; }
.invitation-fields-heading span { color:var(--muted); font-size:.8rem; }
.preset { border-radius:18px; }
.preset-preview { aspect-ratio:1.25; }
input, select, textarea { min-height:48px; background:var(--surface); }
textarea { min-height:118px; }

@media (max-width: 1020px) {
  .premium-hero .hero-grid, .tool-hero-grid { grid-template-columns:1fr; }
  .premium-hero h1, .tool-hero h1 { max-width:15ch; }
  .premium-card-stage { min-height:590px; }
  .create-type-grid { grid-template-columns:1fr; }
  .feature-panel { min-height:280px; }
  .premium-steps { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 820px) {
  .site-header { position:relative; }
  .premium-hero { padding-top:62px; }
  .premium-hero .hero-grid { gap:28px; }
  .premium-card-stage { min-height:500px; }
  .split-heading { grid-template-columns:1fr; gap:12px; }
  .process-grid { grid-template-columns:1fr; }
  .benefit-grid { grid-template-columns:1fr; }
  .benefit-grid div, .benefit-grid div:nth-child(odd) { border-right:0; border-bottom:1px solid var(--line); }
  .benefit-grid div:last-child { border-bottom:0; }
  .cta-panel, .footer-topline { align-items:flex-start; flex-direction:column; }
  .mock-content { min-height:330px; }
  .related-panel { grid-template-columns:1fr; }
  .preview-column { top:0; }
}
@media (max-width: 620px) {
  .premium-hero h1 { font-size:3.35rem; }
  .premium-card-stage { min-height:430px; transform:scale(.88); margin-inline:-28px; }
  .showcase-card { width:280px; }
  .showcase-back { transform:rotate(-7deg) translate(-62px,-12px); }
  .showcase-front { transform:rotate(4deg) translate(35px,8px); }
  .premium-float { font-size:.73rem; }
  .float-message { left:3%; }
  .float-design { right:1%; }
  .proof-row { justify-content:flex-start; }
  .premium-section { padding:66px 0; }
  .create-type-grid, .mini-feature-grid, .premium-steps { grid-template-columns:1fr; }
  .premium-steps li { min-height:140px; }
  .mock-content { grid-template-columns:1fr; }
  .mock-controls { display:none; }
  .mock-card { min-height:340px; }
  .creation-type-grid { grid-template-columns:1fr; }
  .creation-type { min-height:80px; display:grid; grid-template-columns:35px 1fr; grid-template-rows:auto auto; align-items:center; }
  .creation-type > span { grid-row:1/3; }
  .invitation-fields-heading { flex-direction:column; }
  .cta-panel { padding:34px 24px; }
  .footer-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* Premium usability release */
.button-hero-primary,
.button-footer-cta {
  background: #f3c665;
  border-color: #f3c665;
  color: #17212b;
  box-shadow: 0 14px 34px rgba(243, 198, 101, .28);
  text-shadow: none;
}
.button-hero-primary:hover,
.button-footer-cta:hover { background: #ffdc88; border-color: #ffdc88; color: #111820; }
.signup-header-button { min-height: 42px; padding: .55rem 1rem; background: var(--surface); color: var(--brand-deep); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.signup-header-button.account-initial { width: 42px; padding: 0; border-radius: 50%; background: var(--brand); color: #fff; }
.mobile-signup { width: 100%; margin-top: 8px; }
.human-premium-hero { background: linear-gradient(132deg, #112332 0%, #233747 52%, #4f2f3e 100%); }
.hero-actions { margin-top: 28px; }
.table-wrap { overflow-x: auto; border-radius: 24px; box-shadow: var(--shadow-soft); }
.premium-comparison { min-width: 690px; box-shadow: none; }
.premium-comparison thead th:first-child { width: 44%; }
.premium-comparison td:nth-child(2) { font-weight: 850; color: var(--success); }
.premium-comparison td:nth-child(3) { color: var(--muted); }
.footer-grid-wide { grid-template-columns: 1.25fr 1fr 1fr 1fr; }
.footer-grid-wide a { padding: .31rem 0; }
.site-footer .button-footer-cta { display: inline-flex; color: #17212b; padding: .82rem 1.25rem; }
.footer-bottom a { display: inline; padding: 0; }

.message-editor-card { border: 2px solid color-mix(in srgb, var(--brand) 24%, var(--line)); background: linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--brand-soft) 20%, var(--surface))); box-shadow: var(--shadow-soft); }
.editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.editor-heading h2, .editor-heading p { margin-bottom: 0; }
.message-field-grid { margin-top: 12px; }
.message-options { max-height: 430px; overflow-y: auto; padding: 2px 5px 8px 2px; margin: 12px 0 20px; }
.message-option { border-left: 4px solid transparent; }
.message-option.selected { border-left-color: var(--brand); }
.tone-field { margin-top: 18px; }
.custom-occasion-choice { border-style: dashed; }
.review-first { background: linear-gradient(145deg, var(--brand-soft), var(--surface)); }

.modal-backdrop { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; background: rgba(10, 14, 18, .72); backdrop-filter: blur(8px); overflow-y: auto; }
.signup-modal, .review-modal { position: relative; width: min(100%, 620px); max-height: calc(100vh - 40px); overflow-y: auto; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 28px; padding: clamp(24px, 4vw, 42px); box-shadow: 0 34px 90px rgba(0,0,0,.34); }
.review-modal { width: min(100%, 1120px); }
.modal-close { position: absolute; right: 16px; top: 14px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-size: 1.5rem; }
.signup-modal form { display: grid; gap: 10px; margin-top: 22px; }
.signup-modal input { width: 100%; }
.form-status { min-height: 26px; margin: 2px 0 0; color: var(--brand-deep); font-weight: 700; }
.modal-small { color: var(--muted); font-size: .85rem; }
.honeypot { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
.modal-open { overflow: hidden; }
.review-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 24px 0; }
.review-grid figure { margin: 0; padding: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 18px; }
.review-grid canvas { width: 100%; aspect-ratio: 5/7; object-fit: contain; background: #fff; border-radius: 10px; box-shadow: 0 10px 24px rgba(30,30,30,.12); }
.review-grid figcaption { text-align: center; margin-top: 8px; font-weight: 800; }
.faq-global { border-top: 1px solid var(--line); }
.internal-links-section { padding-top: 22px; }

@media (max-width: 900px) {
  .footer-grid-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .app-shell .container { width: min(calc(100% - 18px), var(--max)); }
  .app-grid { grid-template-columns: minmax(0, 1fr) !important; gap: 14px; }
  .preview-column { position: sticky; top: 0; z-index: 18; width: 100%; min-width: 0; }
  .preview-card { border-radius: 20px; padding: 8px; box-shadow: 0 12px 28px rgba(38,31,28,.16); }
  .panel-tabs { display: flex; overflow-x: auto; white-space: nowrap; padding-bottom: 4px; }
  .panel-tabs button { flex: 0 0 auto; min-height: 42px; }
  .canvas-wrap { width: 100%; min-height: 0; height: min(34vh, 320px); max-height: 34vh; padding: 6px; }
  #cardCanvas { width: auto; max-width: 100%; height: 100%; max-height: 100%; object-fit: contain; }
  .control-panel { width: 100%; min-width: 0; padding: 16px; border-radius: 20px; }
  .preview-column { position: sticky; top: 8px; z-index: 18; }
  .app-intro { padding-top: 8px; }
  .app-intro h1 { font-size: 2.2rem; }
  .occasion-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; }
  .occasion-choice { min-width: 0; }
  .editor-heading { align-items: flex-start; flex-direction: column; }
  .editor-heading .button { width: 100%; }
  .header-actions { gap: 5px; }
  .signup-header-button { padding: .45rem .72rem; font-size: .85rem; }
}

@media (max-width: 520px) {
  .header-row { gap: 8px; }
  .brand-wordmark strong { font-size: .88rem; }
  .brand-wordmark em { font-size: .55rem; }
  .header-actions .icon-button[data-theme-toggle] { display: none; }
  .canvas-wrap { height: min(31vh, 270px); max-height: 31vh; }
  .occasion-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .occasion-choice { min-height: 74px; }
  .creation-type-grid { grid-template-columns: 1fr; }
  .message-editor-card { padding: 16px; }
  .step-footer { align-items: stretch; flex-direction: column-reverse; }
  .step-footer .button { width: 100%; }
  .secondary-actions { grid-template-columns: 1fr 1fr; }
  .review-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .review-modal { padding: 22px 14px; }
  .footer-grid-wide { grid-template-columns: 1fr; }
  .cta-panel { border-radius: 24px; }
}

/* V4 editorial premium system and mobile-first card workflow */
.site-header { position: relative; background: rgba(250,247,241,.96); border-bottom-color: #d9d0c5; backdrop-filter: blur(16px); }
[data-theme="dark"] .site-header { background: rgba(16,22,29,.96); }
.site-nav a.button-primary { color: #fff; background: #6f3048; border-color: #6f3048; }
.site-nav a.button-primary:hover { background: #512337; color: #fff; }
.button-primary { background: #6f3048; border-color: #6f3048; color: #fff; box-shadow: 0 11px 26px rgba(80,34,53,.18); }
.button-primary:hover { background: #512337; border-color: #512337; color: #fff; }
.button-secondary { background: #eadce1; color: #4f2636; border-color: #d9c2cb; }
[data-theme="dark"] .button-secondary { background: #3b2932; color: #f3d9e3; border-color: #5c3b49; }

.account-control { position: relative; }
.account-menu { position: absolute; right: 0; top: calc(100% + 10px); width: min(310px, calc(100vw - 28px)); padding: 17px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 22px 55px rgba(35,27,31,.18); z-index: 80; }
.account-menu strong, .account-menu span { display: block; overflow-wrap: anywhere; }
.account-menu span { margin: 5px 0 13px; color: var(--muted); font-size: .86rem; }

.editorial-hero { min-height: auto; padding: clamp(66px, 8vw, 108px) 0 clamp(62px, 7vw, 94px); background:
  linear-gradient(rgba(91,67,51,.035) 1px, transparent 1px),
  linear-gradient(90deg, rgba(91,67,51,.028) 1px, transparent 1px),
  #f4eee4; background-size: 34px 34px; color: #172331; }
[data-theme="dark"] .editorial-hero { background: #111a22; color: #f8f1e7; }
.editorial-hero::before { display: none; }
.editorial-hero .hero-grid { grid-template-columns: minmax(0,1.04fr) minmax(380px,.96fr); gap: clamp(44px,7vw,92px); align-items: center; }
.editorial-hero h1 { max-width: 12ch; margin: 12px 0 24px; font-size: clamp(3.05rem, 6vw, 5.8rem); line-height: .99; letter-spacing: -.055em; color: inherit; text-wrap: balance; }
.editorial-hero .eyebrow { color: #7c3f55; }
[data-theme="dark"] .editorial-hero .eyebrow { color: #e0af72; }
.editorial-hero .answer-block-hero { max-width: 690px; margin: 0; padding: 0 0 0 20px; border: 0; border-left: 3px solid #b88a42; border-radius: 0; background: transparent; color: #4e5962; box-shadow: none; backdrop-filter: none; }
[data-theme="dark"] .editorial-hero .answer-block-hero { color: #c9d0d5; }
.button-hero-primary, .button-footer-cta { background: #6f3048; border-color: #6f3048; color: #fff; box-shadow: 0 14px 32px rgba(80,34,53,.22); }
.button-hero-primary:hover, .button-footer-cta:hover { background: #512337; border-color: #512337; color: #fff; }
.button-editorial-secondary { background: transparent; border-color: #7b6d61; color: #273440; box-shadow: none; }
.button-editorial-secondary:hover { background: rgba(255,255,255,.62); color: #172331; }
[data-theme="dark"] .button-editorial-secondary { border-color: #9aa5ad; color: #f7f1e8; }
.editorial-trust { color: #59636b; }
[data-theme="dark"] .editorial-trust { color: #c6ccd0; }

.stationery-stage { position: relative; min-height: 560px; display: grid; place-items: center; perspective: 1100px; }
.stage-shadow { position: absolute; width: 78%; height: 64%; border-radius: 50%; background: rgba(48,36,30,.15); filter: blur(42px); transform: translateY(86px); }
.paper-card { position: absolute; width: min(330px, 68vw); aspect-ratio: 5/7; padding: 38px 32px; display: flex; flex-direction: column; justify-content: center; text-align: center; border: 1px solid rgba(81,61,48,.14); border-radius: 5px; box-shadow: 0 34px 70px rgba(49,36,29,.2); overflow: hidden; }
.paper-card::before { content: ""; position: absolute; inset: 17px; border: 1px solid currentColor; opacity: .18; }
.paper-card span, .paper-card strong, .paper-card small { position: relative; z-index: 1; }
.paper-card span { margin-bottom: 24px; color: #b88a42; font: 800 .68rem/1 Arial,sans-serif; letter-spacing: .22em; }
.paper-card strong { font: 700 2rem/1.23 Georgia,serif; }
.paper-card small { margin-top: 28px; opacity: .7; }
.paper-card-invite { left: 4%; top: 10%; background: #f7f0e5; color: #233441; transform: rotate(-7deg); }
.paper-card-greeting { right: 5%; bottom: 5%; background: #4d2d3b; color: #fff8ec; transform: rotate(4deg); }
.paper-swatch { position: absolute; width: 74px; height: 96px; border-radius: 3px; box-shadow: 0 15px 34px rgba(48,35,28,.15); }
.swatch-one { left: 3%; bottom: 9%; background: #caa46a; transform: rotate(12deg); }
.swatch-two { right: 2%; top: 9%; background: #243746; transform: rotate(-8deg); }

.occasion-card-actions { margin-top: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.occasion-card-actions .text-link { font-weight: 800; font-size: .9rem; }
.occasion-card .button-primary { padding-inline: .9rem; }

.footer-grid-wide { grid-template-columns: 1.1fr 1fr 1fr 1fr 1fr; gap: 28px; }
.site-footer { background: #1a2229; }
.site-footer .footer-topline p { max-width: 720px; }

.message-choice-panel { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.message-choice-panel h3 { margin: 0; }
.message-editor-card { border: 1px solid #d9c9cf; background: #fffdf9; box-shadow: 0 18px 45px rgba(54,39,45,.08); }
[data-theme="dark"] .message-editor-card { background: var(--surface); border-color: var(--line); }
.message-field-grid { align-items: end; }
.occasion-first { padding-bottom: 4px; }
.optional-guidance { background: color-mix(in srgb, var(--surface-2) 46%, transparent); border-radius: 20px; padding: 20px; }
.size-choice-grid .choice { border-radius: 14px; }
.output-mode-grid .choice { border-radius: 14px; min-height: 54px; }
.app-related-links { padding-top: 22px; }
.control-panel { overflow: visible; }
.preview-card { overflow: hidden; }
.canvas-wrap { contain: layout paint; }
#cardCanvas { object-fit: contain; }
.review-grid canvas { display: block; aspect-ratio: 5/7; }

@media (max-width: 1080px) {
  .editorial-hero .hero-grid { grid-template-columns: 1fr; }
  .editorial-hero h1 { max-width: 13ch; }
  .stationery-stage { min-height: 500px; max-width: 650px; width: 100%; margin-inline: auto; }
  .footer-grid-wide { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width: 820px) {
  .site-header { position: relative; }
  .editorial-hero { padding: 52px 0 58px; }
  .editorial-hero .hero-grid { gap: 24px; }
  .editorial-hero h1 { font-size: clamp(2.7rem, 12vw, 4.25rem); }
  .hero-actions .button { width: 100%; }
  .stationery-stage { min-height: 410px; }
  .paper-card { width: min(255px,61vw); padding: 28px 23px; }
  .paper-card strong { font-size: 1.55rem; }
  .paper-card-invite { left: 10%; }
  .paper-card-greeting { right: 10%; }
  .paper-swatch { display: none; }

  .app-grid { display: grid; grid-template-columns: minmax(0,1fr) !important; gap: 12px; }
  .preview-column { position: sticky; top: 6px; z-index: 18; width: 100%; min-width: 0; }
  .preview-card { padding: 7px; border-radius: 18px; background: color-mix(in srgb,var(--surface) 94%,var(--paper)); box-shadow: 0 12px 30px rgba(36,29,30,.16); }
  .panel-tabs { margin-bottom: 4px; padding-bottom: 2px; }
  .panel-tabs button { min-height: 38px; padding: .42rem .68rem; font-size: .82rem; }
  .canvas-wrap { height: clamp(170px, 25vh, 235px); max-height: 25vh; padding: 5px; border-radius: 12px; }
  #cardCanvas { height: 100%; width: auto; max-width: 100%; max-height: 100%; border-radius: 8px; }
  .control-panel { padding: 15px; border-radius: 18px; }
  .app-intro { margin-bottom: 12px; }
  .app-intro h1 { font-size: clamp(2rem, 9vw, 3rem); }
  .app-intro p { margin-bottom: 0; }
  .occasion-choices { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); overflow: visible; }
  .occasion-choice { min-width: 0; }
  .footer-grid-wide { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 560px) {
  .container, .narrow { width: min(calc(100% - 20px), var(--max)); }
  .header-row { min-height: 66px; }
  .signup-header-button { min-width: 67px; }
  .editorial-hero h1 { font-size: clamp(2.55rem, 13vw, 3.7rem); }
  .stationery-stage { min-height: 345px; margin-top: 4px; }
  .paper-card { width: min(215px,59vw); padding: 23px 18px; }
  .paper-card strong { font-size: 1.27rem; }
  .paper-card-invite { left: 6%; top: 8%; }
  .paper-card-greeting { right: 6%; bottom: 4%; }
  .proof-row { font-size: .72rem; }

  .app-shell { padding-top: 14px; }
  .app-shell .container { width: min(calc(100% - 12px), var(--max)); }
  .canvas-wrap { height: clamp(150px, 23vh, 205px); max-height: 23vh; }
  .preview-caption { display: none; }
  .control-panel { padding: 12px; }
  .control-section h2 { font-size: 1.45rem; }
  .occasion-choices { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .occasion-choice { min-height: 70px; }
  .message-editor-card { padding: 14px; }
  .field-grid { gap: 11px; }
  input, select, textarea { min-height: 46px; }
  .preset { min-width: 116px; }
  .secondary-actions { grid-template-columns: 1fr 1fr; }
  .review-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid-wide { grid-template-columns: 1fr; }
}

@media (max-height: 650px) and (max-width: 820px) {
  .canvas-wrap { height: 145px; max-height: 145px; }
}

/* V5 exact-format review and stronger mobile workflow */
.mobile-menu a.button-primary,
.mobile-menu a.button-primary:hover,
.mobile-menu .button-primary,
.mobile-menu .button-primary:hover {
  background: #6f3048;
  border-color: #6f3048;
  color: #fff;
}

#cardMakerWorkspace { scroll-margin-top: 10px; }
.format-before-review { background: linear-gradient(145deg, #fffdf8, #f4ece7); border: 1px solid #dbcdd1; border-radius: 22px; padding: 22px; }
[data-theme="dark"] .format-before-review { background: linear-gradient(145deg, var(--surface), var(--surface-2)); border-color: var(--line); }
.format-options { margin-top: 22px; }
.format-options h3 { margin-top: 0; }
.size-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.size-choice-grid .choice { width: 100%; min-height: 50px; justify-content: flex-start; text-align: left; line-height: 1.25; }
.selected-format-card { display: grid; gap: 4px; margin-top: 20px; padding: 16px 18px; border-radius: 16px; background: #1e2d39; color: #fff; }
.selected-format-card span { color: #e8c67c; font-size: .76rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.selected-format-card strong { font-size: 1rem; }
.download-workspace { margin-top: 24px; padding-top: 8px; border-top: 1px solid var(--line); }
.download-card small { display: block; margin-top: 5px; color: var(--muted); }
.social-share-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.social-share-grid .button { width: 100%; }
.review-format-summary { margin: -5px 0 20px; padding: 12px 15px; border-radius: 14px; background: var(--surface-2); color: var(--muted); font-weight: 800; }
.review-single { margin: 20px auto 24px; width: min(100%, 860px); }
.review-single figure { margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface-2); }
.review-single canvas { display: block; width: auto; max-width: 100%; max-height: 62vh; margin: 0 auto; object-fit: contain; background: #fff; border-radius: 10px; box-shadow: 0 14px 34px rgba(22, 27, 31, .16); }
.review-single figcaption { margin-top: 10px; text-align: center; color: var(--muted); font-weight: 800; }
.review-modal .button-row { position: sticky; bottom: -1px; padding-top: 14px; background: linear-gradient(transparent, var(--surface) 28%); }
.review-modal .button-primary { color: #fff; }

@media (max-width: 820px) {
  #cardMakerWorkspace { scroll-margin-top: 4px; }
  .preview-column { top: 4px; }
  .canvas-wrap { height: clamp(230px, 34vh, 330px); max-height: 34vh; }
  .preview-card { padding: 9px; }
  .size-choice-grid { grid-template-columns: 1fr 1fr; }
  .social-share-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .review-single canvas { max-height: 58vh; }
}

@media (max-width: 560px) {
  .canvas-wrap { height: clamp(215px, 32vh, 285px); max-height: 32vh; }
  .panel-tabs button { min-height: 40px; }
  .size-choice-grid { grid-template-columns: 1fr; }
  .size-choice-grid .choice { min-height: 48px; }
  .social-share-grid { grid-template-columns: 1fr 1fr; }
  .format-before-review { padding: 16px; }
  .review-modal { width: 100%; max-height: calc(100vh - 16px); border-radius: 20px; }
  .review-single { margin-top: 14px; }
  .review-single figure { padding: 9px; }
  .review-single canvas { max-height: 53vh; }
}

@media (max-height: 650px) and (max-width: 820px) {
  .canvas-wrap { height: 205px; max-height: 205px; }
}

/* V6 visible design studio, persistent preview and contrast hardening */
.design-options-visible { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.design-options-visible > h3:first-child { margin-top: 0; }
.background-swatches { align-items: flex-end; }
.colour-swatch { width: 48px; height: 48px; min-width: 48px; border: 2px solid transparent; border-radius: 13px; background: var(--swatch); box-shadow: 0 8px 18px rgba(30,25,28,.14); cursor: pointer; }
.colour-swatch:hover, .colour-swatch:focus-visible { transform: translateY(-2px); }
.colour-swatch.active { border-color: #fff; outline: 3px solid var(--brand); }
.custom-colour-label { display: inline-grid; gap: 5px; color: var(--muted); font-size: .76rem; font-weight: 850; }
.compact-colour-field { width: min(260px,100%); margin-top: 14px; }
.design-studio .choice-grid { row-gap: 9px; }
.design-studio .photo-row { margin-bottom: 4px; }

.mock-controls .mock-design-link { margin-top: auto; min-height: 48px; border: 0; border-radius: 99px; background: #7c3f55; color: #fff; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; padding: .7rem 1rem; }
.mock-controls .mock-design-link:hover { background: #5a2c3e; color: #fff; }

/* Any action using the burgundy brand surface must use white text. */
.button-primary,
.button-hero-primary,
.button-footer-cta,
.site-footer .button-footer-cta,
.site-nav a.button-primary,
.mobile-menu a.button-primary,
.mobile-menu .button-primary,
.review-modal .button-primary,
.floating-preview-dock .button-primary,
.mock-controls .mock-design-link {
  color: #fff !important;
}

.floating-preview-dock { position: fixed; left: 18px; bottom: 18px; z-index: 72; width: min(270px, 26vw); padding: 10px; border: 1px solid rgba(255,255,255,.4); border-radius: 18px; background: rgba(250,247,241,.95); box-shadow: 0 22px 58px rgba(18,24,30,.28); backdrop-filter: blur(15px); }
[data-theme="dark"] .floating-preview-dock { background: rgba(24,31,38,.94); border-color: rgba(255,255,255,.14); }
.floating-preview-dock[hidden] { display: none !important; }
#floatingCardCanvas { display: block; width: 100%; max-height: 260px; object-fit: contain; border-radius: 10px; background: #fff; box-shadow: 0 10px 26px rgba(20,25,30,.18); }
.floating-preview-dock .button { width: 100%; margin-top: 9px; }

@media (max-width: 820px) {
  .preset-grid { display: flex; overflow-x: auto; gap: 10px; padding-bottom: 5px; scroll-snap-type: x proximity; }
  .preset { flex: 0 0 132px; scroll-snap-align: start; }
  .canvas-wrap { height: clamp(250px, 36vh, 350px); max-height: 36vh; }
  .floating-preview-dock { left: auto; right: 10px; bottom: 72px; width: min(190px, 46vw); padding: 7px; border-radius: 14px; }
  #floatingCardCanvas { max-height: 190px; }
  .floating-preview-dock .button { min-height: 40px; padding: .45rem .65rem; font-size: .76rem; }
}

@media (max-width: 560px) {
  .colour-swatch { width: 44px; height: 44px; min-width: 44px; }
  .canvas-wrap { height: clamp(235px, 34vh, 315px); max-height: 34vh; }
  .floating-preview-dock { width: min(175px, 48vw); }
}

@media print {
  .floating-preview-dock { display: none !important; }
}


/* V6.1 deployment freshness, review reliability and consistent action contrast */
.review-modal { scroll-margin-top: 0; }
#reviewModal:not([hidden]) { display: grid !important; }
#reviewModal[aria-hidden="false"] { visibility: visible; opacity: 1; }

/* Every dark burgundy action uses white text, including active choices and mobile actions. */
.button-primary,
.button-hero-primary,
.button-footer-cta,
.site-footer .button-footer-cta,
.site-nav a.button-primary,
.mobile-menu a.button-primary,
.mobile-menu .button-primary,
.review-modal .button-primary,
.floating-preview-dock .button-primary,
.mock-controls .mock-design-link,
.choice.active,
.creation-type.active,
.panel-tabs button.active,
.output-mode-grid .choice.active,
.signup-header-button.account-initial {
  color: #fff !important;
}

.mock-controls { position: relative; z-index: 2; }
.mock-controls .mock-design-link { position: relative; z-index: 3; pointer-events: auto; }

/* The full design studio is always visible. No hidden advanced-options accordion is used. */
.design-options-visible { display: block !important; }
.more-options { display: none !important; }

/* Keep the live preview readable while leaving enough screen for the controls. */
@media (max-width: 820px) {
  .canvas-wrap { height: clamp(270px, 38vh, 380px); max-height: 38vh; }
  .floating-preview-dock { width: min(220px, 54vw); right: 10px; bottom: 12px; }
  #floatingCardCanvas { max-height: 230px; }
}
@media (max-width: 560px) {
  .canvas-wrap { height: clamp(250px, 36vh, 340px); max-height: 36vh; }
  .floating-preview-dock { width: min(205px, 56vw); }
  #floatingCardCanvas { max-height: 215px; }
}
@media (max-height: 650px) and (max-width: 820px) {
  .canvas-wrap { height: 225px; max-height: 225px; }
}

/* V7 photo positioning: upload, preview, drag and zoom without leaving the browser. */
.photo-upload-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(111,48,72,.07), rgba(215,164,87,.08));
}
.photo-upload-copy { display: grid; gap: 4px; }
.photo-upload-copy strong { color: var(--ink); font-size: .98rem; }
.photo-upload-copy span { color: var(--muted); font-size: .86rem; line-height: 1.45; }
.visually-hidden-file {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.photo-upload-button { cursor: pointer; white-space: nowrap; }
.photo-upload-card:focus-within { outline: 3px solid rgba(111,48,72,.22); outline-offset: 3px; }
.photo-position-help {
  margin: 10px 0 0;
  padding: 11px 13px;
  border-left: 3px solid var(--brand);
  border-radius: 8px;
  background: rgba(111,48,72,.07);
  color: var(--ink);
  font-size: .88rem;
}
.photo-position-controls {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 14px;
  align-items: end;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}
.photo-position-controls[hidden], .photo-position-help[hidden] { display: none !important; }
.photo-zoom-control { display: grid; gap: 7px; color: var(--ink); font-weight: 800; }
.photo-zoom-control input[type="range"] { width: 100%; min-height: 44px; accent-color: var(--brand); }
.photo-position-actions { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }
.photo-position-actions .button { min-width: 44px; padding-inline: 12px; }
#cardCanvas.photo-draggable { cursor: grab; touch-action: none; user-select: none; }
#cardCanvas.photo-draggable:focus-visible { outline: 4px solid rgba(215,164,87,.58); outline-offset: 5px; }
#cardCanvas.is-dragging-photo { cursor: grabbing; }

@media (max-width: 700px) {
  .photo-upload-card { grid-template-columns: 1fr 1fr; }
  .photo-upload-copy { grid-column: 1 / -1; }
  .photo-upload-button, .photo-upload-card #removePhoto { width: 100%; text-align: center; }
  .photo-position-controls { grid-template-columns: 1fr; }
  .photo-position-actions { justify-content: flex-start; }
}


/* V8: concise how-it-works guidance belongs at the point of decision. */
.hero-how,
.app-how {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(109, 41, 66, .18);
  border-radius: 18px;
  background: rgba(255, 255, 255, .62);
  box-shadow: 0 12px 34px rgba(35, 28, 31, .06);
}
.hero-how > strong,
.app-how > strong {
  display: block;
  margin-bottom: 10px;
  color: var(--brand);
  font-size: .78rem;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.hero-how ol,
.app-how ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hero-how li,
.app-how li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.35;
}
.hero-how li span,
.app-how li span {
  display: inline-grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: .82rem;
}
.app-intro { max-width: 980px; }
.app-intro > p:not(.eyebrow) { max-width: 760px; }

/* Make the main writing area feel like the primary task, not a small form field. */
#mainMessage {
  min-height: 190px;
  padding: 18px 20px;
  font-size: 1.08rem;
  line-height: 1.62;
  border-width: 2px;
}
#mainMessage:focus {
  min-height: 220px;
}

@media (max-width: 760px) {
  .hero-how ol,
  .app-how ol { grid-template-columns: 1fr; }
  .hero-how,
  .app-how { padding: 14px; }
  #mainMessage {
    min-height: 180px;
    font-size: 1rem;
  }
  #mainMessage:focus { min-height: 205px; }
}


/* V9 five-stage flow and quick-edit preview controls */
.preview-edit-strip { border-top: 1px solid var(--line); padding: 14px 12px 4px; text-align: center; }
.preview-edit-strip .preview-caption { display: block; margin: 0 0 10px; text-transform: uppercase; letter-spacing: .11em; font-size: .76rem; }
.preview-edit-actions, .floating-edit-actions, .review-change-actions, .review-modal-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.preview-edit-actions .button { min-height: 40px; }
.review-selected-format { margin: 14px 0; }
.review-modal-actions { margin-top: 18px; }
.review-modal-actions .button-primary { flex: 1 1 250px; }
.floating-preview-dock > p { margin: 8px 0 6px; text-align: center; font-size: .68rem; line-height: 1.25; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.floating-edit-actions .button { width: auto; flex: 1 1 70px; margin-top: 0; padding-inline: .45rem; }
.download-workspace[hidden] { display: none !important; }
@media (max-width: 760px) {
  .preview-edit-strip { padding: 10px 6px 2px; }
  .preview-edit-actions { gap: 6px; }
  .preview-edit-actions .button { min-height: 38px; font-size: .74rem; padding: .42rem .65rem; }
  .review-modal-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .review-modal-actions .button-primary { grid-column: 1 / -1; }
}

/* V10 layout restoration: preserve the approved design, repair only desktop/mobile structure. */
@media (min-width: 821px) {
  .app-shell .container {
    width: min(calc(100% - 40px), 1420px);
  }
  .app-grid {
    display: grid !important;
    grid-template-columns: minmax(410px, 0.86fr) minmax(560px, 1.14fr) !important;
    gap: clamp(24px, 2.6vw, 42px) !important;
    align-items: start;
  }
  .preview-column {
    position: sticky !important;
    top: 18px !important;
    z-index: 12;
    align-self: start;
    min-width: 0;
  }
  .control-panel {
    grid-column: 2;
    min-width: 0;
    width: 100%;
  }
  .preview-card {
    width: 100%;
  }
  .canvas-wrap {
    min-height: 560px;
    max-height: calc(100vh - 185px);
  }
  #cardCanvas {
    max-height: calc(100vh - 210px);
  }
}

/* Keep one readable sticky preview on phones and remove the tiny duplicate dock. */
@media (max-width: 820px) {
  .floating-preview-dock {
    display: none !important;
  }
  .app-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .preview-column {
    position: sticky !important;
    top: 0 !important;
    z-index: 18;
  }
  .canvas-wrap {
    height: clamp(270px, 39vh, 390px);
    max-height: 39vh;
  }
}

/* Compact desktop homepage so both actions and the short guide remain above the fold. */
@media (min-width: 821px) {
  .editorial-hero {
    padding: clamp(34px, 4.2vw, 58px) 0 clamp(34px, 4vw, 54px);
  }
  .editorial-hero .hero-grid {
    gap: clamp(32px, 4vw, 58px);
    align-items: center;
  }
  .editorial-hero h1 {
    max-width: 11.5ch;
    margin: 8px 0 16px;
    font-size: clamp(3rem, 5vw, 4.95rem);
    line-height: .96;
  }
  .editorial-hero .answer-block-hero {
    margin-bottom: 14px;
    font-size: .98rem;
  }
  .editorial-hero .hero-actions {
    margin: 14px 0;
  }
  .editorial-hero .hero-how {
    margin-top: 12px;
    padding: 14px 16px;
  }
  .editorial-hero .hero-how ol {
    gap: 8px 14px;
  }
  .editorial-hero .editorial-trust {
    margin-top: 12px;
  }
  .stationery-stage {
    min-height: 470px;
  }
  .paper-card {
    width: min(290px, 62vw);
    padding: 32px 27px;
  }
}


/* V11: compact one-tap design collection and folded-sheet review */
.preset-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.preset { min-height: 0; padding: 6px; border-radius: 13px; font-size: .82rem; line-height: 1.18; }
.preset-preview { aspect-ratio: 16 / 9; min-height: 54px; max-height: 70px; margin-bottom: 5px; border-radius: 8px; }
.preset-label { display: block; }
.preset-ocean { background: linear-gradient(135deg, #083f62, #45b9ce); }
.preset-royal { background: linear-gradient(135deg, #172d78, #e2bb55); }
.preset-sky { background: linear-gradient(135deg, #cce9fb, #ffffff); }
.preset-teal { background: linear-gradient(135deg, #0f6065, #d5b878); }
.preset-lavender { background: linear-gradient(135deg, #eee8f7, #8e72b4); }
.preset-plum { background: linear-gradient(135deg, #3d1f42, #d39bb9); }
.preset-emerald { background: linear-gradient(135deg, #0c4534, #d3b45f); }
.preset-terracotta { background: linear-gradient(135deg, #a94f3d, #efbd83); }
.preset-mono { background: linear-gradient(135deg, #f2f0eb, #292929); }
.preset-champagne { background: linear-gradient(135deg, #f5e5de, #c79861); }
.no-size-review { border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--line)); background: var(--brand-soft); padding: 18px; border-radius: 16px; margin: 14px 0; }
.no-size-review strong { display: block; font-size: 1.08rem; margin-bottom: 4px; }
.no-size-review p { margin: 0 0 12px; }
.review-folded-sheets { display: grid; gap: 22px; }
.review-folded-sheets figure { margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.review-folded-sheets h3 { margin-bottom: 10px; }
.review-folded-sheets canvas { width: 100%; display: block; border: 1px solid var(--line); background: #fff; }
.review-folded-sheets figcaption { display: grid; gap: 2px; margin-top: 10px; color: var(--muted); }
.review-folded-sheets figcaption strong { color: var(--ink); }
.folded-print-help { margin: 0; padding: 14px 16px; border-left: 4px solid var(--gold); background: var(--surface-2); border-radius: 0 12px 12px 0; }
@media (max-width: 920px) {
  .preset-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .preset-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; gap: 8px; }
  .preset { min-width: 0; flex: none; }
  .preset-preview { min-height: 58px; max-height: 68px; }
}

/* V12: removed the small fixed bottom-left preview. */
.floating-preview-dock { display: none !important; }

/* V13 wording guidance */
.field-note{display:block;margin-top:.35rem;color:var(--muted);font-size:.78rem;font-weight:700;letter-spacing:.02em}
.field[hidden]{display:none!important}

.stage-guard-prompt { position: relative; margin: 0 0 18px; padding: 16px 18px; border: 1px solid #d8b8c5; border-left: 5px solid #7b304f; border-radius: 16px; background: #fff7fa; box-shadow: 0 10px 26px rgba(40,22,30,.08); }
.stage-guard-close { position: absolute; top: 8px; right: 10px; width: 30px; height: 30px; border: 0; background: transparent; font-size: 1.4rem; line-height: 1; color: #7b304f; cursor: pointer; border-radius: 50%; }
.stage-guard-close:hover { background: rgba(123,48,79,.1); }
.stage-guard-pinned { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); width: min(calc(100% - 24px), 520px); z-index: 60; margin: 0; box-shadow: 0 18px 44px rgba(40,22,30,.28); animation: guardDrop .28s ease; }
@keyframes guardDrop { from { opacity: 0; transform: translate(-50%, -14px); } to { opacity: 1; transform: translate(-50%, 0); } }
.stage-guard-prompt strong { display:block; margin-bottom:4px; color:#4f1f34; font-size:1.05rem; }
.stage-guard-prompt p { margin:0 0 12px; color:#4d4650; }
.stage-guard-prompt .button { min-width:140px; }

.review-share-block { margin: 18px auto 0; max-width: 460px; padding-top: 16px; border-top: 1px solid var(--line); }
.review-share-block[hidden] { display: none; }
.review-share-primary { width: 100%; justify-content: center; }
.review-share-note { margin: 6px 0 12px; text-align: center; font-size: .82rem; color: var(--muted); }
.review-share-formats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.review-share-formats .button { width: 100%; justify-content: center; }
.sheet-group { margin-bottom: 8px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.sheet-group > summary { cursor: pointer; list-style: none; padding: 10px 14px; font-size: .92rem; font-weight: 500; }
.sheet-group > summary::-webkit-details-marker { display: none; }
.sheet-group > summary::after { content: '+'; float: right; color: var(--muted); }
.sheet-group[open] > summary::after { content: '\2212'; }
.sheet-group-body { display: flex; flex-direction: column; gap: 6px; padding: 0 10px 10px; }
.sheet-row { width: 100%; justify-content: flex-start; font-size: .88rem; }
.review-share-sheets { width: 100%; justify-content: center; margin-top: 4px; }
.review-privacy-note { margin: 14px 0 0; text-align: center; font-size: .8rem; color: var(--muted); }
.review-modal-actions { position: sticky; bottom: -1px; padding: 14px 0 2px; background: linear-gradient(transparent, var(--surface) 28%); }
@media (max-width: 560px) {
  .review-share-formats { grid-template-columns: 1fr; }
  .review-share-block { max-width: 100%; }
}

/* Category pickers */
.category-hint { margin: 0 0 14px; font-size: .86rem; color: var(--muted); }

/* Step strip on the floating preview card */
.preview-stage-strip { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 0 0 10px; }
.preview-stage { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: .78rem; font-weight: 500; cursor: pointer; }
.preview-stage-num { display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: color-mix(in srgb, var(--line) 60%, transparent); font-size: .68rem; font-weight: 700; }
.preview-stage.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.preview-stage.active .preview-stage-num { background: rgba(255,255,255,.28); color: #fff; }
.preview-stage.done { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); color: var(--brand); }
.preview-stage.done .preview-stage-num { background: color-mix(in srgb, var(--brand) 22%, transparent); color: var(--brand); }


/* Generated category and occasion pages */
.breadcrumb { padding: 14px 0 0; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 auto; padding: 0 20px; max-width: 1120px; font-size: .84rem; color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--muted); }
.occasion-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 18px; }
.occasion-card { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; text-decoration: none; background: var(--surface); transition: transform .15s ease, box-shadow .15s ease; }
.occasion-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(40,22,30,.10); }
.occasion-card strong { display: block; margin-bottom: 4px; }
.occasion-card span { font-size: .86rem; color: var(--muted); }
.link-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.link-strip a { padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; font-size: .86rem; text-decoration: none; }
.link-strip a:hover { border-color: var(--brand); color: var(--brand); }
.message-list { margin: 10px 0 22px; padding-left: 20px; }
.message-list li { margin-bottom: 9px; line-height: 1.55; }

/* Category columns: name on one row, full selection visible on the next */
.category-columns { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin: 12px 0 18px; }
.category-column { display: flex; flex-direction: column; gap: 7px; padding: 12px 11px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); min-width: 0; }
.category-column.is-active { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 16%, transparent); }
.category-column-title { margin: 0; font-size: .82rem; font-weight: 700; line-height: 1.3; color: var(--brand); }
.category-column-select {
  width: 100%; min-width: 0; font-size: .84rem; line-height: 1.35;
  padding: 9px 30px 9px 10px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: inherit; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 15px) calc(50% + 1px), calc(100% - 10px) calc(50% + 1px);
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
  text-overflow: ellipsis;
}
.category-column-select:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
/* The chosen occasion is echoed in full underneath and wraps to as many rows as it needs */
.category-column-choice { margin: 0; font-size: .78rem; line-height: 1.35; font-weight: 600; color: var(--brand); overflow-wrap: anywhere; }
.category-column-choice[hidden] { display: none; }
@media (max-width: 1024px) { .category-columns { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 760px)  { .category-columns { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; } }
@media (max-width: 380px)  { .category-columns { grid-template-columns: 1fr; } }

/* Font and size controls beside each text box */
.field-typo { display: flex; align-items: center; gap: 5px; margin-top: 6px; flex-wrap: wrap; }
.field-typo-tag { font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); flex: 0 0 auto; }
.field-typo-select { flex: 1 1 30%; min-width: 0; font-size: .76rem; padding: 5px 6px; border-radius: 8px; }
@media (max-width: 520px) { .field-typo-tag { display: none; } }

/* Compact category footer */
.footer-categories { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 14px; padding: 6px 0 4px; }
.footer-cat { min-width: 0; }
.footer-cat h3 { margin: 0 0 6px; font-size: .74rem; line-height: 1.3; letter-spacing: .02em; }
.footer-cat h3 a { text-decoration: none; }
.footer-cat a { display: block; font-size: .68rem; line-height: 1.65; opacity: .82; text-decoration: none; }
.footer-cat a:hover { opacity: 1; text-decoration: underline; }
.footer-siteline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.14); }
.footer-siteline h3 { margin: 0 8px 0 0; font-size: .74rem; }
.footer-siteline a { font-size: .72rem; opacity: .82; text-decoration: none; }
.footer-siteline a:hover { opacity: 1; text-decoration: underline; }
@media (max-width: 1000px) { .footer-categories { grid-template-columns: repeat(4, minmax(0,1fr)); } }
@media (max-width: 680px)  { .footer-categories { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; } }

/* Make your own occasion: primary discovery CTA */
.custom-occasion-cta { margin: 4px 0 20px; }
.custom-occasion-button {
  position: relative; display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 16px 18px; border: 0; border-radius: 18px; cursor: pointer; text-align: left;
  color: #fff; overflow: hidden;
  background: linear-gradient(118deg, #7b304f 0%, #9c3f5f 46%, #b8674f 100%);
  box-shadow: 0 10px 26px rgba(109,41,66,.26), inset 0 1px 0 rgba(255,255,255,.18);
  transition: transform .18s ease, box-shadow .18s ease;
}
.custom-occasion-button::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 160% at 88% 8%, rgba(255,255,255,.22), transparent 58%);
}
.custom-occasion-button:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(109,41,66,.34), inset 0 1px 0 rgba(255,255,255,.22); }
.custom-occasion-button:active { transform: translateY(0); }
.custom-occasion-button:focus-visible { outline: 3px solid #f1c478; outline-offset: 3px; }
.custom-occasion-icon { flex: 0 0 auto; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.17); }
.custom-occasion-icon svg { width: 21px; height: 21px; }
.custom-occasion-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.custom-occasion-text strong { font-size: 1rem; font-weight: 700; letter-spacing: .01em; }
.custom-occasion-text small { font-size: .8rem; opacity: .9; line-height: 1.35; }
.custom-occasion-arrow { flex: 0 0 auto; font-size: 1.15rem; opacity: .85; transition: transform .18s ease; }
.custom-occasion-button:hover .custom-occasion-arrow { transform: translateX(4px); }
.custom-occasion-button.active { box-shadow: 0 0 0 3px #f1c478, 0 12px 30px rgba(109,41,66,.3); }
@media (max-width: 480px) {
  .custom-occasion-button { padding: 14px; gap: 11px; }
  .custom-occasion-text small { font-size: .74rem; }
  .custom-occasion-arrow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .custom-occasion-button, .custom-occasion-arrow { transition: none; }
  .custom-occasion-button:hover { transform: none; }
}

/* ============ MOBILE LAYOUT OVERHAUL (V27) ============ */
@media (max-width: 900px) {
  /* Marketing intro must not push the tool below the fold */
  .app-intro { margin-bottom: 10px; padding-top: 6px; text-align: left; }
  .app-intro .eyebrow { font-size: .66rem; letter-spacing: .1em; margin-bottom: 2px; }
  .app-intro h1 { font-size: 1.42rem !important; line-height: 1.2; margin: 0 0 4px; }
  .app-intro > p { font-size: .82rem; margin: 0; }

  /* Card preview: smaller so the controls beneath are reachable */
  .canvas-wrap { max-height: 30vh !important; padding: 6px !important; }
  #cardCanvas { max-height: 28vh !important; }
  .preview-card { padding: 8px !important; }

  /* All five steps on one line, sized to fit the width without wrapping */
  .preview-stage-strip {
    display: flex; flex-wrap: nowrap; justify-content: center;
    gap: 3px; margin-bottom: 8px; width: 100%;
  }
  .preview-stage {
    flex: 1 1 0; min-width: 0; justify-content: center;
    padding: 4px 3px; font-size: .6rem; gap: 3px; letter-spacing: -.01em;
  }
  .preview-stage-label { display: inline !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .preview-stage-num { flex: 0 0 auto; width: 13px; height: 13px; font-size: .54rem; }

  /* Categories are the primary control: give them room and clarity */
  .category-hint { font-size: .78rem; margin-bottom: 8px; }

  /* Custom card CTA stays prominent but compact */
  .custom-occasion-button { padding: 13px 14px; gap: 11px; }
  .custom-occasion-text strong { font-size: .92rem; }
  .custom-occasion-text small { font-size: .74rem; }

  .control-panel { padding: 14px !important; }
  .control-section { margin-bottom: 16px; }
  .control-section h2 { font-size: 1.05rem; }
}

@media (max-width: 520px) {
  .app-intro h1 { font-size: 1.28rem !important; }
  .app-intro > p { display: none; }
  .field-typo-select { font-size: .74rem; }
}
