/*
 * Bartender Blueprint theme, 2026-09-30.
 *
 * Loaded after materialize.css and style.css and overrides both. Written
 * mobile first: the base rules are for phones, then min-width steps at 600px
 * (large phones, small tablets), 992px (desktop: top menu replaces the bottom
 * toolbar) and 1280px (wide desktop).
 *
 * Colors come from the logo: the coral-to-amber cocktail glass and the
 * charcoal script wordmark.
 */

:root {
    --ink: #201e1d;
    --ink-soft: #4a443d;
    --muted: #6f6862;
    --line: #ece6e0;
    --bg: #fbf8f5;
    --card: #ffffff;
    --brand: #e5405e;
    --brand-dark: #c52f4b;
    --amber: #f59e2b;
    --brand-gradient: linear-gradient(135deg, #e5405e 0%, #f0703f 55%, #f59e2b 100%);
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(32, 30, 29, .06), 0 6px 20px rgba(32, 30, 29, .07);
    --shadow-hover: 0 2px 4px rgba(32, 30, 29, .08), 0 14px 34px rgba(32, 30, 29, .12);
    --header-h: 64px;
    --toolbar-h: 64px;
    --gutter: 16px;
}

/* ---------- base ---------- */

html {
    -webkit-text-size-adjust: 100%;
}

body {
    background: var(--bg);
    color: var(--ink-soft);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

body.has-toolbar {
    padding-bottom: calc(var(--toolbar-h) + env(safe-area-inset-bottom));
}

h1, h2, h3, h4, h5, h6 {
    color: var(--ink);
    letter-spacing: -.01em;
}

a {
    color: var(--ink);
    -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 3px solid rgba(229, 64, 94, .45);
    outline-offset: 2px;
}

img {
    max-width: 100%;
}

.container {
    width: 100%;
    max-width: 1240px;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
    margin: 0 auto;
}

.container .row {
    margin-left: 0;
    margin-right: 0;
}

.divider {
    background: var(--line);
    margin: 20px 0;
}

.spacer-block {
    height: 28px;
}

.spacer-block.spacer-bottom {
    height: 40px;
}

/* ---------- buttons ---------- */

.button,
a.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-height: 48px;
    padding: 0 28px;
    border: 0;
    border-radius: 999px;
    background: var(--brand-gradient);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    box-shadow: 0 6px 16px rgba(229, 64, 94, .28);
    transition: transform .15s ease, box-shadow .15s ease;
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(229, 64, 94, .34);
}

.button.button-outline {
    background: transparent;
    color: var(--ink);
    box-shadow: inset 0 0 0 1.5px var(--line);
}

/* ---------- site header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 700;
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--line);
    padding-top: env(safe-area-inset-top);
}

.site-header-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    height: var(--header-h);
}

.site-logo {
    display: flex;
    align-items: center;
    flex: 0 1 auto;
    min-width: 0;
}

.site-nav,
.toolbar {
    background: transparent;
    box-shadow: none;
    height: auto;
    line-height: normal;
    width: auto;
}

.site-logo img {
    display: block;
    height: 38px;
    width: auto;
    max-width: 100%;
}

.site-nav,
.site-account {
    display: none;
}

.site-menu-btn {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    color: var(--ink);
    font-size: 26px;
}

.site-menu-btn:hover {
    background: var(--bg);
}

/* On phones the header only appears on the home page; inner pages keep their
   own title bar with a back arrow. */
.site-header:not(.site-header-home) {
    display: none;
}

/* ---------- sidebar (phone menu) ---------- */

.sidenav {
    width: 300px;
    padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
    background: #fff;
}

.sidenav .sidebar-header {
    height: auto;
    margin-bottom: 20px;
}

.sidenav .sidebar-header img {
    width: 220px;
    height: auto;
    float: none;
    margin: 0;
}

.sidenav .sidebar-search input[type=text] {
    height: 46px;
    margin: 0 0 12px;
    border: 1px solid var(--line) !important;
    border-radius: 12px !important;
    background: var(--bg);
    padding: 0 14px !important;
    font-size: 16px !important;
}

.sidenav li > a {
    height: 50px;
    line-height: 50px;
    padding: 0 10px;
    border-radius: 10px;
    color: var(--ink);
    font-size: 17px;
    font-weight: 500;
}

.sidenav li > a:hover {
    background: var(--bg);
}

.sidenav li > a > ion-icon {
    font-size: 22px;
    margin-right: 14px;
    color: var(--brand);
}

/* ---------- inner-page title bar ---------- */

.navbar {
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 12px 0;
    padding-top: calc(12px + env(safe-area-inset-top));
}

.navbar h3 {
    font-size: 19px;
    font-weight: 700;
    line-height: 44px;
}

.navbar.navbar-pages .content {
    position: relative;
}

.navbar.navbar-pages .content a {
    position: absolute;
    left: -6px;
    top: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink);
}

.navbar.navbar-pages .content ion-icon {
    float: none;
    font-size: 24px;
}

.navbar.navbar-searchpage {
    padding-top: calc(14px + env(safe-area-inset-top));
    padding-bottom: 14px;
}

/* ---------- home hero ---------- */

.home-hero {
    padding: 20px 0 18px;
}

.home-title {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -.02em;
}

.home-sub {
    margin-top: 8px;
    color: var(--muted);
    font-size: 16px;
}

.home-search {
    position: relative;
    margin-top: 18px;
}

.home-search ion-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--muted);
    pointer-events: none;
    z-index: 1;
}

form.home-search input[type=text] {
    height: 52px;
    margin: 0;
    padding: 0 16px 0 46px !important;
    background: #fff;
    border: 1px solid var(--line) !important;
    border-radius: 14px !important;
    font-size: 16px !important;
    color: var(--ink);
    box-shadow: var(--shadow);
}

form.home-search input[type=text]:focus:not([readonly]) {
    border: 1px solid var(--brand) !important;
    box-shadow: 0 0 0 4px rgba(229, 64, 94, .14) !important;
}

/* ---------- section titles ---------- */

.block-title {
    display: flex;
    align-items: baseline;
    margin-bottom: 14px;
}

.block-title h3,
.block-title.title-sm h3 {
    display: flex;
    align-items: baseline;
    width: 100%;
    font-size: 21px;
    font-weight: 700;
}

.show-all-link-r {
    margin-left: auto;
    float: none;
    font-family: "DM Sans", sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--brand);
    white-space: nowrap;
}

/* ---------- recipe photos ---------- */

.recipe-img {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #f3ede7;
    border-radius: var(--radius);
}

.recipe-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.recipe-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #fff4ec 0%, #fde3dc 100%);
}

.recipe-img-placeholder img {
    width: 42%;
    height: auto;
    border-radius: 22%;
    box-shadow: 0 6px 18px rgba(229, 64, 94, .16);
}

/* ---------- statistics row ---------- */

.recipe-statistic {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin: 0;
}

ul.recipe-statistic > li,
.recipe-item .recipe-caption .recipe-statistic li {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    font-size: 14px;
    color: var(--muted);
}

.recipe-statistic li ion-icon {
    font-size: 16px;
    top: 0;
    color: #c4bbb3;
}

.recipe-statistic li ion-icon.eye-active { color: #2e9e6a; }
.recipe-statistic li ion-icon.heart-active { color: var(--brand); }
.recipe-statistic li ion-icon.bookmark-active { color: #3b7bd6; }
.recipe-statistic li ion-icon.star-active { color: var(--amber); }

/* ---------- featured carousel ---------- */

.popular-recipe {
    overflow: hidden;
}

.popular-recipe .swiper {
    overflow: visible;
}

.popular-recipe .swiper-slide,
.popular-recipe .swiper-slide {
    width: auto;
}

.feature-card {
    position: relative;
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.feature-card .recipe-img {
    border-radius: var(--radius);
}

.feature-card::after {
    content: "";
    position: absolute;
    inset: 40% 0 0 0;
    background: linear-gradient(180deg, rgba(20, 16, 14, 0) 0%, rgba(20, 16, 14, .78) 100%);
    pointer-events: none;
}

.feature-caption {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 16px;
    z-index: 2;
}

.feature-caption .recipe-title {
    color: #fff;
    font-family: "Red Hat Display", sans-serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.15;
    margin-top: 6px;
}

.feature-caption .recipe-statistic li,
.feature-caption .recipe-statistic li ion-icon {
    color: rgba(255, 255, 255, .88);
}

/* ---------- browse by spirit ---------- */

.spirit-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.spirit-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.spirit-tile:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: transparent;
}

.spirit-tile img {
    width: auto;
    height: 96px;
    object-fit: contain;
}

.spirit-tile span {
    margin-top: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
}

/* ---------- photo card grid ---------- */

.card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.recipe-card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .18s ease, box-shadow .18s ease;
}

.recipe-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.recipe-card .recipe-img {
    border-radius: 0;
}

.recipe-card-body {
    padding: 12px 12px 14px;
}

.recipe-card .recipe-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ink);
    margin-bottom: 6px;
}

/* ---------- list cards ---------- */

.list-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.list-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 12px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform .18s ease, box-shadow .18s ease;
}

.list-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.list-card .recipe-img {
    flex: 0 0 96px;
    width: 96px;
    border-radius: 12px;
}

.list-card-body {
    flex: 1;
    min-width: 0;
}

.list-card .recipe-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--ink);
    margin-bottom: 4px;
}

.list-card .ingredient-list {
    margin-top: 8px;
}

ul.ingredient-list > li,
.list-card .ingredient-list li {
    font-size: 14px;
    line-height: 1.5;
    color: var(--muted);
}

.list-card .ingredient-list li:nth-child(n+5) {
    display: none;
}

/* ---------- call to action ---------- */

.call-to-action .content {
    padding: 32px 22px;
    border: 0;
    border-radius: 20px;
    text-align: center;
    background: var(--brand-gradient);
    color: #fff;
    box-shadow: 0 14px 34px rgba(229, 64, 94, .25);
}

.call-to-action .content::before {
    display: none;
}

.call-to-action .content h4 {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}

.call-to-action .content p {
    max-width: 480px;
    margin: 0 auto 20px;
    color: rgba(255, 255, 255, .92);
}

.call-to-action .button {
    background: #fff;
    color: var(--brand-dark);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
}

/* ---------- empty state ---------- */

.empty-state {
    padding: 36px 22px;
    text-align: center;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

/* ---------- recent searches ---------- */

.recent-search .content ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.recent-search .content ul li {
    margin: 0;
}

.recent-search .content ul a {
    padding: 8px 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 15px;
    color: var(--ink);
}

.recent-search .content ul li ion-icon {
    font-size: 17px;
    margin-right: 6px;
}

/* ---------- recipe detail ---------- */

.recipe-details .detail-media .recipe-img {
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.detail-header {
    margin-top: 18px;
}

.detail-title {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -.02em;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.detail-tags li {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
}

.detail-tags li.strength {
    background: #fde6e9;
    color: var(--brand-dark);
}

.detail-tags li.sweetness {
    background: #fef0dc;
    color: #a4600c;
}

.recipe-details .detail-header .rating {
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 14px 0 0;
}

.recipe-details .detail-header .rating li {
    display: block;
}

.recipe-details .detail-header .rating a {
    display: flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #ddd4cc;
}

.recipe-details .detail-header .rating a.active,
.rating a.active {
    color: var(--amber);
}

.recipe-details .detail-header .rating .rating-avg {
    margin-left: 8px;
    font-size: 15px;
    color: var(--muted);
}

.detail-reaction {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.detail-reaction .action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
}

.recipe-details .detail-reaction ion-icon {
    float: none;
    margin: 0;
    font-size: 20px;
}

.detail-reaction .action.heart-active { color: var(--brand); border-color: #f7c6cf; background: #fff5f7; }
.detail-reaction .action.bookmark-active { color: #2f6fca; border-color: #c9dbf5; background: #f4f8fe; }
.detail-reaction .action.active { color: var(--muted); background: var(--bg); }

.detail-reaction-quiet .action {
    background: transparent;
    font-weight: 500;
    color: var(--muted);
}

.detail-ingredient,
.detail-steps {
    padding: 20px;
    margin-bottom: 16px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.recipe-details .detail-ingredient ul li {
    list-style: none;
    margin: 0;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    font-size: 17px;
    color: var(--ink);
}

.recipe-details .detail-ingredient ul li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.recipe-details .detail-ingredient ul li strong {
    color: var(--brand-dark);
    font-weight: 700;
    margin-right: 4px;
}

.detail-method {
    font-size: 17px;
    color: var(--ink-soft);
}

.detail-method section + section {
    margin-top: 14px;
}

.detail-method h3 {
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
    margin-bottom: 6px;
}

.detail-method ol,
.detail-method ul {
    padding-left: 22px;
}

.detail-method li {
    list-style: decimal;
    margin-bottom: 6px;
}

/* ---------- forms (login, signup, add, edit) ---------- */

form input[type=text],
form input[type=email],
form input[type=password],
form input[type=number] {
    height: 50px;
    background: #fff;
    border: 1px solid var(--line) !important;
    border-radius: 12px !important;
    font-size: 16px !important;
}

form input[type=text]:not(.browser-default):focus:not([readonly]),
form input[type=email]:not(.browser-default):focus:not([readonly]),
form input[type=password]:not(.browser-default):focus:not([readonly]) {
    border: 1px solid var(--brand) !important;
    box-shadow: 0 0 0 4px rgba(229, 64, 94, .14) !important;
}

.sign-up form p a,
.login form p a,
.tabs .tab a.active,
.tabs .tab a:hover,
.tabs .tab a:focus,
.tabs .tab a:focus.active {
    color: var(--brand);
}

.tabs {
    background: transparent;
}

.tabs .indicator {
    background-color: var(--brand);
}

.user-ingredient.active {
    color: #2e9e6a;
}

.profile .profile-header .profile-mark {
    width: 100%;
    max-width: 96px;
    border-radius: 22%;
    box-shadow: var(--shadow);
}

/* ---------- bottom toolbar (phones and tablets) ---------- */

.toolbar .toolbar-bottom {
    height: calc(var(--toolbar-h) + env(safe-area-inset-bottom));
    padding: 0 6px env(safe-area-inset-bottom) !important;
    background: rgba(255, 255, 255, .96);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -4px 18px rgba(32, 30, 29, .05);
}

.toolbar .toolbar-bottom .toolbar-item {
    flex: 1;
}

.toolbar .toolbar-bottom .toolbar-item .toolbar-link {
    gap: 2px;
    padding: 0;
    color: #948b83;
    border-top: 0;
}

.toolbar .toolbar-bottom .toolbar-item .toolbar-link span {
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1;
}

.toolbar .toolbar-bottom .toolbar-item .toolbar-link ion-icon {
    font-size: 24px;
    height: 26px;
    line-height: 26px;
}

.toolbar .toolbar-bottom .toolbar-item .toolbar-link.toolbar-link-active {
    color: var(--brand);
    border-top: 0;
}

.toolbar .toolbar-bottom .toolbar-item.toolbar-add a ion-icon {
    width: 44px;
    height: 44px;
    line-height: 44px;
    margin-top: -18px;
    border-radius: 50%;
    background: var(--brand-gradient);
    color: #fff;
    font-size: 28px;
    box-shadow: 0 6px 16px rgba(229, 64, 94, .35);
}

.toolbar .toolbar-bottom .toolbar-item.toolbar-add a span {
    margin-top: 2px;
}

#pwa-banner {
    bottom: calc(var(--toolbar-h) + 14px + env(safe-area-inset-bottom));
    background: var(--ink);
}

#pwa-install-btn {
    color: var(--ink);
}

/* ================================================================ */
/*  600px and up: large phones, small tablets                        */
/* ================================================================ */

@media (min-width: 600px) {

    :root {
        --gutter: 24px;
    }

    .site-logo img {
        height: 44px;
    }

    .home-title {
        font-size: 38px;
    }

    .spirit-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .card-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }

    .list-card .recipe-img {
        flex-basis: 120px;
        width: 120px;
    }

    .call-to-action .content {
        padding: 44px 32px;
    }
}

/* ================================================================ */
/*  992px and up: desktop. Top menu on, bottom toolbar off.          */
/* ================================================================ */

@media (min-width: 992px) {

    :root {
        --header-h: 80px;
        --gutter: 32px;
    }

    body.has-toolbar {
        padding-bottom: 0;
    }

    .toolbar,
    #pwa-banner {
        display: none !important;
    }

    .site-header:not(.site-header-home) {
        display: block;
    }

    .site-logo {
        flex-shrink: 0;
    }

    .site-logo img {
        height: 54px;
    }

    .site-menu-btn {
        display: none;
    }

    .site-nav {
        display: flex;
        align-items: center;
        gap: 4px;
        margin-left: auto;
    }

    .site-nav a,
    .site-account-link {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        height: 42px;
        padding: 0 14px;
        border-radius: 999px;
        font-size: 16px;
        font-weight: 600;
        color: var(--ink-soft);
        white-space: nowrap;
        transition: background .15s ease, color .15s ease;
    }

    .site-nav a ion-icon,
    .site-account-link ion-icon {
        font-size: 19px;
    }

    .site-nav a:hover,
    .site-account-link:hover {
        background: var(--bg);
        color: var(--ink);
    }

    .site-nav a.is-active,
    .site-account-link.is-active {
        background: #fde8ec;
        color: var(--brand-dark);
    }

    .site-account {
        display: flex;
        align-items: center;
        gap: 6px;
        padding-left: 14px;
        margin-left: 6px;
        border-left: 1px solid var(--line);
    }

    .site-account-link span {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .site-account-quiet {
        color: var(--muted);
        font-weight: 500;
    }

    .site-cta {
        display: inline-flex;
        align-items: center;
        height: 42px;
        padding: 0 20px;
        border-radius: 999px;
        background: var(--brand-gradient);
        color: #fff;
        font-size: 16px;
        font-weight: 700;
        white-space: nowrap;
        box-shadow: 0 6px 16px rgba(229, 64, 94, .28);
    }

    /* Inner pages: the header carries navigation, so the title bar becomes
       a plain page heading. */
    .navbar {
        background: transparent;
        border-bottom: 0;
        padding: 28px 0 0;
    }

    .navbar.navbar-pages .content,
    .navbar .navbar-title-sm {
        text-align: left;
    }

    .navbar.navbar-pages .content h3,
    .navbar .navbar-title-sm h3 {
        font-size: 30px;
        font-weight: 800;
    }

    .navbar.navbar-pages .content a {
        position: static;
        display: inline-flex;
        vertical-align: middle;
        margin-right: 6px;
        border-radius: 12px;
        background: #fff;
        box-shadow: var(--shadow);
    }

    .navbar.navbar-searchpage {
        padding-top: 32px;
    }

    .navbar-searchpage .container {
        max-width: 780px;
    }

    .home-hero {
        padding: 48px 0 32px;
        text-align: center;
    }

    .home-title {
        font-size: 52px;
    }

    .home-sub {
        font-size: 19px;
    }

    .home-search {
        max-width: 620px;
        margin: 26px auto 0;
    }

    form.home-search input[type=text] {
        height: 58px;
        font-size: 17px !important;
    }

    .spacer-block {
        height: 48px;
    }

    .block-title h3,
    .block-title.title-sm h3 {
        font-size: 26px;
    }

    .spirit-grid {
        grid-template-columns: repeat(9, 1fr);
        gap: 12px;
    }

    .spirit-tile img {
        height: 110px;
    }

    .card-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 22px;
    }

    .recipe-card .recipe-title {
        font-size: 17px;
    }

    .list-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }

    .feature-caption .recipe-title {
        font-size: 22px;
    }

    .call-to-action .content {
        padding: 56px 40px;
    }

    .call-to-action .content h4 {
        font-size: 32px;
    }

    /* Recipe detail: photo left (sticky), everything else right. */
    .recipe-layout {
        display: grid;
        grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
        gap: 48px;
        align-items: start;
    }

    .detail-media {
        position: sticky;
        top: calc(var(--header-h) + 24px);
    }

    .detail-header {
        margin-top: 0;
    }

    .detail-title {
        font-size: 44px;
    }

    .detail-ingredient,
    .detail-steps {
        padding: 26px 28px;
    }

    .profile,
    .sign-up,
    .login,
    .edit-profile,
    .add-recipe {
        max-width: 780px;
        margin: 0 auto;
    }
}

/* ================================================================ */
/*  1280px and up: wide desktop                                      */
/* ================================================================ */

@media (min-width: 1280px) {

    .site-nav a {
        padding: 0 16px;
    }

    .list-card .recipe-img {
        flex-basis: 140px;
        width: 140px;
    }
}

/* ---------- flash messages ---------- */

.flash {
    margin: 0 0 18px;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
}

.flash-error {
    background: #fdecee;
    color: #9d2336;
    border: 1px solid #f7c6cf;
}

.flash-success {
    background: #e9f7ef;
    color: #1f6b43;
    border: 1px solid #bfe6cf;
}

/* search matches, marked by highlight_keywords() with an inline yellow */
.vf-highlight {
    background: #ffe3a3 !important;
    border-radius: 3px;
    padding: 0 2px;
}

/* ---------- pagination ---------- */

.pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 28px 0 8px;
}

.pager a,
.pager span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
}

.pager a {
    background: #fff;
    border: 1px solid var(--line);
}

.pager a:hover {
    border-color: var(--brand);
    color: var(--brand-dark);
}

.pager .is-current {
    background: var(--brand-gradient);
    color: #fff;
}

.pager .pager-gap {
    min-width: 20px;
    padding: 0;
    color: var(--muted);
}

.pager .pager-step span {
    display: none;
}

/* ---------- recipe list switcher ---------- */

.list-switch {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.list-switch a {
    flex: 0 0 auto;
    padding: 9px 16px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    font-size: 15px;
    font-weight: 600;
    color: var(--ink-soft);
}

.list-switch a.is-active {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.block-count {
    margin-left: 10px;
    font-family: "DM Sans", sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: var(--muted);
}

/* ---------- forms: log in, sign up, edit profile, add recipe ---------- */

.auth-card .container {
    max-width: 560px;
}

.auth-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 6px;
}

.auth-sub {
    color: var(--muted);
    margin-bottom: 20px;
}

.auth-form {
    padding: 22px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.auth-form label {
    display: block;
    margin: 14px 0 6px;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
}

.field-hint {
    font-weight: 400;
    color: var(--muted);
    font-size: 14px;
}

.auth-form input[type=text],
.auth-form input[type=email],
.auth-form input[type=password],
.auth-form textarea,
.auth-form select {
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}

.auth-form textarea {
    height: auto;
    min-height: 140px;
    padding: 12px 14px !important;
    font-size: 16px;
    line-height: 1.5;
    border: 1px solid var(--line) !important;
    border-radius: 12px !important;
}

.auth-form select {
    height: 50px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    font-size: 16px;
}

.auth-form .file-input {
    display: block;
    width: 100%;
    padding: 12px;
    border: 1px dashed #d8cfc6;
    border-radius: 12px;
    background: var(--bg);
    font-size: 15px;
}

.auth-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0 14px;
}

.form-section {
    margin: 26px 0 4px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    font-size: 18px;
    font-weight: 700;
}

.auth-form > input[type=hidden] + .form-section {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.button-block {
    display: flex;
    width: 100%;
    margin-top: 22px;
    cursor: pointer;
}

.auth-switch {
    margin-top: 18px;
    text-align: center;
}

.auth-switch a {
    color: var(--brand);
    font-weight: 600;
}

.auth-stats {
    display: flex;
    gap: 10px;
    margin: 0 0 18px;
}

.auth-stats li {
    flex: 1;
    padding: 12px 8px;
    background: #fff;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
}

.auth-stats strong {
    display: block;
    font-family: "Red Hat Display", sans-serif;
    font-size: 20px;
    color: var(--ink);
}

.auth-stats span {
    font-size: 13px;
    color: var(--muted);
}

.ingredient-row {
    display: grid;
    grid-template-columns: 34% 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.ingredient-row input {
    margin: 0 !important;
}

.add-row-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-weight: 600;
    color: var(--brand);
}

/* ---------- profile ---------- */

.profile-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.profile-card .profile-mark {
    width: 72px;
    height: 72px;
    border-radius: 22%;
    box-shadow: var(--shadow);
}

.profile-card .profile-name {
    flex: 1;
    min-width: 180px;
}

.profile-card .profile-name h3 {
    font-size: 22px;
    margin-bottom: 4px;
}

.profile-card .profile-name p {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 15px;
}

.profile-card .button {
    min-height: 42px;
}

.profile-tabs.tabs {
    display: flex;
    height: auto;
    overflow-x: auto;
    border-bottom: 1px solid var(--line);
}

.profile-tabs .tab {
    flex: 0 0 auto;
    height: 48px;
    line-height: 48px;
}

.profile-tabs .tab a {
    padding: 0 16px;
    font-size: 15px;
    font-weight: 600;
    text-transform: none;
}

.bar-intro {
    margin-bottom: 12px;
    color: var(--muted);
}

.bar-filter {
    margin: 0 0 14px;
}

.bar-group {
    margin-bottom: 10px;
    background: #fff;
    border-radius: 14px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.bar-group summary {
    display: flex;
    align-items: center;
    padding: 15px 18px;
    cursor: pointer;
    font-family: "Red Hat Display", sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: var(--ink);
    list-style: none;
}

.bar-group summary::-webkit-details-marker {
    display: none;
}

.bar-group summary::after {
    content: "+";
    margin-left: 12px;
    font-size: 22px;
    color: var(--muted);
}

.bar-group[open] summary::after {
    content: "\2212";
}

.bar-group-count {
    margin-left: auto;
    font-family: "DM Sans", sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
}

.bar-group ul.ingredients {
    display: grid;
    grid-template-columns: 1fr;
    margin: 0;
    padding: 0 10px 10px;
}

.bar-group .user-ingredient {
    display: flex;
    align-items: center;
    gap: 10px;
    float: none;
    width: auto;
    min-height: 44px;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 16px;
    color: var(--ink-soft);
    user-select: none;
}

.bar-group .user-ingredient:hover {
    background: var(--bg);
}

.bar-group .user-ingredient::before {
    content: "";
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    border: 2px solid #cfc5bb;
    border-radius: 6px;
    background: #fff center / 14px no-repeat;
}

.bar-group .user-ingredient.active::before {
    border-color: #2e9e6a;
    background-color: #2e9e6a;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.bar-group .user-ingredient.active {
    color: var(--ink);
    font-weight: 600;
}

.is-busy {
    opacity: .55;
    pointer-events: none;
}

/* ---------- star rating form ---------- */

form.rating {
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 14px 0 0;
}

form.rating button {
    display: flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    font-size: 25px;
    color: #ddd4cc;
    cursor: pointer;
}

form.rating button.active {
    color: var(--amber);
}

form.rating .rating-avg {
    margin-left: 8px;
    font-size: 15px;
    color: var(--muted);
}

@media (min-width: 600px) {

    .auth-row {
        grid-template-columns: 1fr 1fr;
    }

    .bar-group ul.ingredients {
        grid-template-columns: 1fr 1fr;
    }

    .pager .pager-step span {
        display: inline;
    }
}

@media (min-width: 992px) {

    .bar-group ul.ingredients {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* sign-up bot trap: off screen, not display:none, which some bots skip */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}
