/* Base scale (~80% of typical 16px root) so more content fits on phone and short viewports. */
@font-face {
    font-family: 'Eagle Lake';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/EagleLake-Regular.ttf') format('truetype');
}

html {
    font-size: 80%;
}

:root {
    --bg-color: #ecc694;
    --text-color: #333;
    --card-bg: #faf7f2;
    --border-color: #6f4918;
    --input-bg: #f3ede4;
    --placeholder-color: #6b5a48;
    --primary: #007bff;
    --success: #34c759;
    --danger: #dc3545;
    --secondary: #6c757d;
    --wine-text: #943e48;
    /* Sign-in / somm CTAs in light mode use the same burgundy as titles */
    --wine-cta: var(--wine-text);
}

/*
 * Dark theme variables must stay outside comment blocks. If --wine-cta is
 * commented out, var(--wine-cta) is undefined and button.somm / .auth-btn-primary
 * lose their background in dark mode.
 *
 * Preview: app.html?theme=dark
 *
 * Alternate palettes (replace the body.dark-mode custom properties only):
 * Harbor:  --bg-color:#0f172a; --card-bg:#1e293b; --input-bg:#0c1422;
 *          --border-color:#334155; --text-color:#e2e8f0; --wine-text:#c4b5fd;
 *          --wine-cta:#9d5a68; --primary:#4d8ef7; --secondary:#64748b; --danger:#e85d6c;
 * Starlit: --bg-color:#111d35; --card-bg:#1c2d4a; --input-bg:#152238;
 *          --border-color:#3b5998; --text-color:#f1f5f9; --wine-text:#f0d9a8;
 *          --wine-cta:#9d5a68; --primary:#4d8ef7; --secondary:#5c6b7e; --danger:#e85d6c;
 */

body.dark-mode {
    color-scheme: dark;
    /* Current: "Bordeaux night" surfaces + wine CTA (must include --wine-cta) */
    --bg-color: #0b1020;
    --card-bg: #151b2e;
    --input-bg: #0a0f1c;
    --placeholder-color: #9aa8c0;
    --border-color: #3d4f7a;
    --text-color: #e8e4dc;
    --wine-text: #ecc694;
    --wine-cta: #9d5a68;
    --primary: #4d8ef7;
    --success: #28a745;
    --secondary: #5c6b7e;
    --danger: #e85d6c;
    background-image: url('images/dark_background_small.png');
}

body.dark-mode .auth-btn-primary {
    background: var(--wine-cta);
    color: #fff;
}

body.dark-mode button.somm {
    background: var(--wine-cta);
    color: #fff;
}

body.dark-mode .menu-overlay {
    background: rgba(6, 12, 28, 0.55);
}

body.dark-mode .side-menu {
    box-shadow: 0.625rem 0 1.875rem rgba(0, 8, 24, 0.45);
}

/* Shared copyright footer (home, FAQ, app) */
.site-footer {
    text-align: center;
    font-size: 1.05rem;
    opacity: 0.85;
    margin: 0;
    padding: 1.5rem 1rem 2rem;
    color: var(--text-color);
    box-sizing: border-box;
}

.site-footer a {
    color: var(--primary);
}

/* Fixed lower-left app version (see version.js) */
.site-version-badge {
    position: fixed;
    left: 0.65rem;
    bottom: 0.55rem;
    z-index: 2500;
    font-size: 0.85rem;
    line-height: 1.2;
    padding: 0.35rem 0.55rem;
    border-radius: 0.35rem;
    background: color-mix(in srgb, var(--card-bg) 88%, transparent);
    border: 1px solid color-mix(in srgb, var(--border-color) 65%, transparent);
    color: var(--text-color);
    opacity: 0.82;
    text-decoration: none;
    font-variant-numeric: tabular-nums;
    pointer-events: auto;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.12);
}

.site-version-badge:hover {
    opacity: 1;
    text-decoration: underline;
}

/* FAQ release notes (nested inside faq-item on faq.html; changelog.js) */
.faq-changelog-outer {
    margin-top: 0.5rem;
}

.faq-changelog__inner {
    padding-top: 0.25rem;
}

.faq-changelog__lede {
    margin: 0 0 1rem;
    font-size: 1.05rem;
    opacity: 0.88;
    line-height: 1.45;
}

.faq-changelog__release {
    margin-bottom: 0.65rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--card-bg);
    padding: 0.35rem 0.85rem;
}

.faq-changelog__release summary {
    cursor: pointer;
    font-size: 1.05rem;
    padding: 0.45rem 0;
    list-style: none;
}

.faq-changelog__release summary::-webkit-details-marker {
    display: none;
}

.faq-changelog__date {
    font-weight: normal;
    opacity: 0.72;
    font-size: 0.95rem;
}

.faq-changelog__release ul {
    margin: 0.25rem 0 0.75rem 1.15rem;
    padding: 0;
    font-size: 0.98rem;
    line-height: 1.45;
}

.faq-changelog__release li {
    margin-bottom: 0.35rem;
}

.faq-changelog__release li:last-child {
    margin-bottom: 0;
}

body.dark-mode .site-version-badge {
    box-shadow: 0 0.125rem 0.625rem rgba(0, 0, 0, 0.35);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 1.5rem;
    /* ~18pt */
    margin: 0;
    background-color: var(--bg-color);
    background-image: url('images/background_small.png');
    background-repeat: repeat;
    color: var(--text-color);
    line-height: 1.4;
}

/*
 * index.html (marketing) sets class `home-landing home2` on <body>. home.css overrides
 * the tiled background; light theme wash in rules below applies only without `.home2`.
 */
body.home-landing:not(.dark-mode) {
    background-image:
        /* linear-gradient(rgba(250, 247, 242, 0.65), rgba(250, 247, 242, 0.65)), */
        linear-gradient(rgba(235, 180, 130, 0.45), rgba(235, 180, 130, 0.45)),
        url('images/background_small.png');
    background-repeat: repeat, repeat;
}

/* --- Sidebar --- */
.side-menu {
    position: fixed;
    top: 0;
    left: -20rem;
    /* Hidden by default */
    width: 18.75rem;
    height: 100%;
    background: var(--card-bg);
    z-index: 2000;
    /* Higher than header */
    transition: left 0.3s ease;
    padding: 1.875rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    box-shadow: 0.625rem 0 1.875rem rgba(0, 0, 0, 0.2);
}

.side-menu.open {
    left: 0;
}

.side-menu-title {
    cursor: pointer;
    user-select: none;
    color: var(--wine-text);
}

.side-menu-title:hover,
.side-menu-title:focus-visible {
    opacity: 0.85;
    outline: none;
    text-decoration: underline;
}

.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1500;
}

.menu-item {
    display: block;
    width: 100%;
    padding: 0.9375rem;
    background: none;
    color: var(--text-color);
    text-align: left;
    border: none;
    cursor: pointer;
    font-size: 1.4rem;
    border-radius: 0.5rem;
    margin-bottom: 0.625rem;
}

.menu-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

body.dark-mode .menu-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* --- Header --- */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.hamburger-btn {
    font-size: 2.25rem;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    width: 3.125rem;
}

/* px + vw so title stays pre-shrink size while `html { font-size: 80% }` scales the rest */
.app-title {
    margin: 0;
    font-family: 'Eagle Lake', Georgia, 'Times New Roman', serif;
    font-size: clamp(26px, 4.2vw, 42px);
    font-weight: 400;
    color: var(--wine-text);
    line-height: 1.1;
}

@media (min-width: 600px) {
    .app-title { white-space: nowrap; }
}

/* --- Page & Form Container --- */
.page {
    display: none;
    width: 95%;
    max-width: 37.5rem;
    margin: 1.875rem auto;
    padding: 1.875rem;
    box-sizing: border-box;
    background: var(--card-bg);
    border-radius: 0.75rem;
}

.page > h3 {
    margin: 0 0 1rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.page.active {
    display: block;
}

/* Collector list + add/edit bottle: wider than default `.page` (dashboard unchanged) */
#page-list.page--collector-cards,
#page-add {
    width: min(95%, 90vw);
    max-width: none;
}

#page-list.page--collector-grid {
    width: min(99%, 98vw);
    max-width: none;
}

.collector-list-heading {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem 1rem;
    margin-bottom: 1.25rem;
}

.collector-list-heading__main {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 1.25rem;
    flex: 1;
    min-width: 0;
}

.collector-list-heading__title {
    margin: 0;
    border: none;
    padding: 0;
}

.bottle-form-heading {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem 1rem;
    margin-bottom: 1.25rem;
}

.bottle-form-heading__title {
    margin: 0;
    border: none;
    padding: 0;
    flex: 1;
    min-width: 0;
}

.bottle-form-heading__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    align-items: center;
}

.bottle-form-heading__btn {
    width: auto;
    min-width: 5.5rem;
    padding: 0.625rem 1.125rem;
    font-size: 1.2rem;
}

.collector-grid-totals {
    display: none;
    font-size: 1.25rem;
    font-weight: 600;
    opacity: 0.92;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    align-items: baseline;
}

#page-list.page--collector-grid .collector-grid-totals {
    display: flex;
}

.collector-total-label {
    font-weight: 800;
    opacity: 1;
}

.collector-roi-gain {
    font-weight: 700;
    white-space: nowrap;
}

/* ---- Grid Columns inline picker ---- */
.grid-col-picker {
    align-self: center;
    position: relative;
    display: inline-block;
}

.grid-col-picker__pill {
    all: unset;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: 1.5px solid color-mix(in srgb, var(--wine-text) 40%, var(--border-color));
    border-radius: 999px;
    background: color-mix(in srgb, var(--wine-text) 12%, var(--input-bg));
    color: var(--wine-text);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s;
    box-sizing: border-box;
}

body.dark-mode .grid-col-picker__pill {
    background: color-mix(in srgb, var(--wine-text) 16%, var(--input-bg));
    border-color: color-mix(in srgb, var(--wine-text) 45%, var(--border-color));
}

.grid-col-picker__pill:hover {
    background: color-mix(in srgb, var(--wine-text) 20%, var(--input-bg));
    border-color: color-mix(in srgb, var(--wine-text) 55%, var(--border-color));
}

body.dark-mode .grid-col-picker__pill:hover {
    background: color-mix(in srgb, var(--wine-text) 24%, var(--input-bg));
}

.grid-col-picker__chevron {
    font-size: 0.85em;
    opacity: 0.7;
}

.grid-col-picker__panel {
    display: none;
    position: absolute;
    top: calc(100% + 0.375rem);
    left: 0;
    z-index: 500;
    min-width: 13rem;
    background: var(--card-bg);
    border: 1.5px solid var(--border-color);
    border-radius: 0.625rem;
    box-shadow: 0 0.375rem 1.25rem rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0.25rem;
}

.grid-col-picker__panel.is-open {
    display: block;
}

.grid-col-picker__item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.85rem;
    font-size: 1.15rem;
    cursor: pointer;
    border-radius: 0.375rem;
    user-select: none;
    transition: background 0.12s;
}

.grid-col-picker__item:hover {
    background: rgba(0, 0, 0, 0.055);
}

body.dark-mode .grid-col-picker__item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.grid-col-picker__item input[type="checkbox"] {
    width: 1.1em;
    height: 1.1em;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

button.collector-list-back {
    width: auto;
}

.collector-search-wrap {
    position: relative;
    width: 100%;
    margin-bottom: 1.25rem;
}

.collector-search-input {
    width: 100%;
    padding: 0.75rem 2.75rem 0.75rem 0.75rem;
    font-size: 1.25rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    box-sizing: border-box;
}

.collector-search-clear {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: color-mix(in srgb, var(--text-color) 18%, var(--input-bg));
    color: var(--text-color);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.75;
}

.collector-search-clear:hover,
.collector-search-clear:focus-visible {
    opacity: 1;
    background: color-mix(in srgb, var(--text-color) 28%, var(--input-bg));
    outline: 2px solid var(--primary);
    outline-offset: 1px;
}

.collector-search-clear[hidden] {
    display: none;
}

/* Collection list (card mode): one panel per bottle + compact header actions */
.wine-grid--bottle-list {
    display: flex;
    flex-direction: column;
    gap: 1.125rem;
}

.wine-card--bottle-entry {
    margin: 0;
    padding: 1rem 1.125rem 1.125rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.06);
}

body.dark-mode .wine-card--bottle-entry {
    box-shadow: 0 0.25rem 0.875rem rgba(0, 0, 0, 0.35);
}

.wine-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}

.wine-card__title-row {
    flex: 1;
    min-width: 0;
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    align-items: baseline;
}

.wine-card__meta {
    font-weight: 400;
    font-size: 1.25rem;
}

.wine-card__proof {
    font-weight: 400;
    font-size: 1.15rem;
    opacity: 0.85;
}

.wine-card__desc {
    font-weight: 400;
    font-style: italic;
    font-size: 1.25rem;
    opacity: 0.8;
}

.wine-card__actions {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    flex-shrink: 0;
}

button.wine-card__icon-btn {
    padding: 0.35rem;
    font-size: 1.4rem;
    line-height: 1;
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    width: auto;
    min-width: 2.25rem;
    min-height: 2.25rem;
    font-weight: 400;
    color: var(--text-color);
}

button.wine-card__icon-btn:hover {
    background: color-mix(in srgb, var(--border-color) 22%, transparent);
}

button.somm.somm--compact {
    padding: 0.4rem 0.65rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.5rem;
    width: auto;
    white-space: nowrap;
}

button.somm.somm--compact:focus-visible {
    outline: 2px solid var(--wine-cta, var(--wine-text));
    outline-offset: 2px;
}

.est-resale-field-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
}

.est-resale-field-row #marketOrResaleInput {
    flex: 1;
    min-width: 0;
}

.clean-form-group.lookup-row .tasting-rating-field-display {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background: var(--input-bg);
    color: var(--wine-text);
    font-size: 1.4rem;
    line-height: 1.35;
    font-weight: 600;
    width: 100%;
    box-sizing: border-box;
    min-height: calc(1.35em + 1.5rem);
}

.clean-form-group.lookup-row .tasting-rating-field-display.is-empty {
    font-weight: 400;
    color: var(--placeholder-color);
    font-style: italic;
}

@media (min-width: 37.5rem) {
    .clean-form-group.lookup-row .tasting-rating-field-display {
        flex: 1;
        min-width: 0;
        width: auto;
    }
}

.bottle-opened-check {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 1.1rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}

.bottle-opened-check input {
    width: 1.1rem;
    height: 1.1rem;
    margin: 0;
    cursor: pointer;
}

/* --- Responsive Form Layout (Add Bottle) --- */
.clean-form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.9375rem;
    text-align: left;
}

.clean-form-group label {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
    color: var(--text-color);
    font-weight: 400;
}

.clean-label-with-action {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    box-sizing: border-box;
}

.clean-label-with-action .clean-label-text {
    flex: 1;
    min-width: 0;
}

/* Add / Edit bottle "Lookup" actions: same wine-red treatment as `button.somm` (darker in light, lighter in dark) */
.label-lookup-btn {
    font-size: 1.1rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    border: none;
    background: var(--wine-text);
    color: #fff;
    cursor: pointer;
    white-space: nowrap;
    font-weight: 600;
}

body.dark-mode .label-lookup-btn {
    background: var(--wine-cta);
    color: #fff;
}

.label-lookup-btn:hover {
    filter: brightness(0.95);
}

.label-lookup-btn--danger {
    background: var(--danger);
    color: #fff;
}

body.dark-mode .label-lookup-btn--danger {
    background: var(--danger);
    color: #fff;
}

.label-lookup-btn--danger:hover {
    filter: brightness(0.92);
}

.clean-form-group input,
.clean-form-group select,
.clean-form-group textarea {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 1.4rem;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}

.clean-form-group input::placeholder,
.clean-form-group textarea::placeholder,
#searchInput::placeholder,
.auth-field input::placeholder,
.support-modal__field input::placeholder,
.support-modal__field textarea::placeholder {
    color: var(--placeholder-color);
    opacity: 1;
}

.password-wrap {
    position: relative;
    width: 100%;
}

.password-wrap input[type="password"],
.password-wrap input[type="text"].password-input-visible {
    padding-right: 2.75rem;
}

.password-toggle {
    position: absolute;
    right: 0.45rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: none;
    border-radius: 0.375rem;
    background: transparent;
    color: var(--text-color);
    opacity: 0.65;
    cursor: pointer;
    transition: opacity 0.15s, background 0.15s;
}

.password-toggle:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .password-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
}

.password-toggle:focus-visible {
    outline: 2px solid var(--wine-text);
    outline-offset: 1px;
    opacity: 1;
}

.password-toggle-icon {
    width: 1.25rem;
    height: 1.25rem;
    fill: currentColor;
    pointer-events: none;
}

.password-toggle-icon--hide {
    display: none;
}

.password-toggle--visible .password-toggle-icon--show {
    display: none;
}

.password-toggle--visible .password-toggle-icon--hide {
    display: block;
}

.password-requirements {
    list-style: none;
    margin: 0.375rem 0 0;
    padding: 0;
    font-size: 0.95rem;
    line-height: 1.35;
}

.password-requirements li {
    display: flex;
    align-items: flex-start;
    gap: 0.375rem;
    margin: 0.2rem 0;
    opacity: 0.55;
}

.password-req-icon {
    flex-shrink: 0;
    width: 1rem;
    text-align: center;
    font-size: 0.85rem;
}

.password-req-icon::before {
    content: '\25CB';
}

.password-req--met {
    opacity: 1;
    color: #2e7d32;
}

.password-req--met .password-req-icon::before {
    content: '\2713';
}

.password-req--unmet {
    opacity: 1;
    color: var(--wine-text);
}

.auth-field .password-requirements {
    font-size: 0.9rem;
}

.clean-form-group textarea {
    line-height: 1.45;
    overflow-y: auto;
    resize: none;
}

/* 1 line by default; grows with content up to ~3 lines then scrolls (height synced in JS) */
.field-textarea--description {
    min-height: calc(1.45em * 1 + 1.5rem);
    max-height: calc(1.45em * 3 + 1.5rem);
    overflow-y: auto;
}

/* ~2 visible lines; scroll when Lookup fills more (same idea as description) */
.field-textarea--food-pairing {
    min-height: calc(1.45em * 2 + 1.5rem);
    max-height: calc(1.45em * 2 + 1.5rem);
}

.field-textarea--somm-notes {
    min-height: calc(1.45em * 4 + 1.5rem);
    overflow-y: hidden;
}

button.somm.somm--has-notes {
    opacity: 0.55;
}

button.somm.somm--has-notes:hover,
button.somm.somm--has-notes:focus-visible {
    opacity: 0.85;
}

.card-somm-block {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.card-somm-block__label {
    font-size: 1rem;
    font-weight: bold;
    opacity: 0.6;
    margin-bottom: 0.25rem;
}

.card-somm-block__text {
    font-size: 1.2rem;
    white-space: pre-wrap;
    line-height: 1.45;
}

.card-notes-block {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.card-notes-block__label {
    font-size: 1rem;
    font-weight: bold;
    opacity: 0.6;
    margin-bottom: 0.25rem;
}

.card-notes-block__text {
    font-size: 1.2rem;
    white-space: pre-wrap;
    line-height: 1.45;
}

.wine-card__region-row {
    font-size: 1.15rem;
    opacity: 0.8;
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
}

.wine-card__meta-row {
    font-size: 1.15rem;
    opacity: 0.88;
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.wine-card__meta-item__label {
    opacity: 0.7;
}

.card-field-block {
    margin-top: 0.75rem;
}

.card-field-block--divided {
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.card-field-block__label {
    font-size: 1rem;
    font-weight: bold;
    opacity: 0.6;
    margin-bottom: 0.25rem;
}

.card-field-block__text {
    font-size: 1.2rem;
    white-space: pre-wrap;
    line-height: 1.45;
}

.camera-desktop-hint {
    font-size: 1.05rem;
    line-height: 1.45;
    opacity: 0.85;
    margin: -0.5rem 0 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    text-align: left;
}

.bottle-photo-form-row {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.bottle-photo-form-row__thumb {
    width: 4.5rem;
    height: 4.5rem;
    object-fit: cover;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
}

.camera-capture-modal,
.bottle-picture-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 5000;
    background: rgba(0, 0, 0, 0.75);
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(3px);
}

.camera-capture-modal__panel,
.bottle-picture-modal__panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.25rem;
    width: min(100%, 28rem);
    text-align: center;
    box-shadow: 0 0.625rem 2.5rem rgba(0, 0, 0, 0.35);
}

.camera-capture-modal__title,
.bottle-picture-modal__title {
    margin: 0 0 1rem;
    color: var(--wine-text);
    font-size: 1.5rem;
}

.camera-capture-modal__video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transform-origin: center center;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

.camera-capture-modal__preview-wrap {
    width: 100%;
    max-height: 55vh;
    aspect-ratio: 3 / 4;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #000;
}

.camera-capture-modal__zoom-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.65rem;
}

.camera-capture-modal__zoom-btn {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    border: 1.5px solid var(--border-color);
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 1.5rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.camera-capture-modal__zoom-btn:active {
    transform: scale(0.96);
}

.camera-capture-modal__zoom-label {
    min-width: 3.25rem;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-color);
    text-align: center;
}

.camera-capture-modal__pinch-hint {
    margin: 0.35rem 0 0;
    font-size: 1rem;
    opacity: 0.72;
    color: var(--text-color);
}

.camera-capture-modal__actions {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    margin-top: 1rem;
}

.camera-capture-modal__btn {
    width: 100%;
}

.bottle-picture-modal__img {
    max-width: 100%;
    max-height: 65vh;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    object-fit: contain;
}

.status-message.error {
    background: #ffc107;
    color: #000;
    font-weight: bold;
}

/* Change password: display username one-time claim */
.cp-username-block {
    margin-bottom: 1.5rem;
    padding: 0 0 1rem 0;
    border-bottom: 1px solid var(--border-color);
}
.cp-username-block h4 {
    margin: 0 0 0.75rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
}
.cp-username-disclaimer {
    font-size: 1.15rem;
    line-height: 1.4;
    color: var(--text-color);
    opacity: 0.75;
    margin: 0.5rem 0 0;
}
.cp-username-readonly {
    font-size: 1.25rem;
    color: var(--text-color);
    margin: 0.25rem 0 0;
    word-break: break-word;
}
.cp-username-status {
    font-size: 0.95rem;
    color: var(--text-color);
    opacity: 0.9;
    margin: 0.5rem 0 0;
    min-height: 1.25em;
}

/* Desktop Layout Rules */
@media (min-width: 37.5rem) {
    .clean-form-group {
        flex-direction: row;
        align-items: center;
        margin-bottom: 1.25rem;
    }

    .clean-form-group label {
        width: 11.25rem;
        /* Aligns all inputs vertically */
        margin-bottom: 0;
    }

    .clean-form-group label.clean-label-with-action {
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 0.375rem;
    }

    .clean-form-group label.clean-label-with-action .label-lookup-btn {
        align-self: flex-start;
    }

    .clean-form-group input,
    .clean-form-group select,
    .clean-form-group textarea {
        flex: 1;
        min-width: 0;
        width: auto;
    }

    .clean-form-group--multiline {
        align-items: flex-start;
    }

    .clean-form-group--multiline label {
        padding-top: 0.5rem;
    }
}

/* 1 row by default; grows with content up to ~3 lines then scrolls (height synced in JS) */
.field-textarea--notes {
    min-height: calc(1.45em * 1 + 1.5rem);
    max-height: calc(1.45em * 3 + 1.5rem);
    overflow-y: auto;
}

/* --- Buttons --- */
.action-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Add/edit bottle form: 2x2 grid (Cancel spans full width when delete is hidden) */
.action-stack--grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.action-stack--grid > button {
    min-width: 0;
    padding: 0.875rem 0.625rem;
    font-size: 1.15rem;
    line-height: 1.25;
}

.action-stack--grid:not(.action-stack--has-delete) #addBottleCancelBtn {
    grid-column: 1 / -1;
}

@media (orientation: landscape) and (max-height: 32rem) {
    .action-stack--grid > button {
        padding: 0.75rem 0.5rem;
        font-size: 1.05rem;
    }
}

button {
    padding: 1.125rem;
    border: none;
    border-radius: 0.625rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.35rem;
}

button.primary {
    background: var(--primary);
    color: white;
}

button.success {
    background: var(--success);
    color: white;
}

/* Same red as Admin “Delete User” / other `button.danger` (uses `--danger`) */
button.dashboard-delete-btn {
    background: var(--danger);
    color: #fff;
}

button.dashboard-delete-btn:hover {
    filter: brightness(0.92);
}

button.dashboard-delete-btn:active {
    filter: brightness(0.88);
}

button.secondary {
    background: var(--secondary);
    color: white;
}

button.danger {
    background: var(--danger);
    color: white;
}

button.somm {
    background: var(--wine-text);
    color: white;
}

/*
 * File inputs inside <label.camera-file-picker-label>: overlay covers the tap target but stays
 * non-display:none (better WebKit/mobile). Visible text sits under the input span with pointer-events: none.
 */
label.camera-file-picker-label {
    position: relative;
    overflow: hidden;
}

label.camera-file-picker-label input[type="file"].camera-file-input-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: none;
    opacity: 0;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

label.camera-file-picker-label .camera-file-picker-text {
    pointer-events: none;
    display: inline-block;
}

/* Same tap target sizing as buttons; pair with semantic classes such as `.primary`. */
label.file-picker-label {
    appearance: none;
    -webkit-appearance: none;
    display: inline-block;
    padding: 1.125rem;
    border: none;
    border-radius: 0.625rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.35rem;
    font-family: inherit;
    box-sizing: border-box;
    text-align: center;
    vertical-align: middle;
    line-height: normal;
}

label.primary.file-picker-label {
    background: var(--primary);
    color: white;
}

/* --- Status Messages --- */
.status-message {
    position: fixed;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.9375rem 1.875rem;
    border-radius: 0.625rem;
    color: white;
    z-index: 3000;
    display: none;
}

.status-message.success {
    background: #28a745;
}

.status-message.busy {
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.2);
    animation: status-pulse 1.6s ease-in-out infinite;
}

@keyframes status-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.88; }
}

/* --- Collector grid (table) list --- */
.dashboard-list-row {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    width: 100%;
}

.dashboard-list-row > button {
    flex: 1;
    min-width: 0;
}

.collector-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 0.25rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
}

.collector-table {
    width: 100%;
    min-width: 94rem;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 1.25rem;
}

.collector-table th,
.collector-table td {
    padding: 0.55rem 0.5rem;
    border: 1px solid var(--border-color);
    text-align: left;
    vertical-align: top;
    overflow: hidden;
}

/* Scrollable body for long text - keeps row height reasonable */
.collector-table-cell__clip {
    max-height: 5.5rem;
    overflow-y: auto;
    overflow-x: hidden;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.4;
    -webkit-overflow-scrolling: touch;
}

.collector-table th.collector-table-cell--vineyard,
.collector-table td.collector-table-cell--vineyard {
    width: 10rem;
    min-width: 10rem;
}

.collector-table th.collector-table-cell--country,
.collector-table td.collector-table-cell--country {
    width: 6rem;
    min-width: 6rem;
}

.collector-table th.collector-table-cell--type,
.collector-table td.collector-table-cell--type {
    width: 5.5rem;
    min-width: 5.5rem;
}

.collector-table th.collector-table-cell--varietal,
.collector-table td.collector-table-cell--varietal {
    width: 8rem;
    min-width: 8rem;
}

.collector-table th.collector-table-cell--proof,
.collector-table td.collector-table-cell--proof {
    width: 6.5rem;
    min-width: 6.5rem;
    white-space: nowrap;
}

.collector-table th.collector-table-cell--purchase,
.collector-table td.collector-table-cell--purchase {
    width: 6.5rem;
    min-width: 6.5rem;
    white-space: nowrap;
}

.collector-table th.collector-table-cell--qty,
.collector-table td.collector-table-cell--qty {
    width: 4rem;
    min-width: 4rem;
    white-space: nowrap;
    text-align: center;
}

.collector-table th.collector-table-cell--est,
.collector-table td.collector-table-cell--est {
    width: 6.5rem;
    min-width: 6.5rem;
    white-space: nowrap;
}

.collector-table th.collector-table-cell--location,
.collector-table td.collector-table-cell--location {
    width: 7rem;
    min-width: 7rem;
}

.collector-table th.collector-table-cell--rating,
.collector-table td.collector-table-cell--rating {
    width: 10rem;
    min-width: 10rem;
    white-space: nowrap;
}

/* No fixed width: shrinks when many columns are visible; scrollable clip in cell */
.collector-table th.collector-table-cell--food-pairing,
.collector-table td.collector-table-cell--food-pairing {
    min-width: 16rem;
}

.collector-table th.collector-table-cell--somm,
.collector-table td.collector-table-cell--somm {
    min-width: 16rem;
}

.collector-table th.collector-table-cell--notes,
.collector-table td.collector-table-cell--notes {
    min-width: 16rem;
}

.collector-table th.collector-th-plain {
    white-space: normal;
}

.collector-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    white-space: nowrap;
}

.collector-table th.collector-table-cell--somm .collector-th-sort,
.collector-table th.collector-table-cell--food-pairing .collector-th-sort {
    white-space: normal;
}

.collector-th-sort {
    all: unset;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font: inherit;
    font-weight: 700;
    color: inherit;
    text-align: left;
    white-space: nowrap;
    max-width: 100%;
    box-sizing: border-box;
}

.collector-th-sort:hover {
    opacity: 0.92;
}

.collector-sort-indicator {
    font-size: 1.15em;
    font-weight: 800;
    opacity: 0.75;
    letter-spacing: -0.05em;
}

.collector-th-sort.is-active .collector-sort-indicator {
    opacity: 1;
}

.collector-table tbody tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.04);
}

body.dark-mode .collector-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.06);
}

.collector-table .collector-table-actions {
    white-space: nowrap;
    width: 1%;
    text-align: center;
    vertical-align: middle;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

.collector-table .collector-table-actions__stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.0625rem;
}

.collector-table .collector-table-actions button {
    padding: 0.15rem;
    font-size: 1.35rem;
    background: transparent;
    border: none;
    cursor: pointer;
    line-height: 1;
    width: auto;
    min-width: 0;
    font-weight: 400;
}

/* Floating support (signed-in app only; markup lives inside #app-container) */
.support-fab {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 4300;
    width: 3.5rem;
    height: 3.5rem;
    padding: 0;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--wine-cta);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 0.25rem 1.25rem rgba(0, 0, 0, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.support-fab:hover {
    transform: scale(1.06);
    box-shadow: 0 0.375rem 1.5rem rgba(0, 0, 0, 0.35);
}

.support-fab:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
}

.support-fab__glyph {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.support-fab__icon {
    width: 55%;
    height: 55%;
    display: block;
}

.delete-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 4500;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    padding: 1rem;
    box-sizing: border-box;
}

.delete-confirm-modal__panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem 1.75rem 1.75rem;
    width: 100%;
    max-width: 22rem;
    box-shadow: 0 0.625rem 2.5rem rgba(0, 0, 0, 0.3);
    text-align: center;
}

.delete-confirm-modal__title {
    margin: 0 0 1.25rem;
    color: var(--wine-text);
    font-size: 1.65rem;
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 400;
}

.delete-confirm-modal__actions {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
}

.delete-confirm-modal__actions--stacked {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
}

.delete-confirm-modal__btn {
    width: 100%;
    font-size: 1.25rem;
    padding: 0.75rem 1rem;
    line-height: 1.25;
}

.delete-confirm-modal__icon-btn {
    min-width: 3.25rem;
    min-height: 3.25rem;
    font-size: 1.75rem;
    line-height: 1;
    padding: 0.5rem;
}

.bulk-enrich-panel {
    background: var(--bg-color);
    padding: 1.25rem 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1.25rem;
    border: 1px solid var(--border-color);
    text-align: left;
}

.bulk-enrich-panel__title {
    margin: 0 0 0.75rem;
    font-size: 1.15rem;
    color: var(--wine-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bulk-enrich-panel__status {
    margin: 0 0 0.875rem;
    font-size: 1rem;
    line-height: 1.45;
    opacity: 0.92;
}

.bulk-enrich-panel__current {
    margin: 0.625rem 0 0;
    font-size: 0.95rem;
    opacity: 0.8;
    min-height: 1.25em;
}

.bulk-enrich-progress {
    height: 0.625rem;
    border-radius: 999px;
    background: var(--border-color);
    overflow: hidden;
}

.bulk-enrich-progress__bar {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #1a5f7a, #2a8cad);
    transition: width 0.35s ease;
}

.bulk-enrich-panel__actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.bulk-enrich-modal__panel {
    max-width: 26rem;
}

.bulk-enrich-modal__body {
    margin: 0 0 1.25rem;
    font-size: 1rem;
    line-height: 1.5;
    text-align: left;
    opacity: 0.92;
}

.bulk-enrich-modal__actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.bulk-enrich-modal__btn {
    width: 100%;
}

.unsaved-bottle-modal__hint {
    margin: 0 0 1.25rem;
    font-size: 1.1rem;
    opacity: 0.8;
    line-height: 1.4;
}

.unsaved-bottle-modal__actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
}

.unsaved-bottle-modal__btn {
    width: 100%;
    font-size: 1.25rem;
    padding: 0.75rem 1rem;
    line-height: 1.25;
    border: none;
    border-radius: 0.625rem;
    font-weight: 600;
    cursor: pointer;
}

.unsaved-bottle-modal__btn.success {
    background: var(--success);
    color: #fff;
}

.unsaved-bottle-modal__btn.primary {
    background: var(--primary);
    color: #fff;
}

.unsaved-bottle-modal__btn.danger {
    background: var(--danger);
    color: #fff;
}

.unsaved-bottle-modal__btn:hover {
    filter: brightness(0.94);
}

.unsaved-bottle-modal__btn:active {
    filter: brightness(0.88);
}

.support-modal {
    position: fixed;
    inset: 0;
    z-index: 4400;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    padding: 1rem;
    box-sizing: border-box;
}

.support-modal__panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem 1.75rem 1.75rem;
    width: 100%;
    max-width: 28rem;
    box-shadow: 0 0.625rem 2.5rem rgba(0, 0, 0, 0.3);
}

.support-modal__title {
    margin: 0 0 0.5rem;
    color: var(--wine-text);
    font-size: 1.65rem;
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 400;
}

.support-modal__hint {
    margin: 0 0 1.25rem;
    font-size: 1.05rem;
    opacity: 0.88;
    line-height: 1.45;
}

.support-modal__field {
    margin-bottom: 1rem;
}

.support-modal__field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    font-size: 1.05rem;
}

.support-modal__field input,
.support-modal__field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.65rem 0.75rem;
    font-size: 1.15rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    background: var(--input-bg);
    color: var(--text-color);
    font-family: inherit;
}

.support-modal__field textarea {
    resize: vertical;
    min-height: 7rem;
    line-height: 1.45;
}

.support-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
    justify-content: flex-end;
}

.support-modal__actions .auth-btn-primary,
.support-modal__actions .auth-btn-secondary {
    width: auto;
    min-width: 6rem;
}
/* ─── Mini dropdowns (language + theme) ─────────────────────────────── */
.header-controls {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.mini-dropdown {
    position: relative;
    display: inline-flex;
}

.mini-dropdown__trigger {
    background: none;
    border: none;
    padding: 0.2rem 0.25rem;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.75;
    transition: opacity 0.15s;
    border-radius: 0.25rem;
}

.mini-dropdown__trigger:hover {
    opacity: 1;
}

.mini-dropdown__menu {
    display: none;
    position: absolute;
    top: calc(100% + 0.375rem);
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: 0 0.375rem 1.25rem rgba(0,0,0,0.18);
    padding: 0.25rem 0;
    margin: 0;
    list-style: none;
    min-width: 9rem;
    z-index: 500;
    white-space: nowrap;
}

.mini-dropdown__menu.is-open {
    display: block;
}

.mini-dropdown__menu li {
    margin: 0;
    padding: 0;
}

.mini-dropdown__menu li button,
.mini-dropdown__menu li a {
    display: block;
    width: 100%;
    padding: 0.5rem 0.9rem;
    font-size: 1.05rem;
    text-align: left;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.12s;
    box-sizing: border-box;
}

.mini-dropdown__menu li button:hover,
.mini-dropdown__menu li a:hover {
    background: var(--bg-color);
}

.mini-dropdown__menu li.is-active button,
.mini-dropdown__menu li.is-active a {
    font-weight: 700;
    color: var(--primary);
}

/* Tasting rating modal - emoji label list + horizontal slider (all screen sizes) */
.tasting-rating-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 4500;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.tasting-rating-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
}

.tasting-rating-modal__panel {
    position: relative;
    z-index: 1;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem 1.25rem 1.25rem;
    width: min(100%, 28rem);
    text-align: center;
    box-shadow: 0 0.625rem 2.5rem rgba(0, 0, 0, 0.35);
}

.tasting-rating-modal__title {
    margin: 0 0 0.25rem;
    color: var(--wine-text);
    font-size: 1.75rem;
    line-height: 1.2;
}

.tasting-rating-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    margin: 1rem 0 0.5rem;
    text-align: left;
}

.tasting-rating-scale {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.5rem;
    min-width: 0;
    padding: 0.15rem 0;
}

.tasting-rating-scale__opt {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    margin: 0;
    padding: 0.5rem 0.625rem;
    border: none;
    border-radius: 0.5rem;
    background: transparent;
    cursor: pointer;
    color: var(--text-color);
    opacity: 0.85;
    font: inherit;
    text-align: left;
    min-height: 2.75rem;
}

.tasting-rating-scale__emoji {
    flex-shrink: 0;
    width: 2rem;
    font-size: 1.85rem;
    line-height: 1;
    text-align: center;
}

.tasting-rating-scale__text {
    font-size: 1.35rem;
    line-height: 1.3;
    font-weight: 500;
}

.tasting-rating-scale__opt:hover,
.tasting-rating-scale__opt.is-active {
    opacity: 1;
    color: var(--primary);
    font-weight: 700;
    background: var(--bg-color);
}

.tasting-rating-scale__opt.is-active .tasting-rating-scale__text {
    font-weight: 700;
}

.tasting-rating-slider-area {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    flex-shrink: 0;
    margin-top: 0.25rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}

.tasting-rating-slider-ends {
    display: flex;
    width: 100%;
    justify-content: space-between;
    padding: 0 0.15rem 0.5rem;
    font-size: 2rem;
    line-height: 1;
    color: var(--wine-text);
}

.tasting-rating-slider-col {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0 0.15rem;
    /* Extra vertical space for thumb drag on mobile */
    min-height: 3rem;
}

.tasting-rating-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 2.75rem;
    margin: 0;
    cursor: pointer;
    background: transparent;
    accent-color: var(--primary);
}

.tasting-rating-slider::-webkit-slider-runnable-track {
    height: 0.55rem;
    border-radius: 0.3rem;
    background: var(--border-color);
}

.tasting-rating-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 2rem;
    height: 2rem;
    margin-top: -0.725rem;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--card-bg);
    box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.25);
}

.tasting-rating-slider::-moz-range-track {
    height: 0.55rem;
    border-radius: 0.3rem;
    background: var(--border-color);
}

.tasting-rating-slider::-moz-range-thumb {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--card-bg);
    box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.25);
}

.tasting-rating-current {
    margin: 0.75rem 0 0;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--wine-text);
    min-height: 2rem;
    line-height: 1.3;
}

.tasting-rating-modal__actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.tasting-rating-modal__actions .homeBtn,
.tasting-rating-modal__actions .primary {
    flex: 1;
    font-size: 1.15rem;
}
