/* ============================================================
   RATE YOUR BEER
   Mobile-first application styles
   ============================================================ */


/* ------------------------------------------------------------
   DESIGN TOKENS
   ------------------------------------------------------------ */

:root {
    --bg: #090807;
    --bg-soft: #11100e;
    --surface: #151310;
    --surface-hover: #1b1814;
    --surface-light: #211d18;

    --text: #ffffff;
    --text-soft: rgba(255, 255, 255, 0.72);
    --text-muted: rgba(255, 255, 255, 0.48);

    --border: rgba(255, 255, 255, 0.09);

    --beer-gold: #f5a623;
    --beer-light: #ffc85a;

    --rating-excellent: #42b96b;
    --rating-good: #8fbf4d;
    --rating-average: #e0ad3d;
    --rating-poor: #d9694c;
    --rating-none: #55514b;

    --nav-height: 70px;

    --content-width: 1400px;

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
}


/* ------------------------------------------------------------
   RESET / GLOBAL
   ------------------------------------------------------------ */

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


html {
    background: var(--bg);
    color-scheme: dark;
    scroll-behavior: smooth;
}


body {
    margin: 0;

    min-width: 320px;
    min-height: 100vh;

    background: var(--bg);
    color: var(--text);

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}


img {
    display: block;
    max-width: 100%;
}


a {
    color: inherit;
}


button,
input,
textarea,
select {
    font: inherit;
}


.app-shell {
    min-height: 100vh;
    padding-bottom:
        calc(var(--nav-height) + env(safe-area-inset-bottom));
}


/* ============================================================
   HERO
   ============================================================ */

.hero {
    position: relative;

    min-height: min(700px, 84vh);

    overflow: hidden;

    background: var(--bg);

    isolation: isolate;
}


.hero__image {
    position: absolute;
    inset: 0;

    z-index: -3;

    background-image:
        url("/static/images/beer-background.png");

    background-size: cover;

    /*
     * On mobile we intentionally bias toward the right-hand
     * portion of the original photograph so the beer remains
     * visible.
     */
    background-position: 61% center;

    background-repeat: no-repeat;

    transform: scale(1.01);
}


/*
 * The original photograph already has an excellent dark left
 * side. This overlay reinforces it just enough to guarantee
 * readable white text.
 */
.hero::after {
    content: "";

    position: absolute;
    inset: 0;

    z-index: -2;

    pointer-events: none;

    background:
        linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.62) 0%,
            rgba(0, 0, 0, 0.38) 38%,
            rgba(0, 0, 0, 0.08) 72%,
            rgba(0, 0, 0, 0.04) 100%
        );
}


/*
 * The fade is deliberately long. This prevents the hero from
 * looking like a rectangular banner sitting above the page.
 */
.hero__fade {
    position: absolute;

    left: 0;
    right: 0;
    bottom: -1px;

    height: 230px;

    z-index: -1;

    pointer-events: none;

    background:
        linear-gradient(
            to bottom,
            rgba(9, 8, 7, 0) 0%,
            rgba(9, 8, 7, 0.20) 24%,
            rgba(9, 8, 7, 0.58) 56%,
            rgba(9, 8, 7, 0.90) 82%,
            var(--bg) 100%
        );
}


.hero__content {
    width: min(100%, 1200px);

    min-height: min(700px, 84vh);

    margin: 0 auto;

    padding:
        90px
        24px
        170px;

    display: flex;
    align-items: center;
}


/* Keep mobile copy above the brighter central part of the photograph. */
@media (max-width: 649px) {
    .hero__content {
        align-items: flex-start;
        padding-top: 28px;
    }
}

.hero__text {
    width: min(100%, 570px);
}


.hero__eyebrow {
    margin: 0 0 16px;

    color: rgba(255, 255, 255, 0.72);

    font-size: 0.68rem;
    font-weight: 750;

    letter-spacing: 0.19em;
}


.hero h1 {
    margin: 0;

    color: #fff;

    font-size: clamp(3.6rem, 17vw, 5.6rem);
    font-weight: 850;

    line-height: 0.86;
    letter-spacing: -0.065em;

    text-shadow:
        0 4px 24px rgba(0, 0, 0, 0.40);
}


.hero__subtitle {
    max-width: 340px;

    margin: 26px 0 0;

    color: rgba(255, 255, 255, 0.76);

    font-size: 0.98rem;
    line-height: 1.55;

    text-shadow:
        0 2px 12px rgba(0, 0, 0, 0.45);
}


.hero__button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 12px;

    margin-top: 28px;

    padding: 13px 18px;

    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;

    background: rgba(0, 0, 0, 0.24);

    color: #fff;

    font-size: 0.86rem;
    font-weight: 700;

    text-decoration: none;

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    transition:
        background 160ms ease,
        border-color 160ms ease,
        transform 160ms ease;
}


.hero__button:hover {
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(255, 255, 255, 0.40);

    transform: translateY(-1px);
}


/* ============================================================
   HOMEPAGE CONTENT
   ============================================================ */

.home-content {
    position: relative;

    z-index: 2;

    width: 100%;
    max-width: var(--content-width);

    margin: -42px auto 0;

    padding-bottom: 50px;
}


.beer-section {
    margin: 0 0 44px;
}


.section-heading {
    display: flex;

    align-items: flex-end;
    justify-content: space-between;

    gap: 20px;

    padding: 0 18px 14px;
}


.section-heading__kicker {
    display: block;

    margin-bottom: 5px;

    color: var(--beer-light);

    font-size: 0.64rem;
    font-weight: 750;

    letter-spacing: 0.12em;
    text-transform: uppercase;

    opacity: 0.78;
}


.section-heading h2 {
    margin: 0;

    color: var(--text);

    font-size: 1.35rem;
    font-weight: 760;

    line-height: 1.15;
    letter-spacing: -0.035em;
}


.section-heading > a {
    flex: 0 0 auto;

    padding-bottom: 2px;

    color: var(--text-muted);

    font-size: 0.78rem;
    font-weight: 650;

    text-decoration: none;

    transition: color 150ms ease;
}


.section-heading > a:hover {
    color: var(--text);
}


/* ============================================================
   HORIZONTAL BEER ROWS
   ============================================================ */

.beer-row {
    display: flex;

    gap: 12px;

    overflow-x: auto;
    overflow-y: hidden;

    padding:
        3px
        18px
        18px;

    scroll-padding-left: 18px;
    scroll-snap-type: x proximity;

    overscroll-behavior-inline: contain;

    -webkit-overflow-scrolling: touch;

    scrollbar-width: none;
}


.beer-row::-webkit-scrollbar {
    display: none;
}


.beer-row > * {
    flex: 0 0 auto;
    scroll-snap-align: start;
}


/* ============================================================
   BEER CARD
   ============================================================ */

.beer-card {
    /*
     * Leaving part of the next card visible is intentional.
     * It tells mobile users that this row scrolls horizontally.
     */
    width: clamp(190px, 62vw, 230px);

    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: var(--radius-lg);

    background: var(--surface);

    transition:
        transform 170ms ease,
        background 170ms ease,
        border-color 170ms ease;
}


.beer-card:hover {
    transform: translateY(-3px);

    background: var(--surface-hover);

    border-color: rgba(255, 255, 255, 0.15);
}


.beer-card__link {
    display: block;

    height: 100%;

    color: inherit;
    text-decoration: none;
}


.beer-card__image-wrap {
    position: relative;

    width: 100%;
    aspect-ratio: 4 / 5;

    overflow: hidden;

    background:
        radial-gradient(
            circle at 50% 30%,
            #29231c,
            #12100e 72%
        );
}


.beer-card__image {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform 300ms ease;
}


.beer-card:hover .beer-card__image {
    transform: scale(1.025);
}


.beer-card__descriptors {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.profile-logout {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}

.profile-logout button {
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-soft);
    cursor: pointer;
}

.profile-logout button:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.beer-card__descriptors li {
    max-width: 100%;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(245, 166, 35, 0.10);
    color: var(--beer-light);
    font-size: 0.67rem;
    overflow-wrap: anywhere;
}

.beer-card__placeholder {
    width: 100%;
    height: 100%;

    display: grid;
    place-items: center;

    background:
        radial-gradient(
            circle at 50% 32%,
            #33291d,
            #13110e 68%
        );
}


.beer-card__placeholder span {
    font-size: 4rem;

    filter:
        drop-shadow(0 10px 16px rgba(0, 0, 0, 0.45));
}


/* ------------------------------------------------------------
   RATING BADGE
   ------------------------------------------------------------ */

.beer-card__tried {
    position: absolute;
    top: 10px;
    left: 10px;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid #8dc9a1;
    border-radius: 50%;
    background: #183e2a;
    color: #d5f5df;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}


.beer-card__rating {
    position: absolute;

    right: 10px;
    bottom: 10px;

    min-width: 66px;

    display: flex;

    align-items: baseline;
    justify-content: center;

    gap: 3px;

    padding: 8px 10px;

    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;

    color: #fff;

    box-shadow:
        0 5px 18px rgba(0, 0, 0, 0.30);

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}


.beer-card__rating strong {
    font-size: 1.08rem;
    font-weight: 850;

    line-height: 1;
}


.beer-card__rating span {
    font-size: 0.62rem;
    font-weight: 700;

    opacity: 0.76;
}


.rating--excellent {
    background: rgba(38, 140, 73, 0.92);
}


.rating--good {
    background: rgba(105, 142, 47, 0.93);
}


.rating--average {
    background: rgba(190, 133, 28, 0.94);
}


.rating--poor {
    background: rgba(179, 72, 48, 0.94);
}


.rating--none {
    background: rgba(66, 63, 59, 0.92);
}


/* ------------------------------------------------------------
   CARD TEXT
   ------------------------------------------------------------ */

.beer-card__body {
    padding: 14px 14px 15px;
}


.beer-card__brewery {
    margin: 0 0 5px;

    overflow: hidden;

    color: var(--text-muted);

    font-size: 0.68rem;
    font-weight: 650;

    line-height: 1.25;

    text-overflow: ellipsis;
    white-space: nowrap;
}


.beer-card__name {
    margin: 0;

    min-height: 2.5em;

    overflow: hidden;

    color: var(--text);

    font-size: 1rem;
    font-weight: 740;

    line-height: 1.25;
    letter-spacing: -0.02em;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}


.beer-card__meta {
    min-height: 20px;

    display: flex;
    flex-wrap: wrap;

    gap: 5px 10px;

    margin-top: 9px;

    color: var(--text-soft);

    font-size: 0.68rem;
    font-weight: 550;
}


.beer-card__meta span + span {
    position: relative;
}


.beer-card__meta span + span::before {
    content: "•";

    position: absolute;

    left: -7px;

    color: rgba(255, 255, 255, 0.25);
}


.beer-card__footer {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 10px;

    margin-top: 14px;
    padding-top: 11px;

    border-top: 1px solid var(--border);

    color: var(--text-muted);

    font-size: 0.67rem;
}


.beer-card__arrow {
    color: rgba(255, 255, 255, 0.62);

    font-size: 1rem;

    transition: transform 150ms ease;
}


.beer-card:hover .beer-card__arrow {
    transform: translateX(3px);
}


/* ============================================================
   BOTTOM NAVIGATION
   ============================================================ */

.bottom-nav {
    position: fixed;

    z-index: 100;

    left: 0;
    right: 0;
    bottom: 0;

    min-height:
        calc(var(--nav-height) + env(safe-area-inset-bottom));

    display: grid;
    grid-template-columns: repeat(4, 1fr);

    padding:
        7px
        8px
        env(safe-area-inset-bottom);

    border-top: 1px solid rgba(255, 255, 255, 0.08);

    background: rgba(12, 11, 9, 0.90);

    box-shadow:
        0 -10px 35px rgba(0, 0, 0, 0.26);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}


.bottom-nav__item {
    position: relative;

    min-width: 0;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 4px;

    padding: 6px 3px;

    color: rgba(255, 255, 255, 0.42);

    font-size: 0.61rem;
    font-weight: 650;

    text-decoration: none;

    transition: color 150ms ease;
}


.bottom-nav__item svg {
    width: 21px;
    height: 21px;

    fill: none;

    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}


.bottom-nav__item.is-active {
    color: var(--beer-light);
}


.bottom-nav__item.is-active::before {
    content: "";

    position: absolute;

    top: 0;

    width: 22px;
    height: 2px;

    border-radius: 999px;

    background: var(--beer-light);
}


/* ============================================================
   TABLET
   ============================================================ */

@media (min-width: 650px) {

    .hero {
        min-height: 680px;
    }


    .hero__content {
        min-height: 680px;

        padding-left: 38px;
        padding-right: 38px;
    }


    .hero h1 {
        font-size: 6rem;
    }


    .section-heading {
        padding-left: 28px;
        padding-right: 28px;
    }


    .beer-row {
        gap: 16px;

        padding-left: 28px;
        padding-right: 28px;

        scroll-padding-left: 28px;
    }


    .beer-card {
        width: 225px;
    }
}


/* ============================================================
   DESKTOP
   ============================================================ */

@media (min-width: 900px) {

    .hero {
        min-height: 720px;
    }


    .hero__image {
        /*
         * Preserve the original composition on wider displays:
         * dark negative space left, beer and taps right.
         */
        background-position: center center;
    }


    .hero::after {
        background:
            linear-gradient(
                90deg,
                rgba(0, 0, 0, 0.54) 0%,
                rgba(0, 0, 0, 0.27) 38%,
                rgba(0, 0, 0, 0.03) 68%
            );
    }


    .hero__content {
        min-height: 720px;

        padding:
            100px
            48px
            180px;
    }


    .hero h1 {
        font-size: clamp(6rem, 8vw, 7.8rem);
    }


    .hero__subtitle {
        max-width: 390px;

        font-size: 1.05rem;
    }


    .home-content {
        margin-top: -55px;

        padding-left: 20px;
        padding-right: 20px;
    }


    .beer-section {
        margin-bottom: 58px;
    }


    .section-heading {
        padding-left: 16px;
        padding-right: 16px;
    }


    .section-heading h2 {
        font-size: 1.55rem;
    }


    .beer-row {
        gap: 18px;

        padding-left: 16px;
        padding-right: 16px;

        scroll-padding-left: 16px;
    }


    .beer-card {
        width: 235px;
    }


    /*
     * Keep the mobile-style navigation concept, but make it a
     * compact floating dock rather than a full-width phone bar.
     */
    .bottom-nav {
        left: 50%;
        right: auto;
        bottom: 18px;

        width: min(480px, calc(100% - 40px));

        min-height: 66px;

        transform: translateX(-50%);

        padding: 6px 10px;

        border: 1px solid rgba(255, 255, 255, 0.10);
        border-radius: 22px;

        background: rgba(12, 11, 9, 0.88);
    }


    .app-shell {
        padding-bottom: 105px;
    }
}


/* ============================================================
   LARGE DESKTOP
   ============================================================ */

@media (min-width: 1300px) {

    .hero__content {
        padding-left: 32px;
    }


    .beer-card {
        width: 245px;
    }
}


/* ============================================================
   ACCESSIBILITY / REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }


    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* ============================================================
   DISCOVER
   ============================================================ */

.discover-page {
    width: min(100%, 1200px);
    overflow-x: clip;

    margin: 0 auto;

    padding:
        44px
        18px
        120px;
}


.discover-header {
    margin-bottom: 30px;
}


.discover-header__brand {
    display: inline-flex;

    align-items: center;

    gap: 8px;

    margin-bottom: 48px;

    color: var(--text-soft);

    font-size: 0.8rem;
    font-weight: 700;

    text-decoration: none;
}


.discover-header__brand span {
    font-size: 1.1rem;
}


.discover-header__eyebrow {
    margin: 0 0 7px;

    color: var(--beer-light);

    font-size: 0.67rem;
    font-weight: 750;

    letter-spacing: 0.16em;
}


.discover-header h1 {
    margin: 0;

    font-size: clamp(3rem, 12vw, 5.5rem);
    font-weight: 820;

    line-height: 0.95;
    letter-spacing: -0.055em;
}


.discover-header__intro {
    margin: 15px 0 0;

    color: var(--text-soft);

    font-size: 0.96rem;
}


/* SEARCH */

.discover-search {
    position: relative;

    display: flex;

    align-items: center;

    min-height: 58px;

    border: 1px solid var(--border);
    border-radius: 18px;

    background: var(--surface);
}


.discover-search:focus-within {
    border-color:
        rgba(255, 200, 90, 0.55);

    box-shadow:
        0 0 0 3px
        rgba(255, 200, 90, 0.08);
}


.discover-search__icon {
    flex: 0 0 auto;

    width: 21px;
    height: 21px;

    margin-left: 17px;

    fill: none;

    stroke: var(--text-muted);
    stroke-width: 1.8;
    stroke-linecap: round;
}


.discover-search input {
    min-width: 0;

    flex: 1;

    padding: 17px 12px;

    border: 0;
    outline: 0;

    background: transparent;

    color: var(--text);

    font-size: 0.93rem;
}


.discover-search input::placeholder {
    color: var(--text-muted);
}


.discover-search__submit {
    margin-right: 7px;

    padding: 10px 14px;

    border: 0;
    border-radius: 12px;

    background: var(--beer-gold);

    color: #171008;

    font-size: 0.75rem;
    font-weight: 800;

    cursor: pointer;
}


/* AUTOCOMPLETE */

.search-suggestions {
    position: absolute;

    z-index: 50;

    top: calc(100% + 8px);

    left: 0;
    right: 0;

    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: 16px;

    background: #171511;

    box-shadow:
        0 20px 50px
        rgba(0, 0, 0, 0.55);
}


.search-suggestion {
    display: flex;

    align-items: center;

    gap: 12px;

    padding: 12px 14px;

    color: var(--text);

    text-decoration: none;
}


.search-suggestion:hover,
.search-suggestion.is-selected {
    background:
        rgba(255, 255, 255, 0.06);
}


.search-suggestion__type {
    width: 34px;
    height: 34px;

    flex: 0 0 34px;

    display: grid;
    place-items: center;

    border-radius: 10px;

    background:
        rgba(255, 200, 90, 0.10);

    color: var(--beer-light);

    font-size: 0.68rem;
    font-weight: 800;

    text-transform: uppercase;
}


.search-suggestion__text {
    min-width: 0;
}


.search-suggestion__text strong,
.search-suggestion__text small {
    display: block;

    overflow: hidden;

    text-overflow: ellipsis;
    white-space: nowrap;
}


.search-suggestion__text strong {
    font-size: 0.85rem;
}


.search-suggestion__text small {
    margin-top: 2px;

    color: var(--text-muted);

    font-size: 0.69rem;
}


/* FILTERS */

.filter-group {
    margin-top: 27px;
}


.filter-group__heading h2 {
    margin: 0 0 10px;

    color: var(--text-soft);

    font-size: 0.74rem;
    font-weight: 700;
}


.filter-row {
    display: flex;

    gap: 8px;

    overflow-x: auto;
    overscroll-behavior-inline: contain;

    padding-bottom: 5px;

    scrollbar-width: none;
}


.filter-row::-webkit-scrollbar {
    display: none;
}


.filter-chip {
    position: relative;
    flex: 0 0 auto;

    cursor: pointer;
}


.filter-chip input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;

    opacity: 0;

    pointer-events: none;
}


.filter-chip span {
    display: block;

    padding: 9px 14px;

    border: 1px solid var(--border);
    border-radius: 999px;

    background: var(--surface);

    color: var(--text-soft);

    font-size: 0.75rem;
    font-weight: 650;

    transition:
        background 140ms ease,
        border-color 140ms ease,
        color 140ms ease;
}


.filter-chip input:checked + span {
    border-color:
        rgba(255, 200, 90, 0.38);

    background:
        rgba(245, 166, 35, 0.14);

    color: var(--beer-light);
}


/* LOCATION */

.location-filter {
    position: relative;

    display: flex;

    align-items: center;

    gap: 12px;

    padding: 13px 14px;

    border: 1px solid var(--border);
    border-radius: 15px;

    background: var(--surface);

    cursor: pointer;
}


.location-filter > input {
    position: absolute;

    opacity: 0;
}


.location-filter__icon {
    width: 35px;
    height: 35px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background:
        rgba(255, 200, 90, 0.09);

    color: var(--beer-light);
}


.location-filter__text {
    min-width: 0;

    flex: 1;
}


.location-filter__text strong,
.location-filter__text small {
    display: block;
}


.location-filter__text strong {
    font-size: 0.79rem;
}


.location-filter__text small {
    margin-top: 3px;

    color: var(--text-muted);

    font-size: 0.68rem;
}


.location-filter__switch {
    position: relative;

    width: 38px;
    height: 22px;

    flex: 0 0 auto;

    border-radius: 999px;

    background: #393632;

    transition: background 150ms ease;
}


.location-filter__switch::after {
    content: "";

    position: absolute;

    top: 3px;
    left: 3px;

    width: 16px;
    height: 16px;

    border-radius: 50%;

    background: #fff;

    transition: transform 150ms ease;
}


.location-filter
input:checked
~ .location-filter__switch {
    background: var(--beer-gold);
}


.location-filter
input:checked
~ .location-filter__switch::after {
    transform: translateX(16px);
}


/* ADVANCED CONTROLS */

.discover-advanced {
    display: grid;

    grid-template-columns: 1fr;

    gap: 12px;

    margin-top: 28px;
    padding-top: 23px;

    border-top: 1px solid var(--border);
}


.discover-field label {
    display: block;

    margin-bottom: 7px;

    color: var(--text-muted);

    font-size: 0.67rem;
    font-weight: 700;
}

.discover-field {
    min-width: 0;
}


.discover-field select {
    width: 100%;

    padding: 12px 36px 12px 12px;

    border: 1px solid var(--border);
    border-radius: 12px;

    outline: 0;

    background: var(--surface);

    color: var(--text);

    font-size: 0.78rem;
}


/* RESULTS */

.discover-results {
    margin-top: 45px;
}


.discover-results__heading {
    display: flex;

    align-items: flex-end;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 17px;
}


.discover-results__heading h2 {
    margin: 0;

    font-size: 1.35rem;
}


.clear-filters {
    color: var(--text-muted);

    font-size: 0.72rem;
    font-weight: 650;

    text-decoration: none;
}


.discover-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 12px;
}


/*
 * Override horizontal homepage sizing.
 */
.discover-grid .beer-card {
    width: 100%;
}


.discover-empty {
    grid-column: 1 / -1;

    padding: 70px 20px;

    text-align: center;
}


.discover-empty > span {
    font-size: 3.5rem;
}


.discover-empty h2 {
    margin: 16px 0 7px;
}


.discover-empty p {
    margin: 0;

    color: var(--text-muted);
}


.discover-empty a {
    display: inline-block;

    margin-top: 20px;

    color: var(--beer-light);

    font-size: 0.8rem;
}


/* TABLET */

@media (min-width: 650px) {

    .discover-page {
        padding-left: 30px;
        padding-right: 30px;
    }


    .discover-advanced {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }


    .discover-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        gap: 16px;
    }
}


/* DESKTOP */

@media (min-width: 1000px) {

    .discover-page {
        padding-top: 60px;
    }


    .discover-header__brand {
        margin-bottom: 65px;
    }


    .discover-controls {
        max-width: 900px;
    }


    .discover-grid {
        grid-template-columns:
            repeat(4, minmax(0, 1fr));

        gap: 18px;
    }
}

/* ============================================================
   BEER DETAIL
   ============================================================ */

.beer-page {
    width: 100%;
    min-height: 100vh;
    background: var(--bg);
}


/* Hero */

.beer-detail-hero {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    background: #12100d;
}


.beer-detail-hero__media {
    position: absolute;
    inset: 0;
}


.beer-detail-hero__placeholder {
    position: absolute;
    inset: 0;

    display: grid;
    place-items: center;

    background:
        radial-gradient(
            circle at 50% 35%,
            #34291d,
            #12100e 70%
        );
}


.beer-detail-hero__placeholder span {
    font-size: 6rem;
}


.beer-detail-hero__image {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;
}


.beer-detail-hero__shade {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, .05) 20%,
            rgba(0, 0, 0, .25) 54%,
            rgba(9, 8, 7, .96) 100%
        );
}


.beer-back {
    position: absolute;
    z-index: 4;

    top: 20px;
    left: 18px;

    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    border: 1px solid rgba(255,255,255,.16);
    border-radius: 50%;

    background: rgba(0,0,0,.35);

    color: #fff;

    font-size: 1.3rem;
    text-decoration: none;

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}


.beer-detail-hero__content {
    position: absolute;
    z-index: 3;

    left: 18px;
    right: 18px;
    bottom: 31px;
}


.beer-detail-hero__brewery {
    margin: 0 0 7px;

    color: var(--beer-light);

    font-size: .74rem;
    font-weight: 750;
}


.beer-detail-hero h1 {
    margin: 0;

    max-width: 720px;

    font-size: clamp(2.5rem, 12vw, 5rem);
    font-weight: 850;

    line-height: .94;
    letter-spacing: -.055em;
}


.beer-detail-meta {
    display: flex;
    flex-wrap: wrap;

    gap: 7px;

    margin-top: 18px;
}


.beer-detail-meta span {
    padding: 7px 10px;

    border: 1px solid rgba(255,255,255,.12);
    border-radius: 999px;

    background: rgba(0,0,0,.22);

    color: rgba(255,255,255,.76);

    font-size: .68rem;
    font-weight: 650;
}


/* Main content */

.beer-detail-content {
    width: min(100%, 920px);

    margin: 0 auto;

    padding: 0 18px 70px;
}


.beer-primary-actions {
    flex-wrap: wrap;
    margin-bottom: 37px;
}


.beer-list-button {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    padding: 13px 18px;

    border: 1px solid var(--border);
    border-radius: 14px;

    background: var(--surface);

    color: var(--text);

    font-size: .8rem;
    font-weight: 720;

    text-decoration: none;
    cursor: pointer;
}


.beer-list-button.is-active {
    border-color:
        rgba(255, 200, 90, .36);

    background:
        rgba(245, 166, 35, .10);

    color: var(--beer-light);
}


.beer-info-section,
.beer-rating-section,
.beer-flavor-section,
.beer-personal-section,
.beer-first-rating {
    margin-top: 46px;
}


.beer-section-label {
    margin: 0 0 7px;

    color: var(--beer-light);

    font-size: .64rem;
    font-weight: 800;

    letter-spacing: .14em;
}


.beer-section-heading h2,
.beer-first-rating h2 {
    margin: 0;

    font-size: 1.45rem;
    font-weight: 780;

    letter-spacing: -.035em;
}


.beer-description {
    margin: 12px 0 0;

    color: var(--text-soft);

    font-size: .94rem;
    line-height: 1.68;
}


.beer-description--empty {
    color: var(--text-muted);
}


/* Stats */

.beer-global-stats {
    display: grid;

    grid-template-columns:
        1.3fr 1fr 1fr;

    gap: 8px;

    margin-top: 18px;
}


.beer-stat {
    min-width: 0;

    padding: 15px 10px;

    border: 1px solid var(--border);
    border-radius: 15px;

    background: var(--surface);
}


.beer-stat--primary {
    background:
        linear-gradient(
            145deg,
            rgba(245,166,35,.15),
            var(--surface) 65%
        );
}


.beer-stat__value,
.beer-stat__label,
.beer-stat__suffix {
    display: block;
}


.beer-stat__value {
    font-size: 1.55rem;
    font-weight: 850;
}


.beer-stat__label {
    margin-top: 7px;

    color: var(--text-soft);

    font-size: .66rem;
    font-weight: 650;
}


.beer-stat__suffix {
    margin-top: 2px;

    color: var(--text-muted);

    font-size: .58rem;
}


/* Word cloud */

.descriptor-cloud {
    display: flex;
    flex-wrap: wrap;

    align-items: baseline;
    justify-content: center;

    gap: 8px 13px;

    margin-top: 20px;
    padding: 27px 18px;

    border: 1px solid var(--border);
    border-radius: 20px;

    background:
        radial-gradient(
            circle at 50% 40%,
            #1c1813,
            var(--surface)
        );
}


.descriptor-cloud__word {
    color:
        rgba(255,255,255,.72);

    font-size:
        calc(
            .72rem
            + (
                var(--word-weight)
                * 1.15rem
            )
        );

    font-weight:
        calc(
            520
            + (
                var(--word-weight)
                * 280
            )
        );

    line-height: 1.2;
}


.descriptor-cloud__word:nth-child(-n+4) {
    color: var(--beer-light);
}


.beer-empty-panel {
    margin-top: 17px;

    padding: 25px;

    border: 1px solid var(--border);
    border-radius: 16px;

    color: var(--text-muted);

    text-align: center;

    font-size: .8rem;
}


/* Personal */

.beer-personal-section {
    padding: 21px;

    border: 1px solid
        rgba(255,200,90,.15);

    border-radius: 20px;

    background:
        linear-gradient(
            145deg,
            rgba(245,166,35,.075),
            var(--surface) 58%
        );
}


.beer-personal-stats {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 9px;

    margin-top: 18px;
}


.personal-stat {
    padding: 15px;

    border: 1px solid var(--border);
    border-radius: 14px;

    background:
        rgba(0,0,0,.14);
}


.personal-stat strong,
.personal-stat span {
    display: block;
}


.personal-stat strong {
    font-size: 1.4rem;
}


.personal-stat span {
    margin-top: 4px;

    color: var(--text-muted);

    font-size: .66rem;
}


.personal-flavor {
    margin-top: 23px;
}


.personal-flavor__label {
    margin: 0 0 10px;

    color: var(--text-soft);

    font-size: .72rem;
    font-weight: 700;
}


.personal-flavor__chips {
    display: flex;
    flex-wrap: wrap;

    gap: 7px;
}


.personal-flavor__chips span {
    padding: 7px 10px;

    border-radius: 999px;

    background:
        rgba(245,166,35,.10);

    color: var(--beer-light);

    font-size: .69rem;
    font-weight: 700;
}


.personal-flavor__empty {
    margin: 0;

    color: var(--text-muted);

    font-size: .76rem;
    line-height: 1.5;
}


/* Comparison */

.comparison-toggle {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-top: 22px;
    padding: 13px 0 0;

    border: 0;
    border-top: 1px solid var(--border);

    background: transparent;

    color: var(--text);

    font-size: .76rem;
    font-weight: 700;

    cursor: pointer;
}


.comparison-toggle__arrow {
    color: var(--beer-light);
}


.comparison-panel {
    margin-top: 16px;

    padding: 15px;

    border-radius: 14px;

    background:
        rgba(0,0,0,.18);
}


.comparison-row {
    display: flex;
    justify-content: space-between;

    gap: 20px;

    padding: 8px 0;

    color: var(--text-soft);

    font-size: .75rem;
}


.comparison-row strong {
    color: var(--text);
}


.comparison-flavors {
    margin-top: 15px;
    padding-top: 15px;

    border-top: 1px solid var(--border);
}


.comparison-flavors__title {
    display: block;

    color: var(--text);

    font-size: .73rem;
    font-weight: 700;
}


.comparison-flavors p,
.comparison-panel__empty {
    color: var(--text-muted);

    font-size: .72rem;
    line-height: 1.5;
}


.beer-first-rating p:last-child {
    color: var(--text-muted);

    font-size: .8rem;
    line-height: 1.5;
}


/* Big rate CTA */

.beer-rate-cta {
    margin-top: 16px;
    margin-bottom: 32px;
}


.rate-beer-button {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    padding: 17px 20px;

    border: 0;
    border-radius: 16px;

    background:
        linear-gradient(
            135deg,
            var(--beer-light),
            var(--beer-gold)
        );

    color: #1c1207;

    font-size: .94rem;
    font-weight: 850;

    text-decoration: none;

    box-shadow:
        0 12px 35px
        rgba(245,166,35,.15);

    cursor: pointer;
}


.rate-beer-button > span:first-child {
    font-size: 1.1rem;
}


/* ============================================================
   RATING BOTTOM SHEET
   ============================================================ */

body.rating-sheet-open {
    overflow: hidden;
}


.rating-sheet {
    position: fixed;
    z-index: 500;

    inset: 0;

    display: flex;
    align-items: flex-end;
}


.rating-sheet[hidden] {
    display: none;
}


.rating-sheet__backdrop {
    position: absolute;
    inset: 0;

    border: 0;

    background:
        rgba(0,0,0,.67);

    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}


.rating-sheet__panel {
    position: relative;
    z-index: 2;

    width: 100%;
    max-height: 92dvh;

    overflow-y: auto;

    padding:
        10px
        18px
        calc(
            25px
            + env(safe-area-inset-bottom)
        );

    border: 1px solid var(--border);
    border-bottom: 0;

    border-radius:
        25px 25px 0 0;

    background: #11100e;

    box-shadow:
        0 -25px 70px
        rgba(0,0,0,.5);
}


.rating-sheet__handle {
    width: 42px;
    height: 4px;

    margin: 0 auto 17px;

    border-radius: 999px;

    background:
        rgba(255,255,255,.20);
}


.rating-sheet__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;
}


.rating-sheet__header h2 {
    margin: 0;

    font-size: 1.45rem;
}


.rating-sheet__close {
    width: 38px;
    height: 38px;

    flex: 0 0 auto;

    border: 1px solid var(--border);
    border-radius: 50%;

    background: var(--surface);

    color: var(--text);

    font-size: 1.3rem;

    cursor: pointer;
}


.rating-step {
    margin-top: 32px;
}


.rating-step__heading {
    display: flex;
    align-items: flex-start;

    gap: 12px;
}


.rating-step__number {
    width: 27px;
    height: 27px;

    flex: 0 0 27px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background:
        rgba(245,166,35,.13);

    color: var(--beer-light);

    font-size: .69rem;
    font-weight: 850;
}


.rating-step__heading h3 {
    margin: 1px 0 0;

    font-size: .94rem;
}


.rating-step__heading p {
    margin: 4px 0 0;

    color: var(--text-muted);

    font-size: .69rem;
}


/* Numeric rating */

.rating-picker {
    display: grid;

    grid-template-columns:
        repeat(6, 1fr);

    gap: 5px;

    margin-top: 17px;
}


.rating-picker input {
    position: absolute;

    opacity: 0;
    pointer-events: none;
}


.rating-picker span {
    min-height: 48px;

    display: grid;
    place-items: center;

    border: 1px solid var(--border);
    border-radius: 12px;

    background: var(--surface);

    color: var(--text-soft);

    font-size: .88rem;
    font-weight: 800;

    cursor: pointer;
}


.rating-picker input:checked + span {
    border-color:
        rgba(255,200,90,.5);

    background:
        var(--beer-gold);

    color: #171008;
}


.rating-picker__labels {
    display: flex;
    justify-content: space-between;

    margin-top: 7px;

    color: var(--text-muted);

    font-size: .58rem;
}


/* Descriptor selection */

.descriptor-current-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-top: 19px;

    color: var(--text-muted);

    font-size: .67rem;
}


.descriptor-current-heading strong {
    color: var(--beer-light);
}


.selected-descriptors {
    min-height: 43px;

    display: flex;
    flex-wrap: wrap;

    gap: 7px;

    margin-top: 9px;
}


.selected-descriptor {
    display: inline-flex;
    align-items: center;

    gap: 7px;

    padding: 8px 10px;

    border: 1px solid
        rgba(255,200,90,.25);

    border-radius: 999px;

    background:
        rgba(245,166,35,.12);

    color: var(--beer-light);

    font-size: .72rem;
    font-weight: 700;

    cursor: pointer;
}


.selected-descriptor span:last-child {
    opacity: .65;
}


.descriptor-examples {
    margin-top: 20px;
}


.descriptor-examples__label {
    display: block;

    margin-bottom: 9px;

    color: var(--text-muted);

    font-size: .66rem;
}


.descriptor-examples__chips {
    display: flex;
    flex-wrap: wrap;

    gap: 6px;
}


.descriptor-suggestion {
    padding: 7px 9px;

    border: 1px solid var(--border);
    border-radius: 999px;

    background: var(--surface);

    color: var(--text-soft);

    font-size: .68rem;

    cursor: pointer;
}


.descriptor-suggestion small {
    margin-left: 4px;

    color: var(--text-muted);
}


.descriptor-suggestion.is-selected {
    opacity: .4;
}


/* Descriptor search */

.descriptor-search {
    position: relative;

    margin-top: 22px;
}


.descriptor-search > label {
    display: block;

    margin-bottom: 7px;

    color: var(--text-muted);

    font-size: .66rem;
}


.descriptor-search__field {
    display: flex;
    align-items: center;

    gap: 8px;

    padding: 0 12px;

    border: 1px solid var(--border);
    border-radius: 13px;

    background: var(--surface);
}


.descriptor-search__field:focus-within {
    border-color:
        rgba(255,200,90,.38);
}


.descriptor-search__field span {
    color: var(--text-muted);
}


.descriptor-search__field input {
    width: 100%;

    padding: 12px 0;

    border: 0;
    outline: 0;

    background: transparent;

    color: var(--text);

    font-size: .78rem;
}


.descriptor-search-results {
    position: absolute;
    z-index: 10;

    top: calc(100% + 7px);
    left: 0;
    right: 0;

    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: 13px;

    background: #1a1713;

    box-shadow:
        0 18px 40px
        rgba(0,0,0,.5);
}


.descriptor-search-result {
    width: 100%;

    display: block;

    padding: 11px 13px;

    border: 0;
    border-bottom:
        1px solid var(--border);

    background: transparent;

    color: var(--text);

    text-align: left;

    cursor: pointer;
}


.descriptor-search-result:last-child {
    border-bottom: 0;
}


.descriptor-search-result:hover {
    background:
        rgba(255,255,255,.05);
}


.descriptor-search-result span,
.descriptor-search-result small {
    display: block;
}


.descriptor-search-result span {
    font-size: .75rem;
    font-weight: 700;
}


.descriptor-search-result small {
    margin-top: 3px;

    color: var(--text-muted);

    font-size: .61rem;
}


/* Submit */

.rating-form-error {
    margin: 17px 0 0;

    padding: 10px 12px;

    border: 1px solid
        rgba(217,105,76,.3);

    border-radius: 11px;

    background:
        rgba(217,105,76,.08);

    color: #ee9b84;

    font-size: .71rem;
}


.rating-submit {
    width: 100%;

    margin-top: 27px;
    padding: 15px;

    border: 0;
    border-radius: 14px;

    background:
        var(--beer-gold);

    color: #1b1106;

    font-weight: 850;

    cursor: pointer;
}


.rating-submit:disabled {
    opacity: .65;

    cursor: wait;
}


/* Desktop */

@media (min-width: 700px) {

    .beer-detail-hero {
        min-height: 650px;
    }


    .beer-detail-hero__content {
        left: max(
            38px,
            calc(
                (100vw - 920px)
                / 2
            )
        );

        right: 38px;
        bottom: 48px;
    }


    .beer-back {
        top: 30px;
        left: 30px;
    }


    .beer-detail-content {
        padding-left: 30px;
        padding-right: 30px;
    }


    .beer-primary-actions {
        display: flex;
        justify-content: flex-end;
    }


    .beer-primary-actions form {
        width: auto;
    }


    .beer-list-button {
        width: auto;
        min-width: 160px;
    }


    .rating-sheet {
        align-items: center;
        justify-content: center;

        padding: 25px;
    }


    .rating-sheet__panel {
        width: min(100%, 620px);
        max-height: 88vh;

        padding: 16px 28px 28px;

        border: 1px solid var(--border);
        border-radius: 25px;
    }


    .rating-sheet__handle {
        display: none;
    }

}

.descriptor-cloud__word {
    color: rgba(255,255,255,.72);

    font-size:
        calc(
            .72rem
            + (
                var(--word-weight)
                * 1.15rem
            )
        );

    font-weight:
        calc(
            520
            + (
                var(--word-weight)
                * 280
            )
        );

    line-height: 1.2;

    text-decoration: none;
    cursor: pointer;

    transition:
        color 140ms ease,
        transform 140ms ease;
}


.descriptor-cloud__word:hover,
.descriptor-cloud__word:focus-visible {
    color: var(--beer-light);
    transform: translateY(-1px);
}


.descriptor-cloud__word:focus-visible {
    outline: 2px solid rgba(255, 200, 90, .6);
    outline-offset: 4px;
    border-radius: 4px;
}


.descriptor-cloud__word:nth-child(-n+4) {
    color: var(--beer-light);
}

/* ============================================================
   PROFILE
   ============================================================ */

.profile-page {
    width: min(100%, 1200px);
    margin: 0 auto;
    padding:
        52px
        18px
        100px;
}


/* Header */

.profile-header {
    padding-bottom: 43px;
}

.profile-header__eyebrow {
    margin: 0 0 8px;
    color: var(--beer-light);
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .16em;
}

.profile-header h1 {
    margin: 0;
    font-size: clamp(
        2.8rem,
        13vw,
        5.5rem
    );
    font-weight: 850;
    line-height: .94;
    letter-spacing: -.055em;
}

.profile-header__intro {
    margin: 15px 0 0;
    color: var(--text-soft);
    font-size: .92rem;
}

.profile-summary {
    display: grid;
    grid-template-columns:
        repeat(3, 1fr);
    gap: 8px;
    margin-top: 30px;
}

.profile-summary__stat {
    min-width: 0;
    padding: 15px 10px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
}

.profile-summary__stat strong,
.profile-summary__stat span {
    display: block;
}

.profile-summary__stat strong {
    font-size: 1.5rem;
    font-weight: 850;
}

.profile-summary__stat span {
    margin-top: 5px;
    color: var(--text-muted);
    font-size: .64rem;
    line-height: 1.3;
}


/* Main sections */

.profile-section {
    margin-top: 55px;
}

.profile-section__heading {
    margin-bottom: 18px;
}

.profile-section__heading--split {
    display: flex;
    flex-direction: column;
    gap: 17px;
}

.profile-section__kicker,
.profile-insight__eyebrow {
    display: block;
    margin-bottom: 6px;
    color: var(--beer-light);
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .13em;
}

.profile-section__heading h2 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 790;
    letter-spacing: -.035em;
}

.profile-section__heading p {
    margin: 7px 0 0;
    color: var(--text-muted);
    font-size: .76rem;
}


/* On my list */

.profile-beer-row {
    display: flex;
    gap: 13px;
    overflow-x: auto;
    padding:
        2px
        1px
        14px;
    scroll-snap-type:
        x proximity;
    scrollbar-width: none;
}

.profile-beer-row::-webkit-scrollbar {
    display: none;
}

.profile-saved-beer {
    flex: 0 0 auto;
    scroll-snap-align: start;
}

.profile-saved-beer .beer-card {
    width: clamp(
        190px,
        62vw,
        230px
    );
}

.profile-remove-list {
    width: 100%;
    margin-top: 8px;
    padding: 9px 11px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: transparent;
    color: var(--text-muted);
    font-size: .67rem;
    font-weight: 650;
    cursor: pointer;
}

.profile-remove-list:hover {
    color: var(--text);
    border-color:
        rgba(255,255,255,.17);
}


/* Empty states */

.profile-empty {
    padding: 42px 20px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    text-align: center;
}

.profile-empty > span {
    font-size: 2.5rem;
}

.profile-empty h3 {
    margin: 13px 0 5px;
}

.profile-empty p {
    max-width: 360px;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: .76rem;
    line-height: 1.5;
}

.profile-empty a {
    display: inline-block;
    margin-top: 17px;
    color: var(--beer-light);
    font-size: .75rem;
    font-weight: 700;
}


/* Rating log sort */

.profile-log-sort {
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-log-sort label {
    color: var(--text-muted);
    font-size: .66rem;
}

.profile-log-sort select {
    min-width: 165px;
    padding: 10px 31px 10px 11px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface);
    color: var(--text);
    font-size: .7rem;
}

.profile-log-sort button {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text-soft);
    font-size: .68rem;
    cursor: pointer;
}


/* Rating table */

.rating-log-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
}

.rating-log-table {
    width: 100%;
    min-width: 780px;
    border-collapse: collapse;
    font-size: .74rem;
}

.rating-log-table th {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-size: .62rem;
    font-weight: 750;
    letter-spacing: .04em;
    text-align: left;
}

.rating-log-table td {
    padding: 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text-soft);
    vertical-align: top;
}

.rating-log-table tbody tr:last-child td {
    border-bottom: 0;
}

.rating-log-table tbody tr:hover {
    background:
        rgba(255,255,255,.025);
}

.rating-log-beer {
    color: var(--text);
    font-weight: 720;
    text-decoration: none;
}

.rating-log-table time small {
    display: block;
    margin-top: 3px;
    color: var(--text-muted);
}

.rating-log-score {
    color: var(--beer-light);
    font-size: .92rem;
    font-weight: 850;
}

.rating-log-score small {
    color: var(--text-muted);
    font-size: .57rem;
}

.rating-log-descriptors {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.rating-log-descriptors a {
    padding: 4px 7px;
    border-radius: 999px;
    background:
        rgba(245,166,35,.09);
    color: var(--beer-light);
    font-size: .61rem;
    font-weight: 650;
    text-decoration: none;
}

.rating-log-none {
    color: var(--text-muted);
}


/* ============================================================
   PROFILE INSIGHTS
   ============================================================ */

.profile-statistics {
    padding-bottom: 30px;
}

.profile-insight-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 14px;
}

.profile-insight {
    margin-top: 14px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
}

.profile-insight__header {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.profile-insight__header h3 {
    margin: 0;
    font-size: 1.25rem;
    letter-spacing: -.03em;
}

.profile-insight__header p {
    max-width: 580px;
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: .72rem;
    line-height: 1.5;
}

.profile-insight__empty {
    margin-top: 20px;
    padding: 25px 15px;
    border-radius: 13px;
    background:
        rgba(0,0,0,.14);
    color: var(--text-muted);
    font-size: .73rem;
    text-align: center;
}


/* Journey toggle */

.journey-toggle {
    display: inline-flex;
    align-self: flex-start;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background:
        rgba(0,0,0,.15);
}

.journey-toggle button {
    padding: 8px 11px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-muted);
    font-size: .65rem;
    font-weight: 700;
    cursor: pointer;
}

.journey-toggle button.is-active {
    background:
        rgba(245,166,35,.14);
    color: var(--beer-light);
}


/* Charts */

.profile-chart {
    width: 100%;
    margin-top: 22px;
    overflow: hidden;
}

.profile-chart svg {
    display: block;
    width: 100%;
    height: auto;
}

.profile-chart-grid {
    stroke:
        rgba(255,255,255,.075);
    stroke-width: 1;
}

.profile-chart-line {
    fill: none;
    stroke: var(--beer-light);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.profile-chart-point {
    fill: var(--beer-gold);
    stroke: #11100e;
    stroke-width: 2;
}

.profile-chart-axis-label {
    fill:
        rgba(255,255,255,.38);
    font-size: 10px;
}

.profile-chart-note {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: .62rem;
    line-height: 1.45;
}


/* Global comparison */

.profile-comparison-summary {
    display: grid;
    grid-template-columns:
        repeat(3, 1fr);
    gap: 7px;
    margin-top: 19px;
}

.profile-comparison-summary > div {
    padding: 13px 10px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background:
        rgba(0,0,0,.12);
}

.profile-comparison-summary strong,
.profile-comparison-summary span {
    display: block;
}

.profile-comparison-summary strong {
    font-size: 1.2rem;
}

.profile-comparison-summary span {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: .58rem;
    line-height: 1.3;
}

.profile-comparison-list {
    margin-top: 18px;
}

.profile-comparison-row {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        auto
        46px;
    align-items: center;
    gap: 10px;
    padding: 11px 0;
    border-top: 1px solid var(--border);
    color: inherit;
    text-decoration: none;
}

.profile-comparison-row__beer {
    min-width: 0;
    overflow: hidden;
    color: var(--text);
    font-size: .73rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-comparison-row__scores {
    display: flex;
    gap: 10px;
    color: var(--text-muted);
    font-size: .58rem;
}

.profile-comparison-row__scores strong {
    color: var(--text-soft);
}

.profile-comparison-row__difference {
    text-align: right;
    color: var(--beer-light);
    font-size: .72rem;
    font-weight: 800;
}


/* Acquired / decreased */

.profile-change-list {
    margin-top: 18px;
}

.profile-change-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 11px 0;
    border-top: 1px solid var(--border);
    color: inherit;
    text-decoration: none;
}

.profile-change-row > span:first-child {
    min-width: 0;
}

.profile-change-row strong,
.profile-change-row small {
    display: block;
}

.profile-change-row > span:first-child strong {
    overflow: hidden;
    color: var(--text);
    font-size: .72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-change-row small {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: .58rem;
}

.profile-change-score {
    flex: 0 0 auto;
    color: var(--text-soft);
    font-size: .72rem;
    font-weight: 700;
}

.profile-change-score > span {
    margin: 0 4px;
    color: var(--text-muted);
}

.profile-change-score > strong {
    display: inline;
    margin-left: 7px;
    color: var(--beer-light);
}


/* Insight link */

.profile-insight-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    color: var(--beer-light);
    font-size: .69rem;
    font-weight: 700;
    text-decoration: none;
}


/* Flavor fingerprint */

.profile-flavor-cloud {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 10px 15px;
    margin-top: 22px;
    padding: 29px 15px;
    border-radius: 16px;
    background:
        radial-gradient(
            circle at 50% 40%,
            #1d1913,
            rgba(0,0,0,.10)
        );
}

.profile-flavor-cloud a {
    color:
        rgba(255,255,255,.72);

    font-size:
        calc(
            .7rem
            + (
                var(--profile-word-weight)
                * 1.05rem
            )
        );

    font-weight:
        calc(
            520
            + (
                var(--profile-word-weight)
                * 280
            )
        );

    text-decoration: none;
    transition:
        color 140ms ease,
        transform 140ms ease;
}

.profile-flavor-cloud a:hover {
    color: var(--beer-light);
    transform: translateY(-1px);
}

.profile-flavor-cloud small {
    margin-left: 2px;
    font-size: .5em;
    opacity: .45;
}


/* Tablet/Desktop */

@media (min-width: 700px) {

    .profile-page {
        padding-left: 30px;
        padding-right: 30px;
    }

    .profile-summary {
        max-width: 600px;
    }

    .profile-section__heading--split {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
    }

    .profile-insight__header {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
    }

    .profile-insight-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .profile-insight {
        padding: 24px;
    }
}


@media (min-width: 1000px) {

    .profile-page {
        padding-top: 65px;
    }

    .profile-header {
        padding-bottom: 55px;
    }

    .profile-section {
        margin-top: 70px;
    }

    .profile-insight {
        padding: 28px;
    }

}

/* ============================================================
   AUTH PAGES
   ============================================================ */

.auth-page {
    min-height: 100vh;
    padding:
        28px
        18px
        110px;
    background:
        radial-gradient(
            circle at top,
            rgba(245, 166, 35, 0.10),
            rgba(9, 8, 7, 0) 35%
        ),
        var(--bg);
}

.auth-shell {
    width: min(100%, 1100px);
    margin: 0 auto;

    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
}

.auth-hero {
    padding: 8px 6px 2px;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    margin-bottom: 36px;

    color: var(--text-soft);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
}

.auth-brand__icon {
    font-size: 1.2rem;
}

.auth-eyebrow {
    margin: 0 0 9px;

    color: var(--beer-light);
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.auth-title {
    margin: 0;

    font-size: clamp(2.9rem, 14vw, 5.6rem);
    font-weight: 860;
    line-height: 0.93;
    letter-spacing: -0.06em;
}

.auth-subtitle {
    max-width: 430px;
    margin: 17px 0 0;

    color: var(--text-soft);
    font-size: 0.94rem;
    line-height: 1.6;
}

.auth-quote {
    margin-top: 28px;
    padding: 14px 16px;

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;

    background: rgba(255, 255, 255, 0.03);

    color: var(--text-muted);
    font-size: 0.76rem;
    line-height: 1.5;
}

.auth-card {
    padding: 22px 18px 20px;

    border: 1px solid var(--border);
    border-radius: 22px;

    background:
        linear-gradient(
            160deg,
            rgba(245, 166, 35, 0.08),
            var(--surface) 30%
        );
    box-shadow:
        0 12px 36px rgba(0, 0, 0, 0.22);
}

.auth-card__header h2 {
    margin: 0;

    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.auth-card__header p {
    margin: 7px 0 0;

    color: var(--text-muted);
    font-size: 0.79rem;
    line-height: 1.5;
}

.auth-messages {
    margin-top: 18px;
    display: grid;
    gap: 10px;
}

.auth-message {
    padding: 11px 12px;
    border-radius: 12px;

    font-size: 0.75rem;
    line-height: 1.45;
}

.auth-message--error {
    border: 1px solid rgba(217, 105, 76, 0.35);
    background: rgba(217, 105, 76, 0.10);
    color: #f0aa98;
}

.auth-message--success {
    border: 1px solid rgba(66, 185, 107, 0.30);
    background: rgba(66, 185, 107, 0.10);
    color: #9fe0b4;
}

.auth-form {
    margin-top: 20px;
    display: grid;
    gap: 15px;
}

.auth-field label {
    display: block;
    margin-bottom: 7px;

    color: var(--text-soft);
    font-size: 0.74rem;
    font-weight: 700;
}

.auth-field input {
    width: 100%;
    padding: 14px 14px;

    border: 1px solid var(--border);
    border-radius: 14px;
    outline: 0;

    background: rgba(0, 0, 0, 0.16);
    color: var(--text);

    font-size: 0.92rem;

    transition:
        border-color 150ms ease,
        box-shadow 150ms ease,
        background 150ms ease;
}

.auth-field input::placeholder {
    color: var(--text-muted);
}

.auth-field input:focus {
    border-color: rgba(255, 200, 90, 0.50);
    box-shadow: 0 0 0 3px rgba(255, 200, 90, 0.09);
    background: rgba(255, 255, 255, 0.03);
}

.auth-submit {
    width: 100%;
    margin-top: 4px;
    padding: 15px 18px;

    border: 0;
    border-radius: 15px;

    background:
        linear-gradient(
            135deg,
            var(--beer-light),
            var(--beer-gold)
        );
    color: #1e1409;

    font-size: 0.92rem;
    font-weight: 850;

    cursor: pointer;

    box-shadow:
        0 10px 30px rgba(245, 166, 35, 0.18);

    transition:
        transform 140ms ease,
        box-shadow 140ms ease;
}

.auth-submit:hover {
    transform: translateY(-1px);
    box-shadow:
        0 14px 34px rgba(245, 166, 35, 0.22);
}

.auth-footer {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.auth-footer p {
    margin: 0;

    color: var(--text-muted);
    font-size: 0.76rem;
    line-height: 1.5;
}

.auth-footer a {
    color: var(--beer-light);
    text-decoration: none;
    font-weight: 700;
}

.auth-footer a:hover {
    color: #fff;
}

@media (min-width: 900px) {
    .auth-page {
        padding-top: 60px;
    }

    .auth-shell {
        grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
        gap: 38px;
        align-items: center;
    }

    .auth-hero {
        padding-right: 20px;
    }

    .auth-card {
        padding: 28px 24px 24px;
    }
}


/* Language selection stays in normal flow and never covers page controls. */
.language-bar {
    display: flex;
    justify-content: flex-end;
    padding: 8px max(18px, env(safe-area-inset-right));
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}
.language-toggle {
    display: flex;
    gap: 2px;
    padding: 2px;
    border: 1px solid var(--border);
    border-radius: 999px;
}
.language-toggle button {
    min-width: 44px;
    min-height: 36px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-soft);
    font-size: .72rem;
    font-weight: 700;
    cursor: pointer;
}
.language-toggle button[aria-pressed="true"] {
    color: var(--bg);
    background: var(--beer-light);
}
.language-toggle button:focus-visible {
    outline: 2px solid var(--beer-light);
    outline-offset: 3px;
}


/* Privileged catalog form */
.catalog-page {
    max-width: 640px;
    margin: 0 auto;
    padding: 32px 20px 120px;
}

.catalog-page h1 {
    margin: 20px 0;
}

.catalog-help {
    color: var(--text-soft);
    font-size: 0.85rem;
}

.catalog-preview {
    max-width: 160px;
    border-radius: 12px;
}

.catalog-page textarea {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.16);
    color: var(--text);
    font: inherit;
    resize: vertical;
}

#existing-beers a {
    display: block;
    padding: 6px 0;
}

.maintenance-page { overflow-wrap: anywhere; }
.maintenance-page > form { margin: 24px 0; }
.maintenance-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin: 16px 0; }
.maintenance-actions a { padding: 12px 0; }
.maintenance-actions [aria-current="page"] { font-weight: bold; text-decoration: underline; }
.maintenance-item { border-bottom: 1px solid var(--border); padding: 20px 0; }
.maintenance-item h2 { font-size: 1.2rem; }
.maintenance-item p { margin: 10px 0; color: var(--text-soft); }
.maintenance-descriptors { border: 1px solid var(--border); border-radius: 14px; padding: 16px; max-height: 360px; overflow-y: auto; }
.maintenance-descriptors label { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.maintenance-descriptors input, .maintenance-confirm input { width: 20px; height: 20px; flex-shrink: 0; }
.maintenance-confirm { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.maintenance-delete { background: #a63030; color: #fff; }
.rating-delete-link { display: inline-block; padding: 12px 0; }
.rating-review-actions { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }
#rating-review { padding: 12px 0; }
#rating-review p { margin: 20px 0; line-height: 1.6; }

#add-descriptor {
    margin: 8px 0;
}

/* Keep mobile home copy within the dark left side of the image. */
@media (max-width: 649px) {
    .hero__text { width: 54%; max-width: 230px; }
    .hero h1 { font-size: clamp(2.8rem, 12vw, 4.2rem); }
    .hero__eyebrow { letter-spacing: 0.09em; line-height: 1.6; }
    .hero__subtitle { font-size: 0.9rem; hyphens: auto; overflow-wrap: break-word; }
    .hero__button { padding: 14px 16px; font-size: 0.85rem; }
}

.rating-log-sort-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}
.rating-log-sort-link:hover { text-decoration: underline; }
.rating-log-sort-link:focus-visible { outline: 2px solid var(--beer-light); outline-offset: 4px; }
.rating-log-table th[aria-sort] { color: var(--beer-light); }
