.header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    padding: 1rem clamp(1rem, 4vw, 2.5rem);
    background: linear-gradient(180deg, rgba(253, 251, 247, 0.97) 0%, rgba(253, 251, 247, 0.92) 100%);
    border-bottom: 1px solid rgba(44, 36, 22, 0.08);
    backdrop-filter: blur(8px);
}

.header .title {
    flex: 1 1 200px;
    margin: 0;
    position: center;
    font-size: clamp(1.15rem, 2.2vw, 1.75rem);
    font-family:
        'Marck Script',
        'Segoe UI',
        system-ui,
        -apple-system,
        sans-serif;
    font-weight: 400;
    letter-spacing: 0.01em;
    color: #2c2416;
}

.header .bookmarks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    justify-content: flex-end;
    flex: 1 1 100%;
}

@media (min-width: 900px) {
    .header .bookmarks {
        flex: 0 1 auto;
        justify-content: flex-end;
    }
}

.header .bookmark {
    display: inline-block;
    padding: 0.45rem 0.85rem;
    font-size: 0.9rem;
    text-decoration: none;
    color: #4a3f2f;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(44, 36, 22, 0.12);
    border-radius: 999px;
    transition:
        background 0.28s ease,
        color 0.28s ease,
        border-color 0.28s ease,
        transform 0.2s ease,
        box-shadow 0.28s ease;
}

/* Подсветка снизу ~20–25% высоты кнопки, мягкий «горб» к верху */
.header .bookmark:hover {
    color: #1a1510;
    border-color: rgba(90, 143, 106, 0.38);
    transform: translateY(-1px);
    background: linear-gradient(
        to top,
        rgba(168, 212, 164, 0.55) 0%,
        rgba(168, 212, 164, 0.28) 16%,
        rgba(168, 212, 164, 0.1) 24%,
        rgba(255, 255, 255, 0.62) 32%,
        rgba(255, 255, 255, 0.72) 100%
    );
    box-shadow: inset 0 -0.35em 0.55em -0.15em rgba(124, 182, 142, 0.35);
}

.header .bookmark:focus-visible {
    outline: 2px solid #8b7355;
    outline-offset: 2px;
}
