:root {
  --black: #0a0a0a;
  --charcoal: #171717;
  --charcoal-light: #1f1f1d;
  --gold: #d4af37;
  --gold-bright: #f0ce5c;
  --gold-dim: #8c7626;
  --white: #f5f5f0;
  --grey: #8c8c86;
  --red: #e5484d;
  --green: #4caf50;
  --warning: #f5c518;
  --warning-dim: #8a6f0e;
  --border: #2a2a2a;
  --font: "Segoe UI", ui-sans-serif, system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
}
#app {
  max-width: 980px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0 0 28px;
}

/* —— App-like header —— */
.app-header {
  background: linear-gradient(180deg, var(--charcoal-light) 0%, var(--black) 100%);
  padding-top: 10px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px 16px 10px;
  position: relative;
  min-height: 58px;
}
.mark-small {
  width: 40px;
  height: 50px;
  object-fit: contain;
  justify-self: start;
  grid-column: 1;
  z-index: 2;
}
.title-block {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  min-width: 0;
  max-width: min(60vw, 420px);
  pointer-events: none;
  z-index: 1;
}
.title-text {
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
}
.title-n {
  color: var(--gold);
}
.subtitle {
  color: var(--grey);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 1.5px;
  margin-top: 2px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
  justify-content: flex-end;
  grid-column: 2;
  z-index: 2;
}
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 18px;
  border: 1px solid var(--gold);
  background: var(--charcoal);
  color: var(--gold);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  padding: 0;
}
.icon-btn:hover { background: #222; }
#report-toggle {
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}
.report-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 80;
}
.report-modal {
  position: fixed;
  left: 50%;
  top: 12%;
  transform: translateX(-50%);
  width: min(520px, calc(100vw - 28px));
  max-height: min(78vh, 640px);
  overflow: auto;
  z-index: 90;
  background: #121212;
  border: 1px solid var(--gold);
  border-radius: 14px;
  padding: 16px 16px 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}
.report-modal h2 {
  margin: 0 0 8px;
  font-size: 15px;
  letter-spacing: 0.12em;
  color: var(--gold);
}
.report-details {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  margin-top: 4px;
}
.report-log-hint {
  margin: 10px 0 4px;
  font-size: 11px;
}
.update-gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: #0a0a0a;
  color: var(--white);
  padding: 24px;
  text-align: center;
}
.update-gate[hidden] {
  display: none !important;
}
.update-gate-inner {
  max-width: 360px;
}
.update-gate-title {
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 0.12em;
  font-size: 13px;
  margin-bottom: 10px;
}
.update-gate-sub {
  color: var(--grey);
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
}
.hamburger {
  flex-direction: column;
  gap: 4px;
}
.ham-bar {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 1px;
  background: var(--gold);
}
.header-search-panel {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 0 16px 10px;
}
.header-search-panel[hidden] { display: none !important; }
.header-search-panel input {
  flex: 1;
  background: #111;
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--white);
  padding: 9px 14px;
  font-size: 13px;
}
.header-search-panel input:focus {
  outline: none;
  border-color: var(--gold-bright);
}
.menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 40;
}
.menu-backdrop[hidden] { display: none !important; }
.popup-menu {
  position: fixed;
  top: 62px;
  right: 16px;
  z-index: 50;
  min-width: 220px;
  background: var(--black);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 0;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
.popup-menu[hidden] { display: none !important; }
.popup-menu button,
.popup-menu .menu-link {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.6px;
  padding: 12px 16px;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}
.popup-menu button:hover,
.popup-menu .menu-link:hover {
  background: rgba(212, 175, 55, 0.12);
}
.menu-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}
.gold-hairline {
  height: 2px;
  background: linear-gradient(90deg, var(--gold-bright), var(--gold), var(--gold-dim));
  margin: 0 16px;
  border-radius: 2px;
}
.side-rail {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 16px 12px;
  scrollbar-width: none;
}
.side-rail::-webkit-scrollbar { display: none; }
.rail-btn {
  flex: 0 0 auto;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--grey);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: 1.2px;
  font-size: 11px;
}
.rail-btn.active, .rail-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

#main { flex: 1; padding: 20px 16px 8px; }

/* —— Home (matches HomeScreen) —— */
.logo-hero {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}
.logo-hero img {
  width: 100px;
  height: 125px;
  object-fit: contain;
}
.hero-kicker {
  color: var(--white);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-align: center;
  margin-bottom: 8px;
}
.hero-title {
  font-size: clamp(1.85rem, 4.5vw, 2.6rem);
  line-height: 1.08;
  font-weight: 800;
  text-align: center;
  margin: 0 0 12px;
  white-space: pre-line;
}
.hero-sub {
  color: var(--grey);
  text-align: center;
  max-width: 36rem;
  margin: 0 auto 22px;
  line-height: 1.5;
  font-size: 14px;
}
.scan-btn {
  display: block;
  width: 100%;
  max-width: 420px;
  margin: 0 auto 22px;
  border: 0;
  border-radius: 14px;
  padding: 18px 20px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold), var(--gold-dim));
  color: var(--black);
  box-shadow: 0 10px 28px rgba(212, 175, 55, 0.22);
}
.scan-btn-text {
  font-weight: 800;
  letter-spacing: 1.5px;
  font-size: 14px;
}
.scan-btn-hint {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  opacity: 0.75;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.tile {
  background: var(--charcoal);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  text-align: left;
  color: inherit;
}
.tile:hover { border-color: var(--gold); }
.tile-title {
  color: var(--gold);
  letter-spacing: 1.2px;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
}
.tile-sub { color: var(--grey); font-size: 13px; line-height: 1.35; }
.chip.active-chip,
.ghost.active-chip {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(212, 175, 55, 0.12);
}
.settings-row {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  background: var(--charcoal);
  border: 1px solid var(--border);
  border-radius: 14px;
  width: 100%;
}
.settings-row:hover { border-color: var(--gold); }

/* —— Panels / scan —— */
.panel {
  background: rgba(23, 23, 23, 0.95);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
}
.panel h2 {
  margin: 0 0 6px;
  color: var(--gold);
  letter-spacing: 1.5px;
  font-size: 12px;
  font-weight: 800;
}
.muted { color: var(--grey); font-size: 13px; line-height: 1.45; margin: 0 0 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.field {
  flex: 1;
  min-width: 180px;
  background: #111;
  border: 1px solid var(--gold);
  border-radius: 10px;
  color: var(--white);
  padding: 12px 14px;
  font-size: 15px;
}
.field.area {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  font-family: var(--font);
  line-height: 1.45;
}
.correction-note {
  color: var(--gold);
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 0 0 14px;
  font-size: 12px;
  line-height: 1.45;
}
.warn-note {
  color: var(--warning);
  background: rgba(245, 197, 24, 0.08);
  border: 1px solid rgba(245, 197, 24, 0.3);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 0 0 14px;
  font-size: 12px;
  line-height: 1.45;
}
.ok-note {
  color: #8fdf9f;
  background: rgba(62, 207, 107, 0.08);
  border: 1px solid rgba(62, 207, 107, 0.28);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 0 0 14px;
  font-size: 12px;
  line-height: 1.45;
}
.recall-match-card {
  border: 1px solid rgba(245, 197, 24, 0.45);
  background: linear-gradient(160deg, #221c08 0%, #141210 70%);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
}
.recall-match-product {
  margin-bottom: 8px;
}
.recall-match-product strong {
  display: block;
  color: var(--white);
  font-size: 14px;
}
.list-item.recall-hit {
  border-color: rgba(245, 197, 24, 0.55);
  background: rgba(245, 197, 24, 0.06);
}
.sample-chip .sample-kind {
  display: inline-block;
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-right: 4px;
  opacity: 0.9;
}
.sample-chip.kind-beauty { border-color: rgba(212, 175, 55, 0.55); }
.sample-chip.kind-cleaning { border-color: rgba(140, 180, 220, 0.45); }
.sample-chip.kind-pet { border-color: rgba(160, 200, 120, 0.45); }
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: var(--black);
  border: 0;
  border-radius: 10px;
  padding: 12px 18px;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
  font-size: 12px;
}
.primary:disabled { opacity: 0.55; cursor: wait; }
.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--white);
  border-radius: 10px;
  padding: 11px 14px;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 11px;
}
.ghost:hover { border-color: var(--gold); color: var(--gold); }
.ghost.active {
  border-color: var(--gold);
  color: var(--gold);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip {
  border: 1px solid #333;
  background: #141414;
  color: var(--white);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  cursor: pointer;
}
.chip:hover { border-color: var(--gold); }
.list { display: grid; gap: 10px; }
.list-item {
  background: var(--charcoal);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  text-align: left;
  color: inherit;
  width: 100%;
}
.list-item:hover { border-color: var(--gold); }
.list-item strong { display: block; margin-bottom: 4px; font-size: 15px; }
.meta { color: var(--grey); font-size: 12px; }
.section-label {
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  margin: 18px 0 10px;
}
.empty { color: var(--grey); padding: 18px 0; font-size: 14px; }
.error {
  color: var(--red);
  background: rgba(229, 72, 77, 0.1);
  border: 1px solid rgba(229, 72, 77, 0.35);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 12px 0;
  font-size: 13px;
}
.loading {
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 1.2px;
  font-weight: 800;
}

/* —— Results (like ResultsScreen) —— */
.score-wrap {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
  margin: 14px 0 18px;
}
.score-ring {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 3px solid var(--gold);
  font-size: 34px;
  font-weight: 800;
  color: var(--gold);
  background: #100e05;
}
.product-name { font-size: 1.35rem; font-weight: 800; margin: 0 0 4px; }
.product-img {
  max-width: 140px;
  border-radius: 10px;
  border: 1px solid #333;
  margin-bottom: 12px;
}
.flag-card {
  background: #141414;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
}
.flag-card-btn {
  display: block;
  width: 100%;
  text-align: left;
  color: inherit;
  cursor: pointer;
  font: inherit;
}
.flag-card-btn:hover { border-color: var(--gold); }
.flag-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 8px;
}
.flag-name { font-weight: 800; font-size: 15px; }
.badge {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.08em;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge.banned { background: var(--warning); color: var(--black); }
.badge.restricted { background: var(--warning-dim); color: var(--white); }
.badge.caution { background: rgba(245, 197, 24, 0.18); color: var(--warning); }
.badge.cautioned { background: rgba(91, 155, 213, 0.22); color: #8ec5f0; }
.badge.disputed { background: var(--border); color: var(--warning); }
.badge.unlisted {
  background: transparent;
  color: var(--grey);
  border: 1px solid var(--border);
}
.flag-sum { color: var(--grey); font-size: 13px; line-height: 1.4; margin-bottom: 10px; }
.hazard-headline-inline {
  color: var(--warning);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 8px;
}
.hazard-banner {
  border-radius: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(160deg, #1a1510 0%, #121212 70%);
}
.hazard-banner.severity-banned {
  border-color: rgba(229, 72, 77, 0.55);
  background: linear-gradient(160deg, #2a1214 0%, #141010 70%);
}
.hazard-banner.severity-restricted {
  border-color: rgba(245, 160, 40, 0.5);
  background: linear-gradient(160deg, #2a1c0c 0%, #141210 70%);
}
.hazard-banner.severity-caution,
.hazard-banner.severity-disputed {
  border-color: rgba(245, 197, 24, 0.45);
  background: linear-gradient(160deg, #221c08 0%, #121210 70%);
}
.hazard-banner.severity-unlisted {
  border-color: var(--border);
  background: linear-gradient(160deg, #141414 0%, #101010 70%);
}
.hazard-banner.severity-unlisted .hazard-headline {
  color: var(--grey);
}
.hazard-top {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}
.hazard-title {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--white);
}
.hazard-headline {
  color: var(--warning);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 10px;
}
.hazard-summary {
  color: var(--white);
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
}
.resource-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.resource-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #141414;
  text-decoration: none;
  color: inherit;
}
.resource-link:hover { border-color: var(--gold); }
.resource-label { font-size: 13px; font-weight: 650; line-height: 1.35; }
.resource-go { color: var(--gold); font-weight: 800; }
.resource-studies { border-left: 3px solid #5b9bd5; }
.resource-evidence { border-left: 3px solid #7cb87c; }
.resource-safety { border-left: 3px solid #c9a227; }
.resource-msds { border-left: 3px solid #e5783a; }
.resource-regulator { border-left: 3px solid var(--gold); }
.subhead {
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  margin: 10px 0 8px;
}
.status-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  background: #141414;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
}
.status-row:hover { border-color: var(--gold); }
.status-row-static {
  cursor: default;
  opacity: 0.92;
}
.status-row-static:hover { border-color: var(--border); }
.status-country { font-weight: 700; font-size: 13px; }
.status-detail { color: var(--grey); font-size: 12px; margin-top: 2px; }
.status-auth { color: var(--gold); font-size: 11px; font-weight: 700; white-space: nowrap; }
.status-cite-main { flex: 1; min-width: 0; }
.status-cite-line {
  margin-top: 8px;
  font-size: 11px;
  color: var(--grey);
  line-height: 1.4;
}
.status-cite-line strong { color: var(--white); font-weight: 650; }
.dispute-card {
  border: 1px solid rgba(245, 197, 24, 0.35);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  background: linear-gradient(160deg, #221c08 0%, #141210 80%);
}
.dispute-card p { margin: 8px 0; font-size: 13px; line-height: 1.45; color: var(--white); }
.studies {
  display: inline-flex;
  margin-top: 10px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.ingredient-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.ing-chip {
  border: 1px solid #333;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  color: var(--grey);
  background: transparent;
  font: inherit;
}
button.ing-chip {
  cursor: pointer;
  color: var(--white);
}
button.ing-chip:hover { border-color: var(--gold); }
.ing-chip.flagged {
  border-color: var(--warning);
  color: var(--warning);
  background: rgba(245, 197, 24, 0.08);
}
.ing-chip.clickable.flagged:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

.medical-bans {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.medical-ban {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(229, 72, 77, 0.12);
  border: 1px solid rgba(229, 72, 77, 0.55);
  color: #ff8a8f;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}
.ban-icon { font-size: 14px; line-height: 1; }
.ing-chip.ok-chip {
  border-color: rgba(124, 184, 124, 0.55);
  color: #9dcf9d;
}
.ing-chip.caution-chip {
  border-color: rgba(245, 197, 24, 0.55);
  color: var(--warning);
}

.price-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.radius-label {
  color: var(--grey);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.radius-input {
  width: 72px;
  background: #111;
  border: 1px solid var(--gold);
  border-radius: 8px;
  color: var(--white);
  padding: 8px 10px;
  font-size: 14px;
}
.price-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.price-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #141414;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}
.price-card-main {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
}
.price-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #333;
  background: #0d0d0d;
}
.price-thumb.placeholder {
  display: grid;
  place-items: center;
  color: var(--gold);
  font-weight: 800;
  font-size: 22px;
}
.price-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.price-amount { font-size: 18px; color: var(--gold); }
.price-store { font-weight: 700; margin: 4px 0; }
.stock-pill {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 8px;
  white-space: nowrap;
}
.stock-in { color: #8fdf9b; border-color: #2f5a36; }
.stock-low { color: #e6c35c; border-color: #6a5620; }
.stock-out { color: #e88; border-color: #633; }
.size-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.size-chip {
  font-size: 11px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
  color: var(--grey);
}
.price-coupons {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 12px;
}
.price-coupons-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 6px;
  font-weight: 700;
}
.price-coupon-chips {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.price-coupon-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
  width: 100%;
  cursor: pointer;
  border: 1px solid rgba(212, 175, 55, 0.4);
  background: rgba(212, 175, 55, 0.06);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--white);
  font: inherit;
}
.price-coupon-chip:hover {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.12);
}
.price-coupon-value {
  color: var(--gold);
  font-weight: 800;
  font-size: 12px;
}
.price-coupon-title {
  font-size: 12px;
  color: var(--grey);
  line-height: 1.3;
}
.deal-card-clickable { cursor: pointer; }
.deal-card-clickable:hover { border-color: rgba(212, 175, 55, 0.55); }
.coupon-modal { position: relative; max-width: 420px; }
.coupon-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 18px;
  border: 1px solid var(--gold);
  background: var(--charcoal);
  color: var(--gold);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.coupon-modal-value {
  color: var(--gold);
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 4px;
}
.coupon-modal-offer { margin: 0 0 8px; }
.coupon-barcode-wrap {
  margin: 14px 0 10px;
  padding: 12px;
  background: #fff;
  border-radius: 8px;
  text-align: center;
}
.coupon-barcode-svg { display: block; max-width: 100%; height: 64px; }
.coupon-barcode-caption {
  margin-top: 6px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: #111;
}
.coupon-modal-code { margin: 8px 0; }
.coupon-steps {
  margin: 6px 0 0;
  padding-left: 1.2rem;
  color: var(--grey);
  font-size: 13px;
  line-height: 1.45;
}
.coupon-steps li { margin-bottom: 4px; }
.deal-grid {
  display: grid;
  gap: 10px;
  margin: 8px 0 6px;
}
.deal-card {
  background: #141414;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}
.deal-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 6px;
}
.deal-type {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--grey);
}
.deal-type-manufacturer { border-color: #4a6a3a; color: #b6df9a; }
.deal-type-store { border-color: #3a5a6a; color: #9cc6df; }
.deal-type-rebate { border-color: #6a5a3a; color: #dfc69a; }
.deal-type-bogo { border-color: #5a3a6a; color: #c69adf; }
.deal-type-advertised { border-color: #6a4a3a; color: #dfb09a; }
.deal-value { color: var(--gold); font-size: 14px; }
.deal-title { font-weight: 700; margin-bottom: 4px; }
.deal-detail { margin: 0 0 8px; font-size: 13px; }
.deal-code {
  margin-top: 6px;
  font-size: 13px;
}
.deal-code code {
  color: var(--gold);
  background: #0d0d0d;
  padding: 2px 6px;
  border-radius: 4px;
}
.deal-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--gold);
  font-size: 13px;
}
.deal-footnote {
  font-size: 11px;
  margin: 4px 0 12px;
  font-style: italic;
}

.dietary-panel {
  position: relative;
  padding-bottom: 56px;
}
.dietary-actions {
  margin-bottom: 8px;
}
.medical-disclaimer {
  position: absolute;
  right: 16px;
  bottom: 14px;
  margin: 0;
  max-width: min(420px, 70%);
  text-align: right;
  color: var(--grey);
  font-size: 11px;
  line-height: 1.4;
  font-style: italic;
}
.allergy-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}
.report-backdrop[hidden],
.report-modal[hidden] {
  display: none !important;
}
.allergy-tab {
  appearance: none;
  border: 1px solid var(--border);
  background: #121212;
  color: var(--white);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.allergy-tab:hover { border-color: var(--gold); }
.allergy-tab.active {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(212, 175, 55, 0.08);
}
.allergy-tab-hint {
  margin: 0 0 10px;
  font-size: 12px;
}
.allergy-subtypes {
  margin: 4px 0 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #121212;
}
.allergy-subtype-block + .allergy-subtype-block {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.add-panel {
  display: none;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #121212;
}
.add-panel.open { display: block; }
.live-matches {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  max-height: 280px;
  overflow: auto;
}
.live-match {
  text-align: left;
  width: 100%;
  background: var(--charcoal);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  color: inherit;
  cursor: pointer;
  font: inherit;
}
.live-match:hover { border-color: var(--gold); }
.live-match.selected {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.08);
}
.option-row {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}
.option-label {
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.item-actions .alt-btn {
  border-color: rgba(124, 184, 124, 0.55);
  color: #9dcf9d;
}
.swap-panel {
  margin-top: 10px;
}
.alt-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.alt-card {
  flex: 0 0 210px;
  scroll-snap-align: start;
  text-align: left;
  background: #141414;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  color: inherit;
  cursor: pointer;
  font: inherit;
}
.alt-card:hover { border-color: var(--gold); }
.alt-score {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  color: var(--gold);
  font-weight: 800;
  font-size: 16px;
  margin-bottom: 8px;
  padding: 0 6px;
}
.alt-title {
  font-weight: 800;
  font-size: 14px;
  line-height: 1.3;
  margin-bottom: 6px;
}
.alt-meta {
  color: var(--grey);
  font-size: 12px;
  line-height: 1.35;
}

.foot {
  margin: 20px 16px 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--grey);
  font-size: 12px;
  line-height: 1.45;
}
.foot-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--gold);
  font-weight: 700;
  text-decoration: none;
}
.foot-link:hover { text-decoration: underline; }

@media (max-width: 720px) {
  .header-inner {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .mark-small {
    width: 34px;
    height: 42px;
  }
  .title-text { font-size: 11px; letter-spacing: 1.5px; }
  .grid { grid-template-columns: 1fr; }
  .popup-menu { right: 10px; left: 10px; min-width: 0; }
  .download-btn { font-size: 12px; padding: 10px 18px; }
}
