/* ============================================================================
   JustBrewIt — warm editorial coffee theme
   Fraunces (display serif) + Inter (body). Espresso ink on cream, crema-gold accents.
   ========================================================================= */

:root {
    --bg: #FBF6EE;
    --bg-tint: #F4E9DA;
    --surface: #FFFFFF;
    --surface-2: #FBF3E9;
    --ink: #2A1C12;
    --ink-soft: #6E5847;
    --ink-faint: #7E6A55;    /* AA (4.8:1) on cream — small caption/label text */
    --line: #EBDBC7;
    --line-strong: #DCC7AC;

    --brand: #7A5236;         /* coffee */
    --brand-deep: #4B3222;    /* dark roast */
    --brand-tint: #F0E4D6;
    --crema: #C6863C;         /* caramel-gold accent */
    --crema-deep: #9A5F20;    /* AA (4.8:1) on cream — gold used as small text / links */
    --crema-tint: #FBEBD3;

    --leaf: #5E7A4F;          /* washed / green */
    --berry: #A23B4A;         /* bright acidity */
    --plum: #6C4A63;

    --radius: 16px;
    --radius-sm: 10px;
    --radius-pill: 999px;
    --shadow-sm: 0 1px 2px rgba(43, 28, 18, .06), 0 1px 3px rgba(43, 28, 18, .05);
    --shadow: 0 4px 14px rgba(74, 50, 34, .09), 0 2px 6px rgba(74, 50, 34, .06);
    --shadow-lg: 0 18px 44px rgba(58, 38, 24, .16);
    --ring: 0 0 0 3px rgba(198, 134, 60, .30);

    --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --serif: "Fraunces", Georgia, "Times New Roman", serif;
    --maxw: 1180px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #17110D;
        --bg-tint: #1F1610;
        --surface: #211913;
        --surface-2: #2A1F17;
        --ink: #F3E7D8;
        --ink-soft: #C6AD95;
        --ink-faint: #8E7A67;
        --line: #35271C;
        --line-strong: #46331F;
        --brand: #C79366;
        --brand-deep: #E4C39C;
        --brand-tint: #2E2117;
        --crema: #D79A4C;
        --crema-deep: #E9B872;
        --crema-tint: #2C2013;
        --leaf: #8FAe7C;
        --berry: #D67A86;
        --plum: #B491AC;
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
        --shadow: 0 6px 18px rgba(0, 0, 0, .38);
        --shadow-lg: 0 20px 48px rgba(0, 0, 0, .5);
    }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    background-image:
        radial-gradient(900px 380px at 100% -12%, var(--brand-tint), transparent 46%),
        radial-gradient(720px 360px at -12% -4%, var(--crema-tint), transparent 42%);
    background-attachment: fixed;
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; color: var(--ink); line-height: 1.12; margin: 0; letter-spacing: -0.01em; }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--crema-deep); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: 24px; }
.section { padding-block: 56px; }

/* ---------- Top navigation ---------- */
.nav {
    position: sticky; top: 0; z-index: 50;
    backdrop-filter: saturate(140%) blur(10px);
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 20px; height: 66px; }
.nav-menu { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.nav-actions { display: flex; align-items: center; gap: 4px; }
.nav-action { padding: 8px 13px; border-radius: var(--radius-pill); white-space: nowrap; font-weight: 600; color: var(--brand); }
.nav-action.muted { color: var(--ink-soft); font-weight: 500; }
.nav-action:hover { background: var(--surface-2); }
/* CSS-only hamburger (shown only when the menu can't fit — see the media query below) */
.nav-toggle { display: none; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
    display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle span { position: relative; }
.nav-toggle span::before { content: ""; position: absolute; top: -6px; }
.nav-toggle span::after { content: ""; position: absolute; top: 6px; }
.brand {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--serif); font-weight: 600; font-size: 1.32rem; color: var(--ink);
    letter-spacing: -0.02em; white-space: nowrap;
}
.brand .bean {
    width: 30px; height: 30px; display: grid; place-items: center;
    background: linear-gradient(150deg, var(--brand), var(--brand-deep));
    color: #fff; border-radius: 10px; font-size: 17px; box-shadow: var(--shadow-sm);
}
.brand-mark { width: 32px; height: 32px; border-radius: 9px; box-shadow: var(--shadow-sm); }
.brand em { color: var(--crema-deep); font-style: italic; }
.nav-links { display: flex; gap: 4px; margin-left: 8px; flex: 1; min-width: 0; }
.nav-links a {
    padding: 8px 13px; border-radius: var(--radius-pill); color: var(--ink-soft);
    font-weight: 500; font-size: .93rem; transition: background .15s, color .15s;
}
.nav-links a:hover { background: var(--surface-2); color: var(--ink); }
.nav-links a.active { background: var(--brand); color: #fff; }
.nav-cta {
    display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px;
    background: var(--ink); color: var(--bg); border-radius: var(--radius-pill);
    font-weight: 600; font-size: .9rem; white-space: nowrap;
}
.nav-cta:hover { background: var(--brand-deep); color: #fff; }

/* ---------- Hero ---------- */
.hero { padding-block: 64px 40px; }
.eyebrow {
    text-transform: uppercase; letter-spacing: .18em; font-size: .74rem; font-weight: 700;
    color: var(--crema-deep); margin: 0 0 14px;
}
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 600; max-width: 16ch; }
.hero h1 .accent { font-style: italic; color: var(--brand); }
.lede { font-size: 1.2rem; line-height: 1.65; color: var(--ink-soft); max-width: 60ch; margin: 22px 0 0; text-wrap: pretty; }
.hero-stats { display: flex; gap: 34px; margin-top: 34px; flex-wrap: wrap; }
.hero-stats .stat .num { font-family: var(--serif); font-size: 2rem; font-weight: 600; color: var(--brand); }
.hero-stats .stat .lbl { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-faint); }

/* ---------- Home dashboard ---------- */
.home-hero {
    display: grid; grid-template-columns: 1.15fr .85fr; gap: 44px; align-items: center;
    padding-block: 52px 30px;
}
.home-hero h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); max-width: 13ch; letter-spacing: -0.03em; text-wrap: balance; }
.home-hero h1 .accent { font-style: italic; color: var(--brand); }
.home-hero .lede { margin-top: 16px; font-size: 1.1rem; }
.home-hero .hero-stats { margin-top: 26px; gap: 28px; }
.hh-actions { display: flex; flex-direction: column; gap: 14px; }
.home-search {
    display: flex; align-items: center; gap: 10px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-pill);
    padding: 8px 8px 8px 18px; box-shadow: var(--shadow-sm);
}
.home-search:focus-within { border-color: var(--crema); box-shadow: var(--ring); }
.home-search svg { color: var(--ink-faint); flex: none; }
.home-search input { border: 0; background: transparent; outline: none; width: 100%; font: inherit; color: var(--ink); }
.home-search input::placeholder { color: var(--ink-faint); }
.home-search .btn { flex: none; }
.quick { display: flex; flex-wrap: wrap; gap: 10px; }
.quick-pill {
    display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: var(--radius-pill);
    background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-soft); font-weight: 600; font-size: .9rem;
    transition: background .15s, border-color .15s, color .15s;
}
.quick-pill:hover { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.quick-pill .qp-ico { color: var(--crema-deep); font-weight: 700; }

/* Compact stats card (top-right of the hero) */
.stat-card {
    display: inline-flex; align-self: flex-end; overflow: hidden;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); margin-bottom: 2px;
}
.stat-card .s { padding: 11px 18px; text-align: center; border-right: 1px solid var(--line); }
.stat-card .s:last-child { border-right: 0; }
.stat-card .s .n { font-family: var(--serif); font-size: 1.42rem; font-weight: 600; color: var(--brand); line-height: 1; }
.stat-card .s .l { font-size: .62rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-faint); font-weight: 700; margin-top: 5px; }

/* section header with "see all" */
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.sec-head .eyebrow { margin: 0 0 4px; }
.sec-title { font-size: clamp(1.55rem, 2.8vw, 2.25rem); letter-spacing: -0.02em; text-wrap: balance; }
.sec-head { margin-bottom: 22px; }
.see-all { font-weight: 600; font-size: .9rem; color: var(--brand); white-space: nowrap; }
.see-all:hover { color: var(--crema-deep); }

/* horizontal scroll rail (roasters / farmers) */
.rail {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(272px, 1fr); gap: 16px;
    margin-top: 20px; overflow-x: auto; padding: 4px 0 10px; scroll-snap-type: x proximity;
    /* hide the scrollbar entirely — the faded edges signal more content */
    scrollbar-width: none; -ms-overflow-style: none;
    /* the fade is a horizontal mask; JS toggles .fade-left / .fade-right by scroll position
       so the edgemost content is never occluded when scrolled fully to that end */
    --edge: 42px; --l: #000; --r: #000;
    -webkit-mask-image: linear-gradient(to right, var(--l), #000 var(--edge), #000 calc(100% - var(--edge)), var(--r));
            mask-image: linear-gradient(to right, var(--l), #000 var(--edge), #000 calc(100% - var(--edge)), var(--r));
    transition: -webkit-mask-image .22s ease, mask-image .22s ease;
}
.rail::-webkit-scrollbar { display: none; }
.rail.fade-left  { --l: transparent; }
.rail.fade-right { --r: transparent; }
.rcard {
    scroll-snap-align: start; display: flex; gap: 14px; align-items: flex-start;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 18px; box-shadow: var(--shadow-sm); color: inherit;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.rcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.rcard .rc-body { min-width: 0; }
.rc-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rcard h3 { font-size: 1.14rem; }
.rc-story { color: var(--ink-soft); font-size: .9rem; margin: 9px 0 0; font-style: italic; }
/* inline share link + copy */
.share-link { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.share-input {
    font: inherit; font-size: .82rem; color: var(--ink-soft); background: var(--surface-2);
    border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; min-width: 200px; max-width: 260px;
}

/* two-line card metadata: location (readable) over an uppercase count caption */
.rc-meta { margin-top: 3px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rc-meta .loc { font-size: .9rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-meta .cnt { font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-faint); }
.rcard.hero .rc-meta .loc { color: rgba(255,255,255,.9); }
.rcard.hero .rc-meta .cnt { color: rgba(255,255,255,.72); }
.rcard.hero .rc-meta .loc, .rcard.hero .rc-meta .cnt { text-shadow: 0 1px 8px rgba(0,0,0,.55); }

/* popular coffees (ranked) */
.pop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; margin-top: 20px; }
.pop {
    display: flex; align-items: center; gap: 15px; color: inherit;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 14px 17px; box-shadow: var(--shadow-sm);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.pop:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.pop .rank { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; color: var(--crema-deep); width: 28px; text-align: center; flex: none; }
.pop .pop-body { flex: 1; min-width: 0; }
.pop .pop-body h3 { font-size: 1.1rem; margin-top: 2px; }

@media (max-width: 820px) {
    .home-hero { grid-template-columns: 1fr; gap: 26px; padding-block: 36px 24px; }
}

/* ---------- Page header ---------- */
.page-head { padding-block: 52px 10px; }
.page-title { font-size: clamp(2.2rem, 4.4vw, 3.2rem); letter-spacing: -0.025em; text-wrap: balance; }
.page-head .lede { margin-top: 12px; }

/* ---------- Search + filter bar ---------- */
.filterbar {
    display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 14px; box-shadow: var(--shadow-sm); margin-top: 22px;
}
.search {
    flex: 1 1 260px; display: flex; align-items: center; gap: 10px;
    background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-pill);
    padding: 10px 16px;
}
.search svg { color: var(--ink-faint); flex: none; }
.search input {
    border: 0; background: transparent; outline: none; width: 100%;
    font: inherit; color: var(--ink);
}
.search input::placeholder { color: var(--ink-faint); }
.select {
    position: relative; display: inline-flex; align-items: center;
}
.select select {
    appearance: none; -webkit-appearance: none;
    font: inherit; font-size: .92rem; color: var(--ink);
    background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-pill);
    padding: 10px 34px 10px 15px; cursor: pointer; outline: none;
}
.select select:focus { box-shadow: var(--ring); border-color: var(--crema); }
.select::after {
    content: ""; position: absolute; right: 14px; pointer-events: none;
    width: 8px; height: 8px; border-right: 2px solid var(--ink-faint); border-bottom: 2px solid var(--ink-faint);
    transform: rotate(45deg) translateY(-2px);
}
.result-count { color: var(--ink-faint); font-size: .9rem; margin: 18px 2px 0; }

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 11px; border-radius: var(--radius-pill);
    font-size: .78rem; font-weight: 600; letter-spacing: .01em;
    background: var(--brand-tint); color: var(--brand-deep); border: 1px solid transparent;
}
.chip.leaf { background: color-mix(in srgb, var(--leaf) 18%, var(--surface)); color: var(--leaf); }
.chip.berry { background: color-mix(in srgb, var(--berry) 15%, var(--surface)); color: var(--berry); }
.chip.plum { background: color-mix(in srgb, var(--plum) 16%, var(--surface)); color: var(--plum); }
.chip.ghost { background: var(--surface-2); color: var(--ink-soft); border-color: var(--line); }
.chip.gold { background: var(--crema-tint); color: var(--crema-deep); }

/* ---------- Card grid ---------- */
.grid { display: grid; gap: 18px; margin-top: 22px; }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); }
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

.card {
    position: relative; display: flex; flex-direction: column;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 20px; box-shadow: var(--shadow-sm);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
a.card, .card a.stretch::after { color: inherit; }
a.card:hover, .card.hoverable:hover {
    transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong);
}
.card .kicker { font-size: .76rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-faint); font-weight: 700; }
.card h3 { font-size: 1.28rem; margin-top: 6px; }
.card .sub { color: var(--ink-soft); font-size: .95rem; margin-top: 3px; }
.card .notes { color: var(--ink-soft); font-size: .92rem; margin-top: 12px; font-style: italic; }
.card .card-foot { margin-top: auto; padding-top: 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Monogram avatar for entities without a photo */
.mono {
    width: 46px; height: 46px; border-radius: 13px; flex: none;
    display: grid; place-items: center; color: #fff; font-family: var(--serif);
    font-weight: 600; font-size: 1.3rem; box-shadow: var(--shadow-sm);
    background: linear-gradient(150deg, var(--brand), var(--brand-deep));
}
.mono.c1 { background: linear-gradient(150deg, #8A5A38, #5B3A24); }
.mono.c2 { background: linear-gradient(150deg, #A66A28, #79471A); }
.mono.c3 { background: linear-gradient(150deg, #5E7A4F, #3C5333); }
.mono.c4 { background: linear-gradient(150deg, #A23B4A, #6E2632); }
.mono.c5 { background: linear-gradient(150deg, #6C4A63, #452F40); }
.mono.lg { width: 78px; height: 78px; border-radius: 20px; font-size: 2.1rem; }

.card-head { display: flex; align-items: center; gap: 14px; }
.card-head .id h3 { font-size: 1.18rem; }

/* Roast meter dots */
.roast { display: inline-flex; align-items: center; gap: 5px; }
.roast .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.roast .dot.on { background: var(--brand-deep); }
.roast .lbl { font-size: .82rem; color: var(--ink-soft); margin-left: 4px; }

/* ---------- Hero-image cards ---------- */
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; z-index: 0; transition: transform .4s ease; }
/* Even overall darken + a strong bottom ramp so titles/labels always read crisply over any photo. */
.hero-scrim { position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(180deg, rgba(18,11,6,.34) 0%, rgba(18,11,6,.34) 34%, rgba(18,11,6,.74) 70%, rgba(18,11,6,.95) 100%); }
a.card.hero:hover .hero-bg, .rcard.hero:hover .hero-bg { transform: scale(1.05); }
.card.hero h3, .card.hero .kicker, .card.hero .sub, .card.hero .notes,
.rcard.hero h3, .rcard.hero .sub { text-shadow: 0 1px 8px rgba(0,0,0,.55); }

.card.hero { position: relative; overflow: hidden; min-height: 210px; justify-content: flex-end; border-color: transparent; }
.card.hero > *:not(.hero-bg):not(.hero-scrim) { position: relative; z-index: 2; }
.card.hero, .card.hero h3 { color: #fff; }
.card.hero .kicker { color: rgba(255,255,255,.82); }
.card.hero .sub, .card.hero .notes { color: rgba(255,255,255,.92); }
.card.hero .roast .dot { background: rgba(255,255,255,.4); }
.card.hero .roast .dot.on { background: #fff; }
.card.hero .roast .lbl { color: rgba(255,255,255,.9); }

.rcard.hero { position: relative; overflow: hidden; border-color: transparent; min-height: 138px; align-items: flex-end; }
.rcard.hero > *:not(.hero-bg):not(.hero-scrim) { position: relative; z-index: 2; }
.rcard.hero h3 { color: #fff; }
.rcard.hero .sub { color: rgba(255,255,255,.85); }

/* Logo monogram (replaces the first-letter avatar when a logo exists; the tile is a pre-padded, opaque square) */
.mono.logo { background: transparent; padding: 0; overflow: hidden; border: 1px solid var(--line); }
.mono.logo img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Detail pages ---------- */
.detail-hero {
    display: flex; gap: 22px; align-items: flex-start;
    padding: 28px; background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-top: 22px;
}
.detail-hero .mono { --w: 90px; }
.detail-hero h1 { font-size: clamp(2.1rem, 4.2vw, 3.1rem); letter-spacing: -0.025em; text-wrap: balance; }
.detail-hero .sub { color: var(--ink-soft); font-size: 1.05rem; margin-top: 6px; }
.meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 2px 24px; margin-top: 20px; }
.meta-grid .m .k { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-faint); font-weight: 700; }
.meta-grid .m .v { font-size: 1.02rem; color: var(--ink); margin-bottom: 12px; }
.subhead { font-size: 1.4rem; margin: 36px 0 4px; display: flex; align-items: baseline; gap: 10px; }
.subhead .count { font-size: .9rem; font-weight: 600; color: var(--ink-faint); font-family: var(--sans); }

/* Profile track cards */
/* Profile track: the coloured .badge (living/official/you, below) carries the type — no side stripe needed. */
.badge {
    display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .1em; padding: 3px 9px; border-radius: var(--radius-pill);
}
.badge.living { background: color-mix(in srgb, var(--leaf) 16%, var(--surface)); color: var(--leaf); }
.badge.official { background: var(--crema-tint); color: var(--crema-deep); }
.badge.you { background: color-mix(in srgb, var(--berry) 14%, var(--surface)); color: var(--berry); }
.paramrow { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 14px; }
.param .pv { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; color: var(--brand); }
.param .pk { font-size: .74rem; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-faint); font-weight: 700; }

/* ---------- Empty / callouts ---------- */
.empty {
    text-align: center; padding: 56px 24px; border: 1.5px dashed var(--line-strong);
    border-radius: var(--radius); color: var(--ink-soft); margin-top: 22px; background: var(--surface-2);
}
.empty .big { font-size: 2.4rem; }
.callout {
    display: flex; gap: 14px; align-items: center; padding: 16px 18px; margin-top: 22px;
    background: var(--crema-tint); border: 1px solid var(--line-strong); border-radius: var(--radius);
    color: var(--brand-deep);
}

/* ---------- Brew feedback ---------- */
.stars { display: inline-flex; gap: 8px; font-size: 2.3rem; line-height: 1; cursor: pointer; user-select: none; }
.stars .s { color: var(--line-strong); transition: transform .12s ease, color .12s ease; }
.stars .s.on { color: var(--crema); }
.stars .s:hover { transform: scale(1.18); }
.rating-word { font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: var(--brand); }
.tgroup { margin-top: 14px; }
.tgroup > .lbl { font-size: .72rem; text-transform: uppercase; letter-spacing: .11em; color: var(--ink-faint); font-weight: 700; margin-bottom: 6px; }
.chip.tag { cursor: pointer; border: 1px solid var(--line); }
.chip.tag:hover { border-color: var(--line-strong); }
.nudge-hint {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 16px;
    padding: 12px 15px; background: var(--crema-tint); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
    color: var(--brand-deep); font-size: .92rem;
}
.done-hero { text-align: center; padding: 22px 12px 6px; }
.done-hero .big { font-size: 2.6rem; }

.field {
    font: inherit; color: var(--ink); background: var(--surface-2);
    border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 11px 16px; outline: none; width: 100%;
}
.field:focus { box-shadow: var(--ring); border-color: var(--crema); }

.btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px;
    background: var(--brand); color: #fff; border-radius: var(--radius-pill);
    font-weight: 600; border: 0; cursor: pointer; font: inherit; font-weight: 600;
}
.btn:hover { background: var(--brand-deep); color: #fff; }
.btn.ghost { background: transparent; color: var(--brand); border: 1px solid var(--line-strong); }
.btn.ghost:hover { background: var(--surface-2); }

.crumbs { font-size: .88rem; color: var(--ink-faint); margin-top: 26px; }
.crumbs a { color: var(--ink-soft); }

footer.site {
    margin-top: 60px; border-top: 1px solid var(--line);
    padding-block: 30px; color: var(--ink-faint); font-size: .9rem;
}
footer.site .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- Blazor error UI ---------- */
#blazor-error-ui {
    display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
    background: var(--ink); color: var(--bg); padding: 12px 20px; box-shadow: var(--shadow-lg);
}
#blazor-error-ui .reload { color: var(--crema); }
#blazor-error-ui .dismiss { float: right; cursor: pointer; }

/* Header collapses to a hamburger once the full nav can't fit on one row. */
@media (max-width: 900px) {
    .nav-toggle {
        display: grid; place-items: center; margin-left: auto;
        width: 44px; height: 44px; border-radius: 12px; color: var(--ink); cursor: pointer;
    }
    .nav-toggle:hover { background: var(--surface-2); }
    .nav-toggle-cb:checked ~ .nav-toggle span { background: transparent; }
    .nav-toggle-cb:checked ~ .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
    .nav-toggle-cb:checked ~ .nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

    .nav-menu {
        display: none; position: absolute; top: 100%; left: 0; right: 0; flex: none;
        flex-direction: column; align-items: stretch; gap: 2px;
        background: var(--bg); border-bottom: 1px solid var(--line);
        padding: 10px 20px 16px; box-shadow: var(--shadow);
    }
    .nav-toggle-cb:checked ~ .nav-menu { display: flex; }
    .nav-links { flex-direction: column; gap: 2px; margin-left: 0; }
    .nav-links a { padding: 12px; font-size: 1rem; }
    .nav-actions { flex-direction: column; align-items: stretch; gap: 4px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
    .nav-action, .nav-cta { padding: 12px 14px; text-align: center; justify-content: center; }
}

@media (max-width: 640px) {
    .detail-hero { flex-direction: column; }
}

/* ── Coffee-detail: "Brew this" panel + collapsible About ───────────────────── */
.brew-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 12px 0 0; color: var(--ink-soft); font-size: .92rem; }
.brew-note-label { font-weight: 700; color: var(--ink); }

.brew-do { margin-top: 24px; max-width: 680px; }
.seg { display: inline-flex; gap: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 4px; }
.seg button { border: 0; background: transparent; color: var(--ink-soft); font: inherit; font-weight: 600; font-size: .9rem; padding: 8px 18px; border-radius: var(--radius-pill); cursor: pointer; transition: background .18s ease, color .18s ease; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--surface); color: var(--brand-deep); box-shadow: var(--shadow-sm); }
.brew-do-body { margin-top: 16px; }
.brew-do-body .sub { margin: 0 0 12px; }

details.about { margin-top: 34px; border-top: 1px solid var(--line); }
details.about > summary { cursor: pointer; list-style: none; padding: 16px 0 4px; display: flex; align-items: center;
    font-family: var(--serif); font-size: 1.15rem; font-weight: 600; color: var(--ink); }
details.about > summary::-webkit-details-marker { display: none; }
details.about > summary::after { content: "⌄"; margin-left: auto; color: var(--ink-faint); font-size: 1.3rem; line-height: 1; transition: transform .2s ease; }
details.about[open] > summary::after { transform: rotate(180deg); }

/* Accessibility: a visible keyboard-focus ring on every interactive surface (cards are <a>).
   tabindex="-1" is excluded deliberately: it means "focusable only from script, never by Tab", so a ring there
   is never a keyboard affordance. */
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:not([tabindex="-1"]):focus-visible {
    outline: 2px solid var(--crema-deep);
    outline-offset: 2px;
    border-radius: 6px;
}

/* FocusOnNavigate parks focus on the <h1> after each navigation so a screen reader announces the new page. That's
   right — but the element gets tabindex="-1", and Chrome treats the post-keyboard-nav focus as :focus-visible, so
   the UA default ring (blue) drew a box around the page heading. Declining to add OUR ring isn't enough; the
   browser default has to be suppressed explicitly. Focus stays (screen readers unaffected); only the ring goes. */
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }

/* Accessibility: honor the OS "reduce motion" preference across the whole app. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Home "Explore the atlas": a quiet joined link table — deliberately unlike the hero card grids. */
.atlas-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.atlas-links a { display: flex; flex-direction: column; gap: 3px; padding: 16px 18px; background: var(--surface);
    text-decoration: none; transition: background .18s ease; }
.atlas-links a:hover { background: var(--surface-2); }
.atlas-links a b { font-family: var(--serif); font-size: 1.12rem; font-weight: 600; color: var(--ink); }
.atlas-links a span { font-size: .86rem; color: var(--ink-soft); }

/* Submit: staged brew progress + spinner (reduced-motion handled by the global guard below). */
.brew-progress { display: flex; align-items: center; gap: 14px; margin-top: 20px; padding: 16px 18px;
    background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); }
.brew-progress .bp-stage { font-family: var(--serif); font-size: 1.08rem; font-weight: 600; color: var(--ink); }
.spinner { flex: none; width: 22px; height: 22px; border-radius: 50%;
    border: 3px solid color-mix(in srgb, var(--crema) 30%, transparent); border-top-color: var(--crema-deep);
    animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Admin AI picker: highlight the currently-selected models. */
.card.picked { border-color: var(--crema-deep); box-shadow: 0 0 0 1px var(--crema-deep) inset; }

/* ── Gear picker: a searchable, grouped hardware combobox (not a native select). ── */
.picker { position: relative; }
.picker-field {
    width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    font: inherit; text-align: left; cursor: pointer;
    background: var(--surface-2); color: var(--ink);
    border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 14px;
}
.picker.open .picker-field, .picker-field:focus-visible { border-color: var(--crema-deep); }
.picker-value { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.picker-detail { color: var(--ink-faint); font-size: .82rem; }
.picker-placeholder { color: var(--ink-faint); }
.picker-caret { color: var(--ink-faint); }

.picker-menu {
    position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; right: 0;
    max-height: 320px; overflow-y: auto;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius-sm); box-shadow: var(--shadow-md, 0 10px 30px rgba(42,28,18,.16));
    padding: 8px;
}
.picker-search {
    width: 100%; font: inherit; color: var(--ink);
    background: var(--surface-2); border: 1px solid var(--line);
    border-radius: var(--radius-pill); padding: 8px 12px; margin-bottom: 6px;
}
.picker-group {
    font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    color: var(--ink-faint); padding: 10px 8px 4px;
}
.picker-option {
    width: 100%; display: flex; flex-direction: column; gap: 2px; text-align: left;
    font: inherit; cursor: pointer; background: transparent; border: 0;
    border-radius: var(--radius-sm); padding: 9px 10px;
}
.picker-option:hover { background: var(--surface-2); }
.picker-option.sel { background: var(--surface-2); }
.po-name { color: var(--ink); font-weight: 600; }
.po-check { color: var(--crema-deep); }
.po-detail { color: var(--ink-faint); font-size: .82rem; }
.picker-empty { color: var(--ink-faint); padding: 12px 10px; font-size: .9rem; }

/* ── Official profile cards: visibly the roaster's own recipe, not community-tuned. ── */
.card.track.official {
    background: linear-gradient(180deg, var(--crema-tint) 0%, var(--surface) 62%);
    border-color: color-mix(in srgb, var(--crema-deep) 34%, var(--line));
}
.card.track { position: relative; }

/* ── Brew flow modal ── */
.modal-scrim { position: fixed; inset: 0; background: rgba(42,28,18,.44); z-index: 90; }
.modal {
    position: fixed; z-index: 91; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: min(560px, calc(100vw - 32px)); max-height: min(86vh, 760px);
    display: flex; flex-direction: column;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius-lg, 20px); box-shadow: 0 24px 70px rgba(42,28,18,.28);
}
.modal-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
    padding: 20px 22px 12px; border-bottom: 1px solid var(--line);
}
.modal-x { background: transparent; border: 0; cursor: pointer; color: var(--ink-faint); font-size: 1rem; padding: 4px; }
.modal-body { padding: 18px 22px; overflow-y: auto; overflow-x: hidden; min-width: 0; }
.modal-body .paramrow, .modal-body .chips, .modal-body > * { min-width: 0; max-width: 100%; }
.modal-body input, .modal-body .share-input, .modal-body textarea { max-width: 100%; box-sizing: border-box; }
.modal-foot {
    display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap;
    padding: 14px 22px 20px; border-top: 1px solid var(--line);
}
@media (max-width: 520px) { .modal { width: calc(100vw - 20px); } }

/* ══ Nav: grouped Explore menu + user menu ══════════════════════════════════
   Opens on hover AND on :focus-within, so it's reachable by keyboard — a
   hover-only menu would be unusable without a mouse. */
.nav-group { position: relative; display: flex; align-items: center; }

.nav-group-trigger,
.user-trigger {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 13px; border-radius: var(--radius-pill);
    font: inherit; font-size: .93rem; font-weight: 500; color: var(--ink-soft);
    background: transparent; border: 0; cursor: pointer; white-space: nowrap;
    transition: background .15s, color .15s;
}
.nav-group-trigger:hover, .user-trigger:hover,
.nav-group:hover .nav-group-trigger, .nav-group:focus-within .nav-group-trigger,
.nav-group:hover .user-trigger, .nav-group:focus-within .user-trigger {
    background: var(--surface-2); color: var(--ink);
}
.caret { font-size: .7rem; color: var(--ink-faint); }

.nav-drop {
    position: absolute; top: calc(100% + 6px); left: 0; z-index: 60;
    min-width: 248px; padding: 8px;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius-sm); box-shadow: 0 14px 40px rgba(42, 28, 18, .16);
    opacity: 0; visibility: hidden; transform: translateY(-4px);
    transition: opacity .14s ease, transform .14s ease, visibility .14s;
}
.nav-drop.right { left: auto; right: 0; }
.nav-group:hover > .nav-drop,
.nav-group:focus-within > .nav-drop { opacity: 1; visibility: visible; transform: translateY(0); }

.nav-drop a {
    display: flex; flex-direction: column; gap: 1px;
    padding: 9px 11px; border-radius: var(--radius-sm); color: var(--ink);
}
.nav-drop a:hover { background: var(--surface-2); }
.nav-drop a b { font-weight: 600; font-size: .94rem; }
.nav-drop a span { color: var(--ink-faint); font-size: .8rem; }
.drop-sep { height: 1px; background: var(--line); margin: 6px 4px; }

/* User chip */
.avatar {
    width: 26px; height: 26px; display: grid; place-items: center;
    border-radius: 50%; background: var(--crema-tint); color: var(--crema-deep);
    font-weight: 700; font-size: .78rem;
}
.user-name { max-width: 12ch; overflow: hidden; text-overflow: ellipsis; }

/* "For roasters" lives in the footer now — present on every page, out of the way. */
.foot-cta { color: var(--crema-deep); font-weight: 600; white-space: nowrap; }
.foot-cta:hover { text-decoration: underline; }

/* Collapsed nav: dropdowns become plain inline lists (no hover on touch). */
@media (max-width: 900px) {
    .nav-drop {
        position: static; opacity: 1; visibility: visible; transform: none;
        box-shadow: none; border: 0; background: transparent;
        min-width: 0; padding: 0 0 0 12px;
    }
    .nav-group { display: block; }
    .nav-drop a span { display: none; }
    .caret { display: none; }
}

/* Brew mode: the Aiden labels its two programs with a green (single) and a blue (batch) button — we mirror that. */
.mode-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: baseline; }
.mode-dot.single { background: #3f9a5c; }
.mode-dot.batch { background: #3f74c8; }
.seg.mode button.on.single { color: #2f7a47; }
.seg.mode button.on.batch { color: #2f5aa0; }

/* Grind-setting slider: a marker shows the suggested/profile dial; the thumb is what you actually used. */
.grind-slider { position: relative; padding: 6px 0; }
.grind-slider input[type="range"] { width: 100%; margin: 0; position: relative; z-index: 1; }
.grind-mark { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--crema-deep); border-radius: 1px; transform: translateX(-1px); pointer-events: none; z-index: 2; }
.grind-mark::after { content: "▾"; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); font-size: .7rem; color: var(--crema-deep); }

/* Compact single/batch toggle — pinned to the top-right of a profile card, on the badge line. */
.track-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; position: relative; min-height: 25px; }
.track-head.has-toggle { padding-right: 148px; }
.mode-toggle { position: absolute; top: 0; right: 0; display: inline-flex; gap: 2px; align-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 2px; }
.mode-toggle button { border: 0; background: transparent; color: var(--ink-faint); font: inherit; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; line-height: 1; padding: 4px 9px; border-radius: var(--radius-pill); cursor: pointer; display: inline-flex; align-items: center; gap: 5px; transition: background .16s ease, color .16s ease; }
.mode-toggle button:hover { color: var(--ink-soft); }
.mode-toggle button.on { background: var(--surface); color: var(--brand-deep); box-shadow: var(--shadow-sm); }
.mode-toggle button.on.single { color: #2f7a47; }
.mode-toggle button.on.batch { color: #2f5aa0; }
.mode-toggle .mode-dot { width: 7px; height: 7px; margin: 0; }

/* Pour timeline — a little bar chart: width ∝ each phase's duration, height + tint ∝ its water temperature. */
.brewline { display: flex; align-items: flex-end; gap: 4px; margin-top: 14px; height: 74px; }
.brewline .bl-seg { flex-basis: 0; min-width: 22px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; }
.brewline .bl-t { font-family: var(--serif); font-size: .82rem; font-weight: 700; color: var(--brand-deep); line-height: 1; }
.brewline .bl-bar { width: 100%; border-radius: 5px 5px 3px 3px; box-shadow: inset 0 -2px 0 rgba(43, 28, 18, .06); }
.brewline .bl-bar.bloom { border-radius: 5px; }
.brewline .bl-k { font-size: .56rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); line-height: 1; }
.brewline-cap { margin-top: 7px; font-size: .72rem; color: var(--ink-faint); font-weight: 600; letter-spacing: .02em; }

/* ── Coffee hero: compact card, facts as a sidebar (wide) / strip (narrow), origin tray beneath ── */
.coffee-hero { margin-top: 22px; }
.coffee-hero .detail-hero { margin-top: 0; padding: 22px; gap: 20px; position: relative; z-index: 1; }

/* The coffee's own photo as a banner across the top of the card; the card below flattens its top edge so the
   two read as one piece. Falls back to the letter monogram when there's no image. */
.coffee-banner {
    height: 210px; background-size: cover; background-position: center;
    border: 1px solid var(--line); border-bottom: 0;
    border-radius: var(--radius) var(--radius) 0 0;
    position: relative; z-index: 1;
}
.coffee-hero.has-banner .detail-hero { border-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; }
@media (max-width: 560px) { .coffee-banner { height: 150px; } }
.coffee-hero .detail-hero .mono { --w: 76px; }
.coffee-hero .detail-hero h1 { font-size: clamp(1.9rem, 3.4vw, 2.65rem); margin-top: 2px; }

.hero-body { flex: 1; min-width: 0; display: flex; align-items: stretch; gap: 26px; }
.hero-main { flex: 1 1 auto; min-width: 0; }
.hero-origin { display: inline-flex; align-items: center; gap: 7px; }
.hero-origin svg { width: 15px; height: 15px; color: var(--crema-deep); flex: 0 0 auto; }
.hero-ctl { margin-top: 14px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.hero-facts { flex: 0 0 196px; display: flex; flex-direction: column; gap: 14px; padding-left: 24px; border-left: 1px solid var(--line); }
.fact { display: flex; align-items: center; gap: 11px; min-width: 150px; }
.fact .fic { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--crema-tint); color: var(--crema-deep); }
.fact .fic svg { width: 16px; height: 16px; }
.fact .ftx .k { font-size: .64rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); font-weight: 700; }
.fact .ftx .v { font-size: .95rem; color: var(--ink); font-weight: 500; line-height: 1.25; }

@media (max-width: 820px) {
    .hero-body { flex-direction: column; gap: 16px; }
    .hero-facts { flex-basis: auto; flex-direction: row; flex-wrap: wrap; gap: 12px 22px; padding: 16px 0 0; border-left: 0; border-top: 1px solid var(--line); }
}

/* Origin story: a soft warm tray tucked under the card — present, but not attention-grabbing. */
.origin-tray { position: relative; z-index: 0; margin: -14px 14px 0; background: color-mix(in srgb, var(--brand) 9%, var(--bg-tint)); border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow-sm); }
.tray-handle { width: 100%; border: 0; background: transparent; cursor: pointer; font: inherit; color: var(--ink); display: flex; align-items: center; gap: 10px; padding: 20px 22px 12px; }
.tray-handle .th-title { font-weight: 700; letter-spacing: .01em; }
.tray-handle .th-meta { font-size: .82rem; color: var(--ink-faint); }
.tray-handle .th-chev { margin-left: auto; font-size: 1.25rem; line-height: 1; color: var(--ink-faint); transition: transform .32s cubic-bezier(.16,1,.3,1); }
.origin-tray.open .tray-handle .th-chev { transform: rotate(180deg); }
.tray-handle:hover .th-chev { color: var(--ink-soft); }

.tray-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .34s cubic-bezier(.16,1,.3,1); }
.origin-tray.open .tray-panel { grid-template-rows: 1fr; }
.tray-inner { overflow: hidden; }
.tray-body { display: flex; flex-wrap: wrap; gap: 10px; padding: 2px 22px 20px; }

.tray-item { display: flex; align-items: center; gap: 12px; min-width: 176px; padding: 11px 14px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); color: var(--ink); text-decoration: none; transition: transform .16s ease, box-shadow .16s ease; }
.tray-item:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.tray-item .ti-ic { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--crema-tint); color: var(--crema-deep); }
.tray-item .ti-ic svg { width: 18px; height: 18px; }
.tray-item .ti-tx { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tray-item .ti-role { font-size: .62rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; color: var(--crema-deep); }
.tray-item .ti-name { font-family: var(--serif); font-size: 1.04rem; font-weight: 600; }
.tray-item .ti-sub { font-size: .8rem; color: var(--ink-soft); }

@media (max-width: 560px) {
    .tray-item { min-width: 0; flex: 1 1 100%; }
}

/* "Rate a brew" popup — the RateBrew card floats centered in a scrim (opened from a button, not shown inline). */
.rate-pop { position: fixed; z-index: 91; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: min(560px, calc(100vw - 24px)); max-height: min(88vh, 820px); overflow-y: auto; overflow-x: hidden; }
.rate-pop > .card { margin: 0; }
.rate-x { position: absolute; top: 16px; right: 16px; z-index: 2; font-size: 1.05rem; line-height: 1; }
@media (max-width: 520px) { .rate-pop { width: calc(100vw - 16px); } }

/* Full profile editor — scalar sliders + an editable pulse program (per-pulse temp, interval, add/remove). */
.peditor .pe-row { margin-top: 12px; }
.peditor input[type="range"] { width: 100%; }
.pe-pulses { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.pe-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pe-add { border: 1px solid var(--line); background: var(--surface-2); color: var(--brand-deep); font: inherit; font-weight: 600; font-size: .8rem; padding: 5px 12px; border-radius: var(--radius-pill); cursor: pointer; }
.pe-add:hover { border-color: var(--crema); }
.pe-pulse { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.pe-plabel { flex: 0 0 auto; width: 30px; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); }
.pe-prow { flex: 1; min-width: 0; }
.pe-prow input[type="range"] { width: 100%; }
.pe-ptemp { font-family: var(--serif); font-size: .92rem; font-weight: 700; color: var(--brand-deep); }
.pe-del { flex: 0 0 auto; border: 0; background: transparent; color: var(--ink-faint); cursor: pointer; font-size: .9rem; padding: 4px; line-height: 1; }
.pe-del:hover { color: var(--berry); }

/* ── Add-a-coffee: the bag photo ─────────────────────────────────────────────────────────────────────────── */
/* A dashed target rather than a bare file input: the photo is the fastest way in, so it should look inviting
   rather than like an afterthought bolted under the textarea. */
.bagdrop {
    display: flex; align-items: center; gap: 14px; cursor: pointer;
    padding: 16px 18px; border: 1.5px dashed var(--line-strong, var(--line)); border-radius: var(--radius-sm);
    background: var(--surface-2); transition: border-color .16s ease, background .16s ease;
}
.bagdrop:hover { border-color: var(--crema-deep); background: var(--crema-tint); }
.bagdrop .bd-ic { font-size: 1.5rem; line-height: 1; }
.bagdrop .bd-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bagdrop .bd-tx .sub { margin: 0; font-size: .85rem; }

.bagshot {
    display: flex; align-items: center; gap: 14px; position: relative;
    padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2);
}
.bagshot img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; flex: 0 0 auto; }
.bagshot .bs-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bagshot .bs-meta strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bagshot .bs-meta .sub { margin: 0; font-size: .82rem; }
.bagshot .bs-x {
    margin-left: auto; flex: 0 0 auto; border: 0; background: transparent; cursor: pointer;
    color: var(--ink-faint); font-size: 1rem; padding: 6px 8px; border-radius: 8px;
}
.bagshot .bs-x:hover { background: var(--surface); color: var(--ink); }
