/* Apple-style, light + dark. Plain CSS, no build step. */

:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --grouped: #f2f2f7;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #8e8e93;
  --sep: rgba(60, 60, 67, 0.12);
  --fill: rgba(118, 118, 128, 0.12);
  --fill-hover: rgba(118, 118, 128, 0.2);
  --hover: rgba(0, 0, 0, 0.025);
  --seg-on: #ffffff;
  --check-border: #c7c7cc;
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --blue-soft: rgba(0, 113, 227, 0.08);
  --ring: rgba(0, 113, 227, 0.35);
  --green: #1f8a3b;
  --green-soft: rgba(52, 199, 89, 0.16);
  --green-dot: #34c759;
  --orange: #b25000;
  --orange-soft: rgba(255, 149, 0, 0.16);
  --red: #d70015;
  --red-dot: #ff3b30;
  --red-soft: rgba(255, 59, 48, 0.1);
  --gray-soft: rgba(118, 118, 128, 0.14);
  --bar: rgba(245, 245, 247, 0.78);
  --toast: rgba(29, 29, 31, 0.92);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 20px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 24px 80px rgba(0, 0, 0, 0.22), 0 0 0 0.5px rgba(0, 0, 0, 0.08);
  --radius: 16px;
  --cols: 22px 34px minmax(0, 1.5fr) minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 0.75fr) 132px 96px 24px;
  --width: 1320px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1c1c1e;
    --grouped: #000000;
    --text: #f5f5f7;
    --text-2: #98989d;
    --text-3: #6c6c70;
    --sep: rgba(84, 84, 88, 0.55);
    --fill: rgba(118, 118, 128, 0.24);
    --fill-hover: rgba(118, 118, 128, 0.34);
    --hover: rgba(255, 255, 255, 0.03);
    --seg-on: #636366;
    --check-border: #545458;
    --blue: #0a84ff;
    --blue-hover: #409cff;
    --blue-soft: rgba(10, 132, 255, 0.14);
    --ring: rgba(10, 132, 255, 0.45);
    --green: #30d158;
    --green-soft: rgba(48, 209, 88, 0.18);
    --green-dot: #30d158;
    --orange: #ff9f0a;
    --orange-soft: rgba(255, 159, 10, 0.18);
    --red: #ff453a;
    --red-dot: #ff453a;
    --red-soft: rgba(255, 69, 58, 0.15);
    --gray-soft: rgba(118, 118, 128, 0.24);
    --bar: rgba(22, 22, 23, 0.78);
    --toast: rgba(58, 58, 60, 0.95);
    --shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.06);
    --shadow-lg: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 0 0.5px rgba(255, 255, 255, 0.1);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", Inter, Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.4;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.subtle { color: var(--text-2); }
.spacer { flex: 1; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: var(--bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--sep);
}
.topbar-inner {
  max-width: var(--width); margin: 0 auto; height: 52px; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; letter-spacing: -0.02em; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(180deg, #3b9cff, #0071e3);
}
.topbar-actions { display: flex; align-items: center; gap: 8px; }

/* ---------- Buttons ---------- */
.btn {
  appearance: none; border: 0; cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 16px; border-radius: 980px;
  font-family: inherit; font-size: 14px; font-weight: 500; letter-spacing: -0.01em;
  color: var(--text); background: var(--fill);
  transition: background-color 0.15s, transform 0.1s, opacity 0.15s;
}
.btn:hover { background: var(--fill-hover); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: default; transform: none; }
.btn:disabled:hover { background: var(--fill); }
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-hover); }
.btn.primary:disabled:hover { background: var(--blue); }
.btn.destructive { background: var(--red-dot); color: #fff; }
.btn.plain { background: transparent; color: var(--blue); padding: 0 10px; }
.btn.plain:hover { background: var(--blue-soft); }
.btn.plain.danger { color: var(--red); }
.btn.plain.danger:hover { background: var(--red-soft); }
.btn.strong { font-weight: 600; }
.btn.small { height: 30px; padding: 0 14px; font-size: 13px; }
.btn.busy { pointer-events: none; }
.btn.busy::before {
  content: ""; width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  appearance: none; border: 0; cursor: pointer; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; color: var(--text-2); background: transparent;
  transition: background-color 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--fill); color: var(--text); }

.link {
  appearance: none; border: 0; background: none; padding: 0; cursor: pointer;
  font: inherit; color: var(--blue);
}
.link:hover { text-decoration: underline; }
.link.busy { opacity: 0.5; pointer-events: none; }

/* ---------- Page ---------- */
main { max-width: var(--width); margin: 0 auto; padding: 36px 24px 120px; }
.intro h1 { margin: 0; font-size: 34px; line-height: 1.1; font-weight: 700; letter-spacing: -0.025em; }
.intro p { margin: 8px 0 0; font-size: 15px; max-width: 72ch; }

.banner {
  display: flex; align-items: center; gap: 14px; margin-top: 24px; padding: 14px 18px;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
}
.banner-icon {
  flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--orange-soft); color: var(--orange); font-weight: 700; font-size: 14px;
}
.banner-text { flex: 1; display: flex; flex-wrap: wrap; gap: 2px 8px; font-size: 14px; }

/* ---------- Controls ---------- */
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 28px 0 14px; }
.segmented {
  display: inline-flex; gap: 2px; padding: 2px; border-radius: 10px; background: var(--fill);
  max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.segmented::-webkit-scrollbar { display: none; }
.segmented button {
  appearance: none; border: 0; background: transparent; cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 8px;
  font-family: inherit; font-size: 13px; font-weight: 500; color: var(--text);
  transition: background-color 0.2s, box-shadow 0.2s;
}
.segmented button[aria-selected="true"] {
  background: var(--seg-on);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
}
.segmented .count { color: var(--text-2); font-size: 12px; font-variant-numeric: tabular-nums; }

.search { position: relative; display: flex; align-items: center; flex: 1 1 160px; max-width: 240px; }
.search svg { position: absolute; left: 10px; color: var(--text-3); pointer-events: none; }
.search input {
  width: 100%; height: 34px; padding: 0 12px 0 32px; border: 0; border-radius: 10px;
  background: var(--fill); color: var(--text); font-family: inherit; font-size: 14px;
}
.search input::placeholder { color: var(--text-3); }
.search input:focus { outline: none; box-shadow: 0 0 0 3.5px var(--ring); }
.picker { position: relative; display: flex; align-items: center; flex: none; }
.picker select {
  appearance: none; -webkit-appearance: none; height: 34px; padding: 0 30px 0 12px; border: 0; border-radius: 10px;
  background: var(--fill); color: var(--text); font-family: inherit; font-size: 14px; cursor: pointer;
}
.picker select:focus { outline: none; box-shadow: 0 0 0 3.5px var(--ring); }
.picker svg { position: absolute; right: 11px; color: var(--text-2); pointer-events: none; }
.picker.active select { background: var(--blue-soft); color: var(--blue); font-weight: 500; }
.picker.active svg { color: var(--blue); }
.actions { display: flex; gap: 8px; margin-left: auto; }

/* Filters: pickers + smart chips */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -2px 0 16px; }
.filters-sep { width: 1px; height: 20px; background: var(--sep); margin: 0 4px; }
.chip {
  appearance: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px;
  border: 1px solid var(--sep); border-radius: 980px; background: var(--surface); color: var(--text);
  font-family: inherit; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.chip:hover { border-color: var(--check-border); }
.chip .count { color: var(--text-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.chip[aria-pressed="true"] .count { color: rgba(255, 255, 255, 0.8); }
.chip[aria-pressed="true"]::before {
  content: ""; width: 12px; height: 12px; margin-left: -2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10.5l4 4L16 6' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- List ---------- */
.list { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.list-head, .row {
  display: grid; grid-template-columns: var(--cols); align-items: center; column-gap: 14px; padding: 0 20px;
}
.list-head {
  height: 44px; border-bottom: 1px solid var(--sep);
  font-size: 12px; font-weight: 500; color: var(--text-2);
}
.list-head .sel { grid-column: span 2; display: flex; gap: 10px; align-items: center; }
.list-head label { cursor: pointer; }
.sort {
  appearance: none; border: 0; background: none; padding: 0; cursor: pointer; justify-self: start;
  display: inline-flex; align-items: center; gap: 4px; font: inherit; color: inherit;
}
.sort:hover, .sort.on { color: var(--text); }
.sort[data-dir="asc"]::after { content: "↑"; }
.sort[data-dir="desc"]::after { content: "↓"; }
#rows { list-style: none; margin: 0; padding: 0; }
.row { position: relative; min-height: 64px; padding-top: 10px; padding-bottom: 10px; cursor: pointer; }
.row + .row::before {
  content: ""; position: absolute; top: 0; right: 0; left: 92px; height: 1px; background: var(--sep);
}
.row:hover { background: var(--hover); }
.row.selected { background: var(--blue-soft); }
.row:focus-visible { outline-offset: -3px; }

.check {
  appearance: none; -webkit-appearance: none; margin: 0; cursor: pointer;
  width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--check-border);
  background: transparent center / 100% no-repeat; transition: background-color 0.15s, border-color 0.15s;
}
.check:checked, .check:indeterminate { background-color: var(--blue); border-color: var(--blue); }
.check:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.2l2.7 2.7L14.2 7.3' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.check:indeterminate {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6.5 10h7' stroke='white' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
}
.check:disabled { opacity: 0.4; cursor: default; }

.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: linear-gradient(180deg, #a8adb7, #868a95); color: #fff;
  font-size: 13px; font-weight: 600; letter-spacing: 0.02em;
}
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.who, .cell { min-width: 0; display: flex; flex-direction: column; }
.name, .sub, .cell-main, .col-company { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.name { font-weight: 600; letter-spacing: -0.01em; }
.sub { font-size: 13px; color: var(--text-2); }
.sub:empty { display: none; }
.cell { font-size: 14px; }
.l-meta { display: none; }
.verified { color: var(--blue); vertical-align: -2px; }
.li-link {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; color: var(--text-3);
}
.li-link:hover { color: #0a66c2; background: var(--fill); }
.more { padding: 14px; text-align: center; border-top: 1px solid var(--sep); }

.match { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); min-width: 0; }
.match .role { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.score {
  display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 7px; border-radius: 11px;
  font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.score.high { background: var(--green-soft); color: var(--green); }
.score.mid { background: var(--orange-soft); color: var(--orange); }
.score.low { background: var(--gray-soft); color: var(--text-2); }

.status { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot.ready { background: var(--blue); }
.dot.drafted { background: var(--green-dot); }
.dot.failed { background: var(--red-dot); }
.status.failed { color: var(--red); }

.empty { padding: 72px 24px; text-align: center; }
.empty h3 { margin: 14px 0 4px; font-size: 19px; letter-spacing: -0.015em; }
.empty p { margin: 0 auto; max-width: 42ch; color: var(--text-2); }
.empty .btn { margin-top: 18px; }
.empty-icon {
  width: 56px; height: 56px; margin: 0 auto; border-radius: 16px; display: grid; place-items: center;
  background: var(--blue-soft); color: var(--blue);
}

/* ---------- Sheets (dialogs) ---------- */
dialog { border: 0; padding: 0; background: transparent; color: var(--text); max-width: none; max-height: none; }
dialog::backdrop { background: rgba(0, 0, 0, 0.3); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
dialog[open] { animation: pop-in 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.08); }
@keyframes pop-in { from { opacity: 0; transform: translateY(14px) scale(0.98); } }

.sheet { width: min(640px, calc(100vw - 32px)); }
.sheet-card {
  display: flex; flex-direction: column; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px);
  background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden;
}
.sheet-card.grouped { background: var(--grouped); }
@media (prefers-color-scheme: dark) { .sheet-card { background: #1c1c1e; } }
.sheet-head { display: flex; align-items: flex-start; gap: 16px; padding: 22px 22px 6px; }
.sheet-head.compact { align-items: center; padding: 16px 16px 8px 22px; }
.sheet-head h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.sheet-title { flex: 1; min-width: 0; }
.sheet-title p { margin: 2px 0 0; font-size: 14px; }
.sheet-title .links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; }
.close-btn {
  appearance: none; border: 0; cursor: pointer; flex: none; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: var(--fill); color: var(--text-2);
}
.close-btn:hover { background: var(--fill-hover); color: var(--text); }
.sheet-body { padding: 8px 22px 22px; overflow-y: auto; }
.sheet-foot { display: flex; align-items: center; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--sep); }

.match-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 10px 0 0; font-size: 14px; color: var(--text-2); }
.match-line:empty { display: none; }
.lang-line { margin: 6px 0 0; font-size: 13px; color: var(--text-2); }
.edited-line { margin: 12px 0 0; font-size: 13px; color: var(--text-2); }
.match-line strong { color: var(--text); font-weight: 600; }
.note {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px;
  margin: 14px 0 0; padding: 10px 14px; border-radius: 12px; font-size: 14px;
}
.note .link { font-weight: 600; }
.note.ok { background: var(--green-soft); color: var(--green); }
.note.error { background: var(--red-soft); color: var(--red); }

.field { display: block; margin-top: 16px; }
.field > span { display: block; margin: 0 0 6px 2px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.input {
  width: 100%; padding: 10px 13px; border: 0; border-radius: 12px;
  background: var(--fill); color: var(--text); font-family: inherit; font-size: 15px; line-height: 1.5;
  transition: box-shadow 0.15s, background-color 0.15s;
}
.input::placeholder { color: var(--text-3); }
.input:focus { outline: none; background: var(--surface); box-shadow: 0 0 0 1px var(--blue), 0 0 0 4px var(--ring); }
textarea.input { resize: vertical; min-height: 120px; }

/* Settings: iOS grouped list */
.group-title { margin: 18px 0 6px 16px; font-size: 13px; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.02em; }
.group { background: var(--surface); border-radius: 12px; overflow: hidden; }
@media (prefers-color-scheme: dark) { .group { background: #2c2c2e; } }
.group-note { margin: 6px 16px 0; font-size: 13px; color: var(--text-2); }
.g-row, .g-stack { position: relative; display: grid; padding: 0 16px; }
.g-row { grid-template-columns: 130px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 46px; }
.g-row + .g-row::before, .g-stack + .g-stack::before {
  content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--sep);
}
.g-row label { font-size: 15px; }
.g-row input, .g-stack textarea {
  width: 100%; border: 0; background: transparent; color: var(--text);
  font-family: inherit; font-size: 15px; padding: 12px 0;
}
.g-row input::placeholder, .g-stack textarea::placeholder { color: var(--text-3); }
.g-row input:focus, .g-stack textarea:focus { outline: none; }
.g-row:focus-within, .g-stack:focus-within { background: var(--blue-soft); }
.g-stack { padding-top: 12px; }
.g-stack span { font-size: 13px; color: var(--text-2); }
.g-stack textarea { padding: 4px 0 12px; resize: vertical; line-height: 1.5; }
.with-action { display: flex; align-items: center; gap: 10px; }
.with-action .link { font-size: 14px; }
.advanced { margin-top: 22px; }
.advanced summary {
  cursor: pointer; margin: 0 0 6px 16px; font-size: 13px; color: var(--text-2);
  text-transform: uppercase; letter-spacing: 0.02em; list-style: none; width: fit-content;
}
.advanced summary::-webkit-details-marker { display: none; }
.advanced summary::after { content: "›"; display: inline-block; margin-left: 6px; transition: transform 0.2s; }
.advanced[open] summary::after { transform: rotate(90deg); }
.danger-group { margin-top: 28px; }
.g-button {
  appearance: none; border: 0; width: 100%; min-height: 46px; padding: 0 16px; cursor: pointer;
  background: transparent; font-family: inherit; font-size: 15px; text-align: left; color: var(--blue);
}
.g-button.danger { color: var(--red); }
.g-button:hover { background: var(--hover); }

/* Alert */
.alert { width: min(320px, calc(100vw - 48px)); }
.alert form {
  padding: 22px 20px 16px; text-align: center; border-radius: 18px;
  background: var(--surface); box-shadow: var(--shadow-lg);
}
@media (prefers-color-scheme: dark) { .alert form { background: #2c2c2e; } }
.alert h3 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.alert p { margin: 6px 0 0; font-size: 14px; color: var(--text-2); }
.alert p:empty { display: none; }
.alert-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }

/* Toast */
.toast {
  position: fixed; inset: auto 0 28px; margin: 0 auto; width: max-content; max-width: min(560px, calc(100vw - 32px));
  padding: 12px 18px; border: 0; border-radius: 14px; overflow: visible;
  background: var(--toast); color: #fff; font-size: 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  animation: toast-in 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}
.toast.error { background: var(--red-dot); }
.toast a { margin-left: 10px; color: #8cc4ff; font-weight: 600; }
.toast.error a { color: #fff; text-decoration: underline; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(0.96); } }

/* Selection bar */
.selbar {
  position: fixed; left: 50%; translate: -50% 0; bottom: 24px; z-index: 30; max-width: calc(100vw - 24px);
  display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 18px; border-radius: 980px;
  background: var(--toast); color: #fff; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  animation: selbar-in 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}
@keyframes selbar-in { from { opacity: 0; transform: translateY(16px); } }
.selbar-count { margin-right: 6px; font-size: 14px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.selbar .btn:not(.primary):not(.destructive) { background: rgba(255, 255, 255, 0.14); color: #fff; }
.selbar .btn:not(.primary):not(.destructive):hover { background: rgba(255, 255, 255, 0.24); }
.selbar-close {
  appearance: none; border: 0; cursor: pointer; flex: none; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255, 255, 255, 0.14); color: #fff;
}
.selbar-close:hover { background: rgba(255, 255, 255, 0.24); }
body.has-selection .toast { inset: auto 0 92px; }

/* Drop target */
#drop-overlay {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; pointer-events: none;
  background: var(--blue-soft); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
#drop-overlay div {
  padding: 22px 32px; border-radius: 20px; border: 2px dashed var(--blue);
  background: var(--surface); color: var(--blue); font-size: 17px; font-weight: 600;
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  :root { --cols: 22px 34px minmax(0, 1.5fr) minmax(0, 1.3fr) minmax(0, 1fr) 124px 96px 24px; }
  .col-location { display: none !important; }
}
@media (max-width: 960px) {
  :root { --cols: 22px 34px minmax(0, 1fr) 120px 96px; }
  .col-title, .col-company, .col-end { display: none !important; }
  .l-email { display: none; }
  .l-meta { display: block; }
}
@media (max-width: 640px) {
  :root { --cols: 22px 36px minmax(0, 1fr) auto auto; }
  .topbar-inner { padding: 0 16px; }
  main { padding: 24px 16px 80px; }
  .intro h1 { font-size: 30px; }
  .controls { gap: 10px; }
  .segmented { flex: 1 1 100%; max-width: none; }
  .search { flex: 1 1 0; max-width: none; min-width: 130px; }
  .picker { flex: 0 1 auto; min-width: 0; }
  .picker select { max-width: 100%; text-overflow: ellipsis; }
  .segmented button { flex: 1; justify-content: center; padding: 6px 8px; }
  .actions { width: 100%; margin-left: 0; }
  .actions .btn { flex: 1; }
  .list-head, .row { padding: 0 14px; column-gap: 12px; }
  .row + .row::before { left: 84px; }
  .match .role, .status-label, .col-match, .col-status { display: none; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 14px; padding: 2px 16px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filters > * { flex: none; }
  .selbar { left: 12px; right: 12px; translate: none; bottom: 12px; border-radius: 22px; flex-wrap: wrap; justify-content: center; padding: 10px; }
  .selbar-count { flex-basis: 100%; text-align: center; margin: 0; }
  .list-head .sel { grid-column: span 4; }
  .sheet { width: 100vw; margin: auto 0 0; }
  .sheet-card { border-radius: 20px 20px 0 0; max-height: 92dvh; }
  .g-row { grid-template-columns: 110px minmax(0, 1fr); }
}
