/* Colours come from the Telegram theme; the fallbacks are for the local test stand in a browser. */
:root {
  --bg: var(--tg-theme-secondary-bg-color, #efeff4);
  --panel: var(--tg-theme-section-bg-color, var(--tg-theme-bg-color, #ffffff));
  --text: var(--tg-theme-text-color, #111111);
  --hint: var(--tg-theme-hint-color, #8a8a8e);
  --link: var(--tg-theme-link-color, #2481cc);
  --accent: var(--tg-theme-button-color, #2481cc);
  --accent-text: var(--tg-theme-button-text-color, #ffffff);
  --danger: var(--tg-theme-destructive-text-color, #e5484d);
  --sep: var(--tg-theme-section-separator-color, rgba(0, 0, 0, 0.08));
  --late: #e8590c;
  --ok: #2b9a57;
  --radius: 12px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}
body.busy { cursor: progress; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { opacity: 0.45; cursor: default; }
b { font-weight: 600; }
em { font-style: normal; color: var(--hint); font-weight: 400; }

.top { padding: 14px 16px 6px; }
.top-title { font-size: 20px; font-weight: 700; }
.top-sub { color: var(--hint); font-size: 13px; margin-top: 2px; }
main { padding: 4px 12px 16px; max-width: 720px; margin: 0 auto; }

.muted { color: var(--hint); }
.pad { padding: 12px 14px; }
.late-text { color: var(--late); }
.empty { text-align: center; color: var(--hint); padding: 48px 16px; }

.section-title { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em;
  color: var(--hint); margin: 18px 4px 6px; display: flex; gap: 6px; align-items: center; }
.count { background: var(--sep); color: var(--text); border-radius: 10px; padding: 0 7px; font-size: 12px; text-transform: none; }

.list, .panel { background: var(--panel); border-radius: var(--radius); overflow: hidden; }
.row { display: flex; align-items: center; gap: 10px; padding: 11px 14px; min-height: 56px; cursor: pointer; }
.row + .row { border-top: 1px solid var(--sep); }
.row:active { background: var(--sep); }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-title .muted { font-weight: 400; font-size: 13px; }
.row-sub { color: var(--hint); font-size: 13px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; }
.row-side { flex: none; }

.badge { font-size: 12px; color: var(--hint); background: var(--bg); border-radius: 8px; padding: 3px 8px; white-space: nowrap; }
.badge.late { color: #fff; background: var(--late); }
.badge.ok { color: #fff; background: var(--ok); }
.take { background: var(--accent); color: var(--accent-text); border-radius: 10px; padding: 8px 14px; font-weight: 600; }

.search { margin: 8px 0; }
.search input { width: 100%; border: 0; border-radius: 10px; padding: 10px 12px; font: inherit; background: var(--panel); color: var(--text); outline: none; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 6px 0 10px; scrollbar-width: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; background: var(--panel); border-radius: 18px; padding: 7px 13px; font-size: 14px; }
.chip.on { background: var(--accent); color: var(--accent-text); }

.hero { padding: 6px 4px 12px; }
.hero-name { font-size: 22px; font-weight: 700; }
.hero-sub { color: var(--hint); margin: 2px 0 6px; }
.link { color: var(--link); }
.stage { font-weight: 600; padding: 12px 14px; border-left: 4px solid var(--accent); }
.stage.late { border-color: var(--late); }
.stage.ok { border-color: var(--ok); }
.stage.muted-stage { border-color: var(--hint); color: var(--hint); }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--sep); }
.kv span { color: var(--hint); }
.kv b { text-align: right; }
.kv.column { flex-direction: column; gap: 2px; }
.kv.column b { text-align: left; font-weight: 500; }
.panel > .kv:first-child, .panel > .bar-row:first-child, .panel > .person:first-child { border-top: 0; }
.verdict { padding: 10px 14px; border-top: 1px solid var(--sep); font-style: italic; }

.actions { display: grid; gap: 8px; margin: 12px 0 4px; }
.action { width: 100%; background: var(--panel); border-radius: var(--radius); padding: 13px 14px; font-weight: 600; text-align: center; }
.action.primary { background: var(--accent); color: var(--accent-text); }
.action.danger { color: var(--danger); }
.action.ghost { background: none; color: var(--hint); font-weight: 500; }

.timeline { list-style: none; margin: 0; padding: 4px 0; background: var(--panel); border-radius: var(--radius); }
.timeline li { padding: 9px 14px 9px 30px; position: relative; display: flex; flex-direction: column; }
.timeline li::before { content: ""; position: absolute; left: 13px; top: 15px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.timeline li span { color: var(--hint); font-size: 13px; }

.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kpi { background: var(--panel); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; }
.kpi b { font-size: 26px; line-height: 1.1; }
.kpi span { color: var(--hint); font-size: 13px; }
.kpi.main b { color: var(--ok); }
.kpi.warn b { color: var(--late); }
.bar-row { padding: 10px 14px; border-top: 1px solid var(--sep); }
.bar-label { display: flex; justify-content: space-between; margin-bottom: 6px; }
.bar { height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.bar div { height: 100%; background: var(--accent); border-radius: 4px; }
.person { padding: 10px 14px; border-top: 1px solid var(--sep); }
.person-head { display: flex; justify-content: space-between; gap: 10px; }
.person-head span { color: var(--hint); font-size: 13px; }
.person-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; font-size: 13px; color: var(--hint); }
.person-stats b { color: var(--text); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: right; color: var(--hint); font-weight: 500; font-size: 12px; padding: 8px 10px; }
.table td { text-align: right; padding: 8px 10px; border-top: 1px solid var(--sep); }
.table th:first-child, .table td:first-child { text-align: left; padding-left: 14px; word-break: break-word; }

.tabs { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: var(--panel);
  border-top: 1px solid var(--sep); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); z-index: 10; }
.tab { flex: 1; padding: 8px 4px; border-radius: 10px; color: var(--hint); font-weight: 600; font-size: 14px; position: relative; }
.tab.on { color: var(--accent); background: var(--bg); }
.tab i { font-style: normal; font-size: 11px; background: var(--accent); color: var(--accent-text); border-radius: 9px;
  padding: 1px 6px; margin-left: 4px; vertical-align: 1px; }
.tab i.late { background: var(--late); color: #fff; }

.sheet-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.35); z-index: 20; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; background: var(--bg); border-radius: 16px 16px 0 0;
  padding: 8px 14px calc(14px + env(safe-area-inset-bottom)); max-height: 85vh; overflow-y: auto; max-width: 720px; margin: 0 auto; }
.sheet-handle { width: 36px; height: 4px; border-radius: 2px; background: var(--sep); margin: 2px auto 10px; }
.sheet h3 { margin: 4px 0 2px; font-size: 17px; }
.sheet p { margin: 0 0 6px; font-size: 13px; }
.sheet .action { margin-top: 8px; }
.sheet textarea { width: 100%; border: 0; border-radius: 10px; padding: 10px 12px; font: inherit; background: var(--panel);
  color: var(--text); resize: vertical; margin: 4px 0; outline: none; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 4px 0; }
.grid .chip { text-align: center; padding: 9px 0; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 30;
  background: rgba(20, 20, 20, 0.88); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px;
  max-width: calc(100vw - 32px); text-align: center; }
.toast.bad { background: var(--danger); }
.card-screen { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
.card-screen .toast { bottom: calc(16px + env(safe-area-inset-bottom)); }

/* ——— Variant B «Карточки»: avatar tiles with progress and the next step as a button. ——— */
html[data-skin="b"] { --radius: 18px; --late: #e5484d; --soon: #d9920f; --calm: var(--hint); }
[data-skin="b"] .list { background: none; display: grid; gap: 10px; overflow: visible; }
[data-skin="b"] .tile { background: var(--panel); border-radius: var(--radius); align-items: flex-start; gap: 12px; padding: 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); }
[data-skin="b"] .tile + .tile { border-top: 0; }
[data-skin="b"] .avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; color: #fff; font-weight: 700; font-size: 18px;
  display: flex; align-items: center; justify-content: center; }
[data-skin="b"] .avatar.big { width: 64px; height: 64px; font-size: 26px; }
[data-skin="b"] .tile-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
[data-skin="b"] .row-sub { margin-top: 2px; }
[data-skin="b"] .pill { flex: none; font-size: 12px; font-weight: 600; border-radius: 10px; padding: 3px 9px; background: var(--bg); color: var(--hint); white-space: nowrap; }
[data-skin="b"] .pill.late { background: rgba(229, 72, 77, 0.14); color: var(--late); }
[data-skin="b"] .pill.soon { background: rgba(217, 146, 15, 0.16); color: var(--soon); }
[data-skin="b"] .progress { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin: 10px 0 2px; }
[data-skin="b"] .progress i { height: 5px; border-radius: 3px; background: var(--bg); }
[data-skin="b"] .progress i.on { background: var(--accent); }
[data-skin="b"] .quick { margin-top: 10px; width: 100%; padding: 10px 12px; border-radius: 12px; font-weight: 600; font-size: 14px;
  background: var(--accent); color: var(--accent-text); }
[data-skin="b"] .tile-hero { display: flex; gap: 14px; align-items: center; padding: 10px 2px 14px; }
[data-skin="b"] .stage-panel { padding: 14px; margin-bottom: 10px; }
[data-skin="b"] .progress-caption { font-size: 12px; color: var(--hint); margin-top: 6px; }
[data-skin="b"] .panel { border-radius: var(--radius); }
[data-skin="b"] .action { border-radius: 14px; }
[data-skin="b"] .columns { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 14px 10px 12px; align-items: end; }
[data-skin="b"] .fcol { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
[data-skin="b"] .fcol b { font-size: 20px; }
[data-skin="b"] .col-bar { width: 100%; max-width: 40px; height: 120px; background: var(--bg); border-radius: 10px; display: flex; align-items: flex-end; overflow: hidden; }
[data-skin="b"] .col-bar div { width: 100%; background: var(--accent); border-radius: 10px; }
[data-skin="b"] .fcol span { font-size: 11px; line-height: 1.2; color: var(--hint); min-height: 27px; }
[data-skin="b"] .fcol em { font-size: 12px; font-weight: 600; color: var(--accent); }
[data-skin="b"] .kpi { border-radius: var(--radius); }
[data-skin="b"] .tab.on { background: none; color: var(--accent); }
[data-skin="b"] .tab.on span { border-bottom: 2px solid var(--accent); padding-bottom: 3px; }

/* ——— Variant C «Время»: every candidate leads with a timer; colour says how urgent. ——— */
html[data-skin="c"] {
  --late: #e5484d; --soon: #d9920f; --calm: #2f9e63;
  --round: ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --radius: 14px;
}
[data-skin="c"] .top-title { font: 700 23px/1.2 var(--round); }
[data-skin="c"] .row { gap: 12px; padding: 10px 12px; }
[data-skin="c"] .timer { flex: none; width: 70px; height: 48px; border-radius: 11px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; color: var(--calm); background: rgba(47, 158, 99, 0.12); }
[data-skin="c"] .timer b { font: 700 17px/1 var(--round); font-variant-numeric: tabular-nums; white-space: nowrap; }
[data-skin="c"] .timer span { font-size: 10px; margin-top: 4px; }
[data-skin="c"] .timer.late { color: var(--late); background: rgba(229, 72, 77, 0.14); }
[data-skin="c"] .timer.soon { color: var(--soon); background: rgba(217, 146, 15, 0.16); }
[data-skin="c"] .timer.done { color: var(--hint); background: var(--bg); }
[data-skin="c"] .row-title { font-size: 16px; }
[data-skin="c"] .row-sub { color: var(--text); opacity: 0.72; font-size: 14px; }
[data-skin="c"] .section-title { text-transform: none; letter-spacing: 0; font: 700 16px var(--round); color: var(--text); margin: 18px 4px 8px; }
[data-skin="c"] .section-title::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--hint); }
[data-skin="c"] .section-title.late::before { background: var(--late); }
[data-skin="c"] .section-title.soon::before { background: var(--soon); }
[data-skin="c"] .section-title.calm::before { background: var(--calm); }
[data-skin="c"] .count { font-family: var(--round); }
[data-skin="c"] .hero-name { font: 700 26px/1.15 var(--round); }
[data-skin="c"] .next { border-radius: var(--radius); padding: 14px 16px; margin: 8px 0 10px; display: flex; flex-direction: column; gap: 3px;
  background: var(--panel); border-left: 5px solid var(--calm); }
[data-skin="c"] .next.late { border-color: var(--late); }
[data-skin="c"] .next.soon { border-color: var(--soon); }
[data-skin="c"] .next.done { border-color: var(--hint); }
[data-skin="c"] .next-label { font-size: 12px; color: var(--hint); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
[data-skin="c"] .next b { font: 700 22px/1.2 var(--round); }
[data-skin="c"] .next-time { font: 700 15px var(--round); color: var(--calm); }
[data-skin="c"] .next.late .next-time { color: var(--late); }
[data-skin="c"] .next.soon .next-time { color: var(--soon); }
[data-skin="c"] .action { border-radius: var(--radius); }
[data-skin="c"] .stepper { list-style: none; margin: 0; padding: 8px 16px; background: var(--panel); border-radius: var(--radius); }
[data-skin="c"] .stepper li { display: flex; gap: 12px; padding: 7px 0; position: relative; }
[data-skin="c"] .stepper li i { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--sep); margin-top: 3px;
  background: var(--panel); position: relative; z-index: 1; }
[data-skin="c"] .stepper li:not(:last-child)::after { content: ""; position: absolute; left: 6px; top: 24px; bottom: -8px; width: 2px; background: var(--sep); }
[data-skin="c"] .stepper li.done i { background: var(--calm); border-color: var(--calm); }
[data-skin="c"] .stepper li.done::after { background: var(--calm); }
[data-skin="c"] .stepper li.now i { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(36, 129, 204, 0.18); }
[data-skin="c"] .stepper li.now b { color: var(--accent); }
[data-skin="c"] .stepper li.todo b { color: var(--hint); font-weight: 500; }
[data-skin="c"] .stepper li.out i { background: var(--late); border-color: var(--late); }
[data-skin="c"] .stepper li div { display: flex; flex-direction: column; }
[data-skin="c"] .stepper li span { font-size: 12px; color: var(--hint); }
[data-skin="c"] .kpi b { font-family: var(--round); }
[data-skin="c"] .kpi.main b { color: var(--calm); }
[data-skin="c"] .kpi.warn b { color: var(--late); }
[data-skin="c"] .pipe { padding: 4px 0; }
[data-skin="c"] .pipe-step { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; }
[data-skin="c"] .pipe-step div { display: flex; align-items: baseline; gap: 12px; }
[data-skin="c"] .pipe-step b { font: 700 26px/1 var(--round); min-width: 34px; font-variant-numeric: tabular-nums; }
[data-skin="c"] .pipe-step em { font: 700 17px var(--round); color: var(--accent); }
[data-skin="c"] .drop { margin: 0 16px 0 31px; padding: 1px 0 1px 14px; border-left: 2px dashed rgba(229, 72, 77, 0.5); color: var(--late); font-size: 12px; }
[data-skin="c"] .tabs { padding-left: 10px; padding-right: 10px; }
[data-skin="c"] .tab.on { background: var(--accent); color: var(--accent-text); border-radius: 12px; }
[data-skin="c"] .tab i { background: var(--late); color: #fff; }
[data-skin="c"] .tab.on i { background: var(--accent-text); color: var(--accent); }

/* ——— Variant D «Atelier Slate & Gold» — the Stitch design system, applied one to one. ——— */
html[data-skin="d"] {
  --bg: #0f141b; --panel: #161b22; --panel-low: #171c23; --panel-high: #21262d; --line: #30363d; --line-soft: #21262d;
  --text: #f0f6fc; --hint: #8b949e; --faint: #484f58;
  --gold: #d4af37; --gold-hi: #e5c158; --gold-ink: #0d1117;
  --accent: var(--gold); --accent-text: var(--gold-ink); --link: var(--gold); --sep: var(--line);
  --late: #e06c75; --soon: #e5c07b; --calm: #98c379; --danger: var(--late); --ok: var(--calm);
  --radius: 12px;
  color-scheme: dark;
}
html[data-skin="d"] body {
  background: var(--bg); color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  font-size: 14px; letter-spacing: 0; font-variant-numeric: tabular-nums;
  padding-bottom: calc(88px + env(safe-area-inset-bottom, 16px));
}
[data-skin="d"] .ic { width: 18px; height: 18px; flex: none; }
[data-skin="d"] main { padding: 4px 16px 16px; }
[data-skin="d"] .muted, [data-skin="d"] .empty { color: var(--hint); }

/* Header: avatar, role, name, count */
[data-skin="d"] .top { display: flex; align-items: center; gap: 12px; padding: 14px 16px 8px; }
[data-skin="d"] .ava { position: relative; flex: none; width: 42px; height: 42px; border-radius: 10px; background: var(--panel-high);
  border: 1px solid var(--line); color: var(--gold); font-weight: 700; font-size: 15px; letter-spacing: 0.02em;
  display: flex; align-items: center; justify-content: center; }
[data-skin="d"] .ava i { position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--calm); border: 2px solid var(--bg); }
[data-skin="d"] .whoami { flex: 1; min-width: 0; }
[data-skin="d"] .whoami small { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--hint); }
[data-skin="d"] .whoami b { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
[data-skin="d"] .count-pill { flex: none; font-size: 12px; font-weight: 500; color: var(--hint); background: var(--panel);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; white-space: nowrap; }
[data-skin="d"] .count-pill b { color: var(--gold); font-size: 14px; font-weight: 700; }

/* Three metric tiles */
[data-skin="d"] .tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 8px 0 14px;
  background: var(--panel-low); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
[data-skin="d"] .tile { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0 8px; }
[data-skin="d"] .tile + .tile { border-left: 1px solid var(--line-soft); padding-left: 12px; }
[data-skin="d"] .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--hint); }
[data-skin="d"] .dot.late { background: var(--late); }
[data-skin="d"] .dot.soon { background: var(--soon); }
[data-skin="d"] .dot.calm { background: var(--calm); }
[data-skin="d"] .tile b { grid-column: 2; justify-self: end; font-size: 22px; font-weight: 700; line-height: 1; }
[data-skin="d"] .tile span { grid-column: 1 / -1; margin-top: 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.03em; color: var(--hint); }

/* Section headers */
[data-skin="d"] .sect { display: flex; align-items: center; gap: 8px; margin: 18px 2px 10px; font-size: 17px; font-weight: 600;
  letter-spacing: -0.01em; text-transform: none; color: var(--text); }
[data-skin="d"] .sect em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--hint); background: var(--panel-high);
  border-radius: 999px; padding: 2px 8px; }
[data-skin="d"] .sect small { margin-left: auto; font-size: 11px; font-weight: 500; letter-spacing: 0.03em; color: var(--faint); }

/* Candidate row */
[data-skin="d"] .list { display: grid; gap: 12px; background: none; border-radius: 0; overflow: visible; }
[data-skin="d"] .cand { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 10px; cursor: pointer; }
[data-skin="d"] .cand:active { background: var(--panel-high); }
[data-skin="d"] .cand-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
[data-skin="d"] .cand-top h3 { min-width: 0; margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[data-skin="d"] .cand-top h1 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
[data-skin="d"] .cand-stage { display: flex; align-items: center; gap: 8px; font-size: 14px; min-width: 0; }
[data-skin="d"] .cand-stage .ic { width: 16px; height: 16px; color: var(--gold); }
[data-skin="d"] .cand-stage > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[data-skin="d"] .tag { flex: none; font-size: 11px; font-weight: 600; letter-spacing: 0.03em; color: var(--hint);
  background: var(--panel-high); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; }
[data-skin="d"] .cand-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-top: 1px solid var(--line-soft); padding-top: 10px; margin-top: 2px; }
[data-skin="d"] .note { font-size: 12px; color: var(--hint); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
[data-skin="d"] .cand-foot:only-child { border-top: 0; padding-top: 0; }

/* Urgency pills */
[data-skin="d"] .pill { flex: none; display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600;
  letter-spacing: 0.02em; border-radius: 999px; padding: 4px 10px; white-space: nowrap;
  color: var(--calm); background: rgba(152, 195, 121, 0.12); border: 1px solid rgba(152, 195, 121, 0.25); }
[data-skin="d"] .pill i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
[data-skin="d"] .pill.late { color: var(--late); background: rgba(224, 108, 117, 0.12); border-color: rgba(224, 108, 117, 0.25); }
[data-skin="d"] .pill.soon { color: var(--soon); background: rgba(229, 192, 123, 0.12); border-color: rgba(229, 192, 123, 0.25); }
[data-skin="d"] .pill.done { color: var(--hint); background: var(--panel-high); border-color: var(--line); }
[data-skin="d"] .pill.who { color: var(--calm); }
[data-skin="d"] .pill.tiny { padding: 2px 7px; font-size: 10px; }

/* Buttons */
[data-skin="d"] .btn { flex: none; height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: 10px; padding: 0 14px; background: var(--panel-high); border: 1px solid var(--line); color: var(--text);
  font-size: 13px; font-weight: 600; white-space: nowrap; max-width: 62%; overflow: hidden; }
[data-skin="d"] .btn.gold { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); box-shadow: 0 2px 10px rgba(212, 175, 55, 0.22); }
[data-skin="d"] .btn.gold:active { background: #c5a028; }
[data-skin="d"] .action { height: 48px; border-radius: 10px; background: var(--panel-high); border: 1px solid var(--line);
  color: var(--text); font-size: 14px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; }
[data-skin="d"] .action.primary { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); box-shadow: 0 0 12px rgba(212, 175, 55, 0.25); }
[data-skin="d"] .action.primary .ic { width: 16px; height: 16px; }
[data-skin="d"] .action.danger { background: rgba(224, 108, 117, 0.12); border-color: rgba(224, 108, 117, 0.25); color: var(--late); }
[data-skin="d"] .action.quiet { background: none; border: 0; color: var(--hint); font-weight: 500; height: 40px; }
[data-skin="d"] .actions { display: grid; gap: 10px; margin-top: 12px; }
[data-skin="d"] .actions.grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
[data-skin="d"] .actions.grid2 .quiet { grid-column: 1 / -1; }
[data-skin="d"] .dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 16px));
  background: linear-gradient(to top, var(--bg) 70%, rgba(15, 20, 27, 0)); max-width: 720px; margin: 0 auto; }
[data-skin="d"] .dock .action { width: 100%; }

/* Candidate dossier */
[data-skin="d"] .panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-top: 12px; }
[data-skin="d"] .dossier .head { margin-top: 4px; }
[data-skin="d"] .role { margin: 4px 0 0; font-size: 14px; color: var(--hint); }
[data-skin="d"] .tg-row { width: 100%; display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 12px;
  background: var(--panel-low); border: 1px solid var(--line); border-radius: 10px; text-align: left; }
[data-skin="d"] .tg-row .ic { color: var(--gold); }
[data-skin="d"] .tg-row .ic:last-child { margin-left: auto; color: var(--faint); }
[data-skin="d"] .tg-row b { font-size: 14px; font-weight: 600; }
[data-skin="d"] .tg-row span { font-size: 12px; color: var(--hint); }
[data-skin="d"] .tg-row.empty { display: block; color: var(--faint); font-size: 12px; }
[data-skin="d"] .verdict-box { margin-top: 10px; padding: 10px 12px; border-radius: 10px;
  background: rgba(212, 175, 55, 0.08); border: 1px solid rgba(212, 175, 55, 0.3); }
[data-skin="d"] .verdict-box span { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--gold); }
[data-skin="d"] .verdict-box b { display: block; margin-top: 3px; font-size: 14px; font-weight: 500; }
[data-skin="d"] .sect-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
[data-skin="d"] .label { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--hint); }
[data-skin="d"] .sect-row em { font-style: normal; font-size: 11px; font-weight: 600; letter-spacing: 0.03em; color: var(--gold); }
[data-skin="d"] .step-now h2 { margin: 8px 0 0; font-size: 20px; font-weight: 600; letter-spacing: -0.015em; }
[data-skin="d"] .step-now p { margin: 4px 0 0; font-size: 13px; }

/* Selection chain */
[data-skin="d"] .steps { list-style: none; margin: 12px 0 0; padding: 0; }
[data-skin="d"] .steps li { display: flex; gap: 10px; padding: 7px 0; position: relative; }
[data-skin="d"] .steps li:not(:last-child)::after { content: ""; position: absolute; left: 10px; top: 28px; bottom: -4px; width: 1px; background: var(--line); }
[data-skin="d"] .bullet { flex: none; width: 21px; height: 21px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--panel-low); display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; }
[data-skin="d"] .bullet .ic { width: 12px; height: 12px; stroke-width: 3; }
[data-skin="d"] .steps .done .bullet { color: var(--calm); border-color: rgba(152, 195, 121, 0.45); background: rgba(152, 195, 121, 0.12); }
[data-skin="d"] .steps .done::after { background: rgba(152, 195, 121, 0.3); }
[data-skin="d"] .steps .now .bullet { border: 2px solid var(--gold); box-shadow: 0 0 10px rgba(212, 175, 55, 0.3); }
[data-skin="d"] .steps .now .bullet::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
[data-skin="d"] .steps .out .bullet { color: var(--late); border-color: rgba(224, 108, 117, 0.4); background: rgba(224, 108, 117, 0.12); }
[data-skin="d"] .step-body { flex: 1; display: flex; align-items: center; gap: 8px; min-height: 21px; }
[data-skin="d"] .step-body b { font-size: 14px; font-weight: 500; }
[data-skin="d"] .steps .now .step-body b { color: var(--gold); font-weight: 600; }
[data-skin="d"] .steps .todo .step-body b { color: var(--faint); }
[data-skin="d"] .step-when { margin-left: auto; font-size: 11px; color: var(--hint); white-space: nowrap; }
[data-skin="d"] .steps .todo .step-when { color: var(--faint); }

/* Answers, history, lists reused from other screens */
[data-skin="d"] .answers .kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line-soft); font-size: 13px; }
[data-skin="d"] .answers .kv:nth-of-type(1) { border-top: 0; margin-top: 4px; }
[data-skin="d"] .answers .kv span { color: var(--hint); }
[data-skin="d"] .answers .kv b { font-weight: 500; text-align: right; }
[data-skin="d"] .section-title { color: var(--hint); }
[data-skin="d"] .timeline { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
[data-skin="d"] .timeline li::before { background: var(--gold); }
[data-skin="d"] .search input { background: var(--panel); border: 1px solid var(--line); color: var(--text); height: 44px; border-radius: 8px; }
[data-skin="d"] .search input::placeholder { color: var(--faint); }
[data-skin="d"] .chips { padding: 6px 0 10px; }
[data-skin="d"] .chip { background: var(--panel); border: 1px solid var(--line); color: var(--hint); font-size: 13px; font-weight: 500; padding: 7px 13px; }
[data-skin="d"] .chip.on { background: rgba(212, 175, 55, 0.12); border-color: var(--gold); color: var(--gold); }
[data-skin="d"] .kpis { gap: 12px; }
[data-skin="d"] .kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
[data-skin="d"] .kpi.main { border-top: 2px solid var(--gold); }
[data-skin="d"] .kpi.main b { color: var(--gold); }
[data-skin="d"] .kpi.warn b { color: var(--late); }
[data-skin="d"] .bar { background: var(--panel-high); }
[data-skin="d"] .bar div { background: var(--gold); }
[data-skin="d"] .bar-label em, [data-skin="d"] .pipe-step em { color: var(--gold); }
[data-skin="d"] .late-text { color: var(--late); }

/* Bottom navigation */
[data-skin="d"] .tabs { background: rgba(22, 27, 34, 0.92); border-top: 1px solid var(--line); backdrop-filter: blur(20px);
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 16px)); }
[data-skin="d"] .tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 48px; font-size: 11px; font-weight: 600; letter-spacing: 0.03em; color: var(--hint); border-radius: 999px; position: relative; }
[data-skin="d"] .tab .ic { width: 20px; height: 20px; }
[data-skin="d"] .tab.on { color: var(--gold); background: rgba(212, 175, 55, 0.12); }
[data-skin="d"] .tab i { position: absolute; top: 4px; left: calc(50% + 7px); margin: 0; font-size: 10px; font-weight: 700;
  padding: 0 5px; border-radius: 999px; background: var(--late); color: #3d0a0e; }
[data-skin="d"] .tab i:not(.late) { background: var(--gold); color: var(--gold-ink); }

/* Sheets and toasts */
[data-skin="d"] .sheet { background: var(--panel-high); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.45); }
[data-skin="d"] .sheet h3 { font-size: 17px; }
[data-skin="d"] .sheet textarea { background: var(--panel); border: 1px solid var(--line); color: var(--text); }
[data-skin="d"] .sheet .chip.on, [data-skin="d"] .grid .chip.on { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
[data-skin="d"] .toast { background: var(--panel-high); border: 1px solid var(--line); color: var(--text); }
[data-skin="d"] .card-screen .toast { bottom: calc(80px + env(safe-area-inset-bottom, 16px)); }

/* ——— Variant D: queue, all candidates, funnel and sheets (Stitch screens) ——— */
[data-skin="d"] .screen-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 2px 2px; }
[data-skin="d"] .screen-head h1 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
[data-skin="d"] .screen-head .aside { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--hint); }
[data-skin="d"] .lede { display: flex; align-items: center; gap: 7px; margin: 6px 2px 12px; font-size: 13px; color: var(--hint); }
[data-skin="d"] .lede .ic { width: 15px; height: 15px; color: var(--gold); }
[data-skin="d"] .empty.big { display: grid; justify-items: center; gap: 6px; padding: 56px 16px; }
[data-skin="d"] .empty.big .ic { width: 32px; height: 32px; color: var(--calm); }
[data-skin="d"] .empty.big b { font-size: 16px; color: var(--text); }

/* Queue */
[data-skin="d"] .sla-box { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; }
[data-skin="d"] .sla-ic { flex: none; width: 36px; height: 36px; border-radius: 10px; background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.3); color: var(--gold); display: flex; align-items: center; justify-content: center; }
[data-skin="d"] .sla-body { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
[data-skin="d"] .sla-body b { font-size: 15px; font-weight: 600; }
[data-skin="d"] .sla-body em { font-style: normal; font-size: 13px; font-weight: 600; color: var(--late); }
[data-skin="d"] .sla-body span { flex-basis: 100%; font-size: 11px; color: var(--hint); }
[data-skin="d"] .cand.queue .cand-top { flex-wrap: wrap; }
[data-skin="d"] .cand.queue .cand-top h3 { flex: 1 1 auto; }
[data-skin="d"] .from { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--hint); }
[data-skin="d"] .from .ic { width: 14px; height: 14px; }
[data-skin="d"] .tg-link { color: var(--gold); font-size: 12px; font-weight: 600; }
[data-skin="d"] .brief { background: var(--panel-low); border: 1px solid var(--line-soft); border-radius: 10px; padding: 4px 12px; }
[data-skin="d"] .brief .kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 13px; }
[data-skin="d"] .brief .kv + .kv { border-top: 1px solid var(--line-soft); }
[data-skin="d"] .brief .kv span { color: var(--hint); }
[data-skin="d"] .brief .kv b { font-weight: 500; text-align: right; }
[data-skin="d"] .warn { font-style: normal; font-size: 11px; font-weight: 600; color: var(--soon);
  background: rgba(229, 192, 123, 0.12); border-radius: 999px; padding: 2px 7px; margin-left: 4px; }
[data-skin="d"] .cand-foot.take { display: grid; grid-template-columns: 1fr 48px; gap: 10px; }
[data-skin="d"] .cand-foot.take .btn { width: 100%; max-width: none; height: 48px; }
[data-skin="d"] .btn.square { padding: 0; width: 48px; }
[data-skin="d"] .btn.ghost { background: none; border: 0; color: var(--hint); }

/* All candidates */
[data-skin="d"] .search { position: relative; margin: 10px 0 4px; }
[data-skin="d"] .search .ic { position: absolute; left: 12px; top: 13px; color: var(--faint); }
[data-skin="d"] .search input { padding-left: 38px; }
[data-skin="d"] .chip i { font-style: normal; margin-left: 3px; opacity: 0.75; }
[data-skin="d"] .sect.thin { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--hint); margin: 16px 2px 8px; }
[data-skin="d"] .sect.thin small { color: var(--faint); }
[data-skin="d"] .list.flat { gap: 8px; }
[data-skin="d"] .line { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; cursor: pointer; }
[data-skin="d"] .line:active { background: var(--panel-high); }
[data-skin="d"] .line .avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; color: #0d1117; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center; }
[data-skin="d"] .line-body { flex: 1; min-width: 0; }
[data-skin="d"] .line-top { display: flex; align-items: center; gap: 7px; min-width: 0; }
[data-skin="d"] .line-top b { min-width: 0; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[data-skin="d"] .line-sub { font-size: 12px; color: var(--hint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
[data-skin="d"] .line > .ic { color: var(--faint); width: 16px; }

/* Funnel */
[data-skin="d"] .chips.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 10px; padding: 4px; margin: 8px 0 14px; }
[data-skin="d"] .chips.seg .chip { background: none; border: 0; text-align: center; padding: 8px 0; border-radius: 8px; }
[data-skin="d"] .chips.seg .chip.on { background: rgba(212, 175, 55, 0.14); color: var(--gold); }
[data-skin="d"] .kpi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
[data-skin="d"] .kpi-card { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
[data-skin="d"] .kpi-card b { display: block; font-size: 30px; font-weight: 700; line-height: 1.1; }
[data-skin="d"] .kpi-card > span:last-child { display: block; margin-top: 2px; font-size: 12px; color: var(--hint); }
[data-skin="d"] .kpi-card em { display: block; font-style: normal; font-size: 11px; color: var(--faint); }
[data-skin="d"] .kpi-ic { position: absolute; top: 12px; right: 12px; color: var(--faint); }
[data-skin="d"] .kpi-ic .ic { width: 16px; height: 16px; }
[data-skin="d"] .kpi-card.gold { border-color: rgba(212, 175, 55, 0.45); background: rgba(212, 175, 55, 0.07); }
[data-skin="d"] .kpi-card.gold b, [data-skin="d"] .kpi-card.gold .kpi-ic { color: var(--gold); }
[data-skin="d"] .kpi-card.bad { border-color: rgba(224, 108, 117, 0.35); background: rgba(224, 108, 117, 0.07); }
[data-skin="d"] .kpi-card.bad b, [data-skin="d"] .kpi-card.bad .kpi-ic { color: var(--late); }
[data-skin="d"] .gold-label { color: var(--gold); border-left: 3px solid var(--gold); padding-left: 8px; font-size: 15px;
  font-weight: 600; letter-spacing: -0.01em; text-transform: none; }
[data-skin="d"] .flow { margin-top: 12px; }
[data-skin="d"] .flow-top { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; font-size: 14px; }
[data-skin="d"] .flow-top span { flex: 1; min-width: 0; }
[data-skin="d"] .flow-top b { font-weight: 700; }
[data-skin="d"] .flow-top em { font-style: normal; font-size: 12px; color: var(--hint); min-width: 34px; text-align: right; }
[data-skin="d"] .flow .bar { height: 6px; border-radius: 3px; overflow: hidden; }
[data-skin="d"] .drop { display: flex; align-items: center; gap: 6px; margin: 8px 0; }
[data-skin="d"] .drop .ic { width: 14px; height: 14px; color: var(--late); }
[data-skin="d"] .drop span { font-size: 11px; font-weight: 600; color: var(--late);
  background: rgba(224, 108, 117, 0.12); border: 1px solid rgba(224, 108, 117, 0.25); border-radius: 999px; padding: 3px 9px; }
[data-skin="d"] .people { display: grid; gap: 12px; margin-top: 12px; }
[data-skin="d"] .person-card { background: var(--panel-low); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
[data-skin="d"] .person-top { display: flex; align-items: center; gap: 8px; }
[data-skin="d"] .person-top b { flex: 1; font-size: 15px; }
[data-skin="d"] .ava.sm { width: 26px; height: 26px; border-radius: 7px; border: 0; color: #0d1117; font-size: 11px; }
[data-skin="d"] .person-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; text-align: center;
  border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); padding: 10px 0; }
[data-skin="d"] .person-grid span { display: block; font-size: 11px; color: var(--hint); }
[data-skin="d"] .person-grid b { display: block; margin-top: 3px; font-size: 18px; font-weight: 700; }
[data-skin="d"] .person-grid .gold { color: var(--gold); }
[data-skin="d"] .person-speed { display: flex; justify-content: space-between; font-size: 12px; color: var(--hint); margin-bottom: 6px; }
[data-skin="d"] .person-speed b { color: var(--text); }
[data-skin="d"] .person-card .bar { height: 5px; background: var(--panel-high); border-radius: 3px; overflow: hidden; }
[data-skin="d"] .sources { margin-top: 10px; }
[data-skin="d"] .src-row { display: flex; align-items: center; gap: 8px; padding: 10px 0; font-size: 14px; }
[data-skin="d"] .src-row + .src-row { border-top: 1px solid var(--line-soft); }
[data-skin="d"] .src-row b { flex: 1; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[data-skin="d"] .src-row > span:not(.pill) { font-size: 12px; color: var(--hint); white-space: nowrap; }
[data-skin="d"] .src-row .ic { width: 15px; height: 15px; color: var(--faint); }
[data-skin="d"] .panel .kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 13px; }
[data-skin="d"] .panel .kv + .kv { border-top: 1px solid var(--line-soft); }
[data-skin="d"] .panel .kv span { color: var(--hint); }

/* Sheets */
[data-skin="d"] .sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
[data-skin="d"] .sheet-head h3 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -0.015em; }
[data-skin="d"] .sheet-head p { display: flex; align-items: center; gap: 5px; margin: 4px 0 0; font-size: 12px; }
[data-skin="d"] .sheet-head .ic { width: 14px; height: 14px; }
[data-skin="d"] .sheet .label { display: block; margin: 12px 0 8px; }
[data-skin="d"] .sheet .sect-row { margin: 14px 0 8px; }
[data-skin="d"] .free { color: var(--calm) !important; }
[data-skin="d"] .grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
[data-skin="d"] .slot { height: 44px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line);
  color: var(--text); font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }
[data-skin="d"] .slot.on { background: rgba(212, 175, 55, 0.16); border-color: var(--gold); color: var(--gold); font-weight: 700;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.2); }
[data-skin="d"] .options { display: grid; gap: 8px; }
[data-skin="d"] .option { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
[data-skin="d"] .option b { flex: 1; font-size: 14px; font-weight: 500; }
[data-skin="d"] .opt-ic { color: var(--hint); display: flex; }
[data-skin="d"] .option .radio { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; color: transparent; }
[data-skin="d"] .option .radio .ic { width: 12px; height: 12px; stroke-width: 3; }
[data-skin="d"] .option.on { border-color: var(--gold); background: rgba(212, 175, 55, 0.08); }
[data-skin="d"] .option.on b, [data-skin="d"] .option.on .opt-ic { color: var(--gold); }
[data-skin="d"] .option.on .radio { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
[data-skin="d"] .hint { margin: 8px 0 0; font-size: 11px; color: var(--faint); }
[data-skin="d"] .sheet .action { margin-top: 14px; }
[data-skin="d"] .sheet .action.ghost { margin-top: 6px; }

[data-skin="d"] .from .src { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[data-skin="d"] .from .tg-link { margin-left: auto; white-space: nowrap; }
[data-skin="d"] .line .pill { font-size: 11px; padding: 3px 8px; }

/* ——— Variant D: chats where the ads go ——— */
[data-skin="d"] .btn.wide { width: 100%; max-width: none; height: 46px; margin: 4px 0 14px; }
[data-skin="d"] .chat-ic { flex: none; width: 34px; height: 34px; border-radius: 9px; background: var(--panel-high);
  border: 1px solid var(--line); color: var(--gold); display: flex; align-items: center; justify-content: center; }
[data-skin="d"] .warn-tag { color: var(--soon); border-color: rgba(229, 192, 123, 0.35); background: rgba(229, 192, 123, 0.1); }
[data-skin="d"] .ad { margin: 10px 0 0; padding: 12px; background: var(--panel-low); border: 1px solid var(--line-soft);
  border-radius: 10px; font: inherit; font-size: 13px; line-height: 1.5; white-space: pre-wrap; word-break: break-word;
  max-height: 340px; overflow-y: auto; }
[data-skin="d"] .panel textarea { width: 100%; box-sizing: border-box; margin: 8px 0 0; padding: 10px 12px; border-radius: 10px;
  background: var(--panel-low); border: 1px solid var(--line); color: var(--text); font: inherit; font-size: 14px; resize: vertical; }
[data-skin="d"] .panel .action { margin-top: 10px; width: 100%; }

[data-skin="d"] .pill.gold-pill { color: var(--gold); background: rgba(212, 175, 55, 0.12); border-color: rgba(212, 175, 55, 0.35); }
[data-skin="d"] .panel.ask { border-color: rgba(212, 175, 55, 0.4); background: rgba(212, 175, 55, 0.05); }

[data-skin="d"] .watch { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 5px; }
[data-skin="d"] .watch li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 7px; font-size: 12px; color: var(--soon); }
[data-skin="d"] .watch li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--soon); margin-top: 6px; }
[data-skin="d"] body.busy { opacity: 0.75; pointer-events: none; }

/* ——— Variant D: the owners' home screen ——— */
[data-skin="d"] .needs { display: grid; gap: 8px; margin-top: 10px; }
[data-skin="d"] .need { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 11px 12px;
  border-radius: 10px; background: var(--panel-low); border: 1px solid var(--line); font-size: 14px; font-weight: 500; }
[data-skin="d"] .need span { flex: 1; min-width: 0; }
[data-skin="d"] .need .ic { color: var(--faint); }
[data-skin="d"] .need.gold { border-color: rgba(212, 175, 55, 0.4); color: var(--gold); }
[data-skin="d"] .need.late { border-color: rgba(224, 108, 117, 0.35); color: var(--late); }
[data-skin="d"] .person-card.tap { display: block; width: 100%; text-align: left; cursor: pointer; }
[data-skin="d"] .person-card.tap:active { background: var(--panel-high); }
[data-skin="d"] .person-top .ic { color: var(--faint); }
[data-skin="d"] .kpi-card em { margin-top: 2px; }

/* ——— Variant D: «Деньги» — the bank's side and the team's side on one screen ——— */
[data-skin="d"] .month-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
[data-skin="d"] .month-row .chips { flex: none; width: 190px; padding: 0; }
[data-skin="d"] .chips.seg.two { grid-template-columns: repeat(2, 1fr); }
[data-skin="d"] .kpi-card.warn-card { border-color: rgba(229, 192, 123, 0.35); background: rgba(229, 192, 123, 0.06); }
[data-skin="d"] .kpi-card.warn-card b, [data-skin="d"] .kpi-card.warn-card .kpi-ic { color: var(--soon); }
[data-skin="d"] .pill.calm { color: var(--calm); background: rgba(152, 195, 121, 0.12); border-color: rgba(152, 195, 121, 0.25); }
[data-skin="d"] .ok-text { color: var(--calm); }
[data-skin="d"] b.gold { color: var(--gold); }

[data-skin="d"] .acc { display: flex; align-items: center; gap: 11px; padding: 11px 14px; border-top: 1px solid var(--sep); cursor: pointer; }
[data-skin="d"] .panel.accounts > .acc:first-child { border-top: 0; }
[data-skin="d"] .acc:active { background: var(--panel-high); }
[data-skin="d"] .acc input { appearance: none; flex: none; width: 20px; height: 20px; border-radius: 6px;
  border: 1.5px solid var(--line); background: var(--panel-low); display: grid; place-items: center; }
[data-skin="d"] .acc input:checked { background: var(--gold); border-color: var(--gold); }
[data-skin="d"] .acc input:checked::after { content: ""; width: 10px; height: 6px; border: 2px solid var(--gold-ink);
  border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
[data-skin="d"] .acc-body { flex: 1; min-width: 0; }
[data-skin="d"] .acc-body b { display: block; font-size: 14px; font-weight: 600; }
[data-skin="d"] .acc-body > span { display: block; font-size: 11px; color: var(--faint); }
[data-skin="d"] .acc-sum { flex: none; font-size: 13px; font-weight: 600; color: var(--gold); }
[data-skin="d"] .acc.done { cursor: default; }
[data-skin="d"] .acc.done input { opacity: 0.5; }
[data-skin="d"] .acc.done .acc-body b { text-decoration: line-through; color: var(--faint); }
[data-skin="d"] .acc.done .acc-sum { color: var(--calm); font-weight: 500; font-size: 11px; }
[data-skin="d"] .action.primary[disabled] { background: var(--panel-high); color: var(--faint); box-shadow: none; }
[data-skin="d"] .action.primary { margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 8px; }

[data-skin="d"] .payrow { padding: 12px 14px; border-top: 1px solid var(--sep); }
[data-skin="d"] .panel > .payrow:first-child { border-top: 0; }
[data-skin="d"] .pay-who { flex: 1; min-width: 0; }
[data-skin="d"] .pay-who b { display: block; font-size: 15px; }
[data-skin="d"] .pay-who span { display: block; font-size: 11px; color: var(--faint); }
[data-skin="d"] .payrow .person-grid { margin: 10px 0 0; }
[data-skin="d"] .total { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px;
  padding: 13px 15px; border-radius: var(--radius); border: 1px solid rgba(212, 175, 55, 0.4); background: rgba(212, 175, 55, 0.07); }
[data-skin="d"] .total span { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--hint); }
[data-skin="d"] .total .ic { color: var(--gold); }
[data-skin="d"] .total b { font-size: 20px; font-weight: 700; color: var(--gold); }
[data-skin="d"] .undo-pay { margin-left: 8px; vertical-align: -3px; color: var(--faint); }
[data-skin="d"] .undo-pay .ic { width: 15px; height: 15px; }

/* ——— Variant D: the by-hand money entry ——— */
.sheet input[type="text"], .sheet input[type="number"] { width: 100%; box-sizing: border-box; border: 0; border-radius: 10px;
  padding: 11px 12px; font: inherit; background: var(--panel); color: var(--text); outline: none; }
[data-skin="d"] .sheet input[type="text"], [data-skin="d"] .sheet input[type="number"] {
  background: var(--panel); border: 1px solid var(--line); color: var(--text); height: 46px; }
[data-skin="d"] .sheet input::placeholder { color: var(--faint); }
[data-skin="d"] .sheet input[type="number"] { font-weight: 600; }
[data-skin="d"] .chip.wide { display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; margin-top: 14px; height: 44px; }
[data-skin="d"] .chip.wide .ic { width: 16px; height: 16px; }
[data-skin="d"] .faint-text { color: var(--faint); font-weight: 500; }
[data-skin="d"] .acc .undo-pay { flex: none; margin-left: 2px; }

/* ——— Правки после прогона на узком экране ——— */
[data-skin="d"] .toast.bad { background: var(--danger); color: #fff; }
.card-screen .toast, [data-skin="d"] .toast { bottom: 96px; }
/* Длинные суммы не должны разрывать число и знак рубля. */
[data-skin="d"] .kpi-card b { white-space: nowrap; font-size: clamp(19px, 7.2vw, 30px); }
[data-skin="d"] .total b { white-space: nowrap; }
[data-skin="d"] .person-grid b { white-space: nowrap; font-size: clamp(13px, 4.4vw, 18px); }
[data-skin="d"] .chats .line-top b { flex: 1 1 auto; }
/* Колонка сетки не должна растягиваться под самую длинную строку. */
[data-skin="d"] .list, [data-skin="d"] .people, [data-skin="d"] .needs, [data-skin="d"] .sources { grid-template-columns: minmax(0, 1fr); }
/* Длинное название не должно съедать само себя: имени оставляем место, плашки ужимаются. */
[data-skin="d"] .line-top b { flex: 1 1 auto; min-width: 9ch; }
[data-skin="d"] .line-top .tag { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[data-skin="d"] .line { overflow: hidden; }
[data-skin="d"] .line-top { flex-wrap: wrap; row-gap: 4px; }

/* ——— Во что обходится канал ——— */
[data-skin="d"] .chan { padding: 11px 14px; border-top: 1px solid var(--sep); }
[data-skin="d"] .panel > .chan:first-child { border-top: 0; }
[data-skin="d"] .chan-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
[data-skin="d"] .chan-top b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
[data-skin="d"] .chan-top span { flex: none; font-size: 13px; font-weight: 600; }
[data-skin="d"] .chan-sub { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 2px; }
[data-skin="d"] .chan-sub span { font-size: 11px; color: var(--faint); }
[data-skin="d"] .chan-sub b { flex: none; font-size: 12px; font-weight: 600; white-space: nowrap; }
[data-skin="d"] .panel input[type="number"], [data-skin="d"] .panel input[type="text"] {
  width: 100%; box-sizing: border-box; margin: 8px 0 0; height: 46px; padding: 0 12px; font: inherit; font-weight: 600;
  background: var(--panel-low); border: 1px solid var(--line); border-radius: 10px; color: var(--text); outline: none; }
