:root {
  --bg: #f0f2f5;
  --surface: #ffffff;
  --surface2: #e8ebf0;
  --border: #d1d8e0;
  --text-primary: #0a0f1e;
  --text-secondary: #4a5568;
  --text-muted: #8a9bb0;
  --blue-900: #0d1b3e;
  --blue-800: #1a2f6b;
  --blue-700: #1e40af;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-400: #60a5fa;
  --blue-300: #93c5fd;
  --blue-200: #bfdbfe;
  --blue-100: #dbeafe;
  --blue-50: #eff6ff;
  --accent: #1e40af;
  --accent-light: #dbeafe;
  --card-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.04);
  --card-shadow-hover: 0 4px 12px rgba(0,0,0,0.12), 0 8px 32px rgba(0,0,0,0.08);
  --radius: 16px;
  --radius-sm: 8px;
  --sidebar-w: 260px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'DM Mono', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

.app { 
  display: flex; 
  min-height: 100vh; 
  padding-top: var(--header-h); 
  padding-bottom: calc(32px + 12px); 
}

nav.sidebar, .sidebar {
  width: var(--sidebar-w);
  background: var(--blue-900);
  color: white;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0 !important;
  position: fixed;
  top: var(--header-h); left: 0; bottom: 0;
  z-index: 1100;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform 0.3s ease;
  padding-top: 0;
  padding-bottom: 8px;
}

.sidebar-logo {
  padding: 14px 16px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.logo-mark {
  font-family: 'array', sans-serif;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 2.5px;
  color: white;
  display: flex;
  align-items: center;
  gap: 7px;
}

.logo-cookie {
  width: 26px; height: 26px;
  background: var(--blue-600);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.logo-sub {
  font-size: 10px;
  color: var(--blue-300);
  font-family: 'DM Mono', monospace;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-top: 3px;
}

.sidebar, .sidebar *:not(.logo-cookie) { justify-content: flex-start !important;}
.sidebar .logo-mark { justify-content: flex-start !important; }
.sidebar .logo-cookie { justify-content: center !important; }
.sidebar .filter-tags { justify-content: flex-start !important; }
.sidebar .nav-item { justify-content: flex-start !important; }

.sidebar-section {
  padding: 8px 0 6px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar-section-label,
.filter-section > .sidebar-section-label {
  font-size: 11px;
  font-family: 'DM Mono', monospace;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--blue-400);
  padding: 0 0 6px 0;
  text-align: left !important;
  display: block;
  width: 100%;
  box-sizing: border-box;
}

.sidebar-section .sidebar-section-label {
  padding-left: 16px;
}

nav.sidebar .nav-item, .sidebar .nav-item {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px;
  padding: 7px 16px;
  cursor: pointer;
  border-radius: 0;
  font-size: 11px !important;
  color: rgba(255,255,255,0.65) !important;
  transition: all 0.15s;
  font-weight: 400;
  text-decoration: none;
  width: 100%;
  text-transform: none !important;
  letter-spacing: normal !important;
  font-family: 'DM Mono', sans-serif !important;
}

nav.sidebar .nav-item:hover, nav.sidebar .nav-item.active,
.sidebar .nav-item:hover, .sidebar .nav-item.active {
  background: rgba(255,255,255,0.08);
  color: white !important;
}

nav.sidebar .nav-item.active, .sidebar .nav-item.active {
  background: var(--blue-700);
  color: white !important;
  border-right: 3px solid var(--blue-400);
}

.filter-section {
  padding: 8px 16px 10px;
}

.filter-group { margin-bottom: 20px; }

.filter-label {
  font-size: 9px;
  font-family: 'DM Mono', monospace;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--blue-300);
  margin-bottom: 6px;
  display: block;
}

.filter-select {
  width: 100%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: white;
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  font-size: 12px;
  font-family: 'DM Sans', sans-serif;
  appearance: none;
  cursor: pointer;
}

.filter-select option { background: var(--blue-900); }

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.filter-tag {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.7);
  border-radius: 20px;
  padding: 3px 8px;
  font-size: 10px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'DM Mono', monospace;
}

.filter-tag:hover, .filter-tag.active {
  background: var(--blue-600);
  border-color: var(--blue-400);
  color: white;
}

.clear-filters {
  width: 100%;
  padding: 6px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.5);
  border-radius: var(--radius-sm);
  font-size: 11px;
  cursor: pointer;
  margin-top: 4px;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.15s;
}

.clear-filters:hover {
  background: rgba(255,255,255,0.06);
  color: white;
}

.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: var(--header-h);
  left: var(--sidebar-w);
  right: 0;
  z-index: 50;

  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.topbar-title {
  font-family: 'array', sans-serif;
  font-weight: 700;
  font-size: 25px;
  color: var(--blue-900);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.view-tabs {
  display: flex;
  background: var(--bg);
  border-radius: 8px;
  padding: 3px;
}

.view-tab {
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--text-secondary);
  font-family: 'DM Mono', monospace;
  letter-spacing: 0.3px;
}

.view-tab.active {
  background: var(--surface);
  color: var(--blue-700);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 22px;
  color: var(--blue-900);
  padding: 4px;
}

.content {
  padding: 24px 28px;
  padding-top: calc(60px + 24px);
  flex: 1;
  min-width: 0;
  overflow-x: hidden;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}

.card-header {
  padding: 18px 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-family: 'array', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--blue-900);
  letter-spacing: 1.75px;
  text-transform: uppercase;
}

.card-badge {
  font-size: 10px;
  font-family: 'DM Mono', monospace;
  letter-spacing: 0.5px;
  background: var(--blue-100);
  color: var(--blue-700);
  border-radius: 4px;
  padding: 2px 7px;
}

.card-body { padding: 16px 20px 20px; }

.no-bottom-oreos {
  font-size:12px;
  color:var(--dark-grey);
  font-family:'DM Mono',monospace;
  padding:12px 0;
  text-align:center;
}

.no-reviews {
  font-size:12px;
  color:var(--dark-grey);
  font-family:'DM Mono',monospace;
  padding:12px 0;
  text-align:center;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.2s;
}

.stat-card:hover { box-shadow: var(--card-shadow-hover); }

.stat-label {
  font-size: 10px;
  font-family: 'DM Mono', monospace;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.stat-value {
  font-family: 'array', sans-serif;
  letter-spacing: 1.75px;
  font-weight: 700;
  font-size: 17px;
  color: var(--blue-900);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-value.blue { color: var(--blue-600); }
.stat-value.green { color: var(--blue-600); }
.stat-value.red { color: var(--blue-600); }

.stat-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.stat-sub.rating-scale {
  font-size:11.5px;
  letter-spacing:-0.5px;
  color:var(--ink)
}

.stat-change {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  font-family: 'DM Mono', monospace;
  margin-top: 6px;
}

.stat-change.up { color: var(--blue-600); }
.stat-change.down { color: var(--blue-600); }

.chart-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.chart-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.chart-grid-2 > *,
.chart-grid-3 > * {
  min-width: 0;
}

.chart-container {
  position: relative;
  width: 100%;
}

.flavor-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  margin-bottom: 24px;
  align-items: start;
}

.flavor-image-placeholder {
  width: 175px;
  height: 175px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--blue-100), var(--blue-200));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--blue-300);
  font-size: 40px;
  color: var(--blue-400);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.flavor-hero-inner {
  display: grid;
  grid-template-columns: 175px 1fr;
  gap: 24px;
  align-items: center;
}

.flavor-hero-inner img {
  width: 175px;
  height: 175px;
  object-fit: contain;
  border-radius: var(--radius);
  flex-shrink: 0;
  display: block;
  margin: 0 auto;
}

.flavor-image-placeholder::after {
  content: 'FLAVOR IMAGE';
  position: absolute;
  bottom: 8px;
  font-size: 7px;
  font-family: 'DM Mono', monospace;
  letter-spacing: 1px;
  color: var(--blue-500);
}

.flavor-meta h2 {
  font-family: 'array', sans-serif;
  letter-spacing: 1.75px;
  font-weight: 800;
  font-size: 26px;
  color: var(--blue-900);
  line-height: 1.1;
  margin-bottom: 8px;
}

.flavor-meta .flavor-stat-notes {
  margin-top:12px;
  font-size:13px;
  color:var(--dark-grey);
  font-style:italic;
}

.flavor-meta .flavor-stat-notes.unrated {
  margin-top:16px;
  font-size:13px;
  color:var(--dark-grey);
  font-family:'DM Mono', monospace;
  padding:12px 16px;
}

.flavor-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.flavor-tag {
  background: var(--blue-100);
  color: var(--blue-700);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 11px;
  font-family: 'DM Mono', monospace;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.flavor-tag.type { background: var(--blue-900); color: white; }

.flavor-stats-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.flavor-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.flavor-stat-val {
  font-family: 'array', sans-serif;
  letter-spacing: 1.75px;
  font-weight: 800;
  font-size: 22px;
  color: var(--blue-700);
}

.flavor-stat-lbl {
  font-size: 10px;
  color: var(--text-muted);
  font-family: 'DM Mono', monospace;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

#flavor-back-btn {
  display:none;
  align-items:center;
  gap:6px;
  background:var(--blue-100);
  border:1px solid var(--blue-200);
  color:var(--blue-700);
  border-radius:20px;
  padding:6px 14px;
  font-size:12px;
  font-family:'DM Mono',monospace;
  font-weight:600;
  cursor:pointer;
  letter-spacing:0.3px;
}

.no-individual-ratings {
  font-size:13px;
  color:var(--dark-grey);
  font-family:'DM Mono',monospace;
  background:var(--blue-50);
  border:1px solid var(--blue-100);
  border-radius:8px;
  padding:12px 16px;
}

.ingredient-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ingredient-pill {
  background: var(--blue-50);
  border: 1px solid var(--blue-200);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  font-family: 'DM Mono', monospace;
  color: var(--blue-800);
  display: flex;
  align-items: center;
  gap: 6px;
}

.ingredient-icon { font-size: 14px; }

.reviews-list { display: flex; flex-direction: column; gap: 0; }

.review-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
  border-radius: 6px;
  padding-left: 8px;
  padding-right: 8px;
}

.review-row:last-child { border-bottom: none; }
.review-row:hover { background: var(--blue-50); }

.reviewer-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-400), var(--blue-700));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: white;
  font-family: 'array', sans-serif;
  letter-spacing: 1.75px;
  flex-shrink: 0;
}

.review-name {
  font-weight: 600;
  font-size: 13px;
  flex: 1;
  color: var(--text-primary);
}

.review-note {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  flex: 2;
  white-space: wrap;
  overflow: hidden;
}

.rating-pill {
  font-family: 'array', sans-serif;
  letter-spacing: 1.75px;
  font-weight: 800;
  font-size: 14px;
  color: white;
  background: var(--blue-600);
  border-radius: 8px;
  padding: 4px 10px;
  min-width: 44px;
  text-align: center;
  flex-shrink: 0;
}

.rating-pill.high { background: var(--blue-700); }
.rating-pill.low { background: var(--blue-300); }
.rating-pill.mid { background: var(--blue-500); }

.reviewer-hero {
  display: flex;
  align-items: center;
  gap: 20px;
}

.reviewer-hero img {
  width: 100px;
}

#reviewer-back-btn {
  display:none;
  align-items:center;
  gap:6px;
  background:var(--blue-100);
  border:1px solid var(--blue-200);
  color:var(--blue-700);
  border-radius:20px;
  padding:6px 14px;
  font-size:12px;
  font-family:'DM Mono',monospace;
  font-weight:600;
  cursor:pointer;
  letter-spacing:0.3px;
}

.leaderboard { display: flex; flex-direction: column; gap: 0; }

.lb-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 8px;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
  border-radius: 6px;
  cursor: pointer;
}

.lb-row:hover { background: var(--blue-50); }
.lb-row:last-child { border-bottom: none; }

.lb-rank {
  font-family: 'array', sans-serif;
  letter-spacing: 1.75px;
  font-weight: 800;
  font-size: 18px;
  color: var(--blue-200);
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}

.lb-rank.gold        { color: #e0b726; }
.lb-rank.silver      { color: #94b4dc; }
.lb-rank.bronze      { color: #dd9950; }

.lb-name { font-weight: 600; font-size: 13px; flex: 1; }
.lb-sub { font-size: 11px; color: var(--text-muted); }

.lb-bar-wrap {
  flex: 1.5;
  height: 8px;
  background: var(--bg);
  border-radius: 4px;
  overflow: hidden;
}

.lb-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--blue-400), var(--blue-600));
  border-radius: 4px;
  transition: width 0.6s ease;
}

.lb-score {
  font-family: 'array', sans-serif;
  letter-spacing: 1.75px;
  font-weight: 700;
  font-size: 15px;
  color: var(--blue-700);
  width: 40px;
  text-align: right;
  flex-shrink: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-family: 'DM Mono', monospace;
  font-weight: 500;
}

.badge-blue { background: var(--blue-100); color: var(--blue-700); }
.badge-gray { background: var(--surface2); color: var(--text-secondary); }
.badge-green { background: #d1fae5; color: #065f46; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-yellow { background: #fef3c7; color: #92400e; }

.tab-row {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
}

.tab-btn {
  padding: 8px 16px;
  border: none;
  background: transparent;
  font-family: 'array', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 1.75px;
  cursor: pointer;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s;
}

.tab-btn.active {
  color: var(--blue-700);
  border-bottom-color: var(--blue-600);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.section-heading {
  font-family: 'array', sans-serif;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.75px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.tooltip {
  position: fixed;
  background: var(--blue-900);
  color: white;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-family: 'DM Mono', monospace;
  pointer-events: none;
  z-index: 9999;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.1s;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-text { font-size: 14px; font-family: 'DM Mono', monospace; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }


.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1050;
}

.sidebar-overlay.open { display: block; }

@keyframes countUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.stat-value { animation: countUp 0.4s ease both; }

.page { display: none; }
.page.active { display: block; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.reviewer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.reviewer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--card-shadow);
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s, border-color 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.reviewer-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--card-accent, var(--blue-500));
  opacity: 0;
  transition: opacity 0.15s;
}

.reviewer-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
  border-color: var(--blue-300);
}

.reviewer-card:hover::before { opacity: 1; }

.reviewer-card-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'array', sans-serif;
  letter-spacing: 1.75px;
  font-weight: 800;
  font-size: 18px;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0,0,0,0.18);
}

.reviewer-card-name {
  font-family: 'array', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--blue-900);
  line-height: 1.2;
  letter-spacing: 1.75px;
}

.reviewer-card-rating {
  font-family: 'array', sans-serif;
  font-weight: 800;
  font-size: 26px;
  color: var(--blue-600);
  line-height: 1;
}

.reviewer-card-rating.unrated {
  font-size:16px;
  color:var(--ink);
} 

.reviewer-card-rating-lbl {
  font-size: 9px;
  font-family: 'DM Mono', monospace;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 2px;
}

.reviewer-card-meta {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
}

.reviewer-card-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 48px;
}

.reviewer-card-stat-val {
  font-family: 'DM Mono', monospace;
  font-weight: 700;
  font-size: 12px;
  color: var(--text-primary);
}

.reviewer-card-stat-lbl {
  font-size: 8px;
  font-family: 'DM Mono', monospace;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.reviewer-card-cluster {
  font-size: 10px;
  font-family: 'DM Mono', monospace;
  color: var(--blue-600);
  background: var(--blue-50);
  border: 1px solid var(--blue-200);
  border-radius: 20px;
  padding: 3px 10px;
  letter-spacing: 0.3px;
}

.reviewer-card-bar {
  width: 100%;
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
}

.reviewer-card-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}

.end-of-page { 
  text-align: center; 
  margin-top: 0px;
  margin-bottom: 10px;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.45s forwards;
}

.end-of-page a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  text-decoration: none;
}

.end-of-page a:hover {
  color: var(--ink);
}

#oreo-link { height: 25px; }

@font-face {
  font-family: 'array';
  src: url('./assets/fonts/Array-Regular.otf') format('opentype');
}


/* ── DARK MODE ─────────────────────────────────────────────────── */
body.dark {
  --bg:              #1a1b1d;
  --surface:         #222426;
  --surface-raised:  #27292b;
  --surface-hover:   #2f3133;
  --border:          rgba(255, 255, 255, 0.07);
  --text-primary:    #e4e5e7;
  --text-secondary:  #9b9da1;
  --text-muted:      #6b7280;
  --blue-50:         rgba(29, 78, 216, 0.12);
  --blue-100:        rgba(29, 78, 216, 0.20);
  --blue-200:        rgba(29, 78, 216, 0.35);
  --accent-light:    rgba(29, 78, 216, 0.20);
  --card-shadow:     0 1px 3px rgba(0,0,0,0.30), 0 4px 16px rgba(0,0,0,0.20);
}

body.dark .app      { background: #1a1b1d; }
body.dark .main     { background: #1a1b1d; }
body.dark .content  { background: #1a1b1d; }

body.dark .hamburger { color: var(--off-white); }

body.dark .topbar {
  background: rgba(34, 36, 38, 0.55);
  border-bottom-color: rgba(255, 255, 255, 0.07);
}
body.dark .topbar-title { color: #e4e5e7; }

body.dark .view-tabs { background: #1a1b1d; }
body.dark .view-tab  { color: #9b9da1; }
body.dark .view-tab.active {
  background: #27292b;
  color: #93c5fd;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

body.dark .card {
  background: var(--surface-raised);
  border-color: rgba(255, 255, 255, 0.07);
}
body.dark .card-title  { color: #e4e5e7; }
body.dark .card-badge  { background: var(--blue-800); color: #93c5fd; }

body.dark .no-bottom-oreos { color:var(--off-white); }
body.dark .no-reviews { color:var(--off-white); }

body.dark .stat-card {
  background: var(--surface-raised);
  border-color: rgba(255, 255, 255, 0.07);
}
body.dark .stat-label          { color: #9b9da1; }
body.dark .stat-value          { color: var(--white); }
body.dark .stat-value.green    { color: #cbe3ff; }
body.dark .stat-value.red      { color: #93c5fd; }
body.dark .stat-sub            { color: #9b9da1; }
body.dark .stat-sub.rating-scale { color:var(--white) }

body.dark .lb-row              { border-bottom-color: rgba(255, 255, 255, 0.05); }
body.dark .lb-row:hover        { background: var(--surface-hover); }
body.dark .lb-name             { color: #e4e5e7; }
body.dark .lb-sub              { color: #9b9da1; }
body.dark .lb-score            { color: #93c5fd; }
body.dark .lb-bar-wrap         { background: rgba(255, 255, 255, 0.06); }
body.dark .lb-rank             { color: #9b9da1; }
body.dark .lb-rank.gold        { color: #fde047; }
body.dark .lb-rank.silver      { color: #cbd5e1; }
body.dark .lb-rank.bronze      { color: #d4a574; }

body.dark .reviewer-card {
  background: var(--surface-raised);
  border-color: rgba(255, 255, 255, 0.07);
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
body.dark .reviewer-card:hover {
  background: var(--surface-hover);
  border-color: rgba(147, 197, 253, 0.20);
}
body.dark .reviewer-card-name       { color: #e4e5e7; }
body.dark .reviewer-card-rating     { color: #e4e5e7; }
body.dark .reviewer-card-rating-lbl { color: #9b9da1; }
body.dark .reviewer-card-stat-val   { color: #e4e5e7; }
body.dark .reviewer-card-stat-lbl   { color: #9b9da1; }
body.dark .reviewer-card-bar        { background: rgba(255, 255, 255, 0.07); }

body.dark .flavor-image-placeholder {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}
body.dark .flavor-meta h2  { color: #e4e5e7; }
body.dark .flavor-stat-val { color: #e4e5e7; }
body.dark .flavor-stat-lbl { color: #9b9da1; }
body.dark .flavor-stat-notes { color: var(--white); }
body.dark .flavor-stat-notes.unrated { color:var(--white); }
body.dark .flavor-tag { background: var(--blue-800); color: #93c5fd; }
body.dark .flavor-tag.type { background: var(--off-white); color: var(--blue-900); }
body.dark .no-individual-ratings { color: var(--off-white); }

body.dark .review-row          { border-bottom-color: rgba(255, 255, 255, 0.05); }
body.dark .review-row:hover    { background: var(--surface-hover); }
body.dark .review-name         { color: #e4e5e7; }
body.dark .review-note         { color: var(--off-off-white); }

body.dark .rating-pill.high {
  background: rgba(29,  64, 175, 0.30); color: #bfdbfe;
  border-color: rgba(29, 64, 175, 0.50);
}
body.dark .rating-pill.mid {
  background: rgba(37,  99, 235, 0.22); color: #93c5fd;
  border-color: rgba(37, 99, 235, 0.40);
}
body.dark .rating-pill.low {
  background: rgba(147, 197, 253, 0.15); color: #60a5fa;
  border-color: rgba(147, 197, 253, 0.25);
}

body.dark .reviewer-hero           { border-bottom-color: rgba(255, 255, 255, 0.07); }
body.dark .profile-name            { color: #e4e5e7; }

body.dark #flavor-back-btn,
body.dark #reviewer-back-btn {
    background: rgba(29, 78, 216, 0.18);
    border-color: rgba(29, 78, 216, 0.35);
    color: #93c5fd;
}
body.dark #flavor-back-btn:hover,
body.dark #reviewer-back-btn:hover { background: rgba(29, 78, 216, 0.28); }

body.dark .empty-state,
body.dark .empty-text { color: #9b9da1; }

body.dark .end-of-page a       { color: #9b9da1; }
body.dark .end-of-page a:hover { color: #e4e5e7; }


/* ─── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 1100px) {
  .topbar-right { gap: 10px; }
  .search-box input { width: 120px; }
}

@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  nav.sidebar, .sidebar { transform: translateX(-260px) !important; width: 260px !important; }
  nav.sidebar.open, .sidebar.open { transform: translateX(0) !important; display: flex !important; }
  .main { margin-left: 0; }
  .hamburger { display: block; }
  .content { padding: 16px; padding-top: calc(60px + 16px); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .topbar { left: 0; padding: 0 16px; }
}

@media (max-width: 600px) {
  .flavor-hero-inner {
    grid-template-columns: 1fr;
  }
  .flavor-image-placeholder { width: 100%; height: 140px; }

  .review-row { flex-wrap: wrap; gap: 8px; }
  .review-note {
    flex: 0 0 100%;
    order: 3;
    padding-left: 52px;
    white-space: normal;
    font-size: 11px;
  }
  .review-name { flex: 1; }
  .rating-pill { order: 2; }

  .reviewer-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .reviewer-card { padding: 14px 10px; gap: 8px; }
  .reviewer-card-avatar { width: 42px; height: 42px; font-size: 15px; }
  .reviewer-card-rating { font-size: 22px; }
  .reviewer-card-name { font-size: 13px; }
}

@media (max-width: 500px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .content { padding: 12px; padding-top: calc(60px + 12px); }
  .stat-value { font-size: 22px; }
  .view-tabs { display: none; }
  .search-box input { width: 100px; }
}