/* ── Reset & base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #f7f6f3;
  --surface:   #ffffff;
  --border:    #e2e0da;
  --text:      #1a1916;
  --muted:     #888680;
  --accent:    #2d6a4f;
  --accent-lt: #e8f4ee;
  --danger:    #c0392b;
  --font:      "Georgia", serif;
  --mono:      "Courier New", monospace;
  --radius:    6px;
}

body {
  font-family: var(--font);
  font-size: 15px;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* ── Layout ──────────────────────────────────────────────────────────────── */
.layout { max-width: 900px; margin: 0 auto; padding: 0 1.25rem 3rem; }

/* ── Topbar ──────────────────────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
  gap: 12px;
  flex-wrap: wrap;
}

.wordmark {
  font-size: 20px;
  letter-spacing: 0.02em;
  color: var(--text);
  user-select: none;
}
.wordmark-brew {
  font-weight: 700;
  letter-spacing: 0.08em;
}
.wordmark-dot {
  color: var(--accent);
  font-weight: 700;
}
.wordmark-log {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: normal;
  color: var(--muted);
  letter-spacing: 0;
}

.batch-wordmark {
  flex: 1;
  font-size: 16px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ── Hamburger / topbar menu ─────────────────────────────────────────────── */
.topbar-menu-wrap { position: relative; }

.topbar-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 190px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.12s, transform 0.12s, visibility 0.12s;
  z-index: 1000;
}
.topbar-menu.open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.menu-item {
  font-family: var(--font);
  font-size: 13px;
  text-align: left;
  padding: 7px 12px;
  border: none;
  background: none;
  border-radius: calc(var(--radius) - 1px);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  width: 100%;
}
.menu-item:hover { background: var(--bg); }
.menu-item-danger { color: var(--danger); }
.menu-item-danger:hover { background: #fdf0ef; }

/* ── Template banner ─────────────────────────────────────────────────────── */
.template-banner {
  background: #fff8e1;
  border: 1px solid #e8d5a0;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 13px;
  color: #8a6a00;
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* ── Template badge on card ──────────────────────────────────────────────── */
.template-badge {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
  background: #f0eeea;
  color: #888;
  border: 1px solid #d4d0c8;
}

/* ── Templates section on list view ─────────────────────────────────────── */
.templates-section {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  font-family: var(--font);
  font-size: 13px;
  padding: 6px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.1s;
}
.btn:hover { background: var(--bg); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #245a41; }

.btn-danger { color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: #fdf0ef; }

.btn-back { font-size: 13px; color: var(--muted); }

.btn-add {
  font-family: var(--font);
  font-size: 12px;
  padding: 3px 10px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.btn-add:hover { border-color: var(--accent); color: var(--accent); }

.btn-remove {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
  padding: 0 4px;
  line-height: 1;
  flex-shrink: 0;
}
.btn-remove:hover { color: var(--danger); }

/* ── Batch grid ──────────────────────────────────────────────────────────── */
.batch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.batch-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s;
}
.batch-card:hover { border-color: var(--accent); }

.card-img { width: 100%; height: 140px; object-fit: cover; display: block; }
.card-body { padding: 1rem 1.25rem; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.card-name { font-size: 15px; line-height: 1.4; }
.card-meta { font-size: 12px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Status badges ───────────────────────────────────────────────────────── */
.status-badge {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}
.status-planning     { background: #f0eeea; color: #666; border: 1px solid #ddd; }
.status-fermenting   { background: #fff8e1; color: #8a6a00; border: 1px solid #e8d5a0; }
.status-conditioning { background: #e8f0fe; color: #1a4d8f; border: 1px solid #b3c8f0; }
.status-aging        { background: #fce8e6; color: #8f3030; border: 1px solid #f0c0bc; }
.status-complete     { background: var(--accent-lt); color: var(--accent); border: 1px solid #b8dcc8; }

/* ── Tabs ────────────────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.tab {
  font-family: var(--font);
  font-size: 13px;
  padding: 8px 18px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab-active { color: var(--text); border-bottom-color: var(--text); }

/* ── Tab content ─────────────────────────────────────────────────────────── */
.tab-content { display: flex; flex-direction: column; gap: 1.5rem; }

/* ── Sections ────────────────────────────────────────────────────────────── */
.section { display: flex; flex-direction: column; gap: 8px; }
.section-header { display: flex; justify-content: space-between; align-items: center; }
.section-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Meta form grid ──────────────────────────────────────────────────────── */
.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.meta-grid label, .meta-section label {
  display: flex;
  flex-direction: column;
  font-size: 11px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  gap: 4px;
}

.meta-readonly { }
.meta-pills { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.meta-notes { font-size: 14px; color: var(--muted); line-height: 1.6; }

/* ── Inputs ──────────────────────────────────────────────────────────────── */
.input {
  font-family: var(--font);
  font-size: 14px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  width: 100%;
}
.input:focus { outline: none; border-color: var(--accent); }
.input-sm { padding: 5px 8px; font-size: 13px; }
.input-amount { width: 90px; }
.input-unit   { width: 70px; }
.textarea { resize: vertical; min-height: 70px; line-height: 1.5; }

/* ── List page description ───────────────────────────────────────────────── */
.list-description {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  max-width: 560px;
}

/* ── Collapse toggle ─────────────────────────────────────────────────────── */
/* Extends .btn — just overrides font to match section-label style */
.btn-collapse {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-collapse:hover { color: var(--text); }
.collapse-count {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 7px;
}

/* ── Drag and drop ───────────────────────────────────────────────────────── */
.drag-handle {
  color: var(--muted);
  cursor: grab;
  font-size: 14px;
  flex-shrink: 0;
  user-select: none;
  padding: 0 2px;
}
.drag-handle:active { cursor: grabbing; }
.ingredient-row.dragging { opacity: 0.4; }
.ingredient-row.drag-over {
  border-top: 2px solid var(--accent);
  margin-top: -1px;
}
.step-row-edit.dragging { opacity: 0.4; }
.step-row-edit.drag-over {
  border-top: 2px solid var(--accent);
  margin-top: -1px;
}
.step-drag-handle { margin-top: 2px; }

/* ── New-batch modal ─────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  width: min(400px, calc(100vw - 2rem));
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-browser {
  width: min(640px, calc(100vw - 2rem));
  max-height: min(520px, 90vh);
  overflow: hidden;
}
.modal-title { font-size: 16px; font-weight: normal; margin: 0; }
.modal-label {
  display: flex;
  flex-direction: column;
  font-size: 11px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  gap: 6px;
}
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

/* ── Ingredient rows ─────────────────────────────────────────────────────── */
.ingredient-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.ingredient-row:last-child { border-bottom: none; }

.ing-main-row { display: flex; gap: 6px; align-items: center; }
.ing-note-input { width: 100%; }
.ing-note { font-size: 12px; color: var(--muted); font-style: italic; margin-top: 2px; }

.row-read {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.row-read:last-child { border-bottom: none; }

/* ── Section hint ────────────────────────────────────────────────────────── */
.section-hint {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  margin-top: -2px;
}

/* ── Batch photo (detail view) ───────────────────────────────────────────── */
.batch-img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* ── Brew-done banner ────────────────────────────────────────────────────── */
.brew-done-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--accent-lt);
  border: 1px solid #b8dcc8;
  border-radius: var(--radius);
  margin-top: 8px;
  font-size: 14px;
  color: var(--accent);
}

/* ── Steps ───────────────────────────────────────────────────────────────── */
.step-section-header {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  padding: 10px 0 4px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.step-section-header:first-child { border-top: none; margin-top: 0; }
.step-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.step-row:last-child { border-bottom: none; }
.step-row.step-done .step-text { color: var(--muted); text-decoration: line-through; }

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
  margin-top: 2px;
}

.step-check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 1px;
  transition: all 0.15s;
}
.step-check.checked {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.step-check:hover { border-color: var(--accent); }

.step-body { flex: 1; }
.step-name { font-size: 14px; font-weight: bold; line-height: 1.4; }
.step-desc { font-size: 13px; color: var(--muted); line-height: 1.5; margin-top: 3px; }
.step-desc code { font-family: var(--mono); font-size: 12px; background: var(--bg); padding: 1px 4px; border-radius: 3px; }
.step-time { font-size: 11px; font-family: var(--mono); margin-top: 3px; }

/* ── Step ingredient refs ────────────────────────────────────────────────── */
/* Read / brew mode: ingredient pills */
.step-ing-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.step-ing-pill {
  font-size: 11px;
  font-family: var(--mono);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 7px;
  color: var(--muted);
}
.step-ing-pill-note { color: var(--accent); }

/* Edit mode: linked ingredient rows + link select */
.step-ing-refs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
}
.step-ing-ref-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.step-ing-ref-name {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  min-width: 80px;
  flex-shrink: 0;
}
.step-ing-ref-note { flex: 1; }
.step-ing-link-select { width: auto; color: var(--muted); font-size: 12px; }

/* ── Process log ─────────────────────────────────────────────────────────── */
.add-entry-row { display: flex; gap: 8px; margin-bottom: 12px; }
.add-entry-row .input { flex: 1; }

.log-entry {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.log-entry:last-child { border-bottom: none; }
.log-date { font-family: var(--mono); font-size: 11px; flex-shrink: 0; }
.log-text { flex: 1; line-height: 1.5; }

/* ── Gravity ─────────────────────────────────────────────────────────────── */
.gravity-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 8px; }
.gravity-table th { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); font-weight: normal; padding: 6px 0; text-align: left; border-bottom: 1px solid var(--border); }
.gravity-table td { padding: 8px 0; border-bottom: 1px solid var(--border); vertical-align: middle; }
.gravity-table tr:last-child td { border-bottom: none; }

/* ── Tasting notes ───────────────────────────────────────────────────────── */
.tasting-add { display: flex; flex-direction: column; gap: 8px; margin-bottom: 1rem; }

.attr-picker { display: flex; gap: 6px; flex-wrap: wrap; }
.attr-btn {
  font-family: var(--font);
  font-size: 12px;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.1s;
}
.attr-btn:hover { border-color: var(--accent); color: var(--accent); }
.attr-selected { background: var(--accent-lt); border-color: var(--accent); color: var(--accent); }

.tasting-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 8px;
  position: relative;
}
.tasting-card .btn-remove { position: absolute; top: 10px; right: 10px; }
.tasting-text { font-size: 14px; line-height: 1.6; margin: 6px 0 8px; }

.attr-row { display: flex; gap: 6px; flex-wrap: wrap; }
.attr-pill {
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent-lt);
  color: var(--accent);
  border: 1px solid #b8dcc8;
}

/* ── Shared pills ────────────────────────────────────────────────────────── */
.pill {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--muted);
}
.pill-sm { font-family: var(--mono); font-size: 10px; padding: 2px 7px; }

/* ── Misc ────────────────────────────────────────────────────────────────── */
.muted { color: var(--muted); }
.empty-hint { font-size: 13px; color: var(--muted); font-style: italic; }
.empty-state { text-align: center; padding: 4rem 0; color: var(--muted); display: flex; flex-direction: column; gap: 16px; align-items: center; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .topbar-actions { gap: 6px; }
  .btn { font-size: 12px; padding: 5px 10px; }
  .meta-grid { grid-template-columns: 1fr 1fr; }
  .tabs { overflow-x: auto; }
  .tab { white-space: nowrap; }
}

/* ── Template browser (new-batch modal) ──────────────────────────────────── */
.tmpl-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  flex-shrink: 0;
  margin: -0.25rem -1.5rem 0;
  padding: 0 1.5rem;
}

.tmpl-tab {
  font-family: var(--font);
  font-size: 13px;
  padding: 7px 14px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  margin-bottom: -1px;
  flex-shrink: 0;
}
.tmpl-tab:hover { color: var(--text); }
.tmpl-tab-active { color: var(--text); border-bottom-color: var(--accent); }

.tmpl-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  padding: 12px 0 4px;
  overflow-y: auto;
  flex: 1;
  min-height: 180px;
  max-height: 300px;
}

.tmpl-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 13px;
  cursor: pointer;
  transition: border-color 0.12s;
}
.tmpl-card:hover { border-color: var(--accent); }
.tmpl-card-active { border-color: var(--accent); background: var(--accent-lt); }

.tmpl-card-name { font-size: 14px; line-height: 1.4; }
.tmpl-card-meta {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--mono);
  margin-top: 5px;
  line-height: 1.4;
}

/* ── Sync section (list view) ────────────────────────────────────────────── */
.sync-section { margin-bottom: 1.5rem; }
.sync-heading,
.section-heading { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
.section-heading { margin-bottom: 12px; }
.sync-desc { font-size: 13px; color: var(--muted); margin: 0 0 10px; line-height: 1.5; max-width: 56ch; }

.sync-data-heading {
  font-size: 22px;
  font-weight: normal;
  margin: 2.5rem 0 0.25rem;
  letter-spacing: 0.01em;
}
.sync-sub-heading {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 1.75rem 0 0.5rem;
}

.sync-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  flex-wrap: wrap;
}
.sync-status { font-size: 13px; }
.sync-strip-actions { display: flex; gap: 6px; }
.sync-meta { font-size: 12px; color: var(--muted); margin: 6px 0 0; }

.sync-settings-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--bg);
}
.sync-settings-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.sync-settings-row input { flex: 1; min-width: 0; }

.btn-ghost {
  background: none;
  border-color: transparent;
  color: var(--muted);
  font-size: 12px;
}
.btn-ghost:hover { color: var(--text); background: none; }

.btn-danger-outline {
  background: none;
  border-color: var(--danger);
  color: var(--danger);
  font-size: 13px;
}
.btn-danger-outline:hover { background: var(--danger); color: #fff; }

.btn-show-all {
  display: block;
  width: 100%;
  margin-top: 10px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  background: none;
  border: 1px dashed var(--border);
}
.btn-show-all:hover { color: var(--text); border-color: var(--muted); }

.json-drop-zone {
  margin-top: 12px;
  padding: 14px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.json-drop-zone:hover, .json-drop-zone.drag-active {
  border-color: var(--accent);
  color: var(--accent);
}

.tmpl-card-saved { border-style: dashed; }

/* ── Pantry ──────────────────────────────────────────────────────────────── */
.row-read-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.pantry-dot {
  font-size: 9px;
  flex-shrink: 0;
  cursor: default;
  line-height: 1;
}
.pantry-have { color: var(--accent); }
.pantry-miss { color: var(--border); }

.btn-pantry-add {
  font-family: var(--font);
  font-size: 11px;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-pantry-add:hover { border-color: var(--accent); color: var(--accent); }
.btn-pantry-add:disabled { opacity: 0.55; cursor: default; }

.pantry-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  gap: 8px;
}
.pantry-row:last-child { border-bottom: none; }
.pantry-row-info    { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.pantry-row-name    { font-size: 14px; }
.pantry-row-qty     { font-family: var(--mono); font-size: 12px; }
.pantry-row-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }

.pantry-edit-row {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.pantry-edit-flex { flex: 1; min-width: 140px; }

.pantry-match-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 8px;
}
.pantry-match-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}
.pantry-match-name { font-size: 14px; }
.pantry-match-score {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-lt);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #b8dcc8;
  white-space: nowrap;
  flex-shrink: 0;
}
.pantry-match-detail { font-size: 12px; color: var(--muted); line-height: 1.5; }
.pantry-match-have   { color: var(--text); }

/* TODO: styles pass — current aesthetic is functional/prototype level.
   Planned: typography scale refinement, spacing rhythm, card polish,
   color palette, better mobile layout, brew mode full-bleed with large tap targets. */
