@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&family=Jost:wght@300;400;500;600;700&display=swap');

:root {
    --font-sans: 'Jost', 'Avenir Next', 'Segoe UI', sans-serif;
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --ink: #2a2520;
    --ink-strong: #171411;
    --muted: #7c7167;
    --muted-light: #a3978b;
    --line: #e9dfd2;
    --line-strong: #d9cbb9;
    --paper: #fdfbf8;
    --paper-warm: #f7f1e8;
    --paper-deep: #efe5d7;
    --white: #ffffff;
    --sand: #e8d9c3;
    --gold: #b5935a;
    --gold-dark: #8f6d3d;
    --gold-soft: #f3eadb;
    --clay: #a2783a;
    --success: #2f7d5b;
    --success-soft: #e8f4ee;
    --warning: #9a6410;
    --warning-soft: #fdf3df;
    --danger: #a23d3d;
    --danger-soft: #faeaea;
    --info: #3e657d;
    --info-soft: #eaf2f6;
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 22px;
    --radius-pill: 999px;
    --shadow-sm: 0 2px 10px rgba(63, 45, 27, .05);
    --shadow: 0 14px 40px rgba(63, 45, 27, .09);
    --shadow-lg: 0 28px 70px rgba(63, 45, 27, .14);
    --container: 1180px;
    --container-narrow: 820px;
    --header-h: 74px;
    --transition: .28s cubic-bezier(.2, .7, .25, 1);
}

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

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.7;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 12px;
    font-weight: 600;
    line-height: 1.18;
    color: var(--ink-strong);
}

h1 { font-size: clamp(2rem, 4vw, 3.4rem); letter-spacing: -.025em; }
h2 { font-size: clamp(1.55rem, 3vw, 2.35rem); letter-spacing: -.015em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 16px; }
a { color: var(--gold-dark); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--ink-strong); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; }

:focus-visible {
    outline: 3px solid rgba(181, 147, 90, .55);
    outline-offset: 3px;
    border-radius: 4px;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 999;
    transform: translateY(-160%);
    background: var(--ink-strong);
    color: #fff;
    padding: 10px 16px;
    border-radius: var(--radius-pill);
    transition: transform var(--transition);
}
.skip-link:focus { transform: translateY(0); color: #fff; }

.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }
.container-narrow { width: min(100% - 40px, var(--container-narrow)); margin-inline: auto; }
.section { padding: clamp(64px, 9vw, 116px) 0; }
.section-tint { background: var(--paper-warm); }
.section-soft { background: var(--paper-deep); }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p:last-child { margin-bottom: 0; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    color: var(--gold-dark);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
}
.eyebrow::before { content: ''; width: 28px; height: 1px; background: currentColor; }
.eyebrow.center::before, .eyebrow.center::after { content: ''; width: 28px; height: 1px; background: currentColor; }
.eyebrow.center { display: flex; justify-content: center; }

.display-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 7vw, 5.8rem);
    font-weight: 500;
    line-height: .98;
    letter-spacing: -.02em;
}
.display-title em { color: var(--gold-dark); font-style: italic; }
.section-title { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3rem); font-weight: 500; }
.lead { font-size: 1.08rem; line-height: 1.8; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.tiny { font-size: .72rem; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spacer { flex: 1; }
.divider { height: 1px; background: var(--line); border: 0; margin: 28px 0; }

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(253, 251, 248, .94);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(233, 223, 210, .9);
}
.site-nav {
    width: min(100% - 40px, var(--container));
    min-height: var(--header-h);
    margin-inline: auto;
    display: flex;
    align-items: center;
    gap: 28px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--ink-strong);
    font-weight: 600;
    font-size: 1.06rem;
    letter-spacing: -.01em;
    white-space: nowrap;
}
.brand:hover { color: var(--ink-strong); }
.brand-icon { width: 34px; height: 34px; flex: 0 0 34px; }
.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 50% 50% 50% 12px;
    transform: rotate(-8deg);
    background: var(--gold);
    display: grid;
    place-items: center;
    color: #fff;
    font-family: var(--font-display);
    font-size: 1.1rem;
    line-height: 1;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
}
.brand-mark span { transform: rotate(8deg); }
.brand small { display: block; font-size: .61rem; font-weight: 500; letter-spacing: .16em; color: var(--gold-dark); text-transform: uppercase; line-height: 1; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a, .nav-links .nav-static {
    position: relative;
    color: var(--muted);
    font-size: .86rem;
    font-weight: 500;
    letter-spacing: .01em;
    padding: 8px 0;
}
.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 2px;
    width: 0;
    height: 1px;
    background: var(--gold);
    transition: width var(--transition);
}
.nav-links a:hover, .nav-links a.is-active { color: var(--ink-strong); }
.nav-links a:hover::after, .nav-links a.is-active::after { width: 100%; }
.nav-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.nav-user { display: inline-flex; align-items: center; gap: 9px; font-size: .84rem; color: var(--ink); }
.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--line);
}
.avatar-fallback {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--gold-soft);
    color: var(--gold-dark);
    font-size: .72rem;
    font-weight: 700;
}
.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--ink-strong);
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    position: relative;
    z-index: 120;
    transition: background var(--transition), border-color var(--transition);
}
.nav-toggle:hover { background: var(--paper-warm); border-color: var(--line-strong); }
.page-dashboard .nav-toggle { color: #000; }
.nav-toggle-box {
    width: 20px;
    height: 14px;
    position: relative;
    display: inline-block;
}
.nav-toggle-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform .32s cubic-bezier(.2,.7,.25,1), top .32s cubic-bezier(.2,.7,.25,1), opacity .2s ease;
}
.nav-toggle-line:nth-child(1) { top: 0; }
.nav-toggle-line:nth-child(2) { top: 6px; }
.nav-toggle-line:nth-child(3) { top: 12px; }
.site-nav.is-open .nav-toggle-line:nth-child(1) { top: 6px; transform: rotate(45deg); }
.site-nav.is-open .nav-toggle-line:nth-child(2) { opacity: 0; }
.site-nav.is-open .nav-toggle-line:nth-child(3) { top: 6px; transform: rotate(-45deg); }

/* Account dropdown (shared by public header and customer workspace) */
.profile-menu { position: relative; display: inline-flex; align-items: center; }
.profile-toggle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 4px 7px;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--ink);
    font: inherit;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
}
.profile-toggle:hover { background: var(--paper-warm); border-color: var(--line); }
.profile-toggle .nav-user { white-space: nowrap; }
.profile-caret { flex: none; color: var(--muted); transition: transform var(--transition); }
.profile-menu.is-open .profile-caret { transform: rotate(180deg); }
.profile-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 90;
    min-width: 230px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
}
.profile-menu-head {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 11px 12px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--line);
}
.profile-menu-head strong { font-size: .84rem; color: var(--ink-strong); }
.profile-menu-head span { font-size: .74rem; color: var(--muted); overflow-wrap: anywhere; }
.profile-menu-head small { margin-top: 2px; font-size: .68rem; color: var(--gold-dark); font-weight: 700; }
.profile-menu-panel a,
.profile-menu-panel button {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 9px 11px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: .82rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
}
.profile-menu-panel a:hover,
.profile-menu-panel button:hover { background: var(--paper-warm); color: var(--ink-strong); }
.profile-menu-sep { height: 1px; margin: 6px 4px; background: var(--line); }
.profile-menu-panel form { margin: 0; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 42px;
    padding: 10px 20px;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    background: var(--ink-strong);
    color: #fff;
    font-size: .86rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: transform var(--transition), background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.btn:hover { color: #fff; background: #3d342b; transform: translateY(-1px); }
.btn-primary { background: var(--gold); color: #fff; box-shadow: 0 10px 26px rgba(181, 147, 90, .28); }
.btn-primary:hover { background: var(--gold-dark); color: #fff; }
.btn-secondary { background: #fff; color: var(--ink-strong); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--paper-warm); color: var(--ink-strong); border-color: var(--gold); }
.btn-ghost { background: transparent; color: var(--ink); border-color: transparent; }
.btn-ghost:hover { background: var(--paper-warm); color: var(--ink-strong); }
.btn-danger { background: var(--danger-soft); color: var(--danger); border-color: rgba(162, 61, 61, .2); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-small { min-height: 34px; padding: 7px 14px; font-size: .78rem; }
.btn-block { width: 100%; }
.btn:disabled, .btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.link-btn {
    border: 0;
    background: none;
    padding: 0;
    color: var(--gold-dark);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.btn-light { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-light:hover { background: var(--paper-warm); color: var(--ink-strong); }

/* Surfaces */
.card, .surface {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 18px; }
.card-flat { box-shadow: none; }
.card-accent { border-top: 3px solid var(--gold); }
.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 30px;
}
.page-head h1 { font-family: var(--font-display); font-size: clamp(2.2rem, 4vw, 3.2rem); font-weight: 500; }
.page-head p { margin-bottom: 0; }
.page-head .actions { display: flex; flex-wrap: wrap; gap: 10px; }
main { padding-bottom: 40px; flex: 1 0 auto; }
main > .container { padding-top: 42px; }
.app-main { min-height: calc(100vh - 360px); }
.form-inline { display: inline; margin: 0; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}
.stat span { display: block; color: var(--muted); font-size: .78rem; }
.stat strong { display: block; margin-top: 8px; font-family: var(--font-display); font-size: 2rem; font-weight: 600; line-height: 1; color: var(--ink-strong); }
.stat-note { margin-top: 5px; font-size: .72rem; color: var(--muted-light); }

.badge, .chip, .pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: var(--radius-pill);
    padding: 5px 11px;
    font-size: .72rem;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}
.badge { background: var(--gold-soft); color: var(--gold-dark); }
.chip { background: var(--paper-warm); color: var(--muted); border: 1px solid var(--line); }
.pill { background: var(--paper-warm); color: var(--ink); }
.pill-light { background: #f5f2ed; color: #5f564d; }
.pill-success, .status-active { background: var(--success-soft); color: var(--success); }
.pill-warning, .status-pending, .status-preview { background: var(--warning-soft); color: var(--warning); }
.pill-danger, .status-expired, .status-suspended, .status-deny, .status-cancel { background: var(--danger-soft); color: var(--danger); }
.pill-info, .status-draft, .status-pending_payment { background: var(--info-soft); color: var(--info); }

.alert {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
    padding: 16px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper-warm);
    font-size: .9rem;
}
.alert-success { background: var(--success-soft); border-color: rgba(47,125,91,.2); color: #205b43; }
.alert-error { background: var(--danger-soft); border-color: rgba(162,61,61,.2); color: #7d2e2e; }
.alert-warning { background: var(--warning-soft); border-color: rgba(154,100,16,.22); color: #744b0c; }
.alert .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.alert p:last-child { margin-bottom: 0; }

/* Forms */
label { display: block; font-size: .84rem; font-weight: 600; color: var(--ink); }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field-hint { font-size: .74rem; color: var(--muted); font-weight: 400; }
input, select, textarea {
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    padding: 10px 13px;
    font-size: .9rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(181, 147, 90, .14);
}
textarea { min-height: 110px; resize: vertical; }
input[type=file] { padding: 9px; }
input[type=checkbox], input[type=radio] { width: auto; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-inline { display: inline; margin: 0; }
.field-error { color: var(--danger); font-size: .76rem; }

/* Login: email/password + password visibility toggle */
.password-wrap { position: relative; }
.password-wrap input { padding-right: 48px; }
.password-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}
.password-toggle:hover { color: var(--gold-dark); background: var(--paper-warm); }
.password-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.remember-row { display: flex; align-items: center; gap: 9px; margin: 2px 0 18px; font-size: .82rem; font-weight: 500; cursor: pointer; }
.remember-row input { width: 16px; height: 16px; accent-color: var(--gold-dark); }
.divider-label { display: flex; align-items: center; gap: 12px; margin: 24px 0; color: var(--muted); font-size: .76rem; }
.divider-label::before, .divider-label::after { content: ''; height: 1px; flex: 1; background: var(--line); }

/* Tables */
.table-wrap { width: 100%; overflow-x: auto; position: relative; }
table { width: 100%; border-collapse: collapse; font-size: .85rem; }
th, td { padding: 13px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--paper-warm); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(247, 241, 232, .55); }

/* Homepage hero */
.hero {
    position: relative;
    overflow: hidden;
    min-height: clamp(560px, 86vh, 760px);
    display: flex;
    align-items: center;
    padding: clamp(120px, 16vw, 168px) 0 clamp(72px, 10vw, 104px);
    background: #1f1914;
    color: #fff;
    isolation: isolate;
}
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
}
.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 24%;
    filter: saturate(.9) brightness(.62);
}
.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(20,17,14,.34) 0%, rgba(20,17,14,.18) 35%, rgba(20,17,14,.58) 100%),
        radial-gradient(ellipse at center, rgba(20,17,14,.18) 0%, rgba(20,17,14,.52) 100%);
}
.hero-inner { position: relative; width: 100%; }
.hero-copy {
    max-width: 760px;
    margin-inline: auto;
    text-align: center;
}
.hero-copy .eyebrow-light {
    color: rgba(255,255,255,.76);
    margin-bottom: 18px;
    justify-content: center;
}
.hero-copy .eyebrow-light::before,
.hero-copy .eyebrow-light::after { background: rgba(232,217,195,.85); }
.hero-copy .eyebrow-light::after { content: ''; width: 28px; height: 1px; }
.hero-copy .display-title {
    color: #fff;
    font-size: clamp(2.6rem, 6vw, 4.6rem);
    line-height: 1.02;
    letter-spacing: -.025em;
    margin: 0 0 20px;
    text-wrap: balance;
}
.hero-copy .display-title em { color: #e8d9c3; font-style: italic; }
.hero-copy .lead {
    max-width: 560px;
    margin: 0 auto 32px;
    color: rgba(255,255,255,.86);
    font-size: clamp(.96rem, 1.5vw, 1.08rem);
    line-height: 1.75;
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.hero-actions .btn { min-width: 176px; }
.hero .btn-light {
    color: #fff;
    border-color: rgba(255,255,255,.42);
    background: rgba(255,255,255,.04);
    backdrop-filter: blur(4px);
}
.hero .btn-light:hover {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.72);
    color: #fff;
}
.hero-proof {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px 28px;
    margin: 44px auto 0;
    padding-top: 28px;
    border-top: 1px solid rgba(255,255,255,.18);
    max-width: 560px;
}
.hero-proof > div { min-width: 0; }
.hero-proof strong {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(1.55rem, 2.6vw, 2rem);
    line-height: 1;
    color: #fff;
    font-weight: 500;
}
.hero-proof span {
    display: block;
    font-size: .74rem;
    line-height: 1.45;
    color: rgba(255,255,255,.7);
    margin-top: 6px;
    letter-spacing: .01em;
}

.preview-story { background: var(--paper); }
.preview-story-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(40px, 6vw, 88px); align-items: center; }
.preview-visual {
    position: relative;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, var(--paper-warm), var(--white));
    box-shadow: var(--shadow);
}
.preview-visual > img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border-radius: 18px;
    background: var(--paper-warm);
}
.preview-visual-label {
    position: absolute;
    left: 38px;
    bottom: 38px;
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    background: rgba(255,255,255,.94);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    color: var(--gold-dark);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.preview-copy .lead { max-width: 520px; }
.check-list { display: grid; gap: 12px; list-style: none; padding: 0; margin: 0 0 28px; }
.check-list li { position: relative; padding-left: 30px; color: var(--muted); font-size: .92rem; }
.check-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 1px;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gold-soft);
    color: var(--gold-dark);
    font-size: .72rem;
    font-weight: 700;
}

.story-banner-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 24px; }
.story-banner {
    position: relative;
    display: flex;
    min-height: 520px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #3d342b;
}
.story-banner img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .7s cubic-bezier(.2,.7,.25,1);
}
.story-banner-tall img { object-position: center 22%; }
.story-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(23,20,17,.04) 0%, rgba(23,20,17,.18) 42%, rgba(23,20,17,.86) 100%);
}
.story-banner:hover img { transform: scale(1.04); }
.story-banner-content { position: relative; z-index: 2; margin-top: auto; padding: 32px; color: #fff; }
.story-banner-content h3 {
    color: #fff;
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 500;
    line-height: 1.1;
}
.story-banner-content p { margin: 0; color: rgba(255,255,255,.82); font-size: .9rem; }
.eyebrow.light { color: rgba(255,255,255,.88); }
.eyebrow.light::before, .eyebrow.light::after { background: currentColor; }

.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.feature-card {
    padding: 30px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--sand); }
.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: var(--gold-soft);
    color: var(--gold-dark);
    font-family: var(--font-display);
    font-size: 1.4rem;
    margin-bottom: 18px;
}
.feature-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.feature-card p { margin: 0; color: var(--muted); font-size: .88rem; }

.showcase-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.showcase-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: #fff;
    transition: transform var(--transition), box-shadow var(--transition);
}
.showcase-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.showcase-card img { width: 100%; height: 300px; object-fit: cover; }
.showcase-body { padding: 22px 24px 26px; }
.showcase-body h3 { margin-bottom: 6px; }
.showcase-body p { margin-bottom: 16px; color: var(--muted); font-size: .88rem; }

.steps-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; counter-reset: step; }
.step-card { position: relative; padding: 26px 22px; border-top: 1px solid var(--line-strong); }
.step-card::before {
    counter-increment: step;
    content: '0' counter(step);
    display: block;
    font-family: var(--font-display);
    font-size: 2.4rem;
    line-height: 1;
    color: var(--gold);
    margin-bottom: 14px;
}
.step-card h3 { font-size: 1rem; }
.step-card p { margin: 0; color: var(--muted); font-size: .85rem; }

.faq-list { max-width: 820px; margin-inline: auto; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 20px 44px 20px 0;
    position: relative;
    font-weight: 600;
    color: var(--ink-strong);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 8px;
    top: 18px;
    color: var(--gold-dark);
    font-size: 1.25rem;
    line-height: 1;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item p { padding-bottom: 20px; margin: 0; color: var(--muted); }

.cta-band {
    position: relative;
    overflow: hidden;
    padding: clamp(54px, 7vw, 86px) 0;
    background: var(--clay);
    color: #fff;
    text-align: center;
}
.cta-band::before, .cta-band::after {
    content: '';
    position: absolute;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 50%;
}
.cta-band::before { width: 420px; height: 420px; left: -180px; top: -240px; }
.cta-band::after { width: 320px; height: 320px; right: -130px; bottom: -200px; }
.cta-band h2 { color: #fff; font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3rem); font-weight: 500; }
.cta-band p { color: rgba(255,255,255,.82); max-width: 560px; margin: 0 auto 24px; }
.cta-band .btn { background: #fff; color: var(--clay); }
.cta-band .btn:hover { background: var(--ink-strong); color: #fff; }

/* Catalog */
.catalog-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    margin-bottom: 26px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.search-field { position: relative; flex: 1 1 260px; }
.search-field input { padding-left: 38px; }
.search-field span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted-light); }
.filter-group { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-btn {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--muted);
    border-radius: var(--radius-pill);
    padding: 7px 13px;
    font-size: .78rem;
    font-weight: 600;
    transition: all var(--transition);
}
.filter-btn:hover, .filter-btn.is-active { border-color: var(--gold); background: var(--gold-soft); color: var(--gold-dark); }
.template-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(310px, 100%), 1fr)); gap: 24px; }
.template-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}
.template-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.template-thumb { position: relative; height: 234px; overflow: hidden; background: var(--paper-deep); }
.template-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.template-card:hover .template-thumb img { transform: scale(1.035); }
.thumb-placeholder {
    width: 100%; height: 100%;
    display: grid; place-items: center;
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--gold-dark);
    background: linear-gradient(140deg, var(--paper-warm), var(--sand));
}
.template-card .status { position: absolute; top: 14px; right: 14px; background: rgba(255,255,255,.94); color: var(--success); box-shadow: var(--shadow-sm); }
.template-body { display: flex; flex-direction: column; flex: 1; gap: 12px; padding: 24px; }
.template-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.template-body h2 { font-family: var(--font-display); font-size: 1.75rem; font-weight: 600; margin: 0; }
.template-body p { margin: 0; font-size: .88rem; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.price { margin-top: auto; padding-top: 8px; font-size: 1.15rem; font-weight: 700; color: var(--ink-strong); }
.price small { display: block; font-size: .7rem; font-weight: 500; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 9px; }
.actions form { margin: 0; }
.empty-state { padding: 50px 24px; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); background: #fff; }
.empty-state h3 { font-family: var(--font-display); font-size: 1.5rem; }

/* Preview */
.preview-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 22px; }
.preview-head h1 { font-family: var(--font-display); font-size: 2.4rem; font-weight: 500; }
.preview-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius) var(--radius) 0 0;
    background: #fff;
}
.segmented { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--paper-warm); }
.segmented button { border: 0; border-radius: var(--radius-pill); padding: 7px 15px; background: transparent; color: var(--muted); font-size: .8rem; font-weight: 600; }
.segmented button.active { background: #fff; color: var(--ink-strong); box-shadow: var(--shadow-sm); }
.guest-field { display: flex; align-items: center; gap: 9px; }
.guest-field input { min-width: 190px; }
.jump-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding: 10px 16px; border: 1px solid var(--line); border-top: 0; background: var(--paper-warm); }
.jump-bar button { border: 1px solid var(--line); background: #fff; border-radius: var(--radius-pill); padding: 5px 11px; font-size: .75rem; color: var(--muted); }
.jump-bar button:hover { border-color: var(--gold); color: var(--gold-dark); }
.preview-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.preview-stage { display: flex; justify-content: center; padding: 18px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); background: #e9e2d8; }
.preview-stage iframe { width: 100%; height: min(78vh, 900px); border: 0; border-radius: 10px; background: #fff; box-shadow: var(--shadow); }
.preview-stage.mobile iframe { max-width: 420px; }
.preview-stage.mobile { padding-inline: max(18px, calc((100% - 420px) / 2)); }
.preview-info { position: sticky; top: calc(var(--header-h) + 20px); }
.preview-info .card { padding: 22px; }
.preview-info h3 { font-family: var(--font-display); font-size: 1.45rem; }
.preview-info .price { padding-top: 0; }
.preview-info .btn { width: 100%; margin-top: 8px; }

/* Login */
.login-shell { display: grid; grid-template-columns: 1fr 1fr; min-height: 620px; }
.login-visual { position: relative; overflow: hidden; background: var(--clay); display: grid; place-items: center; padding: 50px; }
.login-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .28; }
.login-visual-content { position: relative; z-index: 2; color: #fff; max-width: 420px; }
.login-visual-content h2 { font-family: var(--font-display); font-size: 2.6rem; font-weight: 500; color: #fff; }
.login-visual-content p { color: rgba(255,255,255,.85); }
.login-form-side { display: grid; place-items: center; padding: 60px 30px; }
.login-card { width: min(100%, 420px); }
.login-card h1 { font-family: var(--font-display); font-size: 2.4rem; font-weight: 500; }
.google-btn {
    width: 100%;
    min-height: 50px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-pill);
    background: #fff;
    color: var(--ink-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}
.google-btn:hover { border-color: var(--gold); color: var(--ink-strong); box-shadow: var(--shadow); transform: translateY(-1px); }
.login-note { margin-top: 20px; font-size: .76rem; color: var(--muted); text-align: center; }
.login-shell.card { padding: 0; overflow: hidden; }
.login-card .check-list,
.payment-summary .check-list { list-style: none; padding: 0; margin: 0 0 18px; }
.login-card .check-list li,
.payment-summary .check-list li { position: relative; padding-left: 24px; margin-bottom: 10px; font-size: .84rem; color: var(--muted); }
.login-card .check-list li::before,
.payment-summary .check-list li::before { content: '✓'; position: absolute; left: 0; top: 0; color: var(--gold-dark); font-weight: 700; }

/* Dashboard */
.dashboard-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 28px 30px;
    margin-bottom: 20px;
    border-radius: var(--radius-lg);
    background: linear-gradient(120deg, var(--paper-warm), #fff 65%);
    border: 1px solid var(--line);
}
.dashboard-hero h1 { font-family: var(--font-display); font-size: 2.5rem; font-weight: 500; margin-bottom: 4px; }
.dashboard-hero p { margin: 0; }
.reminder { align-items: center; background: var(--warning-soft); border-color: rgba(154,100,16,.24); }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 28px 0 14px; }
.section-heading h2 { font-family: var(--font-display); font-size: 1.8rem; font-weight: 600; margin: 0; }
.invitation-list { display: flex; flex-direction: column; gap: 12px; }
.invitation-item {
    display: grid;
    grid-template-columns: 76px minmax(220px, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.invitation-item:hover { border-color: var(--sand); box-shadow: var(--shadow-sm); }
.invitation-thumb { width: 76px; height: 76px; border-radius: 12px; overflow: hidden; background: linear-gradient(140deg, var(--paper-warm), var(--sand)); display: grid; place-items: center; color: var(--gold-dark); font-family: var(--font-display); font-size: 1.6rem; }
.invitation-thumb img { width: 100%; height: 100%; object-fit: cover; }
.invitation-main { min-width: 0; }
.invitation-main strong { display: block; font-size: 1rem; color: var(--ink-strong); }
.invitation-main .meta { font-size: .8rem; color: var(--muted); }
.invitation-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.invitation-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.share-menu { position: relative; }
.share-menu summary { list-style: none; }
.share-menu summary::-webkit-details-marker { display: none; }
.share-popover { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 170px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.share-popover a, .share-popover button { display: block; width: 100%; padding: 9px 11px; border: 0; border-radius: 8px; background: none; color: var(--ink); text-align: left; font-size: .82rem; }
.share-popover a:hover, .share-popover button:hover { background: var(--paper-warm); }

/* Payments */
.payment-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr); gap: 24px; align-items: start; }
.payment-summary { position: sticky; top: calc(var(--header-h) + 20px); }
.payment-summary .price { font-family: var(--font-display); font-size: 2.6rem; line-height: 1; margin: 10px 0 18px; }
.payment-summary dl { display: grid; grid-template-columns: 130px 1fr; gap: 10px 16px; margin: 0; font-size: .85rem; }
.payment-summary dt { color: var(--muted); }
.payment-summary dd { margin: 0; font-weight: 600; }
.payment-steps { counter-reset: pay; list-style: none; padding: 0; margin: 0; }
.payment-steps li { position: relative; padding: 0 0 22px 48px; counter-increment: pay; }
.payment-steps li::before { content: counter(pay); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--gold-soft); color: var(--gold-dark); font-weight: 700; font-size: .8rem; }
.payment-steps li:not(:last-child)::after { content: ''; position: absolute; left: 14px; top: 34px; bottom: 4px; width: 1px; background: var(--line); }
.payment-steps strong { display: block; }
.payment-steps span { color: var(--muted); font-size: .86rem; }
.status-timeline { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.status-step { padding: 8px 13px; border-radius: var(--radius-pill); border: 1px solid var(--line); color: var(--muted); font-size: .75rem; font-weight: 600; }
.status-step.done { background: var(--success-soft); border-color: rgba(47,125,91,.2); color: var(--success); }
.status-step.current { background: var(--gold-soft); border-color: var(--gold); color: var(--gold-dark); }
.details { display: grid; grid-template-columns: 170px 1fr; gap: 10px 18px; margin: 0 0 22px; }
.details dt { color: var(--muted); font-size: .84rem; }
.details dd { margin: 0; font-weight: 600; font-size: .88rem; }
.method-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 20px 0; }
.method-option {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px 16px 14px 44px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}
.method-option:hover { border-color: var(--sand); }
.method-option:has(input:checked) { border-color: var(--gold); background: var(--gold-soft); box-shadow: 0 0 0 3px rgba(181,147,90,.12); }
.method-option input { position: absolute; left: 16px; top: 18px; width: 16px; height: 16px; accent-color: var(--gold-dark); }
.method-name { font-size: .88rem; font-weight: 600; color: var(--ink-strong); }
.method-note { font-size: .72rem; color: var(--muted); }
.payment-reference {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
    margin: 22px 0;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    background: var(--paper);
}
.payment-reference strong { display: block; margin: 4px 0; font-size: 1.28rem; letter-spacing: .04em; color: var(--ink-strong); }
.payment-countdown {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 18px;
    margin: -6px 0 22px;
    border: 1px solid var(--gold);
    border-radius: var(--radius);
    background: var(--gold-soft);
}
.payment-countdown strong { display: block; margin-top: 4px; font-size: 1.55rem; letter-spacing: .08em; color: var(--gold-dark); font-variant-numeric: tabular-nums; }
.payment-countdown.is-expired { border-color: rgba(162,61,61,.25); background: var(--danger-soft); }
.payment-countdown.is-expired strong { color: var(--danger); }
.qr-panel { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 20px 0; }
.qr-panel img { width: 220px; height: 220px; object-fit: contain; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.instruction-steps { margin: 18px 0 0; padding-left: 22px; color: var(--muted); font-size: .86rem; }
.instruction-steps li { margin-bottom: 8px; }

/* Editor */
.editor-shell { width: min(100% - 32px, 1480px); margin-inline: auto; padding-top: 24px; }
.editor-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    margin-bottom: 16px;
}
.editor-top h1 { font-family: var(--font-display); font-size: 1.7rem; font-weight: 500; margin: 0; }
.editor-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--muted); font-size: .78rem; }
.editor-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.editor-save-state { font-size: .76rem; color: var(--muted); min-width: 120px; }
.editor-grid { display: grid; grid-template-columns: minmax(360px, .9fr) minmax(0, 1.1fr); gap: 16px; align-items: start; }
.editor-panel, .editor-preview {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    overflow: hidden;
}
.editor-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 10px; border-bottom: 1px solid var(--line); background: var(--paper-warm); }
.editor-tabs button { border: 0; border-radius: var(--radius-pill); padding: 7px 13px; background: transparent; color: var(--muted); font-size: .78rem; font-weight: 600; }
.editor-tabs button.active { background: #fff; color: var(--gold-dark); box-shadow: var(--shadow-sm); }
.editor-body { padding: 24px; max-height: calc(100vh - 230px); overflow-y: auto; }
.editor-section { display: none; }
.editor-section.active { display: block; }
.editor-section h2 { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; }
.field-help { padding: 12px 14px; margin-bottom: 18px; border-radius: 10px; background: var(--paper-warm); color: var(--muted); font-size: .8rem; }
.repeater-item { position: relative; padding: 18px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.repeater-item .remove-row { position: absolute; top: 12px; right: 14px; }
.upload-preview { max-width: 120px; max-height: 90px; border-radius: 8px; border: 1px solid var(--line); }
.editor-preview-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--paper-warm); }
.editor-preview-stage { padding: 16px; background: #e9e2d8; }
.editor-preview-stage iframe { width: 100%; height: calc(100vh - 190px); min-height: 560px; border: 0; border-radius: 10px; background: #fff; box-shadow: var(--shadow); }
.editor-preview-stage.mobile iframe { max-width: 420px; margin-inline: auto; }
.editor-feedback { margin-bottom: 12px; }

/* Form-only invitation editor */
.editor-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 24px;
    margin-bottom: 16px;
}
.editor-head-main { min-width: 0; }
.editor-head-main h1 {
    margin: 6px 0 10px;
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 600;
    line-height: 1.05;
}
.editor-head .editor-meta { margin-top: 4px; }
.editor-workspace { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; align-items: start; }
.editor-nav { position: sticky; top: calc(var(--header-h, 72px) + 16px); padding: 14px; min-width: 0; }
.editor-nav-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.editor-nav-list { display: flex; flex-direction: column; gap: 3px; }
.editor-nav-list button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 11px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: .82rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}
.editor-nav-list button span { flex: none; font-size: .7rem; letter-spacing: .08em; color: var(--muted-light); }
.editor-nav-list button:hover { background: var(--paper-warm); color: var(--ink); }
.editor-nav-list button.is-active { background: var(--gold-soft); color: var(--gold-dark); }
.editor-nav-list button.is-active span { color: var(--gold-dark); }
.editor-nav-note { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .75rem; color: var(--muted); }
.editor-nav-note strong { display: block; margin-bottom: 4px; color: var(--ink); }
.editor-nav-note p { margin: 0; }
.editor-content { padding: 24px; min-width: 0; }
.editor-section { display: none; }
.editor-section.is-active, .editor-section.active { display: block; animation: fadeUp .25s ease both; }
.editor-section > .section-head { max-width: none; margin-bottom: 18px; }
.editor-section > .section-head h2 { margin: 4px 0 6px; }
.editor-section h2 { font-family: var(--font-display); font-size: 1.8rem; font-weight: 600; }
.editor-section h3 { font-size: 1rem; color: var(--ink-strong); }
.editor-section h4 { font-size: .9rem; color: var(--ink-strong); }
.subsection-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px 16px;
    margin: 26px 0 12px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}
.subsection-head h3 { margin: 0; }
.subsection-head p { margin: 0; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.field-grid .span-2 { grid-column: 1 / -1; }
.editor-content label { display: flex; flex-direction: column; gap: 6px; font-size: .8rem; font-weight: 600; }
.editor-content label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
.editor-content label.inline-field { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
.editor-content label.inline-field input { width: 84px; }
.field-help-inline { font-size: .73rem; color: var(--muted); font-weight: 400; line-height: 1.5; }
.field-help-inline code { font-size: .72rem; }
.section-toggle { margin: 4px 0 14px; }
.person-block, .media-block {
    padding: 18px;
    margin-bottom: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
}
.person-block .field-grid { margin-top: 14px; }
.person-head, .background-slot-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}
.person-head h3, .media-block > h3 { margin: 0 0 4px; }
.upload-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px; }
.upload-control { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.thumb {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--paper-warm);
}
.thumb.portrait { width: 80px; height: 104px; }
.thumb-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.thumb-grid .thumb { width: 72px; height: 72px; }
.file-label { display: flex; flex-direction: column; gap: 6px; }
.file-label input[type=file] { max-width: 100%; }
.background-slot { padding: 14px; margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.repeat-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.repeat-row { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.repeat-row.compact-row { display: grid; grid-template-columns: minmax(0, 2fr) 110px auto; gap: 10px; align-items: end; }
.row-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.row-head strong { font-size: .82rem; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.link-btn { border: 0; background: none; padding: 0; color: var(--danger); font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer; }
.add-row { margin-top: 4px; }
.feature-note {
    padding: 14px 16px;
    border: 1px dashed var(--line-strong);
    border-radius: 12px;
    background: var(--paper);
    color: var(--muted);
    font-size: .84rem;
}
.visibility-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.new-upload-block { margin-top: 18px; padding: 16px; border: 1px dashed var(--line-strong); border-radius: 12px; background: var(--paper); }
.new-upload-block h4 { margin: 0 0 10px; }
.slug-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.slug-prefix {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-right: 0;
    border-radius: 10px 0 0 10px;
    background: var(--paper-warm);
    color: var(--muted);
    font-size: .82rem;
    white-space: nowrap;
}
.slug-row input { flex: 1 1 180px; border-radius: 0; }
.slug-row .btn { border-radius: 0 10px 10px 0; }
.copy-field { display: flex; gap: 8px; }
.copy-field input { flex: 1; min-width: 0; }
.copy-field .btn { flex: none; }
.whatsapp-preview { margin-top: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--success-soft); }
.whatsapp-preview strong { display: block; margin-bottom: 6px; }
.whatsapp-preview a { color: var(--success); font-weight: 600; }
.music-preview { width: 100%; margin-top: 12px; }
.editor-savebar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}
.editor-savebar strong { display: block; }
.readonly-pane { padding: 24px 4px; }
.readonly-pane h2 { margin-bottom: 8px; }

@media (max-width: 980px) {
    .editor-workspace { grid-template-columns: 1fr; }
    .editor-nav { position: static; }
    .editor-nav-list { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; scrollbar-width: thin; }
    .editor-nav-list button { width: auto; flex: none; white-space: nowrap; }
    .editor-nav-note { display: none; }
}

@media (max-width: 640px) {
    .editor-head { padding: 18px; }
    .editor-actions { width: 100%; margin-left: 0; }
    .editor-actions .btn { flex: 1 1 auto; }
    .editor-content { padding: 18px; }
    .field-grid, .visibility-grid { grid-template-columns: 1fr; }
    .repeat-row.compact-row { grid-template-columns: 1fr; }
    .slug-prefix { border-right: 1px solid var(--line); border-radius: 10px; }
    .slug-row input { border-radius: 10px; }
    .slug-row .btn { border-radius: 10px; }
    .copy-field { flex-direction: column; }
    .copy-field .btn { width: 100%; }
}

/* Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(23,20,17,.55);
    backdrop-filter: blur(4px);
}
.modal-backdrop.is-open { display: flex; }
.modal {
    width: min(100%, 480px);
    padding: 28px;
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow-lg);
}
.modal h2 { font-family: var(--font-display); font-size: 1.8rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* Footer */
.site-footer { margin-top: auto; padding: 62px 0 26px; background: #4a3c2f; color: rgba(255,255,255,.72); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 34px; margin-bottom: 44px; }
.site-footer .brand { color: #fff; }
.site-footer .brand small { color: var(--sand); }
.site-footer .brand-mark { background: var(--gold); }
.site-footer h3 { color: #fff; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer p { font-size: .86rem; max-width: 320px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li + li { margin-top: 9px; }
.site-footer a { color: rgba(255,255,255,.76); font-size: .86rem; }
.site-footer a:hover { color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.14); font-size: .76rem; }

.toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 200;
    max-width: 320px;
    padding: 13px 18px;
    border-radius: var(--radius-pill);
    background: var(--ink-strong);
    color: #fff;
    font-size: .82rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: all var(--transition);
}
.toast.is-visible { opacity: 1; transform: translateY(0); }

@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.reveal { animation: fadeUp .6s ease both; }

@media (max-width: 1024px) {
    .hero { min-height: clamp(520px, 72vh, 680px); padding: 124px 0 72px; }
    .hero-bg img { object-position: center 22%; }
    .hero-overlay {
        background:
            linear-gradient(180deg, rgba(20,17,14,.34) 0%, rgba(20,17,14,.22) 40%, rgba(20,17,14,.62) 100%),
            radial-gradient(ellipse at center, rgba(20,17,14,.14) 0%, rgba(20,17,14,.48) 100%);
    }
    .hero-copy { max-width: 680px; }
    .hero-proof { max-width: 520px; }
    .preview-story-grid { grid-template-columns: 1fr; }
    .preview-visual { max-width: 620px; margin-inline: auto; }
    .preview-copy { max-width: 720px; }
    .story-banner-grid { grid-template-columns: 1fr; }
    .story-banner { min-height: 420px; }
    .feature-grid, .steps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .preview-layout, .payment-layout { grid-template-columns: 1fr; }
    .preview-info, .payment-summary { position: static; }
    .editor-grid { grid-template-columns: 1fr; }
    .editor-preview-stage iframe { height: 70vh; }
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
    .site-nav { gap: 12px; }
    .brand { position: relative; z-index: 120; }
    .nav-toggle { display: inline-flex; order: 3; }
    .nav-actions { margin-left: auto; position: relative; z-index: 120; order: 2; }
    .nav-actions .profile-name, .nav-actions > form { display: none; }
    .nav-actions > .btn { min-height: 34px; padding: 7px 12px; font-size: .76rem; }

    .nav-links {
        display: flex;
        position: fixed;
        inset: 0;
        z-index: 110;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 96px 24px 48px;
        background: rgba(253, 251, 248, .98);
        backdrop-filter: blur(18px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .35s ease, visibility .35s ease;
    }
    .nav-links a, .nav-links .nav-static {
        font-size: clamp(1.1rem, 4.8vw, 1.5rem);
        font-weight: 500;
        color: var(--ink-strong);
        padding: 10px 16px;
        letter-spacing: .01em;
        transform: translateY(12px);
        transition: color var(--transition), transform .35s ease, opacity .35s ease;
        opacity: 0;
    }
    .nav-links a::after { bottom: 4px; }
    .site-nav.is-open .nav-links {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    .site-nav.is-open .nav-links a,
    .site-nav.is-open .nav-links .nav-static {
        opacity: 1;
        transform: translateY(0);
    }
    .site-nav.is-open .nav-links a:nth-child(1) { transition-delay: .05s; }
    .site-nav.is-open .nav-links a:nth-child(2) { transition-delay: .1s; }
    .site-nav.is-open .nav-links a:nth-child(3) { transition-delay: .15s; }
    .site-nav.is-open .nav-links a:nth-child(4) { transition-delay: .2s; }
    .site-nav.is-open .nav-links a:nth-child(5) { transition-delay: .25s; }
    .site-nav.is-open .nav-actions { opacity: 0; pointer-events: none; }
    body.nav-open { overflow: hidden; }
    body.nav-open .site-header { z-index: 115; backdrop-filter: none; -webkit-backdrop-filter: none; }

    .showcase-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .login-shell { grid-template-columns: 1fr; }
    .login-visual { min-height: 260px; }
    .login-form-side { padding: 46px 20px; }
    .invitation-item { grid-template-columns: 62px 1fr; }
    .invitation-thumb { width: 62px; height: 62px; }
    .invitation-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

@media (max-width: 640px) {
    .container, .site-nav { width: min(100% - 28px, var(--container)); }
    h1 { font-size: 2rem; }
    .page-head, .preview-head, .dashboard-hero { flex-direction: column; align-items: flex-start; }
    .page-head .actions { width: 100%; }
    .feature-grid, .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .steps-grid, .showcase-grid, .template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

    .step-card { padding: 20px 14px; }
    .step-card::before { font-size: 1.9rem; margin-bottom: 10px; }
    .step-card h3 { font-size: .92rem; margin-bottom: 6px; }
    .step-card p { font-size: .78rem; line-height: 1.55; }

    .showcase-card img { height: 160px; }
    .showcase-body { padding: 14px; }
    .showcase-body .row { gap: 6px; margin-bottom: 8px; }
    .showcase-body h3 { font-size: .98rem; margin-bottom: 4px; }
    .showcase-body p { font-size: .76rem; line-height: 1.5; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
    .showcase-body .actions { gap: 6px; }
    .showcase-body .actions .btn,
    .showcase-body .actions .link-btn { width: 100%; justify-content: center; text-align: center; }
    .showcase-body .actions .btn-small { min-height: 32px; padding: 6px 10px; font-size: .72rem; }
    .showcase-body .link-btn { font-size: .72rem; }

    .template-thumb { height: 150px; }
    .template-body { padding: 14px; gap: 8px; }
    .template-body h2 { font-size: 1.15rem; line-height: 1.2; }
    .template-body p { font-size: .76rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
    .template-meta { gap: 6px; flex-wrap: wrap; }
    .template-body .actions { gap: 6px; }
    .template-body .actions .btn { width: 100%; }
    .template-body .actions .btn-small { min-height: 32px; padding: 6px 10px; font-size: .72rem; }
    .template-body .price { font-size: 1rem; }
    .form-row, .method-grid { grid-template-columns: 1fr; }
    .card, .surface { padding: 20px; }
    .hero { min-height: 560px; padding: 116px 0 56px; align-items: flex-end; }
    .hero-bg img { object-position: center 20%; filter: saturate(.88) brightness(.56); }
    .hero-overlay {
        background:
            linear-gradient(180deg, rgba(20,17,14,.24) 0%, rgba(20,17,14,.46) 38%, rgba(20,17,14,.78) 100%);
    }
    .hero-copy { max-width: 100%; }
    .hero-copy .eyebrow-light { margin-bottom: 14px; }
    .hero-copy .display-title { margin-bottom: 16px; }
    .hero-copy .lead { margin-bottom: 24px; max-width: 100%; font-size: .96rem; }
    .hero-actions { flex-direction: column; align-items: stretch; gap: 10px; }
    .hero-actions .btn { width: 100%; min-width: 0; }
    .hero-proof {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px 16px;
        margin-top: 28px;
        padding-top: 20px;
        max-width: 100%;
    }
    .hero-proof strong { font-size: 1.45rem; }
    .hero-proof span { font-size: .7rem; }
    .preview-visual { padding: 10px; }
    .preview-visual-label { left: 22px; bottom: 22px; }
    .story-banner { min-height: 360px; }
    .story-banner-content { padding: 24px; }
    .preview-stage.mobile { padding-inline: 12px; }
    .guest-field { width: 100%; }
    .guest-field input { flex: 1; min-width: 0; }
    .editor-top { align-items: flex-start; }
    .editor-actions { width: 100%; margin-left: 0; }
    .editor-body { padding: 18px; }
    .details, .payment-summary dl { grid-template-columns: 1fr; gap: 4px; }
    .details dd, .payment-summary dd { margin-bottom: 10px; }
    .payment-countdown { align-items: flex-start; flex-direction: column; gap: 6px; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .footer-bottom { flex-direction: column; }
    .cta-band p { margin-inline: auto; }
    .alert { flex-direction: column; }
}

@media (max-width: 480px) {
    .brand small { display: none; }
    .nav-actions > .btn { padding: 7px 10px; }
}

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

/* Share helper */
.page-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.is-disabled { opacity: .55; pointer-events: none; }
.template-card.is-current { outline: 2px solid var(--gold); outline-offset: 2px; }
.share-page { padding-top: 28px; }
.share-grid { display: block; max-width: 760px; }
.share-card { padding: 24px; }
.share-card h2 { margin-bottom: 6px; font-family: var(--font-display); font-size: 1.55rem; }
.share-guest-field { display: flex; flex-direction: column; gap: 6px; margin: 18px 0 14px; }
.share-link-block { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; padding-top: 18px; border-top: 1px solid var(--line); }
.field-label { font-size: .78rem; font-weight: 600; }
.link-inline { font-size: .8rem; font-weight: 600; }
.share-message-field { display: flex; flex-direction: column; gap: 6px; margin: 14px 0 10px; }
.share-message-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.share-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.share-actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.share-actions .btn svg { width: 18px; height: 18px; flex: none; }
.btn-link { border: 0; background: none; padding: 0; color: var(--ink); font: inherit; font-size: .8rem; font-weight: 600; text-align: left; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.btn-link-danger { border: 0; background: none; padding: 0; color: var(--danger); font: inherit; font-size: .8rem; font-weight: 600; text-align: left; cursor: pointer; }

@media (max-width: 640px) {
    .share-card { padding: 20px; }
    .share-actions .btn { flex: 1 1 100%; }
}

