.gift [hidden] { display: none !important; }
.gift-hero { color: #fff; background: radial-gradient(ellipse at 78% 0%, #285093, transparent 55%), #101e3a; }
.gift-page .site-header .brand { display: none; }
.gift-hero h1 { font-size: clamp(1.5rem, 5vw, 2.4rem); line-height: 1.12; margin: 0 0 4px; }
.gift-hero p { margin: 0; color: #ffe13a; }
.gift-quiz { padding-block: 18px; }
.gift-progress { position: relative; height: 9px; margin: 12px 14px; border-radius: 12px; background: linear-gradient(90deg, #f9dc24 var(--progress, 0%), #dce5f3 var(--progress, 0%)); }
.gift-progress span { position: absolute; left: var(--progress, 0%); top: 50%; transform: translate(-50%, -50%); transition: left .25s ease; }
.gift-progress-label { color: #364969; font-size: .85rem; }
.gift-quiz fieldset { border: 0; padding: 0; margin: 0 0 12px; min-width: 0; }
.gift-quiz legend { font-size: clamp(1.15rem, 4vw, 1.5rem); font-weight: 800; margin-bottom: 10px; }
.gift-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 9px; }
.gift-actions button, .gift-actions a, .gift-quiz button, .gift-dialog button { min-height: 44px; border: 1px solid #c7d4e8; border-radius: 10px; padding: 8px 13px; color: #132848; background: #fff; cursor: pointer; }
.gift-actions button:hover, .gift-quiz button:hover { background: #edf3ff; }
.gift button:focus-visible, .gift a:focus-visible, .gift input:focus-visible { outline: 3px solid #3368d9; outline-offset: 2px; }
.gift-swatch { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 1px solid #7d8da2; margin-right: 7px; vertical-align: middle; }
.gift [data-gift-all] { margin-top: 10px; }
.gift input[type=search] { display: block; min-height: 44px; width: min(100%, 26rem); margin: 5px 0 10px; font-size: 16px; }
.gift [data-gift-list] { max-height: 17rem; overflow: auto; padding: 3px; }
.gift-results { scroll-margin-top: 85px; }
.gift-results .card-actions .button { white-space: normal; width: 100%; min-height: 44px; }
.gift-results .card-actions .gift-product-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 48px;
    padding: 8px;
    color: #fff;
    background: #1455df;
    box-shadow: 0 4px 10px #1455df40;
    font-weight: 800;
}
.gift-product-cta .icon, .gift-cta-bolt { width: 18px; height: 18px; flex: none; }
.gift-cta-bolt { color: #ffe279; }
.gift-cta-arrow { display: inline-flex; }
@media (max-width: 779px) and (prefers-reduced-motion: no-preference) {
    .gift-product-cta { transition: transform .16s ease; }
    .gift-product-cta:active { transform: scale(.96); }
    .gift-cta-arrow { animation: gift-cta-nudge 2.8s ease-in-out 2; }
    @keyframes gift-cta-nudge {
        0%, 70%, 100% { transform: translateX(0) scale(1); }
        82% { transform: translateX(3px) scale(1.15); }
    }
}
@media (max-width: 779px) and (pointer: coarse) {
    html:has(.gift-results:not([hidden]) .product-card) {
        scroll-snap-type: y mandatory;
        scroll-padding-top: 62px;
    }
    html:has(body.admin-bar .gift-results:not([hidden]) .product-card) {
        scroll-padding-top: 108px;
    }
    .gift-results .product-card {
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }
    .gift-quiz,
    .gift-results > h2,
    .gift-results .pagination,
    .gift-page .site-footer {
        scroll-snap-align: start;
    }
}
.gift-dialog { width: min(92vw, 420px); border: 0; border-radius: 18px; padding: 20px; color: #132848; }
.gift-dialog::backdrop { background: #101e3ab5; }
.gift-dialog img { border-radius: 9px; object-fit: cover; }
.gift-dialog .gift-close { float: right; font-size: 1.25rem; }
.gift-dialog .button, .gift-dialog [data-gift-copy] { display: flex; width: 100%; justify-content: center; min-height: 44px; margin: 8px 0; }
.gift-dialog textarea { width: 100%; min-height: 130px; font-size: 16px; }
@media (prefers-reduced-motion: reduce) { .gift-progress span { transition: none; } }

.gift-quiz [data-gift-question] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gift-quiz [data-gift-question] button { min-height: 52px; font-weight: 700; }
.gift-quiz button:focus-visible { outline-offset: 3px; }
.gift[data-results="1"] .gift-progress,
.gift[data-results="1"] .gift-progress-label { display: none; }

.gift[data-results="0"] {
    --gift-background-original: url("gift-embrace.webp");
    --gift-background-with-ball: url("gift-embrace-ball-optimized.webp");
    --gift-background: var(--gift-background-with-ball);
    display: grid;
    align-content: center;
    min-height: calc(100svh - 62px);
    padding: clamp(50px, 12svh, 110px) 0 28px;
    color: #f8faff;
    background: linear-gradient(180deg, #10152025, #101520ac),
        #101520 var(--gift-background) right top / cover no-repeat;
}
.gift[data-results="0"] .gift-quiz {
    width: min(calc(100% - 28px), 540px);
    margin-inline: auto;
    padding: clamp(18px, 5vw, 32px);
    border: 1px solid #b7c7e244;
    border-radius: 26px;
    background: linear-gradient(150deg, #242a32ed, #171c24e5);
    box-shadow: 0 16px 48px #070b1370, inset 0 1px #ffffff12;
}
.gift[data-results="0"] .gift-hero { background: transparent; }
.gift[data-results="1"] .gift-hero { color: #172c4a; background: transparent; }
.gift[data-results="1"] .gift-hero p { color: inherit; }
.gift-hero h1 {
    margin: 0 0 8px;
    font-size: clamp(1.7rem, 7vw, 3.05rem);
    line-height: 1.05;
    letter-spacing: -.045em;
}
.gift-hero p { color: #fff; font-size: clamp(1.12rem, 4.8vw, 1.45rem); font-weight: 750; }
.gift-match-note { padding: 12px 14px; border-radius: 12px; background: #edf4ff; color: #172c4a; }
.gift-match-badge { align-self: flex-start; padding: 4px 8px; border-radius: 8px; background: #edf4ff; color: #172c4a; font-size: .8rem; font-weight: 700; }
.gift[data-results="0"] .gift-progress {
    height: 4px;
    margin: 20px 8px 9px;
    background: linear-gradient(90deg, #75a7ff var(--progress, 0%), #526173 var(--progress, 0%));
}
.gift[data-results="0"] .gift-progress span { font-size: 14px; }
.gift[data-results="0"] .gift-progress-label {
    color: #c5d4ec;
    margin: 0 0 12px;
    font-size: .78rem;
    font-weight: 700;
}
.gift[data-results="0"] fieldset {
    padding: 10px;
    margin: 0;
    border: 1px solid #72859d80;
    border-radius: 16px;
    background: #191f27b0;
}
.gift[data-results="0"] legend {
    padding-inline: 4px;
    margin-bottom: 0;
    font-size: clamp(1rem, 4.5vw, 1.25rem);
}
.gift[data-results="0"] .gift-actions:last-child { margin-bottom: 0; }
.gift[data-results="0"] [data-gift-chips]:not(:empty) { margin-top: 10px; }
.gift[data-results="0"] .gift-quiz button {
    color: #f8faff;
    background: #292f38;
    border-color: #657489;
    border-radius: 12px;
}
.gift[data-results="0"] [data-gift-question] button {
    background: #0756e8;
    border-color: #6299ff;
    box-shadow: inset 0 1px #ffffff2b;
}
.gift[data-results="0"] .gift-quiz button:focus-visible { outline-color: #a7c8ff; }
.gift[data-results="0"] [data-gift-top] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.gift[data-results="0"] [data-gift-top] button {
    min-width: 0;
    overflow-wrap: anywhere;
    text-align: left;
}
@media (hover: hover) {
    .gift[data-results="0"] .gift-quiz button:hover { background: #394554; }
    .gift[data-results="0"] [data-gift-question] button:hover { background: #1768f4; }
}
@media (max-width: 779px) {
    .gift-page:has(.gift[data-results="0"]) .catalog-bottom { display: none; }
}
@media (min-width: 780px) {
    .gift[data-results="0"] {
        justify-items: start;
        padding: 54px max(30px, calc((100% - 1080px) / 2));
        background-position: center, right top;
        background-size: cover, auto max(650px, 100svh);
        background-image: linear-gradient(90deg, #0a101ac9, #0a101a15), var(--gift-background);
    }
    .gift[data-results="0"] .gift-quiz { width: min(100%, 490px); margin-inline: 0; }
}
@media (prefers-reduced-motion: no-preference) {
    .gift[data-results="0"] .gift-quiz button { transition: background-color .16s, transform .16s; }
    .gift[data-results="0"] .gift-quiz button:active { transform: scale(.97); }
    .gift[data-results="0"] fieldset:not([hidden]),
    .gift[data-results="0"] [data-gift-options]:not([hidden]) { animation: gift-reveal .2s ease-out; }
    @keyframes gift-reveal {
        from { opacity: .6; transform: translateY(4px); }
        to { opacity: 1; transform: translateY(0); }
    }
}

/* Light gift selection card. */
.gift[data-results="0"] .gift-quiz { color: #101a30; background: #fff; border-color: #e1e8f2; box-shadow: 0 16px 48px #07152a40; }
.gift[data-results="0"] .gift-hero { color: #101a30; }
.gift[data-results="0"] .gift-hero p { color: #435471; }
.gift[data-results="0"] .gift-progress { background: linear-gradient(90deg, #285dea var(--progress, 0%), #dce5f2 var(--progress, 0%)); }
.gift[data-results="0"] .gift-progress-label { color: #536782; }
.gift[data-results="0"] fieldset { color: #101a30; border-color: #e0e7f0; background: #f6f8fb; }
.gift[data-results="0"] .gift-quiz button { color: #17243a; background: #fff; border-color: #d9e2ee; box-shadow: none; }
.gift[data-results="0"] [data-gift-question] button { color: #fff; background: #285dea; border-color: #285dea; }
.gift[data-results="0"] .gift-quiz button:focus-visible { outline-color: #285dea; }
@media (hover: hover) {
    .gift[data-results="0"] .gift-quiz button:hover { background: #edf3fc; }
    .gift[data-results="0"] [data-gift-question] button:hover { background: #194bd3; }
}
/* Compact information links, without the duplicated shop name and button. */
.gift-page .site-footer { padding: 12px 12px 14px; font-size: 12px; }
.gift-page .site-footer > p:first-child, .gift-page .site-footer > .text-button { display: none; }
.gift-page .site-footer ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 12px; margin: 0; padding: 0; list-style: none; }
.gift-page .site-footer li a { display: inline-block; padding: 5px 0; color: #034ee2; text-decoration: underline; text-underline-offset: 2px; }

/* Keep the questionnaire in place when results are inserted below it. */
.gift[data-results="0"].gift-has-results { padding-bottom: 0; }
.gift[data-results="0"] .gift-results:not([hidden]) { width: 100%; max-width: none; margin: 28px 0 0; padding: 28px max(18px, calc((100% - 1080px) / 2)); color: #132848; background: #fff; }
.gift[data-results="0"] .gift-results h2 { margin-bottom: 12px; }
.gift[data-results="0"] [data-gift-step="color"] [data-gift-top], .gift[data-results="0"] [data-gift-step="color"] [data-gift-list] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.gift[data-results="0"] [data-gift-step="color"] [data-gift-top] button, .gift[data-results="0"] [data-gift-step="color"] [data-gift-list] button { display: flex; align-items: center; gap: 10px; min-height: 52px; text-align: left; }
.gift[data-results="0"] .gift-swatch { width: 27px; height: 27px; flex: 0 0 27px; margin: 0; box-shadow: 0 0 0 2px #fff, 0 0 0 3px #cbd7e6; }

.gift-result-preferences { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.gift-result-preferences[hidden] { display: none; }
.gift-result-preferences button { min-height: 40px; padding: 8px 12px; border: 1px solid #cbd9ec; border-radius: 10px; background: #f5f8ff; color: #173e87; font-size: 14px; font-weight: 700; }
.gift-next-step { margin: 0 0 12px; color: #435471; font-size: 14px; }

.gift-hero .gift-kicker { margin-bottom: 5px; color: #435471; font-size: 1rem; font-weight: 700; }
.gift[data-results="0"] .gift-hero h1 { font-size: clamp(1.5rem, 6vw, 2.5rem); line-height: 1.08; }
.gift[data-results="0"] .gift-hero p { font-size: clamp(.9rem, 4vw, 1.12rem); }
.gift[data-results="0"] .gift-progress { margin-top: 13px; }
.gift[data-results="0"] .gift-progress-label { margin-bottom: 7px; }
.gift-option-actions { margin-top: 8px; }
.gift[data-results="0"] .gift-option-actions [data-gift-skip] { color: #1646a6; }
@media (max-width: 779px) {
    .gift[data-results="0"] { padding-block: 24px; }
    .gift[data-results="0"] .gift-quiz { padding: 14px; }
}

.gift-dialog form label { display: block; margin: 14px 0 10px; color: #172c4a; font-weight: 700; }
.gift-dialog form input:not([hidden]) { display: block; width: 100%; min-height: 48px; margin: 8px 0; padding: 10px 12px; border: 1px solid #b9c9df; border-radius: 10px; background: #fff; font-size: 16px; }
.gift-dialog form p { margin: 12px 0; font-size: 13px; }
.gift-dialog form p a, .gift-dialog [data-gift-success] a { color: #0756e8; text-decoration: underline; }
.gift-dialog form .button { margin-top: 10px; }
.gift-dialog [data-gift-status] { margin-top: 10px; color: #9b2525; }
