:root {
    --ink: #2f2840;
    --muted: #746d7e;
    --surface: #ffffff;
    --surface-soft: #fff9f4;
    --line: #eadfe7;
    --primary: #7c3f78;
    --primary-dark: #5f2c5b;
    --accent: #f1a84c;
    --accent-soft: #fff0d9;
    --success: #2d8a66;
    --danger: #b54752;
    --shadow: 0 18px 50px rgba(71, 42, 69, 0.12);
    --radius: 24px;
    --radius-small: 15px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-width: 320px;
    color: var(--ink);
    background:
        radial-gradient(circle at 6% 4%, rgba(241, 168, 76, 0.15), transparent 23rem),
        radial-gradient(circle at 94% 14%, rgba(124, 63, 120, 0.12), transparent 28rem),
        #fbf8fb;
    line-height: 1.6;
}

button, input { font: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.shell { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }

.site-header {
    background: rgba(255, 255, 255, 0.86);
    border-bottom: 1px solid rgba(234, 223, 231, 0.9);
    backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 50;
}
.header-inner { min-height: 82px; display: flex; align-items: center; }
.brand { display: inline-flex; align-items: center; gap: 13px; text-decoration: none; }
.brand-mark {
    width: 48px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 900;
    border-radius: 15px 20px 15px 20px;
    background: linear-gradient(135deg, var(--primary), #a75c8f);
    box-shadow: 0 8px 18px rgba(124, 63, 120, 0.28);
    transform: rotate(-3deg);
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1.08rem; letter-spacing: .01em; }
.brand small { color: var(--muted); font-size: .78rem; }

.page-shell { padding-block: 32px 54px; }
.wizard-progress {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 24px;
}
.progress-step {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 12px;
    border-radius: 14px;
    background: rgba(255,255,255,.7);
    border: 1px solid var(--line);
    color: var(--muted);
    text-decoration: none;
    font-size: .86rem;
    font-weight: 700;
}
.progress-number {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #f2edf2;
    color: var(--primary);
}
.progress-step.is-complete { color: var(--success); }
.progress-step.is-complete .progress-number { background: #e2f3ec; color: var(--success); }
.progress-step.is-current { border-color: rgba(124,63,120,.35); color: var(--primary); background: #fff; box-shadow: 0 7px 20px rgba(71,42,69,.07); }
.progress-step.is-current .progress-number { background: var(--primary); color: #fff; }
.progress-step.is-disabled { opacity: .55; }
.progress-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.hero-card,
.wizard-card,
.how-it-works {
    background: rgba(255,255,255,.94);
    border: 1px solid rgba(234, 223, 231, .9);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.hero-card {
    min-height: 520px;
    padding: clamp(30px, 6vw, 72px);
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    align-items: center;
    gap: 48px;
    overflow: hidden;
    position: relative;
}
.hero-card::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    right: -110px;
    bottom: -130px;
    background: rgba(241,168,76,.18);
}
.eyebrow {
    display: inline-block;
    color: var(--primary);
    font-size: .76rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-weight: 900;
    margin-bottom: 8px;
}
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(2.2rem, 5vw, 4.6rem); line-height: 1.02; margin-bottom: 22px; letter-spacing: -.045em; }
h2 { line-height: 1.15; }
.lead { max-width: 650px; font-size: clamp(1.02rem, 2vw, 1.22rem); color: var(--muted); }
.hero-actions, .wizard-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-actions { margin-top: 30px; }
.hero-actions form, .summary-actions form { margin: 0; }

.button {
    appearance: none;
    border: 0;
    border-radius: 999px;
    padding: 12px 20px;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 800;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.button:hover { transform: translateY(-2px); }
.button:focus-visible { outline: 3px solid rgba(241,168,76,.6); outline-offset: 3px; }
.button-primary { color: #fff; background: linear-gradient(135deg, var(--primary), #a2568d); box-shadow: 0 10px 22px rgba(124,63,120,.28); }
.button-primary:hover { box-shadow: 0 14px 28px rgba(124,63,120,.34); }
.button-secondary { color: var(--primary); background: #f4edf3; }
.button-danger { color: var(--danger); background: #fcecee; }
.button-large { min-height: 56px; padding-inline: 28px; }

.hero-visual { min-height: 340px; position: relative; perspective: 1000px; }
.book-shape {
    position: absolute;
    width: 54%;
    height: 80%;
    top: 10%;
    border: 9px solid #fff;
    box-shadow: 0 24px 50px rgba(66,36,64,.2);
    background: #f9dc97;
    overflow: hidden;
}
.book-left { left: 2%; border-radius: 28px 10px 10px 28px; transform: rotateY(10deg) rotate(-4deg); background: #b6ddd1; }
.book-right { right: 2%; border-radius: 10px 28px 28px 10px; transform: rotateY(-10deg) rotate(4deg); background: #b6ddd1; }
.decor { position: absolute; display: grid; place-items: center; border-radius: 50%; color: #fff; }
.flower { width: 92px; height: 92px; left: 14%; top: 17%; font-size: 4rem; color: #db6d87; }
.star { width: 75px; height: 75px; right: 10%; top: 40%; background: #f4b53f; font-size: 2.2rem; }
.heart { width: 78px; height: 78px; left: 18%; bottom: 10%; background: #8f6bb0; font-size: 2.1rem; }

.how-it-works { padding: 30px; margin-top: 24px; display: grid; grid-template-columns: .75fr 1.7fr; gap: 30px; align-items: center; }
.how-it-works h2 { margin-bottom: 0; font-size: clamp(1.6rem, 3vw, 2.4rem); }
.mini-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.mini-steps article { padding: 18px; background: var(--surface-soft); border-radius: var(--radius-small); border: 1px solid #f1e6dc; }
.mini-steps article > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: #9a5a05; font-weight: 900; margin-bottom: 10px; }
.mini-steps strong { display: block; }
.mini-steps p { color: var(--muted); margin: 5px 0 0; font-size: .9rem; }

.wizard-card { padding: clamp(20px, 4vw, 42px); }
.wizard-heading, .summary-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 30px; margin-bottom: 28px; }
.wizard-heading h1, .summary-heading h1 { font-size: clamp(2rem, 4vw, 3.6rem); margin-bottom: 12px; }
.wizard-heading p, .summary-heading p { color: var(--muted); margin-bottom: 0; }
.selection-counter, .success-badge { flex: 0 0 auto; border-radius: 999px; padding: 10px 15px; font-size: .92rem; font-weight: 800; }
.selection-counter { background: var(--accent-soft); color: #85520e; }
.success-badge { background: #e5f5ee; color: var(--success); }

.selection-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}
.selection-item { min-width: 0; }
.selection-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.selection-card {
    height: 100%;
    display: block;
    cursor: pointer;
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    border: 2px solid transparent;
    box-shadow: 0 8px 22px rgba(52,34,51,.09);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, opacity .18s ease;
}
.selection-card:hover { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(52,34,51,.14); }
.selection-input:focus-visible + .selection-card { outline: 3px solid rgba(241,168,76,.7); outline-offset: 3px; }
.selection-image-wrap { display: block; position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #f3edf1; }
.selection-image { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.selection-card:hover .selection-image { transform: scale(1.025); }
.selection-check {
    position: absolute;
    top: 11px;
    right: 11px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 5px 14px rgba(45,138,102,.32);
    opacity: 0;
    transform: scale(.65);
    transition: opacity .18s ease, transform .18s ease;
}
.selection-caption { display: flex; gap: 8px; align-items: baseline; padding: 13px 15px 15px; color: var(--muted); font-size: .9rem; }
.selection-caption strong { color: var(--ink); font-size: 1rem; }
.selection-item.is-selected .selection-card { border-color: var(--success); box-shadow: 0 12px 28px rgba(45,138,102,.19); }
.selection-item.is-selected .selection-check { opacity: 1; transform: scale(1); }
.selection-item.is-limit-disabled .selection-card { opacity: .46; cursor: not-allowed; }
.selection-message { min-height: 25px; color: var(--danger); font-weight: 700; margin: 16px 0 0; }
.wizard-actions { justify-content: space-between; padding-top: 25px; margin-top: 12px; border-top: 1px solid var(--line); }
.sticky-actions { position: sticky; bottom: 12px; z-index: 20; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.92); backdrop-filter: blur(12px); box-shadow: 0 10px 30px rgba(47,40,64,.12); }

.alert { padding: 15px 18px; border-radius: 14px; margin-bottom: 22px; }
.alert-error { background: #fff0f1; color: #8f2d39; border: 1px solid #f4cbd0; }
.alert ul { margin: 7px 0 0; padding-left: 20px; }

.summary-card { padding-bottom: 30px; }
.summary-section { padding: 26px 0; border-top: 1px solid var(--line); }
.summary-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.summary-section-heading > div { display: flex; align-items: center; gap: 12px; }
.summary-section-heading span { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 50%; background: #f2e8f0; color: var(--primary); font-size: .78rem; font-weight: 900; }
.summary-section-heading h2 { margin: 0; font-size: 1.35rem; }
.summary-section-heading a { color: var(--primary); font-weight: 800; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.summary-grid-single { grid-template-columns: minmax(0, 260px); }
.summary-item { overflow: hidden; border-radius: 15px; background: var(--surface-soft); border: 1px solid #eee1d8; }
.summary-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.summary-item div { padding: 10px 12px; color: var(--muted); font-size: .88rem; }
.summary-item strong { color: var(--ink); }
.summary-actions { justify-content: flex-start; }

.site-footer { border-top: 1px solid var(--line); background: rgba(255,255,255,.7); color: var(--muted); }
.footer-inner { min-height: 76px; display: flex; justify-content: space-between; align-items: center; gap: 20px; font-size: .84rem; }

@media (max-width: 980px) {
    .wizard-progress { grid-template-columns: repeat(5, 1fr); }
    .progress-step { justify-content: center; }
    .progress-label { display: none; }
    .hero-card { grid-template-columns: 1fr; }
    .hero-visual { min-height: 300px; width: min(520px, 100%); justify-self: center; }
    .how-it-works { grid-template-columns: 1fr; }
    .selection-grid, .summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    .shell { width: min(100% - 20px, 1180px); }
    .page-shell { padding-top: 18px; }
    .header-inner { min-height: 70px; }
    .brand small { display: none; }
    .wizard-progress { gap: 5px; margin-bottom: 14px; }
    .progress-step { padding: 7px; border-radius: 11px; }
    .progress-number { width: 25px; height: 25px; }
    .hero-card { min-height: auto; padding: 28px 22px; gap: 24px; }
    .hero-visual { min-height: 230px; }
    .book-shape { border-width: 6px; }
    .flower { width: 65px; height: 65px; font-size: 3rem; }
    .star, .heart { width: 55px; height: 55px; font-size: 1.5rem; }
    .mini-steps { grid-template-columns: 1fr; }
    .wizard-heading, .summary-heading { display: block; }
    .selection-counter, .success-badge { display: inline-block; margin-top: 16px; }
    .selection-grid, .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
    .selection-caption { padding: 10px; }
    .wizard-actions { align-items: stretch; }
    .wizard-actions .button, .wizard-actions form, .wizard-actions form .button { width: 100%; }
    .summary-grid-single { grid-template-columns: minmax(0, 1fr); }
    .footer-inner { flex-direction: column; justify-content: center; padding-block: 18px; gap: 3px; }
}

@media (max-width: 420px) {
    .selection-grid { grid-template-columns: 1fr; }
}

@media print {
    .site-header, .wizard-progress, .summary-actions, .site-footer { display: none !important; }
    body { background: #fff; }
    .page-shell { padding: 0; }
    .wizard-card { box-shadow: none; border: 0; }
}
