/* Recipeazy: clean app-style UI. Light/dark via prefers-color-scheme. */
:root {
  --bg: #f5f5f2;
  --surface: #ffffff;
  --surface-2: #efefeb;
  --surface-3: #e6e6e1;
  --text: #191917;
  --muted: #6d6d67;
  --line: #e3e3de;
  --accent: #e4572e;
  --accent-ink: #ffffff;
  --accent-soft: #fde8e0;
  --green: #2e8b4f;
  --green-soft: #e1f2e6;
  --danger: #c8372d;
  --star: #f2a516;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgb(20 20 15 / .04), 0 8px 28px rgb(20 20 15 / .07);
  --shadow-lift: 0 2px 4px rgb(20 20 15 / .06), 0 16px 40px rgb(20 20 15 / .12);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --tabbar-h: 64px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121211;
    --surface: #1c1c1a;
    --surface-2: #262623;
    --surface-3: #31312d;
    --text: #f1f1ec;
    --muted: #a2a29a;
    --line: #2e2e2a;
    --accent: #ff6b3d;
    --accent-soft: #3b2117;
    --green: #5fca83;
    --green-soft: #17311f;
    --danger: #ff6b5f;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 28px rgb(0 0 0 / .35);
    --shadow-lift: 0 2px 4px rgb(0 0 0 / .4), 0 16px 40px rgb(0 0 0 / .5);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 24px);
}
@media (min-width: 800px) { body { padding-bottom: 48px; } }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); font-weight: 750; }
h2 { font-size: 1.15rem; font-weight: 700; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
code { background: var(--surface-2); padding: .1em .35em; border-radius: 6px; font-size: .9em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.error { color: var(--danger); }
.icon { flex-shrink: 0; vertical-align: -0.18em; }
.narrow-col { max-width: 640px; }
.stack { display: grid; gap: 14px; }
.stack > * { margin: 0; }

/* --- top bar & tab bar --- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  margin-bottom: 20px;
}
.topbar-inner { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.03em; color: var(--text); }
.brand span { color: var(--accent); }
.brand:hover { text-decoration: none; }
.topnav { display: none; gap: 4px; }
.topnav a { color: var(--muted); font-weight: 600; padding: 8px 12px; border-radius: 999px; }
.topnav a:hover { background: var(--surface-2); text-decoration: none; }
.topnav a[aria-current] { color: var(--text); background: var(--surface-2); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.hide-mobile { display: none !important; }
@media (min-width: 800px) {
  .topnav { display: flex; }
  .hide-mobile { display: inline-flex !important; }
}

.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 30;
  display: flex; justify-content: space-around; align-items: center;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid var(--line);
}
.tabbar a { flex: 1; display: grid; justify-items: center; gap: 2px; color: var(--muted); font-size: .7rem; font-weight: 600; padding: 6px 0; }
.tabbar a:hover { text-decoration: none; }
.tabbar a[aria-current] { color: var(--accent); }
.tabbar .icon { height: 24px; }
.tabbar .tab-add .icon { background: var(--accent); color: var(--accent-ink); border-radius: 9px; padding: 2px; width: 42px; }
@media (min-width: 800px) { .tabbar { display: none; } }

/* --- controls --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 999px; border: 0; cursor: pointer;
  font: inherit; font-weight: 650; color: var(--text); background: var(--surface-2);
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease; white-space: nowrap;
}
.btn:hover { text-decoration: none; background: var(--surface-3); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, black); }
.btn-ghost { background: var(--surface-2); }
.btn-danger { background: transparent; color: var(--danger); }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 12%, transparent); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: .9rem; }
.btn-block { width: 100%; }
.btn[aria-busy="true"] { opacity: .7; pointer-events: none; }
.btn[aria-busy="true"]::after { content: ""; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--muted); cursor: pointer; }
.icon-btn:hover { color: var(--danger); }
.link-muted { color: var(--muted); font-size: .9rem; display: inline-flex; align-items: center; gap: 4px; }

label { display: grid; gap: 6px; font-size: .875rem; font-weight: 600; color: var(--muted); }
input, select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 14px; outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--accent); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }

.segmented { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; }
.segmented a, .segmented label span { display: block; padding: 5px 11px; border-radius: 999px; color: var(--muted); font-weight: 650; font-size: .85rem; cursor: pointer; }
.segmented a:hover { text-decoration: none; color: var(--text); }
.segmented a[aria-current], .segmented input:checked + span { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgb(0 0 0 / .12); }
.segmented label { display: block; position: relative; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented-lg a, .segmented-lg label span { padding: 7px 14px; font-size: .9rem; }

.panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px; }
.panel-error { border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); }
.panel-error ul { margin: 6px 0 0; padding-left: 18px; }
.toast { background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 14px; margin-bottom: 16px; font-weight: 600; box-shadow: var(--shadow); animation: pop .25s ease; }
.page-head { display: flex; align-items: baseline; gap: 12px; margin: 4px 0 16px; }
.page-head h1 { margin: 0; }
.back { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row-actions form { margin: 0; }
.page-actions { margin: 8px 0 24px; }
.two, .three { display: grid; gap: 14px; margin-bottom: 14px; }
@media (min-width: 700px) { .two { grid-template-columns: 1fr 1fr; } .three { grid-template-columns: repeat(3, 1fr); } }
.spinner { width: 18px; height: 18px; border: 2.5px solid var(--surface-3); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { from { transform: translateY(-6px); opacity: 0; } }

/* --- tags, chips, pills --- */
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; font-weight: 650; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.tag-green { background: var(--green-soft); color: var(--green); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 12px; border-radius: 999px; background: var(--surface-2); font-size: .9rem; font-weight: 600; color: var(--text); margin: 0; }
.chip-on { background: var(--accent-soft); color: var(--accent); }
.chip-off { background: var(--surface-3); color: var(--muted); text-decoration: line-through; }
.chip-x { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 0; background: transparent; color: inherit; cursor: pointer; padding: 0; }
.chip-x:hover { background: rgb(0 0 0 / .08); }
.pill-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.pill-row::-webkit-scrollbar { display: none; }
.pill-wrap { flex-wrap: wrap; overflow: visible; }
.pill {
  position: relative; display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; cursor: pointer; user-select: none;
  padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  color: var(--text); font-size: .9rem; font-weight: 600; transition: all .15s;
}
.pill small { color: var(--muted); font-weight: 600; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill:has(input:checked) { background: var(--text); color: var(--bg); border-color: var(--text); }
.pill:has(input:checked) small { color: inherit; opacity: .7; }
.pill:has(input:focus-visible) { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
.pill-region { font-weight: 750; }
.cuisine-group { margin-bottom: 4px; }

/* --- filters --- */
.filters { display: grid; gap: 12px; margin-bottom: 22px; }
.filters > *, .filter-grid > *, .edit-layout > *, .recipe-grid > * { min-width: 0; }
.search { position: relative; display: block; }
.search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 42px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); border-color: transparent; height: 50px; }
.filter-grid { display: grid; gap: 10px; }
@media (min-width: 800px) { .filter-grid { grid-template-columns: 1fr 1fr; } }
.picker {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 6px 8px; min-height: 50px;
}
.picker:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.picker-label { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 0 6px; }
.picker input.picker-input { flex: 1; min-width: 140px; border: 0; box-shadow: none; padding: 6px 4px; background: transparent; }
.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; max-height: 320px; overflow: auto;
  background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lift); padding: 6px; margin: 0; list-style: none;
}
.suggest li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.suggest li small { color: var(--muted); }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--surface-2); }
.suggest .empty-hint { color: var(--muted); cursor: default; }

/* --- recipe cards --- */
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.card {
  display: flex; flex-direction: column; overflow: hidden; color: inherit;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.card-media { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.card-placeholder { height: 100%; display: grid; place-items: center; color: var(--muted); }
.match-pill { position: absolute; top: 10px; left: 10px; background: rgb(15 15 12 / .72); color: #fff; font-weight: 750; font-size: .85rem; padding: 4px 10px; border-radius: 999px; backdrop-filter: blur(8px); }
.card-body { padding: 14px 16px 16px; display: grid; gap: 8px; }
.card-title { font-size: 1.05rem; line-height: 1.3; letter-spacing: -0.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: .85rem; color: var(--muted); }
.card-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.card-miss { font-size: .8rem; color: var(--muted); }
.stars { color: var(--surface-3); letter-spacing: 1px; font-size: .9rem; }
.stars .on { color: var(--star); }
@media (max-width: 559px) {
  .cards { gap: 12px; }
  .card { flex-direction: row; border-radius: 18px; }
  .card-media { width: 112px; aspect-ratio: auto; flex-shrink: 0; }
  .card-body { padding: 12px 14px; align-content: center; }
}
.empty { text-align: center; padding: 48px 16px; }
.empty-art, .auth-art { font-size: 56px; line-height: 1; margin-bottom: 12px; }

/* --- recipe page --- */
.recipe { margin-bottom: 8px; }
.hero { border-radius: var(--radius); overflow: hidden; height: clamp(180px, 34vw, 340px); box-shadow: var(--shadow); margin-bottom: 20px; background: var(--surface-2); }
.hero img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.recipe-head { margin-bottom: 16px; }
.recipe-head h1 { margin-bottom: 8px; }
.lead { font-size: 1.1rem; color: var(--muted); margin: 0 0 6px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.stat { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); padding: 12px 14px; display: grid; gap: 2px; color: var(--muted); font-size: .8rem; font-weight: 600; }
.stat strong { color: var(--text); font-size: 1.1rem; letter-spacing: -0.01em; }
.stat-total { background: var(--accent-soft); }
.stat-total, .stat-total strong { color: var(--accent); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.toolbar-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.stepper { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 999px; box-shadow: var(--shadow); padding: 5px; color: var(--muted); font-size: .9rem; font-weight: 600; }
.stepper button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--text); font-size: 1.2rem; cursor: pointer; }
.stepper input { width: 52px; text-align: center; border: 0; padding: 4px; font-weight: 750; background: transparent; box-shadow: none; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.stepper > span { display: inline-flex; align-items: center; gap: 4px; padding-right: 8px; }
.recipe-grid { display: grid; gap: 16px; align-items: start; }
@media (min-width: 900px) { .recipe-grid { grid-template-columns: minmax(300px, 2fr) 3fr; } .ingredients { position: sticky; top: 76px; } }
.recipe-grid .panel { margin: 0; }
h3.section { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin: 18px 0 4px; }
.checklist { list-style: none; padding: 0; margin: 0 0 16px; }
.checklist li { border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist label { display: flex; align-items: flex-start; gap: 12px; padding: 11px 0; color: var(--text); font-weight: 500; font-size: 1rem; cursor: pointer; }
.checklist input { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; }
.checklist input:not(:checked) + span { color: var(--muted); text-decoration: line-through; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 18px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 34px 1fr; gap: 14px; line-height: 1.6; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 750; font-size: .95rem; }
.parsing { display: flex; gap: 14px; align-items: center; }
.parsing p { margin: 2px 0 0; }
details.panel summary { cursor: pointer; font-weight: 650; display: flex; align-items: center; gap: 8px; list-style: none; }
details.panel summary::-webkit-details-marker { display: none; }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.thumbs img { height: 110px; border-radius: 12px; object-fit: cover; }
.stars-input { position: relative; display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; margin-bottom: 10px; }
.stars-input input { position: absolute; opacity: 0; width: 1px; }
.stars-input label { font-size: 2rem; line-height: 1; cursor: pointer; color: var(--surface-3); padding: 0 2px; display: inline; }
.stars-input input:checked ~ label, .stars-input label:hover, .stars-input label:hover ~ label { color: var(--star); }
.stars-input input:focus-visible + label { outline: 2px solid var(--accent); border-radius: 4px; }
.panel form textarea { margin-bottom: 12px; }

/* --- upload & auth --- */
.dropzone {
  display: grid; justify-items: center; gap: 8px; text-align: center; cursor: pointer;
  padding: 40px 20px; border-radius: var(--radius); background: var(--surface); border: 2px dashed var(--line);
  color: var(--text); font-size: 1rem; transition: border-color .15s, background .15s; position: relative;
}
.dropzone:hover, .dropzone:focus-within { border-color: var(--accent); background: color-mix(in srgb, var(--accent-soft) 40%, var(--surface)); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: var(--accent-soft); color: var(--accent); }
@media (pointer: coarse) { .desktop-only { display: none; } }
#upload-form { display: grid; gap: 16px; }
.auth { max-width: 400px; margin: 6vh auto; text-align: center; padding: 32px 24px; }
.auth form { text-align: left; margin: 16px 0; }

/* --- edit --- */
.edit-layout { display: grid; gap: 16px; }
@media (min-width: 1000px) {
  .edit-layout { grid-template-columns: minmax(260px, 1fr) 2fr; align-items: start; }
  .sources { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow: auto; border-radius: var(--radius); }
}
@media (max-width: 999px) { .sources { max-height: 40vh; overflow: auto; border-radius: var(--radius); box-shadow: var(--shadow); } }
.sources img { width: 100%; margin-bottom: 8px; border-radius: 12px; }
.edit .panel h2 { margin-bottom: 12px; }
.ing-row, .step-row, .sec-row { display: grid; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.row-item input, .row-item textarea { padding: 8px 10px; font-size: 15px; border-radius: 10px; }
.ing-row { grid-template-columns: 4.2rem 5.5rem 1fr 38px; grid-template-areas: "qty uen nen rm" "ten ten ten ten" ". unl nnl nnl" "tnl tnl tnl tnl" "link link link link"; }
@media (min-width: 760px) {
  .ing-row { grid-template-columns: 4.2rem 5.5rem 1.4fr 1fr 1fr 38px; grid-template-areas: "qty uen nen ten link rm" ". unl nnl tnl link ."; align-items: center; }
}
.a-qty { grid-area: qty; } .a-uen { grid-area: uen; } .a-nen { grid-area: nen; } .a-ten { grid-area: ten; } .a-rm { grid-area: rm; }
.a-unl { grid-area: unl; } .a-nnl { grid-area: nnl; } .a-tnl { grid-area: tnl; } .a-link { grid-area: link; }
.link-field { position: relative; display: block; }
.link-field .icon { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--accent); }
.link-field input { padding-left: 28px; background: var(--surface-2); border-color: transparent; color: var(--accent); font-weight: 600; }
.sec-row { grid-template-columns: 1fr 1fr 38px; padding-top: 18px; }
.sec-row input { font-weight: 750; text-transform: uppercase; letter-spacing: .04em; font-size: 13px; color: var(--accent); }
.step-row { grid-template-columns: 1fr 38px; }
.step-row textarea { grid-column: 1; }
.step-row .remove { grid-column: 2; grid-row: 1; }
@media (min-width: 760px) { .step-row { grid-template-columns: 1fr 1fr 38px; } .step-row textarea:nth-child(2) { grid-column: 2; grid-row: 1; } .step-row .remove { grid-column: 3; } }
.edit .row-actions { margin-top: 12px; }
.sticky-save {
  position: sticky; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 10px); z-index: 10;
  display: flex; justify-content: flex-end; gap: 10px; padding: 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 85%, transparent); backdrop-filter: blur(12px); box-shadow: var(--shadow-lift);
}
@media (min-width: 800px) { .sticky-save { bottom: 16px; } }

/* --- ingredients admin --- */
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree { padding: 8px; margin-top: 14px; }
.tree ul { margin-left: 18px; border-left: 2px solid var(--line); padding-left: 8px; }
.tree-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--text); }
.tree-row:hover { background: var(--surface-2); text-decoration: none; }
.tree-name { font-weight: 650; }
.tree-badges { margin-left: auto; display: flex; gap: 6px; }
.inline-form { display: flex; gap: 10px; }
.inline-form input { flex: 1; }
