/* Book Gift Finder — editorial, bookish palette that sits comfortably beside
   Book4U's existing Playfair Display / Open Sans identity. */
.gift-page {
    --gift-ink: #233631;
    --gift-muted: #65736e;
    --gift-paper: #f4f4ef;
    --gift-card: #fffefa;
    --gift-line: #d9dfd8;
    --gift-green: #355e50;
    --gift-green-deep: #294b40;
    --gift-sage: #e3ebe4;
    --gift-coral: #bd7055;
    --gift-serif: 'Playfair Display', Georgia, serif;
    --gift-sans: 'Open Sans', sans-serif;
    background: var(--gift-paper);
    color: var(--gift-ink);
    min-height: 100dvh;
}

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

.gift-page a {
    color: inherit;
}

.gift-page :focus-visible {
    outline: 3px solid #b56c50;
    outline-offset: 4px;
}

.gift-site-header nav {
    background: rgba(255, 254, 250, .96);
    box-shadow: 0 1px 0 rgba(35, 54, 49, .1);
    column-gap: clamp(.8rem, 2vw, 2rem);
    padding: .85rem 1rem;
}

.gift-site-header nav a {
    color: var(--gift-ink);
    font-family: var(--gift-sans);
    font-size: .88rem;
}

.gift-site-header nav a:hover,
.gift-site-header nav a.active {
    color: var(--gift-green);
    border-bottom-color: var(--gift-green);
}

.gift-main {
    width: min(1120px, calc(100% - 48px));
    margin: 0 auto;
}

.gift-breadcrumb {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: 1.15rem 0;
    color: var(--gift-muted);
    font-size: .78rem;
    letter-spacing: .025em;
}

.gift-breadcrumb a {
    text-decoration: none;
}

.gift-breadcrumb a:hover {
    color: var(--gift-green);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.gift-hero {
    min-height: 400px;
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
    align-items: center;
    overflow: hidden;
    background: #e8eee7;
    padding: clamp(2.8rem, 6vw, 5rem) clamp(2rem, 7vw, 6.8rem);
}

.gift-hero::before {
    position: absolute;
    content: "";
    width: 440px;
    height: 440px;
    top: -235px;
    left: -140px;
    border: 1px solid rgba(53, 94, 80, .13);
    border-radius: 50%;
}

.gift-hero-copy {
    position: relative;
    z-index: 2;
    max-width: 590px;
}

.gift-eyebrow {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin: 0 0 1.1rem;
    color: var(--gift-green);
    font-family: var(--gift-sans);
    font-size: .69rem;
    font-weight: 700;
    letter-spacing: .14em;
    line-height: 1.5;
    text-transform: uppercase;
}

.gift-eyebrow-rule {
    display: inline-block;
    width: 26px;
    height: 1px;
    background: var(--gift-coral);
}

.gift-page h1,
.gift-page h2,
.gift-page h3 {
    color: var(--gift-ink);
    font-family: var(--gift-serif);
    font-weight: 400;
}

.gift-hero h1 {
    margin: 0;
    font-size: clamp(2.75rem, 5.2vw, 4.7rem);
    letter-spacing: -.045em;
    line-height: 1.07;
}

.gift-hero h1 em,
.gift-section-heading h2 em,
.gift-how-intro h2 em,
.gift-faq-intro h2 em {
    color: var(--gift-green);
    font-weight: 400;
}

.gift-intro {
    max-width: 440px;
    margin: 1.35rem 0 1.4rem;
    color: #4f625b;
    font-size: .98rem;
    line-height: 1.8;
}

.gift-text-link {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding-bottom: .35rem;
    border-bottom: 1px solid var(--gift-green);
    color: var(--gift-green-deep);
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
}

.gift-text-link span {
    transition: transform .2s ease;
}

.gift-text-link:hover span {
    transform: translateY(3px);
}

.gift-hero-art {
    position: relative;
    display: grid;
    min-height: 285px;
    place-items: center;
}

.gift-art-orbit {
    position: absolute;
    width: 245px;
    height: 245px;
    border: 1px solid rgba(53, 94, 80, .2);
    border-radius: 50%;
}

.gift-art-orbit-one {
    transform: translate(10px, -3px);
}

.gift-art-orbit-two {
    width: 300px;
    height: 300px;
    transform: translate(10px, -3px);
    border-color: rgba(53, 94, 80, .1);
}

.gift-art-book {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 178px;
    height: 242px;
    padding: 1.25rem 1.3rem;
    border: 1px solid rgba(255, 255, 255, .23);
    border-left: 8px solid #294b40;
    background: #507365;
    box-shadow: 14px 16px 24px rgba(39, 66, 56, .19), inset 5px 0 8px rgba(15, 43, 32, .13);
    color: #f6f2e6;
    transform: rotate(5deg);
    transition: transform .35s ease;
}

.gift-hero-art:hover .gift-art-book {
    transform: rotate(1deg) translateY(-4px);
}

.gift-art-book-small,
.gift-art-book-foot {
    font-size: .52rem;
    font-weight: 700;
    letter-spacing: .14em;
}

.gift-art-book-large {
    font-family: var(--gift-serif);
    font-size: 2.3rem;
    line-height: .98;
}

.gift-art-book-mark {
    position: absolute;
    top: 50%;
    left: 1.25rem;
    width: 26px;
    height: 1px;
    background: #d8c7a0;
}

.gift-art-book-foot {
    color: #d9e2d7;
    font-size: .42rem;
}

.gift-art-caption {
    position: absolute;
    right: 4%;
    bottom: 19%;
    color: var(--gift-green);
    font-family: var(--gift-serif);
    font-size: .9rem;
    font-style: italic;
    line-height: 1.35;
    transform: rotate(-5deg);
}

.gift-finder-section {
    padding: clamp(4.3rem, 8vw, 7.2rem) 0 5.8rem;
}

.gift-section-heading {
    max-width: 690px;
    margin: 0 auto 2.8rem;
    text-align: center;
}

.gift-section-heading .gift-eyebrow,
.gift-how-intro .gift-eyebrow,
.gift-faq-intro .gift-eyebrow {
    justify-content: center;
}

.gift-section-heading h2,
.gift-how-intro h2,
.gift-faq-intro h2 {
    margin: 0 0 .9rem;
    font-size: clamp(2.1rem, 4vw, 3.2rem);
    letter-spacing: -.035em;
    line-height: 1.14;
}

.gift-section-heading > p:last-child {
    max-width: 535px;
    margin: 0 auto;
    color: var(--gift-muted);
    font-size: .92rem;
    line-height: 1.8;
}

.gift-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(230px, .65fr);
    align-items: stretch;
    max-width: 930px;
    margin: 0 auto;
    border: 1px solid var(--gift-line);
    background: var(--gift-card);
    box-shadow: 0 18px 46px rgba(40, 63, 54, .055);
}

.gift-form {
    padding: clamp(1.5rem, 4vw, 3.2rem);
}

.gift-form-topline {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gift-line);
    color: var(--gift-ink);
    font-family: var(--gift-serif);
    font-size: 1.15rem;
}

.gift-form-number {
    color: var(--gift-coral);
    font-family: var(--gift-sans);
    font-size: .63rem;
    font-weight: 700;
    letter-spacing: .12em;
}

.gift-field {
    margin-bottom: 1.45rem;
}

.gift-field label {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: .6rem;
    color: var(--gift-ink);
    font-size: .86rem;
    font-weight: 700;
}

.gift-field-index {
    color: var(--gift-coral);
    font-size: .62rem;
    letter-spacing: .07em;
}

.gift-field input,
.gift-field textarea,
.gift-note-card textarea {
    display: block;
    width: 100%;
    border: 1px solid #cbd4cd;
    border-radius: 0;
    background: #fffefa;
    color: var(--gift-ink);
    font: 400 .91rem/1.6 var(--gift-sans);
    transition: border-color .18s ease, box-shadow .18s ease;
}

.gift-field input,
.gift-field textarea {
    padding: .78rem .9rem;
}

.gift-field input::placeholder,
.gift-field textarea::placeholder {
    color: #8a9790;
    opacity: 1;
}

.gift-field input:focus,
.gift-field textarea:focus,
.gift-note-card textarea:focus {
    border-color: var(--gift-green);
    box-shadow: 0 0 0 3px rgba(53, 94, 80, .11);
    outline: none;
}

.gift-field textarea {
    min-height: 112px;
    resize: vertical;
}

.gift-input-wrap {
    position: relative;
}

.gift-age-wrap input {
    padding-right: 6.4rem;
}

.gift-input-unit {
    position: absolute;
    top: 50%;
    right: .85rem;
    color: var(--gift-muted);
    font-size: .73rem;
    pointer-events: none;
    transform: translateY(-50%);
}

.gift-field > small,
.gift-textarea-meta small {
    display: block;
    margin-top: .45rem;
    color: var(--gift-muted);
    font-size: .71rem;
    line-height: 1.5;
}

.gift-textarea-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.gift-textarea-meta small:last-child {
    white-space: nowrap;
}

.gift-submit {
    display: flex;
    width: 100%;
    min-height: 53px;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.8rem;
    padding: .85rem 1.1rem;
    border: 1px solid var(--gift-green-deep);
    border-radius: 0;
    background: var(--gift-green-deep);
    color: #fffefa;
    cursor: pointer;
    font: 700 .83rem var(--gift-sans);
    letter-spacing: .015em;
    text-align: left;
    transition: background .2s ease, transform .2s ease;
}

.gift-submit:hover {
    background: #1f3d33;
    transform: translateY(-2px);
}

.gift-submit-arrow {
    font-size: 1.2rem;
    font-weight: 400;
}

.gift-privacy {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    margin: .95rem 0 0;
    color: var(--gift-muted);
    font-size: .7rem;
    line-height: 1.55;
}

.gift-privacy-mark {
    position: relative;
    flex: 0 0 11px;
    width: 11px;
    height: 9px;
    margin-top: .2rem;
    border: 1px solid var(--gift-green);
    border-radius: 2px;
}

.gift-privacy-mark::before {
    position: absolute;
    top: -6px;
    left: 2px;
    width: 5px;
    height: 6px;
    border: 1px solid var(--gift-green);
    border-bottom: 0;
    border-radius: 5px 5px 0 0;
    content: "";
}

.gift-aside {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    padding: 2.2rem clamp(1.4rem, 3vw, 2.5rem);
    background: var(--gift-sage);
}

.gift-aside::after {
    position: absolute;
    right: -92px;
    bottom: -128px;
    width: 240px;
    height: 240px;
    border: 1px solid rgba(53, 94, 80, .16);
    border-radius: 50%;
    content: "";
}

.gift-aside-label {
    margin: 0 0 1rem;
    color: var(--gift-coral);
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.gift-aside h3 {
    margin: 0;
    font-size: clamp(1.85rem, 3vw, 2.45rem);
    letter-spacing: -.035em;
    line-height: 1.06;
}

.gift-aside > p:not(.gift-aside-label, .gift-aside-foot) {
    margin: 1.1rem 0 0;
    color: #52655d;
    font-size: .82rem;
    line-height: 1.8;
}

.gift-aside-divider {
    width: 35px;
    height: 1px;
    margin: 1.7rem 0 1rem;
    background: var(--gift-coral);
}

.gift-aside .gift-aside-foot {
    max-width: 240px;
    margin: 0;
    color: var(--gift-green-deep);
    font-family: var(--gift-serif);
    font-size: 1rem;
    font-style: italic;
    line-height: 1.6;
}

.gift-aside-index {
    position: absolute;
    right: 1.35rem;
    bottom: 1.1rem;
    color: #71877b;
    font-size: .55rem;
    font-weight: 700;
    letter-spacing: .12em;
}

.gift-noscript {
    max-width: 930px;
    margin: 1.25rem auto 0;
    padding: .95rem 1rem;
    border-left: 3px solid var(--gift-coral);
    background: #f7ebe3;
    color: #50382f;
    font-size: .84rem;
    line-height: 1.65;
}

.gift-result {
    max-width: 930px;
    margin: 3.5rem auto 0;
    scroll-margin-top: 2rem;
}

.gift-page [hidden] {
    display: none !important;
}

.gift-result-heading {
    margin-bottom: 1.3rem;
    text-align: center;
}

.gift-result-heading .gift-eyebrow {
    justify-content: center;
}

.gift-result-heading h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 2.8rem);
}

.gift-match {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    background: #e8eee7;
}

.gift-match-index {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gift-green);
    color: #f5f1e4;
    font-size: .57rem;
    font-weight: 700;
    letter-spacing: .16em;
    line-height: 1.8;
    text-align: center;
}

.gift-match-copy {
    padding: clamp(1.4rem, 4vw, 2.7rem);
}

.gift-match-label {
    margin: 0 0 .5rem;
    color: var(--gift-coral);
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.gift-match-copy h3 {
    margin: 0;
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    line-height: 1.15;
}

.gift-author {
    margin: .35rem 0 1.7rem;
    color: var(--gift-muted);
    font-family: var(--gift-serif);
    font-size: 1rem;
    font-style: italic;
}

.gift-reason-block,
.gift-fit-block {
    max-width: 670px;
}

.gift-reason-block h4,
.gift-fit-block h4 {
    margin: 0 0 .35rem;
    color: var(--gift-green);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.gift-reason-block p,
.gift-fit-block p {
    margin: 0;
    color: #52625a;
    font-size: .88rem;
    line-height: 1.75;
}

.gift-fit-block {
    margin-top: 1.15rem;
}

.gift-note-card {
    margin-top: 1.2rem;
    padding: clamp(1.4rem, 4vw, 2.3rem);
    border: 1px solid var(--gift-line);
    background: var(--gift-card);
}

.gift-note-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.gift-note-heading h3 {
    margin: 0;
    font-size: 1.5rem;
}

.gift-note-stamp {
    display: grid;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    place-content: center;
    border: 1px solid #cf8c73;
    border-radius: 50%;
    color: var(--gift-coral);
    font-size: .51rem;
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1.35;
    text-align: center;
    transform: rotate(9deg);
}

.gift-note-card textarea {
    min-height: 104px;
    padding: 1rem;
    background: #f8f8f3;
    resize: vertical;
}

.gift-note-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .8rem 1rem;
    margin-top: .85rem;
}

.gift-copy-button {
    display: inline-flex;
    align-items: center;
    gap: .8rem;
    min-height: 43px;
    padding: .65rem 1rem;
    border: 1px solid var(--gift-green-deep);
    background: var(--gift-green-deep);
    color: #fffefa;
    cursor: pointer;
    font: 700 .76rem var(--gift-sans);
    transition: background .2s ease;
}

.gift-copy-button:hover {
    background: #1f3d33;
}

.gift-copy-button span {
    font-size: 1rem;
    font-weight: 400;
}

.gift-copy-status {
    min-height: 1.3em;
    margin: 0;
    color: var(--gift-green-deep);
    font-size: .76rem;
}

.gift-how-section {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: clamp(2rem, 7vw, 6rem);
    padding: 4.5rem 0 5rem;
    border-top: 1px solid var(--gift-line);
}

.gift-how-intro .gift-eyebrow,
.gift-faq-intro .gift-eyebrow {
    justify-content: flex-start;
}

.gift-how-intro h2,
.gift-faq-intro h2 {
    font-size: clamp(2rem, 3.8vw, 2.8rem);
}

.gift-how-copy {
    padding-top: 1.8rem;
}

.gift-how-copy p {
    margin: 0 0 1rem;
    color: #52625a;
    font-size: .9rem;
    line-height: 1.85;
}

.gift-how-copy .gift-disclaimer {
    margin-top: 1.7rem;
    padding: 1rem 1.1rem;
    border-left: 2px solid var(--gift-coral);
    background: #eeeee7;
    color: #53635c;
    font-size: .78rem;
}

.gift-faq-section {
    display: grid;
    grid-template-columns: minmax(220px, .72fr) minmax(0, 1.28fr);
    gap: clamp(2rem, 7vw, 6rem);
    padding: 4.6rem 0 5.4rem;
    border-top: 1px solid var(--gift-line);
}

.gift-faq-intro > p:last-child {
    max-width: 280px;
    color: var(--gift-muted);
    font-size: .84rem;
    line-height: 1.75;
}

.gift-faq-list {
    border-top: 1px solid var(--gift-line);
}

.gift-faq-item {
    border-bottom: 1px solid var(--gift-line);
}

.gift-faq-item summary {
    position: relative;
    display: block;
    padding: 1.2rem 2rem 1.2rem 0;
    color: var(--gift-ink);
    cursor: pointer;
    font-family: var(--gift-serif);
    font-size: 1.06rem;
    line-height: 1.45;
    list-style: none;
}

.gift-faq-item summary::-webkit-details-marker {
    display: none;
}

.gift-faq-item summary::after {
    position: absolute;
    top: 50%;
    right: .15rem;
    color: var(--gift-coral);
    content: "+";
    font: 400 1.25rem var(--gift-sans);
    transform: translateY(-50%);
}

.gift-faq-item[open] summary::after {
    content: "−";
}

.gift-faq-item p {
    max-width: 610px;
    margin: -.2rem 1.8rem 1.25rem 0;
    color: var(--gift-muted);
    font-size: .83rem;
    line-height: 1.8;
}

.gift-footer {
    margin-top: 0;
    padding: 2rem 24px;
    border-top: 1px solid var(--gift-line);
    background: #eceee8;
}

.gift-footer-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 1.1rem 2rem;
    width: min(1120px, 100%);
    margin: 0 auto;
}

.gift-footer-brand {
    display: inline-flex;
    flex-direction: column;
    width: fit-content;
    color: var(--gift-green-deep);
    font-family: var(--gift-serif);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.15;
    text-decoration: none;
}

.gift-footer-brand span {
    margin-top: .25rem;
    color: var(--gift-muted);
    font-family: var(--gift-sans);
    font-size: .64rem;
    font-weight: 400;
}

.gift-footer-links {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: .5rem 1.2rem;
}

.gift-footer-links a {
    color: var(--gift-muted);
    font-size: .72rem;
    text-decoration: none;
}

.gift-footer-links a:hover {
    color: var(--gift-green-deep);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.gift-footer-inner > small {
    grid-column: 1 / -1;
    color: #758078;
    font-size: .66rem;
}

.gift-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 760px) {
    .gift-main {
        width: min(100% - 32px, 600px);
    }

    .gift-site-header nav {
        column-gap: .9rem;
        row-gap: .25rem;
    }

    .gift-site-header nav a {
        font-size: .78rem;
    }

    .gift-hero {
        min-height: auto;
        grid-template-columns: 1fr;
        padding: 3rem 1.7rem 1.5rem;
    }

    .gift-hero h1 {
        font-size: clamp(2.7rem, 11vw, 4.3rem);
    }

    .gift-hero-art {
        min-height: 275px;
        margin-top: 1rem;
    }

    .gift-art-caption {
        right: 13%;
    }

    .gift-workspace {
        grid-template-columns: 1fr;
    }

    .gift-aside {
        min-height: 270px;
    }

    .gift-how-section,
    .gift-faq-section {
        grid-template-columns: 1fr;
        gap: 1.4rem;
    }

    .gift-how-copy {
        padding-top: 0;
    }

    .gift-footer-inner {
        grid-template-columns: 1fr;
    }

    .gift-footer-links {
        justify-content: flex-start;
    }

    .gift-footer-inner > small {
        grid-column: auto;
    }
}

@media (max-width: 480px) {
    .gift-main {
        width: calc(100% - 28px);
    }

    .gift-breadcrumb {
        padding: .85rem 0;
        font-size: .72rem;
    }

    .gift-hero {
        padding: 2.35rem 1.25rem 1.15rem;
    }

    .gift-intro {
        font-size: .9rem;
    }

    .gift-finder-section {
        padding: 3.7rem 0 4rem;
    }

    .gift-section-heading {
        margin-bottom: 2rem;
    }

    .gift-form {
        padding: 1.35rem 1.15rem 1.5rem;
    }

    .gift-form-topline {
        font-size: 1.02rem;
    }

    .gift-match {
        grid-template-columns: 45px minmax(0, 1fr);
    }

    .gift-match-index {
        font-size: .43rem;
        letter-spacing: .1em;
        writing-mode: vertical-rl;
        transform: rotate(180deg);
    }

    .gift-match-copy {
        padding: 1.2rem;
    }

    .gift-note-card {
        padding: 1.2rem;
    }

    .gift-how-section,
    .gift-faq-section {
        padding: 3.5rem 0;
    }
}

.gift-recommendations {
    margin: 3rem 0;
}

.gift-recommendations .recommended-books {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.gift-recommendations .book-list {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
}

#giftTags, #giftBookLink {
    overflow-wrap: anywhere;
}

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