@font-face {
  font-family: 'Instrument Sans';
  src: url('/brand/instrument-sans.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}
/* WineBlinders interface tokens. Club themes supply --home-accent. */
:root {
  --ui-pairing-width: 42rem;
  --ui-pairing-panel-radius: 1.4rem;
  --ui-pairing-control-radius: .85rem;
  --ui-pairing-section-space: 1.5rem;
  --ui-pairing-gap: 1.25rem;
  --ui-pairing-small: .65rem;
  --ui-pairing-score: 2.5rem;
  --ui-pairing-qr: 12rem;
  --ui-font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ui-font-heading: var(--ui-font-editorial);
  --ui-font-native: -apple-system, BlinkMacSystemFont, var(--ui-font-family);
  --ui-font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --ui-weight-regular: 400;
  --ui-weight-medium: 500;
  --ui-weight-label: 550;
  --ui-weight-semibold: 600;
  --ui-weight-strong: 650;
  --ui-weight-bold: 700;
  --ui-type-root: 112.5%;
  --ui-type-body: 1rem;
  --ui-leading-body: 1.55;
  --ui-leading-heading: 1.12;
  --ui-entry-width: 560px;
  --ui-motion-fast: 140ms;
  --ui-motion-ease: cubic-bezier(.2, .7, .2, 1);
  --ui-font-email: -apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif;
  --ui-mail-brand-soft: #e9edfa;
  --ui-brand-base: #243c91;
  --ui-star-base: #e8d6a5;
  --ui-contrast-dark: #111418;
  --ui-contrast-light: #fff;
  --ui-bg: #fbfbfa;
  --ui-surface: #fff;
  --ui-surface-raised: #f1f2f0;
  --ui-field: #fff;
  --ui-text: #242624;
  --ui-muted: #606460;
  --ui-faint: #70746f;
  --ui-border: #dedfdd;
  --ui-border-strong: #a0a49f;
  --ui-brand: var(--home-accent, var(--ui-brand-base));
  --ui-on-brand: var(--ui-on-brand-light, var(--ui-contrast-light));
  --ui-action-text: var(--ui-brand);
  --ui-focus: #243c91;
  --ui-danger: #9b3037;
  --ui-shadow: #24262420;
  --ui-success: #21643e;
  --ui-success-soft: #e3eee7;
  --ui-warning: #b18732;
  --ui-warning-text: #574319;
  --ui-warning-soft: #fff4d9;
  --ui-danger-soft: #fff0ef;
  --ui-scrim: #28000873;
  --ui-surface-tint: #ffffff29;
  --ui-glass-highlight: #ffffff99;
  --ui-text-inverse: #fff;
  --ui-qr-surface: #fff;
  --ui-photo-stage: #f1f2f0;
  --ui-brand-shadow: #172a68;
  --ui-glass-wine-light: #fff1b8;
  --ui-glass-wine-deep: #f2c14e;
  --ui-illustration-outline: #24272c;
  --ui-illustration-warm: #e8d6a5;
  --ui-illustration-wine-warm: #e9b85d;
  --ui-illustration-cool: #d7dcfa;
  --ui-illustration-wine-cool: #8d9ce6;
  --ui-illustration-spark: #a7b8ff;
}
[data-appearance="dark"] {
  --ui-bg: color-mix(in srgb, var(--home-accent, var(--ui-brand-base)) 45%, var(--ui-contrast-dark));
  --ui-surface: color-mix(in srgb, var(--ui-bg) 93%, var(--ui-contrast-light));
  --ui-surface-raised: color-mix(in srgb, var(--ui-bg) 84%, var(--ui-contrast-light));
  --ui-field: color-mix(in srgb, var(--ui-bg) 96%, var(--ui-contrast-light));
  --ui-text: #f5f5f2;
  --ui-muted: #b4bfd0;
  --ui-faint: #96a5bc;
  --ui-border: #4a6593;
  --ui-border-strong: #849ac0;
  --ui-brand: color-mix(in srgb, var(--home-accent, var(--ui-brand-base)) 60%, var(--ui-contrast-light));
  --ui-on-brand: #111418;
  --ui-action-text: color-mix(in srgb, var(--ui-brand) 70%, var(--ui-contrast-light));
  --ui-focus: #e8d6a5;
  --ui-danger: #f2a1a1;
  --ui-shadow: #080f1c80;
  --ui-success: #a6efbd;
  --ui-success-soft: #244333;
  --ui-warning: #ffd166;
  --ui-warning-text: #ffe4a1;
  --ui-warning-soft: #4c3b1d;
  --ui-danger-soft: #443034;
  --ui-scrim: #07080abe;
  --ui-surface-tint: #ffffff29;
  --ui-glass-highlight: #ffffff99;
  --ui-brand-shadow: #788bd5;
  --ui-brand-soft: color-mix(in srgb, var(--ui-brand) 20%, var(--ui-surface));
}
/* Component states consume semantic tokens; a club only supplies its accent. */
:root { --ui-brand-soft: color-mix(in srgb, var(--ui-brand) 12%, var(--ui-surface)); }
/* Focused app shell for the two home journeys. */
body:has(.home-view) {
  --red: color-mix(in srgb, var(--home-accent, var(--ui-brand)) 45%, var(--ui-contrast-light));
  --ink: var(--ui-text);
  --muted: var(--ui-muted);
  --faint: var(--ui-faint);
  --line: var(--ui-border);
  --line-strong: var(--ui-border-strong);
  --btn-bg: var(--ui-brand);
  --btn-ink: var(--ui-on-brand);
  --field: var(--ui-field);
  background: var(--ui-surface);
  color: var(--ink);
  color-scheme: dark;
}
.home-view, .home-view .card {
  --ink: var(--ui-text);
  --muted: var(--ui-muted);
  --faint: var(--ui-faint);
  --line: var(--ui-border);
  --line-strong: var(--ui-border-strong);
  --btn-bg: var(--ui-brand);
  --btn-ink: var(--ui-on-brand);
  --field: var(--ui-field);
  color: var(--ink);
}
.home-view { max-width: 980px; min-height: 100dvh; padding-bottom: 124px; }
.home-header { border-bottom: 0; min-height: 84px; }
.home-header .brand .home-wordmark { filter: brightness(0) invert(1); width: 210px; }
.home-header-actions > a.pill { color: var(--ui-brand); }
.home-account-avatar { background: var(--ui-brand); border: 1px solid var(--ui-brand); color: var(--ui-brand); }
.home-mode-nav { max-width: 560px; margin: 0 auto; border-bottom-color: var(--line); justify-content: center; }
.home-mode-nav a { flex: 1; justify-content: center; color: var(--ui-muted); }
.home-mode-nav a[aria-current="page"] { color: var(--ui-brand); border-bottom-color: var(--ui-brand); }
.home-nav-icon { display: none; }
.home-entry { gap: 28px; padding-top: 42px; }
.home-story { display: flex; flex-direction: column; gap: 0; text-align: center; }
.home-view .join-intro { margin: 0 auto; }
.home-view .join-intro .eyebrow { color: var(--ui-brand); font-size: .82rem; letter-spacing: .11em; }
.home-view .join-intro h1 { max-width: 15em; margin: auto; font-size: clamp(2.65rem, 6vw, 4.8rem); font-weight: var(--ui-weight-bold); letter-spacing: -.055em; line-height: 1.06; }
.home-view .join-intro p:last-child { max-width: 34em; margin: 16px auto 0; color: var(--muted); }
.home-illustration { width: min(100%, 380px); margin: 8px auto 0; }
.home-illustration svg { display: block; width: 100%; height: auto; }
.home-view .join-card { max-width: 560px; margin: 0 auto; padding: 28px; background: var(--ui-surface); border: 1px solid var(--ui-border); border-radius: 28px; }
.home-view .join-card h2 { font-size: 1.45rem; font-weight: var(--ui-weight-bold); }
.home-view .join-card label { color: var(--ui-text); }
.home-view input, .home-view select { background-color: var(--ui-surface-raised); color: var(--ui-text-inverse); border: 1px solid var(--ui-border); border-radius: 12px; }
.home-view input:focus, .home-view select:focus { border-color: var(--ui-brand); background: var(--ui-surface-raised); }
.home-view .join-card .code-input { color: var(--ui-text-inverse); text-align: left; }
.home-view .btn { background: var(--ui-brand); color: var(--ui-text); border: 0; border-radius: 15px; font-weight: var(--ui-weight-bold); box-shadow: inset 0 -4px var(--ui-brand-shadow); transition: transform .2s, filter .2s; }
.home-view .btn:hover { filter: brightness(1.06); transform: translateY(-2px); }
.home-view .btn:active { transform: translateY(2px); box-shadow: inset 0 -1px var(--ui-brand-shadow); }
.home-view .btn.ghost { background: var(--ui-surface-raised); color: var(--ui-text); box-shadow: none; border: 1px solid var(--ui-border); }
.home-view .btn.ghost:hover { background: var(--ui-surface-raised); }
.home-view .join-help { max-width: 560px; margin: 32px auto 0; }
.home-view .join-help h2 { color: var(--ui-text); }
.home-view .join-help ol { color: var(--ui-muted); }
.home-view #home-organizer-panel { max-width: 760px; margin: 0 auto; }
.home-entry--organizer { padding-top: 42px; }
.home-entry--organizer .home-story { text-align: center; }
.home-view #home-organizer-panel > .card { border: 0; }
.home-view #home-organizer-panel > #org-tools { margin-top: 0; }
.home-workspace-heading { text-align: center; font-size: 1.55rem !important; color: var(--ui-brand); }
.home-create-action { display: flex; flex-direction: column; align-items: center; padding: 26px; border: 1px solid var(--ui-border); border-radius: 28px; background: var(--ui-surface); }
.home-create-action .btn { max-width: 500px; }
.home-create-action p { text-align: center; }
.home-view #home-organizer-panel #myrooms .card { border: 0; padding: 0; }
.home-view #home-organizer-panel .home-room-list .list-row { padding: 18px; background: var(--ui-surface); border: 1px solid var(--ui-border); border-radius: 18px; margin-bottom: 12px; }
.home-view #home-organizer-panel > .organizer-card { background: var(--ui-surface); border-color: var(--ui-border); border-radius: 24px; }
.home-view #home-organizer-panel .card:not(.organizer-card) { background: transparent; }
.home-view #home-organizer-panel .card .eyebrow { color: var(--ui-brand); }
.home-view .privacy-link { color: var(--ui-muted); }
.home-view .btn.big, .home-view .join-intro .eyebrow, .home-view #home-organizer-panel .card .eyebrow { color: var(--red); }
.home-view .btn.big { background: var(--red); color: var(--ui-text); }
body:has(.home-view) .form-error { color: var(--ui-danger); }
.home-view a:focus-visible, .home-view button:focus-visible, .home-view input:focus-visible, .home-view select:focus-visible { outline: 3px solid var(--ui-warning); outline-offset: 3px; }

@media (max-width: 760px) {
  .home-view { padding: 0 20px 126px; }
  .home-header { min-height: 76px; padding: 14px 0; }
  .home-header .brand .home-wordmark { width: 172px; }
  .home-header-actions { gap: 12px; }
  .home-entry { padding-top: 16px; }
  .home-view .join-intro h1 { font-size: clamp(2.45rem, 10vw, 3.45rem); }
  .home-view .join-intro p:last-child { font-size: .96rem; }
  .home-illustration { width: min(100%, 285px); }
  .home-view .join-card { padding: 24px; }
  .home-mode-nav { position: fixed; z-index: 35; left: 12px; right: 12px; bottom: max(10px, env(safe-area-inset-bottom)); max-width: 560px; min-height: 74px; margin: auto; padding: 6px; border: 1px solid var(--ui-border); border-radius: 26px; background: var(--ui-surface); box-shadow: 0 12px 30px var(--ui-shadow); }
  .home-mode-nav a { display: flex; flex-direction: column; gap: 0; min-height: 60px; border: 0; border-radius: 20px; font-size: .75rem; line-height: 1.2; }
  .home-mode-nav a[aria-current="page"] { background: var(--ui-surface-raised); color: var(--ui-text-inverse); }
  .home-nav-icon { display: block; font-size: 1.45rem; line-height: 1.2; font-weight: var(--ui-weight-regular); }
  .home-view .home-account-link { display: none; }
  .home-view #home-organizer-panel .home-room-list .list-row { display: block; }
  .home-view #home-organizer-panel .home-room-list .list-row > .row { margin-top: 12px; }
}

/* Account pages share the app surface; settings remain a complete view. */
body:has(.account-view) { background: var(--ui-surface); color: var(--ui-text); color-scheme: dark; }
.account-view, .account-view .card {
  --ink: var(--ui-text);
  --muted: var(--ui-muted);
  --line: var(--ui-border);
  --line-strong: var(--ui-border-strong);
  --red: var(--ui-brand);
  --btn-bg: var(--ui-brand);
  --btn-ink: var(--ui-on-brand);
  --field: var(--ui-field);
  color: var(--ink);
}
.account-view .kpi { background: var(--ui-surface-raised); border-color: var(--ui-border); }
.account-view .kpi .big { color: var(--ui-brand); }
.account-view { max-width: 980px; min-height: 100dvh; }
.history-view { padding-block: 18px 108px; }
.history-view > .hero { padding-block: 28px 26px; }
.history-view > .hero h1 { max-width: 18ch; font-size: clamp(2rem, 5vw, 3.15rem); letter-spacing: -.055em; text-wrap: balance; }
.history-view > .hero p { max-width: 56ch; color: var(--ui-muted); font-size: .9rem; line-height: 1.5; }
.history-back { min-height: 44px; padding: 8px 2px; border: 0; background: transparent; color: var(--ui-brand); font: inherit; font-size: .84rem; font-weight: var(--ui-weight-semibold); cursor: pointer; }
.history-back:hover { text-decoration: underline; text-underline-offset: 4px; }
.history-highlight { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: 18px; background: var(--ui-brand-soft); color: var(--ui-brand); }
.history-highlight-icon { width: 31px; height: 31px; flex: 0 0 auto; background: currentColor; mask: url('/brand/icons/winner.svg') center / contain no-repeat; -webkit-mask: url('/brand/icons/winner.svg') center / contain no-repeat; }
.history-highlight > div { min-width: 0; flex: 1; }
.history-highlight > div > span { font-size: .64rem; font-weight: var(--ui-weight-bold); letter-spacing: .12em; }
.history-highlight h2 { margin: 3px 0 0; color: var(--ui-text); font-size: 1.12rem; line-height: 1.25; letter-spacing: -.02em; overflow-wrap: anywhere; }
.history-highlight > strong { font-size: 1.45rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.history-highlight > strong small { color: var(--ui-muted); font-size: .8rem; font-weight: var(--ui-weight-medium); }
.history-wines { margin-block: 30px 22px; }
.history-wines-heading { margin-bottom: 12px; }
.history-wines-heading .eyebrow { color: var(--ui-brand); font-size: .67rem; font-weight: var(--ui-weight-bold); letter-spacing: .13em; }
.history-wines-heading h2 { margin: 5px 0 0; font-size: clamp(1.55rem, 4vw, 2rem); line-height: 1.1; letter-spacing: -.035em; }
.history-wines-list { overflow: hidden; border: 1px solid var(--ui-border); border-radius: 18px; background: var(--ui-surface); }
.history-wine { display: flex; gap: 14px; min-width: 0; padding: 16px 17px; }
.history-wine + .history-wine { border-top: 1px solid var(--ui-border); }
.history-wine-index { display: flex; width: 40px; height: 40px; flex: 0 0 auto; flex-direction: column; align-items: center; justify-content: center; border-radius: 11px; background: var(--ui-brand-soft); color: var(--ui-brand); line-height: 1; }
.history-wine-index span { font-size: .62rem; font-weight: var(--ui-weight-bold); letter-spacing: .04em; }
.history-wine-index b { margin-top: 2px; font-size: .9rem; }
.history-wine-content { min-width: 0; }
.history-wine h3 { margin: 0; font-size: .88rem; line-height: 1.35; font-weight: var(--ui-weight-semibold); overflow-wrap: anywhere; }
.history-wine p { margin: 5px 0 0; color: var(--ui-muted); font-size: .78rem; line-height: 1.4; }
.history-people { margin-block: 26px; }
.history-people-heading { margin-bottom: 16px; }
.history-people-heading .eyebrow { color: var(--ui-brand); font-size: .67rem; font-weight: var(--ui-weight-bold); letter-spacing: .13em; }
.history-people-heading h2 { margin: 5px 0 4px; font-size: clamp(1.55rem, 4vw, 2rem); line-height: 1.1; letter-spacing: -.035em; }
.history-people-heading p { max-width: 58ch; margin: 0; color: var(--ui-muted); font-size: .83rem; line-height: 1.5; }
.history-person { padding: 22px 0 26px; border-top: 1px solid var(--ui-border); }
.history-person-header { display: flex; align-items: start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.history-person-identity { min-width: 0; }
.history-person-identity h3 { display: inline; margin: 0; font-size: clamp(1.08rem, 2.8vw, 1.3rem); line-height: 1.2; letter-spacing: -.025em; overflow-wrap: anywhere; }
.history-person-identity > span { display: inline-block; margin-left: 8px; color: var(--ui-muted); font-size: .72rem; font-weight: var(--ui-weight-medium); }
.history-person-rank { display: flex; align-items: center; gap: 5px; margin: 7px 0 0; color: var(--ui-brand); font-size: .72rem; font-weight: var(--ui-weight-semibold); }
.history-winner-icon { display: inline-block; width: 16px; height: 16px; background: currentColor; mask: url('/brand/icons/winner.svg') center / contain no-repeat; -webkit-mask: url('/brand/icons/winner.svg') center / contain no-repeat; }
.history-person-tally { flex: 0 0 auto; min-width: 74px; padding-top: 1px; text-align: right; color: var(--ui-brand); }
.history-person-tally strong { display: block; font-size: 1.65rem; line-height: 1; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.history-person-tally strong span { color: var(--ui-muted); font-size: 1rem; font-weight: var(--ui-weight-medium); }
.history-person-tally small { display: block; margin-top: 4px; color: var(--ui-muted); font-size: .68rem; }
.history-person-glasses { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.history-glass { min-width: 0; min-height: 112px; padding: 12px 13px; border: 1px solid var(--ui-border); border-radius: 14px; background: var(--ui-surface); }
.history-glass--correct { border-color: color-mix(in srgb, var(--ui-success) 24%, var(--ui-border)); background: var(--ui-success-soft); }
.history-glass-top, .history-glass-main, .history-glass-bottom { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.history-glass-top { color: var(--ui-muted); font-size: .64rem; font-weight: var(--ui-weight-bold); letter-spacing: .1em; }
.history-glass-icon { width: 24px; height: 24px; flex: 0 0 auto; color: var(--ui-muted); background: currentColor; mask: url('/brand/icons/history-glass.svg') center / contain no-repeat; -webkit-mask: url('/brand/icons/history-glass.svg') center / contain no-repeat; }
.history-glass-icon--correct { color: var(--ui-success); mask-image: url('/brand/icons/history-match.svg'); -webkit-mask-image: url('/brand/icons/history-match.svg'); }
.history-glass-icon--incorrect { mask-image: url('/brand/icons/history-miss.svg'); -webkit-mask-image: url('/brand/icons/history-miss.svg'); }
.history-glass-main { justify-content: start; align-items: baseline; margin-top: 7px; }
.history-glass-main strong { font-size: 1.5rem; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.history-glass-main span { color: var(--ui-muted); font-size: .68rem; }
.history-glass-bottom { align-items: baseline; margin-top: 9px; font-size: .73rem; line-height: 1.3; }
.history-glass-bottom > span { color: var(--ui-text); font-weight: var(--ui-weight-semibold); }
.history-glass-bottom b { color: var(--ui-muted); font-size: .68rem; font-weight: var(--ui-weight-medium); text-align: right; }
.history-glass--correct .history-glass-bottom b { color: var(--ui-success); font-weight: var(--ui-weight-semibold); }
@media (max-width: 620px) {
  .history-person-glasses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .history-glass { min-height: 108px; }
}
.account-header img { filter: brightness(0) invert(1); width: 190px; }
.account-header { border-color: var(--ui-border); }
.account-close { color: var(--ui-text-inverse); }
.account-close:hover { background: var(--ui-surface-raised); }
.account-view .hero .ornament { color: var(--ui-brand); }
.account-view .hero h1 { font-weight: var(--ui-weight-bold); }
.account-tabs { border-color: var(--ui-border); }
.account-tabs a { color: var(--ui-muted); }
.account-tabs a[aria-current="page"] { color: var(--ui-brand); border-color: var(--ui-brand); }
.account-view .card { background: var(--ui-surface); border: 1px solid var(--ui-border); border-radius: 22px; box-shadow: none; }
.account-view .card .eyebrow { color: var(--ui-brand); }
.account-view .btn { border-radius: 14px; background: var(--ui-brand); color: var(--ui-text); box-shadow: inset 0 -3px var(--ui-brand-shadow); }
.account-view .btn.ghost { background: var(--ui-surface-raised); color: var(--ui-on-brand); border: 1px solid var(--ui-border); box-shadow: none; }
.account-view .club-invitation { max-width: 540px; margin-inline: auto; }
.account-view .club-invitation .muted { margin: 12px 0 24px; line-height: 1.55; }
.account-view .club-invitation .btn { display: flex; width: 100%; min-height: 56px; align-items: center; justify-content: center; margin: 0; }
.account-view .club-invitation .btn + .btn { margin-top: 10px; }
.account-view .club-invitation .btn.ghost { background: transparent; border-color: transparent; color: var(--ui-muted); box-shadow: none; }
.account-view .club-invitation #invite-status { min-height: 1.5em; margin: 8px 0 0; color: var(--ui-danger); }
.account-view input, .account-view textarea, .account-view select { background: var(--ui-surface-raised); color: var(--ui-text-inverse); border: 1px solid var(--ui-border); }
.account-view :is(a, button, input, select, textarea):focus-visible { outline: 3px solid var(--ui-warning); outline-offset: 3px; }
.account-view #settings { max-width: 680px; margin: 0 auto; background: transparent; border: 0; padding: 0; }
.account-view #settings h2 { margin: 6px 0 24px; font-size: clamp(1.8rem, 5vw, 2.5rem); font-weight: var(--ui-weight-bold); }
.account-settings-email { margin: -12px 0 24px; color: var(--ui-muted); overflow-wrap: anywhere; }
.account-view:has(#settings:not([hidden])) > .hero { display: none; }
.account-view:has(#settings:not([hidden])) .account-header { margin-bottom: 20px; }
.account-settings-group { padding: 10px 0 26px; border-bottom: 1px solid var(--ui-surface-raised); }
.account-settings-group + .account-settings-group { padding-top: 18px; }
.account-settings-group label { color: var(--ui-text); }
.account-name-edit { display: flex; align-items: center; gap: 12px; }
.account-name-edit input { flex: 1; min-width: 0; margin: 0; }
.account-name-edit .btn { min-height: 52px; }
.account-setting-link { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 62px; padding: 12px 2px; border: 0; background: transparent; color: var(--ui-text); text-decoration: none; text-align: left; font: var(--ui-weight-medium) 1.06rem/1.35 var(--ui-font-family); cursor: pointer; }
.account-setting-link:hover { color: var(--ui-brand); }
.account-setting-link span { color: var(--ui-muted); font-size: 1.7rem; line-height: 1; }
.account-settings-end { border-bottom: 0; }
.account-settings-end p { margin: 18px 0 0; }
.account-setting-danger { color: var(--ui-danger); }
.account-appearance-label { margin: 14px 0 12px; color: var(--ui-text); font-weight: var(--ui-weight-semibold); }
.account-appearance { display: flex; gap: 4px; padding: 4px; border-radius: 16px; background: var(--ui-surface-raised); }
.account-appearance button { flex: 1; min-height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--ui-muted); font: var(--ui-weight-semibold) .95rem var(--ui-font-family); cursor: pointer; }
.account-appearance button[aria-pressed="true"] { background: var(--ui-surface-raised); color: var(--ui-text-inverse); }
.account-editor { background: var(--ui-surface-raised); color: var(--ui-text); }
.account-editor::backdrop { background: var(--ui-surface-tint); }
.account-editor-header { border-color: var(--ui-border); }
.account-editor-close { color: var(--ui-text-inverse); }
.account-editor input, .account-editor textarea { color: var(--ui-text-inverse); background: var(--ui-surface-raised); border: 1px solid var(--ui-border); }
@media (max-width: 760px) {
  .account-view { padding: 8px 24px 72px; }
  .account-view #settings h2 { text-align: center; }
  .account-header { margin-bottom: 20px; }
  .account-header img { width: 150px; }
  .account-name-edit { align-items: stretch; flex-direction: column; }
}

/* Light palette: same layout, components and blue WineBlinders identity. */
[data-appearance="light"] body:has(.home-view), [data-appearance="light"] body:has(.account-view) {
  --red: var(--home-accent, var(--ui-brand));
  --ink: var(--ui-text);
  --muted: var(--ui-muted);
  --faint: var(--ui-faint);
  --line: var(--ui-border);
  --line-strong: var(--ui-border-strong);
  --btn-bg: var(--ui-brand);
  --btn-ink: var(--ui-on-brand);
  --field: var(--ui-field);
  background: var(--ui-surface);
  color: var(--ui-text);
  color-scheme: light;
}
[data-appearance="light"] .home-view, [data-appearance="light"] .home-view .card,
[data-appearance="light"] .account-view, [data-appearance="light"] .account-view .card {
  --ink: var(--ui-text); --muted: var(--ui-muted); --faint: var(--ui-faint); --line: var(--ui-border); --line-strong: var(--ui-border-strong);
  --btn-bg: var(--ui-brand); --btn-ink: var(--ui-on-brand); --field: var(--ui-field); color: var(--ui-text);
}
[data-appearance="light"] .home-header .brand .home-wordmark,
[data-appearance="light"] .account-header img { filter: none; }
[data-appearance="light"] .home-header-actions > a.pill,
[data-appearance="light"] .home-view .join-intro .eyebrow,
[data-appearance="light"] .account-view .hero .ornament { color: var(--ui-brand); }
[data-appearance="light"] .home-account-avatar { background: var(--ui-brand); border-color: var(--ui-brand); color: var(--ui-on-brand); }
[data-appearance="light"] .home-mode-nav { border-color: var(--ui-border); }
[data-appearance="light"] .home-mode-nav a { color: var(--ui-muted); }
[data-appearance="light"] .home-mode-nav a[aria-current="page"] { color: var(--ui-brand); border-color: var(--ui-brand); }
[data-appearance="light"] .home-view .join-card,
[data-appearance="light"] .home-create-action,
[data-appearance="light"] .home-view #home-organizer-panel .home-room-list .list-row,
[data-appearance="light"] .home-view #home-organizer-panel > .organizer-card { background: var(--ui-surface); border-color: var(--ui-border) !important; }
[data-appearance="light"] .home-view .join-card label,
[data-appearance="light"] .home-view .join-help h2,
[data-appearance="light"] .home-workspace-heading { color: var(--ui-text); }
[data-appearance="light"] .home-view #home-organizer-panel .card .eyebrow { color: var(--ui-brand); }
[data-appearance="light"] .home-view .join-intro p:last-child,
[data-appearance="light"] .home-view .join-help ol,
[data-appearance="light"] .home-view .privacy-link { color: var(--ui-muted); }
[data-appearance="light"] .home-view input,
[data-appearance="light"] .home-view select,
[data-appearance="light"] .account-view input,
[data-appearance="light"] .account-view textarea,
[data-appearance="light"] .account-view select { background: var(--ui-surface); color: var(--ui-text); border-color: var(--ui-border-strong); }
[data-appearance="light"] .home-view .join-card .code-input { color: var(--ui-text); }
[data-appearance="light"] .home-view .btn,
[data-appearance="light"] .account-view .btn { background: var(--ui-brand); color: var(--ui-on-brand); box-shadow: inset 0 -4px var(--ui-brand-shadow); }
[data-appearance="light"] .home-view .btn.big { background: var(--red); color: var(--ui-on-brand); }
[data-appearance="light"] .home-view .btn.ghost,
[data-appearance="light"] .account-view .btn.ghost { background: var(--ui-surface-raised); color: var(--ui-text); border-color: var(--ui-border); box-shadow: none; }
[data-appearance="light"] .account-header,
[data-appearance="light"] .account-tabs,
[data-appearance="light"] .account-settings-group { border-color: var(--ui-border); }
[data-appearance="light"] .account-header-actions .account-language { color: var(--ui-brand); }
[data-appearance="light"] .account-settings-group label { color: var(--ui-text); }
[data-appearance="light"] .account-close { color: var(--ui-text); }
[data-appearance="light"] .account-tabs a { color: var(--ui-muted); }
[data-appearance="light"] .account-tabs a[aria-current="page"] { color: var(--ui-brand); border-color: var(--ui-brand); }
[data-appearance="light"] .account-view .card { background: var(--ui-surface); border-color: var(--ui-border); }
[data-appearance="light"] .account-view .club-invitation .btn.ghost { background: transparent; border-color: transparent; color: var(--ui-muted); }
[data-appearance="light"] .account-view #settings { background: transparent; border: 0; }
[data-appearance="light"] .account-view .card .eyebrow { color: var(--ui-brand); }
[data-appearance="light"] .account-appearance-label,
[data-appearance="light"] .account-setting-link { color: var(--ui-text); }
[data-appearance="light"] .account-appearance { background: var(--ui-surface-raised); }
[data-appearance="light"] .account-appearance button { color: var(--ui-muted); }
[data-appearance="light"] .account-appearance button[aria-pressed="true"] { background: var(--ui-surface); color: var(--ui-brand); box-shadow: 0 1px 4px var(--ui-shadow); }
[data-appearance="light"] .account-setting-danger { color: var(--ui-danger); }
[data-appearance="light"] .account-editor { background: var(--ui-surface); color: var(--ui-text); }
[data-appearance="light"] .account-editor-close { color: var(--ui-text); }
[data-appearance="light"] .account-editor input,
[data-appearance="light"] .account-editor textarea { color: var(--ui-text); background: var(--ui-surface); border-color: var(--ui-border-strong); }
@media (max-width: 760px) {
  [data-appearance="light"] .home-mode-nav { background: var(--ui-surface); box-shadow: 0 12px 30px var(--ui-shadow); }
  [data-appearance="light"] .home-mode-nav a[aria-current="page"] { background: var(--ui-brand-soft); }
}

/* The tasting and creation screens use the same appearance preference. */
[data-appearance="dark"] body:not(:has(.wide)) { background: var(--ui-surface); color: var(--ui-text); color-scheme: dark; }
[data-appearance="dark"] .wrap:not(.home-view):not(.account-view):not(.wide) {
  --ink: var(--ui-text); --muted: var(--ui-muted); --faint: var(--ui-faint); --line: var(--ui-border); --line-strong: var(--ui-border-strong);
  --red: color-mix(in srgb, var(--home-accent, var(--ui-brand)) 45%, var(--ui-contrast-light));
  --btn-bg: var(--ui-brand); --btn-ink: var(--ui-on-brand); --field: var(--ui-field);
  font-family: var(--ui-font-family);
}
[data-appearance="dark"] .wrap:not(.home-view):not(.account-view):not(.wide) :is(.card, .bottle-edit, .qr, .pick, .wtab, .tab, .chip) {
  --ink: var(--ui-text); --muted: var(--ui-muted); --line: var(--ui-border); --line-strong: var(--ui-border-strong);
  --btn-bg: var(--ui-brand); --btn-ink: var(--ui-on-brand); --field: var(--ui-field);
  background: var(--ui-surface); color: var(--ui-text); border-color: var(--ui-border); box-shadow: none;
}
[data-appearance="dark"] .wrap:not(.home-view):not(.account-view):not(.wide) :is(input, select, textarea) { background-color: var(--ui-surface-raised); color: var(--ui-text-inverse); border-color: var(--ui-border); }
[data-appearance="dark"] .wrap:not(.home-view):not(.account-view):not(.wide):not(.host-view) :is(.btn, .seg-btn.on) { background: var(--ui-brand); color: var(--ui-on-brand); border-color: transparent; }
[data-appearance="dark"] .wrap:not(.home-view):not(.account-view):not(.wide) .btn.ghost { background: var(--ui-surface-raised); color: var(--ui-text); border-color: var(--ui-border); }
[data-appearance="dark"] .wrap:not(.home-view):not(.account-view):not(.wide) :is(.seg, .extract, .kpi) { background: var(--ui-surface-raised); color: var(--ui-text); border-color: var(--ui-border); }
[data-appearance="dark"] .wrap:not(.home-view):not(.account-view):not(.wide) .hero .ornament { background: var(--ui-brand); color: var(--ui-brand); }
[data-appearance="dark"] .wrap:not(.home-view):not(.account-view):not(.wide) .card .eyebrow { color: var(--ui-brand); }
[data-appearance="dark"] .wrap:not(.home-view):not(.account-view):not(.wide) :is(.hint, .award, .sheet-hero) { background: var(--ui-surface-raised); color: var(--ui-text); }
[data-appearance="dark"] .wrap:not(.home-view):not(.account-view):not(.wide) :is(.pill, .step) { background: var(--ui-surface-raised); color: var(--ui-text); }
[data-appearance="dark"] .wrap:not(.home-view):not(.account-view):not(.wide) .step.now { background: var(--red); color: var(--ui-text); }
[data-appearance="dark"] .wrap:not(.home-view):not(.account-view):not(.wide) .step.done { background: var(--ui-brand); color: var(--ui-brand); }
[data-appearance="dark"] .wrap:not(.home-view):not(.account-view):not(.wide) :is(a, button, input, select, textarea):focus-visible { outline: 3px solid var(--ui-warning); outline-offset: 3px; }
[data-appearance="light"] .wrap:not(.home-view):not(.account-view):not(.wide) .card .eyebrow { color: var(--red); }
.wrap:not(.home-view):not(.account-view):not(.wide) .hero .brand .home-wordmark { width: 200px; height: auto; margin: 0; border-radius: 0; box-shadow: none; }
[data-appearance="dark"] .wrap:not(.home-view):not(.account-view):not(.wide) .hero .brand .home-wordmark { filter: brightness(0) invert(1); }
.wrap:not(.home-view):not(.account-view):not(.wide) .hero .spread { align-items: center; }
.wrap:not(.home-view):not(.account-view):not(.wide) .hero .ornament { background: transparent; padding: 0; border-radius: 0; color: var(--red); }
.wrap:not(.home-view):not(.account-view):not(.wide) .hero .ornament::before { display: none; }
.wrap:not(.home-view):not(.account-view):not(.wide) .hero .pill { background: transparent; color: var(--red); }
.wrap:not(.home-view):not(.account-view):not(.wide) .card .eyebrow { color: var(--red); }

/* Organiser: one preparation task at a time. All colours come from the
   appearance tokens, including the club's own brand colour. */
.host-view { max-width: 860px; padding-bottom: 80px; color: var(--ui-text); }
.host-view .host-header { align-items: center; gap: 14px; }
.host-view .host-header .row { gap: 8px; }
.host-view .host-title { margin: 22px 0 22px; font-size: clamp(2.15rem, 6vw, 3.5rem); font-weight: var(--ui-weight-bold); letter-spacing: -.05em; line-height: 1.06; text-wrap: balance; }
.host-prep-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 24px; }
.host-prep-nav button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 8px; border: 1px solid var(--ui-border); border-radius: 15px; background: var(--ui-surface); color: var(--ui-muted); font: var(--ui-weight-semibold) .92rem var(--ui-font-family); cursor: pointer; }
.host-prep-nav button span { display: grid; place-items: center; width: 27px; height: 27px; flex: 0 0 27px; border: 1px solid var(--ui-border-strong); border-radius: 50%; font-variant-numeric: tabular-nums; }
.host-prep-nav button[aria-current="step"] { background: var(--ui-brand); border-color: var(--ui-brand); color: var(--ui-on-brand); box-shadow: inset 0 -3px color-mix(in srgb, var(--ui-brand) 70%, var(--ui-contrast-dark)); }
.host-prep-nav button[aria-current="step"] span { border-color: currentColor; }
.host-prep-nav button:focus-visible { outline: 3px solid var(--ui-focus); outline-offset: 2px; }
.host-prep-panel { padding: clamp(20px, 4vw, 36px); border: 1px solid var(--ui-border); border-radius: 26px; background: var(--ui-surface); }
.host-panel-heading { margin-bottom: 24px; }
.host-panel-heading .eyebrow { color: var(--ui-brand); letter-spacing: .08em; }
.host-panel-heading h2 { margin: 7px 0 9px; color: var(--ui-text); font-size: clamp(1.6rem, 4vw, 2.25rem); letter-spacing: -.04em; }
.host-panel-heading p { max-width: 58ch; margin: 0; color: var(--ui-muted); font-size: .94rem; line-height: 1.5; }
.host-view .wtabs { grid-auto-columns: minmax(90px, 1fr); overflow-x: auto; padding: 2px 2px 8px; margin-bottom: 12px; scrollbar-width: thin; }
.host-view .wtab { min-width: 90px; border-radius: 15px; background: var(--ui-surface-raised); color: var(--ui-text); border-color: var(--ui-border); box-shadow: none; }
.host-view .wtab.active { border-color: var(--ui-brand); box-shadow: inset 0 0 0 1px var(--ui-brand); color: var(--ui-brand); }
.host-view .wtab.done { background: var(--ui-surface-raised); border-color: var(--ui-border-strong); }
.host-view .wtab.done small { color: var(--ui-muted); }
.host-view .host-wine-edit { margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.host-wine-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 8px 0 18px; color: var(--ui-muted); }
.host-wine-heading .letter { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: var(--ui-surface-raised); color: var(--ui-brand); font-size: 1.5rem; }
.host-wine-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.host-wine-wizard .host-field[hidden], .host-wine-wizard .host-extract[hidden] { display: none; }
.host-wine-wizard .flow-panel-head { margin-bottom: 14px; }
.host-wine-wizard .host-wine-fields { margin-top: 12px; }
.host-wine-wizard .host-wine-edit { margin-top: 18px; }
.host-wine-wizard .flow-footer { margin-top: 18px; }
.host-view--guided .host-title { overflow: hidden; margin: 8px 0 10px; color: var(--ui-text); font-size: clamp(1.25rem, 3vw, 1.65rem); line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.host-view--guided .flow-toolbar { margin: 8px 0 2px; }
.host-view--guided .flow-steps { margin-bottom: 8px; }
.host-view--guided .flow-panel-head { padding: 15px 18px; }
.host-wine-wizard > .card { padding: 16px 18px; }
.host-wine-wizard .host-wine-edit { margin-top: 10px; }
.host-wine-wizard .host-extract { margin-top: 12px; padding: 14px; }
.host-wine-wizard .wtabs { display: grid; grid-auto-flow: unset; grid-auto-columns: unset; grid-template-columns: repeat(var(--wine-count), minmax(0, 1fr)); gap: 5px; overflow: visible; padding: 0; margin: 0; }
.host-wine-wizard .wtab { min-width: 0; min-height: 48px; padding: 5px; font-size: 1.25rem; }
.host-wine-wizard .wtab small { display: none; }
.host-wine-wizard .host-wine-heading { display: none; }
.host-wizard-sheet { padding: 10px 0 0; border-top: 1px solid var(--ui-border); }
.host-wizard-sheet p { margin: 0 0 10px; color: var(--ui-muted); font-size: .85rem; }
.host-wizard-sheet .row { align-items: center; gap: 8px; }
.host-wizard-sheet .btn { width: auto; min-height: 40px; margin: 0; padding: 8px 12px; font-size: .8rem; cursor: pointer; }
.host-wizard-sheet span { overflow: hidden; max-width: 100%; color: var(--ui-muted); font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.host-field { min-width: 0; }
.host-field--wide { grid-column: 1 / -1; }
.host-field label { margin: 10px 0 6px; color: var(--ui-text); font-size: .91rem; font-weight: var(--ui-weight-semibold); }
.host-field input, .host-field textarea, .host-order-grid select, .host-prep-panel #cfg-theme, .host-prep-panel #cfg-theme-kw, .host-prep-panel #cfg-theme-by { width: 100%; min-height: 50px; border: 1px solid var(--ui-border-strong); border-radius: 12px; background: var(--ui-field); color: var(--ui-text); }
.host-field textarea { min-height: 92px; }
.host-view .host-extract { margin-top: 22px; padding: 18px; border: 1px solid var(--ui-border); border-radius: 16px; background: var(--ui-surface-raised); }
.host-extract .host-upload-action { display: inline-flex; align-items: center; width: auto; min-height: 44px; margin: 0; padding: 9px 14px; border: 1px solid var(--ui-border-strong); border-radius: 12px; color: var(--ui-text); font-size: .9rem; font-weight: var(--ui-weight-strong); cursor: pointer; }
.host-extract input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; padding: 0; margin: 0; overflow: hidden; }
.host-extract:focus-within { outline: 2px solid var(--ui-focus); outline-offset: 2px; }
.host-extract label.check { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0 0; color: var(--ui-muted); font-size: .82rem; line-height: 1.4; }
.host-extract input[type="checkbox"] { flex: 0 0 20px; width: 20px; min-width: 20px; height: 20px; min-height: 20px; margin: 0; padding: 0; accent-color: var(--ui-brand); }
.host-extract p:empty { display: none; }
.host-catalog-search { margin-top: 12px; border-top: 1px solid var(--ui-border); padding-top: 10px; }
.host-catalog-search summary { color: var(--ui-brand); font-weight: var(--ui-weight-strong); cursor: pointer; }
.host-catalog-search p { color: var(--ui-muted); margin: 7px 0 10px; }
.host-catalog-search__fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 8px; margin-bottom: 10px; }
.host-catalog-search__fields label { display: grid; gap: 4px; margin: 0; color: var(--ui-muted); font-size: .8rem; }
.host-catalog-search__fields input { min-width: 0; margin: 0; }
.extract-review { display: grid; gap: 8px; margin-top: 12px; padding: 14px; border: 1px solid var(--ui-border); border-radius: 16px; background: var(--ui-surface-raised); color: var(--ui-text); }
.extract-review > strong { font-size: 1rem; line-height: 1.25; }
.extract-review > p, .extract-review__label { margin: 0; color: var(--ui-muted); line-height: 1.45; }
.extract-review__choices { display: grid; gap: 8px; }
.extract-review__choice { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; min-height: 48px; text-align: left; white-space: normal; }
.extract-review__choice small { color: inherit; opacity: .78; white-space: nowrap; }
.extract-review details { border-top: 1px solid var(--ui-border); padding-top: 8px; }
.extract-review summary { color: var(--ui-brand); font-weight: var(--ui-weight-strong); cursor: pointer; }
.extract-review dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 8px; margin: 10px 0 0; }
.extract-review dl > div { min-width: 0; padding: 8px; border-radius: 10px; background: var(--ui-surface); }
.extract-review dt { color: var(--ui-muted); font-size: .75rem; font-weight: var(--ui-weight-bold); }
.extract-review dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.extract-review blockquote { margin: 8px 0 0; padding-inline-start: 8px; border-inline-start: 2px solid var(--ui-border); color: var(--ui-muted); font-size: .875rem; line-height: 1.45; }
.extract-review__saved { color: var(--ui-success); }
.host-panel-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.host-order-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.host-order-grid label { margin-top: 0; }
.host-prep-panel #shuffle { margin-top: 18px; }
.host-prep-panel .bottle-edit:not(.host-wine-edit) { margin-top: 20px; padding: 20px; border: 1px solid var(--ui-border); border-radius: 16px; background: var(--ui-surface-raised); }
.host-prep-panel .card { background: var(--ui-surface-raised); border: 1px solid var(--ui-border); box-shadow: none; }
.host-prep-next { position: sticky; bottom: 0; z-index: 5; margin-top: 16px; padding: 12px 0 max(10px, env(safe-area-inset-bottom)); background: var(--ui-bg); }
.host-prep-next .btn { width: 100%; }
.host-invite .screen-code { color: var(--ui-brand); }
.host-attendance { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--ui-border); }
.host-start { max-width: 560px; }
.host-live-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 22px 0 12px; }
.host-live-nav button { min-height: 52px; padding: 8px; border: 1px solid var(--ui-border); border-radius: 14px; background: var(--ui-surface); color: var(--ui-muted); font: var(--ui-weight-semibold) .9rem var(--ui-font-family); cursor: pointer; }
.host-live-nav button[aria-current="page"] { background: var(--ui-brand); border-color: var(--ui-brand); color: var(--ui-on-brand); }
.host-live-content .card { margin: 12px 0; background: var(--ui-surface); border: 1px solid var(--ui-border); box-shadow: none; }
.host-live-content .card h2 { margin-bottom: 18px; font-size: clamp(1.35rem, 4vw, 1.8rem); }
.host-result-label { margin: 22px 0 8px; padding-top: 18px; border-top: 1px solid var(--ui-border); }
.host-locked-wines { display: grid; gap: 14px; margin-top: 18px; }
.host-locked-wines .host-wine-edit { padding: 18px; border: 1px solid var(--ui-border); border-radius: 16px; background: var(--ui-surface-raised); }
html[data-appearance] .wrap.host-view .btn { background: var(--ui-brand); color: var(--ui-on-brand); border-color: transparent; border-radius: 14px; box-shadow: inset 0 -3px color-mix(in srgb, var(--ui-brand) 70%, var(--ui-contrast-dark)); }
html[data-appearance] .wrap.host-view .btn.ghost { background: var(--ui-surface-raised); color: var(--ui-text); border: 1px solid var(--ui-border-strong); box-shadow: none; }
.host-view .card .eyebrow, .host-view .eyebrow { color: var(--ui-brand); }
.host-view :is(button, a, input, select, textarea):focus-visible { outline: 3px solid var(--ui-focus); outline-offset: 2px; }
.flow-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0 12px; }
.flow-toolbar p { margin: 0; color: var(--ui-muted); font-size: .85rem; font-weight: var(--ui-weight-bold); }
.flow-mode { min-height: 44px; padding: 8px 14px; border: 1px solid var(--ui-border-strong); border-radius: 12px; background: var(--ui-surface); color: var(--ui-text); font: var(--ui-weight-bold) .85rem var(--ui-font-family); cursor: pointer; }
.flow-steps { display: grid; grid-template-columns: repeat(var(--flow-count), minmax(0, 1fr)); gap: 4px; width: 100%; margin: 0 0 18px; }
.flow-steps button { display: grid; place-items: center; min-width: 0; min-height: 36px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.flow-steps button::before { content: ''; width: 100%; height: 7px; border-radius: 99px; background: var(--ui-border-strong); }
.flow-steps button:not(:disabled)::before { background: var(--ui-brand-soft); }
.flow-steps button[aria-current="step"]::before { background: var(--ui-brand); }
.flow-steps button:disabled { cursor: not-allowed; }
.flow-steps button span, .flow-steps button strong { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.flow-panel { min-width: 0; }
.flow-panel[hidden] { display: none; }
.flow-panel-head { padding: 20px 22px; margin: 0 0 14px; border: 1px solid var(--ui-border); border-radius: 20px; background: var(--ui-surface-raised); }
.flow-panel-head span { color: var(--ui-brand); font-size: .74rem; font-weight: var(--ui-weight-bold); letter-spacing: .1em; text-transform: uppercase; }
.flow-panel-head h2 { margin: 8px 0 6px; color: var(--ui-text); font-size: clamp(1.5rem, 4vw, 2.15rem); letter-spacing: -.04em; }
.flow-panel-head p { margin: 0; color: var(--ui-muted); line-height: 1.45; }
.flow-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0 32px; }
.flow-footer button { min-height: 48px; padding: 9px 18px; border-radius: 13px; font: var(--ui-weight-bold) .95rem var(--ui-font-family); cursor: pointer; }
.flow-back { border: 1px solid var(--ui-border-strong); background: var(--ui-surface); color: var(--ui-text); }
.flow-forward { border: 1px solid var(--ui-brand); background: var(--ui-brand); color: var(--ui-on-brand); }
.flow-footer button:disabled { opacity: .42; cursor: not-allowed; }
.flow-empty { padding: 24px; border: 1px solid var(--ui-border); border-radius: 18px; background: var(--ui-surface); color: var(--ui-muted); }
.player-view .flow-panel > .card, .host-view .flow-panel > .card { margin: 12px 0; }
.player-flow .flow-panel details:has(#g-country) > summary { display: none; }
.player-flow .flow-panel .lockbar { position: static; padding: 0; margin: 12px 0 0; }
.lockbar[hidden] { display: none; }
.flow-toolbar button:focus-visible, .flow-steps button:focus-visible, .flow-footer button:focus-visible { outline: 3px solid var(--ui-focus); outline-offset: 2px; }
.review-dialog { background: var(--ui-surface); color: var(--ui-text); border-color: var(--ui-border); box-shadow: 0 -20px 70px var(--ui-shadow); }
.review-dialog h2 { color: var(--ui-text); }
.review-dialog p { color: var(--ui-muted); }
.review-dialog .btn[data-confirm] { background: var(--ui-brand); color: var(--ui-on-brand); box-shadow: inset 0 -4px color-mix(in srgb, var(--ui-brand) 70%, var(--ui-contrast-dark)); }
.review-dialog .btn[data-cancel] { background: var(--ui-surface-raised); color: var(--ui-text); border-color: var(--ui-border-strong); }
.review-dialog--destructive .btn[data-cancel] { background: var(--ui-brand); color: var(--ui-on-brand); border: 0; }
.review-dialog--destructive .btn[data-confirm] { background: transparent; color: var(--ui-danger); border: 0; box-shadow: none; }
@media (max-width: 640px) {
  .flow-steps { gap: 3px; }
  .flow-panel-head { padding: 18px; }
  .host-view { padding: 12px 16px 90px; }
  .host-view .host-title { margin: 16px 0 20px; }
  .host-view--guided .host-title { margin: 6px 0 8px; }
  .host-view--guided .host-header { display: none; }
  .host-view--guided .host-title { font-size: 1rem; }
  .host-wine-wizard > .card { padding: 14px; }
  .host-wine-wizard .flow-panel-head { padding: 12px 14px; margin-bottom: 8px; }
  .host-wine-wizard .flow-panel-head h2 { margin: 5px 0; font-size: 1.45rem; line-height: 1.12; }
  .host-wine-wizard .flow-panel-head p { font-size: .82rem; line-height: 1.3; }
  .host-wine-wizard .host-extract { padding: 11px; margin-top: 8px; }
  .host-wine-wizard .host-catalog-search { margin-top: 4px; padding-top: 4px; }
  .host-view .host-header .row { justify-content: flex-start; }
  .host-prep-nav { gap: 5px; }
  .host-prep-nav button { flex-direction: column; gap: 3px; min-height: 62px; padding: 5px 2px; font-size: .73rem; }
  .host-prep-panel { padding: 20px; }
  .host-wine-fields { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .host-panel-actions .btn { width: 100%; }
  .host-live-nav { gap: 5px; }
  .host-live-nav button { min-height: 50px; padding: 6px 2px; font-size: .73rem; }
}

/* Shared semantic component layer. Keep this after legacy screen rules. */
html[data-appearance] body:has(.home-view),
html[data-appearance] body:has(.account-view),
html[data-appearance] body:has(.host-view) {
  background: var(--ui-bg);
  color: var(--ui-text);
}
html[data-appearance] .home-view,
html[data-appearance] .account-view,
html[data-appearance] .host-view {
  --ink: var(--ui-text);
  --muted: var(--ui-muted);
  --faint: var(--ui-faint);
  --line: var(--ui-border);
  --line-strong: var(--ui-border-strong);
  --red: var(--ui-brand);
  --btn-bg: var(--ui-brand);
  --btn-ink: var(--ui-on-brand);
  --field: var(--ui-field);
  color: var(--ui-text);
}
html[data-appearance] .home-view :is(.join-card, .home-create-action, #home-organizer-panel .home-room-list .list-row, #home-organizer-panel > .organizer-card),
html[data-appearance] .account-view .card,
html[data-appearance] .host-view .card {
  background: var(--ui-surface);
  border-color: var(--ui-border);
}
html[data-appearance] .home-view :is(input, select),
html[data-appearance] .account-view :is(input, textarea, select),
html[data-appearance] .host-view :is(input, textarea, select) {
  background-color: var(--ui-field);
  color: var(--ui-text);
  border-color: var(--ui-border-strong);
}
html[data-appearance] :is(.home-view, .account-view) .btn:not(.ghost),
html[data-appearance] .host-view .btn:not(.ghost) {
  background: var(--ui-brand);
  color: var(--ui-on-brand);
  box-shadow: inset 0 -3px color-mix(in srgb, var(--ui-brand) 70%, var(--ui-contrast-dark));
}
html[data-appearance] :is(.home-view, .account-view, .host-view) .btn.ghost {
  background: var(--ui-surface-raised);
  color: var(--ui-text);
  border-color: var(--ui-border-strong);
  box-shadow: none;
}
html[data-appearance] :is(.home-view, .account-view, .host-view) :is(a, button, input, select, textarea):focus-visible {
  outline: 3px solid var(--ui-focus);
  outline-offset: 3px;
}
html[data-appearance] .home-mode-nav,
html[data-appearance] .account-tabs,
html[data-appearance] .account-header,
html[data-appearance] .account-settings-group { border-color: var(--ui-border); }
html[data-appearance] .home-mode-nav a,
html[data-appearance] .account-tabs a { color: var(--ui-muted); }
html[data-appearance] .home-mode-nav a[aria-current="page"],
html[data-appearance] .account-tabs a[aria-current="page"] { color: var(--ui-brand); border-color: var(--ui-brand); }
html[data-appearance] .home-view :is(.join-intro .eyebrow, #home-organizer-panel .card .eyebrow),
html[data-appearance] .account-view :is(.hero .ornament, .card .eyebrow) { color: var(--ui-brand); }
html[data-appearance] .home-view :is(.join-card label, .join-help h2, .home-workspace-heading),
html[data-appearance] .account-view :is(.account-settings-group label, .account-appearance-label, .account-setting-link) { color: var(--ui-text); }
html[data-appearance] .home-view :is(.join-intro p:last-child, .join-help ol, .privacy-link),
html[data-appearance] .account-setting-link span { color: var(--ui-muted); }
html[data-appearance] .account-setting-danger { color: var(--ui-danger); }
html[data-appearance] .account-appearance { background: var(--ui-surface-raised); }
html[data-appearance] .account-appearance button { color: var(--ui-muted); }
html[data-appearance] .account-appearance button[aria-pressed="true"] { background: var(--ui-surface); color: var(--ui-brand); box-shadow: 0 1px 4px var(--ui-shadow); }
html[data-appearance] .account-editor { background: var(--ui-bg); color: var(--ui-text); }
html[data-appearance] .account-editor :is(input, textarea, select) { background: var(--ui-field); color: var(--ui-text); border-color: var(--ui-border-strong); }
.account-view:has(#clubs:not([hidden])) > .hero { display: none; }
.club-hub { max-width: 760px; margin: 0 auto; padding: 12px 0 48px; }
.club-hub-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.club-hub-kicker { margin: 0 0 8px; color: var(--ui-brand); font-size: .74rem; font-weight: var(--ui-weight-bold); letter-spacing: .12em; text-transform: uppercase; }
.club-hub-heading h2 { margin: 0; color: var(--ui-text); font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1.08; letter-spacing: -.045em; }
.club-hub-heading p:last-child { max-width: 48ch; margin: 10px 0 0; color: var(--ui-muted); line-height: 1.45; }
.club-hub-new { display: inline-flex; align-items: center; justify-content: space-between; gap: 18px; flex: 0 0 auto; min-height: 50px; padding: 0 18px; border: 1px solid var(--ui-brand); border-radius: 14px; background: var(--ui-brand); color: var(--ui-on-brand); font: var(--ui-weight-bold) .92rem var(--ui-font-family); cursor: pointer; }
.club-hub-new span { font-size: 1.3rem; font-weight: var(--ui-weight-regular); }
.club-hub-grid { display: grid; gap: 18px; }
.club-hub-card { min-width: 0; padding: 24px; border: 1px solid var(--ui-border); border-radius: 26px; background: var(--ui-surface); }
.club-hub-card-top { display: flex; align-items: center; gap: 16px; min-width: 0; }
.club-hub-mark { display: grid; place-items: center; flex: 0 0 58px; width: 58px; height: 58px; overflow: hidden; border-radius: 18px; background: var(--ui-brand-soft); color: var(--ui-brand); font-size: 1.7rem; font-weight: var(--ui-weight-bold); }
.club-hub-mark img { display: block; width: 100%; height: 100%; object-fit: cover; }
.club-hub-identity { min-width: 0; }
.club-hub-identity h3 { margin: 0 0 4px; color: var(--ui-text); font-size: 1.28rem; line-height: 1.2; letter-spacing: -.025em; overflow-wrap: anywhere; }
.club-hub-role { color: var(--ui-muted); font-size: .86rem; }
.club-hub-site { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 16px; margin: 22px 0 0; padding: 18px 0; border-top: 1px solid var(--ui-border); border-bottom: 1px solid var(--ui-border); }
.club-hub-site-label { grid-column: 1 / -1; color: var(--ui-muted); font-size: .76rem; font-weight: var(--ui-weight-bold); letter-spacing: .04em; }
.club-hub-address { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--ui-text); font-size: .94rem; font-weight: var(--ui-weight-strong); text-decoration: none; overflow-wrap: anywhere; }
.club-hub-address span:first-child { min-width: 0; overflow-wrap: anywhere; }
a.club-hub-address:hover { color: var(--ui-brand); }
.club-hub-status { display: inline-flex; align-items: center; gap: 6px; align-self: center; color: var(--ui-muted); font-size: .78rem; white-space: nowrap; }
.club-hub-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--ui-warning); }
.club-hub-status.is-live i { background: var(--ui-success); }
.club-hub-status.is-suspended i { background: var(--ui-danger); }
.club-hub-primary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; margin-top: 18px; padding: 0 18px; border-radius: 14px; background: var(--ui-brand); color: var(--ui-on-brand); font-size: .96rem; font-weight: var(--ui-weight-bold); text-decoration: none; }
.club-hub-primary span { font-size: 1.35rem; font-weight: var(--ui-weight-regular); }
.club-hub-language { margin-top: 18px; padding: 18px 0; border-bottom: 1px solid var(--ui-border); }
.club-hub-language > p { margin: 8px 0 12px; color: var(--ui-muted); font-size: .86rem; line-height: 1.45; }
.club-hub-language > p[role="status"] { min-height: 1.2em; margin-bottom: 0; color: var(--ui-brand); }
.club-create-language { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 18px 0 0; padding: 0; border: 0; }
.club-create-language legend { margin-bottom: 6px; color: var(--ui-text); font-weight: var(--ui-weight-bold); }
.club-create-language > p { grid-column: 1 / -1; margin: 0 0 4px; color: var(--ui-muted); font-size: .9rem; line-height: 1.45; }
.club-create-language label { display: flex; align-items: center; gap: 9px; min-height: 52px; padding: 12px; border: 1px solid var(--ui-border); border-radius: 14px; background: var(--ui-surface-raised); color: var(--ui-text); cursor: pointer; }
.club-create-language label:has(input:checked) { border-color: var(--ui-brand); background: var(--ui-brand-soft); }
.club-create-language input { width: 18px; height: 18px; margin: 0; accent-color: var(--ui-brand); }
.club-hub-tools { margin-top: 14px; }
.club-hub-tools > button { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 54px; padding: 8px 2px; border: 0; border-bottom: 1px solid var(--ui-border); background: transparent; color: var(--ui-text); font: var(--ui-weight-semibold) .96rem var(--ui-font-family); text-align: left; cursor: pointer; }
.club-hub-tools > button:last-of-type { border-bottom: 0; }
.club-hub-tools > button span { color: var(--ui-muted); font-size: 1.35rem; font-weight: var(--ui-weight-regular); }
.club-hub-tools > button:hover { color: var(--ui-brand); }
.club-hub-empty { padding: 34px 24px; border: 1px dashed var(--ui-border-strong); border-radius: 22px; color: var(--ui-muted); text-align: center; }
.club-address-editor > p, .club-create-editor > p { max-width: 42ch; line-height: 1.5; }
.club-address-editor > .btn, .club-create-editor > .btn { min-height: 52px; margin-top: 18px; }
.club-address-field { display: flex; align-items: center; gap: 8px; }
.club-address-field input { min-width: 0; flex: 1; }
.club-address-field span { color: var(--ui-muted); font-size: .9rem; white-space: nowrap; }
.club-roster-add { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; }
.club-roster-add :is(input, select, button) { min-height: 48px; margin: 0; }
.club-roster-form { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--ui-border); }
.club-roster-form label { margin: 0 0 10px; }
.club-person-create { padding: 24px; border: 1px solid var(--ui-border); border-radius: 20px; background: var(--ui-surface); }
.club-person-create h3, .club-roster-form h3 { margin: 0 0 6px; color: var(--ui-text); font-size: 1.3rem; }
.club-person-create > p, .club-roster-form > p { color: var(--ui-muted); line-height: 1.45; }
.club-person-create > label:not(.club-person-send) { display: block; margin: 18px 0 8px; }
.club-person-create > input { width: 100%; }
.club-person-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 20px 0 0; padding: 0; border: 0; }
.club-person-options legend { margin-bottom: 10px; color: var(--ui-text); font-weight: var(--ui-weight-bold); }
.club-person-option { display: flex !important; gap: 10px; min-height: 94px; margin: 0 !important; padding: 14px; border: 1px solid var(--ui-border-strong); border-radius: 14px; background: var(--ui-bg); cursor: pointer; }
.club-person-option:has(input:checked) { border-color: var(--ui-brand); background: var(--ui-brand-soft); }
.club-person-option input { flex: 0 0 auto; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ui-brand); }
.club-person-option strong, .club-person-option small { display: block; }
.club-person-option strong { color: var(--ui-text); }
.club-person-option small { margin-top: 4px; color: var(--ui-muted); font-size: .8rem; line-height: 1.3; }
.club-person-send { display: flex !important; align-items: center; gap: 10px; margin: 18px 0 !important; color: var(--ui-text); font-weight: var(--ui-weight-strong); }
.club-person-send input { width: 22px; height: 22px; margin: 0; accent-color: var(--ui-brand); }
.club-person-create > .btn { min-height: 48px; }
.club-person-create [role="status"], .club-roster-form [role="status"] { min-height: 1.4em; margin: 10px 0 0; color: var(--ui-muted); }
.roster-person-id { flex: 1 1 200px; }
.roster-person-id small { flex-basis: 100%; color: var(--ui-muted); }
.roster-mail-state { font-size: .78rem; }
.roster-rank-promotion { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.roster-rank-promotion input { width: min(240px, 100%); min-height: 44px; margin: 0; }
.club-channel { max-width: 900px; margin: 12px auto 28px; }
.club-channel-banner { width: 100%; aspect-ratio: 3 / 1; overflow: hidden; border-radius: 22px; background: var(--ui-brand-soft); }
.club-channel-banner img { display: block; width: 100%; height: 100%; object-fit: cover; }
.club-channel:not(.club-channel--has-cover) .club-channel-banner { height: 24px; aspect-ratio: auto; background: var(--ui-brand); }
.club-channel-identity { display: flex; align-items: flex-start; gap: 20px; padding: 0 18px; position: relative; }
.club-channel-avatar { display: grid; place-items: center; flex: 0 0 94px; width: 94px; height: 94px; margin-top: -42px; overflow: hidden; border: 4px solid var(--ui-bg); border-radius: 26px; background: var(--ui-brand-soft); color: var(--ui-brand); font-size: 2.5rem; font-weight: var(--ui-weight-bold); }
.club-channel-avatar img { width: 100%; height: 100%; object-fit: cover; }
.club-channel-identity > div { min-width: 0; padding: 14px 0 4px; }
.club-channel:not(.club-channel--has-cover) .club-channel-avatar { margin-top: -12px; }
.club-channel-identity h1 { margin: 0; color: var(--ui-text); font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.06; letter-spacing: -.05em; overflow-wrap: anywhere; }
.club-channel-identity p { max-width: 62ch; margin: 8px 0 0; color: var(--ui-muted); line-height: 1.45; }
.club-channel-identity .eyebrow { color: var(--ui-brand); font-size: .72rem; font-weight: var(--ui-weight-bold); letter-spacing: .1em; text-transform: uppercase; }
.club-cover-editor, .club-profile-editor { padding: 24px 0; border-bottom: 1px solid var(--ui-border); }
.club-cover-editor h3, .club-profile-editor h3 { margin: 0; color: var(--ui-text); font-size: 1.1rem; }
.club-cover-editor > p, .club-profile-editor > p { margin: 6px 0 16px; color: var(--ui-muted); line-height: 1.45; }
.club-cover-previews { display: flex; align-items: flex-end; gap: 18px; padding: 18px; border: 1px solid var(--ui-border); border-radius: 18px; background: var(--ui-surface); }
.club-cover-previews[hidden], .club-cover-actions [hidden] { display: none; }
.club-cover-previews figure { min-width: 0; margin: 0; }
.club-cover-previews figure:first-child { flex: 1; }
.club-cover-previews figure:last-child { flex: 0 0 26%; }
.club-cover-previews figcaption { margin-bottom: 8px; color: var(--ui-muted); font-size: .8rem; font-weight: var(--ui-weight-strong); }
.club-cover-previews img { display: block; width: 100%; aspect-ratio: 3 / 1; border: 5px solid var(--ui-border-strong); border-radius: 10px; object-fit: cover; }
.club-cover-previews figure:last-child img { aspect-ratio: 2 / 1; border-width: 4px; border-radius: 12px; }
.club-cover-file-label, .club-image-change { display: inline-flex !important; align-items: center; min-height: 44px; margin: 16px 0 0 !important; padding: 0 16px; border: 1px solid var(--ui-border-strong); border-radius: 12px; color: var(--ui-text); font-weight: var(--ui-weight-bold); cursor: pointer; }
.club-cover-editor input[type="file"], .club-profile-editor input[type="file"] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.club-cover-actions { display: inline-flex; flex-wrap: wrap; gap: 10px; margin-left: 10px; }
.club-cover-editor [data-th-cover-status] { min-height: 1.4em; margin: 10px 0 0; color: var(--ui-muted); }
.club-profile-row { display: flex; align-items: center; gap: 20px; }
.club-profile-preview { display: grid; place-items: center; flex: 0 0 108px; width: 108px; height: 108px; overflow: hidden; border-radius: 28px; background: var(--ui-brand-soft); color: var(--ui-brand); font-size: 2.8rem; font-weight: var(--ui-weight-bold); }
.club-profile-preview img { width: 100%; height: 100%; object-fit: cover; }
.club-profile-row .btn { margin: 10px 0 0 10px; }
.club-editor-tabs { display: flex; gap: 24px; margin-bottom: 18px; border-bottom: 1px solid var(--ui-border); }
.club-editor-tabs button { min-height: 52px; padding: 0 2px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--ui-muted); font: var(--ui-weight-bold) .95rem var(--ui-font-family); cursor: pointer; }
.club-editor-tabs button[aria-current="page"] { border-bottom-color: var(--ui-brand); color: var(--ui-brand); }
.theme-ed [data-club-tab-panel][hidden] { display: none; }
.club-appearance-options { display: grid; gap: 10px; margin: 24px 0; padding: 0; border: 0; }
.club-appearance-options legend { margin-bottom: 10px; color: var(--ui-text); font-weight: var(--ui-weight-bold); }
.club-appearance-options label { display: flex; align-items: flex-start; gap: 12px; min-height: 70px; padding: 14px; border: 1px solid var(--ui-border); border-radius: 14px; background: var(--ui-surface); cursor: pointer; }
.club-appearance-options label:has(input:checked) { border-color: var(--ui-brand); background: var(--ui-brand-soft); }
.club-appearance-options input { flex: 0 0 auto; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ui-brand); }
.club-appearance-options span { display: grid; gap: 3px; }
.club-appearance-options strong { color: var(--ui-text); font-size: .95rem; }
.club-appearance-options small { color: var(--ui-muted); font-size: .8rem; line-height: 1.4; }
.theme-ed [data-club-tab-panel="home"] > h3 { margin: 26px 0 5px; color: var(--ui-text); font-size: 1.35rem; }
.club-layout-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 90px; padding: 16px 0; border-bottom: 1px solid var(--ui-border); }
.club-layout-row label { display: flex; align-items: center; gap: 14px; min-width: 0; margin: 0; cursor: pointer; }
.club-layout-row input { flex: 0 0 auto; width: 22px; height: 22px; margin: 0; accent-color: var(--ui-brand); }
.club-layout-row strong, .club-layout-row small { display: block; }
.club-layout-row strong { color: var(--ui-text); font-size: .98rem; }
.club-layout-row small { margin-top: 4px; color: var(--ui-muted); line-height: 1.35; }
.club-layout-order { display: flex; gap: 6px; }
.club-layout-order button { width: 42px; height: 42px; border: 1px solid var(--ui-border-strong); border-radius: 12px; background: var(--ui-surface); color: var(--ui-text); font-size: 1.15rem; cursor: pointer; }
.club-layout-save { margin-top: 22px; }
.club-featured-editor { padding: 8px 0 30px; border-bottom: 1px solid var(--ui-border); }
.club-featured-editor > h3, .club-layout-editor > h3 { margin: 18px 0 5px; color: var(--ui-text); font-size: 1.35rem; }
.club-featured-editor > p, .club-layout-editor > p { line-height: 1.45; }
.club-featured-editor > label:not(.club-featured-publish) { display: block; margin-top: 16px; }
.club-featured-editor input:not([type="checkbox"]), .club-featured-editor textarea { width: 100%; }
.club-featured-date { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.club-featured-date label { display: block; margin-top: 16px; }
.club-featured-publish { display: flex; align-items: center; gap: 12px; margin: 22px 0 18px !important; color: var(--ui-text); font-weight: var(--ui-weight-strong); cursor: pointer; }
.club-featured-publish input { flex: 0 0 auto; width: 22px; height: 22px; accent-color: var(--ui-brand); }
.club-featured-editor [data-featured-status] { min-height: 1.4em; margin: 10px 0 0; color: var(--ui-muted); }
.club-layout-editor { padding-top: 12px; }
.club-featured { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 0 0 22px; padding: clamp(22px, 4vw, 36px); border: 1px solid var(--ui-border-strong); border-radius: 22px; background: var(--ui-surface); }
.club-featured-copy { min-width: 0; }
.club-featured .eyebrow { color: var(--ui-brand); }
.club-featured h2 { max-width: 24ch; margin: 12px 0 10px; color: var(--ui-text); font-size: clamp(1.7rem, 4vw, 2.8rem); line-height: 1.08; letter-spacing: -.045em; }
.club-featured-copy > p { max-width: 62ch; margin: 0; color: var(--ui-muted); line-height: 1.55; white-space: pre-line; }
.club-featured-facts { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 28px; color: var(--ui-text); }
.club-featured-facts span { display: grid; gap: 4px; }
.club-featured-facts b { color: var(--ui-muted); font-size: .78rem; }
.club-featured-link { display: inline-flex; justify-content: center; align-items: center; gap: 18px; min-height: 48px; padding: 0 18px; border-radius: 12px; background: var(--ui-brand); color: var(--ui-on-brand); font-weight: var(--ui-weight-bold); text-decoration: none; white-space: nowrap; }
.club-cover-file-label:has(+ input:focus-visible), .club-image-change:has(+ input:focus-visible) { outline: 3px solid var(--ui-focus); outline-offset: 3px; }
.account-tasting-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.account-tasting-actions .btn { min-height: 44px; padding: 9px 14px; font-size: .86rem; white-space: nowrap; }
@media (max-width: 640px) {
  .club-channel { margin-top: 6px; }
  .club-channel-banner { aspect-ratio: 2 / 1; border-radius: 16px; }
  .club-channel-identity { gap: 12px; padding: 0 8px; }
  .club-channel-avatar { flex-basis: 72px; width: 72px; height: 72px; margin-top: -30px; border-radius: 20px; font-size: 2rem; }
  .club-channel:not(.club-channel--has-cover) .club-channel-avatar { margin-top: -8px; }
  .club-channel-identity > div { padding-top: 8px; }
  .club-channel-identity h1 { font-size: clamp(1.7rem, 8vw, 2.3rem); }
  .club-channel-identity p:not(.eyebrow) { font-size: .9rem; }
  .club-cover-previews { gap: 10px; padding: 12px; }
  .club-cover-previews figure:last-child { flex-basis: 34%; }
  .club-cover-previews figcaption { font-size: .7rem; }
  .club-cover-actions { display: flex; margin: 10px 0 0; }
  .club-featured { align-items: stretch; flex-direction: column; }
  .club-featured-date { grid-template-columns: 1fr; gap: 0; }
  .club-featured-link { width: 100%; }
  .club-profile-preview { flex-basis: 84px; width: 84px; height: 84px; border-radius: 22px; }
  .club-hub { padding-top: 4px; }
  .club-hub-heading { align-items: stretch; flex-direction: column; gap: 18px; }
  .club-hub-new { width: 100%; }
  .club-hub-card { padding: 20px; }
  .club-hub-site { grid-template-columns: minmax(0, 1fr); }
  .club-hub-status { justify-self: start; }
  .club-roster-add { grid-template-columns: minmax(0, 1fr); }
  .club-person-create { padding: 18px; }
  .club-person-options { grid-template-columns: 1fr; }
  .club-person-option { min-height: 72px; }
  .roster-rank-promotion, .roster-rank-promotion input { width: 100%; }
  .club-address-field { align-items: stretch; flex-direction: column; }
  .account-tasting-actions { align-items: stretch; flex-direction: column; width: 100%; }
  .account-tasting-actions .btn { width: 100%; justify-content: center; }
}
@media (max-width: 760px) {
  html[data-appearance] .home-mode-nav { background: var(--ui-surface); box-shadow: 0 12px 30px var(--ui-shadow); }
  html[data-appearance] .home-mode-nav a[aria-current="page"] { background: var(--ui-brand-soft); }
}
.home-taster-history a { color: var(--ui-brand); font-weight: var(--ui-weight-strong); text-decoration: none; }
.home-taster-history { max-width: 760px; margin: 0 auto 24px; }
.home-taster-history-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.home-taster-history-heading h2 { margin: 0; color: var(--ui-text); font-size: 1.3rem; }
.home-taster-history-heading a { font-size: .85rem; }
.home-taster-history > p { margin: 10px 0; color: var(--ui-muted); }
.home-taster-history-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--ui-border); }
.home-taster-history-row b, .home-taster-history-row small { display: block; }
.home-taster-history-row b { color: var(--ui-text); font-size: .95rem; }
.home-taster-history-row small { margin-top: 3px; color: var(--ui-muted); font-size: .78rem; }
.home-taster-history-row > span:last-child { font-size: 1.5rem; }
.taster-history-list { overflow: hidden; padding: 4px 18px; border: 1px solid var(--ui-border); border-radius: 20px; background: var(--ui-surface); }
.taster-history-list .list-row { min-width: 0; padding: 16px 0; color: var(--ui-text); }
.taster-history-list .list-row > span:first-child { min-width: 0; flex: 1 1 240px; }
.taster-history-list .list-row b { overflow-wrap: anywhere; }
.taster-history-more { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 46px; margin-top: 10px; border: 1px solid var(--ui-border); border-radius: 14px; background: var(--ui-surface); color: var(--ui-brand); font: var(--ui-weight-semibold) .9rem var(--ui-font-family); cursor: pointer; }
.taster-history-more:hover { border-color: var(--ui-brand); }
.taster-pairings { margin-top: 26px; padding: 20px; border: 1px solid var(--ui-border); border-radius: 20px; background: var(--ui-surface); }
.taster-pairings h2 { margin: 0; }
#home-organizer-history { max-width: 760px; margin: 24px auto; }
.home-entry--signed { padding-top: 18px; }
.home-entry--signed .home-join { max-width: 760px; margin: 0 auto; }
.home-entry--signed-taster #home-taster-panel { display: block; max-width: 560px; margin: 0 auto; }
.home-entry--signed-taster .home-taster-history { margin-top: 28px; }
.profile-link { position: fixed; z-index: 70; top: max(14px, env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right)); display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--ui-border-strong); border-radius: 50%; background: var(--ui-surface); color: var(--ui-text); text-decoration: none; box-shadow: 0 4px 18px var(--ui-shadow); }
.profile-link svg { width: 21px; height: 21px; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.profile-link-initials { color: var(--ui-text); font: var(--ui-weight-bold) .72rem/1 var(--ui-font-family); letter-spacing: .01em; }
.profile-link-count { position: absolute; top: -5px; right: -5px; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border: 2px solid var(--ui-bg); border-radius: 999px; background: var(--ui-brand); color: var(--ui-on-brand); font: var(--ui-weight-bold) .68rem/1 var(--ui-font-family); }
.account-notices { display: grid; gap: 10px; }
.account-notice { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--ui-border); border-radius: 16px; background: var(--ui-surface); color: var(--ui-text); }
.account-notice.is-unread { border-color: var(--ui-brand); background: var(--ui-brand-soft); }
.account-notice-mark { width: 8px; height: 8px; border-radius: 50%; background: var(--ui-border-strong); }
.account-notice.is-unread .account-notice-mark { background: var(--ui-brand); }
.account-notice h3 { margin: 0 0 4px; font-size: 1rem; }
.account-notice p { margin: 0; color: var(--ui-muted); }
.account-notice time { color: var(--ui-muted); font-size: .8rem; }
.account-notice a { justify-self: end; white-space: nowrap; }
.account-view .account-notice .btn.ghost { color: var(--ui-text); }
@media (max-width: 600px) { .account-tabs { overflow-x: auto; white-space: nowrap; } .account-notice { grid-template-columns: 8px minmax(0, 1fr); } .account-notice a { grid-column: 2; justify-self: start; } }
.profile-summary { min-width: 0; }
.profile-summary-empty { padding: 22px 4px; }
.account-view > .hero p { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .account-view > .hero { padding: 12px 2px 14px; }
  .account-view > .hero .ornament { margin: 0 0 7px; padding: 0; background: transparent; font-size: .64rem; letter-spacing: .09em; }
  .account-view > .hero .ornament::before { display: none; }
  .account-view > .hero h1 { margin: 0; font-size: clamp(1.9rem, 8vw, 2.45rem); line-height: 1.08; letter-spacing: -.045em; }
  .account-view > .hero p { margin: 7px 0 0; color: var(--ui-muted); font-size: .86rem; line-height: 1.35; }
  .account-view .account-tabs { display: flex; align-items: stretch; gap: 20px; margin-bottom: 18px; padding: 0; overflow-x: auto; overflow-y: hidden; border: 0; border-bottom: 1px solid var(--ui-border); border-radius: 0; background: transparent; scrollbar-width: none; }
  .account-view .account-tabs::-webkit-scrollbar { display: none; }
  .account-view .account-tabs a { flex: 0 0 auto; justify-content: center; min-height: 44px; padding: 5px 0 9px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; font-size: .78rem; text-align: center; white-space: nowrap; }
  .account-view .account-tabs a[aria-current="page"] { border-bottom-color: var(--ui-brand); background: transparent; box-shadow: none; }
  .account-view .taster-dashboard { border-radius: 20px; }
  .account-view .taster-dashboard-heading { padding: 18px 18px 12px; }
  .account-view .taster-dashboard-heading h2 { font-size: 1.65rem; }
}
.profile-link:hover { background: var(--ui-surface-raised); }
.profile-link:focus-visible { outline: 3px solid var(--ui-focus); outline-offset: 3px; }
html[data-appearance] .account-appearance a { display: grid; place-items: center; flex: 1; min-height: 44px; border-radius: 12px; color: var(--ui-muted); font: var(--ui-weight-semibold) .95rem var(--ui-font-family); text-decoration: none; }
html[data-appearance] .account-appearance a[aria-current="page"] { background: var(--ui-surface); color: var(--ui-brand); box-shadow: 0 1px 4px var(--ui-shadow); }
html[data-appearance] .account-sign-in { max-width: 600px; }
html[data-appearance] .account-sign-in .btn { margin-top: 14px; }
.mail-delivery-tip { display: grid; gap: 7px; margin-top: 16px; padding: 16px; border: 1px solid var(--ui-border); border-radius: 16px; background: var(--ui-surface-raised); color: var(--ui-text); font-size: .9rem; line-height: 1.45; }
.mail-delivery-tip strong { color: var(--ui-brand); font-size: 1rem; }
html[data-appearance] .sheet-view { background: var(--ui-surface); color: var(--ui-text); border-color: var(--ui-border); }
html[data-appearance] .sheet-view .sheet-hero { background: var(--ui-surface-raised); color: var(--ui-text); }
html[data-appearance] .sheet-view .sheet-sub,
html[data-appearance] .sheet-view .tile-l,
html[data-appearance] .sheet-view .score-badge span,
html[data-appearance] .sheet-view .gauge-marks,
html[data-appearance] .sheet-view .gauge-top small { color: var(--ui-muted); }
html[data-appearance] .sheet-view .sheet-title h1,
html[data-appearance] .sheet-view .gauge-label,
html[data-appearance] .sheet-view .tile-v,
html[data-appearance] .sheet-view .sheet-sec { color: var(--ui-text); }
html[data-appearance] .sheet-view .sheet-block { background: var(--ui-surface-raised); }
html[data-appearance] .sheet-view :is(.score-badge, .tile, .pill-v.soft) { background: var(--ui-surface); color: var(--ui-text); border-color: var(--ui-border); box-shadow: none; }
html[data-appearance] .sheet-view :is(.score-badge b, .gauge-top b, .tile .ico) { color: var(--ui-brand); stroke: var(--ui-brand); }
html[data-appearance] .sheet-view .pill-v { background: var(--ui-brand); color: var(--ui-on-brand); }
html[data-appearance] .sheet-view .pill-v.soft { background: var(--ui-surface); color: var(--ui-text); }
html[data-appearance] .sheet-view .gauge-bar { background: var(--ui-border-strong); }
html[data-appearance] .sheet-view .gauge-bar i { background: var(--ui-brand); }
html[data-appearance] .sheet-view .gauge-bar em { background: var(--ui-surface); border-color: var(--ui-brand); box-shadow: 0 2px 6px var(--ui-shadow); }
html[data-appearance] .sheet-view .sheet-sec { border-color: var(--ui-border); }
html[data-appearance] .sheet-view .src { background: var(--ui-brand); color: var(--ui-on-brand) !important; }
.home-header-actions, .account-header-actions, .host-header > .row, .player-view > .spread:first-child > .row { padding-right: 56px; }
.app-bottom-nav { position: fixed; z-index: 65; left: 50%; bottom: max(10px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: min(calc(100% - 24px), 540px); min-height: 72px; padding: 6px; border: 1px solid var(--ui-border); border-radius: 24px; background: var(--ui-surface); box-shadow: 0 14px 34px var(--ui-shadow); }
.app-bottom-nav[hidden] { display: none; }
.app-bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 58px; border-radius: 18px; color: var(--ui-muted); font: var(--ui-weight-semibold) .72rem/1.1 var(--ui-font-family); text-decoration: none; }
.app-bottom-nav a[aria-current="page"] { background: var(--ui-brand-soft); color: var(--ui-text); }
.app-bottom-nav a[aria-current="page"] .app-nav-icon { color: var(--ui-brand); }
.app-bottom-nav a:focus-visible { outline: 3px solid var(--ui-focus); outline-offset: 2px; }
.app-nav-icon { display: inline-block; width: 1.45rem; height: 1.45rem; background: currentColor; }
.app-nav-icon--home { mask: url('/brand/icons/home.svg') center / contain no-repeat; }
.app-nav-icon--glass { mask: url('/brand/icons/glass.svg') center / contain no-repeat; }
.app-nav-icon--person { mask: url('/brand/icons/person.svg') center / contain no-repeat; }
body:has(.app-bottom-nav:not([hidden])) #app { padding-bottom: calc(115px + env(safe-area-inset-bottom)); }
.app-shell-header { position: fixed; z-index: 70; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; height: calc(76px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); border-bottom: 1px solid var(--ui-border); background: var(--ui-bg); }
.app-shell-header:has(.app-organization:not([hidden])) { height: calc(124px + env(safe-area-inset-top)); padding-bottom: 48px; }
.app-organization { position: absolute; left: max(16px, env(safe-area-inset-left)); right: max(16px, env(safe-area-inset-right)); bottom: 0; height: 48px; border-top: 1px solid var(--ui-border); }
.app-organization[hidden] { display: none; }
.app-organization-trigger { display: grid; grid-template-columns: 30px minmax(0, 1fr) 16px; align-items: center; gap: 10px; width: 100%; min-height: 48px; margin: 0; padding: 3px 2px; border: 0; background: transparent; color: var(--ui-text); text-align: left; cursor: pointer; }
.app-organization-mark, .app-organization-option-mark { display: grid; place-items: center; flex: none; border-radius: 9px; background: var(--ui-brand-soft); color: var(--ui-brand); font-weight: var(--ui-weight-bold); }
.app-organization-mark { width: 30px; height: 30px; font-size: .67rem; }
.app-organization-copy { display: grid; gap: 1px; min-width: 0; }
.app-organization-copy small { color: var(--ui-muted); font-size: .57rem; font-weight: var(--ui-weight-bold); letter-spacing: .1em; line-height: 1.1; }
.app-organization-copy strong { overflow: hidden; font-size: .85rem; font-weight: var(--ui-weight-semibold); line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.app-organization-chevron { width: 8px; height: 8px; margin-top: -4px; border-right: 2px solid var(--ui-muted); border-bottom: 2px solid var(--ui-muted); transform: rotate(45deg); }
.app-organization-trigger:focus-visible, .app-organization-dialog button:focus-visible { outline: 3px solid var(--ui-focus); outline-offset: 2px; }
.app-organization-dialog { position: fixed; inset: auto 0 0; box-sizing: border-box; width: min(100%, 540px); max-width: 100%; max-height: min(76dvh, 720px); margin: 0 auto; padding: 8px 20px calc(20px + env(safe-area-inset-bottom)); overflow-y: auto; border: 1px solid var(--ui-border); border-bottom: 0; border-radius: 28px 28px 0 0; background: var(--ui-surface); color: var(--ui-text); box-shadow: 0 -18px 54px var(--ui-shadow); font-family: var(--ui-font-family); }
.app-organization-dialog::backdrop { background: var(--ui-scrim); }
.app-organization-handle { width: 38px; height: 5px; margin: 0 auto 20px; border-radius: 99px; background: var(--ui-border-strong); }
.app-organization-dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.app-organization-kicker { margin: 0 0 5px; color: var(--ui-brand); font-size: .67rem; font-weight: var(--ui-weight-bold); letter-spacing: .1em; text-transform: uppercase; }
.app-organization-dialog h2 { margin: 0; font-size: 1.45rem; line-height: 1.15; letter-spacing: -.035em; }
.app-organization-dialog h2:focus { outline: none; }
.app-organization-close { flex: none; width: 44px; height: 44px; margin: -5px -8px 0 0; border: 0; border-radius: 50%; background: var(--ui-surface-raised); color: var(--ui-text); font: var(--ui-weight-regular) 1.75rem/1 var(--ui-font-family); cursor: pointer; }
.app-organization-dialog > p { margin: 9px 0 18px; color: var(--ui-muted); font-size: .84rem; line-height: 1.4; }
.app-organization-options { display: grid; gap: 7px; }
.app-organization-option { display: grid; grid-template-columns: 44px minmax(0, 1fr) 24px; align-items: center; gap: 13px; width: 100%; min-height: 68px; padding: 10px 12px; border: 1px solid var(--ui-border); border-radius: 17px; background: var(--ui-surface); color: var(--ui-text); text-align: left; cursor: pointer; }
.app-organization-option[aria-current="true"] { border-color: var(--ui-brand); background: var(--ui-brand-soft); }
.app-organization-option-mark { width: 44px; height: 44px; border-radius: 13px; font-size: .9rem; }
.app-organization-option-copy { display: grid; gap: 3px; min-width: 0; }
.app-organization-option-copy strong { font-size: .94rem; line-height: 1.2; overflow-wrap: anywhere; }
.app-organization-option-copy small { color: var(--ui-muted); font-size: .75rem; }
.app-organization-check { width: 21px; height: 21px; color: var(--ui-brand); opacity: 0; }
.app-organization-option[aria-current="true"] .app-organization-check { opacity: 1; }
.app-organization-actions { display: grid; border-top: 1px solid var(--ui-border); margin-top: 12px; padding-top: 8px; }
.app-organization-actions a, .app-organization-actions button { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 12px; border: 0; background: transparent; color: var(--ui-brand); font: inherit; text-decoration: none; text-align: left; cursor: pointer; border-radius: 12px; }
.app-organization-actions a:hover, .app-organization-actions button:hover { background: var(--ui-surface-raised); }
.app-organization-actions a:focus-visible { outline: 3px solid var(--ui-focus); outline-offset: 2px; }
@media (min-width: 768px) {
  .app-organization-dialog { inset: 116px 20px auto auto; width: 420px; margin: 0; border: 1px solid var(--ui-border); border-radius: 20px; padding: 20px; }
  .app-organization-handle { display: none; }
}
.app-shell-brand { display: inline-flex; align-items: center; min-width: 0; }
.app-shell-brand img { display: block; width: min(175px, 48vw); height: auto; }
.app-shell-brand--club img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }
.app-shell-brand span { overflow: hidden; color: var(--ui-text); font-weight: var(--ui-weight-bold); font-size: .95rem; text-overflow: ellipsis; white-space: nowrap; }
.app-shell-brand--club { gap: 9px; text-decoration: none; }
[data-appearance="dark"] .app-shell-brand:not(.app-shell-brand--club) img { filter: brightness(0) invert(1); }
.app-shell-actions { display: flex; align-items: center; gap: 6px; }
.app-shell-actions .profile-link { position: static; }
.app-shell-close { display: grid; place-items: center; width: 44px; height: 44px; color: var(--ui-text); font-size: 2rem; font-weight: var(--ui-weight-regular); line-height: 1; text-decoration: none; }
.app-shell-close:focus-visible { outline: 3px solid var(--ui-focus); outline-offset: 2px; }
body:has(.app-shell-header) #app { padding-top: calc(92px + env(safe-area-inset-top)); }
body:has(.app-organization:not([hidden])) #app { padding-top: calc(140px + env(safe-area-inset-top)); }
.home-view .home-header { display: none; }
html[data-appearance] .next-step-card { background: var(--ui-warning-soft); color: var(--ui-warning-text); }
html[data-appearance] .next-step-card :is(p, .eyebrow) { color: var(--ui-warning-text); }
.home-entry--organizer:not(.home-entry--signed) #home-organizer-panel { max-width: var(--ui-entry-width); }
.home-entry:not(.home-entry--signed) .home-join { max-width: var(--ui-entry-width); margin-inline: auto; }
.home-entry:not(.home-entry--signed) #home-taster-panel { display: block; }
.home-entry--organizer:not(.home-entry--signed) #acc-card { display: block; width: 100%; margin: 0 auto; padding: 28px; border: 1px solid var(--ui-border); border-radius: 28px; background: var(--ui-surface); }
@media (max-width: 760px) { .home-entry--organizer:not(.home-entry--signed) #acc-card { padding: 24px; } }

@media (min-width: 900px) {
  .app-bottom-nav {
    z-index: 72;
    top: 11px;
    bottom: auto;
    width: min(540px, calc(100% - 420px));
    min-height: 54px;
    gap: 4px;
    padding: 3px;
    border-radius: 17px;
    box-shadow: none;
  }
  .app-bottom-nav a { flex-direction: row; gap: 9px; min-height: 46px; padding-inline: 9px; font-size: .85rem; white-space: nowrap; }
  body:has(.app-bottom-nav:not([hidden])) #app { padding-bottom: 64px; }
  html[data-appearance] .account-view .account-sign-in { max-width: 680px; margin: 16px auto 24px; }
}

/* Event art stays outside rendered views and never intercepts the game. */
.event-effects { position: fixed; z-index: 72; top: calc(2px + env(safe-area-inset-top)); right: max(64px, env(safe-area-inset-right)); width: 72px; aspect-ratio: 1; pointer-events: none; opacity: 0; transition: opacity .12s ease; }
.event-effects.is-visible { opacity: 1; }

/* First-visit journeys: a complete view, with the same semantic palette as the app. */
.onboarding-dialog { position: fixed; inset: 0; box-sizing: border-box; width: 100%; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; overflow: auto; border: 0; background: var(--ui-bg); color: var(--ui-text); font-family: var(--ui-font-family); }
.onboarding-dialog::backdrop { background: var(--ui-scrim); }
.onboarding-shell { display: flex; flex-direction: column; width: min(100%, 1280px); min-height: 100%; margin: 0 auto; padding: max(20px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(30px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); box-sizing: border-box; }
.onboarding-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 48px; }
.onboarding-top img { display: block; width: 176px; height: auto; }
[data-appearance="dark"] .onboarding-top img { filter: brightness(0) invert(1); }
.onboarding-skip { display: inline-flex; align-items: center; gap: 13px; min-height: 44px; padding: 0 8px; border: 0; border-radius: 12px; background: transparent; color: var(--ui-muted); font: var(--ui-weight-strong) .92rem var(--ui-font-family); cursor: pointer; }
.onboarding-skip span { color: var(--ui-text); font-size: 2rem; font-weight: var(--ui-weight-regular); line-height: 1; }
.onboarding-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(350px, .9fr); align-items: center; gap: clamp(32px, 6vw, 96px); flex: 1; padding: 24px clamp(0px, 3vw, 44px); }
.onboarding-stage { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: space-between; min-width: 0; min-height: 430px; border: 1px solid var(--ui-border); border-radius: 34px; background: var(--ui-surface-raised); overflow: hidden; }
.onboarding-demo-label { align-self: flex-start; margin: 20px 24px 0; color: var(--ui-muted); font-size: .75rem; font-weight: var(--ui-weight-bold); letter-spacing: .04em; }
.onboarding-demo-visual { display: grid; place-items: center; width: 100%; min-height: 0; flex: 1; }
.onboarding-art { display: block; width: min(100%, 500px); max-height: 300px; height: auto; pointer-events: none; filter: drop-shadow(0 18px 25px var(--ui-shadow)); animation: onboarding-art-in .55s cubic-bezier(.2,.7,.2,1) both; }
.onboarding-demo-control { display: grid; place-items: center; width: 100%; min-height: 78px; padding: 10px 20px 18px; box-sizing: border-box; }
.onboarding-demo-button { display: inline-flex; align-items: center; justify-content: space-between; gap: 22px; min-height: 48px; padding: 0 18px; border: 1px solid var(--ui-brand); border-radius: 14px; background: var(--ui-surface); color: var(--ui-brand); font: var(--ui-weight-bold) .93rem var(--ui-font-family); cursor: pointer; }
.onboarding-demo-button[aria-pressed="true"] { background: var(--ui-brand-soft); }
.onboarding-demo-button span { font-size: 1.3rem; }
.onboarding-blind-choices { display: grid; gap: 9px; width: min(100%, 400px); }
.onboarding-choice-row { display: grid; grid-template-columns: 62px 1fr; align-items: center; gap: 8px; color: var(--ui-text); font-size: .84rem; font-weight: var(--ui-weight-bold); }
.onboarding-choice-row > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.onboarding-choice-score { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.onboarding-choice-score > div { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.onboarding-choice-letter > div, .onboarding-choice-served > div { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.onboarding-sample-data { display: block; color: var(--ui-muted); font-size: .76rem; font-weight: var(--ui-weight-strong); text-align: center; }
.onboarding-choice-row button { min-height: 38px; padding: 4px 8px; border: 1px solid var(--ui-border-strong); border-radius: 10px; background: var(--ui-surface); color: var(--ui-text); font: var(--ui-weight-strong) .8rem var(--ui-font-family); cursor: pointer; }
.onboarding-choice-row button[aria-pressed="true"] { border-color: var(--ui-brand); background: var(--ui-brand-soft); color: var(--ui-brand); }
.onboarding-demo-score { display: grid; grid-template-columns: 1fr auto; gap: 5px 16px; width: min(100%, 360px); color: var(--ui-text); font-size: .86rem; font-weight: var(--ui-weight-bold); }
.onboarding-demo-score output { color: var(--ui-brand); font-size: 1.1rem; }
.onboarding-demo-score input { grid-column: 1 / -1; width: 100%; accent-color: var(--ui-brand); cursor: pointer; }
.onboarding-copy { max-width: 460px; }
.onboarding-kicker { margin: 0 0 24px; color: var(--ui-brand); font-size: .78rem; font-weight: var(--ui-weight-bold); letter-spacing: .13em; text-transform: uppercase; }
.onboarding-kicker span { margin-inline: 9px; color: var(--ui-border-strong); }
.onboarding-copy h1 { margin: 0; font-size: clamp(2.7rem, 4.4vw, 4.7rem); font-weight: var(--ui-weight-bold); line-height: 1.03; letter-spacing: -.06em; text-wrap: balance; }
.onboarding-copy > p:not(.onboarding-kicker) { max-width: 36ch; margin: 24px 0 0; color: var(--ui-muted); font-size: clamp(1.04rem, 1.3vw, 1.2rem); line-height: 1.52; }
.onboarding-copy .onboarding-demo-result { min-height: 2.7em; margin-top: 18px; color: var(--ui-muted); font-size: .9rem; font-weight: var(--ui-weight-strong); }
.onboarding-copy .onboarding-demo-result.is-complete { color: var(--ui-brand); }
.onboarding-progress { display: flex; gap: 8px; margin-top: 42px; }
.onboarding-progress span { width: 42px; height: 5px; border-radius: 9px; background: var(--ui-border-strong); }
.onboarding-progress span[aria-current="step"] { background: var(--ui-brand); }
.onboarding-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 28px; }
.onboarding-actions button { min-height: 54px; border-radius: 15px; font: var(--ui-weight-bold) 1rem var(--ui-font-family); cursor: pointer; }
.onboarding-next { display: inline-flex; align-items: center; justify-content: space-between; gap: 34px; min-width: 190px; padding: 0 22px; border: 1px solid var(--ui-brand); background: var(--ui-brand); color: var(--ui-on-brand); box-shadow: 0 4px 0 var(--ui-brand-shadow); }
.onboarding-next span { font-size: 1.5rem; font-weight: var(--ui-weight-regular); }
.onboarding-next:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ui-brand-shadow); }
.onboarding-next:disabled { opacity: .46; box-shadow: none; cursor: not-allowed; }
.onboarding-back { padding: 0 10px; border: 0; background: transparent; color: var(--ui-muted); }
.onboarding-dialog button:focus-visible, .onboarding-copy h1:focus-visible { outline: 3px solid var(--ui-focus); outline-offset: 4px; }
@keyframes onboarding-art-in { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 760px) {
  .onboarding-shell { padding: max(12px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom)); }
  .onboarding-top img { width: 146px; }
  .onboarding-body { display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 16px; padding: 16px 0 6px; }
  .onboarding-stage { min-height: 0; height: clamp(275px, 37dvh, 350px); border-radius: 26px; }
  .onboarding-stage-blind { height: 320px; }
  .onboarding-demo-label { margin: 14px 17px 0; font-size: .68rem; }
  .onboarding-art { width: min(100%, 390px); max-height: 225px; }
  .onboarding-stage-blind .onboarding-art { max-height: 180px; }
  .onboarding-demo-control { min-height: 64px; padding: 4px 10px 12px; }
  .onboarding-stage-blind .onboarding-demo-control { min-height: 108px; }
  .onboarding-choice-row { grid-template-columns: 40px 1fr; gap: 5px; font-size: .74rem; }
  .onboarding-choice-score { grid-template-columns: minmax(0, 1fr); gap: 10px; font-size: .84rem; }
  .onboarding-choice-row button { font-size: .74rem; }
  .onboarding-demo-button { min-height: 44px; }
  .onboarding-copy { max-width: none; }
  .onboarding-kicker { margin-bottom: 14px; font-size: .72rem; }
  .onboarding-copy h1 { max-width: 15ch; font-size: clamp(2.1rem, 8vw, 3.35rem); }
  .onboarding-copy > p:not(.onboarding-kicker) { margin-top: 12px; font-size: 1rem; }
  .onboarding-progress { margin-top: 18px; }
  .onboarding-actions { margin-top: 15px; padding-inline: 10px; }
  .onboarding-next { min-width: 0; flex: 0 1 210px; }
}
@media (max-width: 370px), (max-height: 650px) {
  .onboarding-body { gap: 16px; padding-top: 16px; }
  .onboarding-stage { height: 255px; }
  .onboarding-stage-blind { height: 310px; }
  .onboarding-art { max-height: 175px; }
  .onboarding-copy h1 { font-size: 2rem; }
  .onboarding-progress { margin-top: 16px; }
}
@media (prefers-reduced-motion: reduce) { .onboarding-art { animation: none; } .onboarding-next:active { transform: none; } }
.event-effects video { display: block; width: 100%; height: 100%; object-fit: contain; }
.event-effect-static { display: none; position: absolute; inset: 25%; border-radius: 50%; background: var(--ui-brand); mask: url('/events/symbol.svg') center / contain no-repeat; }
.event-effects.is-static video { display: none; }
.event-effects.is-static .event-effect-static { display: block; }
.event-effects-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (min-width: 900px) { .event-effects { top: 2px; left: calc(50% + 290px); right: auto; width: 72px; } }
body:has(.wide) .event-effects { top: 0; left: 55%; right: auto; width: clamp(68px, 6vw, 96px); transform: translateX(-50%); }
@media (prefers-reduced-motion: reduce) { .event-effects { transition: none; } }

/* The projector is a dedicated full-screen surface with its own visible brand. */
body:has(#app.wide) .app-shell-header { display: none; }
body:has(.app-shell-header) #app.wide { padding-top: 1vh; }
body:has(#app.wide) { --ink: var(--ui-contrast-light); --muted: var(--ui-illustration-cool); --gold: var(--ui-star-base); color: var(--ink); }
.wide :is(.screen-title, .round-banner, .theme-banner, .podium-title, .points-line, .thread-hits) { color: var(--ui-contrast-light); }
.wide .screen-head .eyebrow, .wide .screen-head .muted { color: var(--ui-illustration-cool); }
.wide .screen-head .brand img[src="/brand/symbol.svg"] { filter: brightness(0) invert(1); }
.wide :is(.bottle-card.open, .podium .place, .chip, .wine-card) { --ink: var(--ui-text); --muted: var(--ui-muted); color: var(--ui-text); }
.wide :is(.bottle-card.open, .podium .place, .chip, .wine-card) .muted { color: var(--ui-muted); }
.wide[data-final] .podium .place { animation: none; }

/* Navigation and typography stay consistent across every app surface. */
html { scrollbar-gutter: stable; font-synthesis: none; }
body:not(:has(.wide)) { background: var(--ui-bg); }
:is(button, input, select, textarea) { font-family: var(--body); }
.app-shell-header { view-transition-name: app-header; }
.app-bottom-nav { view-transition-name: app-navigation; }
.app-bottom-nav a { transition: background-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease); }
.account-view + .app-bottom-nav a { transition: none; }
.app-shell-header::after { content: ''; position: absolute; bottom: 0; left: 0; height: 2px; width: 100%; background: var(--ui-brand); transform: scaleX(0); transform-origin: left; }
[data-navigating] .app-shell-header::after { transform: scaleX(1); transition: transform var(--ui-motion-fast) var(--ui-motion-ease); }
.account-loading { padding-block: 32px; color: var(--ui-muted); }
.account-loading-title { width: 55%; height: 48px; margin-block: 16px 48px; border-radius: 12px; background: var(--ui-surface-raised); }
.account-loading-panel { min-height: 240px; border: 1px solid var(--ui-border); border-radius: 24px; background: var(--ui-surface); }
@view-transition { navigation: auto; }
::view-transition-group(*) { animation-duration: var(--ui-motion-fast); animation-timing-function: var(--ui-motion-ease); }
::view-transition-old(app-header), ::view-transition-new(app-header),
::view-transition-old(app-navigation), ::view-transition-new(app-navigation) { animation: none; mix-blend-mode: normal; }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .app-bottom-nav a, [data-navigating] .app-shell-header::after { transition: none; }
}

/* One person, one place to manage their club relationship. */
.people-intro { max-width: 60ch; color: var(--ui-muted); }
.people-search { display: grid; gap: .5rem; margin-block: 1.5rem 1rem; }
.people-search input { width: 100%; }
.people-row { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr) auto; gap: .75rem; align-items: start; padding-block: 1.2rem; border-bottom: 1px solid var(--ui-border); }
.people-avatar { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: .9rem; background: var(--ui-brand-soft); color: var(--ui-brand); font-weight: var(--ui-weight-bold); }
.people-identity { display: grid; gap: .2rem; overflow-wrap: anywhere; }
.people-identity strong { font-weight: var(--ui-weight-bold); }
.people-identity span, .people-identity small { color: var(--ui-muted); }
.people-role { font-size: .8rem; padding: .3rem .6rem; border-radius: .5rem; background: var(--ui-surface-raised); color: var(--ui-text); }
.people-actions { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: .6rem; }
.people-actions .btn { margin: 0; min-height: 2.75rem; }
.people-empty { padding-block: 2rem; color: var(--ui-muted); }
.person-form > label:not(.club-person-send) { display: grid; gap: .5rem; margin-block: 1rem; }
.person-form input[readonly] { color: var(--ui-muted); background: var(--ui-bg); }
.person-form .club-person-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.person-form-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
.person-form-actions .btn { flex: 1 1 12rem; margin: 0; }
.roster-ed .account-editor-header p { margin: .3rem 0 0; color: var(--ui-muted); font-size: .9rem; }
@media (max-width: 540px) {
  .people-row { grid-template-columns: 2.5rem minmax(0, 1fr); }
  .people-role { grid-column: 2; justify-self: start; }
  .people-actions { grid-column: 1 / -1; }
  .people-actions .btn { flex: 1 1 8rem; }
  .person-form .club-person-options { grid-template-columns: 1fr; }
}
.people-search input { background: var(--ui-surface-raised); color: var(--ui-text); border: 1px solid var(--ui-border-strong); }
.person-form .club-person-option small { font-weight: var(--ui-weight-regular); }
.new-round-options { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--ui-border); }
.new-round-options > label:not(.club-person-send) { display: block; margin: 1rem 0 .5rem; }
.new-organizer { padding: .75rem; background: var(--ui-surface-raised); border-radius: .75rem; }
.rating-revision { padding: 1.2rem; margin-block: 1rem; background: var(--ui-surface); border: 1px solid var(--ui-border); border-radius: 1rem; }
.rating-revision select { width: 100%; margin-bottom: 1rem; }
.brand-comparison-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: .5rem; align-items: center; padding-block: .8rem; border-bottom: 1px solid var(--ui-border); font-variant-numeric: tabular-nums; }
.brand-comparison-row span { color: var(--ui-muted); }
.brand-comparison { margin-bottom: 1.5rem; }
.creation-step { display: grid; gap: .7rem; }
.creation-step > label { margin-top: .4rem; }
.creation-step .new-round-options { margin-top: 0; padding-top: 0; border: 0; }
.creation-review p { display: grid; gap: .2rem; padding-block: .7rem; border-bottom: 1px solid var(--ui-border); }
.creation-review span { color: var(--ui-muted); }
.new-context { max-width: 680px; margin-inline: auto; }
.new-context h2 { margin: 0 0 14px; color: var(--ui-text); font-size: clamp(1.4rem, 4vw, 2rem); letter-spacing: -.035em; }
.new-context-options { display: grid; gap: 10px; }
.new-context-option { display: grid; gap: 4px; width: 100%; min-height: 72px; padding: 16px 18px; border: 1px solid var(--ui-border-strong); border-radius: 16px; background: var(--ui-surface); color: var(--ui-text); font: inherit; text-align: left; cursor: pointer; }
.new-context-option strong { font-size: 1.05rem; }
.new-context-option span { color: var(--ui-muted); font-size: .86rem; }
.new-context-option[aria-pressed="true"], .new-context-option:hover, .new-context-option:focus-visible { border-color: var(--ui-brand); background: var(--ui-brand-soft); outline: none; }
#new-type-choice { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--ui-border); }
#new-type-choice[hidden] { display: none; }
.new-context-private { display: flex; align-items: start; gap: 10px; margin-top: 20px; color: var(--ui-text); }
.new-context-private input[type="checkbox"] { flex: 0 0 22px; width: 22px; min-width: 22px; height: 22px; min-height: 22px; margin: 3px 0 0; padding: 0; accent-color: var(--ui-brand); }
.new-context-private span { flex: 1; min-width: 0; overflow-wrap: normal; }
.new-context-private small { display: block; margin-top: 6px; font-weight: var(--ui-weight-regular); line-height: 1.45; }
.new-context-back { margin: 24px 0 0; }
.new-context-back a, .new-change-org { color: var(--ui-brand); }
.new-change-org { padding: 4px 8px; border: 0; background: transparent; font: inherit; font-weight: var(--ui-weight-bold); text-decoration: underline; cursor: pointer; }

.bottle-openings summary { cursor: pointer; font-weight: var(--ui-weight-bold); }
.bottle-openings form { padding-block: 1rem; border-top: 1px solid var(--ui-border); }
.bottle-openings input { width: 100%; min-width: 0; }
.bottle-openings .row { gap: .75rem; margin-top: .75rem; }
.bottle-openings .row .btn { flex: 1 1 12rem; }

.club-public-view { max-width: 70rem; padding-bottom: 3rem; }
.club-public-view .club-channel { margin-top: 1.5rem; }
.club-public-links { display: flex; flex-wrap: wrap; gap: .75rem; padding-block: 1.5rem; border-bottom: 1px solid var(--ui-border); margin-bottom: 2rem; }
.club-public-content { display: grid; gap: 1.5rem; }
.club-public-content .card { margin: 0; }
.club-public-footer { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 3rem; color: var(--ui-muted); }
.club-public-footer a { color: inherit; }
@media (max-width: 600px) { .club-public-links .btn { flex: 1 1 auto; } }

.club-public-sections { display: flex; flex-wrap: wrap; gap: 1.5rem; padding-top: 1.5rem; }
.club-public-sections a { color: var(--ui-text); font-weight: var(--ui-weight-semibold); text-underline-offset: .3em; }
.club-public-section { scroll-margin-top: 7rem; }
.wrap.club-public-view { max-width: 70rem; }
.club-public-view .club-channel { max-width: none; width: 100%; }
.club-public-view .club-channel:not(.club-channel--has-cover) .club-channel-banner { display: none; }
.club-public-view .club-channel:not(.club-channel--has-cover) .club-channel-identity { padding-top: 1rem; }
.club-stat-view { border-top: 1px solid var(--line); padding: .7rem 0; }
.club-stat-view summary { cursor: pointer; font-weight: var(--ui-weight-bold); padding: .2rem 0; }
.club-stat-view > .muted { margin: .5rem 0; }

/* Personal tasting summary and club standings in the profile. */
.taster-dashboard { margin: 0 auto 24px; max-width: 760px; overflow: hidden; border: 1px solid var(--ui-border); border-radius: 26px; background: var(--ui-surface); color: var(--ui-text); }
.taster-dashboard-heading { padding: 24px 24px 18px; }
.taster-dashboard-heading .eyebrow { color: var(--ui-brand); font-size: .72rem; font-weight: var(--ui-weight-bold); letter-spacing: .12em; }
.taster-dashboard-heading h2 { margin: 7px 0 3px; font-size: clamp(1.65rem, 5vw, 2.3rem); line-height: 1.08; letter-spacing: -.035em; }
.taster-dashboard-heading p { margin: 0; color: var(--ui-muted); }
.taster-board-periods { display: flex; gap: 6px; margin: 0 18px 18px; overflow-x: auto; scrollbar-width: none; }
.taster-board-periods::-webkit-scrollbar { display: none; }
.taster-board-periods button { flex: 0 0 auto; min-height: 34px; padding: 5px 13px; border: 1px solid var(--ui-border); border-radius: 99px; background: var(--ui-surface); color: var(--ui-muted); font: var(--ui-weight-semibold) .8rem var(--ui-font-family); cursor: pointer; }
.taster-board-periods button[aria-pressed="true"] { border-color: var(--ui-brand); background: var(--ui-brand-soft); color: var(--ui-brand); }
.taster-summary-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 16px 20px; border: 1px solid var(--ui-border); border-radius: 18px; background: var(--ui-surface-raised); }
.taster-summary-metric { min-width: 0; padding: 16px 12px; text-align: center; }
.taster-summary-metric + .taster-summary-metric { border-left: 1px solid var(--ui-border); }
.taster-summary-metric span { display: block; color: var(--ui-muted); font-size: .76rem; line-height: 1.2; }
.taster-summary-metric strong { display: block; margin-top: 5px; color: var(--ui-text); font-size: clamp(1.4rem, 5vw, 2rem); line-height: 1.1; font-variant-numeric: tabular-nums; }
.taster-summary-missing { margin: 0 24px 20px; padding: 16px; border-radius: 16px; background: var(--ui-surface-raised); color: var(--ui-muted); line-height: 1.45; }
.taster-board { padding: 20px 16px 12px; border-top: 1px solid var(--ui-border); }
.taster-board-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 8px 16px; }
.taster-board-heading h3 { min-width: 0; margin: 0; font-size: 1.03rem; line-height: 1.2; }
.taster-board-groups, .taster-board-metrics { display: grid; gap: 4px; padding: 4px; border-radius: 14px; background: var(--ui-surface-raised); }
.taster-board-groups { display: inline-flex; flex: 0 0 auto; gap: 2px; padding: 2px; border: 1px solid var(--ui-border); border-radius: 99px; background: var(--ui-surface); }
.taster-board-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 10px; }
.taster-board :is(.taster-board-groups, .taster-board-metrics) button { min-height: 44px; padding: 8px 6px; border: 0; border-radius: 11px; background: transparent; color: var(--ui-muted); font: inherit; font-size: .86rem; font-weight: var(--ui-weight-semibold); cursor: pointer; }
.taster-board :is(.taster-board-groups, .taster-board-metrics) button[aria-pressed="true"] { background: var(--ui-surface); color: var(--ui-text); box-shadow: 0 1px 3px var(--ui-border); }
.taster-board .taster-board-groups button { min-height: 28px; padding: 4px 8px; border-radius: 99px; font-size: .72rem; }
.taster-board .taster-board-groups button[aria-pressed="true"] { background: var(--ui-brand-soft); color: var(--ui-brand); box-shadow: none; }
.taster-board :is(.taster-board-groups, .taster-board-metrics) button:active { transform: scale(.98); }
.taster-dashboard button:focus-visible { outline: 3px solid var(--ui-warning); outline-offset: 2px; }
.taster-board-note { margin: 16px 8px 8px; color: var(--ui-muted); font-size: .78rem; line-height: 1.45; }
.taster-board-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 56px; padding: 9px 8px; border-top: 1px solid var(--ui-border); }
.taster-board-row.is-self { margin-inline: -4px; padding-inline: 12px; border-radius: 12px; background: var(--ui-brand-soft); }
.taster-board-sort { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 8px 12px; min-height: 44px; }
.taster-board-sort > span { flex: none; font-size: .85rem; color: var(--ui-muted); }
.taster-board-sort > button { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 0; min-height: 44px; padding: 8px 0 8px 8px; border: 0; background: transparent; color: var(--ui-brand); font: inherit; font-size: .9rem; font-weight: var(--ui-weight-semibold); cursor: pointer; text-align: right; }
.taster-sort-chevron { flex: none; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin: -4px 4px 0 0; }
.taster-sort-sheet { position: fixed; inset: auto 0 0; width: min(100%, 540px); max-width: 100%; max-height: 85dvh; box-sizing: border-box; margin: 0 auto; padding: 10px 20px calc(20px + env(safe-area-inset-bottom)); overflow-y: auto; border: 1px solid var(--ui-border); border-bottom: 0; border-radius: 24px 24px 0 0; background: var(--ui-surface); color: var(--ui-text); font: inherit; }
.taster-sort-sheet::backdrop { background: var(--ui-scrim); }
.taster-sort-handle { width: 36px; height: 5px; border-radius: 99px; background: var(--ui-border-strong); margin: 0 auto 18px; }
.taster-sort-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; }
.taster-sort-header h3 { margin: 0; font-size: 1.2rem; }
.taster-sort-header button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--ui-surface-raised); color: var(--ui-muted); font: inherit; font-size: 1.65rem; cursor: pointer; }
.taster-sort-option { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 56px; padding: 14px 0; border: 0; border-top: 1px solid var(--ui-border); background: transparent; color: var(--ui-text); font: inherit; text-align: left; cursor: pointer; }
.taster-sort-option strong { font-weight: var(--ui-weight-medium); }
.taster-sort-option small { display: block; margin-top: 4px; color: var(--ui-muted); font-size: .78rem; line-height: 1.4; }
.taster-sort-option[aria-pressed="true"] { color: var(--ui-brand); }
.taster-sort-check { width: 8px; height: 14px; flex: none; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-right: 8px; visibility: hidden; }
.taster-sort-option[aria-pressed="true"] .taster-sort-check { visibility: visible; }
.taster-sort-sheet button:focus-visible { outline: 3px solid var(--ui-focus); outline-offset: 2px; }
@media (min-width: 768px) {
  .taster-sort-sheet { inset: auto; width: 340px; margin: 0; padding: 16px 20px; border: 1px solid var(--ui-border); border-radius: 18px; box-shadow: 0 12px 36px var(--ui-shadow); }
  .taster-sort-handle { display: none; }
}
.taster-board-explanation { margin: 16px 8px 0; color: var(--ui-muted); font-size: .78rem; line-height: 1.5; }
.taster-board-explanation summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.taster-board-explanation p { margin: 0 0 12px; }
.taster-board-row.is-self { margin-inline: 0; padding-inline: 8px; border-radius: 0; background: transparent; box-shadow: inset 3px 0 var(--ui-brand); }
.taster-dashboard .taster-stat-link { text-decoration: none; }
.taster-board-groups { border-radius: 9px; }
.taster-board .taster-board-groups button { border-radius: 6px; }
.taster-board-place { color: var(--ui-muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.taster-board-row { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; }
.taster-board-place { display: grid; place-items: center; }
.taster-podium-icon { display: block; width: 40px; height: 40px; object-fit: contain; }
.taster-member-link { min-height: 44px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.taster-member-link:hover { color: var(--ui-brand); }
.member-profile-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 24px 0; }
.member-profile-stats span, .member-profile-stats strong { display: block; }
.member-profile-stats span { font-size: .8rem; color: var(--ui-muted); }
.member-profile-stats strong { font-size: 1.5rem; margin-top: 6px; }
.club-member-profile .club-badge-art { width: 112px; height: 112px; }
.taster-board-person { min-width: 0; }
.taster-board-person strong { overflow-wrap: anywhere; font-size: .92rem; }
.taster-board-person em { margin-left: 6px; color: var(--ui-brand); font-size: .72rem; font-style: normal; font-weight: var(--ui-weight-bold); }
.taster-board-person small { display: block; margin-top: 2px; color: var(--ui-muted); font-size: .75rem; }
.taster-board-value { color: var(--ui-text); font-size: 1.12rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.taster-dashboard .taster-stat-link { display: inline; min-height: 28px; padding: 2px 1px; border: 0; border-radius: 4px; background: none; color: inherit; font: inherit; cursor: pointer; text-decoration: none; }
.taster-dashboard .taster-stat-link:hover { color: var(--ui-brand); text-decoration-color: currentColor; }
.taster-dashboard .taster-stat-link--value { min-width: 44px; min-height: 44px; font-size: 1.12rem; font-weight: var(--ui-weight-bold); font-variant-numeric: tabular-nums; text-align: right; }
.taster-drilldown { padding: 20px 16px 24px; border-top: 1px solid var(--ui-border); scroll-margin-top: 76px; }
.taster-drilldown-back { min-height: 44px; padding: 6px 0; border: 0; background: none; color: var(--ui-brand); font: inherit; font-weight: var(--ui-weight-semibold); cursor: pointer; }
.taster-drilldown-head { padding: 10px 4px 18px; }
.taster-drilldown-head h3 { margin: 5px 0; font-size: 1.55rem; line-height: 1.2; }
.taster-drilldown-head p { margin: 0; color: var(--ui-muted); font-size: .86rem; }
.taster-drilldown-head .taster-undated-note { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--ui-surface-raised); font-size: .78rem; line-height: 1.45; }
.taster-drilldown-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 4px; border-top: 1px solid var(--ui-border); }
.taster-drilldown-item strong, .taster-drilldown-item small { display: block; }
.taster-drilldown-item strong { font-size: .9rem; }
.taster-drilldown-item small { margin-top: 3px; color: var(--ui-muted); font-size: .76rem; }
.taster-correct-wines { margin: 9px 0 0; padding-left: 17px; color: var(--ui-muted); font-size: .78rem; line-height: 1.5; }
.taster-drilldown-result { flex: 0 0 auto; text-align: right; }
.taster-drilldown-result b { display: block; font-variant-numeric: tabular-nums; }
.taster-drilldown-result button { min-height: 32px; padding: 4px 0; border: 0; background: none; color: var(--ui-brand); font: inherit; font-size: .76rem; font-weight: var(--ui-weight-semibold); cursor: pointer; }
.taster-dashboard :is(.taster-board, .taster-drilldown)[hidden] { display: none; }
.taster-board-empty { padding: 20px 8px; color: var(--ui-muted); }
@media (max-width: 420px) { .taster-dashboard-heading { padding: 20px 18px 16px; } .taster-board-periods { margin-inline: 12px; } .taster-summary-metrics { margin-inline: 12px; } .taster-board { padding-inline: 12px; } .taster-board-heading { margin-inline: 2px; } .taster-board-heading h3 { font-size: .94rem; } .taster-board .taster-board-metrics button { min-width: 0; padding-inline: 3px; font-size: .69rem; line-height: 1.1; white-space: normal; } .taster-board .taster-board-groups button { font-size: .66rem; padding-inline: 6px; } }
@media (prefers-reduced-motion: reduce) { .taster-board button:active { transform: none; } }

/* Warm editorial presentation for restaurant-owned reservation pages. */
:root{--ui-venue-background:#e7e6d5;--ui-venue-accent:#da6b3d;--ui-venue-hairline:#25271e24;--ui-venue-ink:#25271e;--ui-venue-muted:#515443;--ui-venue-line:#d4d5c9;--ui-venue-paper:#fafaf4;--ui-venue-raised:#eeeee3;--ui-venue-border:#858975;--ui-venue-focus:#54592f;--ui-venue-success:#46612e;--ui-venue-on-ink:#fff;--ui-font-editorial:Georgia,"Times New Roman",serif;}

/* Organization identity: shared by the marketing site and all app routes. */
:root[data-venue-design] {
  --venue-background: var(--ui-venue-background);
  --venue-accent: var(--ui-venue-accent);
  --venue-on-background: var(--ui-venue-ink);
  --ui-bg: var(--ui-venue-paper);
  --ui-surface: var(--ui-venue-paper);
  --ui-surface-raised: var(--ui-venue-raised);
  --ui-field: var(--ui-venue-paper);
  --ui-text: var(--ui-venue-ink);
  --ui-muted: var(--ui-venue-muted);
  --ui-faint: var(--ui-venue-muted);
  --ui-border: var(--ui-venue-line);
  --ui-border-strong: var(--ui-venue-border);
  --ui-brand: var(--ui-venue-ink);
  --ui-on-brand: var(--ui-venue-on-ink);
  --ui-brand-shadow: var(--ui-venue-ink);
  --ui-focus: var(--ui-venue-focus);
  --ui-success: var(--ui-venue-success);
  --ui-font-heading: var(--ui-font-family);
  --bk-ink: var(--ui-text);
  --bk-muted: var(--ui-muted);
  --bk-line: var(--ui-border);
  --bk-blue: var(--ui-brand);
  --bk-bg: var(--ui-bg);
}
:root[data-venue-typography="editorial"] { --ui-font-heading: var(--ui-font-editorial); }
:root[data-venue-design] .app-shell-header { border-bottom: 3px solid var(--venue-accent); }
:root[data-venue-design] .app-shell-brand img { width: auto; max-width: 210px; height: 40px; object-fit: contain; background: var(--ui-venue-ink); padding: 8px 12px; border-radius: 4px; }
:root[data-venue-design] .app-organization-mark,
:root[data-venue-design] .app-bottom-nav a[aria-current="page"] { background: var(--venue-background); color: var(--venue-on-background); }
:root[data-venue-design] h1,
:root[data-venue-design] h2 { font-family: var(--ui-font-heading); }

.historical-sheet-placeholder { display: grid; justify-items: center; padding: 24px; background: var(--ui-surface-raised); color: var(--ui-muted); border-radius: 18px; }
.historical-sheet-placeholder .wb-icon { width: 3rem; height: 3rem; }
.historical-sheet-source { color: var(--ui-brand); font-size: .8em; margin-inline-start: .5em; }
.history-wine-content .btn { margin-top: 12px; }
.wb-icon--bottle { mask: url('/brand/icons/bottle.svg') center / contain no-repeat; }
/* Organisation history: a date rail, readable title and one opening action. */
.account-view .organization-tastings { padding: clamp(1rem, 4vw, 2rem); background: var(--ui-surface); }
.tastings-heading { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; }
.tastings-heading > .wb-icon { flex-shrink: 0; width: 2.5rem; height: 2.5rem; color: var(--ui-brand); }
.tastings-heading h2 { margin: 0; font-size: 1.8rem; letter-spacing: -.04em; }
.tastings-heading p { max-width: 42ch; margin: .5rem 0 0; color: var(--ui-muted); text-wrap: pretty; }
.organization-tasting-filters { display: grid; grid-template-columns: repeat(3, 1fr); gap: .25rem; padding: .3rem; margin-bottom: 1.75rem; border-radius: 1rem; background: var(--ui-surface-raised); }
html[data-appearance] .account-view .organization-tasting-filters .btn { min-height: 2.75rem; margin: 0; padding: .65rem .5rem; border: 0; border-radius: .75rem; box-shadow: none; background: transparent; color: var(--ui-muted); font-weight: var(--ui-weight-semibold); }
html[data-appearance] .account-view .organization-tasting-filters .btn[aria-pressed="true"] { background: var(--ui-brand); color: var(--ui-on-brand); }
.organization-tasting-list { display: grid; gap: .8rem; }
.organization-tasting-row { position: relative; display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: 1rem; padding: 1.2rem; border: 1px solid var(--ui-border); border-radius: 1.2rem; background: var(--ui-surface); transition: border-color var(--ui-motion-fast); }
.organization-tasting-row:has(.tasting-open):hover { border-color: var(--ui-brand); background: var(--ui-brand-soft); }
.organization-tasting-row:focus-within { outline: 2px solid var(--ui-focus); outline-offset: 3px; }
.tasting-date { display: flex; flex-direction: column; align-items: center; align-self: start; gap: .1rem; padding-block: .5rem; border-radius: .8rem; background: var(--ui-surface-raised); color: var(--ui-muted); font-size: .72rem; font-variant-numeric: tabular-nums; }
.tasting-date strong { color: var(--ui-text); font-size: 1.7rem; line-height: 1.1; }
.tasting-state { margin: 0 0 .4rem; color: var(--ui-muted); font-size: .75rem; }
.organization-tasting-row h3 { margin: 0; font-size: 1.1rem; line-height: 1.3; letter-spacing: -.025em; overflow-wrap: anywhere; text-wrap: pretty; }
.organization-tasting-badges { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin-top: .65rem; }
.organization-tasting-badges span { display: inline-flex; align-items: center; gap: .35rem; color: var(--ui-text); font-size: .75rem; font-weight: var(--ui-weight-semibold); }
.organization-tasting-badges .wb-icon { width: 1.4rem; height: 1.4rem; }
html[data-appearance] .account-view .tasting-open { display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; margin: .4rem 0 -.4rem; padding: .4rem 0; border: 0; background: transparent; color: var(--ui-text); box-shadow: none; font-size: .85rem; font-weight: var(--ui-weight-semibold); text-decoration: none; }
.tasting-open::after { content: ''; position: absolute; inset: 0; border-radius: 1.2rem; }
.tasting-open .wb-icon { width: 1.1rem; height: 1.1rem; }
.organization-tasting-status { margin: 1rem 0 0; color: var(--ui-muted); }
.organization-tasting-status:empty { display: none; }
.tasting-more { width: 100%; margin-top: 1rem; }
.tasting-skeleton { height: 9rem; border-radius: 1.2rem; background: var(--ui-surface-raised); }
@media(min-width:760px) { .organization-tasting-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.historical-sheet-photo {max-width:100%;height:280px;object-fit:contain;}
.historical-photo-upload {padding-block:16px;}
@media(max-width:600px){.account-tabs{gap:20px;}}

/* Platform administration is a global workspace, independent of the active venue. */
.platform-admin-view .profile-hero { padding-bottom: 28px; }
.platform-admin-view #admin-clubs-list { display: grid; gap: 16px; }
.platform-admin-view #admin-clubs-list > .list-row { padding: 20px; border: 1px solid var(--ui-border); border-radius: 20px; background: var(--ui-surface); }
.platform-admin-view .list-row > span { width: 100%; min-width: 0; }
.platform-admin-view .list-row[hidden] { display: none; }
.platform-admin-view .list-row .muted { overflow-wrap: anywhere; }
.platform-admin-view [data-reservation-fee] input { margin-top: 8px; }
.platform-admin-view [data-fee-error]:empty { display: none; }

.wb-icon--tasting-attended { mask: url('/brand/icons/tasting-attended.svg') center / contain no-repeat; }
.wb-icon--tasting-hosted { mask: url('/brand/icons/tasting-hosted.svg') center / contain no-repeat; }
.organization-wine-search { position: relative; margin-block: 1.25rem; }
.organization-wine-search label { display: block; margin-bottom: .5rem; font-weight: var(--ui-weight-semibold); }
.organization-wine-search input { width: 100%; min-height: 3rem; margin: 0; transition: border-color var(--ui-motion-fast); }
.organization-wine-search [role="listbox"] { max-height: 22rem; overflow-y: auto; margin-top: .5rem; border: 1px solid var(--ui-border); border-radius: .8rem; background: var(--ui-surface); }
.organization-wine-search [role="option"] { padding: .8rem 1rem; cursor: pointer; border-bottom: 1px solid var(--ui-border); }
.organization-wine-search [role="option"]:last-child { border-bottom: 0; }
.organization-wine-search [role="option"]:hover,.organization-wine-search [aria-selected="true"] { background: var(--ui-brand-soft); }
.organization-wine-search [role="option"] strong,.organization-wine-search [role="option"] span,.organization-wine-search [role="option"] small { display: block; overflow-wrap: anywhere; }
.organization-wine-search [role="option"] span,.organization-wine-search [role="option"] small,.wine-search-status { color: var(--ui-muted); font-size: .8rem; }
.wine-search-status:empty { display: none; }

/* Research drafts use the same theme, typography and control scale as pairing. */
.wine-discovery { margin-block-start: var(--ui-pairing-section-space); padding-block-start: var(--ui-pairing-gap); border-block-start: 1px solid var(--ui-border); color: var(--ui-text); }
.wine-discovery__query, .wine-discovery__fields { display: grid; gap: var(--ui-pairing-gap); grid-template-columns: minmax(0, 1fr); }
.wine-discovery label { display: grid; gap: var(--ui-pairing-small); min-width: 0; font-weight: var(--ui-weight-semibold); }
.wine-discovery input { box-sizing: border-box; width: 100%; min-width: 0; min-height: 50px; padding: var(--ui-pairing-small); border: 1px solid var(--ui-border-strong); border-radius: var(--ui-pairing-control-radius); background: var(--ui-field); color: var(--ui-text); font: inherit; }
.wine-discovery input:focus-visible, .wine-discovery summary:focus-visible { outline: 2px solid var(--ui-focus); outline-offset: 3px; }
.wine-discovery input:disabled { color: var(--ui-muted); }
.wine-discovery__actions { display: flex; flex-wrap: wrap; gap: var(--ui-pairing-small); margin-block-start: var(--ui-pairing-gap); }
.wine-discovery__status { color: var(--ui-brand); font-weight: var(--ui-weight-semibold); overflow-wrap: anywhere; }
.wine-discovery__option { margin-block: var(--ui-pairing-gap); padding: var(--ui-pairing-gap); border: 1px solid var(--ui-border); border-radius: var(--ui-pairing-panel-radius); background: var(--ui-surface); }
.wine-discovery summary { min-height: 44px; cursor: pointer; font-weight: var(--ui-weight-bold); overflow-wrap: anywhere; }
.wine-discovery__fields small { font-weight: var(--ui-weight-regular); color: var(--ui-muted); overflow-wrap: anywhere; }
.wine-discovery__sources { padding-inline-start: var(--ui-pairing-gap); overflow-wrap: anywhere; }
.wine-discovery__sources a { color: var(--ui-brand); }
.wine-discovery__editorial { display: grid; gap: var(--ui-pairing-gap); margin-block-start: var(--ui-pairing-gap); }
.wine-discovery__editorial p { margin: 0; }
.wine-discovery__editorial label { display: flex; align-items: flex-start; min-height: 44px; cursor: pointer; }
.wine-discovery__editorial input[type="checkbox"] { flex: 0 0 20px; inline-size: 20px; min-height: 20px; block-size: 20px; padding: 0; margin: 0; accent-color: var(--ui-brand); }
.wine-discovery__editorial .btn { justify-self: start; }
@media (min-width: 640px) { .wine-discovery__query, .wine-discovery__fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } .wine-discovery__query label:first-child { grid-column: 1 / -1; } }

/* Review of a late dossier does not reopen preparation controls. */
.wine-discovery__query[hidden], .wine-discovery__actions[hidden] { display: none; }
/* Profile progress uses one metric control and a touch-readable chart. */
.club-member-profile { box-sizing: border-box; }
.club-member-profile > * { min-width: 0; }
.member-evolution { margin-block: 32px; padding-block: 24px; border-top: 1px solid var(--ui-border); border-bottom: 1px solid var(--ui-border); }
.evolution-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.evolution-heading h3 { margin: 0; font-size: 1.05rem; font-weight: var(--ui-weight-semibold); }
.evolution-picker { position: relative; min-width: 0; }
.evolution-trigger { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--ui-brand); font: inherit; font-size: .9rem; font-weight: var(--ui-weight-medium); cursor: pointer; text-align: right; }
.evolution-chevron { width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); flex-shrink: 0; margin: 0 3px 4px 0; }
.evolution-trigger[aria-expanded="true"] .evolution-chevron { transform: rotate(225deg); margin-top: 5px; }
.evolution-menu { position: absolute; right: 0; top: calc(100% + 4px); width: min(260px, 75vw); z-index: 2; padding: 6px; border: 1px solid var(--ui-border); border-radius: 16px; background: var(--ui-surface); box-shadow: 0 12px 32px var(--ui-shadow); }
.evolution-menu[hidden] { display: none; }
.evolution-menu button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 48px; padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--ui-text); font: inherit; text-align: left; cursor: pointer; }
.evolution-menu button:nth-child(3) { border-top: 1px solid var(--ui-border); border-radius: 0; }
.evolution-menu button[aria-pressed="true"] { color: var(--ui-brand); background: var(--ui-surface-raised); }
.evolution-check { visibility: hidden; }
.evolution-menu button[aria-pressed="true"] .evolution-check { visibility: visible; }
.evolution-trigger:focus-visible, .evolution-menu button:focus-visible { outline: 2px solid var(--ui-brand); outline-offset: 3px; }
.evolution-trigger:active, .evolution-menu button:active { opacity: .65; }
.evolution-value { display: flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.evolution-value strong { font-size: 2.5rem; line-height: 1.1; letter-spacing: -.045em; font-weight: var(--ui-weight-semibold); }
.evolution-value > span { font-size: .9rem; color: var(--ui-muted); }
.evolution-date { margin: 8px 0 0; font-size: .85rem; color: var(--ui-muted); }
.evolution-change { margin: 8px 0 18px; min-height: 2.5em; font-size: .85rem; line-height: 1.4; color: var(--ui-muted); font-variant-numeric: tabular-nums; }
.evolution-plot { position: relative; }
.member-evolution svg { width: 100%; height: auto; display: block; overflow: visible; }
.evolution-grid { fill: none; stroke: var(--ui-border); stroke-width: .7; stroke-dasharray: 3 4; }
.evolution-tick { fill: var(--ui-muted); font-family: var(--ui-font-family); font-size: 11px; font-variant-numeric: tabular-nums; }
.evolution-line { fill: none; stroke: var(--ui-brand); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.evolution-point { fill: var(--ui-brand); stroke: var(--ui-surface); stroke-width: 2; }
.evolution-cursor { stroke: var(--ui-border-strong); stroke-width: 1; }
.evolution-scrubber { position: absolute; inset: 0 auto 0 0; width: 84%; height: 100%; margin: 0; opacity: 0; cursor: crosshair; touch-action: pan-y; }
.evolution-plot:focus-within { outline: 2px solid var(--ui-brand); outline-offset: 4px; border-radius: 6px; }
.evolution-dates { display: flex; justify-content: space-between; padding-right: 16%; margin-top: 4px; font-size: .75rem; color: var(--ui-muted); }
.evolution-hint { margin: 14px 0 0; font-size: .75rem; color: var(--ui-muted); }
.evolution-method { border: 0; padding: 0; margin-top: 8px; color: var(--ui-muted); font-size: .8rem; }
.evolution-method summary { min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 0; font-size: .8rem; font-weight: var(--ui-weight-regular); color: var(--ui-muted); cursor: pointer; }
.evolution-method summary::before { display: none; }
.evolution-method summary::after { content: ''; width: 5px; height: 5px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); }
.evolution-method[open] summary::after { transform: rotate(225deg); }
.evolution-method p { margin: 0; line-height: 1.5; }
.evolution-empty { min-height: 120px; display: grid; place-content: center; color: var(--ui-muted); }
@media (min-width: 700px) {
  .club-member-profile { padding-inline: max(32px, calc((100vw - 600px) / 2)); }
}

/* Guided preparation starts with a choice; research resumes open when a job exists. */
.host-discovery-choice { margin-block-start: var(--ui-pairing-small); }
.host-discovery-choice > summary { min-height: 44px; display: list-item; align-content: center; color: var(--ui-brand); font-weight: var(--ui-weight-semibold); cursor: pointer; }
.host-discovery-choice > summary:focus-visible { outline: 2px solid var(--ui-focus); outline-offset: 3px; }
.host-wine-wizard .host-wine-fields:not(:has(> .host-field:not([hidden]))) { display: none; }
.host-wine-wizard[data-wine-question="0"] .host-wine-edit { margin-block-start: 0; }
.profile-avatar { display: inline-grid; place-items: center; flex-shrink: 0; width: 32px; height: 32px; overflow: hidden; border-radius: 50%; background: var(--ui-brand-soft); color: var(--ui-brand); font-size: .75rem; font-weight: var(--ui-weight-semibold); }
.profile-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.profile-avatar--large { width: 64px; height: 64px; font-size: 1.25rem; }
.profile-avatar--hero { width: 72px; height: 72px; font-size: 1.4rem; margin-bottom: 14px; }
.taster-board-person { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: center; column-gap: 10px; }
.taster-board-identity { min-width: 0; }
.member-profile-title { display: flex; align-items: center; gap: 14px; min-width: 0; }
.member-profile-title h2 { margin: 0; overflow-wrap: anywhere; }
.profile-photo-current { display: flex; align-items: center; gap: 18px; }
.profile-photo-current h3 { margin: 0; font-size: 1rem; font-weight: var(--ui-weight-semibold); }
.profile-photo-action { min-height: 44px; padding: 0 12px 0 0; border: 0; background: transparent; color: var(--ui-brand); font: inherit; font-size: .9rem; cursor: pointer; }
.profile-photo-action[hidden] { display: none; }
.profile-photo-action:focus-visible { outline: 2px solid var(--ui-focus); outline-offset: 3px; }
.profile-photo-preview { display: block; width: 144px; height: 144px; border-radius: 50%; object-fit: cover; margin: 24px 0 16px; }
.profile-photo-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.profile-photo-status { margin: 12px 0 0; font-size: .9rem; line-height: 1.5; color: var(--ui-muted); }
.profile-photo-status:empty { display: none; }

.profile-avatar-empty { position: relative; width: 100%; height: 100%; }
.profile-avatar-empty::before { content: ''; position: absolute; width: 24%; height: 24%; border-radius: 50%; background: currentColor; left: 38%; top: 24%; }
.profile-avatar-empty::after { content: ''; position: absolute; width: 46%; height: 26%; border-radius: 50% 50% 20% 20%; background: currentColor; left: 27%; top: 55%; }
