/* ══════════════════════════════════════════════════════════════════
   §4 MY CROPS — v3.34.0
   One dismissible frost banner · CSV billboard → import drawer + button.
   The four-sub-view rebuilds (List family-section / Schedule sow-window /
   Coverage supply sparkline / Table inline-edit) land in v3.34.x patches.
══════════════════════════════════════════════════════════════════ */

/* — One dismissible frost banner (§4.1 move 3) — */
.lib-frost-banner {
  display: flex; align-items: center; gap: 10px;
  background: color-mix(in srgb, var(--frost) 8%, var(--bg-card));
  border: 1px solid color-mix(in srgb, var(--frost) 28%, transparent);
  border-radius: 8px; padding: 9px 14px; margin-bottom: 12px;
  font-family: var(--f-body); font-size: 12.5px; color: var(--text-body);
}
.lib-frost-banner .fb-ico  { font-size: 14px; line-height: 1; color: color-mix(in srgb, var(--frost) 70%, var(--text-primary)); flex-shrink: 0; }
.lib-frost-banner .fb-body { flex: 1; min-width: 0; }
.lib-frost-banner .fb-body b { color: var(--text-primary); }
.lib-frost-banner .fb-cta {
  background: none; border: 1px solid color-mix(in srgb, var(--frost) 40%, transparent);
  color: color-mix(in srgb, var(--frost) 70%, var(--text-primary));
  font-family: var(--f-body); font-size: 11.5px; font-weight: 600;
  padding: 4px 10px; border-radius: 99px; cursor: pointer; line-height: 1.2;
}
.lib-frost-banner .fb-cta:hover { background: color-mix(in srgb, var(--frost) 12%, var(--bg-card)); }
.lib-frost-banner .fb-close {
  background: none; border: none; color: var(--text-muted); font-size: 14px;
  cursor: pointer; padding: 2px 6px; line-height: 1; flex-shrink: 0;
}
.lib-frost-banner .fb-close:hover { color: var(--text-primary); }

/* — Import button in toolbar (§4.1 move 1) — */
.lib-import-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--terra); color: #FAF7F2;
  border: 1px solid var(--terra); border-radius: 99px;
  padding: 5px 12px; font-family: var(--f-body); font-size: 12px; font-weight: 600;
  line-height: 1.2; cursor: pointer;
}
.lib-import-btn:hover { background: color-mix(in srgb, var(--terra) 88%, #000); }
.lib-import-btn .lib-import-ico { font-size: 13px; line-height: 1; }

/* — Import drawer (collapsible) — */
.lib-import-drawer {
  display: none;
  background: var(--bg-card); border: 1px solid var(--border-mid); border-radius: 12px;
  margin-bottom: 14px; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.lib-import-drawer.open { display: block; }
.lib-import-drawer .lid-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
}
.lib-import-drawer .lid-head .lid-title { font-family: var(--f-display); font-weight: 700; font-size: 14px; color: var(--text-primary); }
.lib-import-drawer .lid-head .lid-sub   { font-family: var(--f-body); font-size: 11.5px; color: var(--text-muted); margin-left: 8px; }
.lib-import-drawer .lid-head .lid-close {
  margin-left: auto; background: none; border: none;
  font-size: 18px; line-height: 1; color: var(--text-muted); cursor: pointer; padding: 2px 6px;
}
.lib-import-drawer .lid-head .lid-close:hover { color: var(--text-primary); }
.lib-import-drawer .lid-body { padding: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 720px) { .lib-import-drawer .lid-body { grid-template-columns: 1fr; } }
.lib-import-drawer .lid-block {
  background: var(--bg-subtle); border: 1px dashed var(--border-tan); border-radius: 10px;
  padding: 14px; display: flex; flex-direction: column; gap: 8px;
  text-align: center; align-items: center; cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.lib-import-drawer .lid-block:hover, .lib-import-drawer .lid-block.dragging {
  border-color: var(--terra); background: color-mix(in srgb, var(--terra-tint) 30%, var(--bg-subtle));
}
.lib-import-drawer .lid-block .lid-block-ico   { font-size: 26px; line-height: 1; opacity: 0.7; }
.lib-import-drawer .lid-block .lid-block-title { font-family: var(--f-display); font-weight: 700; font-size: 13px; color: var(--text-primary); }
.lib-import-drawer .lid-block .lid-block-sub   { font-family: var(--f-body); font-size: 11px; color: var(--text-muted); line-height: 1.4; }
.lib-import-drawer .lid-paste-block { background: var(--bg-card); border: 1px solid var(--border-mid); cursor: text; align-items: stretch; text-align: left; }
.lib-import-drawer .lid-paste-block textarea {
  width: 100%; min-height: 84px; resize: vertical;
  background: transparent; border: none; outline: none;
  font-family: var(--f-body); font-size: 12px; color: var(--text-body); line-height: 1.5;
}
.lib-import-drawer .lid-paste-block textarea::placeholder { color: var(--text-muted); }
.lib-import-drawer .lid-paste-row { display: flex; gap: 6px; align-items: center; }
.lib-import-drawer .lid-paste-row .lid-mic {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--bg-subtle); border: 1px solid var(--border-tan); border-radius: 99px;
  padding: 4px 10px; font-family: var(--f-body); font-size: 11.5px; font-weight: 600;
  color: var(--text-secondary); cursor: pointer; line-height: 1.2;
}
.lib-import-drawer .lid-paste-row .lid-mic:hover { color: var(--terra-text); border-color: var(--terra-text); }
.lib-import-drawer .lid-paste-row .lid-parse {
  background: var(--terra); color: #FAF7F2; border: 1px solid var(--terra);
  border-radius: 99px; padding: 4px 12px; font-family: var(--f-body); font-size: 11.5px; font-weight: 600;
  cursor: pointer; line-height: 1.2; margin-left: auto;
}
.lib-import-drawer .lid-paste-row .lid-parse:hover { background: color-mix(in srgb, var(--terra) 88%, #000); }
.lib-import-drawer .lid-footer {
  padding: 8px 14px; background: var(--bg-subtle); border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-family: var(--f-body); font-size: 11px; color: var(--text-muted);
}
.lib-import-drawer .lid-footer a { color: var(--terra-text); text-decoration: none; font-weight: 600; }
.lib-import-drawer .lid-footer a:hover { text-decoration: underline; }
.lib-import-drawer .lid-summary { padding: 10px 14px; background: var(--green-tint); color: var(--green-text); font-size: 12px; line-height: 1.5; border-top: 1px solid var(--border); display: none; }
.lib-import-drawer .lid-summary.show { display: block; }

/* — Group-by toggle (kitchen vs rotation) — v3.36.0 — */
.lib-group-bar { display:flex; align-items:center; gap:var(--s2); flex-wrap:wrap; padding:var(--s2) var(--s3); margin-bottom:var(--s3); background:var(--bg-subtle); border:1px solid var(--border-rule); border-radius:6px; }
.lib-group-lbl { font-size:0.72rem; letter-spacing:0.08em; text-transform:uppercase; font-weight:700; color:var(--text-muted); font-family:var(--f-body); }
.lib-group-btn { padding:0.22rem 0.7rem; font-size:0.78rem; font-weight:600; background:var(--bg-card); color:var(--text-secondary); border:1px solid var(--border-mid); border-radius:4px; cursor:pointer; font-family:var(--f-body); }
.lib-group-btn:hover { background:var(--bg-subtle); color:var(--text-primary); }
.lib-group-btn.active { background:var(--green); color:#fff; border-color:var(--green); }
.lib-group-hint { font-size:0.7rem; color:var(--text-muted); font-style:italic; font-family:var(--f-accent); margin-left:auto; }
:root.dark .lib-group-btn.active { background:var(--green-tint); color:var(--green-text); border-color:var(--green-tint); }
/* Crop taxonomy tag chips (edit panel) */
.lib-tag-chips { display:flex; flex-wrap:wrap; gap:5px; }
.lib-tag-chip { padding:0.18rem 0.6rem; font-size:0.74rem; font-weight:600; background:var(--bg-card); color:var(--text-muted); border:1px solid var(--border-mid); border-radius:99px; cursor:pointer; font-family:var(--f-body); }
.lib-tag-chip:hover { background:var(--bg-subtle); color:var(--text-primary); }
.lib-tag-chip.on { background:var(--green); color:#fff; border-color:var(--green); }
:root.dark .lib-tag-chip.on { background:var(--green-tint); color:var(--green-text); border-color:var(--green-tint); }
.lib-tag-chip.reset { background:transparent; color:var(--text-muted); border-style:dashed; }
/* Merge-duplicates modal */
.mdup-group { border:1px solid var(--border-mid); border-radius:8px; padding:10px 12px; margin-bottom:10px; background:var(--bg-card); }
.mdup-group-title { font-weight:700; font-size:0.9rem; color:var(--text-primary); margin-bottom:6px; }
.mdup-opt { display:flex; align-items:center; gap:8px; padding:4px 0; font-size:0.82rem; color:var(--text-body); }
.mdup-opt .mdup-meta { color:var(--text-muted); font-size:0.74rem; }

/* — List view family-grouped accordion (SPEC §4.2) — */
.lib-fam {
  margin-bottom: 6px; border: 1px solid var(--border-mid); border-radius: 10px;
  background: var(--bg-card); overflow: hidden;
  position: relative;
}
.lib-fam::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 5px; background: var(--lib-fam-color, var(--g-other-bg));
}
.lib-fam .lib-fam-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px 10px 18px; cursor: pointer; user-select: none;
  background: color-mix(in srgb, var(--lib-fam-color, var(--g-other-bg)) 8%, var(--bg-card));
  transition: background 0.12s;
}
.lib-fam .lib-fam-head:hover { background: color-mix(in srgb, var(--lib-fam-color, var(--g-other-bg)) 14%, var(--bg-card)); }
.lib-fam .lib-fam-chip {
  width: 18px; height: 18px; border-radius: 5px;
  background: var(--lib-fam-color, var(--g-other-bg));
  flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15);
}
.lib-fam .lib-fam-name {
  font-family: var(--f-display); font-weight: 700; font-size: 15px;
  color: var(--text-primary); letter-spacing: -0.01em;
}
.lib-fam .lib-fam-count {
  font-family: var(--f-mono); font-size: 10px; font-weight: 700;
  color: var(--text-secondary); background: var(--bg-subtle);
  padding: 2px 8px; border-radius: 99px;
}
.lib-fam .lib-fam-hint {
  font-family: var(--f-accent); font-style: italic; font-size: 11.5px;
  color: var(--text-muted);
}
.lib-fam .lib-fam-inplan {
  margin-left: auto;
  font-family: var(--f-body); font-size: 11px; font-weight: 600;
  color: var(--terra-text); background: var(--terra-tint);
  padding: 2px 9px; border-radius: 99px; white-space: nowrap;
}
.lib-fam .lib-fam-chev {
  font-size: 11px; color: var(--text-muted); transition: transform 0.12s;
  flex-shrink: 0;
}
.lib-fam.open .lib-fam-chev { transform: rotate(90deg); }
.lib-fam .lib-fam-body { display: none; padding: 6px 12px 12px 18px; background: var(--bg-card); }
.lib-fam.open .lib-fam-body { display: block; }

/* List row (calmer than the v3.x left-border-card pattern) — SPEC §4.1 move 2 */
.lib-row {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; margin: 4px 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 7px;
  font-family: var(--f-body); font-size: 13px; color: var(--text-body);
  position: relative;
}
.lib-row:hover { border-color: var(--border-tan); }
.lib-row .lr-fam-dot {
  width: 9px; height: 9px; border-radius: 99px; flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.18);
}
:root.dark .lib-row .lr-fam-dot { box-shadow: inset 0 0 0 1px rgba(255,255,255,0.16); }
.lib-row .lr-name-wrap {
  display: flex; flex-direction: column; min-width: 0; flex: 1 1 220px;
  overflow: hidden;
}
.lib-row .lr-name {
  font-weight: 700; color: var(--text-primary); font-size: 13.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.25;
}
.lib-row .lr-name-sub {
  font-family: var(--f-accent); font-style: italic;
  font-size: 11px; color: var(--text-muted); line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 1px;
}
.lib-row .lr-cultivars {
  display: flex; gap: 3px; flex-wrap: nowrap; overflow: hidden;
  flex: 1 1 auto; min-width: 0;
}
.lib-row .lr-cultivars .lrc-chip {
  font-family: var(--f-body); font-size: 10.5px; font-weight: 600;
  background: var(--bg-subtle); color: var(--text-secondary);
  padding: 1px 7px; border-radius: 99px; white-space: nowrap;
}
.lib-row .lr-method {
  font-family: var(--f-body); font-size: 9.5px; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; padding: 2px 6px; border-radius: 4px; white-space: nowrap;
}
.lib-row .lr-method.tp { background: #dbeafe; color: #1e3a8a; }
.lib-row .lr-method.ds { background: var(--green-tint); color: var(--green-text); }
.lib-row .lr-method.both { background: var(--amber-tint); color: var(--amber-text); }
:root.dark .lib-row .lr-method.tp { background: #13202f; color: #8fc0e0; }
.lib-row .lr-stat {
  font-family: var(--f-mono); font-size: 10.5px; color: var(--text-muted);
  white-space: nowrap;
}
.lib-row .lr-stat b { color: var(--text-secondary); font-weight: 700; }
.lib-row .lr-succ-chip {
  font-family: var(--f-body); font-size: 10px; font-weight: 700;
  background: var(--amber-tint); color: var(--amber-text);
  padding: 1px 6px; border-radius: 4px; white-space: nowrap;
}
.lib-row .lr-inplan-chip {
  font-family: var(--f-body); font-size: 10px; font-weight: 700;
  background: var(--terra-tint); color: var(--terra-text);
  padding: 1px 6px; border-radius: 4px; white-space: nowrap;
}
.lib-row .lr-also-chip {
  font-family: var(--f-body); font-size: 10px; font-weight: 600;
  background: var(--bg-subtle); color: var(--text-muted);
  padding: 1px 6px; border-radius: 4px; white-space: nowrap;
  font-style: italic; letter-spacing: 0.02em;
}
/* v3.38.42 — planted/harvested state chips on Schedule view rows */
.sch-state-chip {
  font-family: var(--f-body); font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 4px; white-space: nowrap;
  flex-shrink: 0;
}
.sch-state-planted   { background: var(--green-tint); color: var(--green-text); border: 1px solid rgba(68,86,50,0.25); }
.sch-state-harvested { background: var(--amber-tint); color: var(--amber-text); border: 1px solid rgba(196,136,29,0.3); }
:root.dark .sch-state-planted   { background: rgba(68,86,50,0.30); color: #C8D8B4; }
:root.dark .sch-state-harvested { background: rgba(196,136,29,0.25); color: #E0A830; }
.lib-row .lr-stock-chip {
  font-family: var(--f-body); font-size: 10px; font-weight: 700; white-space: nowrap;
  padding: 1px 6px; border-radius: 4px;
}
.lib-row .lr-stock-chip.low { background: var(--amber-tint); color: var(--amber-text); }
.lib-row .lr-stock-chip.out { background: var(--terra-tint); color: var(--terra-text); }
.lib-row .lr-actions { margin-left: auto; display: flex; gap: 4px; flex-shrink: 0; }
.lib-row .lr-actions button {
  background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 5px;
  padding: 3px 8px; font-family: var(--f-body); font-size: 10.5px; font-weight: 600;
  color: var(--text-secondary); cursor: pointer; line-height: 1.2;
}
.lib-row .lr-actions button:hover { background: var(--bg-card); color: var(--text-primary); border-color: var(--border-tan); }
.lib-row .lr-actions button.lr-plan-btn { background: var(--green-tint); color: var(--green-text); border-color: color-mix(in srgb, var(--green) 25%, transparent); }
.lib-row .lr-actions button.lr-plan-btn:hover { background: color-mix(in srgb, var(--green-tint) 80%, #fff); }
.lib-row .lr-actions button.lr-del-btn { color: var(--terra-text); }
.lib-row .lr-actions button.lr-del-btn:hover { background: var(--terra-tint); color: var(--terra); }

/* Edit/Delete states reuse the row but stretch full-width for the panel/confirm. */
.lib-row.is-editing { border-color: var(--green); padding: 0; flex-direction: column; align-items: stretch; }
.lib-row.is-deleting {
  border-color: color-mix(in srgb, var(--terra) 35%, transparent);
  background: var(--terra-tint); color: var(--terra-text);
  flex-direction: column; align-items: stretch; gap: 8px; padding: 12px 14px;
}
.lib-row.is-deleting strong { color: var(--text-primary); }

/* — Schedule view bar timeline (SPEC §4.3) — */
.sch-axis {
  display: flex; align-items: center; gap: 0; padding-left: 200px;
  border-bottom: 1px solid var(--border-rule); margin-bottom: 8px; position: relative;
  height: 26px;
}
.sch-axis .sch-axis-mo {
  flex: 1; text-align: left; padding-left: 4px;
  font-family: var(--f-body); font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-muted); position: relative; height: 100%;
  display: flex; align-items: center;
}
.sch-axis .sch-axis-mo + .sch-axis-mo { border-left: 1px solid var(--border-rule); }
.sch-axis-today {
  position: absolute; top: 0; bottom: 0; width: 2px; background: var(--terra);
  z-index: 4; pointer-events: none;
}
.sch-axis-today::before {
  content: ''; position: absolute; top: 0; left: -5px;
  width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent;
  border-top: 6px solid var(--terra);
}
.sch-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 0 7px 0; border-bottom: 1px solid var(--border);
  font-family: var(--f-body); font-size: 12.5px;
}
.sch-row:last-child { border-bottom: none; }
.sch-row .sch-label {
  width: 200px; min-width: 200px; flex-shrink: 0;
  display: flex; align-items: center; gap: 7px; padding-left: 8px;
  overflow: hidden;
}
.sch-row .sch-label .sch-dot {
  width: 8px; height: 8px; border-radius: 99px; flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.18);
}
.sch-row .sch-label .sch-name { font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sch-row .sch-label .sch-cul  { font-family: var(--f-accent); font-style: italic; font-size: 11.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sch-row .sch-track {
  flex: 1; position: relative; height: 22px;
  background: var(--bg-subtle); border-radius: 6px; overflow: visible;
  cursor: pointer;
}
.sch-row .sch-track:hover { background: color-mix(in srgb, var(--bg-subtle) 70%, var(--bg-card)); }
.sch-row .sch-track-empty {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--f-body); font-style: italic; font-size: 10.5px; color: var(--text-muted);
}
.sch-mo-rule { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--border-rule); pointer-events: none; }
.sch-today-line { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--terra); pointer-events: none; opacity: 0.85; z-index: 4; }
.sch-frost-line {
  position: absolute; top: 0; bottom: 0; width: 0;
  border-left: 1.5px dashed color-mix(in srgb, var(--frost) 75%, transparent);
  pointer-events: none; z-index: 3;
}
.sch-sow-window {
  position: absolute; top: 2px; bottom: 2px;
  background: repeating-linear-gradient(-45deg, var(--sch-fam-color, var(--g-other-bg)), var(--sch-fam-color, var(--g-other-bg)) 3px, transparent 3px, transparent 7px);
  opacity: 0.35; border-radius: 99px; pointer-events: none;
}
.sch-nursery-bar {
  position: absolute; top: 7px; height: 8px;
  background: var(--sch-fam-color, var(--g-other-bg));
  opacity: 0.5; border-radius: 99px; pointer-events: none;
}
.sch-field-bar {
  position: absolute; top: 2px; bottom: 2px;
  background: var(--sch-fam-color, var(--g-other-bg));
  border-radius: 99px; overflow: hidden;
  display: flex; align-items: center; padding: 0 8px;
  font-family: var(--f-body); font-size: 10.5px; font-weight: 700; color: var(--sch-fam-fg, #fff);
  white-space: nowrap; line-height: 1; z-index: 2;
}
.sch-harvest-bar {
  position: absolute; top: 2px; bottom: 2px;
  background: repeating-linear-gradient(-45deg, var(--sch-fam-color, var(--g-other-bg)), var(--sch-fam-color, var(--g-other-bg)) 3px, transparent 3px, transparent 6px);
  opacity: 0.7; border-radius: 99px; pointer-events: none;
}
.sch-frost-flag {
  position: absolute; top: -22px; transform: translateX(-50%);
  font-family: var(--f-mono); font-size: 9px; font-weight: 700;
  color: color-mix(in srgb, var(--frost) 75%, var(--text-primary));
  background: color-mix(in srgb, var(--frost) 12%, var(--bg-card));
  border: 1px solid color-mix(in srgb, var(--frost) 28%, transparent);
  padding: 1px 6px; border-radius: 99px; white-space: nowrap;
  pointer-events: none; z-index: 5;
}
.sch-explainer {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--bg-subtle); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 14px;
  margin-bottom: 12px;
  font-family: var(--f-body); font-size: 12px; color: var(--text-body); line-height: 1.5;
}
.sch-explainer .sch-explainer-ico { font-size: 18px; line-height: 1; flex-shrink: 0; }
.sch-explainer b { color: var(--text-primary); }
.sch-explainer em { font-style: italic; color: var(--text-secondary); }
.sch-explainer .sch-legend {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  margin-top: 6px;
  font-size: 11px; color: var(--text-muted);
}
.sch-explainer .sch-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.sch-explainer .sch-legend .sch-legend-sw,
.sch-explainer .sch-legend .sch-legend-fb,
.sch-explainer .sch-legend .sch-legend-hv {
  width: 18px; height: 8px; border-radius: 99px; flex-shrink: 0;
}
.sch-explainer .sch-legend .sch-legend-sw { background: repeating-linear-gradient(-45deg, var(--g-leafy-bg), var(--g-leafy-bg) 3px, transparent 3px, transparent 6px); opacity: 0.6; }
.sch-explainer .sch-legend .sch-legend-fb { background: var(--g-leafy-bg); }
.sch-explainer .sch-legend .sch-legend-hv { background: repeating-linear-gradient(-45deg, var(--g-leafy-bg), var(--g-leafy-bg) 3px, transparent 3px, transparent 6px); opacity: 0.85; }
/* v3.38.40 — new legend swatches for the frost markers + today line */
.sch-explainer .sch-legend .sch-legend-frost,
.sch-explainer .sch-legend .sch-legend-today {
  display:inline-block; width:14px; height:14px; border-radius:2px;
}
.sch-explainer .sch-legend .sch-legend-frost { background:linear-gradient(to right, transparent 45%, rgba(94,156,209,0.7) 45%, rgba(94,156,209,0.7) 55%, transparent 55%); }
.sch-explainer .sch-legend .sch-legend-today { background:linear-gradient(to right, transparent 45%, var(--terra) 45%, var(--terra) 55%, transparent 55%); }
/* v3.38.40 — season-initial chip on field bars when crop has multiple seasons */
.sch-field-season {
  display:inline-flex; align-items:center; justify-content:center;
  width:12px; height:12px;
  background:rgba(255,255,255,0.45); color:#1A1A1A;
  border-radius:50%;
  font-size:9px; font-weight:800; line-height:1;
  margin-left:4px; flex-shrink:0;
  font-family:var(--f-mono);
}
:root.dark .sch-field-season { background:rgba(255,255,255,0.7); color:#1A1A1A; }

.sch-row .sch-label { cursor: pointer; transition: background 0.1s; }
.sch-row .sch-label:hover { background: var(--bg-subtle); border-radius: 4px; }
.sch-row .sch-track { cursor: default; }

.sch-plan-btn {
  flex-shrink: 0; width: 28px; height: 22px;
  background: var(--green-tint); color: var(--green-text);
  border: 1px solid color-mix(in srgb, var(--green) 25%, transparent); border-radius: 6px;
  font-family: var(--f-body); font-size: 14px; font-weight: 700; line-height: 1;
  cursor: pointer; padding: 0; margin-left: 6px;
  display: inline-flex; align-items: center; justify-content: center;
}
.sch-plan-btn:hover { background: color-mix(in srgb, var(--green-tint) 75%, #fff); }

@media (max-width: 640px) {
  .sch-row .sch-label { width: 140px; min-width: 140px; }
  .sch-axis { padding-left: 140px; }
  .sch-explainer .sch-legend { display: none; }
}

/* — Mobile My Crops layout (≤ 640px) — */
@media (max-width: 640px) {
  /* Family header — drop the rotate-after hint + adjust spacing so the name + count + chevron fit one line. */
  .lib-fam .lib-fam-head { padding: 9px 10px 9px 14px; gap: 7px; }
  .lib-fam .lib-fam-hint { display: none; }
  .lib-fam .lib-fam-name { font-size: 14px; }
  .lib-fam .lib-fam-count { font-size: 9.5px; padding: 1px 6px; }
  .lib-fam .lib-fam-inplan { font-size: 10px; padding: 1px 7px; }

  /* Row — let it wrap into 2 lines so name + variety stay readable. */
  .lib-row { flex-wrap: wrap; padding: 7px 9px; gap: 6px 8px; }
  .lib-row .lr-name-wrap { flex: 1 1 100%; order: 1; min-width: 0; }
  .lib-row .lr-fam-dot { order: 0; }
  .lib-row .lr-method  { order: 2; }
  .lib-row .lr-stat    { order: 3; font-size: 10px; }
  .lib-row .lr-succ-chip, .lib-row .lr-inplan-chip, .lib-row .lr-stock-chip { order: 4; }
  .lib-row .lr-actions { order: 5; margin-left: auto; }
  .lib-row .lr-cultivars { display: none; }   /* the variety lives in the name-sub now; no chips on mobile */

  /* Compact the My Crops filter toolbar — make controls stretch the row so they wrap cleanly. */
  #tab-mycrops > .no-print[style*="background:var(--bg-base)"] {
    padding: 0.5rem 0.6rem !important;
    gap: 0.35rem !important;
  }
  #tab-mycrops > .no-print[style*="background:var(--bg-base)"] > select,
  #tab-mycrops > .no-print[style*="background:var(--bg-base)"] > input[type="search"] {
    flex: 1 1 calc(50% - 0.35rem) !important; min-width: 0 !important;
  }
  #tab-mycrops > .no-print[style*="background:var(--bg-base)"] .btn,
  #tab-mycrops > .no-print[style*="background:var(--bg-base)"] .lib-import-btn {
    flex: 0 1 auto;
  }
}
@media (max-width: 480px) {
  /* Stack more aggressively on phones — every dropdown full-width. */
  #tab-mycrops > .no-print[style*="background:var(--bg-base)"] > select,
  #tab-mycrops > .no-print[style*="background:var(--bg-base)"] > input[type="search"] {
    flex: 1 1 100% !important;
  }
  /* View segment to its own row */
  #tab-mycrops > div[class*="flex gap-1"] { flex-wrap: wrap; }
  #tab-mycrops > div[class*="flex gap-1"] > button { flex: 1 1 calc(50% - 4px); }
}

/* — Tab-body drop-veil — appears when a file is dragged anywhere onto the tab — */
.lib-drop-veil {
  position: fixed; inset: 0; z-index: 60;
  background: color-mix(in srgb, var(--terra-tint) 60%, rgba(0,0,0,0.18));
  pointer-events: none; display: none;
  align-items: center; justify-content: center;
}
.lib-drop-veil.show { display: flex; }
.lib-drop-veil .ldv-card {
  background: var(--bg-card); border: 2px dashed var(--terra); border-radius: 14px;
  padding: 24px 32px; box-shadow: var(--shadow-pop);
  font-family: var(--f-display); font-weight: 700; font-size: 16px; color: var(--text-primary);
  text-align: center;
}
.lib-drop-veil .ldv-card .ldv-ico { font-size: 28px; margin-bottom: 6px; }
.lib-drop-veil .ldv-card .ldv-sub { font-family: var(--f-body); font-weight: 500; font-size: 12px; color: var(--text-muted); margin-top: 4px; }

