/* KinderVine Web App Styles — Shared Parity with KinderVine Android */
:root {
  --bg-light: #f8faf8;
  --bg-dark: #0f1510;
  --surface-light: #ffffff;
  --surface-dark: #172019;
  --surface-muted-light: #eef4ee;
  --surface-muted-dark: #202c22;
  --surface-elevated-light: #f3f7f3;
  --surface-elevated-dark: #243227;
  --text-light: #182019;
  --text-dark: #edf3ee;
  --muted-light: #49564b;
  --muted-dark: #b5c4b7;
  --border-light: #6c7d6e;
  --border-dark: #768c79;
  --border-subtle-light: #d5dfd6;
  --border-subtle-dark: #2d3d30;

  --brand-light: #1f6a24;
  --brand-dark: #7ed983;
  --brand-fill-light: #2e7d32;
  --brand-fill-dark: #57bb5c;
  --brand-on-fill-light: #ffffff;
  --brand-on-fill-dark: #081e0a;
  --brand-soft-light: #e4f3e5;
  --brand-soft-dark: #1c381f;

  --avoid-light: #b71c1c;
  --avoid-dark: #ff8a80;
  --avoid-fill-light: #c62828;
  --avoid-fill-dark: #ef5350;
  --avoid-on-fill-light: #ffffff;
  --avoid-on-fill-dark: #270505;
  --avoid-soft-light: #fdeaea;
  --avoid-soft-dark: #3b1717;

  --pending-light: #9e4700;
  --pending-dark: #ffb74d;
  --pending-soft-light: #fff3e0;
  --pending-soft-dark: #3a2610;

  --bg: var(--bg-light);
  --surface: var(--surface-light);
  --surface-muted: var(--surface-muted-light);
  --surface-elevated: var(--surface-elevated-light);
  --text: var(--text-light);
  --muted: var(--muted-light);
  --border: var(--border-light);
  --border-subtle: var(--border-subtle-light);
  --brand: var(--brand-light);
  --brand-fill: var(--brand-fill-light);
  --brand-on-fill: var(--brand-on-fill-light);
  --brand-soft: var(--brand-soft-light);
  --avoid: var(--avoid-light);
  --avoid-fill: var(--avoid-fill-light);
  --avoid-on-fill: var(--avoid-on-fill-light);
  --avoid-soft: var(--avoid-soft-light);
  --pending: var(--pending-light);
  --pending-soft: var(--pending-soft-light);

  @media (prefers-color-scheme: dark) {
    --bg: var(--bg-dark);
    --surface: var(--surface-dark);
    --surface-muted: var(--surface-muted-dark);
    --surface-elevated: var(--surface-elevated-dark);
    --text: var(--text-dark);
    --muted: var(--muted-dark);
    --border: var(--border-dark);
    --border-subtle: var(--border-subtle-dark);
    --brand: var(--brand-dark);
    --brand-fill: var(--brand-fill-dark);
    --brand-on-fill: var(--brand-on-fill-dark);
    --brand-soft: var(--brand-soft-dark);
    --avoid: var(--avoid-dark);
    --avoid-fill: var(--avoid-fill-dark);
    --avoid-on-fill: var(--avoid-on-fill-dark);
    --avoid-soft: var(--avoid-soft-dark);
    --pending: var(--pending-dark);
    --pending-soft: var(--pending-soft-dark);
  }

  @supports (color: light-dark(white, black)) {
    --bg: light-dark(var(--bg-light), var(--bg-dark));
    --surface: light-dark(var(--surface-light), var(--surface-dark));
    --surface-muted: light-dark(var(--surface-muted-light), var(--surface-muted-dark));
    --surface-elevated: light-dark(var(--surface-elevated-light), var(--surface-elevated-dark));
    --text: light-dark(var(--text-light), var(--text-dark));
    --muted: light-dark(var(--muted-light), var(--muted-dark));
    --border: light-dark(var(--border-light), var(--border-dark));
    --border-subtle: light-dark(var(--border-subtle-light), var(--border-subtle-dark));
    --brand: light-dark(var(--brand-light), var(--brand-dark));
    --brand-fill: light-dark(var(--brand-fill-light), var(--brand-fill-dark));
    --brand-on-fill: light-dark(var(--brand-on-fill-light), var(--brand-on-fill-dark));
    --brand-soft: light-dark(var(--brand-soft-light), var(--brand-soft-dark));
    --avoid: light-dark(var(--avoid-light), var(--avoid-dark));
    --avoid-fill: light-dark(var(--avoid-fill-light), var(--avoid-fill-dark));
    --avoid-on-fill: light-dark(var(--avoid-on-fill-light), var(--avoid-on-fill-dark));
    --avoid-soft: light-dark(var(--avoid-soft-light), var(--avoid-soft-dark));
    --pending: light-dark(var(--pending-light), var(--pending-dark));
    --pending-soft: light-dark(var(--pending-soft-light), var(--pending-soft-dark));
  }

  color-scheme: light dark;
  accent-color: var(--brand-fill);
}

@media (forced-colors: active) {
  :root {
    --bg: Canvas;
    --surface: Canvas;
    --surface-muted: Canvas;
    --surface-elevated: Canvas;
    --text: CanvasText;
    --muted: GrayText;
    --border: ButtonBorder;
    --border-subtle: ButtonBorder;
    --brand: LinkText;
    --brand-fill: Highlight;
    --brand-on-fill: HighlightText;
    --brand-soft: Canvas;
    --avoid: LinkText;
    --avoid-fill: Highlight;
    --avoid-on-fill: HighlightText;
    --avoid-soft: Canvas;
    --pending: LinkText;
    --pending-soft: Canvas;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-block-size: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

/* Visually hidden utility keeping skip-links accessible on focus */
.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.skip-link:focus-visible {
  position: fixed;
  inset-block-start: 0.75rem;
  inset-inline-start: 0.75rem;
  z-index: 999;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background-color: var(--brand-fill);
  color: var(--brand-on-fill);
  font-weight: 700;
  text-decoration: none;
}

:where(a:any-link, button, input, select, textarea, summary, [role="tab"]):focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 40;
  background-color: var(--surface);
  border-block-end: 1px solid var(--border-subtle);
}

.header-inner {
  max-inline-size: 1120px;
  margin-inline: auto;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  min-block-size: 2.5rem;
}

.brand-link img {
  border-radius: 9px;
}

.brand-accent {
  color: var(--brand);
}

.primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.nav-btn {
  appearance: none;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  min-block-size: 2.4rem;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
}

.nav-btn:hover {
  background-color: var(--surface-muted);
}

.nav-btn[aria-current="page"] {
  background-color: var(--brand-soft);
  color: var(--brand);
  border-color: var(--brand);
  font-weight: 700;
}

.count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.08rem 0.48rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  background-color: var(--brand-fill);
  color: var(--brand-on-fill);
}

.auth-area {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.profile-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--surface-muted);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.3rem 0.75rem 0.3rem 0.35rem;
  min-block-size: 2.5rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.avatar-circle {
  inline-size: 1.85rem;
  block-size: 1.85rem;
  border-radius: 50%;
  object-fit: cover;
  background-color: var(--brand-fill);
  color: var(--brand-on-fill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
}

/* Main Layout */
main {
  flex: 1;
  inline-size: 100%;
  max-inline-size: 1120px;
  margin-inline: auto;
  padding: 1.25rem 1rem 3rem;
}

.page-heading-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-block-end: 1rem;
}

.page-heading-bar h1 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.02em;
}

/* Buttons */
.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.65rem 1.25rem;
  min-block-size: 2.75rem;
  min-inline-size: 2.75rem;
  font: inherit;
  font-weight: 700;
  font-size: 0.96rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: transform 0.08s ease, opacity 0.15s ease;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background-color: var(--brand-fill);
  color: var(--brand-on-fill);
}

.btn-secondary {
  background-color: var(--surface);
  color: var(--brand);
  border-color: var(--border);
}

.btn-tonal {
  background-color: var(--surface-muted);
  color: var(--text);
  border-color: var(--border-subtle);
}

.btn-danger {
  background-color: var(--avoid-fill);
  color: var(--avoid-on-fill);
}

.btn-danger-outline {
  background-color: var(--avoid-soft);
  color: var(--avoid);
  border-color: var(--avoid);
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  min-block-size: 2.25rem;
  font-size: 0.85rem;
}

.icon-btn {
  appearance: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text);
  border-radius: 999px;
  min-inline-size: 2.5rem;
  min-block-size: 2.5rem;
  padding: 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.icon-btn:hover {
  background-color: var(--surface-muted);
}

@media (pointer: coarse) {
  .btn,
  .nav-btn,
  .icon-btn,
  .chip {
    min-block-size: 2.75rem;
  }
}

/* Home Hero */
.home-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 860px) {
  .home-grid {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
  }
}

.card {
  background-color: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 1.35rem;
}

.hero-card {
  text-align: center;
  padding: 2rem 1.5rem;
}

.hero-art-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin-block-end: 1rem;
}

.hero-art-wrap img {
  border-radius: 24px;
  border: 1px solid var(--border-subtle);
}

.hero-badge {
  margin-block-start: -0.65rem;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  background-color: var(--brand-fill);
  color: var(--brand-on-fill);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero-subtitle {
  color: var(--muted);
  max-inline-size: 46ch;
  margin: 0.5rem auto 1.4rem;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  max-inline-size: 380px;
  margin-inline: auto;
}

.manual-lookup-form {
  display: flex;
  gap: 0.5rem;
  margin-block-start: 0.5rem;
}

.manual-lookup-form input {
  flex: 1;
}

/* Badges & Status */
.verdict-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  border: 1px solid currentColor;
}

.verdict-vegan {
  background-color: var(--brand-soft);
  color: var(--brand);
}

.verdict-avoid {
  background-color: var(--avoid-soft);
  color: var(--avoid);
}

.verdict-pending {
  background-color: var(--pending-soft);
  color: var(--pending);
}

.verdict-unknown {
  background-color: var(--surface-muted);
  color: var(--muted);
}

/* Search & Filter Chips */
.catalog-controls {
  background-color: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 1rem;
  margin-block-end: 1.15rem;
}

.search-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.search-row input[type="search"] {
  flex: 1;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-block-start: 0.75rem;
}

.chip {
  appearance: none;
  border: 1px solid var(--border);
  background-color: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 0.38rem 0.9rem;
  min-block-size: 2.25rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.chip[aria-pressed="true"] {
  background-color: var(--brand-fill);
  color: var(--brand-on-fill);
  border-color: var(--brand-fill);
}

/* Wine Grid & Cards */
.wine-list-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 1fr));
  gap: 0.9rem;
}

.wine-card {
  background-color: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 0.9rem;
  display: flex;
  gap: 0.85rem;
  align-items: center;
  position: relative;
}

/* MANDATORY modern-web-guidance: content-visibility ONLY on off-screen cards with contain-intrinsic-size */
.wine-card-deferred {
  content-visibility: auto;
  contain-intrinsic-size: auto none auto 132px;
}

.wine-card-main {
  appearance: none;
  background: transparent;
  border: none;
  color: inherit;
  font: inherit;
  text-align: start;
  padding: 0;
  display: flex;
  gap: 0.85rem;
  align-items: center;
  flex: 1;
  min-inline-size: 0;
  cursor: pointer;
}

.wine-card-static {
  cursor: default;
}

.wine-card:hover {
  border-color: var(--brand);
}

.bottle-thumb {
  inline-size: 64px;
  block-size: 88px;
  flex-shrink: 0;
  border-radius: 12px;
  background-color: var(--surface-muted);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.bottle-thumb img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: contain;
}

.wine-card-body {
  flex: 1;
  min-inline-size: 0;
}

.wine-card-title {
  margin: 0.25rem 0 0.15rem;
  font-size: 1rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.wine-card-meta {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.wine-card-barcode {
  margin: 0.2rem 0 0;
  font-size: 0.76rem;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

/* Bottle Detail View */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 860px) {
  .detail-layout {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.verdict-hero {
  border-radius: 20px;
  padding: 1.5rem;
  border: 2px solid var(--border);
  text-align: center;
}

.verdict-hero.tone-vegan {
  background-color: var(--brand-soft);
  border-color: var(--brand);
}

.verdict-hero.tone-avoid {
  background-color: var(--avoid-soft);
  border-color: var(--avoid);
}

.verdict-hero.tone-pending {
  background-color: var(--pending-soft);
  border-color: var(--pending);
}

.verdict-hero.tone-unknown {
  background-color: var(--surface-muted);
  border-color: var(--border);
}

.bottle-hero-photo {
  inline-size: 150px;
  block-size: 200px;
  margin: 0 auto 1rem;
  border-radius: 16px;
  background-color: var(--surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0.4rem;
}

.bottle-hero-photo img {
  max-inline-size: 100%;
  max-block-size: 100%;
  object-fit: contain;
}

.verdict-headline {
  font-size: 1.55rem;
  font-weight: 900;
  margin: 0.25rem 0;
}

.detail-notes-box {
  margin-block-start: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background-color: var(--surface);
  border: 1px solid var(--border-subtle);
  text-align: start;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-block-start: 1rem;
  justify-content: center;
}

/* Comments */
.comments-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.comment-item {
  background-color: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 0.85rem 1rem;
}

.comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.comment-author {
  font-weight: 700;
  font-size: 0.92rem;
}

.comment-time {
  font-size: 0.78rem;
  color: var(--muted);
}

.comment-text {
  margin: 0.45rem 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Popover menu (Rule 3 of modern-web-guidance dialog/popover guide) */
.comment-popover-menu {
  position: fixed;
  inset: auto;
  inset-inline-start: var(--pop-x, 1rem);
  inset-block-start: var(--pop-y, 4rem);
  margin: 0;
  padding: 0.4rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background-color: var(--surface);
  color: var(--text);
  min-inline-size: 210px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

[popover] {
  display: none;
}

[popover]:is(:popover-open, .\:popover-open, .is-open) {
  display: block;
}

.popover-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.popover-menu-btn {
  appearance: none;
  inline-size: 100%;
  text-align: start;
  background: transparent;
  border: none;
  border-radius: 9px;
  padding: 0.55rem 0.75rem;
  min-block-size: 2.4rem;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.popover-menu-btn:hover {
  background-color: var(--surface-muted);
}

.popover-menu-btn.danger-item {
  color: var(--avoid);
}

/* Forms & Validation (:user-invalid after interaction) */
.field {
  margin-block-end: 1rem;
  text-align: start;
}

.field label {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  margin-block-end: 0.25rem;
}

.field-hint {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-block-end: 0.35rem;
}

input[type="text"],
input[type="search"],
input[type="number"],
input[type="email"],
select,
textarea {
  inline-size: 100%;
  padding: 0.68rem 0.85rem;
  min-block-size: 2.75rem;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

textarea {
  min-block-size: 104px;
  resize: vertical;
}

.error-msg {
  display: none;
  margin-block-start: 0.3rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--avoid);
}

:is(input, textarea, select):is(:user-invalid, .user-invalid-fallback) {
  border-color: var(--avoid);
  background-color: var(--avoid-soft);
}

:is(input, textarea, select):is(:user-invalid, .user-invalid-fallback) + .error-msg {
  display: block;
}

/* Admin Tabs */
.tab-bar {
  display: flex;
  gap: 0.4rem;
  border-block-end: 1px solid var(--border-subtle);
  padding-block-end: 0.6rem;
  margin-block-end: 1.15rem;
  overflow-x: auto;
}

.tab-btn {
  appearance: none;
  background-color: var(--surface);
  border: 1px solid var(--border-subtle);
  color: var(--text);
  padding: 0.55rem 1rem;
  min-block-size: 2.6rem;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}

.tab-btn[aria-selected="true"] {
  background-color: var(--brand-fill);
  color: var(--brand-on-fill);
  border-color: var(--brand-fill);
}

.admin-stack {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.quote-box {
  margin-block-start: 0.65rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background-color: var(--surface-muted);
  border: 1px solid var(--border-subtle);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Scanner View */
.scanner-box {
  position: relative;
  inline-size: 100%;
  max-inline-size: 540px;
  margin-inline: auto;
  border-radius: 20px;
  overflow: hidden;
  background-color: #000;
  min-block-size: 320px;
  border: 2px solid var(--border);
}

#qr-reader {
  inline-size: 100%;
}

/* Native <dialog> Modals — MANDATORY scroll containment rules */
dialog {
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.5rem;
  max-inline-size: min(540px, calc(100vw - 1.5rem));
  inline-size: 100%;
  max-block-size: 88dvh;
  overflow-y: auto;
  background-color: var(--surface);
  color: var(--text);
}

dialog[open] {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.58);
  overflow: hidden;
  overscroll-behavior: contain;
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.dialog-header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-block-start: 0.5rem;
}

/* Radio pill group */
.radio-group {
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 0.75rem;
  margin: 0 0 1rem;
}

.radio-group legend {
  font-weight: 700;
  padding-inline: 0.35rem;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding-block: 0.35rem;
  cursor: pointer;
}

/* Ingredient tags */
.fining-tags {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Toast banner (Top-layer manual popover so it stays visible & non-inert above modals) */
.toast-banner {
  position: fixed;
  inset: auto 1rem 1.25rem;
  max-inline-size: 460px;
  margin: 0 auto;
  z-index: 90;
  padding: 0.8rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background-color: var(--text);
  color: var(--bg);
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* Footer */
.site-footer {
  border-block-start: 1px solid var(--border-subtle);
  background-color: var(--surface);
  padding: 1.25rem 1rem;
  text-align: center;
  font-size: 0.86rem;
  color: var(--muted);
}

.site-footer a {
  color: var(--brand);
  font-weight: 600;
}

.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--muted);
}
