/* Fruit Trees app — earthy/journal aesthetic
   Warm cream paper, deep ink, leaf green, harvest amber.
   Mobile-first; sidebar appears at ≥860px.                              */

:root {
  --paper:  #faf6ed;
  --paper2: #f4eedf;
  --card:   #ffffff;
  --ink:    #1f1d18;
  --ink2:   #4a463c;
  --ink3:   #6e6757;
  --faint:  #a39a87;
  --line:   #d9d1bd;
  --line2:  #eee6d2;

  --green:  #5a7a3a;
  --green-l:#8aa86a;
  --green-s:#5a7a3a14;
  --amber:  #c47326;
  --amber-l:#e09753;
  --amber-s:#c4732614;
  --red:    #a3402b;
  --red-s:  #a3402b12;
  --blue:   #3a5a7a;

  --serif: "Newsreader", "Source Serif Pro", "Georgia", serif;
  --sans:  "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:  "IBM Plex Mono", "JetBrains Mono", monospace;

  --r1: 4px;
  --r2: 8px;
  --r3: 14px;

  --shadow-1: 0 1px 0 rgba(31,29,24,0.04), 0 1px 2px rgba(31,29,24,0.06);
  --shadow-2: 0 2px 4px rgba(31,29,24,0.05), 0 8px 24px rgba(31,29,24,0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

#root { height: 100%; }

/* Paper texture — subtle horizontal lines like a notebook */
.app-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(ellipse at 30% 10%, rgba(196,115,38,0.04), transparent 60%),
    radial-gradient(ellipse at 80% 90%, rgba(90,122,58,0.04), transparent 50%);
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}

h1 { font-size: 32px; line-height: 1.05; letter-spacing: -0.02em; }
h2 { font-size: 22px; line-height: 1.15; }
h3 { font-size: 17px; line-height: 1.2; }

.mono { font-family: var(--mono); }
.serif { font-family: var(--serif); }
.faint { color: var(--faint); }
.muted { color: var(--ink3); }

a { color: inherit; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

.site-links {
  position: fixed;
  left: 18px;
  bottom: 12px;
  z-index: 20;
  display: flex;
  gap: 12px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
}

.site-links a {
  color: inherit;
}

@media (max-width: 859px) {
  .site-links {
    bottom: 76px;
  }
}

.legal-page {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 72px;
}

.legal-page h1 {
  margin-top: 18px;
}

.legal-page h2 {
  margin-top: 28px;
}

.legal-page p {
  color: var(--ink2);
  max-width: 68ch;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  color: var(--green);
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
}

/* ───────── App shell ───────── */

.app {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  height: 100%;
}

.app-main {
  flex: 1; overflow-y: auto;
  padding-bottom: 80px; /* mobile tab bar clearance */
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 16px;
}

.notice {
  margin: 12px auto 0;
  width: min(916px, calc(100% - 32px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px 8px 12px;
  border: 1px solid var(--green);
  border-radius: var(--r2);
  background: var(--green-s);
  color: var(--green);
  font-size: 13px;
  box-shadow: var(--shadow-1);
}

@media (min-width: 860px) {
  .app { flex-direction: row; }
  .app-main { padding-bottom: 32px; }
  .container { padding: 28px 32px; }
}

/* ───────── Sidebar / Tab bar ───────── */

.sidebar {
  display: none;
}

@media (min-width: 860px) {
  .sidebar {
    display: flex; flex-direction: column; gap: 4px;
    width: 220px; padding: 24px 18px;
    border-right: 1px solid var(--line);
    background: var(--paper);
    flex-shrink: 0;
  }

  .sidebar-brand {
    font-family: var(--serif);
    font-size: 22px;
    line-height: 1;
    padding: 4px 6px 18px;
    display: flex; align-items: center; gap: 10px;
  }

  .sidebar-brand .brand-logo { width: 32px; height: 32px; }

  .sidebar a,
  .sidebar-location {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 10px;
    border-radius: var(--r1);
    color: var(--ink2);
    text-decoration: none;
    transition: background 0.12s;
    font-size: 15px;
  }

  .sidebar-location {
    border: 0;
    background: transparent;
    width: 100%;
    text-align: left;
    margin-top: 8px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--ink3);
  }

  .sidebar-location span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sidebar a:hover,
  .sidebar-location:hover { background: var(--paper2); }
  .sidebar a.active {
    background: var(--ink);
    color: var(--paper);
  }
  .sidebar a .count {
    margin-left: auto;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--faint);
  }
  .sidebar a.active .count { color: var(--paper2); opacity: 0.7; }

  .sidebar .backup-panel {
    margin-top: auto;
  }

  .sidebar-foot {
    padding: 12px 6px;
    border-top: 1px solid var(--line);
    font-family: var(--mono); font-size: 10px;
    color: var(--faint); line-height: 1.5;
  }
}

.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10;
  background: rgba(250,246,237,0.96);
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-around;
  padding: 6px 4px 10px;
  backdrop-filter: blur(8px);
}

@media (min-width: 860px) { .tabbar { display: none; } }

.tabbar a {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 4px;
  text-decoration: none;
  color: var(--faint);
  font-size: 10px;
  font-family: var(--mono);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.tabbar a.active { color: var(--ink); }
.tabbar a .ico {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
}

/* Mobile top header (replaces sidebar on small screens) */
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 6px;
  position: sticky; top: 0; z-index: 5;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 860px) { .top { display: none; } }
.top-brand { font-family: var(--serif); font-size: 19px; display: flex; align-items: center; gap: 8px; min-width: 0; }
.top-brand span { white-space: nowrap; }
.top-location {
  display: none;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: var(--ink3);
  font-family: var(--mono);
  font-size: 10px;
  padding: 5px 6px;
}
@media (min-width: 430px) {
  .top-location { display: inline-flex; }
}
.brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: block;
  object-fit: cover;
  box-shadow: 0 1px 2px rgba(31,29,24,0.12);
}

.backup-panel {
  display: grid;
  gap: 5px;
  padding: 12px 6px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
  line-height: 1.35;
}

.backup-panel .btn {
  width: 100%;
  justify-content: flex-start;
}

.backup-panel.compact {
  border: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  max-width: 58vw;
  text-align: right;
}

.backup-panel.compact span {
  display: none;
}

.backup-panel.compact .btn {
  width: auto;
  white-space: nowrap;
  padding-inline: 8px;
}

/* ───────── Cards ───────── */

.card {
  background: var(--card);
  border-radius: var(--r2);
  border: 1px solid var(--line);
  padding: 16px;
  box-shadow: var(--shadow-1);
}

.card-pad-0 { padding: 0; }

.card-row {
  display: flex; gap: 14px; align-items: flex-start;
}

.card-thumb {
  width: 72px; height: 72px;
  border-radius: var(--r1);
  background: var(--paper2);
  flex-shrink: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ───────── Buttons & chips ───────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--r1);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.12s, transform 0.06s;
}

.btn:hover { background: var(--paper2); }
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: #2a2722; }

.btn-ghost { border-color: transparent; background: transparent; color: var(--ink2); }
.btn-ghost:hover { background: var(--paper2); color: var(--ink); }

.btn-sm { padding: 5px 9px; font-size: 12px; }
.btn-icon {
  width: 36px; height: 36px; padding: 0;
  border-radius: 50%;
}

.btn-block { width: 100%; }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink2);
  font-size: 11px;
  font-family: var(--mono);
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.chip:hover { border-color: var(--ink3); }
.chip.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip-green  { color: var(--green); border-color: var(--green); background: var(--green-s); }
.chip-amber  { color: var(--amber); border-color: var(--amber); background: var(--amber-s); }
.chip-red    { color: var(--red);   border-color: var(--red);   background: var(--red-s); }

.suit-yes  { color: var(--green); border-color: var(--green); background: var(--green-s); }
.suit-ok   { color: var(--amber); border-color: var(--amber); background: var(--amber-s); }
.suit-no   { color: var(--red);   border-color: var(--red);   background: var(--red-s); }

/* ───────── Inputs ───────── */

.input, .textarea, .select {
  display: block; width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--r1);
  background: var(--paper);
  font-size: 14px;
  transition: border-color 0.12s, background 0.12s;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--ink); background: var(--card);
}
.textarea { resize: vertical; min-height: 70px; line-height: 1.5; }
.label {
  font-family: var(--mono);
  font-size: 10px; letter-spacing: 0.5px;
  color: var(--ink3);
  text-transform: uppercase;
  margin-bottom: 5px; display: block;
}

/* ───────── Library tree-card ───────── */

.tree-card {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--r2);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: border-color 0.12s, transform 0.06s, box-shadow 0.12s;
  display: flex; flex-direction: column;
}
.tree-card:hover { border-color: var(--ink3); box-shadow: var(--shadow-2); }
.tree-card:active { transform: translateY(1px); }

.tree-card-img {
  height: 130px;
  background: var(--paper2);
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.tree-card-img img { width: 100%; height: 100%; object-fit: cover; }

.tree-card-body { padding: 12px; }
.tree-card-name { font-family: var(--serif); font-size: 16px; line-height: 1.1; }
.tree-card-latin {
  font-family: var(--mono); font-size: 10px; color: var(--faint);
  font-style: italic; margin-top: 3px;
}

.tree-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px;
  border-top: 1px solid var(--line2);
  background: var(--paper);
}

.btn-card-add {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  background: rgba(250,246,237,0.94);
  box-shadow: var(--shadow-1);
  max-width: calc(100% - 16px);
}

.btn-card-add:hover {
  background: var(--card);
}

/* Library cat color tab on the side */
.cat-bar {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
}

/* ───────── Photo placeholder (when no real photo) ───────── */
.photo-ph {
  background:
    repeating-linear-gradient(
      45deg,
      rgba(31,29,24,0.04) 0 6px,
      transparent 6px 12px
    ),
    var(--paper2);
  display: flex; align-items: center; justify-content: center;
  color: var(--faint);
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.5px;
  text-transform: uppercase;
  width: 100%; height: 100%;
}

/* ───────── Section heads ───────── */

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 24px 0 12px;
  gap: 12px;
}
.section-head h2 { font-size: 22px; font-weight: 500; }
.section-head .sub {
  font-family: var(--mono); font-size: 11px; color: var(--faint);
  text-transform: uppercase; letter-spacing: 0.5px;
}

/* ───────── Misc ───────── */

.stack > * + * { margin-top: 10px; }
.stack-lg > * + * { margin-top: 18px; }
.grid { display: grid; gap: 10px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.library-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px 150px;
  gap: 8px;
}
.row { display: flex; gap: 8px; align-items: center; }
.row-wrap { flex-wrap: wrap; }
.spacer { flex: 1; }

@media (max-width: 700px) {
  .grid-2, .grid-3, .library-filters { grid-template-columns: 1fr; }
}

.divider { height: 1px; background: var(--line); margin: 16px 0; }

.tag-row { display: flex; gap: 6px; flex-wrap: wrap; }

/* Tree status dots */
.status-dot {
  width: 8px; height: 8px; border-radius: 4px; display: inline-block;
}
.status-healthy  { background: var(--green); }
.status-fruiting { background: var(--amber); }
.status-dormant  { background: var(--ink3); }
.status-attention{ background: var(--red); }

/* Tabs */
.tabs {
  display: flex; gap: 0; border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  padding: 9px 14px;
  border: none; background: transparent;
  font-family: var(--sans); font-size: 13px;
  color: var(--ink3);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  font-weight: 500;
}
.tabs button.active { color: var(--ink); border-bottom-color: var(--ink); }
.tabs button:hover { color: var(--ink); }

/* Sheet/modal */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(31,29,24,0.5);
  backdrop-filter: blur(2px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn 0.18s ease-out;
}
@media (min-width: 700px) {
  .sheet-backdrop { align-items: center; }
}
.sheet {
  background: var(--paper);
  border-radius: 16px 16px 0 0;
  width: 100%; max-width: 540px;
  max-height: 88vh;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-bottom: none;
  box-shadow: 0 -10px 40px rgba(31,29,24,0.18);
  animation: slideUp 0.22s cubic-bezier(0.2,0.7,0.3,1);
}
@media (min-width: 700px) {
  .sheet { border-radius: 16px; border-bottom: 1px solid var(--line); }
}

.sheet-head {
  padding: 18px 20px 8px;
  display: flex; align-items: center; justify-content: space-between;
}
.sheet-head h2 { font-size: 22px; }
.sheet-body { padding: 8px 20px 24px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Empty state */
.empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--ink3);
}
.empty h3 { font-size: 19px; color: var(--ink2); margin-bottom: 6px; }
.empty p { color: var(--ink3); max-width: 420px; margin: 0 auto 18px; }
.empty .mark {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--green-s);
  color: var(--green);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  font-family: var(--serif); font-size: 26px;
}

/* Today task callout */
.callout {
  border: 1px solid var(--amber);
  background: var(--amber-s);
  border-radius: var(--r2);
  padding: 14px 16px;
}
.callout.attention { border-color: var(--red); background: var(--red-s); }

.task-note {
  margin: -4px 0 10px;
  font-size: 12px;
}

/* Quick guide */
.guide-steps {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.guide-step {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r2);
  background: var(--card);
}

.guide-step p {
  margin: 4px 0 0;
  color: var(--ink3);
}

.guide-num {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--green-s);
  color: var(--green);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

/* Calendar bands */
.cal {
  display: grid; gap: 2px;
  margin-top: 12px;
}
.cal-row {
  display: grid; grid-template-columns: 100px repeat(12, 1fr); gap: 1px; align-items: center;
}
.cal-row .nm { font-size: 12px; font-weight: 500; padding-right: 6px; }
.cal-row .cell { height: 18px; background: var(--paper2); border-radius: 2px; cursor: pointer; }
.cal-row .cell.now { outline: 1.5px solid var(--ink); outline-offset: -1.5px; }
.cal-row .cell.h { background: var(--amber); }
.cal-row .cell.f { background: var(--green); }
.cal-row .cell.p { background: var(--ink); }
.cal-row .cell.s { background: var(--red); }
.cal-head {
  display: grid; grid-template-columns: 100px repeat(12, 1fr); gap: 1px;
  font-family: var(--mono); font-size: 10px; color: var(--ink3);
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.cal-head span { text-align: center; }
.cal-head .now-m {
  background: var(--ink); color: var(--paper); border-radius: 2px;
  padding: 2px 0;
}

/* Photo grid */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 6px;
}
.photo-tile {
  aspect-ratio: 1;
  border-radius: var(--r1);
  overflow: hidden;
  background: var(--paper2);
  cursor: pointer;
  position: relative;
  border: 1px solid var(--line);
}
.photo-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-tile .date {
  position: absolute; bottom: 4px; left: 4px;
  background: rgba(0,0,0,0.55); color: white;
  font-family: var(--mono); font-size: 9px;
  padding: 1px 4px; border-radius: 2px;
}

/* Log timeline */
.timeline { padding-left: 14px; border-left: 1.5px solid var(--line); }
.timeline-item { position: relative; padding: 8px 0 8px 0; }
.timeline-item::before {
  content: ""; position: absolute; left: -19px; top: 14px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--paper); border: 1.5px solid var(--ink2);
}
.timeline-item.harvest::before { background: var(--amber); border-color: var(--amber); }
.timeline-item.feed::before    { background: var(--green); border-color: var(--green); }
.timeline-item.prune::before   { background: var(--ink); border-color: var(--ink); }
.timeline-item.spray::before   { background: var(--red); border-color: var(--red); }
.timeline-item .when {
  font-family: var(--mono); font-size: 10px; color: var(--faint);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.timeline-item .what { font-size: 14px; margin-top: 1px; }
.timeline-item .what b { font-weight: 600; }

.timeline-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.log-actions {
  display: flex;
  gap: 4px;
  opacity: 0.72;
}

.timeline-item:hover .log-actions,
.log-actions:focus-within {
  opacity: 1;
}

.btn.danger {
  color: var(--red);
}

@media (max-width: 560px) {
  .timeline-row {
    display: block;
  }

  .log-actions {
    margin-top: 6px;
  }
}

/* Quick-log grid */
.quicklog {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px;
}
.quicklog button {
  padding: 18px 8px;
  border: 1px solid var(--ink);
  background: var(--paper);
  border-radius: var(--r2);
  font-family: var(--serif); font-size: 17px;
  font-weight: 500;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: background 0.12s;
}
.quicklog button:hover { background: var(--paper2); }
.quicklog button.harvest { color: var(--amber); border-color: var(--amber); }
.quicklog button.feed    { color: var(--green); border-color: var(--green); }
.quicklog button.spray   { color: var(--red); border-color: var(--red); }

/* Detail page hero */
.detail-hero {
  display: flex; gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.detail-hero .img {
  width: 180px; aspect-ratio: 1;
  border-radius: var(--r2);
  background: var(--paper2);
  overflow: hidden;
  flex-shrink: 0;
}
.detail-hero .img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
@media (max-width: 560px) {
  .detail-hero { flex-direction: column; gap: 12px; }
  .detail-hero .img { width: 100%; aspect-ratio: 16/10; }
}

.detail-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin: 16px 0;
}
.detail-stat {
  padding: 8px 10px;
  background: var(--paper2);
  border-radius: var(--r1);
}
.detail-stat .k {
  font-family: var(--mono); font-size: 9px;
  color: var(--ink3); text-transform: uppercase; letter-spacing: 0.6px;
}
.detail-stat .v {
  font-family: var(--serif); font-size: 16px; font-weight: 500;
}

/* Year-band per tree on detail */
.year-band {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px;
  margin-top: 4px;
}
.year-band .b { height: 12px; background: var(--paper2); border-radius: 2px; }
.year-band .b.h { background: var(--amber); }
.year-band .b.f { background: var(--green); }
.year-band .b.p { background: var(--ink); }
.year-band .b.s { background: var(--red); }
.year-band-labels {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px;
  font-family: var(--mono); font-size: 9px;
  color: var(--faint); text-align: center; margin-top: 4px;
}

/* Hide scrollbars in horizontal scroll regions */
.h-scroll { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.h-scroll::-webkit-scrollbar { display: none; }
.h-scroll > * { flex-shrink: 0; }

/* Tooltips for category color dots */
.cat-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; display: inline-block; }

.photo-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: rgba(31,29,24,0.72);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.12s, background 0.12s;
}
.photo-tile:hover .photo-remove,
.photo-remove:focus-visible { opacity: 1; }
.photo-remove:hover { background: var(--red); }
