/* Trend Radar v3 */
:root {
  --bg: #f3f4f7; --surface: #ffffff; --surface-2: #f7f8fa; --surface-3: #eef0f4;
  --ink: #121826; --ink-2: #4a5263; --ink-3: #8a91a0; --line: #e3e6ec; --line-2: #eef0f4;
  --brand: #4f46e5; --brand-2: #6366f1; --brand-soft: #eef0ff; --brand-ink: #3730a3;
  --ok: #059669; --ok-soft: #e6f6ef; --danger: #dc2626; --danger-soft: #fdeceb; --warn: #b45309; --warn-soft: #fdf3e2;
  --hot: #ea3b0c; --hot-2: #f97316;
  --side-bg: #0e1322; --side-ink: #c5cadb; --side-ink-2: #7d86a3; --side-hover: #182035; --side-on: #222b47; --side-line: #1c2438;
  --c-demand: #047857; --b-demand: #e3f6ee;
  --c-repost: #1d4ed8; --b-repost: #e8effd;
  --c-like: #be123c; --b-like: #fdeaf0;
  --c-view: #6d28d9; --b-view: #f1ebfe;
  --c-comp: #b45309; --b-comp: #fdf1df;
  --c-news: #0f766e; --b-news: #e2f5f3;
  --c-trend: #c2410c; --b-trend: #ffeee3;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-2: 0 1px 3px rgba(16, 24, 40, .06), 0 8px 24px -6px rgba(16, 24, 40, .10);
  --shadow-3: 0 12px 40px -8px rgba(16, 24, 40, .28);
  --radius: 14px;
  --body: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0e15; --surface: #141925; --surface-2: #191f2d; --surface-3: #212839;
    --ink: #e9ebf2; --ink-2: #a6acbc; --ink-3: #6e7689; --line: #262d3d; --line-2: #1e2432;
    --brand: #8183f4; --brand-2: #9a9cf8; --brand-soft: #22254a; --brand-ink: #c9caff;
    --ok: #34d399; --ok-soft: #10302a; --danger: #f87171; --danger-soft: #3a1a1c; --warn: #fbbf24; --warn-soft: #33270e;
    --hot: #ff5a2a; --hot-2: #ff8a3d;
    --side-bg: #080b11; --side-ink: #c0c6d8; --side-ink-2: #6f7894; --side-hover: #121826; --side-on: #1b2236; --side-line: #151b29;
    --c-demand: #4ade9b; --b-demand: rgba(52, 211, 153, .12);
    --c-repost: #7aa7ff; --b-repost: rgba(96, 145, 255, .13);
    --c-like: #fb7299; --b-like: rgba(251, 113, 153, .12);
    --c-view: #b69cff; --b-view: rgba(167, 139, 250, .13);
    --c-comp: #fbbf4a; --b-comp: rgba(251, 191, 36, .12);
    --c-news: #4fd1c5; --b-news: rgba(45, 212, 191, .12);
    --c-trend: #fb923c; --b-trend: rgba(251, 146, 60, .13);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-2: 0 1px 3px rgba(0, 0, 0, .35), 0 8px 24px -6px rgba(0, 0, 0, .5);
    --shadow-3: 0 12px 40px -8px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 124px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14.5px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: 1.5rem; font-weight: 750; }
h2 { font-size: 1.02rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
h2 .i { color: var(--ink-3); }
h3 { font-size: .95rem; font-weight: 700; }
p { margin: 0; }
img { display: block; }
code { font-family: var(--mono); font-size: .82em; }
.i { width: 18px; height: 18px; flex: none; }
.muted { color: var(--ink-2); }
.small { font-size: .86rem; }
.xs { font-size: .76rem; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.bad { color: var(--danger); }
.ok { color: var(--ok); }
.grow { flex: 1; min-width: 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-s { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.inline { display: inline; margin: 0; }
.w-90 { width: 90px; } .w-130 { width: 130px; } .w-160 { width: 160px; }
[hidden] { display: none !important; }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--side-bg); color: var(--side-ink);
  display: flex; flex-direction: column; padding: 18px 12px 12px; gap: 4px; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 1.08rem; padding: 2px 8px 14px; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--hot-2), #e11d48 55%, #7c3aed); box-shadow: 0 4px 14px -4px rgba(225, 29, 72, .6); }
.brand-mark .i { width: 18px; height: 18px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--side-ink); font-weight: 500; font-size: .9rem; }
.nav a:hover { background: var(--side-hover); color: #fff; text-decoration: none; }
.nav a.on { background: var(--side-on); color: #fff; box-shadow: inset 3px 0 0 var(--hot-2); }
.nav a .i { width: 17px; height: 17px; color: var(--side-ink-2); }
.nav a.on .i, .nav a:hover .i { color: #fff; }
.nav a span { flex: 1; min-width: 0; }
.nav-h { display: flex; justify-content: space-between; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--side-ink-2); padding: 16px 10px 6px; }
.cnt { font-style: normal; font-size: .72rem; font-weight: 700; min-width: 22px; text-align: center; padding: 1px 7px; border-radius: 999px;
  background: var(--hot); color: #fff; font-family: var(--mono); }
.nav a .cnt { margin-left: 2px; }
.hdot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; background: var(--ok); }
.hdot.h-ok { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .15); }
.hdot.h-err { background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, .2); }
.hdot.h-off { background: #4b5470; }
.side-foot { margin-top: auto; padding-top: 14px; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--side-line); }
.spend { display: flex; align-items: center; gap: 8px; color: var(--side-ink-2); font-size: .8rem; padding: 6px 10px; border-radius: 9px; }
.spend:hover { background: var(--side-hover); text-decoration: none; }
.spend span { flex: 1; }
.spend b { color: #fff; }
.spend .i { width: 15px; height: 15px; }
.me { display: flex; align-items: center; gap: 10px; margin: 0; padding: 6px 6px 6px 10px; }
.me-name { flex: 1; min-width: 0; font-size: .86rem; color: #fff; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; font-size: .8rem; flex: none;
  background: linear-gradient(135deg, #6366f1, #a855f7); color: #fff; }
.avatar.sm { width: 24px; height: 24px; font-size: .7rem; vertical-align: middle; margin-right: 4px; }
.icon-btn { background: transparent; border: 0; color: inherit; padding: 6px; border-radius: 8px; cursor: pointer; display: inline-grid; place-items: center; }
.side .icon-btn { color: var(--side-ink-2); }
.side .icon-btn:hover { background: var(--side-hover); color: #fff; }
.scrim { display: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 28px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-2); }
.menu-btn { display: none; color: var(--ink); }
.quick-add { flex: 1; max-width: 720px; display: flex; align-items: center; gap: 8px; margin: 0; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; padding: 4px 4px 4px 12px; box-shadow: var(--shadow-1); }
.quick-add:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.quick-add .i { color: var(--ink-3); width: 17px; height: 17px; }
.quick-add input { flex: 1; border: 0 !important; background: transparent !important; padding: 6px 0 !important; box-shadow: none !important; outline: none !important; }
.content { padding: 24px 28px 80px; display: flex; flex-direction: column; gap: 20px; width: 100%; max-width: 1480px; }

/* ---------- forms & buttons ---------- */
input, select, textarea, button { font: inherit; color: inherit; }
input[type=text], input[type=password], input[type=number], input[type=url], input[type=search], select, textarea {
  background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 8px 11px; min-width: 0; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
textarea { resize: vertical; line-height: 1.5; }
input[type=file] { font-size: .82rem; color: var(--ink-2); max-width: 100%; }
button:focus-visible, a:focus-visible, .btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 9px; border: 1px solid transparent;
  font-weight: 600; font-size: .86rem; cursor: pointer; white-space: nowrap; line-height: 1.2; transition: background .15s, border-color .15s, color .15s, transform .05s; }
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn .i { width: 16px; height: 16px; }
.btn.sm { padding: 5px 10px; font-size: .79rem; border-radius: 8px; }
.btn.sm .i { width: 14px; height: 14px; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(79, 70, 229, .3); }
.btn-primary:hover { background: var(--brand-2); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--ink-3); }
.btn-do { background: var(--ok); color: #fff; }
.btn-do:hover { filter: brightness(1.08); }
.btn-reject { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.btn-reject:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(1.08); }
.danger-t { color: var(--danger); }
.btn.is-running .i { animation: spin 1s linear infinite; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: .8rem; font-weight: 600; color: var(--ink-2); min-width: 0; }
.field-h { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); margin-top: 6px; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--ink-2); cursor: pointer; }
.checks { display: flex; flex-wrap: wrap; gap: 6px; }
.pill-check input, .rchip input { position: absolute; opacity: 0; pointer-events: none; }
.pill-check span { display: inline-block; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: .82rem; cursor: pointer; background: var(--surface); }
.pill-check input:checked + span { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
.pill-check input:focus-visible + span, .rchip input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- common blocks ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-1); }
.flash { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 11px; background: var(--ok-soft); color: var(--ok); font-weight: 500; font-size: .9rem; }
.flash .i { width: 17px; height: 17px; }
.flash-error { background: var(--danger-soft); color: var(--danger); }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.page-head > div:first-child { flex: 1 1 420px; max-width: 900px; display: flex; flex-direction: column; gap: 4px; }
.page-head-t { flex-direction: row !important; gap: 14px !important; align-items: flex-start; }
.head-ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--brand-soft); color: var(--brand); }
.head-ico .i { width: 22px; height: 22px; }
.hi-x { background: var(--ink); color: var(--surface); }
.hi-instagram { background: linear-gradient(135deg, #f58529, #dd2a7b 50%, #8134af); color: #fff; }
.hi-competitor { background: var(--b-comp); color: var(--c-comp); }
.hi-google_trends { background: var(--b-trend); color: var(--c-trend); }
.hi-google_news { background: var(--b-news); color: var(--c-news); }
.hi-reddit { background: #ff4500; color: #fff; }
.section { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; font-size: .72rem; font-weight: 600;
  background: var(--surface-3); color: var(--ink-2); white-space: nowrap; }
.tag-form { background: var(--brand-soft); color: var(--brand-ink); }
.tag-league { background: var(--b-repost); color: var(--c-repost); }
.mk-open { background: var(--ok-soft) !important; color: var(--ok) !important; }
.mk-some { background: var(--warn-soft) !important; color: var(--warn) !important; }
.mk-saturated { background: var(--danger-soft) !important; color: var(--danger) !important; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.stage { font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); }
.stage-doing { background: var(--b-repost); color: var(--c-repost); }
.stage-uploaded { background: var(--b-view); color: var(--c-view); }
.stage-sold { background: var(--ok-soft); color: var(--ok); }
.stage-rejected, .stage-nosale { background: var(--danger-soft); color: var(--danger); }
.empty { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 48px 20px;
  border: 1.5px dashed var(--line); border-radius: var(--radius); color: var(--ink-2); background: var(--surface); }
.empty > .i { width: 34px; height: 34px; color: var(--ink-3); margin-bottom: 4px; }
.empty-t { font-weight: 600; color: var(--ink); }
.more-link { align-self: center; display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; color: var(--ink-2); padding: 6px 14px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.more-link:hover { color: var(--brand); border-color: var(--brand); text-decoration: none; }
.more-link .i { width: 14px; height: 14px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: .86rem; font-weight: 500; align-self: flex-start; }
.back-link .i { width: 16px; height: 16px; }
.subnav { display: flex; gap: 6px; flex-wrap: wrap; position: sticky; top: 61px; z-index: 10; padding: 8px 0; background: var(--bg); }
.subnav a { padding: 5px 12px; border-radius: 999px; font-size: .82rem; font-weight: 600; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); }
.subnav a:hover { color: var(--brand); border-color: var(--brand); text-decoration: none; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; color: var(--ink); box-shadow: var(--shadow-1);
  transition: transform .12s, box-shadow .12s; }
.stat:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-2); }
.stat > .i { grid-row: 1 / 3; width: 42px; height: 42px; padding: 10px; border-radius: 12px; }
.stat-n { font-size: 1.6rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-l { font-size: .8rem; color: var(--ink-2); font-weight: 500; }
.st-new > .i { background: var(--b-trend); color: var(--c-trend); }
.st-doing > .i { background: var(--b-repost); color: var(--c-repost); }
.st-up > .i { background: var(--b-view); color: var(--c-view); }
.st-sold > .i { background: var(--b-demand); color: var(--c-demand); }

/* ---------- filters ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar-note { margin-left: auto; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin: 0; }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-3); border-radius: 11px; }
.seg > a, .seg > button, .seg form button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 8px; border: 0; background: transparent;
  color: var(--ink-2); font-weight: 600; font-size: .84rem; cursor: pointer; white-space: nowrap; }
.seg > a:hover, .seg > button:hover, .seg form button:hover { color: var(--ink); text-decoration: none; }
.seg .on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }
.seg .i { width: 14px; height: 14px; }
.seg-full { display: flex; }
.seg-full form { flex: 1; display: flex; }
.seg-full form button { flex: 1; justify-content: center; }

/* ---------- idea cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
  box-shadow: var(--shadow-1); transition: transform .14s ease, box-shadow .14s ease, opacity .25s, border-color .14s; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.card.is-hot { border-color: color-mix(in srgb, var(--hot) 45%, var(--line)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--hot) 25%, transparent), var(--shadow-1); }
.card.is-gated { opacity: .82; }
.card.leaving { opacity: 0; transform: scale(.96); }
.card-media { position: relative; aspect-ratio: 1 / 1; background: var(--surface-2); overflow: hidden; display: block; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.card:hover .card-media img { transform: scale(1.03); }
.ph { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 18px;
  color: var(--ink-3); background: radial-gradient(circle at 50% 35%, var(--surface-3), var(--surface-2) 70%); }
.ph .i { width: 34%; height: 34%; stroke-width: 1; opacity: .55; }
.ph em { font-style: normal; font-weight: 700; font-size: .95rem; color: var(--ink-2); text-align: center; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.age { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px 5px 8px; border-radius: 999px;
  font-size: .8rem; font-weight: 800; color: #fff; background: rgba(15, 20, 34, .72); backdrop-filter: blur(6px); letter-spacing: -.01em; }
.age .i { width: 14px; height: 14px; }
.age-hot { background: linear-gradient(135deg, var(--hot), var(--hot-2)); box-shadow: 0 4px 14px -3px rgba(234, 59, 12, .55); }
.age-warm { background: rgba(180, 83, 9, .88); }
.score { position: absolute; top: 10px; right: 10px; min-width: 40px; height: 40px; padding: 0 6px; border-radius: 12px; display: grid; place-items: center;
  font: 800 1rem/1 var(--mono); color: #fff; background: rgba(15, 20, 34, .72); backdrop-filter: blur(6px); }
.s-hot { background: linear-gradient(135deg, #e11d48, var(--hot)); box-shadow: 0 4px 14px -3px rgba(225, 29, 72, .55); }
.s-mid { background: rgba(217, 119, 6, .92); }
.s-low { background: rgba(71, 80, 99, .85); }
.s-wait { background: rgba(15, 20, 34, .6); }
.s-text { font: 700 .72rem/1 var(--body); padding: 0 9px; height: 28px; border-radius: 8px; }
.ribbon { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 8px;
  font-size: .72rem; font-weight: 700; background: #f59e0b; color: #1f1300; }
.ribbon .i { width: 13px; height: 13px; }
.ribbon-mute { background: rgba(15, 20, 34, .72); color: #fff; }
.card-body { padding: 12px 14px 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { color: var(--ink); font-weight: 650; font-size: .92rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-title:hover { color: var(--brand); text-decoration: none; }
.proc { display: flex; align-items: center; gap: 7px; font-size: .78rem; color: var(--brand); font-weight: 500; }
.metrics { display: flex; flex-wrap: wrap; gap: 5px; }
.m { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px 3px 6px; border-radius: 7px; font-size: .74rem; font-weight: 500; white-space: nowrap; }
.m .i { width: 13px; height: 13px; }
.m b { font-weight: 750; font-variant-numeric: tabular-nums; }
.m-demand { background: var(--b-demand); color: var(--c-demand); }
.m-repost { background: var(--b-repost); color: var(--c-repost); }
.m-like { background: var(--b-like); color: var(--c-like); }
.m-view { background: var(--b-view); color: var(--c-view); }
.m-comp { background: var(--b-comp); color: var(--c-comp); }
.m-news { background: var(--b-news); color: var(--c-news); }
.m-trend { background: var(--b-trend); color: var(--c-trend); }
.card-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line-2); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.srcs { display: inline-flex; gap: 6px; color: var(--ink-3); }
.srcs .i { width: 15px; height: 15px; }
.acts { display: inline-flex; gap: 6px; }

/* ---------- source list (overview) ---------- */
.srclist { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); overflow: hidden; }
.src { display: grid; grid-template-columns: 190px minmax(0, 1fr) 190px 90px 118px; gap: 14px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line-2); }
.src:first-child { border-top: 0; }
.src.is-off { opacity: .6; }
.src-name { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; }
.src-name:hover { text-decoration: none; color: var(--brand); }
.src-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); flex: none; }
.src-ico .i { width: 16px; height: 16px; }
.src-status { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src-when { display: inline-flex; align-items: center; gap: 4px; }
.src-when .i { width: 13px; height: 13px; }
.src-count { font-size: .8rem; color: var(--ink-2); }
.src-count b { color: var(--hot); font-family: var(--mono); }
.src form { justify-self: end; }

/* ---------- source page ---------- */
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.info { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.info-wide { grid-column: 1 / -1; }
.info-l { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.info-l a { text-transform: none; letter-spacing: 0; }
.info-v { font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.info-v .i { width: 16px; height: 16px; }
.query { display: block; padding: 9px 12px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--ink-2);
  font-size: .76rem; line-height: 1.6; word-break: break-word; white-space: pre-wrap; }
.callout { display: flex; gap: 14px; align-items: flex-start; }
.callout > .i { width: 26px; height: 26px; color: var(--brand); }
.addbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.addbar > .i { color: var(--ink-3); }
.addbar input[type=text] { flex: 1; min-width: 180px; width: auto; }
.addbar input.w-160, .addbar input.w-130 { flex: none; }
.comp-list { display: flex; flex-direction: column; margin-top: 12px; border-top: 1px solid var(--line-2); }
.comp { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.comp.is-off { opacity: .55; }
.comp-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.comp-main > span { overflow: hidden; text-overflow: ellipsis; }
.comp-name { font-weight: 650; color: var(--ink); display: inline-flex; align-items: center; gap: 5px; }
.comp-name .i { width: 13px; height: 13px; color: var(--ink-3); }
.limit { display: flex; align-items: center; gap: 6px; margin: 0; }
.limit input { width: 64px; padding: 5px 8px; text-align: center; }
.comp-acts { display: flex; gap: 4px; }
.pslot { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; }
.jobrow .pslot { border: 0; padding: 6px 0 0; background: transparent; }
.pslot-top { display: flex; justify-content: space-between; font-size: .82rem; font-weight: 600; }

/* ---------- progress ---------- */
.bar { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--brand), #a855f7); transition: width .5s ease; }
.done .bar i, .bar-hi i { background: linear-gradient(90deg, #10b981, #34d399); }
.bar-mid i { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.bar-lo i { background: linear-gradient(90deg, #ef4444, #f87171); }
.spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; display: inline-block; animation: spin .8s linear infinite; flex: none; }
.score .spin { width: 16px; height: 16px; color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.tray { position: fixed; right: 18px; bottom: 18px; width: 340px; max-width: calc(100vw - 32px); display: flex; flex-direction: column; align-items: flex-end; gap: 8px; z-index: 50; pointer-events: none; }
.tray-list { width: 100%; display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; pointer-events: auto; }
.tray .job { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; box-shadow: var(--shadow-3);
  display: flex; flex-direction: column; gap: 6px; animation: rise .25s ease; }
.tray-pill { pointer-events: auto; display: inline-flex; align-items: stretch; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-2); overflow: hidden; animation: rise .2s ease; }
.tray-pill button { border: 0; background: transparent; cursor: pointer; font: 600 .8rem var(--body); color: var(--ink-2); }
.tray-main { display: inline-flex; align-items: center; gap: 8px; padding: 7px 6px 7px 14px; white-space: nowrap; }
.tray-main .spin { color: var(--brand); width: 11px; height: 11px; }
.tray-toggle { padding: 0 12px; border-left: 1px solid var(--line) !important; font-size: .7rem !important; }
.tray-pill button:hover { color: var(--ink); background: var(--surface-2); }
.reload-link { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.job-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .84rem; font-weight: 650; }
.job-label { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); min-width: 0; }
.job-label .spin { color: var(--brand); }
.job-pct { font-size: .76rem; color: var(--brand); }
.job.done .job-pct, .job.done .job-label { color: var(--ok); }
.job-detail { font-size: .75rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job.reload { cursor: pointer; font: 600 .84rem var(--body); color: #fff; background: var(--brand); border: 0; text-align: left; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; padding: 10px 18px; border-radius: 11px;
  background: var(--ink); color: var(--surface); font-weight: 600; font-size: .86rem; box-shadow: var(--shadow-3); animation: rise .2s ease; }
.toast-ok { background: #065f46; color: #ecfdf5; }
.toast-err { background: #991b1b; color: #fef2f2; }

/* ---------- reject dialog ---------- */
.dlg { width: min(540px, calc(100vw - 32px)); border: 0; border-radius: 18px; padding: 22px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-3); }
.dlg::backdrop { background: rgba(8, 11, 20, .55); backdrop-filter: blur(3px); }
.dlg form { display: flex; flex-direction: column; gap: 14px; }
.dlg-head { display: flex; gap: 12px; align-items: flex-start; }
.dlg-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--danger-soft); color: var(--danger); flex: none; }
.reasons { display: flex; flex-wrap: wrap; gap: 7px; }
.rchip { position: relative; }
.rchip span { display: inline-block; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); font-size: .84rem; cursor: pointer; background: var(--surface-2); transition: all .12s; }
.rchip span:hover { border-color: var(--danger); }
.rchip input:checked + span { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); font-weight: 600; }
.dlg-acts { display: flex; justify-content: flex-end; gap: 8px; }

/* ---------- idea detail ---------- */
.detail { display: grid; grid-template-columns: minmax(280px, 400px) minmax(0, 1fr); gap: 26px; align-items: start; }
.gallery { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 10px; }
.gal-main { position: relative; aspect-ratio: 1 / 1; border-radius: 16px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.gal-main img { width: 100%; height: 100%; object-fit: contain; background: var(--surface-2); }
.gal-main .age { font-size: .9rem; padding: 6px 12px 6px 10px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 6px; }
.thumb { padding: 0; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; cursor: pointer; aspect-ratio: 1; background: var(--surface-2); }
.thumb:hover { border-color: var(--brand); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.gal-links { display: flex; gap: 6px; flex-wrap: wrap; }
.quote { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: 10px; padding: 11px 14px;
  display: flex; flex-direction: column; gap: 4px; white-space: pre-wrap; color: var(--ink-2); }
.detail-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.d-head { display: flex; gap: 18px; align-items: flex-start; }
.d-title { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.d-title h1 { font-size: 1.45rem; }
.d-title .xs .i { width: 13px; height: 13px; vertical-align: -2px; }
.ring { --c: var(--ink-3); width: 84px; height: 84px; border-radius: 50%; flex: none; display: grid; place-items: center; align-content: center; position: relative;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--surface-3) 0); }
.ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--bg); }
.ring span, .ring small { position: relative; }
.ring span { font: 800 1.5rem/1 var(--mono); color: var(--c); }
.ring small { font-size: .66rem; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.r-hot { --c: var(--hot); }
.r-mid { --c: #d97706; }
.r-low { --c: var(--ink-3); }
.summary { font-size: 1rem; line-height: 1.6; color: var(--ink); }
.banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 11px; background: var(--brand-soft); color: var(--brand-ink); font-size: .87rem; font-weight: 500; }
.banner .spin { color: var(--brand); }
.banner-warn { background: var(--warn-soft); color: var(--warn); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }
.tile { border-radius: 13px; padding: 12px 13px; display: flex; flex-direction: column; gap: 2px; min-width: 0; border: 1px solid transparent; }
.tile > .i { width: 30px; height: 30px; padding: 7px; border-radius: 9px; margin-bottom: 6px; background: var(--surface); }
.tile b { font-size: 1.4rem; line-height: 1.1; font-weight: 800; font-variant-numeric: tabular-nums; }
.tile > span { font-size: .78rem; font-weight: 600; opacity: .85; }
.tile-links { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 6px; opacity: .9; word-break: break-word; }
.tile-links a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.t-demand { background: var(--b-demand); color: var(--c-demand); }
.t-repost { background: var(--b-repost); color: var(--c-repost); }
.t-like { background: var(--b-like); color: var(--c-like); }
.t-view { background: var(--b-view); color: var(--c-view); }
.t-comp { background: var(--b-comp); color: var(--c-comp); }
.t-news { background: var(--b-news); color: var(--c-news); }
.t-trend { background: var(--b-trend); color: var(--c-trend); }
.websrc { display: flex; gap: 12px; align-items: flex-start; }
.websrc > .i { width: 22px; height: 22px; color: var(--c-news); margin-top: 2px; }
.actionbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.actionbar form { margin: 0; }
.actionbar .btn-do, .actionbar .btn-reject:not(.sm) { padding: 10px 22px; font-size: .92rem; }
.sugs { display: flex; flex-direction: column; gap: 6px; }
.sug { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); }
.sug code { flex: 1; font-family: var(--body); font-size: .86rem; color: var(--ink); }
.crits { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 22px; margin-top: 12px; }
.crit { display: flex; flex-direction: column; gap: 5px; }
.crit-top { display: flex; justify-content: space-between; gap: 8px; }
.says { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.say { padding: 8px 12px; border-left: 3px solid var(--c-demand); background: var(--b-demand); border-radius: 0 9px 9px 0; font-size: .86rem; color: var(--ink); }
.log summary { cursor: pointer; font-weight: 600; color: var(--ink-2); }
.log p { margin-top: 6px; }

/* ---------- work board ---------- */
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
.col { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.col h2 { font-size: .9rem; padding: 2px 4px 4px; }
.col h2 .cnt { margin-left: auto; background: var(--surface-3); color: var(--ink-2); }
.col-doing h2 .i { color: var(--c-repost); }
.col-up h2 .i { color: var(--c-view); }
.col-sold h2 .i { color: var(--c-demand); }
.col-nosale h2 .i { color: var(--danger); }
.col-empty { padding: 14px 6px; text-align: center; }
.wcard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; box-shadow: var(--shadow-1); }
.wthumb { width: 56px; height: 56px; border-radius: 9px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; color: var(--ink-3); }
.wthumb img { width: 100%; height: 100%; object-fit: cover; }
.wbody { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wbody .xs .i { width: 12px; height: 12px; vertical-align: -2px; }
.wtitle { color: var(--ink); font-weight: 600; font-size: .86rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wacts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.wform { display: flex; gap: 6px; flex: 1 1 100%; margin: 0; }
.wform input { padding: 5px 9px; font-size: .82rem; }

/* ---------- settings ---------- */
.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 9px 14px; align-items: center; }
.kv > span:nth-child(odd) { color: var(--ink-2); }
.meter { display: block; height: 5px; border-radius: 999px; background: var(--surface-3); margin-top: 5px; overflow: hidden; max-width: 220px; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, #10b981, #f59e0b); }
.joblist { display: flex; flex-direction: column; }
.jobrow { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line-2); }
.jobrow:first-child { border-top: 0; }
.jobrow .hdot { margin-top: 7px; }
.rules { display: flex; flex-direction: column; gap: 6px; }
.rule { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); }
.rule input[type=text] { border-color: transparent; background: transparent; }
.rule input[type=text]:focus { background: var(--surface); }
.rule.is-off input[type=text] { color: var(--ink-3); text-decoration: line-through; }
.rule-new { background: transparent; border-style: dashed; border-color: var(--line); }
.rule-new > .i { color: var(--ink-3); width: 16px; }
.switch { position: relative; width: 34px; height: 20px; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line); transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(14px); }
.switch input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.site-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.site-row > .mono { padding-top: 9px; }
.savebar { position: sticky; bottom: 14px; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px 10px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-3); }
.wlist { display: flex; flex-direction: column; }
.witem { display: flex; gap: 8px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line-2); }
.witem.is-off { opacity: .55; }

/* ---------- tables, users, login ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .86rem; }
th { text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.users-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.users-layout table { min-width: 640px; }
.users-layout .row { flex-wrap: nowrap; }
.auth { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 12px; padding: 16px;
  background: radial-gradient(1200px 600px at 20% -10%, var(--brand-soft), transparent), var(--bg); }
.login { width: min(380px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 28px; box-shadow: var(--shadow-2); display: flex; flex-direction: column; gap: 18px; }
.login-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; }
.add-form { display: flex; flex-direction: column; gap: 14px; }
.field.file { flex-direction: row; align-items: center; gap: 8px; padding: 9px 12px; border: 1.5px dashed var(--line); border-radius: 10px; cursor: pointer; align-self: flex-end; }
.field.file .i { color: var(--ink-3); }

/* ---------- source labels (one color per source) ---------- */
.sps { display: flex; flex-wrap: wrap; gap: 4px; }
.sp, .sf { --sc: var(--ink-2); --sb: var(--surface-3); }
.sp { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px 3px 6px; border-radius: 7px; font-size: .72rem; font-weight: 700;
  background: var(--sb); color: var(--sc); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp .i, .sf .i { width: 13px; height: 13px; }
.sp + .sp { font-weight: 600; opacity: .8; }
.sp-x { --sc: var(--surface); --sb: var(--ink); }
.sp-instagram { --sc: #fff; --sb: linear-gradient(135deg, #f58529, #dd2a7b 55%, #8134af); }
.sp-competitor { --sc: var(--c-comp); --sb: var(--b-comp); }
.sp-google_news { --sc: var(--c-news); --sb: var(--b-news); }
.sp-google_trends { --sc: var(--c-trend); --sb: var(--b-trend); }
.sp-reddit { --sc: #fff; --sb: #ff4500; }
.sp-manual { --sc: var(--brand-ink); --sb: var(--brand-soft); }
.sp-ads { --sc: var(--c-repost); --sb: var(--b-repost); }
.sp-etsy { --sc: #fff; --sb: #f1641e; }
.srcfilter { display: flex; flex-wrap: wrap; gap: 6px; }
.sf { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: .82rem; font-weight: 600;
  background: var(--surface); color: var(--ink-2); border: 1px solid var(--line); }
.sf:hover { text-decoration: none; color: var(--ink); border-color: var(--ink-3); }
.sf b { font-family: var(--mono); font-size: .74rem; opacity: .8; }
.sf.on { background: var(--sb); color: var(--sc); border-color: transparent; box-shadow: 0 0 0 2px color-mix(in srgb, var(--sc) 35%, transparent); }
.sf:not([class*="sp-"]).on { background: var(--ink); color: var(--surface); }

/* ---------- Google Trends keyword board ---------- */
.kwbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.seg > a b { font-weight: 700; font-size: .74rem; color: var(--ink-3); margin-left: 2px; }
.seg .on b { color: var(--brand); }
.pill-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: .84rem; }
.pill-toggle .i { width: 14px; height: 14px; }
.pill-toggle:hover { text-decoration: none; color: var(--ink); }
.pill-toggle.on { background: linear-gradient(135deg, #e11d48, var(--hot)); color: #fff; border-color: transparent; }
.kwboard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); overflow: hidden; }
/* The header and each row are separate grids, so every column has a fixed width (an "auto" column would
   size differently in the header and the rows and push the headings out of line). */
.kwhead, .kwrow { display: grid; grid-template-columns: 30px minmax(200px, 1fr) repeat(3, 96px) 92px 226px; gap: 10px; align-items: center; padding: 10px 14px; }
.kwh-cell { text-align: left; }
.kwlegend { line-height: 1.9; }
.kwlegend .kval { padding: 1px 6px; }
.kwhead { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); background: var(--surface-2);
  border-bottom: 1px solid var(--line); }
.kwrow { border-top: 1px solid var(--line-2); transition: background .12s, opacity .25s; }
.kwrow:hover { background: var(--surface-2); }
.kwrow.is-bo { box-shadow: inset 3px 0 0 var(--hot); }
.kwrow.is-approved { background: var(--ok-soft); }
.kwrow.leaving { opacity: 0; }
.kwrow.open { background: var(--surface-2); }
.kwcheck { display: grid; place-items: center; cursor: pointer; }
.kwcheck input { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }
.kwname { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.kwtoggle { border: 0; background: none; padding: 0; text-align: left; font: 650 .92rem var(--body); color: var(--ink); cursor: pointer; overflow-wrap: anywhere; }
.kwtoggle:hover { color: var(--brand); }
.kval { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 7px; font-size: .76rem; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.kval .i { width: 12px; height: 12px; }
.kval-bo { background: linear-gradient(135deg, #e11d48, var(--hot)); color: #fff; }
.kval-up { background: var(--b-trend); color: var(--c-trend); }
.kval-top { background: var(--surface-3); color: var(--ink-2); font-weight: 600; }
.kval-none { color: var(--line); padding-left: 14px; }
.kwtime { display: flex; flex-direction: column; line-height: 1.3; }
.kw-acts { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.kwchev .i { width: 16px; height: 16px; color: var(--ink-3); transition: transform .15s; }
.kwrow.open .kwchev .i { transform: rotate(90deg); }
.kwdetail { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 12px; padding: 4px 0 6px 44px; }
.kwwins { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.kwwin { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line-2); }
.kwwin.off { opacity: .6; }
.bulkbar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 55; display: flex; align-items: center; gap: 10px;
  padding: 8px 10px 8px 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-3); font-size: .86rem; animation: rise .2s ease; }

.kwlabel { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.pill-toggle.on-soft { background: var(--b-trend); color: var(--c-trend); border-color: transparent; }
.blockbox summary { cursor: pointer; }
.blockrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.chipx { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 10px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink); font-size: .8rem; font-weight: 600; cursor: pointer; }
.chipx .i { width: 12px; height: 12px; color: var(--danger); }
.chipx:hover { border-color: var(--danger); }
.blockadd { flex: 1 1 260px; }

/* ---------- Google News list ---------- */
.ngrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.ncard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-1); }
.nmedia { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); display: block; overflow: hidden; }
.nmedia img { width: 100%; height: 100%; object-fit: cover; }
.nbody { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.npaper { color: var(--c-news); font-weight: 700; }
.ntitle { color: var(--ink); font-weight: 650; font-size: .95rem; line-height: 1.4; }
.ntitle:hover { color: var(--brand); text-decoration: none; }
.norig { line-height: 1.35; }
.nsum { background: var(--b-news); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.nsum ul { margin: 0; padding-left: 18px; }
.nacts { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- competitor products ---------- */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-1); }
.pmedia { position: relative; aspect-ratio: 1 / 1; background: var(--surface-2); display: block; overflow: hidden; }
.pmedia img { width: 100%; height: 100%; object-fit: cover; }
.newtag { position: absolute; top: 8px; left: 8px; padding: 3px 9px; border-radius: 999px; font-size: .72rem; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--hot), var(--hot-2)); }
.pbody { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.ptitle { color: var(--ink); font-weight: 600; font-size: .86rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ptitle:hover { color: var(--brand); text-decoration: none; }
.pprice { font-size: .82rem; font-weight: 700; color: var(--ok); }
.psearch { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.psearch a { display: inline-flex; align-items: center; gap: 3px; padding: 3px 7px; border-radius: 7px; border: 1px solid var(--line); font-size: .72rem;
  font-weight: 600; color: var(--ink-2); background: var(--surface); }
.psearch a:hover { color: var(--brand); border-color: var(--brand); text-decoration: none; }
.psearch .i { width: 12px; height: 12px; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  /* keyword board: two lines per key instead of a wide table */
  .kwhead { display: none; }
  .kwrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
  .kwname { flex: 1 1 220px; }
  .kw-acts { order: 2; }
  .kwcell, .kwtime { order: 3; }
  .kwcell { display: inline-flex; align-items: center; gap: 5px; }
  .kwname + .kwcell { margin-left: 40px; }
  .kwcell::before { content: attr(data-label); font-size: .68rem; color: var(--ink-3); font-weight: 600; }
  .kwcell:has(.kval-none) { display: none; }
  .kwtime { flex-direction: row; gap: 6px; align-items: center; margin-left: auto; }
  .kwdetail { order: 4; width: 100%; padding-left: 40px; }
}
@media (max-width: 1200px) {
  .src { grid-template-columns: 170px minmax(0, 1fr) 110px; }
  .src-when, .src-count { display: none; }
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow-3); }
  .side.open { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; background: rgba(8, 11, 20, .5); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 25; }
  .scrim.on { opacity: 1; pointer-events: auto; }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 10px 16px; }
  .content { padding: 18px 16px 80px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail { grid-template-columns: minmax(0, 1fr); }
  .gallery { position: static; }
  .users-layout { grid-template-columns: minmax(0, 1fr); }
  .subnav { top: 57px; }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-body { padding: 10px; }
  .card-foot { flex-wrap: wrap; }
  .acts { width: 100%; }
  .acts > *, .acts form, .acts .btn { flex: 1; }
  .board { grid-template-columns: minmax(0, 1fr); }
  .src { grid-template-columns: minmax(0, 1fr) auto; }
  .src-status { grid-column: 1 / -1; grid-row: 2; white-space: normal; }
  .comp { grid-template-columns: minmax(0, 1fr); }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .kv > span:nth-child(even) { margin-bottom: 8px; }
  .site-row { grid-template-columns: minmax(0, 1fr); }
  .d-head { flex-direction: column; }
  .quick-add .btn { padding: 5px 10px; }
  .toolbar-note { margin-left: 0; }
  .kwname { flex-basis: calc(100% - 44px); }
  .kw-acts { width: 100%; justify-content: flex-start; padding-left: 0; }
  .kwwins { grid-template-columns: minmax(0, 1fr); }
  .hide-sm { display: none; }
  .bulkbar { width: calc(100vw - 24px); justify-content: center; padding-left: 12px; }
}
