/* Nekro ETKA — parts catalogue. Same family as the other pages: Audi red on near-black (dark only). */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0f1117; --panel: #181c27; --panel-2: #1d2231; --border: #2a2f3e;
  --accent: #c8102e; --accent2: #e63950;
  --text: #e2e6ef; --text-hi: #fff; --muted: #7a8294; --faint: #4a5266;
  --hover: #232840; --active: #1e2640; --hl: #3a1b25;
  --ok: #3fb97a; --bad: #e5484d; --shadow: #0007;
}

html, body {
  height: 100%; font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5;
}
[hidden] { display: none !important; }
a { color: inherit; }
.num { font-variant-numeric: tabular-nums; }

.logo-ring { width: 32px; height: 32px; border: 2.5px solid var(--accent); border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.logo-ring svg { width: 18px; height: 18px; fill: var(--accent); }
h1 { font-size: 15px; font-weight: 600; letter-spacing: .03em; white-space: nowrap; }
h1 span { color: var(--accent); }

/* ── buttons & inputs ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 6px;
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  font: inherit; font-size: 12.5px; cursor: pointer; white-space: nowrap; text-decoration: none;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent2); }
.btn.danger:hover { border-color: var(--bad); color: var(--bad); }
.btn:disabled { opacity: .4; cursor: default; border-color: var(--border); }
.btn.on { background: var(--active); border-color: var(--accent); color: var(--accent2); }
.icon-btn {
  flex-shrink: 0; width: 32px; height: 32px; display: grid; place-items: center;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px;
  color: var(--muted); font-size: 14px; cursor: pointer;
}
.icon-btn:hover { border-color: var(--accent); color: var(--text); }
.hub-btn {
  display: flex; align-items: center; gap: 7px; flex-shrink: 0; padding: 6px 11px; border-radius: 6px;
  background: var(--hover); border: 1px solid var(--border); color: var(--muted);
  font: inherit; font-size: 12px; text-decoration: none; white-space: nowrap; cursor: pointer;
}
.hub-btn:hover { border-color: var(--accent); color: var(--text); }
.hub-btn svg path { stroke-linejoin: round; stroke-linecap: round; }
.manage-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }   /* edit mode is on */
.hub-btn svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.6; fill: none; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: 6px; padding: 7px 9px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }

/* ── login ── */
.login { min-height: 100%; display: grid; place-items: center; padding: 20px; }
.login-box {
  width: 100%; max-width: 360px; display: grid; gap: 14px; padding: 30px 28px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
}
.login-mast { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 6px; }
.login-box .btn { justify-content: center; }
.login-box label { display: grid; gap: 5px; font-size: 12px; color: var(--muted); }
.login-err { color: var(--bad); font-size: 12.5px; min-height: 1em; }
.login-back { font-size: 12px; color: var(--muted); text-decoration: none; text-align: center; }
.login-back:hover { color: var(--text); }

/* ── layout ── */
.app { display: grid; grid-template-columns: 280px minmax(0, 1fr); grid-template-rows: 56px 1fr; height: 100vh; }
header {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 0 20px;
  background: var(--panel); border-bottom: 1px solid var(--border); box-shadow: 0 1px 8px var(--shadow); z-index: 10;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
/* search: a magnifier in the header opens a popover under it */
.search-btn {
  flex-shrink: 0; width: 34px; height: 32px; display: grid; place-items: center;
  background: var(--hover); border: 1px solid var(--border); border-radius: 6px; color: var(--muted); cursor: pointer;
}
.search-btn:hover, .search-btn[aria-expanded="true"] { border-color: var(--accent); color: var(--text); }
.search-btn svg, .search-pop svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; flex-shrink: 0; }
.search-pop {
  position: fixed; top: 62px; right: 20px; z-index: 40; width: 420px; max-width: calc(100vw - 32px);
  display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; color: var(--muted);
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px var(--shadow);
}
.search-pop:focus-within { border-color: var(--accent); }
.search-pop input { flex: 1; min-width: 0; border: none; background: none; padding: 7px 0; }
.menu-btn {
  display: none; align-items: center; justify-content: center; width: 36px; height: 36px; flex-shrink: 0;
  background: none; border: none; cursor: pointer; color: var(--text); border-radius: 6px;
}
.menu-btn svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; }

.sidebar { background: var(--panel); border-right: 1px solid var(--border); overflow-y: auto; padding-bottom: 20px; }
.vin { padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.vin-row { display: flex; align-items: center; gap: 8px; padding: 0 16px; }
.vin-link { flex: 1; text-decoration: none; }
.vin-link:hover code { color: var(--accent2); }
.vin code { font-family: Consolas, 'Cascadia Mono', monospace; font-size: 13.5px; letter-spacing: .06em; color: var(--text-hi); }
.vin .icon-btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.vin .icon-btn.done { border-color: var(--ok); color: var(--ok); }
/* sidebar link under the VIN (Users, edit mode only) */
.side-link {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px; font-size: 13px; color: var(--text);
  text-decoration: none; border-left: 2px solid transparent; border-bottom: 1px solid var(--border);
}
.side-link:hover { background: var(--hover); }
.side-link.active { background: var(--active); border-left-color: var(--accent); }
.side-link svg { width: 22px; height: 18px; flex-shrink: 0; stroke: var(--muted); fill: none; stroke-width: 1.7; stroke-linecap: round; }
.side-link.active svg { stroke: var(--accent); }
.side-label { padding: 14px 16px 6px; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.grp, .sub {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 16px;
  font-size: 13px; color: var(--text); text-decoration: none; border-left: 2px solid transparent;
}
.grp:hover, .sub:hover { background: var(--hover); }
.grp.active, .sub.active { background: var(--active); border-left-color: var(--accent); }
.grp-code {
  width: 22px; height: 22px; box-sizing: border-box; flex-shrink: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  line-height: 1; font-variant-numeric: tabular-nums;
  font-size: 10.5px; font-weight: 700; color: var(--muted); border: 1.5px solid var(--border);
}
.grp.active .grp-code { border-color: var(--accent); color: var(--accent); }
.grp-row { position: relative; }
.grp-row .grp { padding-right: 44px; }
.grp-toggle {
  position: absolute; top: 50%; right: 8px; transform: translateY(-50%);
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  background: none; border: 0; border-radius: 6px; color: var(--muted); cursor: pointer;
}
.grp-toggle:hover { background: var(--hover); color: var(--text-hi); }
.grp-toggle svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; transition: transform .15s; }
.grp-row.open .grp-toggle svg { transform: rotate(90deg); }
.sub { align-items: flex-start; gap: 8px; padding: 6px 16px 6px 22px; font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.sub-icon { width: 18px; padding-top: 1px; flex-shrink: 0; display: flex; justify-content: center; }
.sub-icon svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sub.active .sub-icon { color: var(--accent); }
.sub-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sub-name { color: var(--text); }
.sub-code { font-size: 11px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.sub.active .sub-name { color: var(--text-hi); }

.main { overflow-y: auto; }
.overlay { display: none; }

/* scrollbars: thin, themed */
.main, .sidebar, .tbl-wrap, .dlg { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.main::-webkit-scrollbar, .sidebar::-webkit-scrollbar, .tbl-wrap::-webkit-scrollbar, .dlg::-webkit-scrollbar { width: 6px; height: 6px; }
.main::-webkit-scrollbar-track, .sidebar::-webkit-scrollbar-track, .tbl-wrap::-webkit-scrollbar-track, .dlg::-webkit-scrollbar-track { background: transparent; }
.main::-webkit-scrollbar-thumb, .sidebar::-webkit-scrollbar-thumb, .tbl-wrap::-webkit-scrollbar-thumb, .dlg::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.main::-webkit-scrollbar-thumb:hover, .sidebar::-webkit-scrollbar-thumb:hover, .tbl-wrap::-webkit-scrollbar-thumb:hover { background: var(--faint); }
.main::-webkit-scrollbar-button, .sidebar::-webkit-scrollbar-button, .tbl-wrap::-webkit-scrollbar-button, .dlg::-webkit-scrollbar-button { display: none; }
.page { max-width: 1280px; margin: 0 auto; padding: 24px 26px 80px; }

/* ── page heads ── */
.crumbs { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent2); }
.head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.head-big {
  min-width: 46px; height: 46px; padding: 0 10px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center;
  font-size: 17px; font-weight: 700; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--panel)); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.head-text { flex: 1; min-width: 200px; }
.head-title { font-size: 21px; font-weight: 600; line-height: 1.25; color: var(--text-hi); }
.head-sub { color: var(--muted); margin-top: 2px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── home grid ── */
.groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.gcard {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; text-decoration: none;
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  transition: border-color .15s, background .15s;
}
.gcard:hover { border-color: var(--accent); background: var(--hover); }
.gcard .head-big { min-width: 40px; height: 40px; font-size: 15px; }
.gcard b { display: block; font-weight: 600; color: var(--text-hi); line-height: 1.3; }
.gcard small { color: var(--muted); font-size: 12px; }
/* home: car cards */
.cars { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.car-card {
  display: flex; flex-direction: column; gap: 10px; padding: 18px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
}
.car-card:hover { border-color: var(--accent); background: var(--hover); }
.car-card.current { border-left: 3px solid var(--accent); }
.car-name { font-size: 17px; font-weight: 600; color: var(--text-hi); }
.car-vin { font-family: Consolas, 'Cascadia Mono', monospace; font-size: 13px; letter-spacing: .06em; color: var(--muted); overflow-wrap: anywhere; }
.car-card dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 12.5px; }
.car-card dt { color: var(--muted); }
.car-card dd { color: var(--text); overflow-wrap: anywhere; }
.car-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 6px; font-size: 12.5px; }
.car-foot a { color: var(--accent2); text-decoration: none; }
.car-foot a:hover { text-decoration: underline; }

/* sub group tiles: first drawing as cover */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tile { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; cursor: pointer; }
.tile:hover { border-color: var(--accent); }
.tile.is-hidden .tile-img, .tile.is-hidden .tile-text > :not(.tile-foot) { opacity: .45; }
.tile-img { aspect-ratio: 3 / 4; overflow: hidden; background: #fff; display: flex; align-items: center; justify-content: center; }   /* overflow: tall drawings fit, not stretch the frame */
.tile-img img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.tile-img img.cover { object-fit: cover; object-position: center; padding: 0; }   /* uploaded cover photo: fill the tile, centred */
.tile-img span { color: #888; font-size: 12px; }
.tile-text { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 12px; flex: 1; min-width: 0; }
.tile-text b { font-weight: 600; color: var(--text-hi); line-height: 1.3; }
.tile-text small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }   /* long code lists (ASZ,AXM,…) have no spaces */
.tile-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 8px; }
@media (max-width: 760px) { .tiles { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

/* ── tables (ETKA lists) ── */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
/* expandable panels (vehicle page) */
.panel { margin-bottom: 14px; }
.panel > summary {
  display: flex; align-items: center; gap: 10px; padding: 11px 16px; list-style: none; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; font-weight: 600; color: var(--text-hi);
}
.panel > summary::-webkit-details-marker { display: none; }
.panel > summary:hover { border-color: var(--accent); }
.panel > summary small { font-weight: 400; color: var(--muted); }
.panel > summary svg { margin-left: auto; width: 18px; height: 18px; stroke: var(--muted); fill: none; stroke-width: 2; transition: transform .15s; }
.panel:not([open]) > summary svg { transform: rotate(180deg); }
.panel[open] > summary { border-radius: 10px 10px 0 0; border-bottom-color: transparent; }
.panel[open] > .card { border-top-left-radius: 0; border-top-right-radius: 0; }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left; font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap;
  padding: 10px 12px; border-bottom: 2px solid var(--accent); background: var(--panel);
  position: sticky; top: 0; z-index: 1;
}
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr.link { cursor: pointer; }
.tbl tbody tr:hover { background: var(--hover); }
.tbl tbody tr.hl { background: var(--hl); }
.tbl tbody tr.is-hidden td:not(.acts) { opacity: .45; }
.tbl tbody tr.alt td, .tbl tbody tr.alt td.pn { color: var(--muted); }
.tbl .pn { font-family: Consolas, 'Cascadia Mono', monospace; white-space: nowrap; color: var(--text-hi); }
.tbl .muted { color: var(--muted); }
.tbl .acts { white-space: nowrap; text-align: right; width: 1%; }
.tbl .acts button { margin-left: 4px; padding: 3px 8px; font-size: 11.5px; }
.type-cell { text-align: center; }
.type { display: inline-flex; color: var(--muted); }
.type svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.type.oem { color: #e8b923; }
.type.modern_replacement { color: var(--ok); }
.type.custom { color: var(--accent2); }
.empty { padding: 26px 16px; text-align: center; color: var(--muted); }

/* ── illustration: drawing + parts ── */
.ill { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; align-items: start; }
.drawing { position: sticky; top: 0; }
.drawing-box { position: relative; background: #fff; border-radius: 8px; overflow: hidden; user-select: none; }
.drawing-box img { display: block; width: 100%; height: auto; }
.drawing-box.editing { cursor: crosshair; outline: 2px dashed var(--accent); outline-offset: -2px; }
.drawing-none { padding: 50px 16px; text-align: center; color: var(--muted); background: var(--panel-2); border-radius: 8px; }
.hot {
  position: absolute; transform: translate(-50%, -50%);
  min-width: 22px; height: 22px; padding: 0 4px; border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 12%, #fff); border: 1.5px solid var(--accent);
  color: var(--accent); font-size: 11px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.hot:hover, .hot.hl { background: var(--accent); color: #fff; }
/* placing: ghost under the pointer, and the marker being added (with its position input) */
.hot.ghost { display: grid; place-items: center; pointer-events: none; opacity: .75; border-style: dashed; }
.hot.ghost:hover { background: color-mix(in srgb, var(--accent) 12%, #fff); color: var(--accent); }
.hot.pending { padding: 0; height: auto; background: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); cursor: default; }
.hot.pending:hover { background: #fff; }
.hot-input { width: 46px; padding: 2px 4px; border: 0; border-radius: 3px; background: #fff; color: var(--accent);
  font-size: 12px; font-weight: 700; text-align: center; }
.hot-input:focus { border: 0; }
.drawing-tools { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; align-items: center; }
.drawing-tools .hint { font-size: 12px; color: var(--muted); }

/* ── dialog ── */
.dlg {
  margin: auto; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px);
  background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 20px 60px var(--shadow);
}
.dlg::backdrop { background: #000a; }
.dlg form { display: grid; gap: 12px; padding: 20px; }
.dlg h2 { font-size: 16px; font-weight: 600; color: var(--text-hi); }
.dlg .fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.dlg label { display: grid; gap: 4px; font-size: 11.5px; color: var(--muted); }
.dlg label.wide { grid-column: 1 / -1; }
.dlg label.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); cursor: pointer; }
.dlg label.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.dlg .err { color: var(--bad); font-size: 12.5px; }
.dlg .btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

/* ── responsive ── */
@media (max-width: 1100px) {
  .ill { grid-template-columns: 1fr; }
  .drawing { position: static; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .menu-btn { display: flex; }
  .sidebar {
    position: fixed; top: 56px; left: 0; bottom: 0; width: 280px; max-width: 85vw; z-index: 30;
    transform: translateX(-100%); transition: transform .2s; box-shadow: 4px 0 20px var(--shadow);
  }
  .sidebar.open { transform: none; }
  .overlay { position: fixed; inset: 56px 0 0; background: #0008; z-index: 20; display: none; }
  .overlay.open { display: block; }
  header { padding: 0 12px; gap: 8px; }
  .brand h1 { display: none; }
  .search-pop { left: 16px; right: 16px; width: auto; max-width: none; }
  .hub-btn span { display: none; }
  .page { padding: 18px 16px 70px; }
  .dlg .fields { grid-template-columns: 1fr; }
}

/* instant hint for icons */
[data-tip] { position: relative; }
[data-tip]:hover::after {
  content: attr(data-tip); position: absolute; right: calc(100% + 6px); top: 50%; transform: translateY(-50%);
  padding: 3px 8px; border-radius: 6px; background: var(--text-hi); color: var(--bg); font-size: 11.5px; white-space: nowrap;
  pointer-events: none; z-index: 5;
}

/* ⋯ actions menu */
.menu { display: inline-block; }
.btn.dots { padding: 2px 10px; font-size: 16px; line-height: 1; letter-spacing: 1px; }
.menu-list {
  position: fixed; z-index: 30; min-width: 180px; display: flex; flex-direction: column; padding: 4px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.menu-list[hidden] { display: none; }
.menu-list button {
  text-align: left; padding: 7px 10px; border: 0; border-radius: 6px; background: none; color: var(--text); font: inherit; font-size: 13px; cursor: pointer;
}
.menu-list button:hover { background: var(--hover); }
.menu-list button.danger { color: var(--bad); }

/* part number with copy button */
.pn-wrap { display: inline-flex; align-items: flex-start; gap: 6px; white-space: nowrap; }
.copy { display: inline-flex; padding: 3px; border: 0; border-radius: 5px; background: none; color: var(--muted); cursor: pointer; opacity: .5; }
.copy svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
tr:hover .copy, .copy:focus-visible { opacity: 1; }
.copy:hover { color: var(--text-hi); background: var(--hover); }
.copy.done { color: var(--ok); opacity: 1; }
.sub-line { display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted); }
.pn-brand { display: block; margin-top: 2px; font-family: 'Segoe UI', system-ui, sans-serif; font-size: 11.5px; font-weight: 400; color: var(--muted); letter-spacing: 0; }

/* shopping cart */
.cart-btn { position: relative; }
.cart-count {
  min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff;
  font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center;
}
.cart-count[hidden] { display: none; }
.cart-check { width: 34px; }
.cart-check input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.tbl tbody tr.is-bought td:not(.acts):not(.cart-check) { opacity: .45; text-decoration: line-through; }

/* visibility page: a user's cars as removable chips + a type-ahead field to add one */
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 999px;
  background: var(--active); border: 1px solid var(--border); color: var(--text-hi); font-size: 12.5px; white-space: nowrap;
}
.chip button {
  width: 20px; height: 20px; display: grid; place-items: center; border: 0; border-radius: 50%;
  background: none; color: var(--muted); font-size: 15px; line-height: 1; cursor: pointer;
}
.chip button:hover { background: var(--accent); color: #fff; }
.chip-add { width: 220px; max-width: 100%; padding: 4px 9px; font-size: 12.5px; }
.bad { color: var(--bad); }
