:root {
    --ink: #172033;
    --muted: #637083;
    --line: #dfe5ee;
    --surface: #ffffff;
    --surface-soft: #f6f8fc;
    --primary: #3157d5;
    --primary-dark: #2444ad;
    --accent: #7b61ff;
    --success: #16794d;
    --danger: #b42318;
    --shadow: 0 24px 60px rgba(28, 40, 72, 0.12);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--surface-soft);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

a {
    color: inherit;
}

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

img {
    max-width: 100%;
}

.shell {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.narrow-shell {
    width: min(760px, calc(100% - 40px));
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    padding: 0 max(24px, calc((100vw - 1180px) / 2));
    border-bottom: 1px solid rgba(223, 229, 238, 0.8);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(18px);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-size: 1.1rem;
    font-weight: 800;
    text-decoration: none;
}

.logo-mark {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.main-nav > a:not(.button) {
    color: var(--muted);
    font-weight: 600;
    text-decoration: none;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 22px;
    border: 1px solid var(--primary);
    border-radius: 14px;
    background: var(--primary);
    color: white;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
    transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.button:hover {
    transform: translateY(-1px);
    background: var(--primary-dark);
    box-shadow: 0 12px 30px rgba(49, 87, 213, 0.22);
}

.button-small {
    min-height: 42px;
    padding-inline: 17px;
}

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

.button-secondary:hover {
    background: #eef2f8;
    box-shadow: none;
}

.button-light {
    border-color: white;
    background: white;
    color: var(--primary-dark);
}

.button-full {
    width: 100%;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.text-link,
.text-button {
    border: 0;
    background: transparent;
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.hero {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 70px;
    min-height: calc(100vh - 76px);
    padding-block: 86px;
}

.eyebrow {
    margin: 0 0 16px;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 24px;
    font-size: clamp(3rem, 7vw, 5.8rem);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero-text,
.form-intro,
.section-heading > p {
    max-width: 650px;
    color: var(--muted);
    font-size: 1.16rem;
}

.hero-copy .button-row {
    margin-top: 34px;
}

.hero-notes {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-top: 30px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 650;
}

.hero-notes span::before {
    content: "✓";
    margin-right: 7px;
    color: var(--success);
}

.hero-visual {
    position: relative;
    min-height: 600px;
}

.phone-card {
    position: absolute;
    inset: 20px 54px 20px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 58px 42px;
    border: 10px solid #172033;
    border-radius: 48px;
    background:
        radial-gradient(circle at 80% 20%, rgba(255,255,255,.65), transparent 25%),
        linear-gradient(145deg, #dfe8ff, #f6e8ff 62%, #fff1dc);
    box-shadow: var(--shadow);
    text-align: center;
}

.phone-top {
    position: absolute;
    top: 17px;
    left: 50%;
    width: 88px;
    height: 18px;
    transform: translateX(-50%);
    border-radius: 20px;
    background: #172033;
}

.phone-card h2 {
    margin-bottom: 10px;
}

.mini-label {
    margin-bottom: 8px;
    color: var(--muted);
    font-weight: 700;
}

.mini-confetti {
    margin-bottom: 18px;
    color: var(--primary);
    font-size: 1.4rem;
}

.gift-chip {
    align-self: center;
    margin-top: 18px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,.75);
    font-size: 0.85rem;
    font-weight: 750;
}

.qr-tile {
    position: absolute;
    right: 0;
    bottom: 62px;
    display: grid;
    width: 168px;
    min-height: 184px;
    place-items: center;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: white;
    box-shadow: var(--shadow);
    text-align: center;
}

.fake-qr {
    font-size: 5.2rem;
    line-height: 1;
}

.section {
    padding-block: 100px;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 42px;
}

.centered {
    text-align: center;
}

.centered.section-heading {
    margin-inline: auto;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card,
.stats-card,
.card-form,
.link-box {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.feature-card {
    padding: 30px;
}

.feature-card h3 {
    margin: 18px 0 10px;
    font-size: 1.3rem;
}

.feature-card p {
    color: var(--muted);
}

.step-number {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 12px;
    background: #e9eeff;
    color: var(--primary);
    font-weight: 850;
}

.split-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 90px;
    align-items: start;
}

.check-list p {
    position: relative;
    padding: 22px 22px 22px 54px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 1.05rem;
}

.check-list p::before {
    content: "✓";
    position: absolute;
    left: 18px;
    color: var(--success);
    font-weight: 900;
}

.cta-section {
    margin-bottom: 90px;
    padding: 70px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #2444ad, #7557df);
    color: white;
    text-align: center;
}

.cta-section .eyebrow {
    color: #dce4ff;
}

.cta-section h2 {
    max-width: 700px;
    margin-inline: auto;
}

.form-layout {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 70px;
    align-items: start;
}

.form-layout h1,
.preview-controls h1,
.section-heading h1,
.print-toolbar h1 {
    font-size: clamp(2.6rem, 5vw, 4.3rem);
}

.privacy-note {
    margin-top: 26px;
    padding: 18px;
    border-left: 4px solid var(--primary);
    border-radius: 10px;
    background: #e9eeff;
    color: #334a88;
}

.card-form {
    padding: 30px;
    box-shadow: 0 16px 45px rgba(28, 40, 72, 0.06);
}

.field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field-full {
    grid-column: 1 / -1;
}

.field label {
    font-weight: 750;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid #cdd5e0;
    border-radius: 12px;
    background: white;
    color: var(--ink);
    outline: none;
}

.field input,
.field select {
    min-height: 48px;
    padding: 0 14px;
}

.field textarea {
    padding: 14px;
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(49, 87, 213, 0.12);
}

.field-help,
.form-disclaimer,
.field small {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 0.82rem;
}

.field-error {
    color: var(--danger);
    font-size: 0.85rem;
    font-weight: 650;
}

.checkbox-row {
    display: flex;
    flex-direction: row !important;
    align-items: center;
    gap: 10px;
}

.checkbox-row input {
    width: 18px;
    min-height: 18px;
}

.gift-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px;
    border-radius: 14px;
    background: var(--surface-soft);
}

.card-form > .button {
    margin-top: 26px;
}

.form-disclaimer {
    display: block;
    margin: 14px 0 0;
    text-align: center;
}

.preview-layout {
    display: grid;
    grid-template-columns: 0.75fr 1.25fr;
    gap: 70px;
    align-items: start;
}

.preview-controls {
    position: sticky;
    top: 110px;
}

.preview-controls > p:not(.eyebrow) {
    color: var(--muted);
}

.link-box {
    display: grid;
    gap: 7px;
    margin: 28px 0;
    padding: 18px;
}

.link-box span {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 750;
    text-transform: uppercase;
}

.link-box code {
    overflow-wrap: anywhere;
}

.link-box .text-button {
    justify-self: start;
    padding: 0;
}

.stacked-actions {
    display: grid;
    gap: 10px;
}

.stats-card {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    padding: 18px;
}

.preview-stage {
    padding: 30px;
    border-radius: var(--radius-lg);
    background: #e8edf6;
}

.recipient-page {
    display: grid;
    min-height: calc(100dvh - 76px);
    place-items: center;
    padding: 20px;
}

.recipient-card {
    position: relative;
    width: min(100%, 680px);
    min-height: 620px;
    margin: 0 auto;
    padding: clamp(36px, 7vw, 74px);
    border-radius: 34px;
    box-shadow: var(--shadow);
    text-align: center;
    overflow: hidden;
}

.recipient-card::before,
.recipient-card::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    opacity: 0.45;
}

.recipient-card::before {
    width: 220px;
    height: 220px;
    top: -90px;
    right: -65px;
    background: white;
}

.recipient-card::after {
    width: 180px;
    height: 180px;
    bottom: -70px;
    left: -50px;
    background: white;
}

.theme-celebration {
    background: linear-gradient(145deg, #dce8ff, #f3e5ff 55%, #ffefd9);
}

.theme-elegant {
    background: linear-gradient(145deg, #f6f2eb, #e7dfd2);
}

.theme-bright {
    background: linear-gradient(145deg, #fff3a8, #ffcabf 52%, #c9ecff);
}

.theme-minimal {
    background: #ffffff;
    border: 1px solid var(--line);
}

.theme-cozy {
    background: linear-gradient(145deg, #f1ddcf, #f6eee8);
}

.recipient-kicker {
    position: relative;
    z-index: 1;
    margin-bottom: 10px;
    color: var(--muted);
    font-weight: 750;
}

.recipient-card h1,
.recipient-card h2 {
    position: relative;
    z-index: 1;
    margin-bottom: 12px;
    font-size: clamp(3rem, 8vw, 5rem);
}

.celebration-symbol {
    position: relative;
    z-index: 1;
    margin-bottom: 28px;
    color: var(--primary);
    font-size: 2rem;
}

.recipient-message {
    position: relative;
    z-index: 1;
    color: #344156;
    font-size: clamp(1.05rem, 2.5vw, 1.35rem);
    white-space: pre-line;
}

.gift-reveal,
.gift-reveal-button {
    position: relative;
    z-index: 1;
    margin-top: 32px;
}

.gift-reveal {
    display: grid;
    gap: 4px;
    padding: 20px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.76);
}

.gift-reveal strong {
    font-size: 1.6rem;
}

.gift-reveal small {
    color: var(--muted);
}

.gift-reveal-button {
    min-height: 50px;
    padding: 0 22px;
    border: 0;
    border-radius: 14px;
    background: var(--ink);
    color: white;
    font-weight: 800;
    cursor: pointer;
}

.hidden {
    display: none !important;
}

.action-space {
    margin-top: 32px;
}

.print-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: end;
    margin-bottom: 30px;
}

.print-sheet {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 620px;
    border: 1px solid var(--line);
    background: white;
    box-shadow: var(--shadow);
}

.print-panel {
    display: flex;
    min-height: 620px;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    text-align: center;
}

.print-cover {
    border-right: 1px dashed #9aa6b7;
}

.print-brand {
    font-weight: 850;
}

.qr-print-box img {
    width: min(300px, 80%);
}

.print-tip {
    margin-top: 18px;
    color: var(--muted);
    text-align: center;
}

.flash-stack {
    position: fixed;
    top: 92px;
    right: 24px;
    z-index: 50;
    display: grid;
    gap: 10px;
}

.flash {
    max-width: 380px;
    padding: 14px 18px;
    border-radius: 12px;
    background: white;
    box-shadow: var(--shadow);
    font-weight: 700;
}

.flash-success {
    border-left: 4px solid var(--success);
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    padding: 46px max(24px, calc((100vw - 1180px) / 2));
    border-top: 1px solid var(--line);
    background: white;
    color: var(--muted);
}

.site-footer p {
    margin: 4px 0 0;
}

@media (max-width: 900px) {
    .main-nav > a:not(.button) {
        display: none;
    }

    .hero,
    .form-layout,
    .preview-layout,
    .split-section {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 55px;
    }

    .hero-visual {
        min-height: 550px;
    }

    .form-layout,
    .preview-layout {
        gap: 40px;
    }

    .preview-controls {
        position: static;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .print-sheet {
        grid-template-columns: 1fr;
    }

    .print-cover {
        border-right: 0;
        border-bottom: 1px dashed #9aa6b7;
    }
}

@media (max-width: 620px) {
    .shell,
    .narrow-shell {
        width: min(100% - 24px, 1180px);
    }

    .site-header {
        min-height: 66px;
        padding-inline: 14px;
    }

    .logo {
        font-size: 1rem;
    }

    .hero {
        min-height: auto;
    }

    h1 {
        font-size: 3.1rem;
    }

    .hero-visual {
        min-height: 470px;
    }

    .phone-card {
        inset: 10px 20px 10px 0;
        padding: 50px 24px;
        border-width: 7px;
        border-radius: 36px;
    }

    .qr-tile {
        width: 130px;
        min-height: 145px;
        bottom: 28px;
    }

    .fake-qr {
        font-size: 4rem;
    }

    .section {
        padding-block: 70px;
    }

    .field-grid,
    .gift-fields {
        grid-template-columns: 1fr;
    }

    .cta-section {
        padding: 46px 24px;
    }

    .recipient-card {
        min-height: 540px;
        border-radius: 24px;
    }

    .print-toolbar,
    .site-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .site-footer {
        padding-inline: 20px;
    }
}

.recipient-card {
    padding: 0;
    background: white;
}

.recipient-artwork {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    aspect-ratio: 2 / 3;
    max-height: 520px;
    object-fit: cover;
    object-position: center;
}

.recipient-card-content {
    position: relative;
    z-index: 2;
    padding: clamp(30px, 6vw, 58px);
    background: rgba(255, 255, 255, 0.97);
}

.recipient-card-content h1,
.recipient-card-content h2 {
    font-size: clamp(2.5rem, 7vw, 4.5rem);
}

.recipient-message {
    max-width: 540px;
    margin-inline: auto;
    line-height: 1.7;
}

.print-artwork {
    display: block;
    width: min(100%, 310px);
    max-height: 370px;
    margin: 22px auto;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: 0 12px 30px rgba(28, 40, 72, 0.16);
}

.field input[type="file"] {
    min-height: auto;
    padding: 12px;
    cursor: pointer;
}

.field input[type="file"]::file-selector-button {
    margin-right: 12px;
    padding: 9px 14px;
    border: 0;
    border-radius: 9px;
    background: var(--ink);
    color: white;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 620px) {
    .recipient-artwork {
        max-height: 430px;
    }

    .recipient-card-content {
        padding: 30px 22px 38px;
    }
}

/* QuixCard preview */

body:has(#quix-preview) {
    min-height: 100dvh;
    overflow: hidden;
}

body:has(#quix-preview) .site-footer,
body:has(.recipient-page) .site-footer {
    display: none;
}

.section.quix-preview {
    padding-block: 0;
}

.quix-preview {
    display: grid;
    grid-template-columns: minmax(270px, 340px) minmax(0, 620px);
    align-items: center;
    justify-content: center;
    gap: clamp(28px, 5vw, 64px);

    width: min(1080px, calc(100% - 40px));
    max-width: 1080px;
    height: calc(100dvh - 76px);
    padding-block: 20px;
}

.quix-preview-controls {
    position: relative;
    display: grid;
    gap: 18px;
    padding-top: 0;
}

.quix-preview-controls[hidden] {
    display: none;
}

.quix-preview-controls h1 {
    margin-bottom: 12px;
    font-size: clamp(2.5rem, 4vw, 3.8rem);
}

.quix-preview-description {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.quix-revision-count {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 15px 17px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--surface);
}

.quix-revision-count strong {
    color: var(--primary);
    font-size: 1.8rem;
    line-height: 1;
}

.quix-revision-count span {
    color: var(--muted);
    font-size: 0.9rem;
}

.quix-preview-actions {
    display: grid;
    gap: 9px;
}

.quix-preview-actions button {
    width: 100%;
}

.quix-preview-actions button:disabled,
.quix-finish-button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
    transform: none;
}

.quix-finish-button {
    min-height: 52px;
    font-size: 1rem;
}

.quix-preview-error {
    margin: 0;
    padding: 14px;
    border: 1px solid rgba(180, 35, 24, 0.2);
    border-radius: 12px;
    background: rgba(180, 35, 24, 0.07);
    color: var(--danger);
    font-size: 0.9rem;
    font-weight: 700;
}

.quix-card-column {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
}

/*
|--------------------------------------------------------------------------
| Preview card
|--------------------------------------------------------------------------
*/

.quix-card-column .recipient-card,
.recipient-page .recipient-card {
    position: relative;
    width: auto;
    max-width: 100%;

    /*
     * The card height is based on the available screen height.
     * It will never force the desktop preview page to scroll.
     */
    height: calc(100dvh - 120px);
    max-height: 700px;
    min-height: 0;
    aspect-ratio: 2 / 3;

    margin: 0 auto;
    padding: 0;
    overflow: hidden;

    border-radius: 30px;
    background: #1a1a1a;
    box-shadow: var(--shadow);
}

/*
 * Remove the decorative white circles from the original
 * recipient-card design because they would sit over the artwork.
 */
.quix-card-column .recipient-card::before,
.quix-card-column .recipient-card::after,
.recipient-page .recipient-card::before,
.recipient-page .recipient-card::after {
    display: none;
}

/*
 * The artwork area fills the complete card.
 */
.quix-card-column .quix-artwork-area,
.recipient-page .quix-artwork-area {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
}

/*
 * The generated image fills the entire preview card.
 */
.quix-card-column .recipient-artwork,
.recipient-page .recipient-artwork {
    position: absolute;
    inset: 0;
    z-index: 1;

    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
    aspect-ratio: auto;

    object-fit: cover;
    object-position: center;
}

/*
 * The loading area also fills the complete card so that the
 * spinner is centered both vertically and horizontally.
 */
.quix-artwork-loading {
    position: absolute;
    inset: 0;
    z-index: 4;

    display: flex;
    width: 100%;
    height: 100%;
    padding: 36px;

    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;

    background:
        linear-gradient(
            rgba(255, 255, 255, 0.94),
            rgba(255, 255, 255, 0.94)
        );

    color: var(--ink);
    text-align: center;
}

.quix-artwork-loading[hidden] {
    display: none;
}

.quix-artwork-loading strong {
    max-width: 320px;
    font-size: 1.08rem;
    line-height: 1.5;
}

.quix-loading-spinner {
    display: block;
    width: 54px;
    height: 54px;
    flex: 0 0 auto;

    border: 4px solid rgba(49, 87, 213, 0.16);
    border-top-color: var(--primary);
    border-radius: 50%;

    animation: quixcard-spin 0.75s linear infinite;
}

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

/*
 * The message is now positioned over the artwork instead
 * of appearing inside a separate white section.
 */
.quix-card-column .recipient-card-content,
.recipient-page .recipient-card-content {
    position: absolute;
    inset: auto 0 0;
    z-index: 3;

    display: flex;
    min-height: 34%;
    padding: 100px clamp(24px, 5vw, 46px) 36px;

    flex-direction: column;
    align-items: center;
    justify-content: flex-end;

    /*
     * This gradient improves text readability without creating
     * a solid white box over the bottom of the image.
     */
    background:
        linear-gradient(
            to top,
            rgba(0, 0, 0, 0.82) 0%,
            rgba(0, 0, 0, 0.45) 35%,
            rgba(0, 0, 0, 0) 75%
        );

    color: white;
}

.quix-card-column .recipient-card-content {
    pointer-events: none;
}

.quix-card-column .recipient-message,
.recipient-page .recipient-message {
    width: 100%;
    max-width: 520px;
    margin: 0;

    color: white;
    font-size: clamp(1rem, 2vh, 1.25rem);
    font-weight: 650;
    line-height: 1.55;

    text-align: center;
    text-shadow:
        0 2px 5px rgba(0, 0, 0, 0.85),
        0 1px 18px rgba(0, 0, 0, 0.55);
}

.quix-card-column .gift-reveal,
.recipient-page .gift-reveal {
    margin-top: 18px;
    color: white;
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
}

/*
|--------------------------------------------------------------------------
| Responsive preview
|--------------------------------------------------------------------------
*/

@media (max-width: 900px) {
    body:has(#quix-preview) {
        overflow: auto;
    }

    .quix-preview {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 28px;

        width: min(640px, calc(100% - 32px));
        min-height: auto;
        padding-block: 24px 40px;
    }

    .quix-preview-controls {
        position: static;
        order: 2;
    }

    .quix-card-column {
        order: 1;
    }

    .quix-card-column .recipient-card,
    .recipient-page .recipient-card {
        width: min(100%, 440px);
        height: auto;
        min-height: 0;
        aspect-ratio: 2 / 3;
    }
}

@media (max-width: 620px) {
    .quix-preview {
        gap: 24px;
        width: min(100% - 24px, 440px);
        padding-block: 18px 32px;
    }

    .quix-card-column .recipient-card,
    .recipient-page .recipient-card {
        width: 100%;
        height: auto;
        min-height: 0;
        border-radius: 24px;
    }

    .quix-artwork-loading {
        padding: 26px;
    }

    .quix-card-column .recipient-card-content,
    .recipient-page .recipient-card-content {
        min-height: 45%;
        padding: 82px 22px 28px;
    }

    .quix-card-column .recipient-message,
    .recipient-page .recipient-message {
        font-size: clamp(0.95rem, 4vw, 1.1rem);
        line-height: 1.5;
    }
}

/* Share page */

.share-card-page {
    display: grid;
    gap: 32px;
    max-width: 760px;
}

.share-card-header {
    text-align: center;
}

.share-card-panel {
    display: grid;
    gap: 28px;
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.share-qr-section {
    display: grid;
    grid-template-columns: 180px 1fr;
    align-items: center;
    gap: 24px;
}

.share-qr-box {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: white;
}

.share-qr-box img {
    display: block;
    width: 100%;
}

.share-link-section {
    display: grid;
    gap: 10px;
}

.share-link-section label {
    font-weight: 750;
}

.share-link-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-soft);
}

.share-link-row code {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.share-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
