/* BuyerSig v2 — чёрная тема, плотные таблицы, зернистый фон. Подключается последним и перекрывает старые стили. */
:root {
  color-scheme: light;
  --bg: #f3f3f4;
  --panel: #ffffff;
  --panel2: #f7f7f8;
  --ink: #111214;
  --muted: #6b6f78;
  --line: #e3e4e7;
  --blue: #111214;            /* акцент — без синего */
  --soft: #ececee;
  --green: #138a55;
  --amber: #b26b00;
  --red: #c8364a;
  --shadow: 0 1px 2px #0000000d;
  --board: #121316;
  --board-line: #2a2c31;
  --board-text: #f4f4f5;
  --board-muted: #9a9ea6;
  --trend: #f4f4f5;
  --goal: #f5a524;
  --radius: 14px;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, "Roboto Mono", monospace;
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
:root[data-theme=dark] {
  color-scheme: dark;
  --bg: #08090a;
  --panel: #111214;
  --panel2: #16171a;
  --ink: #ededef;
  --muted: #8a8e96;
  --line: #222428;
  --blue: #f4f4f5;
  --soft: #1d1f23;
  --green: #4ade80;
  --amber: #fbbf24;
  --red: #f87171;
  --shadow: none;
  --board: #111214;
  --board-line: #26282d;
}
body {
  background-color: var(--bg);
  background-image: var(--grain);
  background-attachment: fixed;
  font-family: var(--interface-font, "Manrope", "Inter", system-ui, sans-serif);
}
:root:not([data-theme=dark]) body { background-blend-mode: soft-light; }
:root[data-theme=dark] body { background-image: linear-gradient(#08090ae6, #08090ae6), var(--grain); }

/* шапка */
body > header { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(8px); }
.brand-name { font-size: 22px; }
.brand-sig { color: var(--muted); }
.brand-mark { width: 34px; height: 34px; filter: grayscale(1) contrast(1.1); }
h1 { font-size: clamp(24px, 3vw, 32px); }
#refresh { background: var(--soft); color: var(--ink); border: 1px solid var(--line); }
.tools label, .xp-search, .xp-select, .xp-order, .xp-cols summary, .xp-more, .xp-scope { border-color: var(--line); background: var(--panel); }
.tools select, .xp-select select { background: transparent; }

/* нижнее меню: понятно, где ты */
.dock { background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(10px); border-color: var(--line); box-shadow: 0 8px 30px #0000004d; }
.dock button { position: relative; color: var(--muted); }
.dock button:is([aria-current=true]) { background: var(--soft); color: var(--ink); font-weight: 750; }
.dock button:is([aria-current=true])::after {
  content: ""; position: absolute; top: 3px; left: 50%; width: 16px; height: 3px; border-radius: 3px;
  transform: translateX(-50%); background: var(--ink);
}

/* обзор: тёмная карточка */
.weekly-board { background: radial-gradient(ellipse at 85% 120%, #2a2c31 0%, transparent 60%), var(--board); border-color: var(--board-line); box-shadow: 0 10px 30px #0000003d; }
.target-delta.over { background: #3a1d22; color: #ffb4bd; }
.target-delta.under { background: #12301f; color: #9af0bd; }
.week-note { display: block; margin-top: 6px; color: var(--board-muted); font-size: 12px; }
.week-note b { color: var(--board-text); }
.metrics dd { font-family: var(--mono); letter-spacing: -.03em; font-size: clamp(18px, 2.6vw, 24px); }
.row-price strong { font-family: var(--mono); }
.winners { background: var(--soft); color: var(--ink); }
.tool-icon { background: var(--soft); color: var(--ink); }

/* таблицы (ПК) — плотно, как в Ads-панели */
.explorer { border-radius: var(--radius); padding: 12px 12px 6px; }
.xp-view { display: none; }                       /* дублировал нижнее меню */
.xp-summary { margin: 10px 2px 6px; }
.xp-summary > div span { font-family: var(--mono); }
.xp-table thead th { background: transparent; border-bottom: 1px solid var(--line); height: 34px; font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; }
.xp-table thead th button { color: var(--muted); font-weight: 650; }
.xp-table th[aria-sort] button { color: var(--ink); }
.xp-table tbody th, .xp-table tbody td { padding: 7px 10px; font-size: 13px; }
.xp-table tbody td { font-family: var(--mono); font-size: 12.5px; }
.xp-table tbody th { min-width: 200px; max-width: 320px; }
.xp-table tbody th button { color: var(--ink); font-weight: 650; display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xp-table tbody th small { margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xp-table tbody td.c-leads { font-weight: 750; color: var(--ink); }
.xp-table tbody td.c-spend { font-weight: 650; }
.xp-price > span { padding: 3px 7px; border-radius: 6px; font-weight: 750; }
.xp-price .good { background: color-mix(in srgb, var(--green) 14%, transparent); }
.xp-price .warn { background: color-mix(in srgb, var(--amber) 14%, transparent); }
.xp-price .bad { background: color-mix(in srgb, var(--red) 16%, transparent); }
@media (hover: hover) { .xp-table tbody tr:hover > * { background: var(--panel2); } }

/* телефон: строка в 2 линии вместо больших карточек */
@media (max-width: 620px) {
  .explorer { padding: 8px 10px; }
  .xp-toolbar { display: none; }
  .search-mini { flex-basis: 30%; }
  .explorer .xp-table tbody th:has(.thumb) { padding-left: 40px; }
  .explorer .xp-table tbody th .thumb { left: 0; width: 32px; height: 32px; }
  .explorer .xp-table tbody td:is(.c-leads, .c-spend) { font-size: 14px; }
  .explorer .xp-table tbody td:is(.c-ctr, .c-cpc) { font-size: 11.5px; }
  .explorer .xp-table tbody tr { gap: 3px 10px; }
  .explorer .xp-table tbody td.c-status .xp-badge, .explorer .xp-table tbody td.c-verdict .xp-badge { font-size: 0; gap: 0; }
  .explorer .xp-table tbody td.c-status .xp-badge::before, .explorer .xp-table tbody td.c-verdict .xp-badge::before { width: 8px; height: 8px; }
  .explorer .xp-table tbody tr {
    display: flex; flex-wrap: wrap; align-items: center; gap: 3px 12px; padding: 9px 2px;
    border-top: 1px solid var(--line);
  }
  .explorer .xp-table tbody th { flex: 1 1 calc(100% - 96px); min-width: 0; display: block; order: 0; }
  .explorer .xp-table tbody th button { font-size: 13.5px; }
  .explorer .xp-table tbody th small { font-size: 11px; }
  .explorer .xp-table tbody td { order: 2; flex: 0 0 auto; font-size: 12px; color: var(--muted); }
  .explorer .xp-table tbody td::before { display: inline; content: attr(data-label) " "; font-size: 10.5px; margin: 0; color: var(--muted); font-family: var(--interface-font, "Manrope", sans-serif); }
  .explorer .xp-table tbody td.c-cpl { order: 1; flex: 0 0 auto; margin-left: auto; font-size: 14px; }
  .explorer .xp-table tbody td.c-cpl::before { display: none; }
  .explorer .xp-table tbody td.c-leads, .explorer .xp-table tbody td.c-spend { color: var(--ink); }
  .explorer .xp-table tbody td:is(.c-imp, .c-clicks, .c-paused) { display: none; }
  .explorer .xp-table tbody td:has(.xp-badge) { grid-column: auto; order: 2; }
  .explorer .xp-table tbody td:has(.xp-badge)::before { display: none; }
}
/* быстрые кнопки как в боте (вместо выпадающих меню) */
.xp-select, .xp-order { display: none !important; }
.xp-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 10px 0 0; padding-bottom: 2px; }
.xp-chips::-webkit-scrollbar { display: none; }
.xp-chips button {
  flex: none; min-height: 32px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel2); color: var(--muted); font-size: 12.5px; font-weight: 650; white-space: nowrap;
}
.xp-chips button[aria-pressed=true] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.xp-chips-f { margin-top: 6px; }
.xp-chips-f button { min-height: 30px; font-size: 12px; }

/* строки: название спокойнее, лиды/расход крупнее */
.xp-table tbody th button { font-size: 12.5px; font-weight: 600; }
.xp-table tbody td.c-leads, .xp-table tbody td.c-spend { font-size: 14px; font-weight: 800; color: var(--ink); }
.xp-table tbody td.c-cpl .xp-price > span { font-size: 13.5px; }
.xp-table tbody td:is(.c-ctr, .c-cpc, .c-imp, .c-clicks) { font-size: 12px; }

/* карточка объявления */
.ad-sheet h2 { margin: 8px 0 2px; font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
.ad-head small { color: var(--muted); font-size: 12px; }
.ad-big { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0 8px; }
.ad-big div { padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel2); }
.ad-big small, .ad-small small { display: block; color: var(--muted); font-size: 11px; }
.ad-big b { display: block; margin-top: 2px; font-family: var(--mono); font-size: 22px; font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.ad-big b.good { color: var(--green); } .ad-big b.warn { color: var(--amber); } .ad-big b.bad { color: var(--red); }
.ad-small { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--line); }
.ad-small div { padding: 8px 10px; background: var(--panel); }
.ad-small span { font-family: var(--mono); font-size: 13.5px; font-weight: 650; }
.ad-actions { display: grid; gap: 7px; margin-top: 14px; }
.ad-actions button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--panel2); font-weight: 700; font-size: 14px; }
.ad-actions button small { color: var(--muted); font-weight: 500; font-size: 11.5px; }
.ad-actions .primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.ad-actions .primary small { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.ad-note { margin-top: 10px; color: var(--muted); font-size: 11px; text-align: center; }
dialog { background: var(--panel); border-color: var(--line); }
dialog::backdrop { background: #000000a6; backdrop-filter: blur(2px); }
dialog form button { background: var(--soft); border: 1px solid var(--line); }

/* компактная шапка: БМ · Период · 🔍 в одну строку */
.tools { gap: 6px; margin-bottom: 8px; }
.tools label { min-height: 38px; }
.search-mini { flex: 0 1 34%; display: flex !important; align-items: center; gap: 6px; padding: 0 9px; }
.search-mini svg { width: 15px; height: 15px; fill: none; stroke: var(--muted); stroke-width: 1.8; flex: none; }
.search-mini input { width: 100%; min-width: 0; border: 0; background: transparent; color: var(--ink); font-size: 13px; padding: 6px 0; outline: none; }
.heading { margin: 10px 0 8px; }
.heading h1 { font-size: 22px; }
.xp-toolbar:empty, .xp-toolbar:not(:has(*)) { display: none; }
.xp-chips { margin-top: 2px; gap: 5px; }
.xp-chips button { min-height: 28px; padding: 3px 10px; font-size: 11.5px; }
.xp-chips-f button { min-height: 26px; font-size: 11px; }
.xp-summary { margin: 8px 2px 4px; }

/* картинки креативов */
.thumb { width: 30px; height: 30px; flex: none; border-radius: 7px; object-fit: cover; background: var(--soft); vertical-align: middle; margin-right: 8px; border: 1px solid var(--line); }
.thumb.big { width: 54px; height: 54px; border-radius: 11px; margin: 0; }
.xp-table tbody th { position: relative; }
.xp-table tbody th:has(.thumb) { padding-left: 48px; }
.xp-table tbody th .thumb { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); margin: 0; }

/* дерево кампании */
.tree-sheet .crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; margin: 2px 0 10px; font-size: 12px; color: var(--muted); }
.crumbs button { padding: 3px 7px; border-radius: 7px; background: var(--panel2); border: 1px solid var(--line); font-size: 12px; font-weight: 650; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs button[aria-current=true] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.crumbs .sep { font-style: normal; opacity: .6; }
.crumbs .crumb-acc { font-weight: 700; }
.crumbs .crumb-ad { color: var(--ink); font-weight: 650; max-width: 70vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f-title { display: flex; gap: 11px; align-items: center; }
.f-title h2 { margin: 4px 0 0; font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
.hint { margin-top: 8px; color: var(--muted); font-size: 12px; }
.bud, .bud-edit { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel2); }
.bud { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bud b { font-family: var(--mono); font-size: 16px; }
.bud button { padding: 6px 12px; border-radius: 9px; background: var(--ink); color: var(--bg); font-weight: 700; font-size: 13px; }
.bud-edit > span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 7px; }
.bud-row { display: flex; gap: 6px; margin-top: 6px; }
.bud-row input { flex: 1; min-width: 0; text-align: center; font-family: var(--mono); font-size: 18px; font-weight: 800; padding: 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); }
.bud-row button { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); font-weight: 700; }
.bud-row .act { flex: 1; }
.ad-actions.row { display: flex; gap: 7px; }
.ad-actions .act { flex: 1; min-height: 42px; border-radius: 11px; border: 1px solid var(--line); background: var(--panel2); font-weight: 750; font-size: 14px; }
.ad-actions .act.primary, .bud-row .act.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.t-title { margin: 16px 0 6px; font-size: 13px; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .04em; }
.tree { display: grid; gap: 2px; }
.tree button { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 7px; width: auto; min-width: 0; min-height: 40px; padding: 6px 9px; border-radius: 9px; text-align: left; font-size: 13px; }
.tree .t-n { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.tree .t-m { flex: none; margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.tree .t-m b { color: var(--ink); font-weight: 750; }
.tree .t-m i { font-style: normal; font-weight: 750; }
.tree .t-c { background: var(--panel2); border: 1px solid var(--line); }
.tree .t-s { margin-left: 12px; border-left: 2px solid var(--line); border-radius: 0 9px 9px 0; }
.tree .t-d { margin-left: 26px; border-left: 2px solid var(--line); border-radius: 0 9px 9px 0; font-size: 12.5px; }
.tree .t-d .t-n { font-weight: 550; }
.tree .t-d .thumb { width: 24px; height: 24px; margin: 0; border-radius: 6px; }
.tree .here { background: color-mix(in srgb, var(--ink) 10%, transparent); border-left-color: var(--ink); }
.sdot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--muted); }
.sdot.on { background: var(--green); } .sdot.off { background: var(--red); } .sdot.idle { background: var(--amber); }
.t-foot { display: flex; justify-content: center; gap: 14px; margin-top: 14px; }
.t-foot .link { color: var(--muted); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; min-height: 32px; }
#toast { position: fixed; z-index: 99; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  max-width: min(92vw, 460px); padding: 10px 14px; border-radius: 12px; background: var(--ink); color: var(--bg); font-size: 13.5px; font-weight: 650;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
dialog:has(.tree-sheet) { max-height: 90dvh; }
@media (hover: hover) { .tree button:hover { background: var(--soft); } }
@media (max-width: 560px) {
  .tree .t-n { flex: 1 1 calc(100% - 60px); }
  .tree .t-m { padding-left: 2px; }
}

@media (min-width: 1080px) {
  body > header { background: color-mix(in srgb, var(--panel) 80%, transparent); }
  .dock button:is([aria-current=true])::after { top: 50%; left: 3px; width: 3px; height: 16px; transform: translateY(-50%); }
}

/* ---- как приложение: без зума, подсветки и выделения ---- */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
* { -webkit-tap-highlight-color: transparent; }
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; overscroll-behavior: none; }
input, textarea { -webkit-user-select: text; user-select: text; }
button:focus:not(:focus-visible), select:focus:not(:focus-visible) { outline: none; }
button { touch-action: manipulation; transition: transform .08s ease, background-color .15s ease; }
button:active:not(:disabled) { transform: scale(.97); }

/* ---- значок статуса ---- */
.st { position: relative; display: inline-block; flex: none; width: 16px; height: 16px; border-radius: 5px; vertical-align: -3px; }
.st-on::before { content: ""; position: absolute; inset: 4.5px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent); }
.st-pause { background: color-mix(in srgb, var(--amber) 18%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--amber) 45%, transparent); }
.st-pause::before, .st-pause::after { content: ""; position: absolute; top: 4.5px; width: 2.4px; height: 7px; border-radius: 2px; background: var(--amber); }
.st-pause::before { left: 5.2px; } .st-pause::after { right: 5.2px; }
.st-off { background: color-mix(in srgb, var(--red) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--red) 45%, transparent); }
.st-off::before, .st-off::after { content: ""; position: absolute; left: 4px; right: 4px; top: 7.3px; height: 1.6px; border-radius: 2px; background: var(--red); transform: rotate(45deg); }
.st-off::after { transform: rotate(-45deg); }
.st-wait { border-radius: 50%; box-shadow: inset 0 0 0 1.6px var(--muted); transform: scale(.7); }
.xp-badge.xp-st { gap: 6px; }
.xp-badge.xp-st::before { display: none; }
.pill.st-pill { display: inline-flex; align-items: center; gap: 6px; }
.pill.st-pill::before { display: none !important; }
.pill.st-pill.pause { color: var(--amber); }

/* ---- бид ---- */
.bid-tag { display: inline-flex; align-items: center; gap: 3px; margin-right: 6px; padding: 1px 6px 1px 4px; border-radius: 7px; vertical-align: 1px;
  background: color-mix(in srgb, #ff5a5f 15%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, #ff5a5f 40%, transparent);
  font-size: .85em; line-height: 1.35; white-space: nowrap; }
.bid-tag b { font-family: var(--mono); font-weight: 750; font-size: .95em; color: var(--ink); }
.bidv { color: #ff7a7e; font-weight: 750; }

/* ---- дерево: что стоит ---- */
.tree .st { margin-right: 1px; }
.tree .is-off .t-n, .tree .is-off .t-m { opacity: .5; }
.tree .is-off .thumb { filter: grayscale(1); opacity: .55; }

/* ---- подтверждение прямо в кнопке ---- */
.ad-actions .ask { flex: 1; display: grid; gap: 8px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel2); animation: ask-in .16s ease; }
.ad-actions .ask > span, .bud-edit .ask > span { font-size: 13.5px; font-weight: 650; line-height: 1.3; }
.bud-edit .ask { display: grid; gap: 8px; animation: ask-in .16s ease; }
.ask-row { display: flex; gap: 8px; }
.ask-row .act { flex: 1; min-height: 42px; border-radius: 11px; border: 1px solid var(--line); background: var(--panel); font-weight: 750; font-size: 14px; }
.ask-row .act.stop { background: var(--amber); border-color: var(--amber); color: #111; }
.ask-row .act.go { background: var(--green); border-color: var(--green); color: #fff; }
.act.busy { flex: 1; min-height: 42px; border-radius: 11px; border: 1px dashed var(--line); background: transparent; color: var(--muted); font-weight: 650; }
@keyframes ask-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

/* ---- без обводки при тапе/прокрутке (телефон) ---- */
@media (hover: none), (pointer: coarse) {
  :focus, :focus-visible, :focus-within { outline: none !important; }
  .cpl-hit:is(:hover, :focus) { background: transparent; }
}
::selection { background: transparent; }
input::selection { background: color-mix(in srgb, var(--ink) 25%, transparent); }

/* ---- 🧠 Советы ---- */
.adv-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; width: 100%; margin: 0 0 8px; padding: 9px 12px; border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, var(--line)); text-align: left; font-size: 12.5px;
  background: linear-gradient(100deg, color-mix(in srgb, var(--ink) 9%, var(--panel2)), var(--panel2)); }
.adv-bar .adv-t { font-weight: 800; font-size: 13.5px; margin-right: 2px; }
.adv-bar .adv-n { color: var(--muted); white-space: nowrap; }
.adv-bar .adv-n b { color: var(--ink); font-family: var(--mono); }
.adv-bar .adv-n.zero { opacity: .45; }
.adv-bar > i { margin-left: auto; font-style: normal; font-size: 18px; color: var(--muted); }
.adv-sheet h2 { margin: 0 0 10px; font-size: 19px; }
.adv-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.adv-tabs button { padding: 7px 2px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); font-size: 12px; font-weight: 700; white-space: nowrap; }
.adv-tabs button b { display: block; font-family: var(--mono); font-size: 15px; margin-top: 1px; }
.adv-tabs button[aria-pressed=true] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.adv-list { display: grid; gap: 4px; margin-top: 8px; padding-bottom: 4px; }
.adv-row { display: flex; align-items: stretch; border-radius: 11px; border: 1px solid var(--line); background: var(--panel2); overflow: hidden; }
.adv-row.on { border-color: color-mix(in srgb, var(--ink) 40%, var(--line)); }
.adv-ck { flex: none; width: 42px; position: relative; }
.adv-ck::before { content: ""; position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 6px; border: 1.6px solid var(--muted); }
.adv-ck[aria-pressed=true]::before { background: var(--ink); border-color: var(--ink); }
.adv-ck[aria-pressed=true]::after { content: ""; position: absolute; left: 18px; top: 50%; width: 5px; height: 9px; margin-top: -6px; border: solid var(--bg); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.adv-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 0; text-align: left; }
.adv-main .thumb { margin: 0; }
.adv-txt { min-width: 0; display: grid; gap: 1px; }
.adv-name { font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adv-txt small { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adv-why { font-family: var(--mono); font-size: 11px; color: var(--ink); opacity: .85; line-height: 1.35; }
.adv-empty { margin: 18px 0; text-align: center; color: var(--muted); font-size: 13.5px; }
.adv-foot { position: sticky; bottom: -1px; margin: 8px -4px 0; padding: 10px 4px calc(6px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--panel) 28%); }
.adv-act { display: flex; gap: 8px; }
.adv-act .act { min-height: 44px; border-radius: 11px; border: 1px solid var(--line); background: var(--panel2); font-weight: 750; font-size: 14px; padding: 0 14px; }
.adv-act .act.primary { flex: 1; background: var(--ink); color: var(--bg); border-color: var(--ink); }
.adv-act .act:disabled { opacity: .4; }
.adv-foot .ask { display: grid; gap: 8px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel2); }
.adv-foot .ask > span { font-size: 13.5px; font-weight: 700; }
.adv-foot .act.busy { width: 100%; }
.adv-bar .adv-n em { font-style: normal; }
.adv-bar .adv-n b { margin-left: 3px; }
@media (max-width: 480px) { .adv-bar { flex-wrap: nowrap; gap: 9px; } .adv-bar .adv-n em { display: none; } .adv-bar .adv-n b { font-size: 13.5px; } }
.adv-bar .adv-t { white-space: nowrap; } .adv-bar { overflow: hidden; }
