:root {
  --gold: #F9AF36;
  --gold-light: #FDE8C4;
  --gold-dim: rgba(249,175,54,0.25);
  --dark: #0D0B08;
  --dark-2: #13100B;
  --dark-3: #1B1610;
  --dark-4: #231D15;
  --dark-5: #2C2419;
  --text: #F0E6D4;
  --heading: #FDE8C4;
  --muted: #D4C4A8;
  --border: #5C3D1A;
  --border-2: #3A2612;
  --amber: #E07B00;
  --red: #E05040;
  --red-light: #FDE8C4;
  --green: #27ae60;
  --allocated: #9A3E5C;
  --new-arrival: #4A8C70;
  --text-1: #F0E6D4;
  --text-2: #D6C8AE;
  --dark-1: #0D0B08;
  --border-1: #3A2612;
  --sentinel-bronze: #5C3D1A;
  --club-wine: #E07B00;
  --recommended: #7B68EE;
  --rewards: #5CA082;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

body {
  background: var(--dark);
  color: var(--text);
  font-family: system-ui, -apple-system, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Header */
header {
  background: var(--dark);
  position: relative;
}

.header-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 16px 0;
}

.header-logo {
  height: 40px;
  width: auto;
}

.header-expanded {
  padding: 4px 16px 16px;
  text-align: center;
}

/* Profile Button */
.profile-btn {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none; border: none; color: var(--muted);
  cursor: pointer; padding: 6px; border-radius: 50%;
  transition: color 0.2s;
  flex-shrink: 0;
}
.profile-btn:hover, .profile-btn.active { color: var(--gold); }
.profile-btn.logged-in { color: var(--gold); }

/* Profile Panel */
.profile-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 370px; max-width: 90vw; z-index: 10000;
  background: var(--dark-2); border-left: 1px solid var(--border-2);
  box-shadow: -4px 0 20px rgba(0,0,0,0.5);
  transform: translateX(100%); transition: transform 0.25s ease;
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.profile-panel.open { transform: translateX(0); }
.profile-panel-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 16px 16px; border-bottom: 1px solid var(--border-2);
}
.profile-panel-title {
  font-family: Georgia, serif; font-size: 18px; color: var(--gold-light);
  letter-spacing: 0.05em;
}
.profile-panel-close {
  background: none; border: none; color: var(--muted);
  font-size: 24px; cursor: pointer; padding: 4px 8px;
}
.profile-panel-close:hover { color: var(--gold); }

#profile-panel-body { padding: 16px; flex: 1; }

/* Profile panel form elements */
.profile-greeting {
  font-family: Georgia, serif; font-size: 20px; color: var(--gold);
  margin-bottom: 16px;
}
.profile-section {
  margin-bottom: 20px;
}
.profile-section-title {
  font-family: Georgia, serif; font-size: 13px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 8px; padding-bottom: 4px;
  border-bottom: 1px solid var(--border-2);
}
.profile-name-row {
  display: flex; gap: 12px;
}
.profile-name-row .profile-field { flex: 1; min-width: 0; }
.profile-status-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.profile-status-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 3px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
}
.profile-status-badge.badge-staff {
  background: rgba(160,155,145,0.12); border: 1px solid rgba(160,155,145,0.35); color: #A09B91;
}
.profile-status-badge.badge-insider {
  background: rgba(100,140,200,0.12); border: 1px solid rgba(100,140,200,0.3); color: #6A8EC8;
}
/* C33 badge colors — shared by profile panel + header */
.badge-c33 {
  background: rgba(180,130,70,0.12); border: 1px solid rgba(180,130,70,0.3); color: #C4944A;
}
.badge-c33-inactive {
  background: rgba(180,130,70,0.06); border: 1px solid rgba(180,130,70,0.18); color: #9A7E50;
}
.profile-status-badge.badge-rewards {
  background: rgba(92,160,130,0.12); border: 1px solid rgba(92,160,130,0.3); color: var(--rewards);
}
.profile-rewards-enroll {
  margin-bottom: 14px;
}
.profile-rewards-enroll .profile-toggle {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  font-size: 13px; color: var(--text-secondary, var(--muted));
}
.profile-rewards-enroll .profile-toggle input { accent-color: var(--gold); }
.profile-field { margin-bottom: 12px; }
.profile-field label {
  display: block; font-size: 12px; color: var(--muted);
  margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.05em;
}
.profile-field input {
  width: 100%; padding: 10px 12px; background: var(--dark-3);
  border: 1px solid var(--border-2); border-radius: 4px;
  color: var(--text); font-size: 14px; font-family: inherit;
}
.profile-field input:focus {
  outline: none; border-color: var(--gold);
}
.profile-toggle {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; cursor: pointer;
}
.profile-toggle input[type="checkbox"] {
  accent-color: var(--gold); width: 18px; height: 18px; cursor: pointer;
}
.profile-toggle-label {
  font-size: 14px; color: var(--text); cursor: pointer;
}

/* Opt-in pill selector (used in signup modal + profile panel) */
.opt-in-selector { padding: 8px 0; }
.opt-in-label {
  display: block; font-size: 13px; color: var(--muted);
  margin-bottom: 8px;
}
.opt-in-pills { display: flex; gap: 0; }
.opt-pill {
  flex: 1; padding: 10px 0; border: 1px solid var(--border-2);
  background: var(--dark-3); color: var(--muted);
  font-size: 13px; font-weight: 600; font-family: Georgia, serif;
  letter-spacing: 0.04em; cursor: pointer;
  transition: all 0.2s ease;
}
.opt-pill:first-child { border-radius: 4px 0 0 4px; border-right: none; }
.opt-pill:last-child { border-radius: 0 4px 4px 0; }
.opt-pill.active {
  background: rgba(249,175,54,0.15); color: var(--gold);
  border-color: var(--gold-dim);
}
.opt-pill.active::before {
  content: '\2713\00a0';
}
.opt-pill:first-child.active { border-right: none; }
.opt-pill:last-child.active { border-left-color: var(--gold-dim); }
.opt-pill:active { transform: scale(0.97); }
.opt-in-hint {
  display: block; font-size: 11px; color: var(--muted);
  margin-top: 6px; font-style: italic;
}
.comm-pref-section { padding: 10px 0 4px; }
.comm-pref-toggle {
  display: flex; align-items: center; gap: 8px; padding: 7px 0;
  font-size: 13px; color: var(--text-primary); cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.comm-pref-toggle:last-child { border-bottom: none; }
.comm-pref-toggle input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--gold);
  cursor: pointer; flex-shrink: 0;
}

.profile-save-btn {
  width: 100%; padding: 12px; margin-top: 8px;
  background: var(--gold); color: var(--dark); border: none;
  border-radius: 4px; font-size: 15px; font-weight: 600;
  font-family: Georgia, serif; cursor: pointer;
  transition: opacity 0.2s;
}
.profile-save-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.profile-save-btn.saved { background: #27ae60; color: #fff; }
.profile-signin-btn {
  width: 100%; padding: 12px; margin-top: 12px;
  background: var(--gold); color: var(--dark); border: none;
  border-radius: 4px; font-size: 15px; font-weight: 600;
  font-family: Georgia, serif; cursor: pointer;
}
.profile-signout-btn {
  width: 100%; padding: 10px; margin-top: 24px;
  background: none; color: var(--muted); border: 1px solid var(--border-2);
  border-radius: 4px; font-size: 13px; cursor: pointer;
  font-family: Georgia, serif;
}
.profile-signout-btn:hover { color: var(--red); border-color: var(--red); }
.profile-stats {
  display: flex; gap: 16px; margin-bottom: 16px;
}
.profile-stat {
  flex: 1; text-align: center; padding: 12px 8px;
  background: var(--dark-3); border-radius: 6px;
  border: 1px solid var(--border-2);
}
.profile-stat-val {
  font-family: Georgia, serif; font-size: 22px; color: var(--gold);
  display: block;
}
.profile-stat-label {
  font-size: 11px; color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.05em; margin-top: 2px;
}
.profile-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4); z-index: 9999;
  display: none;
}
.profile-overlay.open { display: block; }

/* Phone/Email verified field display */
.profile-verified-field {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0;
}
.profile-verified-val { font-size: 14px; color: var(--text); }
.profile-change-btn {
  background: none; border: 1px solid var(--border-2); color: var(--gold);
  border-radius: 4px; padding: 4px 12px; font-size: 12px; cursor: pointer;
  font-family: Georgia, serif;
}
.profile-change-btn:hover { border-color: var(--gold-dim); }
.profile-change-form { margin-top: 4px; }
.profile-verify-row { margin: 8px 0; }
.profile-verify-btn {
  background: var(--gold); color: var(--dark); border: none;
  border-radius: 4px; padding: 6px 14px; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: Georgia, serif;
}
.profile-verify-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.profile-code-row { display: flex; gap: 8px; align-items: center; }
.profile-code-row input { flex: 1; }
.profile-cancel-btn {
  background: none; border: none; color: var(--muted);
  font-size: 12px; cursor: pointer; padding: 6px 0; margin-top: 4px;
  font-family: Georgia, serif; text-decoration: underline;
}
.profile-cancel-btn:hover { color: var(--text); }
.profile-rewards-status { padding: 10px 0; }
.profile-rewards-active { color: #4A8C70; font-size: 14px; font-weight: 600; }


.wm-line2 {
  font-family: Georgia, serif;
  font-size: 28px;
  color: var(--gold-light);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin: 4px 0;
}

.divider {
  height: 1px;
  background: var(--gold-dim);
  width: 40px;
  margin: 8px auto;
}

.meta-line {
  font-size: 14px;
  color: var(--muted);
}
/* Header C33 member badge */
.header-member-badge { margin-bottom: 6px; text-align: center; }
.header-c33-chip {
  display: inline-block; font-size: 10px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 3px;
}
/* badge-c33 / badge-c33-inactive colors inherited from shared rules above */
.meta-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 0;
}
.meta-stats .stat-item {
  white-space: nowrap;
}
.meta-stats .stat-sep {
  margin: 0 6px;
  opacity: 0.5;
}
@media (max-width: 480px) {
  .meta-stats {
    gap: 2px 0;
  }
  .meta-stats .stat-sep {
    display: none;
  }
  .meta-stats .stat-item {
    flex: 0 0 50%;
    text-align: center;
    padding: 1px 0;
  }
}

/* Tabs */
.tabs {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  padding: 0 4px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--dark);
  border-bottom: 1px solid var(--border);
}

.tab {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  background: transparent;
  border: 1px solid var(--border);
  border-bottom: 2px solid transparent;
  color: var(--text);
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  padding: 0 2px;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

@media (max-width: 479px) {
  .tab { flex: 1 1 45%; }
}

@media (min-width: 375px) {
  .tab { font-size: 14px; }
}

@media (min-width: 480px) {
  .tabs { flex-wrap: nowrap; }
}

.tab.active { color: var(--gold); border-bottom-color: var(--gold); background: rgba(249, 175, 54, 0.12); }
.tab:active { color: var(--gold); }

/* Room toggle */
#room-title { position: relative; display: inline-block; }
.room-arrow { position: absolute; right: -18px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--gold); }
#room-title:active { opacity: 0.7; }

/* Toolbar */
.toolbar {
  padding: 16px;
  background: var(--dark-2);
  position: sticky;
  top: 45px;
  z-index: 90;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 -60px 0 0 var(--dark-2);
}

.search-wrapper {
  position: relative;
  margin-bottom: 12px;
}
.search-bar {
  width: 100%;
  height: 44px;
  background: var(--dark-3);
  border: 1px solid var(--border-2);
  color: var(--text);
  font-family: Arial, sans-serif;
  font-size: 16px;
  padding: 0 72px 0 16px;
  border-radius: 4px;
  box-sizing: border-box;
}
.search-bar:focus { outline: none; border-color: var(--gold); }
.search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-2);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  display: none;
}
.search-clear:hover { color: var(--text); }

/* Barcode Scanner */
.scan-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--gold);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}
.scan-btn:hover, .scan-btn:active { opacity: 1; }

.barcode-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 13, 12, 0.97);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.barcode-overlay.hidden { display: none; }
.barcode-overlay-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  box-sizing: border-box;
}
.barcode-overlay-title {
  font-family: Georgia, serif;
  font-size: 18px;
  color: var(--gold);
  letter-spacing: 0.05em;
}
.barcode-overlay-close {
  background: none;
  border: none;
  color: var(--text);
  font-size: 28px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}
#barcode-reader {
  width: 100%;
  max-width: 500px;
  margin-top: 24px;
  padding: 0 16px;
  box-sizing: border-box;
}
#barcode-reader video { border-radius: 8px; border: 2px solid var(--gold-dim); }
#barcode-reader__scan_region { background: var(--dark) !important; }
#barcode-reader__dashboard { display: none !important; }
#barcode-reader__header_message { display: none !important; }

.barcode-status {
  margin-top: 16px;
  padding: 12px 20px;
  font-size: 15px;
  color: var(--muted);
  text-align: center;
  min-height: 44px;
}
.barcode-status.found { color: var(--new-arrival); font-weight: 600; }
.barcode-status.not-found { color: var(--red, #c44); }

.chip-scroll-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding-bottom: 4px;
}

.filter-chip {
  flex: 1 1 auto;
  text-align: center;
  background: var(--dark-3);
  border: 1px solid var(--border-2);
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-family: Arial, sans-serif;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}
.filter-chip.active {
  background: rgba(249, 175, 54, 0.10);
  color: var(--gold);
  border-color: var(--gold);
}
/* Even-grid layout for Other subcategory chips */
.chip-scroll-container.wrap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.chip-scroll-container.wrap-grid .filter-chip {
  flex: none;
}

/* Secondary badge filter chips */
.badge-filter-label {
  font-size: 14px;
  font-family: Georgia, serif;
  font-style: italic;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  align-self: center;
  flex: 0 0 auto;
  width: 100%;
}
.badge-chip {
  background: transparent;
  border: 1px solid var(--border-2);
  border-left: 3px solid var(--border-2);
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-family: Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0.85;
  flex: 1 1 calc(33.33% - 6px);
  max-width: calc(33.33% - 4px);
  text-align: center;
}
.badge-chip:hover { opacity: 1; }
.badge-chip.active {
  background: rgba(249, 175, 54, 0.12);
  color: var(--gold);
  border-color: var(--gold);
  opacity: 1;
}
/* Color-coded left borders matching bottle card indicators */
.badge-chip[data-badge="Allocated"] { border-left-color: var(--allocated); }
.badge-chip[data-badge="Final Pours"] { border-left-color: var(--red); }
.badge-chip[data-badge="Latest Addition"] { border-left-color: var(--new-arrival); }
.badge-chip[data-badge="Limited"] { border-left-color: var(--amber); }
.badge-chip[data-badge="Sentinel Pick"] { border-left-color: var(--gold); }
.badge-chip[data-badge="Fan Favorite"] { border-left-color: var(--gold); }
.badge-chip[data-badge="Trending"] { border-left-color: var(--new-arrival); }
.badge-chip.active[data-badge="Allocated"] { border-color: var(--allocated); color: var(--allocated); background: rgba(158, 64, 96, 0.12); }
.badge-chip.active[data-badge="Final Pours"] { border-color: var(--red); color: var(--red); background: rgba(193, 48, 48, 0.12); }
.badge-chip.active[data-badge="Latest Addition"] { border-color: var(--new-arrival); color: var(--new-arrival); background: rgba(74, 140, 112, 0.12); }
.badge-chip.active[data-badge="Limited"] { border-color: var(--amber); color: var(--amber); background: rgba(234, 129, 7, 0.12); }
.badge-chip.active[data-badge="Sentinel Pick"] { border-color: var(--gold); color: var(--gold); background: rgba(249, 175, 54, 0.12); }
.badge-chip.active[data-badge="Fan Favorite"] { border-color: var(--gold); color: var(--gold); background: rgba(249, 175, 54, 0.12); }
.badge-chip.active[data-badge="Trending"] { border-color: var(--new-arrival); color: var(--new-arrival); background: rgba(74, 140, 112, 0.12); }
.badge-chip[data-badge="Recommended"] { border-left-color: var(--recommended); }
.badge-chip.active[data-badge="Recommended"] { border-color: var(--recommended); color: var(--recommended); background: rgba(123, 104, 238, 0.12); }

/* Recommendation reasoning on card */
.b-reco-reason {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-family: Georgia, serif;
  font-style: italic;
  color: var(--recommended);
  margin-top: 8px;
  padding: 6px 10px;
  background: rgba(123, 104, 238, 0.08);
  border-left: 2px solid rgba(123, 104, 238, 0.4);
  border-radius: 2px;
}
.b-reco-reason svg { flex-shrink: 0; stroke: var(--recommended); }

@media (min-width: 601px) {
  .toolbar.cocktail-mode { display: none; }
}

@media (max-width: 600px) {
  .toolbar.cocktail-mode { padding: 12px 16px; }
}

/* Banners */
.notice-banner {
  background: var(--dark-2);
  border-bottom: 1px solid var(--border-2);
  border-top: 1px solid var(--border-2);
  color: var(--gold-light);
  padding: 12px 16px;
  font-size: 16px;
  text-align: center;
  line-height: 1.4;
  position: relative;
  z-index: 95;
}

.banner-sig {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.legend { display: none; }

/* Bottle List */
.bottle-list { display: flex; flex-direction: column; }

.category-divider {
  background: var(--dark-3);
  padding: 12px 16px;
  font-family: Georgia, serif;
  font-size: 18px;
  color: var(--gold);
  letter-spacing: 0.1em;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: var(--divider-top, 140px);
  z-index: 80;
}

.category-count { font-family: Arial, sans-serif; font-size: 14px; color: var(--muted); }

.bottle-row {
  display: flex;
  position: relative;
  padding: 16px 16px 16px 20px;
  border-bottom: 1px solid var(--border-2);
  background: var(--dark-3);
  cursor: pointer;
  transition: transform 0.15s ease;
  scroll-margin-top: var(--sticky-offset, 200px);
}
#bottle-container, #food-container {
  scroll-margin-top: var(--sticky-offset, 200px);
}
.bottle-row:active { background: var(--dark-4); transform: scale(0.995); }
/* Collapsed card — show 1-line description preview, hide detail sections */
.bottle-row .b-desc { -webkit-line-clamp: 1; }
.bottle-row .b-desc-section,
.bottle-row .flavor-label,
.bottle-row .b-flavor-tags,
.bottle-row .b-location {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.25s ease;
}
.bottle-row .b-standout {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bottle-row.expanded .b-standout { -webkit-line-clamp: unset; }
/* Expanded card — reveal full description + detail sections */
.bottle-row.expanded .b-desc { -webkit-line-clamp: unset; }
.bottle-row.expanded .b-desc-section,
.bottle-row.expanded .flavor-label,
.bottle-row.expanded .b-flavor-tags,
.bottle-row.expanded .b-location {
  max-height: 500px;
  opacity: 1;
}
/* Expand chevron indicator */
.expand-chevron {
  position: absolute;
  right: 16px;
  top: 18px;
  color: var(--muted);
  font-size: 14px;
  transition: transform 0.2s ease;
}
.bottle-row.expanded .expand-chevron { transform: rotate(180deg); }
/* First-visit toast banner */
.tap-toast {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--dark-4);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 16px;
  margin: 8px 16px;
  font-size: 13px;
  color: var(--muted);
  animation: toastFadeIn 0.4s ease;
}
.tap-toast .toast-close {
  cursor: pointer;
  opacity: 0.6;
  font-size: 16px;
  margin-left: 8px;
  padding: 0 4px;
}
.tap-toast .toast-close:hover { opacity: 1; }
@keyframes toastFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.bottle-row.s-final { background: rgba(193, 48, 48, 0.06); }
.bottle-row.s-allocated { background: rgba(158, 64, 96, 0.06); }

.stripe {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--border-2);
}
.s-final .stripe { background: var(--red); }
.s-collective .stripe { background: var(--club-wine); }
.s-new-arrival .stripe { background: var(--new-arrival); }
.s-allocated .stripe { background: var(--allocated); }
.s-limited .stripe { background: var(--amber); }
.s-sentinel-pick .stripe { background: var(--gold); }

/* Cocktail specific stripes */
.s-of-row .stripe { background: var(--amber); }
.s-hc-row .stripe { background: var(--gold); }

.bottle-content { width: 100%; display: flex; flex-direction: column; gap: 4px; }

.row-top { display: flex; align-items: flex-start; gap: 12px; }

.b-name {
  font-family: Georgia, serif;
  font-size: 22px;
  color: var(--heading);
  line-height: 1.1;
  flex: 1;
}

.b-price {
  font-family: Georgia, serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--gold-light);
  white-space: nowrap;
  margin-left: auto;
  flex-shrink: 0;
}

/* Size/Price variation widget */
.b-price-sizes {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
}
.b-price-sizes .b-price {
  margin-left: 0;
  font-size: 14px;
}
.b-size-label {
  font-family: Georgia, serif;
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0.3px;
}
.size-toggle-icon {
  font-size: 9px;
  color: var(--gold);
  transition: transform 0.2s ease;
  line-height: 1;
  margin-left: 2px;
}
.b-price-sizes.sizes-open .size-toggle-icon {
  transform: rotate(180deg);
}
.b-size-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--dark-4);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 0;
  min-width: 150px;
  z-index: 20;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  margin-top: 4px;
}
.b-price-sizes.sizes-open .b-size-dropdown {
  display: flex;
  flex-direction: column;
}
.b-size-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-family: Georgia, serif;
  font-size: 13px;
  color: var(--gold-light);
  padding: 7px 14px;
  white-space: nowrap;
}
.b-size-option .sz-label {
  color: var(--muted);
  font-size: 11px;
}
.b-size-option .sz-price {
  font-weight: 700;
}

.b-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  align-items: center;
}
.b-chip-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.b-tried-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  align-items: center;
}
.b-chip-actions {
  margin-left: auto;
  display: flex;
  gap: 6px;
}

.b-meta {
  font-size: 14px;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.b-distillery-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
}
.b-distillery {
  font-size: 14px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.b-distillery .loc-sep {
  margin: 0 5px;
  color: var(--gold);
  opacity: 0.5;
}
.b-distillery .loc {
  color: var(--text-2);
}
.b-distillery-link {
  color: var(--text-2);
  text-decoration: none;
  border-bottom: 1px dotted rgba(249,175,54,0.3);
  transition: color 0.2s, border-color 0.2s;
}
.b-distillery-link:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}
.b-rewards {
  font-size: 12px;
  color: var(--amber);
  text-align: right;
  margin-top: 1px;
}
a.b-rewards { text-decoration: none; font-size: 13px; color: var(--gold); margin-left: auto; white-space: nowrap; }
a.b-rewards:hover { text-decoration: underline; }

.badge {
  border: 1px solid var(--border-2);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}
.badge.final { color: var(--heading); background: var(--red); border-color: var(--red); }
.badge.open { color: var(--gold); border-color: rgba(249, 175, 54, 0.4); background: rgba(249, 175, 54, 0.1); }
.badge.allocated { color: var(--heading); background: var(--allocated); border-color: var(--allocated); }
.badge.limited { color: var(--dark); background: var(--amber); border-color: var(--amber); }
.badge.vault { color: var(--dark); background: var(--amber); border-color: var(--amber); }
.badge.sentinel-pick { color: var(--dark); background: var(--gold); border-color: var(--gold); }
.badge.collective-33 { color: var(--gold); border-color: var(--gold); background: transparent; }
.badge.new-arrival { color: var(--heading); background: var(--new-arrival); border-color: var(--new-arrival); }
.badge.clarified { color: var(--heading); background: #4A7C8C; border-color: #4A7C8C; }
.badge.unavailable { color: var(--muted); background: transparent; border-color: var(--muted); font-style: italic; }
.badge.fan-favorite { color: #F9AF36; background: rgba(249,175,54,0.12); border-color: rgba(249,175,54,0.4); }
.badge.trending { color: #4A8C70; background: rgba(74,140,112,0.12); border-color: rgba(74,140,112,0.4); }
.unavailable-row { opacity: 0.6; }

.pour-prog { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.pour-bar { flex: 1; height: 4px; background: var(--dark-4); border-radius: 2px; overflow: hidden; display: flex; justify-content: flex-end; }
.pour-fill { height: 100%; border-radius: 2px; transition: width 0.4s, background 0.4s; background: var(--gold-dim); }
.pour-fill.low { background: var(--red); }
.pour-text { font-size: 13px; color: var(--muted); white-space: nowrap; }

.b-desc {
  font-size: 15px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 8px;
  cursor: pointer;
  min-height: 24px;
  line-height: 1.6;
}
.b-desc.expanded { -webkit-line-clamp: unset; }

.b-flavor-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.b-flavor-tag {
  font-size: 11px;
  letter-spacing: 0.4px;
  color: var(--gold);
  background: rgba(191, 155, 81, 0.1);
  border: 1px solid rgba(191, 155, 81, 0.25);
  border-radius: 4px;
  padding: 3px 10px;
  white-space: nowrap;
  text-transform: lowercase;
}

.b-standout {
  font-size: 14px;
  color: var(--text);
  margin-top: 10px;
  line-height: 1.5;
}
.b-readmore {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--gold);
  cursor: pointer;
  letter-spacing: 0.02em;
}
.bottle-row.expanded .b-readmore { display: none; }
.section-label {
  display: block;
  font-family: Georgia, serif;
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.b-desc-section {
  margin-top: 10px;
}
.flavor-label {
  margin-top: 10px;
}
.b-standout .standout-label {
  display: block;
  font-family: Georgia, serif;
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

/* Bottle location reference */
.b-location {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.b-location .loc-tag {
  font-size: 10px;
  font-family: monospace;
  color: var(--muted);
  background: var(--dark-2);
  border: 1px solid var(--border-2);
  border-radius: 3px;
  padding: 2px 6px;
  letter-spacing: 0.03em;
  opacity: 0.7;
}
.b-location .loc-label {
  color: var(--gold);
  margin-right: 2px;
}

/* Cocktails Grid */
.cocktail-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding: 24px 16px;
  width: 100%;
  grid-column: 1 / -1;
}
.cocktail-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cocktail-col-header {
  font-family: Georgia, serif;
  font-size: 22px;
  color: var(--gold);
  border-bottom: 1px solid var(--border-2);
  padding-bottom: 8px;
  margin-bottom: 8px;
  text-align: center;
  letter-spacing: 0.05em;
}

.cocktail-chips { display: none; gap: 12px; }
.cocktail-chips.active { display: flex; }
.c-chip {
  flex: 1; height: 44px; border-radius: 4px; background: var(--dark-3); border: 1px solid var(--border-2); color: var(--gold-light);
  font-size: 15px; font-weight: 500; font-family: Arial, sans-serif; cursor: pointer; display: flex; align-items: center; justify-content: center;
}

/* Lounge cocktail/OF card grid — 2 cols desktop, 1 col mobile */
.lounge-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px;
  grid-column: 1 / -1;
}
@media (max-width: 600px) {
  .cocktail-columns { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 767px) {
  .lounge-card-grid { grid-template-columns: 1fr; gap: 5px; padding: 0; }
}

/* Flight Stripe */
.s-flight .stripe { background: var(--gold-dim); }

/* Lounge Whiskey Sub-tabs */
.sub-tabs {
  display: flex; gap: 8px; padding: 8px 16px;
  background: var(--dark-2); border-bottom: 1px solid var(--border);
}
.sub-tab {
  padding: 6px 16px; border-radius: 4px; border: 1px solid var(--border);
  background: transparent; color: var(--muted); font-size: 13px;
  font-family: Arial, sans-serif; cursor: pointer; transition: all 0.15s ease;
}
.sub-tab.active {
  background: rgba(249, 175, 54, 0.10); border-color: var(--gold-dim); color: var(--gold);
}

/* C33 Join Banner */
.c33-join-banner {
  background: linear-gradient(135deg, rgba(196, 148, 74, 0.08), rgba(196, 148, 74, 0.04));
  border: 1px solid var(--gold-dim); border-radius: 4px;
  margin: 8px 16px; padding: 12px 16px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 13px; color: var(--gold); line-height: 1.4;
  text-align: center; flex-wrap: wrap;
}
.c33-join-banner a {
  color: var(--gold-light); text-decoration: underline; white-space: nowrap; font-weight: 600;
}

/* Club Pours Overlay Blurb */
.club-pours-blurb {
  font-size: 15px; color: var(--gold); line-height: 1.5;
  padding: 16px 16px 8px; text-align: center;
}

/* Profile C33 Section */
.profile-c33-section { padding: 12px; margin-bottom: 20px; background: rgba(249, 175, 54, 0.06); border: 1px solid var(--gold); border-radius: 6px; }
.profile-c33-section .profile-section-title { color: var(--gold); }
.profile-c33-desc { font-size: 13px; color: var(--muted); line-height: 1.5; margin: 6px 0 12px; }
.profile-c33-join {
  display: block; text-align: center; padding: 10px;
  background: rgba(249, 175, 54, 0.10); color: var(--gold-light); border: 1px solid var(--gold-dim);
  border-radius: 4px; text-decoration: none; font-weight: 600; font-size: 14px;
  transition: all 0.15s ease;
}
.profile-c33-join:hover { background: rgba(249, 175, 54, 0.20); border-color: var(--gold); }

/* C33 gift membership banner in profile panel */
.profile-c33-gift-banner {
  display: flex; align-items: center; gap: 12px; padding: 12px;
  background: rgba(249,175,54,0.08); border: 1px solid var(--border-2);
  border-radius: 4px; margin-bottom: 12px;
}

/* C33 membership details — year, term, benefit balance */
.profile-c33-details { margin: 6px 0 12px; }
.profile-c33-loading { font-size: 12px; color: var(--muted); padding: 4px 0; }
.profile-c33-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.profile-c33-tag {
  font-size: 11px; color: var(--gold);
  background: rgba(249,175,54,0.12); border: 1px solid rgba(249,175,54,0.25);
  border-radius: 3px; padding: 2px 8px; letter-spacing: 0.03em;
}
.profile-c33-benefit { margin-bottom: 8px; }
.profile-c33-benefit-header {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 5px;
}
.profile-c33-benefit-name {
  font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.profile-c33-benefit-count { font-size: 13px; color: var(--gold-light); font-family: Georgia, serif; }
.profile-c33-bar {
  height: 4px; background: rgba(249,175,54,0.15); border-radius: 2px; overflow: hidden;
}
.profile-c33-bar-fill {
  height: 100%; background: var(--gold); border-radius: 2px; transition: width 0.4s ease;
}
.profile-c33-benefit-reset { font-size: 11px; color: var(--muted); margin-top: 3px; }
.profile-c33-manage-link {
  display: block; width: 100%; margin-top: 6px; padding: 4px 0;
  background: none; border: none; text-align: center;
  font-size: 12px; color: var(--muted); cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px; font-family: inherit;
}
.profile-c33-manage-link:hover { color: var(--text-2); }

/* Collective 33 (club pours overlay) */
.club-card { background: var(--dark-2); border: 1px solid var(--border-2); padding: 20px; border-radius: 4px; }
.club-name { font-family: Georgia, serif; font-size: 22px; color: var(--heading); margin-bottom: 8px; }

/* Old club CTA styles removed — CTA now in profile panel and join banner */


@media (max-width: 767px) {
  .bottle-row { margin-bottom: 5px; border-bottom: none; }
}
@media (min-width: 768px) {
  .bottle-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 16px; }
  .category-divider { grid-column: 1 / -1; margin: 0 -16px; }
  .bottle-row { border: 1px solid var(--border); border-radius: 4px; }
}
@media (min-width: 1200px) { .bottle-list { grid-template-columns: 1fr 1fr 1fr; } }
/* PWA Install Banner */
.install-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(145deg, #F9AF36, #D4912A);
  border-top: 2px solid #FBCA5E;
  padding: 24px 20px 28px;
  z-index: 9999;
}
.install-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  color: rgba(15, 13, 12, 0.5);
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}
.install-title {
  font-family: Georgia, serif;
  font-size: 18px;
  color: var(--dark);
  line-height: 1.3;
  margin-bottom: 8px;
  text-align: center;
  font-weight: 700;
}
.install-desc {
  font-size: 14px;
  color: var(--dark-4);
  line-height: 1.5;
  margin-bottom: 16px;
  text-align: center;
}
.install-btn {
  display: block;
  width: 100%;
  background: var(--dark);
  color: var(--gold-light);
  border: none;
  border-radius: 4px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  text-align: center;
}
.install-btn:hover {
  background: var(--dark-3);
}
.install-ios-hint {
  font-size: 14px;
  color: var(--dark);
  line-height: 1.5;
  text-align: center;
}
.install-ios-hint strong {
  color: var(--dark);
}

/* Tried-It Toggle */
.tried-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
  border: 1px solid var(--gold);
  border-radius: 4px;
  background: rgba(249, 175, 54, 0.12);
  min-height: 44px;
  font: inherit;
}
.tried-toggle svg {
  display: block;
  flex-shrink: 0;
}
.tried-label {
  font-size: 11px;
  font-family: Arial, sans-serif;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--gold);
}
.tried-toggle circle {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.5;
}
.tried-toggle .check-path {
  fill: none;
  stroke: var(--gold);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.tried-toggle.tried {
  background: var(--gold);
  border-color: var(--gold);
}
.tried-toggle.tried circle {
  fill: rgba(15, 13, 12, 0.15);
  stroke: var(--dark);
  stroke-width: 2;
}
.tried-toggle.tried .check-path {
  opacity: 1;
  stroke: var(--dark);
  stroke-width: 2.5;
}
.tried-toggle.tried .tried-label {
  color: var(--dark);
  font-weight: 700;
}
.tried-toggle:active {
  transform: scale(0.9);
}

/* Purchased/explored date label for POS-sourced tastings */
.tried-date {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-family: Georgia, serif;
  font-style: italic;
  margin-top: 4px;
  white-space: nowrap;
}

/* Rating Slider Row */
.rating-inline {
  display: none;
  align-items: center;
  margin-left: 6px;
}
.rating-inline:not(.hidden) {
  display: inline-flex;
}
.star-group {
  display: inline-flex;
  gap: 0;
}
.star-btn {
  background: none;
  border: none;
  padding: 2px;
  cursor: pointer;
  min-width: 28px;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: transform 0.15s ease;
  position: relative;
}
.star-btn:active {
  transform: scale(1.2);
}
.star-btn svg {
  pointer-events: none;
}
/* Half-star click targets — invisible overlays on left/right halves */
.star-half {
  position: absolute;
  top: 0;
  height: 100%;
  width: 50%;
  z-index: 1;
  cursor: pointer;
}
.star-half-left { left: 0; }
.star-half-right { right: 0; }

/* Community Rating */
.comm-rating {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 4px 0 2px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.25s ease;
}
.bottle-row.expanded .comm-rating {
  max-height: 60px;
  opacity: 1;
}
.comm-rating-locked {
  font-style: italic;
}
.comm-locked-text {
  font-size: 12px;
  color: var(--muted);
}
.comm-stars {
  display: inline-flex;
  gap: 1px;
}
.comm-star {
  display: inline-flex;
  position: relative;
  line-height: 0;
}
.comm-star.half svg:first-child { fill: none; }
.comm-star-half {
  position: absolute;
  left: 0;
  top: 0;
}
.comm-avg {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  font-family: Georgia, serif;
}
.comm-count {
  font-size: 11px;
  color: var(--muted);
  font-family: Georgia, serif;
}

/* Customer Identity Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 13, 12, 0.92);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-card {
  background: var(--dark-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px 24px;
  max-width: 360px;
  width: 100%;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}
.modal-title {
  font-family: Georgia, serif;
  font-size: 20px;
  color: var(--gold);
  margin-bottom: 8px;
  text-align: center;
}
.modal-desc {
  font-size: 14px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.5;
}
.modal-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
  margin-top: 12px;
}
.modal-input {
  width: 100%;
  height: 44px;
  background: var(--dark-4);
  border: 1px solid var(--border-2);
  color: var(--text);
  font-family: Arial, sans-serif;
  font-size: 16px;
  padding: 0 14px;
  border-radius: 4px;
  box-sizing: border-box;
}
.modal-input:focus { outline: none; border-color: var(--gold); }
.modal-error {
  color: var(--red);
  font-size: 13px;
  margin-top: 8px;
  text-align: center;
}
.modal-submit {
  display: block;
  width: 100%;
  margin-top: 20px;
  background: var(--gold);
  color: var(--dark);
  border: none;
  border-radius: 4px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.modal-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.modal-submit:not(:disabled):hover {
  opacity: 0.9;
}

/* Modal step visibility */
.modal-step { }
.modal-step.hidden { display: none; }

/* Back button in modal steps */
.modal-back {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--gold);
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  margin-bottom: 16px;
  font-family: inherit;
}
.modal-back svg { flex-shrink: 0; }
.modal-back:hover { opacity: 0.8; }

/* "New here?" and "Resend" links */
.modal-create-link,
.modal-resend-link {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 28px;
  cursor: pointer;
}
.modal-create-link strong,
.modal-resend-link strong {
  color: var(--gold);
}
.modal-create-link:hover strong,
.modal-resend-link:hover strong {
  text-decoration: underline;
}

/* Un-try confirmation modal */
.untry-modal { max-width: 320px; text-align: center; }
.untry-modal .modal-desc { margin-bottom: 20px; }
.untry-modal-actions {
  display: flex; gap: 10px;
}
.untry-cancel {
  flex: 1; padding: 10px 0; border-radius: 6px; font-size: 14px; font-weight: 600;
  cursor: pointer; border: none; background: var(--gold); color: var(--dark);
}
.untry-cancel:hover { opacity: 0.9; }
.untry-confirm {
  flex: 1; padding: 10px 0; border-radius: 6px; font-size: 14px; font-weight: 600;
  cursor: pointer; border: none; background: #c0392b; color: #fff;
}
.untry-confirm:hover { background: #a93226; }
.modal-name-row {
  display: flex;
  gap: 10px;
}
.modal-name-field {
  flex: 1;
}
.modal-name-field .modal-label { margin-top: 0; }
.modal-opt-ins { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.modal-checkbox-label {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
  font-size: 13px; color: var(--text); line-height: 1.4;
}
.modal-checkbox {
  width: 18px; height: 18px; min-width: 18px;
  accent-color: var(--gold); margin-top: 1px; cursor: pointer;
}
.modal-checkbox-text { flex: 1; }
.modal-checkbox-text strong { color: var(--gold); }

/* Focus-visible outlines for keyboard/assistive navigation */
.tab:focus-visible,
.filter-chip:focus-visible,
.badge-chip:focus-visible,
.tried-toggle:focus-visible,
.scan-btn:focus-visible,
.search-clear:focus-visible,
.modal-submit:focus-visible,
.modal-close:focus-visible,
.c-chip:focus-visible,
.opt-pill:focus-visible,
.profile-btn:focus-visible,
.profile-save-btn:focus-visible,
.profile-signout-btn:focus-visible,
.profile-signin-btn:focus-visible,
.profile-change-btn:focus-visible,
.profile-verify-btn:focus-visible,
.profile-cancel-btn:focus-visible,
.profile-panel-close:focus-visible,
.staff-reorder-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.search-bar:focus-visible { outline: 2px solid var(--gold); outline-offset: 0; }

/* Update Available Banner */
.update-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
  background: var(--gold); color: var(--dark); padding: 12px 16px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 14px; font-weight: 600;
}
.update-banner button {
  background: var(--dark); color: var(--gold); border: none;
  border-radius: 4px; padding: 6px 16px; font-size: 13px; font-weight: 600; cursor: pointer;
}

/* ── Staff Info Panel ── */
.staff-info-panel {
  margin-top: 10px; padding: 10px 12px; border-radius: 6px;
  background: rgba(249,175,54,0.08); border: 1px solid rgba(249,175,54,0.2);
  font-size: 13px; color: var(--gold-light); line-height: 1.6;
}
.staff-label { color: var(--muted); font-size: 12px; margin-right: 4px; }
.staff-val { color: var(--gold); font-weight: 600; }
.staff-dim { color: var(--muted); font-size: 12px; }
.staff-inv { display: flex; align-items: center; flex-wrap: wrap; }
.staff-inv .staff-reorder-btn { margin-left: auto; margin-top: 0; }
.staff-inv.low .staff-val { color: #e74c3c; }
.staff-reorder-flag {
  display: inline-block; margin-left: 8px; padding: 1px 8px;
  background: rgba(231,76,60,0.15); border: 1px solid rgba(231,76,60,0.4);
  border-radius: 3px; color: #e74c3c; font-size: 11px; font-weight: 700;
  letter-spacing: 0.5px; text-transform: uppercase;
}
.staff-sales, .staff-rev, .staff-margin { margin-top: 4px; }
.staff-stat-group { display: inline-block; margin-right: 12px; white-space: nowrap; }
.staff-reorder-btn {
  display: inline-block; margin-top: 8px; padding: 6px 16px;
  background: var(--gold); color: var(--dark); border: none;
  border-radius: 4px; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: Georgia, serif;
}
.staff-reorder-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.staff-reorder-btn.sent { background: rgba(249,175,54,0.25); color: var(--muted); border: 1px solid var(--border); }
.staff-reorder-btn.compact {
  margin-top: 0; padding: 1px 10px; font-size: 11px;
  line-height: 1.4; letter-spacing: 0.3px; border-radius: 3px;
}
.staff-velocity { margin-top: 4px; }
.velocity-urgent {
  display: inline-block; margin-left: 4px; padding: 1px 6px;
  background: rgba(231,76,60,0.15); border: 1px solid rgba(231,76,60,0.4);
  border-radius: 3px; color: #e74c3c; font-size: 10px; font-weight: 700;
  letter-spacing: 0.5px; text-transform: uppercase;
}
.velocity-soon {
  display: inline-block; margin-left: 4px; padding: 1px 6px;
  background: rgba(243,156,18,0.15); border: 1px solid rgba(243,156,18,0.4);
  border-radius: 3px; color: #f39c12; font-size: 10px; font-weight: 700;
  letter-spacing: 0.5px; text-transform: uppercase;
}

.staff-no-reorder {
  display: inline-block; margin-left: 4px; padding: 1px 6px;
  background: rgba(150,150,150,0.15); border: 1px solid rgba(150,150,150,0.4);
  border-radius: 3px; color: #999; font-size: 10px; font-weight: 700;
  letter-spacing: 0.3px; text-transform: uppercase;
}

/* ── Compact Reorder — visible in collapsed card ── */
.reorder-compact {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin-top: 6px; font-size: 12px; color: var(--muted);
}
.reorder-stock-label { font-family: Arial, sans-serif; }
.reorder-stock-label strong { color: #e74c3c; font-weight: 700; }

/* ── Back in Stock badge ── */
.badge.back-in-stock {
  border-color: #27ae60; color: #27ae60; background: rgba(39,174,96,0.1);
  animation: pulse-stock 2s ease-in-out 3;
}
@keyframes pulse-stock {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ── Shared Loading Spinner ── */
.sr-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 16px;
  color: var(--muted);
  font-size: 14px;
  gap: 12px;
}
.sr-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border-2, #333);
  border-top-color: var(--gold, #F9AF36);
  border-radius: 50%;
  animation: sr-spin 0.7s linear infinite;
}
@keyframes sr-spin { to { transform: rotate(360deg); } }
.sr-loading.hidden { display: none; }

/* ── Global System Notification Banner ── */
.sr-notif-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
  background: linear-gradient(135deg, #2a2218 0%, #1a1714 100%);
  border-bottom: 2px solid var(--gold, #F9AF36);
  padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  animation: sr-notif-slide 0.3s ease-out;
}
@keyframes sr-notif-slide {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}
.sr-notif-content {
  display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; cursor: pointer;
}
.sr-notif-icon { color: var(--gold, #F9AF36); flex-shrink: 0; }
.sr-notif-source { font-size: 13px; font-weight: 600; color: var(--gold, #F9AF36); white-space: nowrap; }
.sr-notif-preview { font-size: 13px; color: #d4cdc5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.sr-notif-time { font-size: 11px; color: #8a8279; white-space: nowrap; flex-shrink: 0; }
.sr-notif-dismiss {
  background: none; border: none; color: #8a8279; font-size: 20px; cursor: pointer;
  padding: 0 4px; line-height: 1; flex-shrink: 0;
}
.sr-notif-dismiss:hover { color: #e74c3c; }

/* ── Notify Me badge (back-in-stock opt-in) ── */
.badge.notify-me {
  border-color: var(--gold); color: var(--gold); background: rgba(249,175,54,0.08);
  cursor: pointer; transition: all 0.2s ease; display: inline-flex; align-items: center; gap: 3px;
}
.badge.notify-me:hover { background: rgba(249,175,54,0.18); }
.badge.notify-me.notify-active {
  border-color: #27ae60; color: #27ae60; background: rgba(39,174,96,0.08);
  cursor: default;
}

.hidden { display: none !important; }
.sync-footer { text-align: center; padding: 24px 16px 8px; color: var(--muted); font-size: 11px; letter-spacing: 0.5px; }
.privacy-footer { text-align: center; padding: 8px 16px 40px; font-size: 12px; opacity: 0.5; }
.privacy-footer a { color: var(--muted); text-decoration: none; }
.privacy-footer a:hover { color: var(--gold); text-decoration: underline; }

/* Scroll-to-top button */
.scroll-top-btn {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 900;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: none;
  background: var(--gold);
  color: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}
.scroll-top-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.scroll-top-btn:active {
  opacity: 0.85;
}

/* ── My Tastings Full-Page View ── */
.my-tastings-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  z-index: 11000; background: var(--dark);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.my-tastings-overlay.hidden { display: none; }

.my-tastings-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px; border-bottom: 1px solid var(--border-2);
  background: var(--dark-2);
  flex-shrink: 0;
}
.my-tastings-back {
  background: none; border: none; color: var(--gold);
  cursor: pointer; padding: 4px; display: flex; align-items: center;
}
.my-tastings-back:hover { color: var(--gold-light); }
.my-tastings-title {
  font-family: Georgia, serif; font-size: 18px; color: var(--gold-light);
  letter-spacing: 0.05em;
}
.my-tastings-spacer { width: 28px; }

.my-tastings-body {
  flex: 1; overflow-y: auto; padding: 16px;
  -webkit-overflow-scrolling: touch;
}

/* My Tastings Button in Profile Panel */
.my-tastings-btn {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; margin-bottom: 20px;
  background: var(--dark-3); border: 1px solid var(--border);
  border-radius: 6px; color: var(--gold-light);
  font-family: Georgia, serif; font-size: 15px;
  cursor: pointer; transition: all 0.2s;
}
.my-tastings-btn:hover { background: var(--dark-4); border-color: var(--gold-dim); }
.my-tastings-btn svg:last-child { margin-left: auto; color: var(--muted); }

/* Back Office — gold staff button */
.backoffice-btn {
  background: var(--gold); color: var(--dark); border-color: var(--gold);
  font-weight: 600; margin-top: 4px; margin-bottom: 16px;
}
.backoffice-btn:hover { background: #e09e2e; border-color: #e09e2e; }
.backoffice-btn svg { color: var(--dark) !important; }
.backoffice-btn svg:last-child { color: rgba(15,13,12,0.5) !important; }

/* Stats hero */
.mt-stats {
  display: flex; gap: 10px; margin-bottom: 10px;
}
.mt-stat {
  flex: 1; text-align: center; padding: 8px 8px;
  background: var(--dark-3); border-radius: 6px;
  border: 1px solid var(--border-2);
}
.mt-stat-val {
  font-family: Georgia, serif; font-size: 18px; color: var(--gold);
  display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mt-stat-label {
  font-size: 10px; color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.06em; margin-top: 2px; display: block;
}

/* Top category line */
.mt-top-cat {
  text-align: center; font-size: 13px; color: var(--muted);
  margin-bottom: 12px; font-family: Georgia, serif;
}
.mt-top-cat strong {
  color: var(--gold);
}

/* Progress bar */
.mt-progress { margin-bottom: 20px; }
.mt-progress-bar {
  height: 6px; background: var(--dark-4); border-radius: 3px; overflow: hidden;
}
.mt-progress-fill {
  height: 100%; background: var(--gold); border-radius: 3px;
  transition: width 0.4s ease;
}
.mt-progress-label {
  font-size: 12px; color: var(--muted); margin-top: 6px; text-align: center;
  font-family: Georgia, serif;
}

/* Sort pills */
.mt-sort-row {
  display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap;
}
.mt-sort-pill {
  flex: 1 1 auto; text-align: center;
  padding: 8px 12px; border: 1px solid var(--border-2);
  background: var(--dark-3); color: var(--muted);
  border-radius: 4px; font-size: 14px;
  font-family: Arial, sans-serif; cursor: pointer;
  white-space: nowrap; transition: all 0.2s ease;
}
.mt-sort-pill.active {
  background: rgba(249,175,54,0.10); color: var(--gold);
  border-color: var(--gold);
}
.mt-sort-pill:active { transform: scale(0.96); }

/* Category & Subcategory filter chips */
.mt-cat-chips, .mt-sub-chips {
  display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap;
}
.mt-cat-chip, .mt-sub-chip {
  padding: 6px 12px; border: 1px solid var(--border-2);
  background: var(--dark-3); color: var(--muted);
  border-radius: 4px; font-size: 13px;
  font-family: Arial, sans-serif; cursor: pointer;
  white-space: nowrap; transition: all 0.2s ease;
}
.mt-cat-chip.active, .mt-sub-chip.active {
  background: rgba(249,175,54,0.12); color: var(--gold);
  border-color: var(--gold);
}
.mt-cat-chip:active, .mt-sub-chip:active { transform: scale(0.96); }
.mt-sub-chips {
  margin-top: -4px; padding-left: 4px;
}
.mt-sub-chip {
  font-size: 12px; padding: 4px 10px;
  border-radius: 4px;
}

/* Tasting cards */
.mt-card { margin-bottom: 8px; }
.mt-rating-row {
  display: flex; align-items: center; gap: 8px; margin: 4px 0;
}
.mt-rating-row .star-group { display: inline-flex; gap: 2px; }
.mt-rating-row .star-btn { padding: 2px; }
.mt-rating-val {
  font-family: Georgia, serif; font-size: 13px; color: var(--gold);
  font-weight: 600;
}
.mt-rating-val.mt-unrated {
  color: var(--muted); font-weight: 400; font-style: italic; font-size: 12px;
}
.mt-tried-date {
  font-size: 12px; color: var(--muted); font-family: Georgia, serif;
  margin: 2px 0 4px; font-style: italic;
}

/* Staff bottle locations — collapsed card */
.b-bottle-locations {
  font-size: 12px; color: var(--muted); font-family: Arial, sans-serif;
  margin: 10px 0 4px; line-height: 1.4;
}
.bottle-loc-label {
  font-family: Georgia, serif; font-size: 12px; color: var(--muted);
  font-weight: 600;
}

/* Tasting notes textarea — hidden until card expanded */
.mt-notes-section {
  margin-top: 8px;
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}
.bottle-row.expanded .mt-notes-section {
  max-height: 250px; opacity: 1;
}
.mt-notes-input {
  width: 100%; min-height: 60px; max-height: 160px;
  background: var(--dark-2); color: var(--light);
  border: 1px solid var(--border-2); border-radius: 4px;
  padding: 8px 10px; font-size: 13px; font-family: Arial, sans-serif;
  line-height: 1.5; resize: vertical;
  transition: border-color 0.2s ease;
}
.mt-notes-input::placeholder { color: var(--muted); font-style: italic; }
.mt-notes-input:focus {
  outline: none; border-color: var(--gold);
}

/* Category dividers in category sort */
.mt-cat-divider {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0 6px; margin-top: 8px;
  border-bottom: 1px solid var(--border-2);
  font-family: Georgia, serif; color: var(--gold-light);
  font-size: 15px; letter-spacing: 0.03em;
}
.mt-cat-count {
  font-size: 12px; color: var(--muted); font-weight: 400;
}

/* Category breakdown section */
.mt-breakdown {
  margin-top: 24px; margin-bottom: 24px; padding: 16px;
  background: var(--dark-3); border-radius: 6px;
  border: 1px solid var(--border-2);
}
.mt-breakdown-title {
  font-family: Georgia, serif; font-size: 14px; color: var(--gold-light);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 14px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border-2);
}
.mt-breakdown-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px;
}
.mt-breakdown-cat {
  font-size: 13px; color: var(--text); width: 90px;
  flex-shrink: 0; font-family: Georgia, serif;
}
.mt-breakdown-bar {
  flex: 1; height: 8px; background: var(--dark-4);
  border-radius: 4px; overflow: hidden;
}
.mt-breakdown-fill {
  height: 100%; background: var(--gold); border-radius: 4px;
  transition: width 0.4s ease;
}
.mt-breakdown-count {
  font-size: 13px; color: var(--gold); font-weight: 600;
  font-family: Georgia, serif; width: 28px; text-align: right;
}

/* Empty state */
.mt-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center;
  padding: 60px 20px; min-height: 60vh;
}
.mt-empty-title {
  font-family: Georgia, serif; font-size: 20px; color: var(--gold-light);
  margin-bottom: 10px;
}
.mt-empty-desc {
  font-size: 14px; color: var(--muted); line-height: 1.6;
  max-width: 280px; margin-bottom: 24px;
}
.mt-empty-btn {
  padding: 12px 24px; background: var(--gold); color: var(--dark);
  border: none; border-radius: 4px; font-size: 15px; font-weight: 600;
  font-family: Georgia, serif; cursor: pointer;
}
.mt-empty-btn:active { opacity: 0.85; }

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
