:root {
    --primary-color: #2c2c2c;
    --secondary-color: #f5f5f5;
    --accent-color: #ff6b35;
    --text-dark: #333333;
    --text-light: #666666;
    --text-muted: #999999;
    --border-color: #e0e0e0;
    --background-light: #fafafa;
    --layout-offset: 160px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex-grow: 1;
}

/* Header */
header {
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    width: 100%;
    position: relative;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 2rem;
    position: relative;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-brand-link { text-decoration: none; color: inherit; display:flex; align-items:center; gap:0.5rem; }

/* Logout link styled like header text (cactus flower) */
.nav-logout {
    position: absolute;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    color: #bd726c;
    font-weight: 600;
    text-decoration: none;
}
.nav-logout:hover { text-decoration: underline; }

/* Standardized back link (left) and logout (right) pattern */
.nav-back {
    position: absolute;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    color: #bd726c;
    font-weight: 600;
    text-decoration: none;
}
.nav-back:hover { text-decoration: underline; }

.nav-logout-right {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    color: #bd726c;
    font-weight: 600;
    text-decoration: none;
}
.nav-logout-right:hover { text-decoration: underline; }

/* Right-aligned email aligned to hero image width */
.nav-links {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#user-email {
    color: #bd726c;
    font-weight: 600;
}

.login-button {
    background-color: white;
    color: #bd726c;
    font-weight: 600;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
}

.login-button:hover {
    background-color: #fff4f2;
    border-color: #e3d3d1;
}

.logo {
    width: 32px;
    height: 32px;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Language Selector - Hidden for automatic detection */
.language-selector {
    display: none; /* Hide language selector for automatic detection */
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
}

#language-select {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text-dark);
    cursor: pointer;
    min-width: 120px;
    transition: border-color 0.2s ease;
}

#language-select:hover {
    border-color: var(--accent-color);
}

#language-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.1);
}

/* Hero Section */
.hero {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 0 0.5rem; /* Reduced bottom padding */
}

.hero-background {
    width: 100%;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative; /* For the button */
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    object-position: center 20%; 
    border-radius: 20px;
    max-height: 50vh;
}

.hero-content {
    position: absolute;
    top: 55%; /* Nudged down slightly */
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.hero-text-below {
    text-align: center;
    padding: 0.5rem 2rem; /* Reduced top and bottom padding */
    margin: 0;
}

.hero-text-below h1 {
    font-size: 1.3rem;
    color: black;
    font-weight: 500;
    margin: 0;
    line-height: 1.6;
}

/* Social Media Icons */
.social-media-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin: 1rem 0 0.5rem 0; /* Reduced top and bottom margin */
    padding: 0 2rem;
}

.social-media-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f8f9fa;
    color: #666;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 1px solid #e9ecef;
}

.social-media-icons a:hover {
    background-color: #bd726c;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(189, 114, 108, 0.3);
}

.social-media-icons svg {
    width: 20px;
    height: 20px;
}

.cta-button {
    background-color: #bd726c;
    color: white;
    border: none;
    padding: clamp(0.6rem, 0.5rem + 0.25vw, 0.75rem) clamp(1.2rem, 1rem + 0.5vw, 1.5rem);
    font-size: clamp(0.9rem, 0.8rem + 0.25vw, 1rem);
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(189, 114, 108, 0.3);
}

.cta-button:hover {
    background-color: #a8605b;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(189, 114, 108, 0.4);
}

/* Features Section */
.features {
    padding-top: 1rem; /* Reduced top padding */
    padding-bottom: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.feature-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    text-align: left;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.feature-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 0.75rem;
    flex-shrink: 0;
}

.feature-icon img {
    width: 20px;
    height: 20px;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-light);
    font-size: 0.8rem;
    flex-grow: 1;
}

/* Footer */
footer {
    background-color: var(--background-light);
    padding: 1rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 0.25rem;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.8rem;
}

.footer-links a.footer-feedback-link {
    color: #bd726c;
    font-weight: 600;
}

.footer-links a.footer-feedback-link:hover {
    color: #a8605b;
}

.copyright {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Dashboard layout */
.dashboard { padding: 20px; }
.dashboard-wrap { max-width: 1200px; margin: 0 auto; }
.dashboard-header h1 { color: #bd726c; margin-bottom: 8px; }
.dashboard-section { margin-top: 28px; }
.dashboard-section h2 { font-size: 1.1rem; color: #333; margin-bottom: 12px; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.card-item { background: #fff; border: 1px solid var(--border-color); border-radius: 10px; padding: 14px; box-shadow: 0 2px 6px rgba(0,0,0,0.04); }
.card-link { text-decoration: none; color: inherit; display: block; transition: transform .12s ease, box-shadow .12s ease; }
.card-link:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.08); }
.card-item h3 { font-size: 1rem; margin-bottom: 8px; color: #2c2c2c; }
.meta-row { display: flex; align-items: center; gap: 8px; color: #666; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; background: #fff4f2; color: #bd726c; font-size: 12px; border: 1px solid #e3d3d1; }
.muted { color: #666; font-size: 12px; }
.list-loading, .empty-state, .error-state { color: #666; background:#fff; border:1px dashed #eadfdd; padding: 12px; border-radius: 8px; }

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fefefe;
    margin: 5vh auto;
    padding: 2rem;
    border: 1px solid var(--border-color);
    width: 80%;
    max-width: 800px;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    line-height: 1.8;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.25rem;
}

.modal-actions .modal-accept-button {
    margin: 0; /* override default centering */
    display: inline-flex;
    align-items: center;
}

.modal-actions .secondary-button {
    padding: 0.75rem 2rem;
    font-size: 1rem;
}

/* Desert green button variant for Done */
.btn-green {
    background-color: #7ba68c !important; /* desert green */
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(123, 166, 140, 0.3) !important;
}
.btn-green:hover {
    background-color: #69927b !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(123, 166, 140, 0.4) !important;
}

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.modal-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}


.modal-accept-button {
    display: block;
    margin: 2rem auto 0 auto;
    background-color: #bd726c;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(189, 114, 108, 0.3);
}

.modal-accept-button:hover {
    background-color: #a8605b;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(189, 114, 108, 0.4);
}

.modal-content hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 1.5rem 0;
}

.modal-content ul, .modal-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.modal-content li {
    margin-bottom: 0.75rem;
}

.modal-content .rights-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.modal-content .rights-table th, 
.modal-content .rights-table td {
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    text-align: left;
}

.modal-content .rights-table th {
    background-color: var(--background-light);
}

.modal-content blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 1rem;
    margin: 1rem 0;
    font-style: italic;
    color: var(--text-light);
}


/* Responsive Design */
@media (max-width: 768px) {
    body {
        height: auto;
    }

    main {
        min-height: auto;
    }

    .hero {
        padding: 0;
    }

    .hero-background {
        height: auto; /* Let it scale with image */
        padding: 0 1rem;
    }

    .hero-background img {
        object-position: center 20%; /* Focus a bit higher on mobile */
        max-height: 40vh; /* Give it a max height */
    }
    
    .hero-text-below {
        margin: 0;
        padding: 1.5rem 1rem;
    }

    .hero-text-below h1 {
        font-size: 1.1rem;
    }

    .social-media-icons {
        gap: 1rem;
        margin: 1rem 0;
    }

    .social-media-icons a {
        width: 36px;
        height: 36px;
    }

    .social-media-icons svg {
        width: 18px;
        height: 18px;
    }

    .features {
        padding: 0 0 2rem 0;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 1rem;
        gap: 1rem;
    }

    .feature-card {
        padding: 1rem;
    }

    .feature-card h3 {
        font-size: 0.9rem;
    }

    .feature-card p {
        font-size: 0.75rem;
    }

    footer {
        position: static;
        width: 100%;
    }
}

/* RTL Support for Arabic */
body.rtl {
    direction: rtl;
}

body.rtl .navbar {
    flex-direction: row-reverse;
}

body.rtl .nav-brand {
    flex-direction: row-reverse;
}

body.rtl .social-media-icons {
    flex-direction: row-reverse;
}

body.rtl .features-grid {
    direction: rtl;
}

body.rtl .feature-card {
    text-align: right;
}

body.rtl .footer-links {
    flex-direction: row-reverse;
}

body.rtl .modal-content {
    text-align: right;
}

body.rtl .modal-content h2,
body.rtl .modal-content h3 {
    text-align: right;
}

body.rtl .modal-content table {
    direction: rtl;
}

/* Language selector responsive - Hidden but keeping styles for potential future use */
@media (max-width: 768px) {
    .navbar {
        flex-direction: row; /* Keep simple row layout since no language selector */
        gap: 1rem;
        padding: 1rem;
        justify-content: center; /* Center the brand */
    }

    .language-selector {
        display: none; /* Ensure it stays hidden on mobile */
    }

    #language-select {
        min-width: 100px;
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Beta Signup Form */
.form-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    width: min(680px, 92vw);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.form-card h1 {
    font-size: 1.6rem;
    margin-bottom: 1.25rem;
    color: #bd726c;
    text-align: center;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    row-gap: 1.25rem;
}

.form-grid + .form-grid {
    margin-top: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-group label.required::after {
    content: " *";
    color: #bd726c;
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.8rem 0.85rem;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-dark);
    background: white;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
}

.radio-option {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.95rem;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group textarea {
    resize: vertical;
    min-height: 96px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.12);
}

.form-actions {
    margin-top: 1.25rem;
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

@media (min-width: 640px) {
    .form-grid.two-col {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    .form-group.span-2 {
        grid-column: 1 / -1;
    }
}

/* Beta page overrides */
.beta-page .hero-background img {
    display: none;
}

.beta-page .hero-content {
    position: static;
    transform: none;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    width: 100%;
}

.beta-page .form-card {
    width: 100%;
    max-width: 1280px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    background: white;
}

.beta-page .hero-background {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0; /* align with index hero */
    min-height: calc(100vh - var(--layout-offset));
    border: none;
    border-radius: 20px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.beta-page .features {
    display: none;
}

.beta-page .social-media-icons,
.beta-page .hero-text-below {
    display: none;
}

.secondary-button {
    background-color: white;
    color: var(--text-dark);
    border: 1px solid #eadfdd;
    padding: clamp(0.6rem, 0.5rem + 0.25vw, 0.75rem) clamp(1.2rem, 1rem + 0.5vw, 1.5rem);
    font-size: clamp(0.9rem, 0.8rem + 0.25vw, 1rem);
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.secondary-button:hover {
    background-color: #fff4f2;
    border-color: #e3d3d1;
}

/* Content page heading color (cactus flower red) */
.content-page h1,
.content-page h2,
.content-page h3,
.content-page h4 {
    color: #bd726c;
}

/* Authenticated personal recipe search */
.personal-search-page {
    background: white;
}
.personal-search-page [hidden] { display: none !important; }
.personal-navbar { max-width: 1200px; margin: 0 auto; }
.personal-search-main { width: min(1200px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0 64px; }
.search-hero { max-width: 820px; margin: 0 auto; text-align: center; }
.search-chef-mark {
    display: grid; place-items: center; width: 68px; height: 68px; margin: 0 auto 18px;
    border: 1px solid #eadfdd; border-radius: 50%; background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 10px 28px rgba(83, 60, 52, 0.09);
}
.search-chef-mark img { width: 42px; height: 42px; object-fit: contain; }
.search-eyebrow { color: #a8605b; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; }
.search-hero h1 {
    margin: 0; color: black; font-size: 1.3rem; font-weight: 500; letter-spacing: 0; line-height: 1.6;
}
.search-welcome { max-width: 680px; margin: 4px auto 0; color: var(--text-light); font-size: .9rem; }
.recipe-search-form {
    display: flex; align-items: flex-end; gap: 8px; margin-top: 18px; padding: 7px;
    border: 1px solid var(--border-color); border-radius: 10px; background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.recipe-search-form textarea {
    flex: 1; min-height: 44px; max-height: 120px; padding: 11px 12px; resize: none;
    overflow-y: auto; border: 0; outline: 0; background: transparent; color: #2e2b29;
    font: inherit; font-size: .95rem; line-height: 1.4;
}
.recipe-search-form textarea::placeholder { color: #9a8f87; }
.recipe-search-form:focus-within {
    border-color: #bd726c;
    box-shadow: 0 0 0 2px rgba(189, 114, 108, 0.10);
}
.search-submit {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
    padding: 0 16px; border: 0; border-radius: 8px; background: #bd726c; color: #fff;
    cursor: pointer; font: inherit; font-size: .9rem; font-weight: 600; transition: background-color .16s ease, transform .16s ease;
}
.search-submit:hover { background: #aa625d; transform: translateY(-1px); }
.search-submit:disabled { cursor: wait; opacity: .55; transform: none; }
.search-suggestions { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin-top: 10px; }
.search-suggestions button, .category-filter, .personal-search-page .secondary-button {
    border: 1px solid #e2dcd6; border-radius: 999px; background: rgba(255, 255, 255, 0.76);
    color: var(--text-light); cursor: pointer; font: inherit; font-size: .76rem; font-weight: 500;
}
.search-suggestions button { padding: 6px 10px; }
.search-suggestions button:hover, .category-filter:hover, .personal-search-page .secondary-button:hover {
    border-color: #bd726c; color: #a8605b;
}
.search-workspace { margin-top: 30px; }
.search-status { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 26px; color: #6e6259; }
.search-spinner {
    width: 22px; height: 22px; border: 2px solid #eadfdd; border-top-color: #bd726c;
    border-radius: 50%; animation: search-spin .75s linear infinite;
}
@keyframes search-spin { to { transform: rotate(360deg); } }
.search-error {
    max-width: 780px; margin: 0 auto 22px; padding: 14px 16px;
    border: 1px solid rgba(172, 67, 57, .28); border-radius: 12px;
    background: rgba(172, 67, 57, .07); color: #913c34;
}
.assistant-note {
    max-width: 820px; margin: 0 auto 24px; padding: 14px 16px; border-left: 2px solid #bd726c;
    border-radius: 0 8px 8px 0; background: var(--background-light); color: var(--text-dark); font-size: .9rem;
}
.assistant-note-label {
    display: block; margin-bottom: 6px; color: #a8605b; font-size: .75rem;
    font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.assistant-note p { white-space: pre-wrap; line-height: 1.55; }
.results-toolbar { display: flex; justify-content: flex-end; margin-bottom: 12px; }
#recipes-section > h2, .book-results-section h2 { margin-bottom: 12px; color: #333; font-size: 1.1rem; font-weight: 600; }
.personal-search-page .secondary-button { padding: 6px 10px; border-radius: 6px; white-space: nowrap; font-size: .76rem; }
.category-filters { display: flex; gap: 8px; margin-bottom: 20px; padding-bottom: 4px; overflow-x: auto; }
.category-filter { padding: 8px 12px; white-space: nowrap; }
.category-filter.active { border-color: #bd726c; background: #bd726c; color: #fff; }
.search-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.search-recipe-card {
    min-width: 0; overflow: hidden; border: 1px solid var(--border-color); border-radius: 10px;
    background: #fff; color: inherit; text-decoration: none; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.search-recipe-card:hover, .search-recipe-card:focus-visible {
    border-color: #d8bbb7; transform: translateY(-3px); box-shadow: 0 14px 30px rgba(83, 60, 52, 0.11);
}
.recipe-card-visual { position: relative; height: 165px; overflow: hidden; background: var(--background-light); }
.recipe-card-image { width: 100%; height: 100%; object-fit: cover; }
.recipe-image-placeholder, .book-image-placeholder {
    display: grid; place-items: center; width: 100%; height: 100%; color: #a48f83;
    font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}
.recipe-rank {
    position: absolute; top: 12px; left: 12px; display: grid; place-items: center;
    width: 31px; height: 31px; border-radius: 50%; background: rgba(255, 255, 255, .92);
    color: #4f4843; font-size: .78rem; font-weight: 700;
}
.recipe-card-content { padding: 14px; }
.recipe-card-content h3, .book-card-content h3 { color: #2c2c2c; font-size: 1rem; line-height: 1.35; }
.recipe-card-source { margin-top: 7px; color: #8b7e75; font-size: .78rem; }
.recipe-card-preview { margin-top: 12px; color: #6e6259; font-size: .86rem; line-height: 1.5; }
.recipe-diet-warning {
    margin-top: 12px; padding: 9px 10px; border-radius: 8px; background: rgba(189, 114, 108, .10);
    color: #9b544f; font-size: .78rem; line-height: 1.4;
}
.recipe-card-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.recipe-card-meta span {
    padding: 5px 8px; border-radius: 999px; background: #f7f3ef; color: #766a62;
    font-size: .73rem; text-transform: capitalize;
}
.book-results-section { margin-top: 28px; }
.book-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.search-book-card {
    display: grid; grid-template-columns: 92px 1fr; gap: 12px; min-width: 0; padding: 12px;
    border: 1px solid var(--border-color); border-radius: 10px; background: #fff;
}
.book-card-visual { height: 124px; overflow: hidden; border-radius: 8px; background: var(--background-light); }
.book-card-visual img { width: 100%; height: 100%; object-fit: cover; }
.book-card-content { min-width: 0; padding-top: 4px; }
.search-empty {
    max-width: 620px; margin: 0 auto; padding: 38px 20px; border: 1px dashed #d9ccc5;
    border-radius: 16px; text-align: center; color: #6e6259;
}
.search-empty h2 { margin-bottom: 8px; color: #2e2b29; }
.visually-hidden {
    position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important;
    margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important; border: 0 !important;
}
@media (max-width: 900px) {
    .search-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .book-card-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
    .personal-search-main { width: min(100% - 28px, 1200px); padding: 22px 0 52px; }
    .personal-navbar .nav-back { left: 1rem; }
    .personal-navbar .nav-logout-right { right: 1rem; }
    .personal-navbar .nav-back, .personal-navbar .nav-logout-right { font-size: .78rem; }
    .recipe-search-form { display: block; border-radius: 10px; }
    .recipe-search-form textarea { width: 100%; }
    .search-submit { width: 100%; }
    .search-suggestions { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; }
    .search-suggestions button { white-space: nowrap; }
    .search-workspace { margin-top: 26px; }
    .personal-search-page .secondary-button { white-space: normal; text-align: center; }
    .search-card-grid { grid-template-columns: 1fr; }
    .recipe-card-visual { height: 190px; }
    .search-book-card { grid-template-columns: 84px 1fr; }
    .book-card-visual { height: 116px; }
}
