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

:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --border: #e5e1da;
  --text: #2d2a26;
  --muted: #7a7470;
  --accent: #8b5e3c;
  --accent-hover: #6e4a2e;
  --top-color: #f4a261;
  --middle-color: #e76f51;
  --base-color: #264653;
  --success-bg: #d4edda;
  --success-text: #155724;
  --warning-bg: #fff3cd;
  --warning-text: #856404;
  --error-bg: #f8d7da;
  --error-text: #721c24;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Navbar ── */
.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.nav-brand {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}
.nav-links a { color: var(--text); font-size: 0.95rem; }
.nav-links a:hover { color: var(--accent); text-decoration: none; }
.nav-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  font-size: 0.95rem;
  padding: 0;
}
.nav-btn:hover { color: var(--accent); }
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 768px) {
  .navbar { padding: 0.75rem 1rem; gap: 0; }
  .nav-brand { flex: 1; }
  .nav-hamburger { display: flex; }
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0;
    border-top: 1px solid var(--border);
    margin-top: 0.5rem;
    padding: 0.25rem 0;
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-bottom: 1px solid var(--border); }
  .nav-links li:last-child { border-bottom: none; }
  .nav-links a, .nav-btn { display: block; padding: 0.65rem 0; font-size: 1rem; }
  .nav-links form { margin: 0; }
}

/* ── Container ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ── Flash messages ── */
.flash-messages { margin-bottom: 1rem; }
.flash {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}
.flash-success { background: var(--success-bg); color: var(--success-text); }
.flash-warning { background: var(--warning-bg); color: var(--warning-text); }
.flash-error   { background: var(--error-bg);   color: var(--error-text);   }
.flash-info    { background: #d1ecf1;            color: #0c5460;             }

/* ── Rate nudge banner ── */
.rate-nudge {
  background: #d1ecf1;
  color: #0c5460;
  border-radius: 6px;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  max-width: 600px;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.65rem 1.1rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.2;
  transition: background 0.15s;
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); text-decoration: none; color: #fff; }
.btn-secondary { background: var(--border); color: var(--text); }
.btn-secondary:hover { background: #d5d0c8; text-decoration: none; }
.btn-link { background: transparent; color: var(--accent); padding: 0.5rem 0.5rem; }
.btn-sm { padding: 0.25rem 0.6rem; font-size: 0.8rem; }
.btn-danger { background: #e74c3c; color: #fff; }
.btn-danger:hover { background: #c0392b; text-decoration: none; color: #fff; }

/* ── Page header ── */
.page-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.page-header h1 { font-size: 1.8rem; }
.date-label {
  font-size: 1rem;
  color: var(--muted);
  font-weight: 400;
  margin-left: 0.5rem;
}
.subtitle { color: var(--muted); font-size: 0.9rem; margin-top: 0.25rem; }

/* ── Fragrance grid (today view) ── */
.fragrance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.fragrance-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}
.fragrance-card:hover {
  border-color: var(--accent);
}
/* Stretched link: the ::after covers the whole card */
.card-link::after {
  content: '';
  position: absolute;
  inset: 0;
}
/* Lift inner links above the stretched overlay */
.card-body .note-link,
.card-body .accord-tag {
  position: relative;
  z-index: 1;
}
.card-image {
  background: var(--bg);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  min-height: 180px;
}
.card-image img { max-height: 160px; max-width: 100%; object-fit: contain; }
.no-image {
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 2rem;
}
.card-body { padding: 1rem 1.25rem; flex: 1; }
.fragrance-name { font-size: 1.1rem; margin-bottom: 0.1rem; }
.fragrance-house { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.5rem; }
.fragrance-nose { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.5rem; }

/* ── Notes pyramid ── */
.notes-pyramid { margin: 0.75rem 0; }
.note-tier {
  display: flex;
  gap: 0.5rem;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.82rem;
  margin-bottom: 0.3rem;
  align-items: baseline;
}
.note-top    { background: #fef3e7; }
.note-middle { background: #fde8e3; }
.note-base   { background: #e8f0f3; }
.tier-label {
  font-weight: 600;
  min-width: 40px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.note-top    .tier-label { color: var(--top-color); }
.note-middle .tier-label { color: var(--middle-color); }
.note-base   .tier-label { color: var(--base-color); }
.tier-notes { color: var(--text); }

/* ── Flat notes (Parfumo-style, no pyramid) ── */
.notes-flat {
  display: flex;
  gap: 0.5rem;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.82rem;
  margin-bottom: 0.3rem;
  background: #f0ede8;
  align-items: baseline;
}
.notes-flat .tier-label {
  font-weight: 600;
  min-width: 40px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* ── Note links (inline within tier rows) ── */
.note-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}
.note-link:hover { color: var(--accent); border-bottom-color: var(--accent); text-decoration: none; }

/* ── Accords ── */
.accord-tag:hover { background: #d9d4ce; text-decoration: none; }
.accords-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.75rem 0;
}
.accord-tag {
  background: #ede9e4;
  color: var(--text);
  border-radius: 20px;
  padding: 0.2rem 0.7rem;
  font-size: 0.8rem;
}

/* ── Entry meta ── */
.entry-meta { margin-top: 0.75rem; font-size: 0.82rem; color: var(--muted); }
.entry-notes { margin-top: 0.2rem; font-style: italic; }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--muted);
}
.empty-state .btn { margin-top: 1rem; }

/* ── Forms ── */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.75rem;
  max-width: 560px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--text);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.15s;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-actions { display: flex; gap: 0.75rem; align-items: center; margin-top: 0.5rem; }
.checkbox-label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; cursor: pointer; }
.checkbox-label input[type="checkbox"] { width: auto; margin: 0; cursor: pointer; }

/* ── Confirm layout ── */
.confirm-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.confirm-image img {
  max-height: 200px;
  max-width: 160px;
  object-fit: contain;
}
.confirm-details h2 { margin-bottom: 0.25rem; }
.confirm-form { max-width: 560px; }
.confirm-actions { display: flex; gap: 0.75rem; align-items: center; margin-top: 1rem; flex-wrap: wrap; }
.inline-form { display: contents; }
.source-link { font-size: 0.82rem; color: var(--muted); margin-top: 0.5rem; }

/* ── Detail layout ── */
.detail-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.detail-image img {
  max-height: 240px;
  max-width: 180px;
  object-fit: contain;
}
.detail-info { flex: 1; min-width: 240px; }
.detail-info p { margin-bottom: 0.4rem; font-size: 0.95rem; }
.fragrance-description {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 600px;
  white-space: pre-line;
}

/* ── Personal notes ── */
.rating-section,
.ownership-section,
.personal-notes-section,
.wear-history-section,
.search-results-list { display: flex; flex-direction: column; gap: 0.5rem; max-width: 600px; }
.search-result-item { display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 0.75rem 1rem; }
.search-result-info { display: flex; flex-direction: column; gap: 0.1rem; }
.search-result-name { font-weight: 600; }
.search-result-house { font-size: 0.85rem; color: var(--text-muted); }

.similar-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.rating-section h2,
.ownership-section h2,
.personal-notes-section h2,
.wear-history-section h2,
.similar-section h2 { margin-bottom: 0.75rem; font-size: 1.1rem; }
/* ── Ratings ── */
.rating-form { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.rating-btn {
  padding: 0.35rem 0.9rem; font-size: 0.85rem; border-radius: 20px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  cursor: pointer; font-family: inherit; transition: background 0.15s, border-color 0.15s;
}
.rating-btn:hover { border-color: var(--accent); }
.current-rating-display { margin-bottom: 0.6rem; display: flex; align-items: center; gap: 0.6rem; }
.rating-date { font-size: 0.8rem; color: var(--muted); }
.rating-badge {
  display: inline-block; font-size: 0.72rem; font-weight: 600;
  padding: 0.15rem 0.55rem; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.rating-filter-btn { font-size: 0.8rem; }
/* Rating colours: 1=red 2=orange 3=yellow 4=green 5=gold */
.rating-value-1 { background: #f8d7da; color: #721c24; }
.rating-value-2 { background: #ffe5cc; color: #7d3a00; }
.rating-value-3 { background: #fff9c4; color: #7a6000; }
.rating-value-4 { background: #d4edda; color: #155724; }
.rating-value-5 { background: #fff0a0; color: #7a5c00; }
.rating-btn.rating-value-1.active { background: #721c24; color: #fff; border-color: #721c24; }
.rating-btn.rating-value-2.active { background: #7d3a00; color: #fff; border-color: #7d3a00; }
.rating-btn.rating-value-3.active { background: #7a6000; color: #fff; border-color: #7a6000; }
.rating-btn.rating-value-4.active { background: #155724; color: #fff; border-color: #155724; }
.rating-btn.rating-value-5.active { background: #7a5c00; color: #fff; border-color: #7a5c00; }
.sort-btn.rating-filter-btn.active.rating-value-1 { background: #721c24; color: #fff; border-color: #721c24; }
.sort-btn.rating-filter-btn.active.rating-value-2 { background: #7d3a00; color: #fff; border-color: #7d3a00; }
.sort-btn.rating-filter-btn.active.rating-value-3 { background: #7a6000; color: #fff; border-color: #7a6000; }
.sort-btn.rating-filter-btn.active.rating-value-4 { background: #155724; color: #fff; border-color: #155724; }
.sort-btn.rating-filter-btn.active.rating-value-5 { background: #7a5c00; color: #fff; border-color: #7a5c00; }
.ownership-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.ownership-tag {
  display: inline-flex; align-items: center;
  padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.82rem;
  font-weight: 600; border: none; cursor: pointer; font-family: inherit;
  transition: opacity 0.15s;
}
.ownership-tag:hover { opacity: 0.75; }
.ownership-add { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin-bottom: 0.5rem; }
.ownership-add-form { display: flex; gap: 0.4rem; align-items: center; }
.ownership-nlo-form { margin-top: 0.5rem; }
.ownership-dates { margin-bottom: 0.75rem; display: flex; flex-direction: column; gap: 0.4rem; }
.ownership-date-row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.ownership-acquired-form {
  display: flex; align-items: center; gap: 0.4rem;
}
.ownership-acquired-label { font-size: 0.85rem; font-weight: 600; color: var(--text); min-width: 120px; }
.ownership-date-label { font-size: 0.8rem; color: var(--muted); }
.ownership-acquired-input {
  font-size: 0.82rem; padding: 0.25rem 0.5rem;
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg); color: var(--text); font-family: inherit;
}
.ownership-size-select {
  font-size: 0.8rem; padding: 0.28rem 0.5rem;
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg); color: var(--text);
}
.ownership-btn {
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
}
.ownership-btn:hover { border-color: var(--accent); background: var(--surface); }
.ownership-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 20px;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ownership-full-bottle      { background: #d4edda; color: #155724; }
.ownership-decant           { background: #d1ecf1; color: #0c5460; }
.ownership-sample           { background: #fff3cd; color: #856404; }
.ownership-no-longer-own    { background: #f8d7da; color: #721c24; }
.ownership-thinking-another-decant { background: #d0eded; color: #1a5252; }
.ownership-btn.ownership-thinking-another-decant.active { background: #1a5252; color: #fff; border-color: #1a5252; }
.ownership-thinking-full-bottle { background: #ddeeff; color: #1a4a7a; }
.ownership-btn.ownership-thinking-full-bottle.active { background: #1a4a7a; color: #fff; border-color: #1a4a7a; }
.ownership-want-full-bottle { background: #e8d5f5; color: #5a2d82; }
.ownership-btn.ownership-want-full-bottle.active { background: #5a2d82; color: #fff; border-color: #5a2d82; }
.personal-notes-section textarea { width: 100%; max-width: 600px; padding: 0.5rem 0.75rem;
  border: 1px solid var(--border); border-radius: 6px; font-size: 0.9rem;
  background: var(--bg); margin-bottom: 0.5rem; }

/* ── Similar fragrances ── */
.similar-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.similar-tag {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.3rem 0.5rem 0.3rem 0.9rem;
  border-radius: 20px; font-size: 0.85rem;
  background: #e8ecf5; color: #1a2a5e;
  border: 1px solid #c5cfe8;
}
.similar-link { color: inherit; text-decoration: none; }
.similar-link:hover { text-decoration: underline; }
.similar-house { color: #5a6a8e; font-size: 0.8rem; }
.similar-remove {
  background: none; border: none; cursor: pointer; color: #5a6a8e;
  font-size: 1rem; line-height: 1; padding: 0 0.1rem;
  font-family: inherit; transition: color 0.15s;
}
.similar-remove:hover { color: #e74c3c; }
.similar-add-form { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin-top: 0.25rem; }
.similar-add-form input[type="text"] {
  font-size: 0.85rem; padding: 0.35rem 0.6rem;
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg); color: var(--text); font-family: inherit;
  width: 280px;
}
.no-similar { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.75rem; }

/* ── History table ── */
.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.history-table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 2px solid var(--border);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.history-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.date-cell, .entry-time-cell { white-space: nowrap; color: var(--muted); font-size: 0.85rem; }
.history-frag-cell { display: flex; align-items: center; gap: 0.6rem; }
.history-thumb { height: 48px; width: auto; object-fit: contain; flex-shrink: 0; }
.history-search-form { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 1rem; }
.delete-cell { white-space: nowrap; }
.time-muted { font-size: 0.8rem; color: var(--muted); }
.field-hint { font-size: 0.78rem; color: var(--muted); font-weight: 400; margin-left: 0.25rem; }
.url-field { margin-top: 0.25rem; }
.import-url-section {
  max-width: 560px;
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.import-url-section h2 { font-size: 1rem; margin-bottom: 0.25rem; }
.import-url-section .subtitle { margin-bottom: 0.75rem; }
.import-url-form { display: flex; gap: 0.5rem; }
.import-url-input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  background: var(--bg);
  color: var(--text);
}
.import-url-input:focus { outline: none; border-color: var(--accent); }
.missing { color: var(--muted); font-style: italic; }
.inline-notes-form { display: flex; gap: 0.4rem; }
.notes-input {
  flex: 1;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.85rem;
  background: var(--bg);
}

/* ── Pagination ── */
.pagination {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1rem;
  font-size: 0.9rem;
}

/* ── Collection ── */
.collection-search-wrapper { margin-bottom: 1rem; }
.collection-search {
  width: 100%;
  max-width: 420px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
  background: var(--surface);
  color: var(--text);
}
.collection-search:focus { outline: none; border-color: var(--accent); }
.search-empty { color: var(--muted); font-size: 0.95rem; margin-bottom: 1rem; }
.sort-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}
.sort-label {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
  margin-right: 0.25rem;
}
.sort-btn {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text);
  background: var(--surface);
  text-decoration: none;
  transition: background 0.12s, border-color 0.12s;
}
.sort-btn:hover { background: var(--bg); border-color: var(--accent); text-decoration: none; }
.sort-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.wear-stats {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.wear-count { font-weight: 600; color: var(--text); }
.wear-sep { color: var(--border); }
.last-worn.never { font-style: italic; }

/* ── Term index (Accords / Notes browse pages) ── */
.term-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.term-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.12s, background 0.12s;
}
.term-pill:hover { border-color: var(--accent); background: var(--bg); text-decoration: none; }
.term-count {
  background: var(--bg);
  border-radius: 10px;
  padding: 0 0.4rem;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
}

/* ── Season pills (edit form) ── */
.season-pills { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.season-pill input[type="checkbox"] { display: none; }
.season-pill label {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.9rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
  user-select: none;
}
.season-pill input[type="checkbox"]:checked + label {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.season-pill label:hover { border-color: var(--accent); }

.season-votes-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.season-vote-input { display: flex; flex-direction: column; gap: 0.25rem; min-width: 80px; }
.season-vote-input label { font-size: 0.85rem; color: var(--text-muted); }
.season-vote-input input[type="number"] { width: 100%; }

.season-votes-display { display: flex; gap: 2rem; flex-wrap: wrap; }
.season-votes-item { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; min-width: 70px; flex: 1; max-width: 120px; }
.season-votes-label { font-size: 0.85rem; color: var(--text-muted); }
.season-votes-bar-track { width: 100%; height: 7px; background: var(--border); border-radius: 4px; overflow: hidden; }
.season-votes-bar-fill { height: 7px; border-radius: 4px; }
.season-votes-count { font-size: 0.9rem; font-weight: 600; color: var(--text); }

/* ── Dashboard ── */
.stats-row { display: flex; gap: 0.75rem; }
.stat-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.2rem 0.8rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.chart-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.chart-section h2 { margin-bottom: 0.75rem; font-size: 1.1rem; }

/* ── Suggest ── */
.suggest-card {
  display: flex;
  gap: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  margin-top: 1rem;
  align-items: flex-start;
}
.suggest-image {
  flex: 0 0 180px;
}
.suggest-image img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
}
.suggest-image .no-image {
  width: 180px;
  height: 180px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.85rem;
}
.suggest-body { flex: 1; }
.suggest-name { font-size: 1.6rem; margin-bottom: 0.25rem; }
.suggest-name a { color: var(--text); }
.suggest-name a:hover { color: var(--accent); }
.suggest-house { color: var(--muted); margin-bottom: 1rem; }
.suggest-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.suggest-reason {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--muted);
}
.suggest-reason-unrated {
  border-color: var(--accent);
  color: var(--accent);
}
.suggest-reason-season {
  background: #e8f5e9;
  border-color: #81c784;
  color: #2e7d32;
}
.suggest-reason-neutral { font-style: italic; }
.suggest-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
/* ── Collection filters toggle ── */
.filters-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  margin-bottom: 0.75rem;
}
.filters-toggle-right { display: flex; align-items: center; gap: 0.5rem; }
.filters-active-dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
}
.filters-toggle-arrow { font-size: 1rem; transition: transform 0.2s; }
.filters-toggle[aria-expanded="true"] .filters-toggle-arrow { transform: rotate(180deg); }
.filters-panel { display: none; }
.filters-panel.open { display: block; }

/* ── History table scroll wrapper ── */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

@media (max-width: 600px) {
  /* Collection filters toggle — full width on mobile */
  .filters-toggle { display: flex; justify-content: space-between; width: 100%; padding: 0.65rem 1rem; font-size: 0.95rem; }

  /* Stack two-column form rows */
  .form-row { grid-template-columns: 1fr; }

  /* Center detail image */
  .detail-image { width: 100%; display: flex; justify-content: center; }

  /* Hide thumbnail in history table (saves ~60px of width) */
  .history-thumb { display: none; }

  /* Suggest card stacks vertically */
  .suggest-card { flex-direction: column; }
  .suggest-image, .suggest-image img { width: 100%; height: auto; }
}

/* ── On My Radar ── */
.priority-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 20px;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.priority-next-order { background: #d1ecf1; color: #0c5460; }
.priority-someday    { background: #f5f5f5; color: #666; }
.radar-user-notes {
  font-size: 0.85rem;
  color: var(--text-muted, #666);
  font-style: italic;
  margin: 0.4rem 0 0.2rem;
  line-height: 1.4;
}
.radar-added-date {
  font-size: 0.75rem;
  color: var(--text-muted, #999);
  margin: 0.2rem 0 0.5rem;
}
.radar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.radio-group { display: flex; gap: 1.5rem; margin-top: 0.25rem; }
.radio-label { display: flex; align-items: center; gap: 0.4rem; font-weight: normal; cursor: pointer; }

/* ── AI Export ── */
.export-instructions { margin-bottom: 1rem; color: var(--text); }
.export-actions { display: flex; gap: 0.75rem; align-items: center; margin-bottom: 1rem; }
.export-textarea {
  width: 100%; height: 70vh; padding: 1rem;
  font-family: monospace; font-size: 0.82rem; line-height: 1.5;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text);
  resize: vertical;
}
