:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #1a2030;
  --muted: #6b7385;
  --line: #e5e8ef;
  --accent: #2f6df0;
  --accent-soft: #eaf1ff;
  --up: #12805c;
  --down: #d0453b;
  --warn: #b7791f;
  --warn-soft: #fdf3e2;
  --up-soft: #e2f5ec;
  --down-soft: #fde9e7;
  --shadow: 0 1px 3px rgba(20, 30, 60, .06), 0 6px 20px rgba(20, 30, 60, .05);
  --radius: 12px;
  --zebra: rgba(20, 30, 60, .028); /* 表の交互の背景（panel に重ねる半透明） */
  --edge: rgba(20, 30, 60, .16);   /* 横スクロールの続きの影 */
  --unsure-ink: #8a5a00;           /* 名刺の「要確認」の文字（--warn-soft の上で 7.1:1） */
  /* 名刺の撮影画面（ライブカメラ・テーマに関係なく暗い地・docs/card-capture-design.md §3.1） */
  --cam-bg: #000000;
  --cam-ink: #ffffff;
  --cam-sub: #cbd5e1;
  --cam-ok: #22c55e;               /* 枠が緑＝自動シャッターの「合った」 */
  --cam-auto: #16a34a;
  --cam-back: #f59e0b;             /* 裏・トーチ ON（試作の橙） */
  --cam-back-ink: #111111;
  --cam-warn-ink: #fcd34d;         /* 暗い地の上の警告の文字 */
  /* 商談の段のチップ（docs/pipeline-s0-design.md §7.1: ヒアリング＝accent-soft・Cヨミ＝青・Bヨミ＝青濃・Aヨミ＝accent） */
  --deal-c-bg: #d6e3fc; --deal-c-ink: #1f4fb8;
  --deal-b-bg: #a9c3f7; --deal-b-ink: #163a87;
  /* 成果地点の色マーカー（分類・役割の数だけ＝4 色まで・docs/conversion-point-design.md §3.2） */
  --cvp-1: #2f6df0; --cvp-2: #c2410c; --cvp-3: #7c3aed; --cvp-4: #0f766e;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1420; --panel: #171d2b; --ink: #e8ecf5; --muted: #94a0b8;
    --line: #263041; --accent: #6ea0ff; --accent-soft: #1b2740;
    --up: #46d19e; --down: #ff7a70; --warn: #e0a44a; --warn-soft: #2c2210;
    --up-soft: #12352a; --down-soft: #3a1d1a;
    --shadow: 0 1px 3px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.28);
    --zebra: rgba(255, 255, 255, .035); --edge: rgba(0, 0, 0, .55);
    --unsure-ink: #f0b65a;
    --deal-c-bg: #213a66; --deal-c-ink: #b7cdfa; --deal-b-bg: #2d4f8f; --deal-b-ink: #dbe6ff;
    --cvp-1: #6ea0ff; --cvp-2: #fb923c; --cvp-3: #a78bfa; --cvp-4: #2dd4bf;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
/* アイコン用の既定サイズ（グラフのSVGには適用しない） */
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg:not(.linechart) { width: 18px; height: 18px; flex: none; }
.linechart { width: 100%; height: 220px; display: block; stroke: none; }
.linechart text { stroke: none; }
.sc-chart .linechart { max-width: none; margin: 0; }
.tnum, td, .kpi .value { font-variant-numeric: tabular-nums; }

/* ===== layout ===== */
.layout { display: grid; grid-template-columns: 224px 1fr; min-height: 100vh; }
.sidebar { background: var(--panel); border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.main { min-width: 0; padding-bottom: 40px; }
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); } /* 横帯のナビの幅で本文が画面より広がらない（横スクロールはナビの中だけ） */
  .sidebar { position: static; height: auto; flex-direction: column; }
  .nav { display: grid !important; grid-template-columns: repeat(2, 1fr); }
}

.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px; }
.brand .logo-full { display: block; height: 24px; width: auto; }
.brand h1 { font-size: 15px; margin: 0; letter-spacing: .02em; line-height: 0; }
.sub { color: var(--muted); font-size: 11px; margin: 2px 0 0; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 600; }
.nav a svg { width: 16px; height: 16px; }
.nav a:hover { background: var(--accent-soft); color: var(--accent); }
.nav a.on { background: var(--accent); color: #fff; }
/* 名刺はスマホ・タブレットで撮る物＝マウスで操作する PC では左のメニューに出さない（#/cards への直リンクは開ける） */
@media (hover: hover) and (pointer: fine) { .nav a.nav-touch { display: none; } }
.side-actions { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding: 0 4px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  padding: 8px 13px; border-radius: 9px; font-size: 13px; font-weight: 600; transition: .15s;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.06); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.wide { width: 100%; }
.btn svg { width: 15px; height: 15px; }
/* 文の中の線画アイコン（電話・メール等・public/icons.svg）。文字の高さの中央に揃える。.btn の中は gap があるので右の余白なし */
svg.ico { width: 15px; height: 15px; flex: none; vertical-align: -2.5px; margin-right: 5px; }
.btn svg.ico { margin-right: 0; vertical-align: 0; }

/* ===== controls ===== */
.controls { display: flex; gap: 12px; padding: 16px 22px 6px; flex-wrap: wrap; align-items: end; }
.controls label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
.controls .grow { flex: 1; min-width: 180px; }
select, input[type=search], input[type=month], input[type=file], input[type=number], input:not([type]), input[type=text], input[type=email], input[type=url], input[type=tel], textarea {
  font: inherit; font-size: 14px; color: var(--ink); background: var(--panel);
  border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; min-width: 130px;
}
select:focus, input:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }

.view { padding: 12px 22px 0; display: grid; gap: 16px; }
.view-title { display: flex; align-items: baseline; gap: 12px; margin: 4px 2px 0; }
.view-title h2 { font-size: 17px; margin: 0; }
.view-title .note { color: var(--muted); font-size: 12.5px; }

/* ===== KPI cards ===== */
.kpis { display: flex; gap: 14px; flex-wrap: wrap; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; min-width: 168px; flex: 1; box-shadow: var(--shadow); }
.kpi .label { color: var(--muted); font-size: 12px; }
.kpi .value { font-size: 22px; font-weight: 700; margin-top: 3px; letter-spacing: .01em; }
.kpi .delta { font-size: 12px; margin-top: 2px; font-weight: 600; }
.up { color: var(--up); }
.down { color: var(--down); }
.muted { color: var(--muted); }

/* ===== table ===== */
.tablewrap { overflow-x: auto; }
/* 画面が広いときは横スクロール枠を外す（外すとヘッダーのsticky固定が効く） */
@media (min-width: 1100px) { .tablewrap { overflow-x: visible; } }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
table.data thead th {
  position: sticky; top: 0; z-index: 5; background: var(--panel); text-align: right; font-size: 12px;
  color: var(--muted); font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 var(--line);
  cursor: pointer; white-space: nowrap; user-select: none;
}
table.data thead th:first-child { text-align: left; }
table.data thead th.sorted { color: var(--accent); }
table.data tbody td { padding: 11px 14px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data tbody td:first-child { text-align: left; font-weight: 600; max-width: 340px; overflow: hidden; text-overflow: ellipsis; }
table.data tbody tr { cursor: pointer; }
table.data tbody tr:hover { background: var(--accent-soft); }
table.data tbody tr:last-child td { border-bottom: none; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.b-Excellent { background: #d8f5e6; color: #0c6b47; }
.b-Good { background: #e0f0e4; color: #2a7a45; }
.b-OK { background: #eef0f4; color: #5b6376; }
.b-Poor { background: #ffedd8; color: #a9601a; }
.b-Bad { background: #ffe1de; color: #b23127; }
@media (prefers-color-scheme: dark) {
  .b-Excellent { background: #113d2c; color: #57d8a2; }
  .b-Good { background: #163325; color: #6cc98a; }
  .b-OK { background: #232b3a; color: #9aa5bc; }
  .b-Poor { background: #3a2a12; color: #e0a860; }
  .b-Bad { background: #3a1c19; color: #ff8f86; }
}

/* ===== panels ===== */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.panel .p-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.panel .p-head h3 { margin: 0; font-size: 14px; }
.panel .p-head .sub { font-size: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 980px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

.chip { border: 1px solid var(--line); background: var(--panel); color: var(--muted); padding: 5px 11px; border-radius: 20px; font-size: 12px; cursor: pointer; font-weight: 600; }
.chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.chips { display: flex; gap: 4px; flex-wrap: wrap; }

.chart { margin-top: 8px; }
.linechart .grid-l { stroke: var(--line); }
.linechart .tickY { fill: var(--muted); font-size: 11px; text-anchor: end; }
.linechart .tickX { fill: var(--muted); font-size: 11px; text-anchor: middle; }
.linechart .path { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.linechart .area { fill: var(--accent); opacity: .08; stroke: none; }
.linechart .dot { fill: var(--panel); stroke: var(--accent); stroke-width: 2; }
.linechart .dot.last { fill: var(--accent); }

/* mover list */
.mvlist { display: flex; flex-direction: column; }
.mvrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 2px; border-top: 1px solid var(--line); font-size: 13px; }
.mvrow:first-child { border-top: none; }
.mvrow .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; cursor: pointer; }
.mvrow .nm:hover { color: var(--accent); }
.mvrow .amt { color: var(--muted); font-size: 12px; white-space: nowrap; }
.mvrow .pct { font-weight: 700; white-space: nowrap; min-width: 64px; text-align: right; }

/* share bars */
.sharebar { display: grid; grid-template-columns: minmax(90px, 160px) 1fr 64px; align-items: center; gap: 10px; padding: 6px 0; font-size: 12.5px; }
.sharebar .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sharebar .bar { height: 10px; border-radius: 6px; background: var(--accent-soft); position: relative; overflow: hidden; }
.sharebar .bar i { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 6px; }
.sharebar .v { text-align: right; color: var(--muted); }

/* funnel */
.funnel-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 980px) { .funnel-cards { grid-template-columns: repeat(2, 1fr); } }
.fcard { border: 1px solid var(--line); border-radius: 10px; padding: 13px 14px; background: var(--panel); position: relative; }
.fcard.driver { border-color: var(--down); box-shadow: 0 0 0 3px var(--down-soft); }
.fcard.driver.pos { border-color: var(--up); box-shadow: 0 0 0 3px var(--up-soft); }
.fcard .lab { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.fcard .cur { font-size: 19px; font-weight: 800; margin-top: 3px; }
.fcard .base { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.fcard .chg { font-size: 13px; font-weight: 700; margin-top: 5px; }
.fcard .tag { position: absolute; top: -9px; right: 10px; font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--down); color: #fff; }
.fcard.pos .tag { background: var(--up); }
.fnote { font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.fnote b { color: var(--ink); }

/* actions */
.act { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; padding: 12px 2px; border-top: 1px solid var(--line); }
.act:first-child { border-top: none; }
.act .nm { font-weight: 700; font-size: 13.5px; cursor: pointer; }
.act .nm:hover { color: var(--accent); }
.act .why { display: flex; gap: 6px; flex-wrap: wrap; }
.act .impact { text-align: right; font-weight: 700; white-space: nowrap; }
.act .impact .l { display: block; font-size: 10.5px; color: var(--muted); font-weight: 600; }
.rchip { font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.rchip.bad { background: var(--down-soft); color: var(--down); }
.rchip.warn { background: var(--warn-soft); color: var(--warn); }

/* targets */
.tg-row { display: grid; grid-template-columns: minmax(120px, 220px) 1fr 90px 90px 70px; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-size: 12.5px; }
.tg-row:first-child { border-top: none; font-size: 11px; color: var(--muted); font-weight: 600; }
.tg-row .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-row .bar { height: 12px; border-radius: 6px; background: var(--accent-soft); position: relative; overflow: hidden; }
.tg-row .bar i { position: absolute; inset: 0 auto 0 0; border-radius: 6px; background: var(--accent); }
.tg-row .bar i.over { background: var(--up); }
.tg-row .bar i.low { background: var(--down); }
.tg-row .num { text-align: right; color: var(--muted); }
.tg-row .rate { text-align: right; font-weight: 700; }
@media (max-width: 760px) { .tg-row { grid-template-columns: 1fr 70px; } .tg-row .bar, .tg-row .num { display: none; } }

.empty { text-align: center; color: var(--muted); padding: 34px 10px; font-size: 13px; }
.empty b { color: var(--ink); }

/* dialog */
dialog { border: none; border-radius: 16px; padding: 0; box-shadow: 0 20px 60px rgba(0,0,0,.3); background: var(--panel); color: var(--ink); max-width: 92vw; }
dialog::backdrop { background: rgba(10,15,25,.45); }
.dlg { padding: 22px 24px; width: 460px; max-width: 100%; }
.dlg h2 { margin: 0 0 10px; font-size: 17px; }
.dlg .sub { font-size: 12px; margin: 8px 0 0; }
.dlg .block { display: flex; flex-direction: column; gap: 6px; margin: 14px 0 8px; font-size: 13px; }
.dlg .row2 { display: flex; gap: 12px; }
.dlg .row2 label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); flex: 1; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.impmsg { font-size: 12px; min-height: 18px; margin: 6px 0 0; }
.impmsg.ok { color: var(--up); }
.impmsg.err { color: var(--down); }
.imp-type { display: flex; gap: 14px; }
.radio { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ===== グラフ拡張（棒・複数線・凡例・ミニバー） ===== */
.linechart .bar.b0 { fill: var(--muted); opacity: .45; }
.linechart .bar.b1 { fill: var(--accent); }
.linechart .ml { fill: none; stroke-width: 2.4; }
.linechart .ml.s0 { stroke: var(--accent); }
.linechart .ml.s1 { stroke: var(--up); }
.linechart .ml.s2 { stroke: var(--warn); }
.linechart .ml.s3 { stroke: var(--down); }
/* チャートの即時ツールチップ */
.charttip {
  position: fixed; z-index: 300; pointer-events: none;
  background: var(--panel); color: var(--ink); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 13px; box-shadow: var(--shadow);
  font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums;
  opacity: 0; transition: opacity .08s ease; white-space: nowrap;
}
.charttip.show { opacity: 1; }
.charttip b { display: block; font-size: 11px; color: var(--muted); margin-bottom: 3px; font-weight: 600; letter-spacing: .03em; }
.charttip .val { font-size: 15px; font-weight: 800; margin-left: 2px; }
.charttip .row { display: flex; align-items: center; gap: 7px; padding: 1.5px 0; }
.charttip .row .val { font-size: 13.5px; margin-left: auto; padding-left: 10px; }
.sw { width: 9px; height: 9px; border-radius: 3px; display: inline-block; flex: none; }
.sw.b0 { background: var(--muted); opacity: .55; }
.sw.b1 { background: var(--accent); }
.sw.s0 { background: var(--accent); } .sw.s1 { background: var(--up); } .sw.s2 { background: var(--warn); } .sw.s3 { background: var(--down); }
.linechart .focusdot { fill: var(--accent); stroke: var(--panel); stroke-width: 2.5; pointer-events: none; }
.linechart .bar.pos { fill: var(--up); }
.linechart .bar.neg { fill: var(--down); }
.linechart .grid-l.zero { stroke: var(--muted); opacity: .6; }
.linechart .path.thin { stroke-width: 2; }

/* 6指標スモールマルチプル */
.sparkgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 980px) { .sparkgrid { grid-template-columns: 1fr; } }
.sparkcell { border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px 7px; cursor: pointer; transition: .15s; background: var(--panel); }
.sparkcell:hover { border-color: var(--accent); }
.sparkcell.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sc-head { display: flex; align-items: baseline; gap: 9px; margin-bottom: 4px; }
.sc-label { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.sc-val { font-size: 15.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sc-yoy { font-size: 11.5px; font-weight: 700; margin-left: auto; }

.lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.lg0 { background: var(--muted); opacity: .55; }
.lg1 { background: var(--accent); }
.lgs0 { background: var(--accent); } .lgs1 { background: var(--up); } .lgs2 { background: var(--warn); } .lgs3 { background: var(--down); }
.minibars { display: flex; flex-direction: column; gap: 3px; margin-top: 8px; }
.mb { height: 7px; background: var(--accent-soft); border-radius: 4px; overflow: hidden; display: block; }
.mb i { display: block; height: 100%; border-radius: 4px; }
.mb i.base { background: var(--muted); opacity: .5; }
.mb i.cur { background: var(--up); }
.mb i.cur.neg { background: var(--down); }
.growbar { flex: 0 0 90px; height: 8px; background: var(--accent-soft); border-radius: 4px; overflow: hidden; }
.growbar i { display: block; height: 100%; border-radius: 4px; }
.growbar i.g-up { background: var(--up); }
.growbar i.g-down { background: var(--down); }

/* ===== データベース管理 ===== */
.adm-bar { display: flex; gap: 10px; margin-bottom: 12px; }
.adm-bar input[type=search] { flex: 1; }
.adm-form { border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin-bottom: 16px; background: var(--bg); max-width: 780px; }
.adm-form h3 { margin: 0 0 14px; font-size: 14.5px; }
/* 入力欄の幅＝期待する入力量に合わせる（コードは短く・名前は中・メモは伸びる） */
.formgrid { display: flex; flex-wrap: wrap; gap: 12px 14px; }
.formgrid label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); flex: 1 1 220px; min-width: 0; }
.formgrid label.fw-s { flex: 0 1 130px; }
.formgrid label.fw-s input { min-width: 0; }
.formgrid label.fw-m { flex: 0 1 260px; }
.formgrid label.fw-l { flex: 2 1 320px; }
.formgrid input, .formgrid select { width: 100%; }
.adm-form .block { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 6px; }
.tagpick { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tagpick input { min-width: 160px; padding: 5px 9px; }
.tagchip { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); margin-right: 3px; }
.adm-list { display: flex; flex-direction: column; }
.adm-row { display: grid; gap: 10px; align-items: center; padding: 10px 6px; border-top: 1px solid var(--line); cursor: pointer; font-size: 13px; }
.adm-row:hover { background: var(--accent-soft); }
.adm-row.p6 { grid-template-columns: 2fr 1.2fr 1fr 60px 1.4fr 64px; }
.adm-row.g1 { grid-template-columns: 1fr; }
.adm-row.g2 { grid-template-columns: 1fr 110px; }
.adm-row.g3 { grid-template-columns: 2fr 1.2fr 110px; }
.adm-row.g4 { grid-template-columns: 2fr 1.2fr 1fr 90px; }
.adm-row.head { cursor: default; color: var(--muted); font-size: 11px; font-weight: 600; border-top: none; padding-bottom: 6px; letter-spacing: .03em;
  position: sticky; top: 0; z-index: 5; background: var(--panel); box-shadow: 0 1px 0 var(--line); }
.adm-row.head:hover { background: var(--panel); }
.adm-row .tr { text-align: right; font-size: 12px; }
.adm-row .c1 { display: flex; flex-direction: column; min-width: 0; }
.adm-row .c1 .muted { font-size: 11px; }
.adm-row .strong { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-sec { margin-top: 16px; padding: 4px 6px 6px; font-weight: 700; font-size: 12.5px; color: var(--accent); border-bottom: 1px solid var(--line); }
.adm-sec .muted { font-weight: 600; }
.uselink { color: var(--accent); cursor: pointer; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.uselink:hover { filter: brightness(1.15); }
.filterchip { display: inline-flex; align-items: center; gap: 7px; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 7px 13px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.filterchip button { border: none; background: none; color: inherit; cursor: pointer; font-size: 12px; padding: 0; font-weight: 700; }
.adm-count { margin-right: auto; font-size: 12.5px; }
.adm-client { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.adm-client select { padding: 7px 10px; min-width: 150px; font-size: 13px; }

/* 保存トースト（操作した場所の近く＝右上に浮かせる） */
.toast {
  position: fixed; top: 18px; right: 18px; z-index: 200;
  background: var(--panel); color: var(--ink); border: 1px solid var(--line);
  border-left: 4px solid var(--up); border-radius: 11px; padding: 12px 18px;
  font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(-8px); pointer-events: none;
  transition: opacity .2s ease, transform .2s ease; max-width: 70vw;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.err { border-left-color: var(--down); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

.pill-st { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.pill-st.on { background: var(--up-soft); color: var(--up); }
.pill-st.off { background: var(--accent-soft); color: var(--muted); }

/* ===== 取込履歴・一括登録 ===== */
.adm-h { font-size: 13.5px; margin: 8px 0 6px; }
.warnbox { background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 12px 16px; font-size: 13px; margin-bottom: 14px; }
.okbox { background: var(--up-soft); color: var(--up); border-radius: 10px; padding: 12px 16px; font-size: 13px; margin-bottom: 14px; font-weight: 600; }
.adm-row.g5u { grid-template-columns: 140px 1fr 90px 110px 76px; }
.adm-row.g4h { grid-template-columns: 150px 1fr 110px 90px; }
.adm-row.nochev { cursor: default; }
.adm-row.nochev:hover { background: transparent; }
.btn.sm { padding: 5px 12px; font-size: 12px; }
.adm-form.wide { max-width: none; }
.adm-form textarea { width: 100%; font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; margin-top: 6px; resize: vertical; }

/* ===== 定例レポートビュー（見せるモード） ===== */
.present { display: grid; gap: 16px; }
.pr-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 4px; }
.pr-eyebrow { color: var(--muted); font-size: 12px; letter-spacing: .08em; margin: 0; }
.pr-title { font-size: 24px; margin: 4px 0 0; }
.pr-kpis .kpi .value { font-size: 26px; }
.mvrow.big { font-size: 15px; padding: 12px 2px; }
.mvrow.big .pct { font-size: 16px; min-width: 84px; }

@media print {
  .sidebar, .controls, .no-print { display: none !important; }
  .layout { display: block; }
  .main { padding: 0; }
  body { background: #fff; color: #111; }
  .panel, .kpi { box-shadow: none; border-color: #ddd; break-inside: avoid; }
  .view { padding: 0; }
}
@media (max-width: 820px) {
  .adm-row.p6 { grid-template-columns: 1fr 90px; }
  .adm-row.p6 > :nth-child(2), .adm-row.p6 > :nth-child(3), .adm-row.p6 > :nth-child(5), .adm-row.p6 > :nth-child(6) { display: none; }
}
.adm-sub { border: 1px dashed var(--line); border-radius: 9px; padding: 10px 12px; }
.adm-lrow { display: grid; grid-template-columns: 200px 150px 1fr; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.adm-lrow:last-of-type { border-bottom: none; }
.adm-lnew { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.adm-lnew input, .adm-lnew select { flex: 1; min-width: 140px; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
.mono.strong { font-weight: 700; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== クライアント管理コンソール 追加分（配色は上の変数をそのまま使う） ===== */

/* 上部ツールバー（期セレクタ・検索・ボタン） */
.toolbar { display: flex; gap: 12px; padding: 16px 22px 4px; flex-wrap: wrap; align-items: end; }
.toolbar label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
.toolbar .grow { flex: 1; min-width: 200px; }
.toolbar .right { margin-left: auto; display: flex; gap: 8px; align-items: end; }

/* 戻る導線 */
.crumb { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px;
  font-weight: 600; background: none; border: none; cursor: pointer; padding: 2px 0; }
.crumb:hover { color: var(--accent); }
.crumb svg { width: 14px; height: 14px; }

/* 基本情報カード：ラベル＋直接編集セル */
.infogrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 12px 18px; }
.infogrid .f { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.infogrid .f > .lab { font-size: 11.5px; color: var(--muted); font-weight: 600; }

/* Excel のようにセルへ直接打つ（補助ボタンを増やさない） */
.ed { display: block; min-height: 26px; padding: 3px 6px; margin: -3px -6px; border-radius: 6px;
  border: 1px solid transparent; cursor: text; font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.ed:hover { border-color: var(--line); background: var(--bg); }
.ed.empty { color: var(--muted); }
.ed.saved { animation: edsaved 1s ease-out; }
@keyframes edsaved { from { background: var(--up-soft); } to { background: transparent; } }
.ed input, .ed select, .ed textarea { width: 100%; font: inherit; font-size: 13px; padding: 2px 5px;
  border: 1px solid var(--accent); border-radius: 5px; background: var(--panel); color: var(--ink); }
.ed.has-error { overflow: visible; white-space: normal; border-color: var(--down); background: var(--down-soft); }
.ed.has-error input, .ed.has-error select { border-color: var(--down); }
.ed-error { display: block; margin-top: 4px; color: var(--down); font-size: 10.5px; line-height: 1.35; text-align: left; }
td .ed { min-height: 22px; }
td.tr .ed, .ed.tr { text-align: right; }

/* タブ */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.tabs button { border: none; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700;
  padding: 9px 14px; border-radius: 8px 8px 0 0; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button:hover { color: var(--accent); }
.tabs button.on { color: var(--accent); border-bottom-color: var(--accent); background: var(--accent-soft); }

/* 表の中の小さな入力・選択 */
table.data tbody tr.norow { cursor: default; }
table.data tbody tr.norow:hover { background: transparent; }
table.data td.wrap { white-space: normal; max-width: 320px; }
table.data td.lft { text-align: left; }
table.data thead th.lft { text-align: left; }
.tbl-input { width: 100%; min-width: 90px; font: inherit; font-size: 12.5px; padding: 4px 7px; }
.mark-warn { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700;
  background: var(--accent-soft); color: var(--accent); }
.pill.gray { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad  { background: var(--down-soft); color: var(--down); }
.pill.ok   { background: var(--up-soft); color: var(--up); }

/* ピボット（期×月） */
.pivot { font-size: 12.5px; }
.pivot th.corner { text-align: left; }
.pivot tbody td { padding: 7px 10px; }
.pivot tbody tr.sum td { font-weight: 700; background: var(--bg); }

/* 取り込み画面 */
.drop { border: 2px dashed var(--line); border-radius: 12px; padding: 26px; text-align: center; color: var(--muted); }
.drop.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.prelist { font-size: 12.5px; }

/* トースト */
.toast2 { position: fixed; right: 20px; bottom: 20px; background: var(--panel); color: var(--ink);
  border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; padding: 12px 16px;
  box-shadow: var(--shadow); font-size: 13px; font-weight: 600; opacity: 0; transform: translateY(8px);
  transition: .18s; pointer-events: none; z-index: 60; max-width: 420px; }
.toast2.show { opacity: 1; transform: translateY(0); }
.toast2.err { border-left-color: var(--down); color: var(--down); }
/* 「元に戻す」つき（docs/lead-list-design.md §3.9）: 押せるように pointer-events を戻す・文とボタンを 1 行に */
.toast2.act { pointer-events: auto; display: flex; align-items: center; gap: 12px; }
.toast2:not(.show) { pointer-events: none; }
.toast2 .toast-act { flex: none; }

.hint { font-size: 12px; color: var(--muted); }
.rowline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
table.data tbody td.biz { max-width: 210px; }
table.data tbody td.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 1100px) { .tablewrap { overflow-x: auto; } }
/* グリッドの子は既定で min-width:auto のため、広い表がページ全体を押し広げてしまう。
   子を 0 まで縮められるようにして、表は .tablewrap の中だけで横スクロールさせる */
.view > * { min-width: 0; }
.grid2 > *, .grid3 > * { min-width: 0; }
/* 表の中の編集セルは1行に収める（値の全文は編集時の入力欄で見える）。
   カード内（.infogrid）のセルは複数行のメモを読めるよう折り返す */
td .ed { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
td .ed.has-error { white-space: normal; overflow: visible; max-width: none; }
.btn:disabled { opacity: .45; cursor: default; }
.btn:disabled:hover { border-color: var(--line); color: var(--muted); filter: none; }
.alias-toggle { width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.alias-toggle:hover { color: var(--accent); }
.alias-detail { margin-top: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.alias-detail-head, .alias-detail-row { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(100px, .8fr); gap: 12px; padding: 4px 0; }
.alias-detail-head { color: var(--muted); font-size: 10.5px; font-weight: 700; border-bottom: 1px solid var(--line); }
.alias-detail-row { font-size: 11.5px; border-bottom: 1px solid var(--line); }
.alias-detail-row:last-child { border-bottom: 0; }

/* ===================================================================
   leadnext 追記分（設計 §13: お手本の style.css をそのまま複製し、ここから下だけ足す）
   =================================================================== */
:root { --on-accent: #ffffff; --seg-h: 32px; }
/* ダークの --accent(#6ea0ff) に白い文字は 2.6:1 で読みにくい → 選択中の文字は濃い地色（7.1:1） */
@media (prefers-color-scheme: dark) { :root { --on-accent: #0f1420; } }

.view-title .fresh { margin-left: auto; }

/* ----- 鮮度（右上に常設） ----- */
.fresh { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.fresh .fi { white-space: nowrap; }
.fresh .fi b { color: var(--ink); font-weight: 600; margin-right: 4px; }
.fresh .fi.warn, .fresh .fi.warn b { color: var(--warn); }
.fresh .fi .via { margin-left: 4px; font-size: 11px; }

/* ----- 粒度の切替バー（.seg・32px・角丸 8px・選択中は --accent） ----- */
.segbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.segbar .grow { flex: 1; }
.seg { display: inline-flex; height: var(--seg-h); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel); flex: none; }
.seg button { border: 0; border-left: 1px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600;
  padding: 0 14px; cursor: pointer; min-width: 64px; }
.seg button:first-child { border-left: 0; }
.seg button:hover { background: var(--bg); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.segfield { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.segbar select, .segbar input[type=date] { height: var(--seg-h); padding: 0 10px; font-size: 13px; min-width: 0; border-radius: 8px;
  font: inherit; font-size: 13px; color: var(--ink); background: var(--panel); border: 1px solid var(--line); }
.seg-note { margin: 8px 0 0; font-size: 12px; color: var(--warn); }
/* 期間ボタン・比較チップ・器（docs/period-compare-campaigns-design.md §2・G-2）。色は既存のトークンだけ */
.period-slot { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.period-btn { display: inline-flex; align-items: center; gap: 6px; height: var(--seg-h); padding: 0 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; min-width: 0; max-width: 100%; }
.period-btn:hover { background: var(--bg); }
.period-btn:focus-visible, .cmp-chip button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.period-btn svg { width: 15px; height: 15px; flex: none; color: var(--muted); }
.period-btn .pl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.period-btn .pb-chev { width: 13px; height: 13px; }
.cmp-chip { display: inline-flex; align-items: center; height: 26px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; max-width: 100%; }
.cmp-chip button { border: 0; background: none; color: inherit; font: inherit; cursor: pointer; height: 100%; }
.cmp-chip .cmp-open { padding: 0 4px 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.cmp-chip .cmp-x { padding: 0 9px 0 4px; font-size: 14px; line-height: 1; }
.pp-back { display: none; }
.period-panel { position: fixed; z-index: 60; box-sizing: border-box; width: 640px; max-width: calc(100vw - 16px); background: var(--panel); color: var(--ink);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); font-size: 13px; }
.pp-top { display: none; }
.pp-main { display: grid; grid-template-columns: 128px 1fr; }
.pp-presets { display: flex; flex-direction: column; padding: 8px; border-right: 1px solid var(--line); gap: 1px; }
.pp-preset { text-align: left; border: 0; background: none; color: var(--ink); font: inherit; padding: 7px 10px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.pp-preset:hover { background: var(--bg); }
.pp-preset.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.pp-cal { position: relative; padding: 10px 12px 12px; }
.pp-nav { position: absolute; top: 10px; width: 30px; height: 30px; border: 0; background: none; border-radius: 8px; color: var(--ink); cursor: pointer; display: grid; place-items: center; z-index: 1; }
.pp-nav:hover { background: var(--bg); }
.pp-nav svg { width: 16px; height: 16px; }
.pp-nav.prev { left: 8px; } .pp-nav.next { right: 8px; }
.pp-months { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pp-mhead { height: 30px; display: flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.pp-title { display: inline-flex; align-items: center; gap: 3px; border: 0; background: none; color: var(--ink); font: inherit; font-weight: 600; padding: 4px 8px; border-radius: 8px; cursor: pointer; }
.pp-title:hover { background: var(--bg); }
.pp-title svg { width: 12px; height: 12px; color: var(--muted); }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; text-align: center; }
.cal .dh { font-size: 11px; color: var(--muted); padding: 2px 0 4px; }
.cal .d { height: 34px; border: 0; background: none; color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; font-variant-numeric: tabular-nums; padding: 0; }
.cal .dow0 { color: var(--down); } .cal .dow6 { color: var(--accent); }
.cal .d.out { opacity: .4; }
.cal .d:hover:not(:disabled) { background: var(--bg); border-radius: 999px; }
.cal .d.in { background: var(--accent-soft); border-radius: 0; }
.cal .d.edge { background: var(--accent); color: var(--on-accent); font-weight: 600; border-radius: 999px; }
.cal .d.anchor { background: var(--accent); color: var(--on-accent); border-radius: 999px; }
.cal .d.today:not(.edge) { box-shadow: inset 0 0 0 1px var(--muted); border-radius: 999px; }
.cal .d:disabled { color: var(--muted); opacity: .35; cursor: default; }
.pp-cal.cfrom .cal .d.in { background: var(--bg); }
.pp-cal.cfrom .cal .d.edge { background: var(--muted); }
.pp-ym { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 40px 8px 8px; }
.pp-ym button { height: 36px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; cursor: pointer; }
.pp-ym button:hover { background: var(--bg); }
.pp-ym button.on { background: var(--accent); color: var(--on-accent); }
.pp-cmprow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border-top: 1px solid var(--line); }
.pp-cmprow .lab { font-size: 12px; color: var(--muted); font-weight: 600; }
.pp-cmps { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.pp-cmp { height: 28px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--ink); font: inherit; font-size: 12.5px; cursor: pointer; }
.pp-cmp:hover:not(:disabled) { background: var(--bg); }
.pp-cmp.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.pp-cmp:disabled { opacity: .4; cursor: default; }
.pp-cmptext { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.period-panel button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (max-width: 899px) {
  .period-slot { width: 100%; }
  .period-btn { flex: 1 1 100%; }
  .pp-back { display: block; position: fixed; inset: 0; z-index: 59; background: rgba(0, 0, 0, .28); }
  .period-panel { left: 0; right: 0; bottom: 0; top: auto; width: auto; max-width: none; max-height: 85vh; overflow: auto; border-radius: 14px 14px 0 0; border-bottom: 0; }
  .pp-top { display: flex; justify-content: flex-end; padding: 6px 8px 0; }
  .pp-close { width: 36px; height: 36px; border: 0; background: none; color: var(--ink); font-size: 20px; cursor: pointer; border-radius: 8px; }
  .pp-main { grid-template-columns: 1fr; }
  .pp-presets { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); padding: 4px 12px 10px; gap: 6px; }
  .pp-preset { border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; }
  .pp-months { grid-template-columns: 1fr; }
  .pp-month.second { display: none; }
  .cal .d { height: 40px; }
  .pp-cmptext { margin-left: 0; flex-basis: 100%; }
}
.segrow2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 12px; }
.segrow2 .lab { font-size: 12px; color: var(--muted); }
@media (max-width: 900px) {
  .segbar { gap: 8px 10px; }
  .segbar .seg { width: 100%; }
  .segbar .seg button { flex: 1; }
}

/* ----- グラフ（.linechart の折れ線 3 本） ----- */
.chartbox { position: relative; width: 100%; min-width: 0; }
.chartlegend { display: flex; flex-wrap: wrap; min-width: 0; gap: 2px 14px; font-size: 12px; color: var(--muted); justify-content: flex-end; margin-bottom: 2px; }
.chartlegend > span { white-space: nowrap; }
.chartlegend i { display: inline-block; width: 18px; height: 0; border-top: 2px solid; vertical-align: middle; margin-right: 5px; }
.chartlegend i.meta { border-color: var(--accent); }
.chartlegend i.google { border-color: var(--muted); }
.chartlegend i.total { border-color: var(--ink); border-top-style: dashed; }
.linechart .ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.linechart .ln.meta { stroke: var(--accent); }
.linechart .ln.google { stroke: var(--muted); }
.linechart .ln.total { stroke: var(--ink); stroke-dasharray: 5 4; }
.linechart .pt { stroke-width: 2; fill: var(--panel); }
.linechart .pt.meta { stroke: var(--accent); }
.linechart .pt.google { stroke: var(--muted); }
.linechart .pt.total { stroke: var(--ink); }
.linechart .guide { stroke: var(--muted); stroke-width: 1; opacity: .5; }
.linechart .hit { fill: transparent; stroke: none; cursor: crosshair; }
.chartempty { height: 220px; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.sw.meta { background: var(--accent); } .sw.google { background: var(--muted); } .sw.total { background: var(--ink); }
/* 計算できない率: 費用はあるのに分母 0＝横軸の上の白抜きの印／配信なし＝背景の薄い帯（色は既存のトークンだけ） */
/* CV 0（費用のみ）の白抜きの印: 系列によらず 1 色（線の色と見分ける・§158 記号は 1 つの表）。点（r=3）より一回り大きい */
.linechart .gapz { stroke: var(--warn); stroke-width: 2.5; stroke-linecap: round; } /* CV 0 の日＝横軸の下の目盛り（値ではない） */
.linechart .idleband { stroke: none; } /* fill は斜線の pattern */
.linechart .hatch { stroke: var(--muted); stroke-width: 1.2; opacity: .45; }
.linechart .wkband { fill: var(--muted); opacity: .05; stroke: none; } /* 背景の中の背景（データより薄く・docs/chart-trend-review.md §2.3） */
.chartlegend .gapkey { display: inline-flex; align-items: center; font-size: 11px; }
.chartlegend i.ztick { width: 2.5px; height: 9px; background: var(--warn); border-radius: 2px; margin-right: 5px; }
.chartlegend i.band { width: 10px; height: 10px; border: none; background: repeating-linear-gradient(45deg, transparent 0 2px, var(--muted) 2px 3px); opacity: .6; border-radius: 2px; margin-right: 4px; }
.charttip .tiptable td.idle { color: var(--muted); font-weight: 600; text-align: left; }

/* ----- 現行シート互換の表（2 段見出し・左の期間列を sticky） ----- */
.sheetwrap { overflow: auto; max-height: 72vh; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--panel); border: 1px solid var(--line); }
table.grid-sheet { border-collapse: separate; border-spacing: 0; font-size: 12.5px; min-width: 100%; }
.grid-sheet th, .grid-sheet td { padding: 0 10px; height: 34px; white-space: nowrap; border-bottom: 1px solid var(--line); text-align: right; background: var(--panel); }
.grid-sheet thead th { position: sticky; top: 0; z-index: 3; font-size: 11.5px; font-weight: 600; color: var(--muted); height: 32px; }
.grid-sheet thead tr.h2 th { top: 32px; }
.grid-sheet thead tr.h1 th { color: var(--ink); text-align: center; font-size: 12px; }
.grid-sheet .g-google { background: var(--bg); }
.grid-sheet .g-meta, .grid-sheet .g-total { background: var(--panel); }
.grid-sheet .gl { border-left: 1px solid var(--line); }
.grid-sheet .stk { position: sticky; z-index: 2; text-align: left; }
.grid-sheet thead .stk { z-index: 4; }
.grid-sheet .stk.last { box-shadow: 1px 0 0 var(--line); }
.grid-sheet th.sortable { cursor: pointer; user-select: none; }
.grid-sheet th.sortable:hover { color: var(--accent); }
.grid-sheet th.sortable svg { width: 12px; height: 12px; vertical-align: -1px; margin-left: 3px; }
.grid-sheet tbody tr:hover td { background: var(--accent-soft); }
.grid-sheet td.dash { color: var(--muted); }
.grid-sheet td.off { color: transparent; }
.grid-sheet td.cv0 { color: var(--muted); }
.grid-sheet .partial { margin-left: 6px; font-size: 10.5px; font-weight: 700; color: var(--warn); }
.grid-sheet .exp { border: 0; background: none; color: var(--muted); padding: 0; margin: 0 6px 0 -4px; width: 18px; height: 18px; cursor: pointer; vertical-align: middle; border-radius: 4px; }
.grid-sheet .exp:hover { color: var(--accent); background: var(--accent-soft); }
.grid-sheet .exp svg { width: 14px; height: 14px; transition: transform .12s; }
.grid-sheet .exp[aria-expanded="true"] svg { transform: rotate(90deg); }
/* 内訳行（.sub） */
.grid-sheet tr.sub td { background: var(--bg); color: var(--ink); font-size: 12px; height: 30px; }
.grid-sheet tr.sub td.nm { color: var(--ink); overflow: hidden; text-overflow: ellipsis; max-width: 1px; }
.grid-sheet tr.sub td.nm .pf { color: var(--muted); font-weight: 600; margin-right: 8px; }
.grid-sheet tr.sub.msg td { text-align: left; color: var(--muted); }

/* ===== キャンペーン画面（docs/period-compare-campaigns-design.md §5.4・H-1） ===== */
.cp-q { height: var(--seg-h); padding: 0 10px; font-size: 13px; border-radius: 8px; width: min(280px, 100%); }
.cp-count { font-size: 12px; }
.cp-from { font-size: 12px; padding: 4px 8px; position: sticky; left: 0; }
.cp-wrap.empty-wrap { box-shadow: none; border: 0; background: none; }
.cp-sheet th.sortable { text-align: right; }
.cp-sheet th.sortable.stk { text-align: left; }
.cp-sheet th.sortable.on { color: var(--accent); }
.cp-sheet thead tr.cp-total th { top: 32px; color: var(--ink); font-weight: 700; font-size: 12.5px; background: var(--bg); text-align: right; }
.cp-sheet thead tr.cp-total th.stk { text-align: left; }
.cp-sheet thead tr.cp-total th.dash { color: var(--muted); }
.cp-sheet td.nm { overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.cp-sheet td.pf { color: var(--muted); font-weight: 600; font-size: 12px; }
.cp-sheet tr.idle td { color: var(--muted); }
.cp-sheet tr.idle td.nm { font-weight: 500; }
.cp-sheet tr.cp-none td { text-align: left; color: var(--muted); height: 52px; }
.cp-sheet tr.cp-none .btn { margin: 0 4px; }
.sdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: middle; box-sizing: border-box; }
.sdot.active { background: var(--up); }
.sdot.paused { background: var(--muted); opacity: .7; }
.sdot.ended { border: 1.5px solid var(--muted); }
.sdot.other { border: 1.5px solid var(--warn); }
.sdot.unknown { border: 1.5px solid var(--line); }
.cp-sheet td.seen { color: var(--muted); font-size: 12px; }

/* ===== 3 段（Phase C）: 段のタブ・親の絞り込み・サムネ・行 ▸ の扉 ===== */
.cp-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.cp-chip { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 4px 0 10px; border-radius: 13px; background: var(--accent-soft); font-size: 12px; max-width: 360px; }
.cp-chip b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.cp-chip-x { border: 0; background: none; color: var(--muted); cursor: pointer; width: 20px; height: 20px; border-radius: 10px; font-size: 14px; line-height: 1; }
.cp-chip-x:hover { color: var(--ink); background: var(--panel); }
.cp-sheet .cr-thumb { width: 24px; height: 24px; border-radius: 4px; object-fit: cover; vertical-align: middle; margin-right: 6px; background: var(--line); }
/* キャンペーン・広告セットの段は配下の広告を最大 3 枚重ねる（後ろの画像を 14px ずつ左へ・白い縁で区切る） */
.cp-sheet .cr-stack { display: inline-flex; vertical-align: middle; margin-right: 6px; }
.cp-sheet .cr-stack .cr-thumb { margin-right: 0; box-shadow: 0 0 0 1.5px var(--panel); }
.cp-sheet .cr-stack .cr-thumb + .cr-thumb { margin-left: -14px; }
.cp-exp-links { position: sticky; left: 14px; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.cp-exp-links .btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; vertical-align: -2px; }
.cp-sheet tr.thin td { color: var(--muted); }
.cp-sheet tr.thin td.nm { font-weight: 500; }

/* ===== クリエイティブ画面の成果マップ（docs/cv-target-design.md §7.1） ===== */
.cr-map { margin-bottom: 12px; }
.cr-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 6px; font-size: 13px; }
.cr-head .muted { font-size: 12px; }
.crsvg { display: block; max-width: 100%; height: auto; }
.crsvg .g { stroke: var(--line); stroke-width: 1; }
.crsvg .avg { stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 4 4; }
.crsvg .ax { fill: var(--muted); font-size: 11px; }
.crsvg .axt { fill: var(--muted); font-size: 11.5px; font-weight: 600; }
.crsvg .lb { fill: var(--ink); font-size: 11px; pointer-events: none; }
.crsvg .pt { cursor: pointer; outline: none; }
.crsvg .pt:hover circle, .crsvg .pt:focus-visible circle { stroke-width: 2.6; }
/* 列 ▾（H-2）: 既定は畳み・チェックは即反映 */
.cp-cols { position: relative; }
.cp-cols > summary { list-style: none; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.cp-cols > summary::-webkit-details-marker { display: none; }
.cp-cols .pb-chev { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.cp-cols-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; display: grid; min-width: 150px; }
.cp-cols-menu label { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 7px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.cp-cols-menu label:hover { background: var(--accent-soft); }
/* 行の展開（H-2）: 推移（3 段）＋曜日 7 行。横に並べ、狭い画面は縦積み */
.cp-sheet tr.cp-open > td { background: var(--bg); text-align: left; height: auto; padding: 12px 14px; white-space: normal; }
.cp-sheet tr.cp-open:hover > td { background: var(--bg); }
.cp-exp { position: sticky; left: 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; width: min(1000px, calc(100vw - 320px)); }
.cp-exp-h { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.cp-trend { min-width: 0; }
.cp-trend .rowhead { pointer-events: none; }
.cp-trend .rowhead svg { display: none; }
.cp-sheet .cp-dowt { border-collapse: collapse; font-size: 12px; }
.cp-sheet .cp-dowt th, .cp-sheet .cp-dowt td { padding: 0 10px; height: 26px; text-align: right; border-bottom: 1px solid var(--line); background: transparent; position: static; }
.cp-sheet .cp-dowt thead th { color: var(--muted); font-weight: 600; font-size: 11.5px; }
.cp-sheet .cp-dowt tbody th { text-align: left; font-weight: 600; }
.cp-sheet .cp-dowt td.dash { color: var(--muted); }
/* 広告の段のバナー（10/7・見た目はリード一覧の流入元と同じ .ld-banner）: 曜日の下が既定（推移のグラフ幅を削らない）。
   曜日の右に並べる余地がある画面（≥1440px＝推移が 600px 前後を保てる幅）は右へ置き、展開の幅をバナーぶん（16＋260px）広げる＝推移の幅はバナーなしと同じ */
.cp-side { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; min-width: 0; }
.cp-banner { width: 240px; max-width: 100%; }
.ld-banner.cp-banner img { max-height: 260px; } /* .ld-banner img（360px）より低く＝曜日の表の高さ程度 */
/* キャンペーン・広告セットの段: 中の広告のバナーをコスト順に 3 つまで（10/8）。1 枚 120px・名前は 1 行で … */
.cp-banners-row { display: flex; gap: 10px; flex-wrap: wrap; }
.cp-bn { width: 120px; min-width: 0; }
.cp-bn .ld-banner { margin: 0; }
.cp-bn .ld-banner img { max-height: 160px; }
.cp-bn-cap { font-size: 11.5px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-bn-cost, .cp-bn-more { font-size: 11px; }
.cp-bn-more { margin-top: 6px; }
@media (min-width: 1440px) {
  .cp-side { flex-direction: row; gap: 16px; }
  .cp-exp:has(.cp-bn) { width: min(1276px, calc(100vw - 320px)); }
  .cp-banner { width: 260px; }
  .cp-exp:has(.cp-banner:not([hidden])) { width: min(1276px, calc(100vw - 320px)); }
}
@media (max-width: 899px) {
  .cp-exp { grid-template-columns: minmax(0, 1fr); width: calc(100vw - 64px); }
}
/* 列幅のつまみ（リード一覧と同じ .lead-grip・col-widths.js）。名前の列は --w-name で … に切る・数の列は width＝最小（内容で切らない） */
.cp-sheet.resizing { cursor: col-resize; user-select: none; }
.cp-sheet.resizing .lead-grip::after { background: var(--accent); width: 2px; left: 5px; }
/* 数値画面の左ブロックのつまみ（--w-left・docs/numbers-name-width-design.md） */
.grid-sheet.resizing { cursor: col-resize; user-select: none; }
.grid-sheet.resizing .lead-grip::after { background: var(--accent); width: 2px; left: 5px; }
.grid-sheet tr.sub td.nm a { color: inherit; text-decoration: none; }
.grid-sheet tr.sub td.nm a:hover { color: var(--accent); text-decoration: underline; }
.cv0mk { display: inline-block; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--muted); margin-right: 5px; vertical-align: 1px; box-sizing: border-box; }
.grid-sheet tr.sub .subfilter { height: 24px; padding: 0 8px; font-size: 12px; min-width: 0; width: 100%; max-width: 320px; box-sizing: border-box; border-radius: 6px; }

/* ----- ページ送り（.pager） ----- */
.pager { display: flex; justify-content: center; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); padding: 10px 0 0; font-variant-numeric: tabular-nums; }
.pager button { border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 8px; width: 30px; height: 28px; cursor: pointer; display: inline-grid; place-items: center; }
.pager button:disabled { opacity: .4; cursor: default; }
.pager button svg { width: 14px; height: 14px; }

/* ----- 予算バー（6px・角丸 3px） ----- */
.budget { display: grid; gap: 5px; margin-top: 8px; }
.budget .bl { display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.budget .track { height: 6px; border-radius: 3px; background: var(--accent-soft); overflow: hidden; }
.budget .track i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.budget .track i.el { background: var(--muted); opacity: .6; }
.budget.warn .track i:not(.el) { background: var(--warn); }
.kpi .delta.neutral { color: var(--muted); }
.kpi .value .of { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 8px; }
.kpis.k4 .kpi { min-width: 0; }
.kpi-head { font-size: 12px; font-weight: 600; margin: 0 0 8px 2px; }
@media (max-width: 900px) { .kpis.k4 { display: grid; grid-template-columns: 1fr 1fr; } }

/* ----- 媒体別の行（ダッシュボード） ----- */
.pfrows { display: grid; gap: 0; font-size: 13px; font-variant-numeric: tabular-nums; }
.pfrow { display: grid; grid-template-columns: 90px repeat(5, minmax(0, 1fr)); gap: 10px; padding: 9px 2px; border-top: 1px solid var(--line); align-items: baseline; }
.pfrow:first-child { border-top: 0; }
.pfrow.head { color: var(--muted); font-size: 11.5px; font-weight: 600; padding-top: 0; }
.pfrow > :not(:first-child) { text-align: right; }
.pfrow .nm { font-weight: 700; }
.pfrow .warn { color: var(--warn); font-weight: 700; }
@media (max-width: 700px) { .pfrow { grid-template-columns: 64px repeat(3, minmax(0, 1fr)); } .pfrow > :nth-child(5), .pfrow > :nth-child(6) { display: none; } }

/* ----- 小窓（アラート・遡及） ----- */
.minilist { display: flex; flex-direction: column; font-size: 12.5px; }
.minilist .mi { display: flex; gap: 10px; align-items: baseline; padding: 7px 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.minilist .mi:first-child { border-top: 0; }
.minilist .mi .d { color: var(--muted); white-space: nowrap; min-width: 40px; }
.minilist .mi .t { flex: 1; min-width: 0; }
.minilist .mi .v { white-space: nowrap; }
.sev { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.sev.crit { background: var(--down-soft); color: var(--down); }
.sev.warn { background: var(--warn-soft); color: var(--warn); }
.sev.info { background: var(--accent-soft); color: var(--accent); }

/* ----- 読み込みの顔・エラー（前に描いた物は消さない） ----- */
.loading { color: var(--muted); font-size: 13px; padding: 34px 10px; text-align: center; opacity: 0; animation: lsfade .2s ease .3s forwards; }
@keyframes lsfade { to { opacity: 1; } }
.errbar { display: flex; align-items: center; gap: 10px; background: var(--down-soft); color: var(--down); border-radius: 10px; padding: 9px 14px; font-size: 13px; font-weight: 600; }
.errbar .btn { margin-left: auto; }
@media (prefers-reduced-motion: reduce) { .loading { animation: none; opacity: 1; } .grid-sheet .exp svg { transition: none; } }

/* 塗りの上の文字（お手本の .nav a.on・.chip.on・.btn.primary は白固定）→ ダークでも読める --on-accent に */
.chip.on, .nav a.on, .btn.primary, .btn.primary:hover { color: var(--on-accent); }

/* ===================================================================
   leadnext 第 3 回（設定・アラート・取り込み・照合・導線）
   =================================================================== */

/* ----- ナビ（6 項目・未対応のアラートの数） ----- */
.nav a .cnt { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--warn-soft); color: var(--warn);
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.nav a.on .cnt { background: var(--on-accent); color: var(--accent); }
/* 900px 以下: サイドバーは上の横帯（ロゴ＋横スクロールのナビ） */
@media (max-width: 900px) {
  .sidebar { flex-direction: row; align-items: center; gap: 10px; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 20; height: auto; overflow: visible; }
  .sidebar .brand { padding: 0; flex: none; }
  .sidebar .brand .logo-full { height: 20px; }
  .nav { display: flex !important; flex-direction: row; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: none; padding: 7px 10px; white-space: nowrap; }
  .view { padding: 12px 16px 0; }
}

/* ----- 共通の小物 ----- */
.rowline.gap { margin-top: 14px; }
.hint { margin: 6px 0 0; }
.sub-h { margin: 18px 0 8px; font-size: 13px; }
.warn { color: var(--warn); }
.seg button:disabled { color: var(--muted); opacity: .5; cursor: default; background: var(--panel); }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; padding: 3px 0; }
.check.inline { display: inline-flex; margin-left: 10px; }
.check .num { margin-left: auto; font-size: 12px; font-variant-numeric: tabular-nums; }
.checks { display: flex; flex-direction: column; max-width: 560px; }
/* 通知の表（docs/notify-settings-ui-design.md §4・設計思想 §163・リスト文法 §80・§157）。
   行＝通知の種類 5 行・列＝「通知｜内容｜送信先｜いつ｜受け取る｜確かめる」（列ごとに固定枠）。
   送信先は同じ設定を共有する行で縦に結合（rowspan）。スマホ（≤520px）は 1 行＝カード 1 枚・結合セルの代わりに文字（.nc-room-m） */
.ntcol { max-width: 920px; }
.nt-scroll { overflow-x: auto; }
.ntable { width: 100%; min-width: 880px; border: 1px solid var(--line); border-radius: 10px; border-collapse: separate; border-spacing: 0; margin-bottom: 12px; font-size: 13px; }
.ntable th, .ntable td { padding: 9px 12px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.ntable thead th { border-top: 0; font-size: 12px; color: var(--muted); font-weight: 600; background: var(--bg); }
.ntable thead th:first-child { border-top-left-radius: 10px; }
.ntable thead th:last-child { border-top-right-radius: 10px; }
.ntable tr.nt-sub > * { border-top-color: color-mix(in srgb, var(--line) 50%, transparent); }
.ntable .nc-room { border-left: 1px solid color-mix(in srgb, var(--line) 60%, transparent); border-right: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.ntable thead .nc-room { border-left: 0; border-right: 0; }
.ntable .nc-name { width: 108px; font-weight: 600; white-space: nowrap; }
.ntable .nc-what { min-width: 200px; }
.ntable .nc-room { width: 200px; }
.ntable .nc-when { width: 170px; }
.ntable .nc-recv { width: 64px; }
.ntable .nc-check { width: 210px; }
.ntable .nc-room-m { display: none; }
.ntable .nl2 { font-size: 12px; margin-top: 2px; }
.ntable .nl2.nwarn { color: var(--warn); }
.ntable .nc-when .nl1 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ntable select { height: 30px; padding: 0 8px; font-size: 13px; border-radius: 8px; max-width: 100%; }
.ntable .nstate, .ntable .nmust { color: var(--muted); }
.ntable .nc-check { white-space: nowrap; }
.ntable .nc-check .btn + .btn, .ntable .nc-check select + .btn { margin-left: 6px; }
.ntable .nc-check .down { display: block; white-space: normal; font-size: 12px; margin-top: 4px; }
.nroom { display: flex; flex-direction: column; gap: 3px; }
.nroom .rowline { gap: 6px; flex-wrap: wrap; }
.nroom select { width: 100%; }
.nfrom { font-size: 12px; color: var(--muted); }
.ok-flash { color: var(--up); font-weight: 700; }
.nbanner { display: flex; gap: 10px; align-items: center; margin: 0 0 10px; font-size: 13px; }
.nbanner:empty, #ntBanner:empty { display: none; }
.ntcol #thArea table.thgrid { width: 100%; }
.tgl { position: relative; width: 36px; height: 20px; flex: none; padding: 0; border: 0; border-radius: 999px; background: var(--line); cursor: pointer; transition: background .15s; }
.tgl::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.tgl[aria-checked="true"] { background: var(--accent); }
.tgl[aria-checked="true"]::after { transform: translateX(16px); }
.tgl:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 520px) {
  .nt-scroll { overflow: visible; }
  .ntable { min-width: 0; border: 0; }
  .ntable thead { display: none; }
  .ntable, .ntable tbody { display: block; }
  .ntable tr.nt-r { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name recv" "what what" "room room" "when when" "check check";
    gap: 4px 10px; padding: 12px 0; border-top: 1px solid var(--line); }
  .ntable tr.nt-r:first-child { border-top: 0; }
  .ntable tr.nt-r > * { display: block; width: auto; min-width: 0; padding: 0; border: 0; }
  .ntable .nc-name { grid-area: name; }
  .ntable .nc-recv { grid-area: recv; justify-self: end; }
  .ntable .nc-what { grid-area: what; }
  .ntable .nc-room, .ntable .nc-room-m { grid-area: room; display: flex; gap: 8px; align-items: baseline; }
  .ntable .nc-when { grid-area: when; display: flex; gap: 8px; align-items: baseline; }
  .ntable .nc-room::before, .ntable .nc-room-m::before, .ntable .nc-when::before { content: attr(data-label); flex: none; width: 3.5em; font-size: 12px; color: var(--muted); }
  .ntable .nc-when .nl2 { margin-top: 0; }
  .ntable .nc-check { grid-area: check; white-space: normal; }
  .ntable tr.nt-r > .nc-room, .ntable tr.nt-r > .nc-room-m, .ntable tr.nt-r > .nc-when { display: flex; }
  .ntable tr.nt-r > .nc-check:empty { display: none; }
  .ntable .nroom { flex: 1; }
}
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 12px 18px; align-items: baseline; font-size: 13px; }
.kv .k { color: var(--muted); font-size: 12px; font-weight: 600; }
.kv .radio { display: inline-flex; margin-right: 16px; }
@media (max-width: 700px) { .kv { grid-template-columns: 1fr; gap: 4px; } .kv .v { margin-bottom: 10px; } }
pre.digest { white-space: pre-wrap; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  font-size: 12px; line-height: 1.7; margin: 10px 0 0; font-family: ui-monospace, Menlo, monospace; max-height: 420px; overflow: auto; }
a.btn { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.empty .btn { margin-top: 12px; }

/* ----- セルの直接編集（目標・しきい値で共有）: 編集の箱＝表示の箱（§24）。入力欄はセルそのもの・余白は編集中も変えない ----- */
table.thgrid { box-shadow: none; border: 1px solid var(--line); }
.thgrid td { padding: 0 14px; height: 38px; }
.thgrid { width: auto; min-width: 360px; }
.thgrid td.unit { color: var(--muted); font-size: 12px; font-weight: 400; }
td.ec { cursor: text; outline: none; }
td.ec:hover { background: var(--accent-soft); }
td.ec:focus, td.ec.editing { box-shadow: inset 0 0 0 2px var(--accent); }
td.ec.bad { box-shadow: inset 0 0 0 2px var(--down); }
td.ec.saving { color: var(--muted); }
td.ec input { display: block; width: 100%; min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 0; outline: none; background: transparent;
  color: var(--ink); font: inherit; text-align: right; }
.ec-box { display: flex; align-items: baseline; gap: 6px; }
.ec-box input { flex: 1 1 auto; }
.ec-pre { color: var(--muted); }
.inh { color: var(--muted); }
td.ro { color: var(--ink); }

/* ----- アラート ----- */
.allist { display: flex; flex-direction: column; }
.alrow { display: grid; grid-template-columns: 56px 64px minmax(0, 1fr) 110px 76px 76px auto; gap: 10px; align-items: center;
  padding: 10px 4px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 13px; font-variant-numeric: tabular-nums; }
.alrow:first-child { border-top: 0; }
.alrow:hover { background: var(--accent-soft); }
.alrow .sev { justify-self: start; }
.alrow .pf { font-weight: 700; }
.alrow .per, .alrow .dt { color: var(--muted); font-size: 12px; white-space: nowrap; }
.alrow .act { justify-self: end; font-size: 12px; }
@media (max-width: 900px) {
  .alrow { grid-template-columns: 56px 1fr auto; }
  .alrow .msg { grid-column: 1 / -1; order: 5; }
  .alrow .per, .alrow .dt { display: none; }
}
.minilist a.mi.link { color: inherit; text-decoration: none; }
.minilist a.mi.link:hover .t { color: var(--accent); }
.minilist button.mi.link { width: 100%; border: 0; border-top: 1px solid var(--line); background: none; color: inherit; text-align: left; cursor: pointer; font: inherit; }
.minilist button.mi.link:first-child { border-top: 0; }
.minilist button.mi.link:hover .t { color: var(--accent); }

/* ----- 取り込み ----- */
.formrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 12px; font-size: 13px; }
.formrow .lab { width: 84px; color: var(--muted); font-size: 12px; font-weight: 600; }
.formrow select, .formrow input[type=text] { height: 32px; padding: 0 10px; font-size: 13px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); }
.formrow .w-id { width: 160px; } .formrow .w-name { width: 200px; }
.filebtn { cursor: pointer; }
#ipaste { width: 100%; font-family: ui-monospace, Menlo, monospace; font-size: 12px; resize: vertical; }
.imp-box { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-top: 12px; display: grid; gap: 6px; font-size: 13px; background: var(--bg); }
.imp-box .big { font-weight: 700; }
.imp-box.bad { border-color: var(--down); background: var(--down-soft); color: var(--down); }
.runlist { display: flex; flex-direction: column; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.run { display: grid; grid-template-columns: 90px 60px 70px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 7px 2px; border-top: 1px solid var(--line); }
.run:first-child { border-top: 0; }
.run .at, .run .src { color: var(--muted); }
.run .pf { font-weight: 700; }
.run .det { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run.bad .st { color: var(--down); font-weight: 600; }
@media (max-width: 700px) { .run { grid-template-columns: 80px 50px 1fr auto; } .run .src, .run .det { display: none; } }

/* ----- 照合 ----- */
table.recon td.bad { background: var(--warn-soft); color: var(--warn); font-weight: 700; }
table.recon td.diff { color: var(--muted); }
table.recon td.diff.bad { color: var(--warn); }
table.recon tr.why td { height: 26px; font-size: 11.5px; color: var(--muted); text-align: left; background: var(--panel); white-space: normal; }
table.recon thead tr.h1 th[rowspan] { vertical-align: middle; }
.cands { display: flex; flex-direction: column; }
.cand { display: flex; align-items: center; gap: 12px; padding: 8px 2px; border-top: 1px solid var(--line); font-size: 13px; }
.cand:first-child { border-top: 0; }
.cand .nm { font-weight: 600; }
.cand .hit { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 700; }
.cand.cur .nm { color: var(--accent); }

/* ----- 設定 → 連携（docs/integrations-design.md §2） ----- */
.intgs { display: flex; flex-direction: column; }
.intg { padding: 16px 0; border-top: 1px solid var(--line); }
.intg:first-child { border-top: 0; padding-top: 2px; }
.intg:last-child { padding-bottom: 2px; }
.intg h3 { margin: 0 0 10px; font-size: 14px; }
.intg .rowline { gap: 8px 12px; }
.intg select, .intg input[type=text], .intg input[type=password], .intg input[type=date] { height: 32px; padding: 0 10px; font-size: 13px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); }
.intg select { max-width: 320px; }
.intg .field { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.intg .field input { color: var(--ink); }
.intg #cwFilter { width: 140px; }
.intg #metaTok { width: min(420px, 100%); font-family: ui-monospace, Menlo, monospace; }
.intg .checks.wide { max-width: 760px; }
.intg .check.pick { flex-wrap: wrap; gap: 6px 12px; }
.intg .check.pick.off > span:not(.num) { opacity: .6; }
.intg .btn svg { width: 14px; height: 14px; }
.tokbox { margin-top: 12px; border: 1px solid var(--accent); border-radius: 10px; padding: 12px 14px; display: grid; gap: 8px; background: var(--bg); }
.tokbox .k { color: var(--muted); font-size: 12px; font-weight: 600; }
.tokbox code { word-break: break-all; user-select: all; }
.tokbox .hint { margin: 0; }
#sfNew input[type=text], #sfNew input[type=url] { width: 420px; max-width: 100%; }

/* 取り消せない操作の 2 段目（integrations.js の armed） */
.btn.danger { border-color: var(--down); color: var(--down); }
.btn.danger:hover { border-color: var(--down); color: var(--down); filter: brightness(1.1); }

/* ===================================================================
   UI 改善（docs/ux-redesign.md）: ステータス行・カード・畳み・はじめの設定
   =================================================================== */

/* ----- ナビ: 毎日見る 3 つ／ときどき触る 3 つの区切り・設定の点 ----- */
.nav-sep { border: 0; border-top: 1px solid var(--line); margin: 6px 10px; }
.nav a .dot { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
.nav a .dot[hidden] { display: none; }
@media (max-width: 900px) { .nav-sep { border-top: 0; border-left: 1px solid var(--line); margin: 4px 4px; height: 20px; flex: none; } }

/* ----- ステータス行（タイトル直下の 1 行・4 枠は固定幅＝文字が変わっても横に動かない） ----- */
.statusline { position: relative; display: flex; align-items: center; gap: 8px; margin: -8px 2px 0; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.statusline .sl-info { display: flex; align-items: center; gap: 0; padding: 4px 2px; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; text-align: left; border-radius: 6px; }
.statusline .sl-info:focus-visible { outline: 2px solid var(--accent); }
.statusline .sl-f { display: inline-block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.statusline .sl-data { min-width: 11em; }
.statusline .sl-upd { min-width: 11.5em; }
.statusline .sl-next { min-width: 15em; }
.statusline .sl-f + .sl-f::before { content: "・"; margin: 0 6px; color: var(--line); }
.statusline .sl-f.warn { color: var(--warn); font-weight: 600; }
.statusline .sl-f.down { color: var(--down); font-weight: 600; }
.statusline .sl-fix { color: var(--accent); text-decoration: none; font-weight: 600; }
.statusline .sl-fix::before { content: "・"; margin: 0 6px 0 0; color: var(--line); font-weight: 400; }
.statusline .sl-fix:hover { text-decoration: underline; }
.statusline .sl-fix[hidden] { display: none; }
.statusline .sl-act { flex: none; }
.statusline .sl-act .btn { min-width: 84px; }
.sl-pop { position: absolute; top: calc(100% + 4px); left: 0; z-index: 30; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 10px 14px; min-width: 420px; max-width: min(640px, 100%); color: var(--ink); }
.sl-pop[hidden] { display: none; }
.sl-pop .sl-rows { display: grid; grid-template-columns: auto auto 1fr auto; gap: 4px 14px; align-items: baseline; }
.sl-pop .sl-rows .nm { font-weight: 700; }
.sl-pop .sl-rows .down { color: var(--down); }
.sl-pop .sl-rows .warn { color: var(--warn); }
.sl-pop .sl-fails { margin-top: 8px; display: grid; gap: 2px; }
.sl-pop .hint { margin-top: 8px; }
@media (max-width: 900px) {
  .statusline { flex-wrap: wrap; }
  .statusline .sl-info { display: grid; grid-template-columns: auto auto; gap: 2px 0; }
  .statusline .sl-data, .statusline .sl-upd, .statusline .sl-next { min-width: 0; }
  .statusline .sl-next::before { content: none !important; }
  .statusline .sl-next { grid-column: 1; }
  .sl-pop { min-width: 0; width: 100%; }
  .sl-pop .sl-rows { grid-template-columns: auto 1fr; }
}

/* ----- カード（Chatwork・Meta・Google 共通の文法） ----- */
.cards { display: flex; flex-direction: column; gap: 14px; }
.card { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px 14px; display: grid; gap: 10px; }
.card-h { display: flex; align-items: center; gap: 10px; min-height: 30px; }
.card-h h3 { margin: 0; font-size: 14px; }
.card-h .grow { flex: 1; }
.card-h .warn { font-size: 12.5px; font-weight: 600; }
.card-s { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; font-size: 13px; }
.card-s .sep { color: var(--muted); }
.card .sub-t { color: var(--muted); font-size: 12px; font-weight: 600; margin-top: 2px; }
.card .errline { margin: 0; font-size: 12.5px; }
.card .k { color: var(--muted); font-size: 12px; font-weight: 600; }
.card select, .card input[type=text], .card input[type=password], .card input[type=date] { height: 32px; padding: 0 10px; font-size: 13px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); }
.card select { max-width: 320px; }
.card .field { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.card .field input { color: var(--ink); }
.card #metaTok { width: min(420px, 100%); font-family: ui-monospace, Menlo, monospace; }
.card .btn svg { width: 14px; height: 14px; }
.card .card-foot { justify-content: flex-end; font-size: 12px; }
.card .steps-line { gap: 6px 18px; font-size: 13px; }
.card ol.steps { margin: 4px 0 0; padding-left: 20px; display: grid; gap: 4px; font-size: 13px; }
.csvline { margin: 2px 2px 0; }
.daily { margin-top: 14px; }

/* 取得対象の行（右端の枠が保存の合図） */
.accts { display: flex; flex-direction: column; max-width: 760px; }
.acct { display: grid; grid-template-columns: 22px minmax(0, 1fr) 48px 15em auto; align-items: center; gap: 8px; padding: 5px 0; border-top: 1px solid var(--line); font-size: 13px; cursor: pointer; }
div.acct { cursor: default; }
.acct:first-child { border-top: 0; }
.acct.off .nm { color: var(--muted); }
.acct .st { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.acct .box { width: 16px; height: 16px; border: 1px solid var(--line); border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; }
.acct .box svg { width: 12px; height: 12px; }
@media (max-width: 700px) { .acct { grid-template-columns: 22px minmax(0, 1fr) auto; } .acct > :nth-child(3) { display: none; } .acct .st { grid-column: 2 / -1; } }

/* 畳み（見出しに今の値）と「?」 */
.fold { border-top: 1px solid var(--line); padding-top: 8px; }
.fold > summary, .fold.off { display: flex; align-items: baseline; gap: 12px; cursor: pointer; font-size: 13px; list-style: none; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(-45deg); margin-right: 2px; flex: none; align-self: center; }
.fold[open] > summary::before { transform: rotate(45deg); }
.fold .ft { font-weight: 600; }
.fold.off { cursor: default; color: var(--muted); }
.fold .fbody { padding: 10px 0 2px 16px; }
.qmark { position: relative; display: inline-block; margin-left: 6px; }
.qmark > summary { list-style: none; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.qmark > summary::-webkit-details-marker { display: none; }
.qmark[open] > summary { border-color: var(--accent); color: var(--accent); }
.qmark .qbody { position: absolute; z-index: 25; top: 24px; left: -8px; width: min(380px, 80vw); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 8px 12px; font-size: 12.5px; color: var(--ink); }
.qmark .qbody p { margin: 4px 0; }

/* ----- はじめの設定（編集者・ダッシュボード） ----- */
.setup .p-head { justify-content: flex-start; }
.setup-done { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.setup-done .sd { display: inline-flex; align-items: center; gap: 6px; }
.setup-done svg { width: 15px; height: 15px; stroke: var(--muted); }
.setup-todo { display: grid; gap: 2px; }
.setup-todo .st { display: grid; grid-template-columns: 16px auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 4px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 13px; }
.setup-todo .st:hover { background: var(--accent-soft); }
.setup-todo .ring { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--muted); justify-self: center; }
.setup-todo .to { color: var(--accent); font-size: 12.5px; white-space: nowrap; }
@media (max-width: 700px) { .setup-todo .st { grid-template-columns: 16px minmax(0, 1fr) auto; } .setup-todo .st .muted { display: none; } }
.kpi .delta a { color: var(--accent); text-decoration: none; }
.rowline.center { justify-content: center; }

/* 取得の記録: 過去分の札 */
.run .src.tag { justify-self: start; padding: 0 6px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; }

/* ===== ダッシュボード: 1 画面（1440×870）に収める三段構え（docs/research-dashboard-uiux.md §4・§6・10/5 翔さん「全て推奨」）=====
   色・影・角丸の文法は据え置き。変えるのは密度と段数だけ（新しい色は足さない） */
.view[data-view="/"] { gap: 12px; }
.view[data-view="/"] .panel { padding: 12px 16px; }
.view[data-view="/"] .empty { padding: 20px 10px; }

/* はじめの設定: 1 行（約 36px）・残りの歩だけ・開くと 5 歩の一覧（既存 .fold の文法） */
.view .setup.fold { padding: 6px 14px; border-top: 1px solid var(--line); }
.setup.fold > summary { align-items: center; flex-wrap: wrap; gap: 2px 12px; min-height: 22px; }
.setup.fold > summary .num { font-size: 12.5px; }
.setup-rest { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: 13px; min-width: 0; }
.setup-rest a { color: var(--accent); font-weight: 600; text-decoration: none; }
.setup-rest a:hover { text-decoration: underline; }
.setup-rest .to { font-size: 12px; }
.setup-rest .sep { color: var(--line); }
.setup.fold .fbody { padding: 10px 0 4px 16px; }

/* KPI カード: 68px 固定・上段＝ラベルと増減／下段＝値とスパークライン（値の y を 4 枚で揃える・G5） */
.kpi-slot { min-height: 94px; }
.view[data-view="/"] .kpi-head { margin-bottom: 8px; }
.view[data-view="/"] .kpis.k4 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.4fr); gap: 12px; }
.kpis.k4 .kpi { height: 68px; padding: 10px 14px; display: grid; grid-template-rows: 16px 1fr; align-items: center; min-width: 0; text-align: left; }
button.kpi { font: inherit; color: var(--ink); cursor: pointer; appearance: none; -webkit-appearance: none; }
.kpi .k1 { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; white-space: nowrap; line-height: 16px; }
.kpi .k1 .label { overflow: hidden; text-overflow: ellipsis; }
.kpi .k1 .delta { margin-top: 0; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.kpi .k2 { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.kpi .k2 .value { margin-top: 0; line-height: 30px; white-space: nowrap; }
.kpi svg.spark { width: 80px; height: 24px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.5; }
.kpi svg.spark path { vector-effect: non-scaling-stroke; }
.kpi.pick:hover { border-color: var(--accent); }
.kpi.pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.kpi.on { background: var(--accent-soft); border-color: var(--accent); }

/* 予算の消化: ブレットグラフ 1 本（棒＝消化・縦線＝期間経過・薄い帯＝経過 ± しきい値）。判定後のしきい値超えだけ棒を --warn */
.kpi .kb { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.kpi .kb-t { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; line-height: 14px; }
.bullet { position: relative; display: block; height: 8px; border-radius: 2px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.bullet i { position: absolute; display: block; }
.bullet .band { top: 0; bottom: 0; background: var(--accent-soft); }
.bullet .bar { left: 0; top: 2px; height: 4px; border-radius: 2px; background: var(--accent); }
.bullet .mark { top: -2px; height: 12px; width: 2px; margin-left: -1px; background: var(--ink); }
.bullet.warn .bar { background: var(--warn); }
/* 4 枚目「10月の目標」（docs/cv-target-design.md §2.3）: 下段を左右 2 つの半分（予算の消化・CV の達成）。中身は既存の値＋ブレットの 1 組を 2 つ */
.kpi.goal .k2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.kpi.goal .half { display: flex; align-items: center; gap: 8px; min-width: 0; }
.kpi.goal .half .kb-t { text-align: left; }
.kpi.goal .half .kb-t a { color: var(--accent); text-decoration: none; }
/* 1440 未満（1280 等）: 1fr が費用の「¥1,234,567＋スパークライン 80px」を下回るので、4 枚目を 1.6fr にして値を 20px・スパークラインを 40px に
   （実測 1280: 1fr 212px・4 枚目 340px＝半分 150px に「予算 ¥1,100,000」が収まる。900 以下は 2 列の既存の並び） */
@media (min-width: 901px) and (max-width: 1439px) {
  .view[data-view="/"] .kpis.k4 { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.6fr); }
  .kpis.k4 .kpi .k2 .value { font-size: 20px; }
  .kpis.k4 .kpi svg.spark { width: 40px; }
}

/* 中段 410px（docs/research-dashboard-uiux-2.md §3・§5）: 左 5/12＝媒体別の表＋キャンペーン 上位／下位（縦に積む）／右 7/12＝推移（並べる表示）。左右の高さを揃える（G5） */
.grid-mid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 12px; }
.grid-mid > * { min-width: 0; }
.mid-left { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.mid-left > .panel { display: flex; flex-direction: column; min-width: 0; }
.mid-left > #pf { flex: none; }
.mid-left > .camps { flex: 1; }
/* キャンペーン 上位／下位（docs/chart-trend-review.md §5.3-2）: 左の列＝グループ名（最初の行だけ）・名前・コスト・CV・CPA */
.crows { display: flex; flex-direction: column; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.cr { display: grid; grid-template-columns: 58px minmax(0, 1fr) 82px 34px 70px; gap: 8px; align-items: baseline; padding: 4px 2px; color: inherit; text-decoration: none; }
.cr > :nth-child(n+3) { text-align: right; white-space: nowrap; }
.cr.head { color: var(--muted); font-size: 11.5px; font-weight: 600; padding-top: 0; }
.cr .g { color: var(--muted); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.cr .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr.gs { border-top: 1px solid var(--line); }
/* スマホ: CV 上位 3 だけ（下位はキャンペーン画面へ・§5.4）・グループ名の列を外して名前に幅を */
@media (max-width: 480px) {
  .cr { grid-template-columns: minmax(0, 1fr) 76px 30px 62px; }
  .cr > .g { display: none; }
  .cr.bottom { display: none; }
}
a.cr.link:hover .nm { color: var(--accent); text-decoration: underline; }
a.cr.link:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 6px; }
.camps .p-head .sub, .opsbox .p-head .sub { color: var(--accent); text-decoration: none; font-weight: 600; }
.camps .p-head .sub:hover, .opsbox .p-head .sub:hover { text-decoration: underline; }
.grid-mid > .trend { min-height: 410px; display: flex; flex-direction: column; }
#pf { container-type: inline-size; }
#pf .pfrow { grid-template-columns: 64px repeat(4, minmax(0, 1fr)); padding: 6px 2px; }
#pf .pfrow.head { padding-top: 0; }
#pf .pfrow.total { border-top-color: var(--muted); }
#pf .pfrow.total > :not(.nm) { font-weight: 700; }
#pf a.pfrow { color: inherit; text-decoration: none; }
#pf a.pfrow:hover .nm { color: var(--accent); text-decoration: underline; }
#pf a.pfrow:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 6px; }
/* 未接続の媒体: 名前＋「未接続 → つなぐ」の 1 行（数字の列は使わない） */
#pf .pfrow.off { color: var(--muted); }
#pf .pfrow.off .pf-off { grid-column: 2 / -1; text-align: left; font-size: 12.5px; }
#pf .pfrow.off a { color: var(--accent); font-weight: 600; text-decoration: none; }
#pf .pfrow.off a:hover { text-decoration: underline; }
@media (max-width: 700px) { #pf .pfrow { grid-template-columns: 64px repeat(3, minmax(0, 1fr)); } }
#pf .pf-foot { margin-top: auto; padding-top: 10px; display: flex; flex-wrap: wrap; gap: 2px 16px; font-size: 12px; font-variant-numeric: tabular-nums; }
@container (max-width: 360px) { #pf .pfrow { grid-template-columns: 56px repeat(3, minmax(0, 1fr)); } #pf .pfrow > :nth-child(5) { display: none; } }
/* 見出し行は「推移」と右の粒度・期間だけ（表示で変わる物を置かない＝右のボタンが動かない） */
.trend .p-head { margin-bottom: 6px; flex-wrap: wrap; gap: 6px 10px; justify-content: flex-start; }
.trend .p-head h3 { white-space: nowrap; }
.trend #segbox { margin-left: auto; min-width: 0; }
.trend .segbar { justify-content: flex-end; gap: 6px 10px; }
.trend .segbar .grow { display: none; }
.trend .seg-note { text-align: right; margin-top: 4px; }
.trend .mtabs button { padding: 0 7px; font-size: 11.5px; } /* 推移パネルの中だけ詰める（数値画面は既存） */
.grid-mid .chart { margin-top: 0; }
.trend-foot { margin-top: auto; height: 18px; line-height: 18px; text-align: right; font-size: 12.5px; }
.trend-foot a { color: var(--accent); text-decoration: none; font-weight: 600; }
.trend-foot a:hover { text-decoration: underline; }

/* 並べる表示: 段の見出し（⤢ を押すとその指標を大きく）＋グラフ。横軸は最下段だけ（面を増やさない・G3）。凡例は上の操作の行 */
.stack { display: flex; flex-direction: column; }
.srow + .srow { margin-top: 8px; }
.srow-h { display: flex; align-items: flex-start; justify-content: flex-start; gap: 10px; min-height: 16px; }
.rowhead { display: inline-flex; flex-shrink: 0; align-items: center; gap: 4px; border: 0; background: none; padding: 0; font: inherit; font-size: 12px; font-weight: 700; line-height: 16px; color: var(--ink); cursor: pointer; }
.rowhead svg.ex { width: 11px; height: 11px; color: var(--muted); stroke-width: 2.2; }
.rowhead:hover { color: var(--accent); text-decoration: underline; }
.rowhead:hover svg.ex { color: var(--accent); }
.rowhead:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.chartlegend .off { color: var(--muted); opacity: .7; }
.charttip .tiptable { border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.charttip .tiptable th, .charttip .tiptable td { padding: 2px 0 2px 12px; text-align: right; white-space: nowrap; }
.charttip .tiptable thead th { color: var(--muted); font-weight: 600; font-size: 11px; }
.charttip .tiptable tbody th { text-align: left; padding-left: 0; font-weight: 600; }
.charttip .tiptable tbody th .sw { margin-right: 6px; }
.charttip .tiptable td { font-weight: 700; }

/* 下の全幅: インサイト（アラート＋日報と同じ規則の行・最大 5 行）。空なら 1 行（約 40px・状態・最終判定・いまの条件 → 設定） */
.alertbar .wtag { font-size: 11px; font-weight: 700; color: var(--muted); white-space: nowrap; min-width: 34px; padding: 1px 0; }
.alertbar .minilist .mi .to { color: var(--accent); font-size: 12px; font-weight: 600; white-space: nowrap; }
.alertbar .minilist .mi .d:empty { display: none; }
/* 下段（docs/chart-trend-review.md §5.3）: 左＝リードの流れ／右＝施策（前後比較） */
.grid-low { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid-low > * { min-width: 0; }
/* リードの流れ: 名前・横棒（リード＝100%）・件数（率）・前の期間 */
.lfrows { display: grid; gap: 8px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.lf { display: grid; grid-template-columns: 40px minmax(0, 1fr) 96px 64px; gap: 10px; align-items: center; }
.lf .nm { font-weight: 700; }
.lf .v, .lf .pv { text-align: right; white-space: nowrap; }
.lfbar { display: block; height: 10px; border-radius: 3px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.lfbar i { display: block; height: 100%; background: var(--accent); opacity: .55; }
.lf-foot { margin-top: 10px; font-size: 12.5px; }
.lf-foot a, .leadflow .p-head .sub { color: var(--accent); font-weight: 600; text-decoration: none; }
.lf-foot a:hover, .leadflow .p-head .sub:hover { text-decoration: underline; }
.oprows { display: flex; flex-direction: column; font-size: 12.5px; }
.opr { padding: 6px 0; border-top: 1px solid var(--line); display: grid; gap: 2px; }
.opr:first-child { border-top: 0; padding-top: 0; }
.opr-h { display: flex; gap: 10px; align-items: baseline; min-width: 0; }
.opr-h b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opr-h .muted { white-space: nowrap; font-size: 12px; }
.opr-v { font-variant-numeric: tabular-nums; }
.view .alertbar.empty-bar { padding: 9px 18px; }
.alertbar .ab-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; font-size: 13px; line-height: 20px; color: var(--muted); }
.alertbar .ab-line a { color: var(--accent); font-weight: 600; text-decoration: none; }
.alertbar .ab-line a::before { content: "→ "; }
.alertbar .ab-line a:hover { text-decoration: underline; }
.alertbar .p-head .sub { color: var(--accent); text-decoration: none; font-weight: 600; }
.alertbar .p-head .sub:hover { text-decoration: underline; }
.alertbar .minilist .mi { padding: 6px 0; }

/* スマホ・狭い幅: 1 列。順は KPI → インサイト → 推移（並べる表示のまま）→ キャンペーン → リードの流れ → 媒体別 → 施策
   （行動の面を推移より上に・Google 広告アプリの概要と同じ・docs/chart-trend-review.md §5.4）。中段と下段の枠を外して .view の grid の順で並べる */
@media (max-width: 980px) {
  .view[data-view="/"] .grid-mid, .view[data-view="/"] .mid-left, .view[data-view="/"] .grid-low { display: contents; }
  .view[data-view="/"] > #kpi { order: 1; }
  .view[data-view="/"] > .alertbar { order: 2; }
  .view[data-view="/"] .trend { order: 3; min-height: 0; }
  .view[data-view="/"] .camps { order: 4; }
  .view[data-view="/"] .leadflow { order: 5; }
  .view[data-view="/"] #pf { order: 6; }
  .view[data-view="/"] .opsbox { order: 7; }
}
@media (max-width: 900px) {
  .view[data-view="/"] .kpis.k4 { grid-template-columns: 1fr 1fr; }
  .kpis.k4 .kpi { height: auto; min-height: 68px; grid-template-rows: auto auto; gap: 4px; }
  .kpi .kb { flex-basis: 100%; }
  .kpi .k1 { flex-wrap: wrap; white-space: normal; }
  .kpi .k2 { flex-wrap: wrap; }
  .kpi svg.spark { width: 56px; }
  .trend #segbox { margin-left: 0; width: 100%; }
}
@media (max-width: 480px) { .kpi svg.spark { display: none; } }
/* ダッシュボードの推移は見出し行を 1 行に収める（期間の日付は横軸と「この期間を数値で見る」で分かる） */
.trend .seg-span { display: none; }

/* ----- ブランドの切替（docs/brands-tenancy-design.md §3.1・ロゴの直下・色は既存のトークンだけ） ----- */
.nav[hidden], .bsw[hidden] { display: none !important; }
.bsw { position: relative; margin-top: -8px; }
.bsw-btn, .bsw-one { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 8px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; text-align: left; min-width: 0; }
.bsw-one { border-color: transparent; }
.bsw-btn { cursor: pointer; }
.bsw-btn:hover, .bsw-btn[aria-expanded="true"] { border-color: var(--accent); }
.bsw-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.bsw-ic { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--accent-soft); color: var(--accent);
  font-size: 12px; font-weight: 800; line-height: 1; }
.bsw-ic svg { width: 13px; height: 13px; }
.bsw-nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bsw-chev { width: 14px !important; height: 14px !important; color: var(--muted); }
.bsw-menu { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 40; min-width: 200px; max-height: 60vh; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; gap: 1px; }
.bsw-menu[hidden] { display: none; }
.bsw-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 7px; color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 600; }
.bsw-item .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bsw-item .muted { font-size: 11.5px; font-weight: 500; }
.bsw-item:hover, .bsw-item:focus-visible { background: var(--accent-soft); color: var(--accent); outline: none; }
.bsw-item.on { color: var(--accent); }
.bsw-item.on::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; margin-left: -2px; }
.bsw-sep { border: 0; border-top: 1px solid var(--line); margin: 4px 6px; }
.statusline .sl-brand { color: var(--ink); font-weight: 700; max-width: 14em; }
.statusline .sl-brand:empty { display: none; }
.statusline .sl-brand:empty + .sl-f::before { content: none; }
@media (max-width: 900px) {
  .bsw { margin-top: 0; flex: 0 1 auto; min-width: 0; max-width: 40vw; }
  .bsw-btn, .bsw-one { padding: 5px 7px; }
  .bsw-menu { right: auto; width: max-content; max-width: calc(100vw - 32px); }
  .statusline .sl-brand { grid-column: 1 / -1; }
  .statusline .sl-brand + .sl-f::before { content: none; }
}

/* ----- 全ブランド一覧（docs/brands-tenancy-design.md §3.2 (a)・PR 3）。色は既存のトークンだけ・行の文法はダッシュボードの媒体別（.pfrow）と同じ ----- */
.nav a[hidden] { display: none; }
.ovrows { display: grid; font-size: 13px; font-variant-numeric: tabular-nums; }
.ovrow { display: grid; grid-template-columns: minmax(150px, 1.3fr) minmax(0, 1fr) minmax(0, .6fr) minmax(0, 1.6fr) minmax(0, 1.2fr) 56px minmax(0, 1.6fr);
  gap: 12px; align-items: baseline; padding: 11px 6px; border-top: 1px solid var(--line); }
.ovrow:first-child { border-top: 0; }
.ovrow > :not(:first-child) { text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ovrow.head { color: var(--muted); font-size: 11.5px; font-weight: 600; padding-top: 0; }
.ovrow.head .ov-sort { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.ovrow.head .ov-sort:hover, .ovrow.head .ov-sort.on { color: var(--accent); }
.ovrow.head .ov-sort:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.ovrow[data-href] { cursor: pointer; border-radius: 8px; }
.ovrow[data-href]:hover { background: var(--accent-soft); }
.ovrow .nm { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ovrow .nm a { color: var(--ink); text-decoration: none; }
.ovrow[data-href]:hover .nm a, .ovrow .nm a:focus-visible { color: var(--accent); text-decoration: underline; }
.ovrow .kind { font-size: 11.5px; font-weight: 500; margin-left: 8px; }
.ovrow .warn { color: var(--warn); font-weight: 700; }
.ovrow .ov-span { grid-column: 2 / -1; text-align: left; }
.ovrow .ov-span a { color: var(--accent); font-weight: 600; text-decoration: none; }
.ovrow .ov-span a::before { content: "→ "; }
.ovrow .ov-span a:hover { text-decoration: underline; }
.ov-al { display: inline-block; min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-size: 12px; font-weight: 700; text-align: center; text-decoration: none; }
a.ov-al:hover { text-decoration: underline; }
.ovrow.total { border-top-color: var(--muted); cursor: default; }
.ovrow.total .nm { white-space: normal; overflow: visible; }
.ovrow.total > :not(.muted) { font-weight: 700; }
.ov-note { margin: -4px 4px 0; font-size: 12.5px; color: var(--muted); }
.ov-mobile-sort { display: none; }
/* 狭い幅（スマホ）: 横スクロールさせず 1 ブランド＝小さな 2 列の塊に（見出し行は隠し、各値の上に項目名） */
@media (max-width: 760px) {
  .ov-mobile-sort { display: flex; align-items: center; gap: 8px; min-width: 0; margin-bottom: 8px; font-size: 12px; color: var(--muted); }
  .ov-mobile-sort label { flex: none; }
  .ov-mobile-sort select { flex: 1; min-width: 0; width: 0; padding: 7px 8px; font-size: 13px; }
  .ov-mobile-sort .ov-dir { flex: none; padding: 7px 9px; }
  .ovrow.head { display: none; }
  .ovrow { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; padding: 12px 4px; }
  .ovrow:nth-child(2) { border-top: 0; }
  .ovrow > .nm, .ovrow .ov-span { grid-column: 1 / -1; }
  .ovrow > :not(:first-child) { text-align: left; white-space: normal; }
  .ovrow > [data-l]::before { content: attr(data-l); display: block; font-size: 11px; font-weight: 600; color: var(--muted); }
  .ovrow > :empty { display: none; }
}

/* ===== 設定の分割（docs/brands-tenancy-design.md §3.2 (c)・§3.7・PR 4）: ブランド・口座の行。色は既存の役割だけ（未割り当て＝注意の淡い面） ===== */
.alist { display: flex; flex-direction: column; }
.arow { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; padding: 7px 4px; border-top: 1px solid var(--line); font-size: 13px; min-width: 0; }
.arow:first-child { border-top: 0; }
.arow .nm { font-weight: 600; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arow [data-rename] { cursor: text; border-radius: 6px; padding: 1px 4px; margin: -1px -4px; }
.arow [data-rename]:hover, .arow [data-rename]:focus { background: var(--bg); outline: none; box-shadow: inset 0 0 0 1px var(--line); }
.arow .grow { flex: 1; }
.arow.off .nm { color: var(--muted); }
.arow.free { background: var(--warn-soft); border-radius: 8px; border-top-color: transparent; }
.arow.free + .arow { border-top-color: transparent; }
.arow .hint.full { flex-basis: 100%; margin: 0; }
.arow select { height: 30px; padding: 0 8px; font-size: 13px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); max-width: 220px; }
.arow input[type=text] { height: 30px; padding: 0 8px; font-size: 13px; border-radius: 8px; border: 1px solid var(--accent); background: var(--panel); color: var(--ink); width: min(280px, 100%); }
.arow-confirm { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; flex-basis: 100%; justify-content: flex-end; font-size: 12.5px; }
.addbrand { margin-bottom: 4px; }
.addbrand input[type=text] { width: min(280px, 100%); }
.override { gap: 4px 18px; margin-bottom: 8px; }
.override .radio .muted { margin-left: 4px; font-size: 12px; }
.ov-note a { margin-left: 6px; }
@media (max-width: 700px) { .arow select { max-width: 100%; flex: 1 1 100%; } .arow-confirm { justify-content: flex-start; } }
@media (max-width: 700px) { table.thgrid { min-width: 0; width: 100%; } }

/* ----- 目標の表（docs/targets-input-design.md §3）: 薄い縦横の格子（線は --line 1 種類）・列幅は数値で（月 168・数字 120 × 5） ----- */
.tg { width: fit-content; max-width: 100%; } /* 上の 1 行・足元の 1 行を表の幅にそろえる */
.tg-top, .tg-foot { width: 0; min-width: 100%; } /* 幅は表で決める（文の長さで広げない） */
.tg-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; min-height: 28px; margin-bottom: 6px; }
.tref { flex: 1 1 280px; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; margin: 0; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tref .tref-k { font-weight: 600; }
.tg-top .btn { flex: none; margin-left: auto; }
.tg-scroll { position: relative; }
.tg-scroll.more::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 16px; pointer-events: none;
  background: linear-gradient(to left, color-mix(in srgb, var(--ink) 12%, transparent), transparent); }
.tgwrap { overflow-x: auto; }
/* 表（1,056px）が収まる幅では枠を外す＝見出しの sticky が効く。それより狭い幅（1280 等）は表の中だけ横スクロールし、月の列を左に留める（スマホと同じ作法・docs/cv-target-design.md §2.2） */
@media (min-width: 1440px) { .tgwrap { overflow-x: visible; } }
@media (max-width: 1439px) {
  table.data.tgrid .mc { position: sticky; left: 0; z-index: 2; background: var(--panel); box-shadow: 1px 0 0 var(--line); }
  table.data.tgrid thead th.mc { z-index: 4; }
}
table.data.tgrid { table-layout: fixed; width: 1056px; border: 1px solid var(--line); border-radius: 0; box-shadow: none; overflow: visible; font-size: 13px; }
.tgrid col.c-m { width: 168px; }
.tgrid col.c-n { width: 120px; }
.tgrid col.c-c { width: 96px; } /* 件数（目標 CV）の列 */
table.data.tgrid th, table.data.tgrid td { padding: 0 12px; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.data.tgrid .mc { border-left: 0; }
table.data.tgrid tbody tr:last-child td { border-bottom: 0; }
table.data.tgrid thead th { height: 28px; cursor: default; box-shadow: none; font-size: 12px; position: sticky; top: 0; z-index: 3; }
table.data.tgrid thead tr + tr th { top: 28px; }
table.data.tgrid thead th.grp { color: var(--ink); }
table.data.tgrid .num { text-align: right; }
table.data.tgrid .lft { text-align: left; }
table.data.tgrid tbody td { height: 36px; }
table.data.tgrid tbody td.mc { font-weight: 500; max-width: none; }
table.data.tgrid tr.curm td.mc { color: var(--accent); font-weight: 700; }
.tgrid .mc .sev { margin-left: 8px; vertical-align: 1px; }
table.data.tgrid .auto { background: var(--bg); color: var(--muted); cursor: default; }
.tgrid .tg-auto { display: block; font-size: 11px; font-weight: 500; line-height: 1.3; }
.tgrid th.grp .tg-auto { display: inline; margin-left: 6px; } /* 上段の「合算 自動」は 1 行（見出しの高さ 28px を保つ） */
.tgrid .ml-s { display: none; }
.tg-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 20px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.tg-status { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-status.bad { color: var(--down); }
.tg-legend { flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 成果地点ごとの目標の表（docs/cv-point-targets-design.md §3.2）: 幅は 月 168＋成果地点 ×（目標 CPA 120・目標 CV 96・印 96）＋見込み費用 120 */
.cvt { margin-top: 24px; }
.cvt-h { margin: 0 0 6px; }
.cvt-empty { margin: 0 0 6px; font-size: 12px; }
table.data.tgrid.cvtgrid { width: calc(168px + var(--cvt-points, 2) * 312px + 120px); }
.tgrid col.c-s { width: 96px; } /* 印の列 */
table.data.tgrid .grp { white-space: nowrap; }
table.data.tgrid td.cs { cursor: pointer; }
table.data.tgrid td.cs:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sev.cvs-prov { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.cvs-agreed { color: var(--muted); }
.cvt .cd-q { vertical-align: 1px; }
/* 印の小窓（キャンペーン画面の成果地点のドロップダウンと同じ出し方） */
.cvs-pop { position: absolute; z-index: 30; width: 340px; max-width: calc(100vw - 32px); padding: 10px 12px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; box-shadow: 0 6px 24px color-mix(in srgb, var(--ink) 16%, transparent); font-size: 13px; }
.cvs-pop .cvs-radios { display: flex; gap: 16px; margin-bottom: 8px; }
.cvs-pop .cvs-note { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.cvs-pop .cvs-note input { flex: 1 1 auto; min-width: 0; }
.cvs-pop .cvs-hist { margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 12px; }
.cvs-pop .cvs-hist li { display: flex; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cvs-pop .cvs-hist-k { flex: none; font-weight: 600; }
@media (max-width: 700px) {
  table.data.tgrid { width: 920px; }
  .tgrid col.c-m { width: 96px; }
  .tgrid col.c-n { width: 112px; }
  .tgrid col.c-c { width: 88px; }
  table.data.tgrid.cvtgrid { width: calc(96px + var(--cvt-points, 2) * 296px + 112px); } /* 112＋88＋印 96 */
  .cvs-pop { left: 16px !important; right: 16px; width: auto; }
  .tgrid .ml-l { display: none; }
  .tgrid .ml-s { display: inline; }
  .tgrid .mc .sev { margin-left: 4px; }
  .tg-foot.has-status .tg-legend { display: none; } /* 狭い幅では合図を優先（凡例は合図が消えたら戻る） */
  .tg-foot.full { height: auto; }
  .tg-foot.full .tg-status { white-space: normal; }
}

/* ----- リード（ブランドの設定「リード」・Phase L0 の確認用の最小） ----- */
.leads .arow.lead { align-items: baseline; }
.leads .arow.lead .num { font-variant-numeric: tabular-nums; min-width: 6.5em; }
.leads .arow.lead > .rowline, .leads .arow.lead > .hint { flex-basis: 100%; }
.leads .arow.lead input[type=text] { width: min(360px, 100%); }
@media (max-width: 700px) { .leads .arow.lead .num { min-width: 0; } }

/* ===== ログイン・アカウント（docs/auth-tenancy-design.md §6.1・§6.6・PR 1） ===== */
.is-login .sidebar, .is-login .linkbar-slot { display: none; }
.is-login .layout { grid-template-columns: minmax(0, 1fr); }
.auth-wrap { min-height: 80vh; display: grid; place-items: center; padding: 24px 0; }
.auth-card { width: min(400px, 100%); text-align: center; display: grid; gap: 14px; padding: 32px 28px; }
.auth-logo { margin: 0; }
.auth-tag { margin: -6px 0 6px; color: var(--muted); font-size: 13px; }
.auth-err { margin: 0; background: var(--down-soft); color: var(--down); border-radius: 9px; padding: 9px 12px; font-size: 13px; font-weight: 600; }
.auth-note { margin: 0; font-size: 12.5px; line-height: 1.8; }
/* Google のボタン（ブランド指針: 白地・G ロゴ・「Google でログイン」） */
.btn.g-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: #fff; color: #1f1f1f; border-color: #747775; font-weight: 600; padding: 10px 16px; text-decoration: none; }
.btn.g-btn:hover { color: #1f1f1f; border-color: #1f1f1f; background: #f8f9fa; }
.btn.g-btn .g-logo { width: 18px; height: 18px; }
.linkbar-slot { padding: 12px 22px 0; }
.linkbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--accent-soft); color: var(--ink); border-radius: 10px; padding: 10px 14px; font-size: 13px; }
.linkbar .btn { margin-left: auto; }
/* アカウント #/account（docs/account-settings-design.md v3 §2.1・§2.2・PR 3）: 1 列・幅 640px・4 区画。
   .acct は口座の行（1057 行）と名前がぶつかるので使わない（10/13）。ラベル列は 64px 固定（見えないグリッド・UI文法 G6） */
.acct-wrap { max-width: 640px; display: grid; gap: 14px; margin-top: 14px; }
.acct-sec { display: grid; gap: 10px; }
.acct-h { margin: 0; font-size: 14px; }
.acct-hrow, .acct-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.acct-hrow .grow, .acct-line .grow { flex: 1; }
.acct-prof { display: grid; gap: 14px; }
/* 写真（PR 7）: 72px の丸（押せる）＋［写真を変える］・戻す・結果の固定枠 */
.acct-photo { display: flex; align-items: center; gap: 16px; min-width: 0; }
.acct-facebtn { flex: none; border: 0; padding: 0; background: none; border-radius: 50%; cursor: pointer; line-height: 0; }
.acct-facebtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.acct-facebtn:hover .acct-face { filter: brightness(.94); }
.am-av.acct-face { width: 72px; height: 72px; font-size: 28px; display: grid; }
img.am-av.acct-face { display: block; }
.acct-facebtn.bump .acct-face { animation: acct-bump .32s ease-out 1; }
@keyframes acct-bump { 50% { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .acct-facebtn.bump .acct-face { animation: none; } }
.acct-photoact { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.acct-photoreset:empty { display: none; }
.acct-fields { display: grid; gap: 6px; min-width: 0; }
.acct-f { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 0 10px; align-items: center; }
.acct-k { color: var(--muted); font-size: 12.5px; display: inline-flex; align-items: center; gap: 4px; }
.acct-namebox { display: flex; align-items: center; gap: 10px; min-width: 0; }
.acct-namebox input { width: min(280px, 100%); min-width: 0; padding: 8px 10px; }
.acct-st { min-width: 9em; font-size: 12px; color: var(--muted); white-space: nowrap; } /* 結果の固定枠（空でも幅を確保・UI文法 §146） */
.acct-st.ok { color: var(--up); }
.acct-st.err { color: var(--down); white-space: normal; }
.acct-sub { min-height: 18px; font-size: 12px; } /* 「Google の名前に戻す」の 1 行（無いときも高さを確保） */
.acct-mail { display: flex; align-items: center; gap: 10px; min-width: 0; }
.acct-mailtx { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-g { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); flex: none; }
.acct-g .g-logo { width: 13px; height: 13px; }
.acct-orgs { display: grid; }
.acct-org { display: grid; grid-template-columns: minmax(0, 1fr) 64px 84px 172px; gap: 4px 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.acct-org:first-child { border-top: 0; padding-top: 2px; }
.acct-on { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-or { font-size: 12.5px; }
.acct-os { font-size: 11.5px; }
.acct-os.tag { justify-self: start; background: var(--warn-soft); color: var(--unsure-ink); border-radius: 999px; padding: 1px 8px; font-weight: 600; white-space: nowrap; }
.acct-oa { display: flex; gap: 6px; justify-content: flex-end; }
.acct-empty { margin: 0; }
/* ログイン中の端末（§2.7・PR 4）: 種類 | この端末／最後に使った | ［ログアウト］ */
.acct-devs { display: grid; }
.acct-dev { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.acct-dn { display: inline-flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-dn .ico { margin: 0; width: 17px; height: 17px; color: var(--muted); }
.acct-ds { font-size: 12.5px; }
.acct-ds.cur { color: var(--up); font-weight: 600; }
.acct-da { display: flex; justify-content: flex-end; min-width: 9em; }
.acct-danger { border-color: var(--down); }
.acct-danger .acct-line .muted { font-size: 12.5px; }
@media (max-width: 700px) {
  .am-av.acct-face { width: 64px; height: 64px; }
  .acct-photoact { flex-direction: column; align-items: flex-start; gap: 6px; }
  .acct-f { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .acct-subrow > span:first-child { display: none; }
  .acct-namebox { flex-wrap: wrap; }
  .acct-namebox input { width: 100%; }
  .acct-namebox .acct-st { flex-basis: 100%; min-height: 18px; }
  /* ワークスペースの行は 2 段固定（1 行目＝名前・役割・状態／2 行目＝ボタン・UI文法 §44） */
  .acct-org { grid-template-columns: minmax(0, 1fr) auto auto; }
  .acct-oa { grid-column: 1 / -1; }
  .acct-oa:empty, .acct-os:empty { display: none; }
  .acct-dev { grid-template-columns: minmax(0, 1fr) auto; }
  .acct-dn { grid-column: 1 / -1; }
  .acct-ds { padding-left: 25px; }
  .acct-da { min-width: 0; }
  .acct-line { flex-wrap: wrap; }
}
/* プロフィール写真のクロップ編集（docs/account-settings-design.md v3 §2.3・PR 7・自前）: 既存の dialog の器・黒地のステージ・新しい色は足さない */
.dlg.avc { width: 400px; display: grid; gap: 10px; }
.avc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.avc-head h2 { margin: 0; }
.avc-x { width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
.avc-x:hover { background: var(--bg); color: var(--ink); }
.avc-stagebox { position: relative; width: min(80vw, 300px); aspect-ratio: 1; margin: 2px auto 0; border-radius: 12px; overflow: hidden; background: var(--cam-bg); }
.avc-stage { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.avc-stage:active { cursor: grabbing; }
.avc-stage:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.avc-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--cam-ink); font-size: 13px; pointer-events: none; }
.avc-loading[hidden] { display: none; }
.avc-tools { display: flex; align-items: center; gap: 8px; }
.avc-tools input[type=range] { flex: 1; min-width: 0; accent-color: var(--accent); }
.avc-step { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-size: 16px; line-height: 1; cursor: pointer; }
.avc-step:hover { border-color: var(--accent); color: var(--accent); }
.avc-hint { margin: 0; font-size: 12px; }
.avc-actions { display: flex; align-items: center; gap: 8px; }
.avc-actions .grow { flex: 1; }
.avc-msg { margin: 0; min-height: 18px; font-size: 12px; color: var(--down); } /* エラーの 1 行は常に確保（出ても動かない） */
@media (max-width: 700px) {
  /* スマホは下からの全幅シート（角丸 16px） */
  dialog.avc-dlg { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 16px 16px 0 0; }
  .dlg.avc { width: 100%; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
  .avc-actions { flex-wrap: wrap; }
  .avc-actions #avcPick { order: 3; flex-basis: 100%; }
  .avc-actions .grow { display: none; }
  .avc-actions [data-close], .avc-actions #avcSave { flex: 1; }
}
/* はじめの名前登録 #/welcome（docs/account-settings-design.md v3 §2.10）: ログインと同じ器・中は左揃えの 2 列（ラベル 56px） */
.welcome .wl-head { display: grid; gap: 2px; }
.wl-form { display: grid; gap: 14px; text-align: left; }
.wl-row { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 6px; align-items: start; }
.wl-k { color: var(--muted); font-size: 12.5px; padding-top: 3px; }
label.wl-k { padding-top: 11px; }
.wl-v { display: grid; gap: 4px; min-width: 0; }
.wl-mail { display: inline-flex; align-items: center; font-weight: 600; overflow-wrap: anywhere; }
.wl-mail .ico { color: var(--up); }
.wl-g, .wl-help, .wl-switch { font-size: 12px; }
.wl-v input { width: 100%; min-width: 0; }
.wl-msg { margin: 0; min-height: 18px; font-size: 12px; color: var(--down); } /* 結果の枠は常に確保（出ても動かない・UI文法 §146） */
button.linkish { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

/* ===== ワークスペース（部屋）の切替と部屋の外の画面（docs/auth-tenancy-design.md §6.4・§6.8・auth PR 3） ===== */
.nav a[hidden] { display: none !important; }
.org-pick, .org-state { max-width: 560px; margin: 24px auto; }
.org-pick-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.org-pick-list .btn { display: flex; justify-content: space-between; width: 100%; }
/* ===== 比較の表示（G-3・docs/period-compare-campaigns-design.md §3.3〜3.6）: 値の下に小さく ±%・グラフに破線・チップの欠け ===== */
.grid-sheet.with-cmp td.cmpcell, .grid-sheet.with-cmp th.cmpcell { height: 44px; line-height: 1.25; }
.grid-sheet .cmpcell .v { display: block; }
.grid-sheet .cmpcell .d { display: block; font-size: 11px; font-weight: 600; }
.d.neutral, .tipcmp .neutral { color: var(--muted); }
.linechart .ln.cmp { stroke-width: 1.5; stroke-dasharray: 3 3; opacity: .45; }
.chartlegend i.cmp { border-top: 1.5px dashed var(--muted); }
.cmp-chip.none { background: var(--bg); color: var(--muted); }
.tipcmp-h { color: var(--muted); font-weight: 400; }
.charttip .row .tipcmp { margin-left: 8px; color: var(--muted); font-size: 11px; }
.charttip .tiptable .tipcmp { display: block; color: var(--muted); font-size: 10.5px; }
/* ===== リード一覧（docs/leads-l1-l2-design.md §2.2・10/6 作り直し）。1 リード 1 行の表・状態は色付きのステータスボタン 1 つ ===== */
/* ツールバー（docs/lead-list-design.md §3.2）: ビュー＋札（左・1 行で横スクロール＋右端フェード）→ 期間 → 絞り込み → 列 → ⋯。行は増えない・44px・sticky */
.lead-bar { margin-bottom: 4px; flex-wrap: nowrap; min-height: 44px; gap: 8px; position: sticky; top: 0; z-index: 5; background: var(--bg); }
.lead-barl { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, black calc(100% - 24px), transparent); mask-image: linear-gradient(to right, black calc(100% - 24px), transparent); padding-right: 20px; }
.lead-barl::-webkit-scrollbar { display: none; }
.lead-views { display: inline-flex; gap: 4px; flex: none; }
.lead-view { white-space: nowrap; }
.lead-view .num { font-variant-numeric: tabular-nums; opacity: .8; }
.lead-fchip { display: inline-flex; align-items: center; gap: 2px; max-width: 280px; padding-right: 4px; flex: none; }
.lead-fchip .clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-fx { border: 0; background: none; color: inherit; font: inherit; font-weight: 700; padding: 0 4px; cursor: pointer; opacity: .85; }
.lead-fx:hover { opacity: 1; }
.lead-trashchip { flex: none; white-space: nowrap; }
.lead-rangef, .lead-filterbtn, .lead-colbtn, .lead-csvbtn, .lead-barmore { flex: none; white-space: nowrap; }
.lead-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 2px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700; }
/* 絞り込みパネル（PC＝ポップオーバー）・スマホ＝ボトムシート */
.lead-fpanel { position: fixed; z-index: 60; width: min(560px, calc(100vw - 16px)); max-height: min(70vh, 560px); display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.lead-fbody { overflow: auto; padding: 8px 12px; display: grid; gap: 4px; }
.lead-frow { display: grid; grid-template-columns: 72px 1fr; gap: 8px; align-items: start; padding: 6px 0; border-top: 1px solid var(--line); }
.lead-frow:first-child { border-top: 0; }
.lead-fk { font-size: 12px; font-weight: 700; color: var(--muted); padding-top: 4px; }
.lead-fv { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; min-width: 0; }
.lead-fopt { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; cursor: pointer; white-space: nowrap; min-height: 28px; }
.lead-fopt input { margin: 0; }
.lead-fsub { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: center; padding: 4px 0 0 12px; border-left: 2px solid var(--line); }
.lead-ffoot { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--line); }
.lead-ffoot .grow { flex: 1; }
.lead-sheet { position: fixed; left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-height: 82vh; border-radius: 14px 14px 0 0; }
.lead-sheet-h { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 4px 16px; }
.lead-sheet .lead-ffoot { justify-content: space-between; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
.lead-sheet .lead-ffoot .btn.primary { flex: 1; }
.lead-sheet-bg { position: fixed; inset: 0; z-index: 59; background: rgba(0, 0, 0, .35); }
@media (max-width: 700px) {
  .lead-bar { gap: 6px; }
  .lead-rangef, .lead-colbtn { display: none; } /* スマホは期間を絞り込みのシートに（PC は常設のまま）・列の表示はカードなので無し */
  .lead-fchip { display: none; } /* 札はシートで見える（1 行を折り返さない・§44） */
}
.lead-range { margin: 0 0 8px; font-size: 12px; min-height: 1em; }
/* 表の下の「もっと見る」の枠（行の ⋯ ボタン .lead-more と名前を分ける＝幅 28px が当たって縦書きになっていた・2026-10-21） */
.lead-more-wrap { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; padding: 10px 0 2px; }
.lead-more-wrap .btn { font-variant-numeric: tabular-nums; }
.lead-list-limit { margin: 0; padding: 10px 8px 2px; text-align: center; }
.lead-range { font-variant-numeric: tabular-nums; }
/* 詳細から戻ったとき、開いていた行を 1 秒だけ薄く光らせる（docs/research-lead-list-paging.md §5.2） */
.lead-row.lead-back > td { animation: lead-back 1s ease-out; }
@keyframes lead-back { from { background-color: color-mix(in srgb, var(--accent) 18%, transparent); } to { background-color: transparent; } }
@media (prefers-reduced-motion: reduce) { .lead-row.lead-back > td { animation: none; } }
.lead-panel { padding: 4px 6px; }
/* 器は 1 画面（§29・§83 高さの文法）: ページは動かさず、表の枠の中だけ縦横にスクロール。flex の高さ連鎖 layout → main → view → panel → 枠 */
@media (min-width: 701px) {
  .layout:has(> .main > .view[data-view="/leads"]) { height: 100vh; height: 100dvh; min-height: 0; grid-template-rows: minmax(0, 1fr); }
  .main:has(> .view[data-view="/leads"]) { display: flex; flex-direction: column; min-height: 0; padding-bottom: 14px; }
  .view[data-view="/leads"] { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .view[data-view="/leads"] > * { flex: none; }
  .view[data-view="/leads"] > .lead-panel { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
  .lead-panel > .lead-frame { flex: 1 1 0; min-height: 0; }
}
@media (min-width: 701px) and (max-width: 900px) {
  .layout:has(> .main > .view[data-view="/leads"]) { grid-template-rows: auto minmax(0, 1fr); }
}
.lead-frame { position: relative; display: flex; flex-direction: column; min-height: 0; }
.lead-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
/* 横の続きの影（§46）: 左に隠れている間は凍結した左 3 列（☐・受信日時・氏名）の右に・右に続きがある間は凍結した ⋯ の左に。
   ⋯ の列が無い member だけ右端のグラデーション（docs/lead-list-design.md §3.1） */
.lead-frame:not(.has-menu)::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 18px; pointer-events: none; z-index: 4;
  background: linear-gradient(to left, var(--edge), transparent); opacity: 0; transition: opacity .15s; }
.lead-frame.more-r:not(.has-menu)::after { opacity: 1; }
.lead-frame.more-l .c-name { box-shadow: 8px 0 8px -8px var(--edge); }
.lead-frame.more-r .c-menu { box-shadow: -8px 0 8px -8px var(--edge); }
/* 表: 内容の幅で並べる（auto）。書式が決まった列（日時・電話・チャネル・状態・活動）は切らない。
   自由入力の列は .clip の幅（--w-*＝つまみ）で … に切る。活動の列（width: 100%）が余りを埋める＝狭い画面では枠の中で横スクロール */
.lead-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.lead-table th { position: sticky; top: 0; z-index: 2; background: var(--panel); text-align: left; font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
/* 凍結（§3.1）: 左＝☐・受信日時・氏名（left は描画後に実測した --w-sel・--w-at）／右＝⋯ */
.lead-table th.c-sel, .lead-table th.c-at, .lead-table th.c-name, .lead-table th.c-menu { z-index: 3; }
.lead-table .c-sel { position: sticky; left: 0; width: 36px; min-width: 36px; padding: 0; text-align: center; }
.lead-table .c-at { position: sticky; left: var(--w-sel, 36px); }
.lead-table .c-name { position: sticky; left: calc(var(--w-sel, 36px) + var(--w-at, 100px)); }
.lead-table .c-menu { position: sticky; right: 0; width: 36px; min-width: 36px; padding: 0; text-align: center; }
.lead-table td.c-sel, .lead-table td.c-at, .lead-table td.c-name, .lead-table td.c-menu { z-index: 1; }
.lead-table th:has(> .lead-sort) { padding: 0; }
.lead-table td { padding: 6px 8px; border-top: 1px solid var(--line); white-space: nowrap; vertical-align: middle; background: var(--panel); }
/* 列の縦罫線（薄く・最後の列は無し・UI文法 リスト §169） */
.lead-table th, .lead-table td { border-right: 1px solid color-mix(in srgb, var(--line) 50%, transparent); }
.lead-table th:last-child, .lead-table td:last-child { border-right: 0; }
.lead-table .fill { width: 100%; }
.lead-table .clip { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-table .c-co > .clip { width: var(--w-co, 156px); }
.lead-table .c-name > .clip { width: var(--w-name, 104px); }
.lead-table .c-title > .clip { width: var(--w-title, 112px); }
.lead-table .c-mail > .clip { width: var(--w-mail, 172px); }
.lead-table .c-form > .clip { width: var(--w-form, 140px); }
.lead-table .c-src > .clip { width: var(--w-src, 160px); }
.lead-table tbody tr:first-child td { border-top: 0; }
.lead-table .num { font-variant-numeric: tabular-nums; }
.lead-table .c-at { color: var(--muted); }
.lead-table .nm { font-weight: 600; }
.lead-table .c-ch .tag { font-size: 11px; color: var(--muted); }
/* 見出し: クリックで並べ替え（▲ 昇順・▼ 降順）・自由入力の列は右端のつまみで幅を変える */
.lead-sort { display: flex; align-items: center; gap: 4px; padding: 8px; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; white-space: nowrap; }
.lead-table th > .lead-sort.clip { display: flex; box-sizing: content-box; }
.lead-sort .lbl { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.lead-sort .mk { flex: none; font-size: 9px; color: var(--accent); }
.lead-sort:hover { color: var(--ink); }
.lead-sort:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 6px; }
.lead-table th.sorted { color: var(--ink); }
.lead-grip { position: absolute; top: 0; right: 0; bottom: 0; width: 8px; cursor: col-resize; z-index: 1; touch-action: none; }
.lead-grip::after { content: ''; position: absolute; top: 25%; bottom: 25%; left: 6px; width: 1px; background: var(--line); }
.lead-grip:hover::after, .lead-table.resizing .lead-grip::after { background: var(--accent); width: 2px; left: 5px; }
.lead-table.resizing { cursor: col-resize; user-select: none; }
.lead-table.busy tbody { opacity: .55; }
/* 交互の背景（凍結の列も下が透けないように panel に重ねた不透明の合成）・ホバー・履歴を開いた行 */
.lead-table .lead-row.z > td { background: linear-gradient(var(--zebra), var(--zebra)) var(--panel); }
.lead-table .lead-row:hover > td { background: var(--bg); }
.lead-table .lead-row { cursor: pointer; }
.lead-table .lead-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
/* 状態: 色は記号（未対応＝warn・対応中／通電＝accent・アポ＝up・対象外＝muted） */
.lead-st { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid transparent; font: inherit; font-size: 12px; font-weight: 700; white-space: nowrap; }
.lead-st .dot, .lead-mi .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.lead-st.warn { background: var(--warn-soft); color: var(--warn); }
.lead-st.accent { background: var(--accent-soft); color: var(--accent); }
.lead-st.good { background: var(--up-soft); color: var(--up); }
.lead-st.muted { background: var(--bg); color: var(--muted); border-color: var(--line); }
button.lead-st { cursor: pointer; }
button.lead-st:hover { border-color: currentColor; }
button.lead-st:disabled { opacity: .55; cursor: progress; }
.lead-st .chev { font-size: 10px; opacity: .7; margin-left: -1px; }
/* 受信から 3 日超のまま未対応＝点を赤く（未対応の札だけ・注記は足さない） */
.lead-st.late .dot { background: var(--down); box-shadow: 0 0 0 2px var(--down-soft); }
.lead-menu { position: fixed; z-index: 60; min-width: 132px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 4px; display: grid; }
.lead-mi { display: flex; align-items: center; gap: 7px; padding: 7px 10px 7px 6px; border: 0; background: none; border-radius: 7px; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; text-align: left; }
.lead-mi:hover, .lead-mi:focus-visible { background: var(--accent-soft); outline: none; }
.lead-mi .ck { width: 14px; font-size: 12px; color: var(--accent); text-align: center; }
.lead-mi.warn .dot { color: var(--warn); } .lead-mi.accent .dot { color: var(--accent); } .lead-mi.good .dot { color: var(--up); } .lead-mi.muted .dot { color: var(--muted); }
.lead-scr { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-size: 11px; font-weight: 700; white-space: nowrap; vertical-align: middle; }
/* 温度感・最終対応・対象外の理由（docs/lead-detail-design.md §3.1〜§3.3）。温度感は色札（押せるのは編集者だけ）・最終対応は 14 日超で赤 */
.lead-table .c-heat { min-width: 84px; }
.lead-table .c-last { min-width: 88px; }
.lead-table td.c-heat .lead-heat { margin-left: 0; }
button.lead-heat { display: inline-flex; align-items: center; gap: 4px; height: 24px; font: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer; }
button.lead-heat:hover { border-color: currentColor; }
button.lead-heat:disabled { opacity: .55; cursor: progress; }
.lead-heat.h-none { color: var(--muted); border-style: dashed; background: none; }
.lead-heat .chev { font-size: 9px; opacity: .7; }
.lead-table td.ld-stale, .ld-stale { color: var(--down); font-weight: 600; }
.lead-rsn { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap; vertical-align: middle; }
.lead-mh { margin: 4px 10px 2px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.lead-mi .ck.rd { color: var(--accent); }
.lead-mfoot { display: flex; gap: 6px; padding: 6px 6px 4px; border-top: 1px solid var(--line); margin-top: 4px; }
.lead-reason { min-width: 200px; }
.lead-cols { min-width: 188px; } /* .lead-menu は position:fixed＝差し込み線（.lead-cdrop）の基準 */
.lead-barmore { min-width: 32px; padding-left: 8px; padding-right: 8px; font-weight: 700; }
/* チェック選択と一括バー（docs/lead-list-design.md §3.7）: 一括バーはツールバーの同じ 1 行を差し替える（行は増えない） */
.lead-barn, .lead-bulk { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.lead-barn[hidden], .lead-bulk[hidden] { display: none; }
.lead-bulk { padding: 4px 8px; border-radius: 10px; background: var(--accent-soft); }
.lead-bar .lead-bulk .grow { display: block; flex: 1; }
.lead-bulkn { white-space: nowrap; font-size: 13px; }
.lead-bulkq { font-size: 12.5px; font-weight: 600; color: var(--down); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.lead-bulk .btn { flex: none; white-space: nowrap; }
.btn.danger-ghost { color: var(--down); }
.lead-ckw { display: inline-grid; place-items: center; width: 36px; height: 32px; cursor: pointer; }
.lead-ck { margin: 0; width: 15px; height: 15px; cursor: pointer; accent-color: var(--accent); }
.lead-table .lead-row.picked > td { background: linear-gradient(var(--accent-soft), var(--accent-soft)) var(--panel); }
.ldp-band { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); }
.ldp-band.trash { background: var(--down-soft); color: var(--down); border-color: transparent; }
/* ⋯ と行のメニュー・担当（docs/lead-list-design.md §3.4・§3.6） */
.lead-more { width: 28px; height: 28px; display: inline-grid; place-items: center; border: 1px solid transparent; background: none; border-radius: 7px; color: var(--muted); cursor: pointer; padding: 0; font: inherit; font-size: 16px; font-weight: 700; line-height: 1; }
.lead-more:hover, .lead-more[aria-expanded="true"] { color: var(--ink); border-color: var(--line); background: var(--panel); }
.lead-more:disabled { opacity: .55; cursor: progress; }
.lead-msep { border: 0; border-top: 1px solid var(--line); margin: 4px 2px; }
a.lead-mi { text-decoration: none; }
.lead-mi.danger { color: var(--down); }
.lead-mi.danger:hover, .lead-mi.danger:focus-visible { background: var(--down-soft); }
.lead-owner { display: inline-flex; align-items: center; gap: 6px; max-width: 160px; height: 26px; padding: 0 8px 0 2px; border: 1px solid transparent; border-radius: 999px; background: none; font: inherit; font-size: 12.5px; color: var(--ink); white-space: nowrap; overflow: hidden; }
.lead-owner.ro { padding: 0; }
button.lead-owner { cursor: pointer; }
button.lead-owner:hover { border-color: var(--line); background: var(--panel); }
/* セル全体でプルダウンが開く（cellPickButton）: 余白に乗っても札を光らせる */
.lead-table td:is(.c-owner, .c-st, .c-heat):has(> :is([data-owner-btn], [data-st-btn], [data-heat-btn]):not(:disabled)) { cursor: pointer; }
.lead-table td.c-st:hover > button.lead-st, .lead-table td.c-heat:hover > button.lead-heat { border-color: currentColor; }
.lead-table td.c-owner:hover > button.lead-owner { border-color: var(--line); background: var(--panel); }
button.lead-owner:disabled { opacity: .55; cursor: progress; }
.lead-owner .chev { font-size: 9px; opacity: .6; color: var(--muted); }
.ld-avatar.sm { width: 20px; height: 20px; font-size: 11px; }
.ld-avatar.xs { width: 18px; height: 18px; font-size: 10px; }
.who-face { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); vertical-align: middle; } /* 活動を記録した人＝丸＋名前 */
.lead-mq { margin: 2px 4px 4px; padding: 5px 8px; font-size: 12.5px; }
.lead-mscroll { max-height: 260px; overflow: auto; display: grid; }
.lead-rsn.lbl-sales { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.lead-rsn.lbl-genuine { background: var(--up-soft); color: var(--up); border-color: transparent; }
.lead-cols .lead-mi { gap: 8px; font-weight: 500; }
.lead-cols input { margin: 0; }
.lead-crow { display: flex; align-items: center; border-radius: 7px; background: var(--panel); position: relative; }
.lead-crow .lead-mi { flex: 1 1 auto; min-width: 0; padding-left: 2px; }
.lead-crow.ro .lead-mi { padding-left: 6px; } /* member＝つまみなし（並びは見るだけ） */
.lead-cgrip { flex: none; width: 22px; align-self: stretch; display: inline-grid; place-items: center; border: 0; background: none; padding: 0; border-radius: 6px; font: inherit; font-size: 12px; letter-spacing: -2px; color: var(--muted); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.lead-cgrip:hover, .lead-cgrip:focus-visible { color: var(--ink); background: var(--accent-soft); outline: none; }
.lead-cols.is-dragging, .lead-cols.is-dragging * { cursor: grabbing; user-select: none; -webkit-user-select: none; }
.lead-crow.dragging { z-index: 2; box-shadow: var(--shadow); outline: 1px solid var(--line); opacity: .96; }
.lead-cdrop { position: absolute; left: 6px; right: 6px; height: 2px; border-radius: 2px; background: var(--accent); pointer-events: none; z-index: 3; }
.lead-cfoot { display: flex; justify-content: flex-end; padding: 4px 4px 2px; border-top: 1px solid var(--line); margin-top: 4px; }
.lead-creset { border: 0; background: none; padding: 4px 6px; border-radius: 6px; font: inherit; font-size: 11.5px; color: var(--muted); cursor: pointer; }
.lead-creset:hover:not(:disabled), .lead-creset:focus-visible { color: var(--accent); background: var(--accent-soft); outline: none; }
.lead-creset:disabled { opacity: .5; cursor: default; }
.lead-clive { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (pointer: coarse) { .lead-cgrip { width: 32px; font-size: 14px; } }
.lead-colbtn { white-space: nowrap; }
@media (pointer: coarse) { .lead-mi { min-height: 40px; } }
/* スマホ: 横スクロールさせず 2 行のカードに折り返す（1 行目＝☐・日時・氏名・対応状況・温度感・⋯／2 行目＝会社・担当・最終対応・流入元・チャネル。docs/lead-list-design.md §3.13） */
@media (max-width: 700px) {
  .lead-table, .lead-table tbody { display: block; }
  .lead-table colgroup, .lead-table thead { display: none; }
  .lead-table tr.lead-row { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; padding: 8px 4px; border-top: 1px solid var(--line); }
  .lead-table tbody tr.lead-row:first-child { border-top: 0; }
  .lead-scroll { overflow: visible; }
  .lead-frame::after { display: none; }
  .lead-table tr.lead-row > td { border: 0; padding: 0; min-width: 0; max-width: 100%; font-size: 12.5px; }
  .lead-table .lead-row > td, .lead-table .lead-row.z > td, .lead-table .lead-row:hover > td { background: none; box-shadow: none; }
  .lead-table td.c-sel, .lead-table td.c-at, .lead-table td.c-name, .lead-table td.c-menu { position: static; }
  .lead-table td.c-sel, .lead-table td.c-menu { width: auto; min-width: 0; }
  .lead-table td.fill { width: auto; }
  .lead-table tr.lead-row > td > .clip { width: auto; }
  .lead-table .lead-row.z { background: linear-gradient(var(--zebra), var(--zebra)) var(--panel); }
  .lead-table .lead-row:hover { background: var(--bg); }
  .lead-table .lead-row.src-on { background: var(--accent-soft); }
  .lead-table td.c-sel { order: 1; } .lead-table td.c-at { order: 2; } .lead-table td.c-name { order: 3; flex: 1 1 0; font-size: 13px; font-weight: 600; }
  .lead-table td.c-st { order: 4; } .lead-table td.c-heat { order: 5; min-width: 0; } .lead-table td.c-menu { order: 6; }
  .lead-table td.c-co, .lead-table td.c-owner, .lead-table td.c-last, .lead-table td.c-src, .lead-table td.c-ch,
  .lead-table td.c-title, .lead-table td.c-mail, .lead-table td.c-tel, .lead-table td.c-form { order: 8; color: var(--muted); min-width: 0; }
  .lead-table tr.lead-row::after { content: ''; order: 7; flex-basis: 100%; height: 0; } /* 2 行目の頭で折り返す */
  .lead-table td.muted:empty { display: none; }
  /* 1 行目に氏名の幅を残す（☐ と ∨ を詰める）・選んだ行は行ごと塗る（td ごとだと隙間が抜ける） */
  .lead-table td.c-name { min-width: 4.5em; }
  .lead-table .lead-ckw { width: 24px; }
  .lead-table td.c-st .chev, .lead-table td.c-heat .chev { display: none; }
  .lead-table .lead-row.picked > td { background: none; }
  .lead-table .lead-row.picked { background: var(--accent-soft); }
}

/* 流入元（セルはリンク風のボタン・開いている行は薄く印）と右のドロワー（暗いオーバーレイなし・見出しは固定で下だけスクロール） */
.lead-src { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-align: left; max-width: 100%; }
.lead-src:hover { text-decoration: underline; }
.lead-src:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.lead-table .lead-row.src-on > td { background: var(--accent-soft); }
.lead-table .lead-row.src-on .lead-src { font-weight: 600; }
@media (max-width: 700px) { .lead-table .lead-row.src-on > td { background: none; } } /* スマホは行で塗る（td ごとだと隙間が抜ける） */
.lead-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 55; width: min(400px, 100%); display: flex; flex-direction: column;
  background: var(--panel); border-left: 1px solid var(--line); box-shadow: var(--shadow); outline: none; }
.ld-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 12px 12px 18px; border-bottom: 1px solid var(--line); }
.ld-head h3 { margin: 0; font-size: 15px; }
.ld-head h3 { margin-right: auto; }
.ld-nav { display: inline-flex; align-items: center; gap: 2px; }
.ld-pn { font-size: 15px; }
.ld-pn:disabled { opacity: .35; cursor: default; }
.lead-name { color: var(--accent); text-decoration: none; }
.lead-name:hover { text-decoration: underline; }
.ld-x { width: 32px; height: 32px; border: 1px solid transparent; border-radius: 8px; background: none; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
.ld-x:hover, .ld-x:focus-visible { color: var(--ink); border-color: var(--line); outline: none; }
.ld-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px 18px 24px; display: flex; flex-direction: column; gap: 16px; }
.ld-banner { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg); }
.ld-banner img { display: block; width: 100%; height: auto; max-height: 360px; object-fit: contain; } /* 大きい画像（1080px・縦長も）でも枠に収める・縦横比はそのまま */
.ld-dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 8px 14px; font-size: 13px; }
.ld-dl dt { color: var(--muted); font-size: 12px; }
.ld-dl dd { margin: 0; overflow-wrap: anywhere; }
.ld-perf h4 { margin: 0 0 8px; font-size: 12.5px; }
.ld-perf h4 .muted { font-weight: 400; margin-left: 4px; }
.ld-perf dl { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ld-perf dl > div { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.ld-perf dt { font-size: 11.5px; color: var(--muted); }
.ld-perf dd { margin: 2px 0 0; font-size: 16px; font-weight: 700; }
.ld-link { font-size: 13px; color: var(--accent); text-decoration: none; align-self: flex-start; }
.ld-link:hover { text-decoration: underline; }
@media (max-width: 700px) { .lead-drawer { width: 100%; border-left: 0; } }
/* 通知の本文のプレビュー（Chatwork 風・docs/notify-settings-ui-design.md §4.3） */
.pv-drawer { width: min(480px, 100%); }
.cw-preview { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.7; }
.cw-info { border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; margin: 4px 0; background: var(--panel); }
.cw-title { font-weight: 700; margin: -8px -12px 8px; padding: 6px 12px; border-bottom: 1px solid var(--line); background: var(--bg); border-radius: 6px 6px 0 0; }
.cw-hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.cw-qt { border-left: 3px solid var(--line); padding-left: 10px; color: var(--muted); }
.cw-code { font-family: ui-monospace, Menlo, monospace; font-size: 12px; background: var(--bg); padding: 6px 8px; border-radius: 6px; }

/* ===== 施策（Phase D・public/ops.js・chart.js の印） ===== */
.charttip .tipops { border-top: 1px solid var(--line); margin-top: 5px; padding-top: 4px; max-width: 320px; }
.charttip .tipops .row { white-space: normal; align-items: baseline; }
.charttip .opsw { flex: 0 0 auto; width: 0; height: 10px; border-left: 1px solid var(--ink); opacity: .5; }
.oplist { display: flex; flex-direction: column; }
.oprow { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 11px 4px; border-top: 1px solid var(--line); font-size: 13px; }
.oprow:first-child { border-top: 0; }
.oprow.due { background: var(--warn-soft); border-radius: 8px; border-top-color: transparent; }
.oprow .op-d { color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 1px; }
.oprow .op-t { font-weight: 600; }
.oprow .op-target { font-weight: 700; color: var(--muted); margin-right: 8px; font-size: 12px; }
.oprow .op-why, .oprow .op-meta, .oprow .op-out { font-size: 12px; color: var(--muted); margin-top: 3px; }
.oprow .op-out { color: var(--ink); }
.oprow .op-rv { font-size: 12.5px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.oprow .op-act { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.p-head.op-sep { margin-top: 18px; }
.opdlg .dlg { width: 560px; }
.opdlg .formgrid label.fw-full { flex: 1 1 100%; }
.opdlg .formgrid label[hidden] { display: none; }
.opdlg textarea { width: 100%; resize: vertical; font: inherit; }
.opdlg .op-rv { color: var(--ink); font-size: 12.5px; }
.opdlg label.radio { flex-direction: row; color: var(--ink); }
.cp-exp-hrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.cp-exp-hrow .cp-exp-h { margin-bottom: 0; }
@media (max-width: 760px) {
  .oprow { grid-template-columns: 44px minmax(0, 1fr); }
  .oprow .op-act { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 700px) { .lead-acts { flex-basis: 100%; } .lead-acts .btn { flex: 1; } }

/* 内訳 3 軸（Phase I・public/breakdown.js）: 選択は 1 つ・値の行は親の行の下に字下げ */
.bd-pick { display: inline-flex; align-items: center; gap: 6px; }
.bd-pick select { height: 28px; padding: 0 8px; font-size: 13px; }
.bd-note { font-size: 12px; }
.grid-sheet tr.sub.bd td.bd-key { padding-left: 28px; font-weight: 500; color: var(--muted); }

/* ----- 推移の操作の行（ACOLYTE の型・docs/chart-acolyte-style-design.md → docs/chart-trend-review.md §2）: 並べる・大きく共通の 28px の 1 行。
   左＝（大きくのとき）閉じる ⤡＋指標タブ／右＝系列チップ＋印の凡例 ----- */
.chartbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; min-height: 28px; margin-bottom: 4px; }
.chartbar .chartlegend { margin: 0 0 0 auto; }
.chartback { flex: none; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; padding: 0;
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--muted); cursor: pointer; }
.chartback:hover { color: var(--accent); border-color: var(--accent); }
.chartback:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chartback svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2.2; }
.chartbar .chartback + .mtabs { margin-left: -6px; }
.mtabs { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 2px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
.mtabs button { border: 0; background: none; color: var(--muted); font: inherit; font-size: 12px; font-weight: 600; line-height: 22px; padding: 0 9px; border-radius: 8px; cursor: pointer; }
.mtabs button:hover { color: var(--ink); }
.mtabs button[aria-selected="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.mtabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.chartlegend .skey { display: inline-flex; align-items: center; white-space: nowrap; border: 0; background: none; padding: 0; font: inherit; font-size: 12px; color: var(--muted); cursor: pointer; }
.chartlegend .skey:hover { color: var(--ink); }
.chartlegend .skey[aria-pressed="false"] { opacity: .45; }
.chartlegend .skey[aria-pressed="false"] i.bar { background: transparent; }
.chartlegend .skey:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.chartlegend i.bar { width: 10px; height: 10px; border: 1px solid var(--ink); border-radius: 2px; background: var(--ink); opacity: .3; box-sizing: border-box; }
.chartlegend i.bar.meta { border-color: var(--accent); background: var(--accent); opacity: .5; }
.chartlegend i.bar.google { border-color: var(--muted); background: var(--muted); opacity: .5; }
.linechart .bar.total { fill: var(--ink); opacity: .22; }
.linechart .bar.meta { fill: var(--accent); opacity: .35; }
.linechart .bar.google { fill: var(--muted); opacity: .35; }
.linechart .vlabel { fill: var(--muted); font-size: 10.5px; text-anchor: middle; font-variant-numeric: tabular-nums; pointer-events: none; }

/* 施策の帯レーン（横軸の下・色は媒体の記号色） */
.linechart .opg { cursor: pointer; outline: none; }
.linechart .opg .opband { fill-opacity: .14; }
.linechart .opg:hover .opband, .linechart .opg:focus-visible .opband { fill-opacity: .26; }
.linechart .opg:focus-visible .opband { stroke: var(--accent); stroke-width: 1.5; }
.linechart .opg.meta path { fill: var(--accent); } .linechart .opg.google path { fill: var(--muted); } .linechart .opg.all path { fill: var(--ink); }
.linechart .optext { font-size: 10.5px; font-weight: 600; pointer-events: none; }
.linechart .opg.meta text { fill: var(--accent); } .linechart .opg.google text { fill: var(--muted); } .linechart .opg.all text { fill: var(--ink); }
.linechart .opmore { cursor: pointer; outline: none; }
.linechart .opmore rect { fill: var(--ink); fill-opacity: .1; }
.linechart .opmore text { fill: var(--ink); font-size: 10px; font-weight: 700; pointer-events: none; }
.linechart .opmore:hover rect, .linechart .opmore:focus-visible rect { fill-opacity: .22; stroke: var(--accent); stroke-width: 1.5; }
.charttip.pin { pointer-events: auto; white-space: normal; padding-right: 28px; }
.charttip .tip-x { position: absolute; top: 4px; right: 6px; border: 0; background: none; color: var(--muted); font-size: 15px; line-height: 1; cursor: pointer; padding: 2px 4px; }
.charttip .tip-x:hover { color: var(--ink); }
.charttip .oppop { max-width: 340px; }
.charttip .oppop .row { white-space: normal; display: block; }
.charttip .oppop a { color: var(--accent); text-decoration: none; }
.charttip .oppop a:hover { text-decoration: underline; }
.charttip .oplist { max-width: 340px; max-height: min(60vh, 420px); overflow-y: auto; }
.charttip .oplist details { border-top: 1px solid var(--line); padding: 5px 0; }
.charttip .oplist summary { cursor: pointer; font-weight: 700; }
/* ===== 招待とメンバー（docs/auth-tenancy-design.md §6.3・§6.5・auth PR 4） ===== */
.mwrap { overflow-x: auto; margin: 10px 0 4px; }
table.mtable td, table.mtable th { text-align: left; white-space: nowrap; }
table.mtable select { height: 32px; padding: 0 10px; font-size: 13px; }  /* 10/19: 全体の padding 10px のままだと 28px の中で文字が見切れた */
h3.msec { font-size: 14px; margin: 18px 0 6px; }
.rowline .grow { flex: 1; }
.consent { display: flex; gap: 8px; align-items: flex-start; text-align: left; background: var(--bg); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; line-height: 1.7; }
.consent input { margin-top: 4px; }
.auth-card h3 { margin: 0; font-size: 16px; }

/* ===== ワークスペースの作成・運営・ワークスペースのタブ（auth PR 5） ===== */
.neworg { max-width: 560px; display: grid; gap: 10px; }
.neworg h2 { margin: 0; font-size: 18px; }
.neworg-form { display: grid; gap: 12px; }
.neworg-form label { display: grid; gap: 6px; font-size: 13px; }
.neworg-note { max-width: 560px; margin-top: 14px; }
.admset { display: grid; gap: 10px; max-width: 560px; }
.admset label { display: grid; gap: 6px; font-size: 12.5px; color: var(--muted); }
table.mtable td.acts { display: flex; gap: 6px; justify-content: flex-end; }
table.mtable td.num { text-align: right; font-variant-numeric: tabular-nums; }
.view-title .grow { flex: 1; }
.wsgrid { display: grid; gap: 18px; max-width: 640px; }
.wsgrid p { margin: 4px 0; }

/* ===== 左下のアカウントメニュー（org.js・2026-10-06・ACOLYTE の account-menu の型）。色は既存のトークンだけ =====
   見出し（ワークスペース）と項目は形で区別（設計思想 §162）: 見出し＝小さく太く・項目より濃くしない・上の余白＞下／項目＝左にアイコン列（✓・歯車…）＋文字が見出しより右から */
.acct-slot { margin-top: auto; position: relative; }
.acct-slot[hidden] { display: none; }
.am-btn { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; padding: 7px 8px; border: 1px solid transparent; border-radius: 10px;
  background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.am-btn:hover, .am-btn[aria-expanded="true"] { background: var(--bg); border-color: var(--line); }
.am-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.am-av { flex: none; width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.am-ini { display: inline-grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 12.5px; font-weight: 700; line-height: 1; }
.am-who .am-av { width: 32px; height: 32px; }
.am-txt { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.35; }
.am-nm { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-ctx { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-chev { width: 14px !important; height: 14px !important; color: var(--muted); }
.am-menu { position: absolute; bottom: calc(100% + 6px); left: 0; right: 0; z-index: 40; min-width: 200px; max-height: calc(100vh - 120px); overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; gap: 1px; }
.am-menu[hidden] { display: none; }
.am-who { display: flex; align-items: center; gap: 10px; padding: 6px 8px; }
.am-sep { border: 0; border-top: 1px solid var(--line); margin: 4px 2px; }
.am-sec { display: flex; flex-direction: column; gap: 1px; }
.am-h { padding: 8px 10px 3px; font-size: 11px; font-weight: 700; color: var(--muted); }
.am-item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 10px; border: 0; border-radius: 7px; background: none;
  color: var(--ink); font: inherit; font-size: 13px; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer; }
.am-item .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-item .tag { flex: none; font-size: 11px; color: var(--muted); }
.am-ic { width: 15px !important; height: 15px !important; color: var(--muted); }
.am-item:hover, .am-item:focus-visible { background: var(--accent-soft); color: var(--accent); outline: none; }
.am-item:hover .am-ic, .am-item:focus-visible .am-ic { color: var(--accent); }
.am-check { visibility: hidden; }
.am-org.on .am-check { visibility: visible; color: var(--accent); }
.am-org.on .nm { font-weight: 700; }
.am-filter { margin: 2px 4px 6px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; }
.am-filter:focus { outline: none; border-color: var(--accent); }
.am-orgs { display: flex; flex-direction: column; gap: 1px; }
.am-orgs.scroll { max-height: 240px; overflow-y: auto; }
.am-none { margin: 0; padding: 6px 10px; font-size: 12.5px; color: var(--muted); }
/* 900px 以下（上の横帯）: 右端にアバターだけ・メニューは下に開いて右に揃える（節の並びは同じ） */
@media (max-width: 900px) {
  .acct-slot { margin-top: 0; flex: none; }
  .am-btn { padding: 3px; gap: 0; border-radius: 50%; }
  .am-btn .am-txt, .am-btn .am-chev { display: none; }
  .am-menu { position: fixed; top: 48px; bottom: auto; left: auto; right: 12px; width: min(280px, calc(100vw - 32px)); max-height: calc(100vh - 64px); }
}

/* キャンペーン／クリエイティブ: 行のどこを押しても展開（10/7） */
.cp-sheet tr.cp-row[data-key] { cursor: pointer; }

/* 営業の印のカード（public/leads-screen.js・docs/wp-forms-design.md §6.3） */
.screen-tbl th[scope="row"] { text-align: left; font-weight: 600; white-space: normal; }
.screen-tbl td .hint { margin-top: 4px; white-space: normal; max-width: 280px; }
#scrPhrases { width: 100%; box-sizing: border-box; font-size: 12.5px; }

/* ===== 名刺スキャン（public/cards.js・docs/business-card-design.md v2 §3・PR 4） =====
   確認シート: スマホ（899px 以下）は下から出るシート（期間パネルと同じ作り）・PC は右のドロワー。
   要確認の色は琥珀（文字はライト 7.1:1・ダーク 8.6:1・枠は --warn）。温度感の「今すぐ商談」は強調色 */
.cd-panel { display: flex; flex-direction: column; gap: 14px; max-width: 560px; margin: 14px 2px 0; }
.cd-evrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cd-evbtn { flex: 1 1 auto; justify-content: space-between; min-height: 44px; text-align: left; }
.cd-evbtn svg { width: 14px; height: 14px; }
.cd-shoot { min-height: 88px; font-size: 17px; gap: 10px; border-radius: 14px; }
.cd-shoot svg { width: 26px; height: 26px; }
.cd-shoot[aria-disabled="true"], .cd-shoot.busy { opacity: .55; pointer-events: none; }
.cd-switch { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.cd-switch input { width: 18px; height: 18px; }
.cd-count { margin: 0; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cd-recent h4 { margin: 0 0 6px; font-size: 12.5px; color: var(--muted); }
.cd-rc { font-size: 13px; padding: 6px 0; border-top: 1px solid var(--line); }
.cd-hb { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; border: 1px solid var(--line); color: var(--muted); }
.cd-hb.h-hot { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.cd-hb.h-warm { color: var(--ink); }
.cd-back { position: fixed; inset: 0; z-index: 59; background: rgba(0, 0, 0, .28); }
.cd-sheet { position: fixed; top: 0; right: 0; bottom: 0; z-index: 60; width: min(440px, 100%); display: flex; flex-direction: column;
  background: var(--panel); color: var(--ink); border-left: 1px solid var(--line); box-shadow: var(--shadow); }
.cd-sheet-head { flex: none; display: grid; grid-template-columns: 36px 1fr 36px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.cd-sheet-head h3 { margin: 0; font-size: 15px; text-align: center; }
.cd-sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 18px; display: flex; flex-direction: column; gap: 12px; }
.cd-sheet-foot { flex: none; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.cd-go { min-height: 48px; font-size: 15px; }
.cd-sub { display: flex; justify-content: space-between; gap: 8px; }
.cd-imgs { display: flex; gap: 8px; align-items: flex-start; }
.cd-img { border: 1px solid var(--line); border-radius: 10px; padding: 0; background: var(--bg); overflow: hidden; cursor: zoom-in; flex: 1 1 auto; }
.cd-img.back { flex: 0 0 30%; }
.cd-img img { display: block; width: 100%; height: auto; max-height: 200px; object-fit: contain; }
.cd-img.zoom { position: fixed; inset: 0; z-index: 70; border-radius: 0; background: rgba(0, 0, 0, .9); cursor: zoom-out; touch-action: pinch-zoom; }
.cd-img.zoom img { max-height: 100vh; height: 100%; }
.cd-f { display: flex; flex-direction: column; gap: 4px; }
.cd-l { font-size: 12px; font-weight: 600; color: var(--muted); }
.cd-l .req { color: var(--down); }
.cd-f input, .cd-f select { width: 100%; min-height: 42px; padding: 8px 10px; font: inherit; font-size: 16px; color: var(--ink); background: var(--panel);
  border: 1px solid var(--line); border-radius: 9px; }
.cd-f input:focus-visible, .cd-f select:focus-visible { outline: 2px solid var(--accent); outline-offset: -1px; }
/* 日付欄のはみ出しの直し（docs/event-picker-design.md §3.8）: WebKit は appearance 未指定の date に「最も長い日付の幅」を min-width（content-box）で強制する */
.cd-f input[type="date"] { -webkit-appearance: none; appearance: none; display: block; box-sizing: border-box; width: 100%; max-width: 100%; min-width: 0; text-align: left; }
.cd-f input[type="date"]::-webkit-date-and-time-value { text-align: left; }
.cd-f.unsure input { border-color: var(--warn); border-width: 2px; background: var(--warn-soft); }
.cd-badge { display: inline-block; margin-left: 4px; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 700; color: var(--unsure-ink); background: var(--warn-soft); border: 1px solid var(--warn); }
.cd-f.has-err input { border-color: var(--down); }
.cd-err { font-size: 12px; color: var(--down); }
.cd-heat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cd-heat-b { min-height: 48px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.cd-heat-b:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.cd-heat-b.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.cd-heat-b.h-cold.on { background: var(--muted); border-color: var(--muted); color: var(--panel); }
.cd-f.has-err .cd-heat-b { border-color: var(--down); }
.cd-sep { border: 0; border-top: 1px solid var(--line); margin: 2px 0; width: 100%; }
.cd-msg { margin: 0; font-size: 13px; padding: 8px 10px; border-radius: 9px; background: var(--accent-soft); }
.cd-msg.err { background: var(--down-soft); color: var(--down); }
.cd-extras .fbody { display: flex; flex-direction: column; gap: 10px; padding-left: 0; }
.cd-evlist { display: flex; flex-direction: column; }
/* イベントを選ぶシート（docs/event-picker-design.md §3.8）: E1＝区分の見出し・行の右端に ✓／E2＝種類 4 ボタン／本体 M0 のカード */
.cd-ev { display: grid; grid-template-columns: auto 1fr 20px; gap: 2px 10px; min-height: 44px; padding: 12px 6px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.cd-ev .muted { grid-column: 2; font-size: 12px; }
.cd-ev.on { background: var(--accent-soft); border-radius: 8px; }
.cd-ev:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 8px; }
.cd-ev-k { font-size: 12px; font-weight: 700; color: var(--muted); }
.cd-ev-n { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.cd-ev-ck { grid-column: 3; grid-row: 1 / span 2; align-self: center; text-align: center; font-weight: 700; color: var(--accent); }
.cd-evgroup { margin: 0; padding: 10px 6px 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.cd-evgroup:first-child { padding-top: 0; }
.cd-evnone { margin: 0; padding: 12px 6px; }
.cd-evsearch { position: sticky; top: -14px; z-index: 1; margin: -14px 0 0; padding: 14px 0 4px; background: var(--panel); }
.cd-evsearch input { width: 100%; min-width: 0; box-sizing: border-box; min-height: 42px; padding: 8px 10px; font: inherit; font-size: 16px; color: var(--ink); background: var(--panel);
  border: 1px solid var(--line); border-radius: 9px; }
.cd-evsearch input:focus-visible { outline: 2px solid var(--accent); outline-offset: -1px; }
.cd-evform { display: flex; flex-direction: column; gap: 10px; }
.cd-kind { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.cd-kind-b { min-width: 0; min-height: 48px; padding: 6px 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.cd-kind-b:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.cd-kind-b.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.cd-kind-b:disabled, .cd-f input:disabled { opacity: .6; cursor: default; }
.cd-empty { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.cd-empty p { margin: 0; font-size: 13px; }
@media (max-width: 899px) {
  .cd-sheet { left: 0; right: 0; top: auto; width: auto; max-height: 92vh; border-left: 0; border-radius: 14px 14px 0 0; }
}

/* 名刺のリード（一覧の温度感・ドロワーの中身・イベントのカード・docs/business-card-design.md §3.5・PR 5） */
.lead-heat { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; vertical-align: middle;
  border: 1px solid var(--line); color: var(--ink); }
.lead-heat.h-hot { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.lead-heat.h-cold { color: var(--muted); }
.ld-card h4 { margin: 0 0 8px; font-size: 12.5px; }
.ld-card .hint { margin-top: 6px; }
.ev-row { flex-wrap: wrap; }
.ev-row.ended .nm { color: var(--muted); }
.ev-kind { font-size: 12px; font-weight: 700; color: var(--muted); }
.ev-cards { flex-basis: 100%; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
/* 名刺の訂正（ドロワーの全表示の中・PR 6） */
.ld-fix { display: flex; flex-direction: column; gap: 8px; }
.ld-fix-f { display: grid; grid-template-columns: 72px 1fr; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted); }
.ld-fix-f input, .ld-fix-f select { width: 100%; min-width: 0; }
.cd-pending { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--unsure-ink); font-weight: 700; font-size: 13px; }
.view-title .cd-entry { margin-left: auto; align-self: center; }
/* 名刺の画像（ドロワーの「名刺の中身」の中・PR 9）。拡大は確認シートの .cd-img.zoom を流用 */
.ld-cardimg { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.ld-cardimg h4 { margin: 0; font-size: 12.5px; }
.ld-cardimg .ld-img { width: 100%; }
.ld-cardimg .ld-img img { max-height: 240px; }
/* 名刺の画像のライトボックス（docs/lead-detail-design.md §8 L-3・UI文法 §111）: 背景・Esc・× で閉じる。流れの外（fixed）＝本文を動かさない */
.ld-lb { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; background: rgba(10, 15, 25, .88); overscroll-behavior: contain; }
.ld-lb-bar { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 14px; color: rgba(255, 255, 255, .92); font-size: 13px; font-weight: 600; }
.ld-lb-t { margin-right: auto; }
.ld-lb-x { color: rgba(255, 255, 255, .85); }
.ld-lb-x:hover, .ld-lb-x:focus-visible { color: rgba(255, 255, 255, 1); border-color: rgba(255, 255, 255, .4); }
.ld-lb-stage { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 8px 16px 24px; cursor: zoom-out; touch-action: pinch-zoom; }
.ld-lb-stage img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; cursor: default; }

/* リードの見出しまわりを詰める（10/12 翔さん「間延び」）: ステータス行は見出しの横・絞り込みは 1 行・空の注記は出さない */
.view[data-view="/leads"] { gap: 10px; }
.view-title[data-status-inline] { align-items: center; flex-wrap: wrap; }
.view-title[data-status-inline] .statusline { margin: 0; flex: 1 1 auto; min-width: 0; }
.lead-bar { gap: 6px 8px; margin-bottom: 0; }
.lead-bar .grow { display: none; }
.lead-bar .chips { gap: 4px; margin-right: auto; }
.lead-bar .chips button { padding-left: 9px; padding-right: 9px; }
.lead-bar .segfield { gap: 4px; }
.lead-bar select { max-width: 7em; }
.lead-bar #lstEv { max-width: 8em; }
.lead-range:empty { display: none; }

/* ===== リードの詳細（docs/lead-detail-design.md v4 §3.5・§3.6・§3.12・§3.14 (d)）。1 行目＝名札（名前・会社 ・ 役職・↑↓＝docs/lead-detail-v5-design.md §3.3・電話とメールは左列の「この人」）／2 行目＝対応状況・温度感・担当・次回（罫線 1 本の細い行）。
   本文は 2 列（docs/lead-detail-v6-design.md §3.5: 主 1fr＝この人＋会社｜脇 340px＝活動 → 進み具合 → 流入元 → 名刺の畳み）。≤1100px は脇 300px（順は入れ替えない）・≤720px は 1 列で上に名前と電話を固定 ===== */
.ldp { display: flex; flex-direction: column; gap: 12px; padding-bottom: 24px; }
.ldp-top { display: flex; align-items: center; gap: 12px; min-height: 40px; }
.ldp-back { flex: none; color: var(--muted); text-decoration: none; font-size: 13px; white-space: nowrap; }
.ldp-back:hover { color: var(--ink); }
.ldp-id { display: flex; align-items: baseline; gap: 10px; flex: 0 1 auto; min-width: 0; }
.ldp-id h2 { margin: 0; font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ldp-sub { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ldp-top .ldp-call { display: none; } /* 大きな「電話をかける」はスマホの固定帯だけ（論点 6）。a.btn（inline-flex）に勝つよう .ldp-top を前に付ける */
.ldp-nav { display: inline-flex; gap: 4px; flex: none; }
.ldp-head { padding: 8px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; }
/* v4: 2 行目は panel の枠でなく罫線 1 本の細い行（UI 文法 §64・review M4） */
.ldp-head.ldp-head--bar { padding: 6px 0; border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; background: none; box-shadow: none; min-height: 36px; }
.ldp-facts { margin: 0; display: contents; }
.ldp-facts > div { display: flex; align-items: center; gap: 8px; min-height: 28px; }
.ldp-facts dt { font-size: 12px; color: var(--muted); white-space: nowrap; }
.ldp-facts dd { margin: 0; display: flex; align-items: center; gap: 4px; font-size: 13px; min-width: 0; }
.ldp-facts .lead-heat, .ldp-facts .lead-scr, .ldp-facts .lead-rsn { margin-left: 0; }
/* メニューを開く 3 つ（対応状況・温度感・担当）は同じ札の形（review M2）。担当なしは点線。閲覧者の .ro は枠なしのまま */
.ldp-facts .lead-owner[data-owner-btn] { border-color: var(--line); padding: 0 8px; }
.ldp-facts .lead-owner[data-owner-btn]:not(:has(.ld-avatar)) { border-style: dashed; }
.ldp-owner { font-weight: 600; }
.ldp-k { font-size: 12px; color: var(--muted); white-space: nowrap; }
.ldp-next { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-height: 28px; margin-left: auto; font-size: 13px; }
.ldp-next.over .ldp-nextbtn, .ldp-over { color: var(--down); font-weight: 700; }
.ldp-facts .lead-heat, .ldp-facts .lead-st, .ldp-facts .lead-owner, button.ldp-nextbtn { height: 26px; }
.ldp-nextbtn { display: inline-flex; align-items: center; gap: 4px; max-width: 280px; margin-left: 0; font-size: 12px; overflow: hidden; }
.ldp-nextbtn .ldp-nt { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.lead-heat.ldp-nextbtn.h-none, span.lead-heat.h-none { color: var(--muted); border-style: dashed; background: none; }
.ldp-next.editing { flex-basis: 100%; margin-left: 0; align-items: flex-start; flex-direction: column; }
.ldp-nextform { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ldp-nextform input[type="text"] { width: min(360px, 100%); }
.ldp-sum { display: none; }
.ldp-srcl { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-align: left; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.ldp-srcl.ro { color: inherit; cursor: default; }
.ldp-srcl.ro:hover { text-decoration: none; }
/* 「この人」の節（docs/lead-detail-v5-design.md §3.4・§3.5）: 見出しの右上に［直す］1 つ・.pl の行（電話・メールの右端に ⧉）。
   直すと節全体がラベル付きの行のフォーム（.pl-form・ラベル 84px・input は行の高さ 30px）。保存／やめるは右下 */
.ldp-sechead { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; margin-bottom: 4px; }
.ldp-sec .ldp-sechead h3 { margin: 0; }
.ldp-person > summary [data-contact-edit] { margin-left: auto; flex: none; }
.ldp-person:not([open]) > summary [data-contact-edit] { display: none; }
.ldp-person > .ldp-foldbody { gap: 0; }
.ldp-person .pl > .v a { color: var(--accent); text-decoration: none; }
.ldp-person .pl > .v a:hover { text-decoration: underline; }
.ldp-person[open] .ldp-fold-peek { display: none; }
/* v5 §3.4 論点 3 A: 末尾の「▸ 追加回答」（行の高さ・12px 太字＝畳みの小見出し）。開くと .pl の行 */
.ldp-person .ldp-fold[data-fold="answers"] > summary { min-height: var(--pl-h); align-items: center; font-size: 12px; font-weight: 600; color: var(--muted); }
.ldp-person .ldp-fold[data-fold="answers"][open] > summary { margin-bottom: 2px; }
.ldp-person .ldp-fold[data-fold="answers"] .ldp-foldbody { gap: 0; }
.ldp-ans-msg { margin: 0; font-size: 12px; min-height: var(--pl-h); display: flex; align-items: center; }
.ldp-cform { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.pl-form { row-gap: 2px; }
.pl-form > .k label { cursor: default; }
.pl-form > .v input { width: 100%; height: var(--pl-h); box-sizing: border-box; padding: 0 8px; font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); min-width: 0; }
.ldp-cbtns { display: flex; justify-content: flex-end; gap: 6px; }
.ldp-cmerge { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; }
.ldp-cerr { margin: 0; }
.ldp-srcl:hover { text-decoration: underline; }
.ldp-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.ldp-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ldp-col-a { container: ldp-main / inline-size; } /* v6 §3.6: 主の列の幅で .pl を 2 列／3 列に（下の @container ldp-main） */
/* v4 §3.2: PC は列ごとに 1 枚のパネル（節は区切り線＋小見出し）。v6 §3.5: どちらの列も中身の高さ（伸ばす列は無い・下端が揃わなくてよい）。スマホ（≤720）は節ごとのパネルのまま */
@media (min-width: 721px) {
  .ldp-col { gap: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
  .ldp-col:empty { background: none; border: 0; box-shadow: none; }
  .ldp-col > .ldp-sec { background: none; border: 0; border-radius: 0; box-shadow: none; }
  .ldp-col > .ldp-sec + .ldp-sec { border-top: 1px solid var(--line); }
  /* v6 §3.8: 脇の列（340／300px）の活動は ≤720 と同じ 2 段の行（1 段目 日時・誰が・✎／2 段目 内容／3 段目 メモ）・記録の種類は幅いっぱい（2 行目に日時と［記録する］） */
  .ldp-col-c .ldp-act, .ldp-col-c .ldp-recvd { grid-template-columns: 24px minmax(0, 1fr) auto 28px; grid-template-areas: "ic at who pen" "ic what what pen" ". memo memo memo"; align-items: start; padding: 4px 0; }
  .ldp-col-c .ldp-rf-type { flex: 1 1 100%; }
}
.ldp-sec { padding: 12px 16px; }
.ldp-sec h3 { margin: 0 0 10px; font-size: 14px; }
.ldp-sec h4 { margin: 14px 0 8px; font-size: 12.5px; }
.ldp-sec h4 .muted { font-weight: 400; margin-left: 4px; }
/* プロパティ一覧（v4 §3.4・ページで 1 つの文法）: ラベル 84px・1 行 30px・値は 1 行で省略（title に全文）・空欄は —・出典は右端の矢印 */
:root { --pl-k: 84px; --pl-h: 30px; }
.pl { margin: 0; display: grid; grid-template-columns: var(--pl-k) minmax(0, 1fr); column-gap: 10px; font-size: 13px; }
.pl > .k { min-height: var(--pl-h); display: flex; align-items: center; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.pl > .v { margin: 0; min-height: var(--pl-h); display: flex; flex-wrap: nowrap; align-items: center; gap: 0 6px; min-width: 0; color: var(--ink); }
.pl > .v:has(> details[open]) { flex-wrap: wrap; }
.pl > .v > .t { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl > .v > .t.muted { color: var(--muted); }
.pl > .v > .src { margin-left: auto; flex: none; font-size: 12px; color: var(--muted); text-decoration: none; }
.pl > .v > .src:hover, .pl > .v > .src:focus-visible { color: var(--accent); }
.pl > .v > details[open] { flex-basis: 100%; }
/* v5 §3.4: 値の直横の ⧉ コピー（常に薄く見せる・論点 4）。押して書き込めたら ✓（--up）2 秒。フリーメールの札は値のすぐ後ろ */
.pl > .v > .cp { margin-left: auto; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; }
.pl > .v > .cp svg.ico { width: 12px; height: 12px; margin: 0; vertical-align: 0; }
.pl > .v > .cp:hover, .pl > .v > .cp:focus-visible { color: var(--accent); }
.pl > .v > .cp.done { color: var(--up); }
.pl > .v > .eg-tag { flex: none; }
/* 脇の列「活動」v2（docs/activity-log-v2-design.md §6）: 記録フォーム 1 つ（種類・日時・メモ・ヨミ／受注）・時系列の行に ✎・✎ で同じフォームがその場に。時系列の末尾に受信の合成行 */
.ldp-recform { display: flex; flex-direction: column; gap: 8px; margin: 0 0 14px; padding: 0 0 12px; border-bottom: 1px solid var(--line); }
.ldp-recform.edit { margin: 2px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.ldp-rf-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.ldp-recform select, .ldp-recform input[type="date"], .ldp-recform input[type="time"] { height: 32px; padding: 0 10px; font: inherit; font-size: 13px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); min-width: 0; }
.ldp-rf-type { flex: 0 1 200px; }
.ldp-rf-type:disabled { color: var(--muted); }
.ldp-when { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ldp-whenbtn { border-color: var(--line); }
.ldp-unk { font-size: 12px; }
.ldp-rf-memo { width: 100%; box-sizing: border-box; min-width: 0; min-height: 32px; padding: 6px 10px; font-size: 13px; line-height: 1.5; border-radius: 8px; resize: none; overflow: hidden; }
.ldp-rf-deal { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 13px; }
.ldp-rf-stage { display: inline-flex; align-items: center; gap: 6px; }
.ldp-rf-won { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.ldp-rf-note { font-size: 12.5px; }
.ldp-rf-btns { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.ldp-rf-del { order: -1; margin-right: auto; color: var(--muted); }
.ldp-rf-ask { margin-right: auto; font-size: 13px; }
.ldp-rf-err { margin: 0; }
.ldp-actpen { height: 24px; min-width: 24px; opacity: 0; }
.ldp-act:hover .ldp-actpen, .ldp-actpen:focus-visible { opacity: 1; }
@media (hover: none) { .ldp-actpen { opacity: 1; } }
.ldp-edited { font-size: 12px; }
.ldp-memo { grid-area: memo; margin: 0 0 4px; white-space: pre-wrap; color: var(--ink); font-size: 13px; }
/* 活動 v4（docs/lead-detail-v4-design.md §3.9）: 台帳型の行＝アイコン 24／日時 84／内容／誰が／✎ 28 が毎行同じ列・1 行 30px。線は左の 24px の真ん中 */
.ldp-acth { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; min-height: 26px; }
.ldp-acth h3 { margin: 0; }
.ldp-actf .chip { padding: 3px 10px; }
.ldp-tl { position: relative; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; font-size: 13px; }
.ldp-tl::before { content: ''; position: absolute; left: 11px; top: 12px; bottom: 12px; border-left: 2px solid var(--line); }
.ldp-tl > li { position: relative; overflow-wrap: anywhere; }
.ldp-act, .ldp-recvd { display: grid; grid-template-columns: 24px var(--pl-k) minmax(0, 1fr) auto 28px; grid-template-areas: "ic at what who pen" ". . memo memo memo"; column-gap: 8px; align-items: center; min-height: var(--pl-h); }
.ldp-ic { grid-area: ic; position: relative; z-index: 1; justify-self: center; width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--panel); border: 1.5px solid var(--accent); color: var(--accent); }
.ldp-ic svg { width: 12px; height: 12px; }
.ldp-act.k-chg .ldp-ic { border-color: var(--line); color: var(--muted); width: 16px; height: 16px; }
.ldp-act.k-chg .ldp-ic svg { width: 10px; height: 10px; }
.ldp-act.k-chg .ldp-what { color: var(--muted); }
.ldp-recvd .ldp-ic { border-color: var(--line); color: var(--muted); }
.ldp-recvd .ldp-what { color: var(--muted); }
.ldp-act .ldp-at, .ldp-recvd .ldp-at { grid-area: at; white-space: nowrap; }
.ldp-act .ldp-what, .ldp-recvd .ldp-what { grid-area: what; min-width: 0; }
.ldp-actwho { grid-area: who; font-size: 12px; white-space: nowrap; }
.ldp-actpc { grid-area: pen; display: flex; justify-content: flex-end; }
.ldp-tl > li.editing { display: block; margin: 2px 0 6px 32px; }
.ldp-tl > li.ldp-mh { padding: 6px 0 2px 32px; min-height: 24px; font-size: 12px; font-weight: 600; color: var(--muted); }
.ldp-tl > li.ldp-tl-new { display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: 8px; align-items: start; padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.ldp-tl-new .ldp-ic, .ldp-tl-empty .ldp-ic { grid-area: auto; }
.ldp-tl-new .ldp-ic.plus { margin-top: 6px; background: var(--accent); color: var(--on-accent); }
.ldp-tl-new .ldp-recform { margin: 0; padding: 0; border: 0; gap: 6px; }
.ldp-tl-new .ldp-rf-row .ldp-rf-btns { margin-left: auto; }
/* v6 §3.8 論点 3 A: 畳んだ先頭ノード＝「＋」の丸＋「記録する」の文字ボタン（1 行 30px・13px・accent）。押すとその場で上のフォームに替わる */
.ldp-tl > li.ldp-tl-new:has(> .ldp-recopen) { align-items: center; padding-bottom: 2px; margin-bottom: 0; border-bottom: 0; }
.ldp-tl-new:has(> .ldp-recopen) .ldp-ic.plus { margin-top: 0; }
.ldp-recopen { justify-self: start; display: inline-flex; align-items: center; min-height: var(--pl-h); padding: 0 4px; margin-left: -4px; border: 0; border-radius: 6px; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--accent); cursor: pointer; }
.ldp-recopen:hover, .ldp-recopen:focus-visible { text-decoration: underline; }
.ldp-recopen:disabled { color: var(--muted); cursor: default; text-decoration: none; }
.ldp-tl > li.ldp-tl-empty { display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: 8px; align-items: center; min-height: var(--pl-h); font-size: 12.5px; color: var(--muted); }
.ldp-ic.ldp-ic-none { border: 1.5px dashed var(--line); width: 16px; height: 16px; }
.ldp-at { color: var(--muted); font-size: 12px; }
/* 脇の列「進み具合」（縦のステッパー・読むだけ・アニメ無し）: 塗り＝通った／輪＋太字＝今／薄い点と点線＝まだ／薄字＝戻った／✕＝対象外 */
.ldp-funnel { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.ldp-funnel li { position: relative; padding: 0 0 12px 22px; display: flex; flex-direction: column; gap: 2px; }
.ldp-funnel li::before { content: ''; position: absolute; left: 5px; top: 14px; bottom: 0; border-left: 2px solid var(--line); }
.ldp-funnel li:last-child { padding-bottom: 0; }
.ldp-funnel li:last-child::before { display: none; }
.ldp-funnel li[data-state="done"]::before { border-left-color: var(--accent); }
.ldp-funnel li[data-state="todo"]::before, .ldp-funnel li[data-state="current"]::before, .ldp-funnel li[data-state="faint"]::before { border-left-style: dashed; }
.ldp-fn-dot { position: absolute; left: 0; top: 3px; width: 12px; height: 12px; border-radius: 50%; box-sizing: border-box; border: 2px solid var(--line); background: var(--bg); }
.ldp-fn-x { position: absolute; left: 0; top: 0; width: 12px; text-align: center; font-weight: 700; color: var(--muted); }
.ldp-funnel li[data-state="done"] .ldp-fn-dot { border-color: var(--accent); background: var(--accent); }
.ldp-funnel li[data-state="current"] .ldp-fn-dot { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 0 2.5px, var(--bg) 3px); }
.ldp-funnel li[data-state="current"] .ldp-fn-l { font-weight: 700; }
.ldp-funnel li[data-state="todo"], .ldp-funnel li[data-state="faint"] { color: var(--muted); }
.ldp-funnel li[data-state="faint"] .ldp-fn-dot { border-style: dashed; }
.ldp-fn-row { display: flex; align-items: baseline; gap: 10px; }
.ldp-fn-l { min-width: var(--pl-k); }
.ldp-fn-at { font-size: 12px; color: var(--muted); }
.ldp-fn-gap { font-size: 12px; color: var(--muted); margin: -2px 0 2px; }
.ldp-fn-sub { font-size: 12px; color: var(--muted); }
.ldp-funnel li.ldp-fn-deals { font-size: 12px; color: var(--muted); opacity: .75; cursor: default; }
/* 脇の列: 流入元（PC は開いた節・スマホは畳み）・名刺（既定は閉じる）。畳みは summary だけで開閉（本文クリックで閉じない §112） */
.ldp-fold > summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 10px; }
.ldp-fold > summary::-webkit-details-marker { display: none; }
.ldp-fold > summary::before { content: '▸'; color: var(--muted); font-size: 11px; flex: none; }
.ldp-fold[open] > summary::before { content: '▾'; }
.ldp-fold-sec > summary h3 { margin: 0; }
.ldp-fold-sec[open] > summary { margin-bottom: 10px; }
.ldp-fold-peek { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ldp-src[open] .ldp-fold-peek { display: none; } /* 開いたら本文の 1 行目と重複するので隠す */
.ldp-foldbody { display: flex; flex-direction: column; gap: 12px; }
.ldp-foldbody .ldp-fold > summary { font-size: 12.5px; font-weight: 600; }
.ldp-foldbody .ldp-fold > summary .muted { font-weight: 400; }
.ldp-foldbody .ldp-fold[open] > summary { margin-bottom: 8px; }
.ldp-srchead { margin: 0; display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13.5px; overflow-wrap: anywhere; min-width: 0; }
.ldp-srchead .ldp-srcl { white-space: normal; }
.ldp-srcthumb { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); flex: none; }
.ldp-fold-peek .ldp-srcthumb { width: 20px; height: 20px; border-radius: 4px; vertical-align: middle; margin-right: 6px; }
.ldp-srcsub { margin: 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.ldp-srcbody { display: flex; flex-direction: column; gap: 14px; }
.ldp-card .ld-card h4 { margin-top: 0; }
@media (max-width: 1100px) { .ldp-cols { grid-template-columns: minmax(0, 1fr) 300px; } } /* v6 §3.3: この人と会社は上のまま（列を縮めるだけ） */
/* スマホ（720px 以下）: 1 列。固定帯（← 名前・会社・電話をかける）→ 状態 2×2＋要約 1 行 → 活動 → 進み具合 → 流入元（畳み）→ 名刺（畳み）（§3.6） */
@media (max-width: 720px) {
  .ldp-top { position: sticky; top: 0; z-index: 6; margin: 0 -12px; padding: 8px 12px; min-height: 56px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .ldp-backw { display: none; }
  .ldp-back { font-size: 18px; padding: 4px 6px; }
  .ldp-id { flex: 1 1 auto; align-items: baseline; gap: 6px; }
  .ldp-id h2 { font-size: 16px; flex: none; max-width: 60%; }
  /* 前後は固定帯の右端に矢印だけ（記録する → ↓ 次 をスマホでも・§3.8）。名前は省略で縮む */
  .ldp-nav { gap: 2px; }
  .ldp-nav .btn { min-width: 40px; min-height: 40px; padding: 0 8px; justify-content: center; font-size: 15px; }
  .ldp-navw { display: none; }
  .ldp-top { gap: 8px; }
  .ldp-id h2 { min-width: 0; flex: 0 1 auto; max-width: none; }
  .ldp-top .ld-avatar, .ldp-sub { display: none; } /* 帯は名前・電話・前後だけ（会社は 2 行目の上に出さない・幅を名前に回す） */
  .ldp-top .ldp-call { padding: 0 12px; }
  .ldp-top .ldp-call { display: inline-flex; flex: none; min-height: 40px; align-items: center; }
  .ldp-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 10px; padding: 10px 12px; }
  .ldp-facts > div, .ldp-next { min-width: 0; flex-wrap: nowrap; white-space: nowrap; margin-left: 0; }
  .ldp-next { overflow: hidden; }
  .ldp-next .ldp-nt { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  /* 2×2 のセルからはみ出さない（理由の札・次回の文は省略・「変える」は縮めない・期日超過は日付の赤と title だけ） */
  .ldp-facts > div { overflow: hidden; }
  .ldp-facts dd .lead-rsn, .ldp-facts dd .lead-scr { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .ldp-next .btn, .ldp-facts dd .btn { flex: none; }
  .ldp-facts dd .ldp-owner { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .ldp-next .ldp-over { display: none; }
  .ldp-next.editing { grid-column: 1 / -1; white-space: normal; }
  .ldp-next { grid-column: 1 / -1; } /* v4 §3.10: 2×3（対応状況・温度感／担当・優先度／次回＝幅いっぱい） */
  .ldp-facts button, .ldp-next .btn, button.ldp-nextbtn { min-height: 40px; }
  /* 活動のフォーム（§6.3）: 縦積み＝種類（幅いっぱい）→ 日付・時刻の 2 分割（不明にするは下）→ メモ → ヨミ／受注 → 記録する（幅いっぱい）。入力は 40px 以上・16px（iPhone の拡大を防ぐ） */
  .ldp-rf-row { flex-direction: column; align-items: stretch; }
  .ldp-rf-type { flex: none; width: 100%; }
  .ldp-recform select, .ldp-recform input[type="date"], .ldp-recform input[type="time"], .ldp-rf-memo { min-height: 40px; font-size: 16px; }
  .ldp-recform input[type="date"], .ldp-recform input[type="time"] { -webkit-appearance: none; appearance: none; display: block; box-sizing: border-box; width: 100%; text-align: left; }
  .ldp-when { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
  .ldp-when > .ldp-k { grid-column: 1 / -1; }
  .ldp-when:not(.editing) .ldp-whenbtn { grid-column: 1 / -1; justify-self: start; }
  .ldp-when [data-when-clear], .ldp-when .ldp-unk { grid-column: 1 / -1; justify-self: start; }
  .ldp-recform .btn { min-height: 40px; }
  .ldp-rf-deal { flex-direction: column; align-items: stretch; }
  .ldp-rf-stage select { flex: 1 1 auto; }
  .ldp-rf-won { min-height: 40px; }
  .ldp-recform:not(.edit) .ldp-rf-btns .btn.primary { flex: 1 1 100%; justify-content: center; }
  .ldp-recopen { min-height: 40px; } /* v6 §3.4: 畳んだ「記録する」は当たり 40px */
  .ldp-actpen { min-width: 40px; min-height: 40px; }
  /* 活動の行（v4 §3.10）: 日時と内容は同じ列で 2 段・誰が は日時の右・✎ は右端 */
  .ldp-act, .ldp-recvd { grid-template-columns: 24px minmax(0, 1fr) auto 40px; grid-template-areas: "ic at who pen" "ic what what pen" ". memo memo memo"; align-items: start; padding: 4px 0; }
  .ldp-ic { width: 24px; height: 24px; }
  .ldp-tl-new .ldp-rf-row .ldp-rf-btns { margin-left: 0; }
  /* v5 §3.8: 固定帯の真下に「この人」の畳み（既定は閉じる・覗き＝会社 ・ 役職）。⧉ と［直す］は当たり 40px・フォームは input 40px・16px（iPhone の拡大を防ぐ） */
  .pl > .v > .cp { width: 40px; height: 40px; }
  .ldp-person > summary [data-contact-edit] { min-height: 40px; }
  .pl-form > .v input { height: 40px; font-size: 16px; }
  .ldp-cbtns .btn { min-height: 40px; flex: 1 1 0; justify-content: center; }
  .ldp-head.ldp-head--bar { padding: 8px 0; }
  .ldp-sum { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; padding: 0; border: 0; border-top: 1px solid var(--line); background: none; font: inherit; font-size: 13px; color: var(--ink); text-align: left; cursor: pointer; white-space: nowrap; }
  .ldp-sum > span:first-child { overflow: hidden; text-overflow: ellipsis; min-width: 0; font-weight: 600; }
  .ldp-cols { display: flex; flex-direction: column; align-items: stretch; }
  .ldp-col { display: contents; }
  .ldp-b { order: 1; } .ldp-fn { order: 2; } .ldp-src { order: 3; } .ldp-card { order: 4; }
  .ldp-fold-sec > summary { min-height: 40px; align-items: center; }
  :root { --pl-k: 76px; --pl-h: 36px; }
}

/* ログイン切れの帯（docs/lead-detail-design.md §6.5・PR C-2）: 流れの外（fixed）＝本文を動かさない */
.login-expired { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; align-items: center; gap: 12px; max-width: calc(100% - 24px);
  padding: 10px 14px; border-radius: 10px; background: var(--warn-soft); color: var(--ink); border: 1px solid var(--warn); box-shadow: var(--shadow); font-size: 13px; font-weight: 600; }
.login-expired .btn { flex: none; }
/* 名刺の送信の進み（docs/lead-detail-design.md §3.9・PR C-3）。高さは固定（% が変わっても下が動かない） */
.cd-progress { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 36px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ===== 名刺の撮影画面（ライブカメラ・docs/card-capture-design.md §3.1・PR D-3a）。試作 public/camtest.html を .cam-* に写した物。全画面・暗い地 ===== */
/* display:flex の要素は [hidden] が効かない（試作で黒い幕が残った・camtest.html:27）→ この画面と名刺のシートでは hidden を必ず勝たせる */
.cam [hidden], .cam[hidden], .cd-sheet[hidden], .cd-back[hidden], .cd-panel [hidden] { display: none !important; }
.cam { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; background: var(--cam-bg); color: var(--cam-ink); overscroll-behavior: contain; -webkit-tap-highlight-color: transparent; }
.cam-top { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: calc(env(safe-area-inset-top) + 6px) 10px 6px; background: rgba(0, 0, 0, .55); z-index: 2; }
.cam-top button { background: none; border: 0; color: var(--cam-ink); font: inherit; font-size: 14px; padding: 8px 6px; min-height: 40px; cursor: pointer; }
.cam-x { font-size: 18px !important; width: 40px; }
.cam-cnt { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.cam-tools { display: inline-flex; align-items: center; gap: 4px; }
.cam-auto { border: 1px solid rgba(255, 255, 255, .5) !important; border-radius: 999px; padding: 4px 10px !important; min-height: 32px !important; font-size: 13px !important; }
.cam-auto.on { background: var(--cam-auto) !important; border-color: var(--cam-auto) !important; font-weight: 700; }
.cam-view { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.cam-view video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* 枠は直角（名刺は直角の長方形・10/13 翔さん） */
.cam-frame { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 86%; aspect-ratio: 91 / 55; border: 3px solid rgba(255, 255, 255, .9);
  border-radius: 0; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .35); pointer-events: none; transition: width .2s, height .2s, border-color .15s; }
.cam-frame.tall { width: auto; height: 70%; aspect-ratio: 55 / 91; }
.cam-frame.ready { border-color: var(--cam-ok); }
.cam-hint { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; font-size: 13px; text-shadow: 0 1px 3px rgba(0, 0, 0, .9); padding: 0 12px; }
.cam-flash { position: absolute; inset: 0; background: var(--cam-ink); opacity: 0; pointer-events: none; transition: opacity .15s; }
.cam-flash.on { opacity: .7; transition: none; }
.cam-bottom { flex: none; background: rgba(0, 0, 0, .78); padding: 4px 14px calc(env(safe-area-inset-bottom) + 12px); z-index: 2; }
/* 確保した行（警告・カメラの再接続）: 高さ固定＝出ても下が動かない */
.cam-warnrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 30px; }
.cam-warn { font-size: 12.5px; color: var(--cam-warn-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cam-torch { flex: none; background: none; border: 1px solid rgba(255, 255, 255, .4); border-radius: 999px; color: var(--cam-ink); font-size: 12px; padding: 0 10px; height: 28px; cursor: pointer; }
.cam-torch.on { background: var(--cam-back); border-color: var(--cam-back); }
/* サムネイル帯: 横スクロール＋右端フェード（縦に折り返さない）・新しい物が左 */
.cam-strip { display: flex; gap: 6px; overflow-x: auto; min-height: 54px; padding-bottom: 6px; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 1) 85%, transparent); mask-image: linear-gradient(90deg, rgba(0, 0, 0, 1) 85%, transparent); }
.cam-th { position: relative; flex: none; padding: 0; border: 2px solid transparent; border-radius: 6px; background: none; cursor: pointer; }
.cam-th img { display: block; height: 46px; border-radius: 4px; }
.cam-th.back { border-color: var(--cam-back); }
.cam-th-w { position: absolute; right: -4px; top: -4px; width: 16px; height: 16px; border-radius: 50%; background: var(--cam-warn-ink); color: var(--cam-back-ink); font-size: 11px; font-weight: 800; line-height: 16px; text-align: center; }
.cam-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.cam-side { justify-self: start; font: inherit; font-size: 13px; padding: 9px 12px; min-height: 44px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .5); background: none; color: var(--cam-ink); cursor: pointer; }
.cam-side.on { background: var(--cam-back); border-color: var(--cam-back); color: var(--cam-back-ink); font-weight: 700; }
.cam-side.primary { background: var(--accent); border-color: var(--accent); font-weight: 700; }
.cam-side:disabled { opacity: .35; cursor: default; }
.cam-end { justify-self: end; }
.cam-shutter { display: block; width: 76px; height: 76px; border-radius: 50%; border: 5px solid var(--cam-ink); background: rgba(255, 255, 255, .25); padding: 0; cursor: pointer; }
.cam-shutter:active { background: rgba(255, 255, 255, .7); }
.cam-shutter:disabled, .cam-shutter.off { opacity: .35; pointer-events: none; }
.cam-hap { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; overflow: hidden; }
/* 帯のサムネイルを押したときの小さなシート（撮影画面の中・外側タップで閉じる・D-3b） */
.cam-sheetwrap { position: fixed; inset: 0; z-index: 85; }
.cam-shade { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
.cam-sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 75%; overflow: auto; padding: 14px 16px calc(env(safe-area-inset-bottom) + 16px);
  background: var(--panel); color: var(--ink); border-radius: 14px 14px 0 0; display: flex; flex-direction: column; gap: 10px; }
.cam-sheet h3 { margin: 0; font-size: 15px; }
.cam-sheet img { display: block; max-width: 100%; max-height: 40vh; object-fit: contain; border-radius: 8px; border: 1px solid var(--line); align-self: center; }
.cam-sheet-note { margin: 0; font-size: 12.5px; color: var(--muted); }
.cam-sheet-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.cam-sheet-acts .btn { min-height: 44px; }
/* 確認シートの座標の行（docs/card-capture-design.md §3.4・PR D-4）: 回す・アイコンに使う・縦型として扱う */
.cd-imgcol { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cd-imgcol.back { flex: 0 0 30%; }
.cd-imgcol .cd-img { width: 100%; }
.cd-img img[data-rot] { transition: transform .15s; }
.cd-rot { min-height: 32px; font-size: 12px; }
.cd-avatar-row { display: flex; align-items: center; gap: 10px; min-height: 52px; }
.cd-avatar { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background-repeat: no-repeat; background-color: var(--bg); }
.cd-avatar-l { flex: 1 1 auto; font-size: 13px; font-weight: 600; }
.cd-q { position: relative; border: 1px solid var(--line); border-radius: 50%; width: 20px; height: 20px; padding: 0; font-size: 11px; background: var(--panel); color: var(--muted); cursor: help; }
.cd-q::after { content: ""; position: absolute; inset: -12px; } /* 指で押しやすく（見た目は 20px のまま・当たりは 44px） */
.qtip { position: fixed; z-index: 1000; max-width: min(280px, calc(100vw - 16px)); padding: 8px 10px; border-radius: 8px; background: var(--ink); color: var(--panel); font-size: 12px; line-height: 1.6; font-weight: 400; box-shadow: var(--shadow); }
.cd-toggle { flex: none; min-width: 60px; min-height: 36px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.cd-toggle.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.cd-tall-row { display: flex; align-items: center; gap: 8px; font-size: 13px; min-height: 36px; }
.cd-tall-row input { width: 18px; height: 18px; }
/* 前のバージョンで撮った n 枚（画像も名前も出さない 1 行・D-6a） */
.cd-orphan { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 10px; padding: 10px 12px; border-radius: 10px; border: 1px dashed var(--line); font-size: 13px; font-weight: 600; }
.cd-orphan-acts { display: inline-flex; gap: 6px; }
/* 連続の露出（docs/card-capture-design.md §3.1・§3.3・§3.4・PR D-6b）: 2 択・見出し行の「未確認 n 件」・未確認の一覧・救済 */
.cd-moderow { display: flex; align-items: center; gap: 8px; }
.cd-mode button { min-height: 36px; padding: 0 14px; }
.view-title .cd-qlink { margin-left: auto; align-self: center; }
.cd-qhead { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 8px; min-height: 44px; }
.cd-qhead h3 { margin: 0; font-size: 15px; }
.cd-queue { display: flex; flex-direction: column; }
.cd-qrow { display: grid; grid-template-columns: 2em 3.2em 1fr auto; grid-template-areas: "n s st hb" ". . who who"; gap: 2px 8px; align-items: center; padding: 10px 4px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.cd-qrow:hover { background: var(--accent-soft); }
.cd-qn { grid-area: n; color: var(--muted); }
.cd-qs { grid-area: s; font-size: 12px; color: var(--muted); }
.cd-qst { grid-area: st; font-weight: 600; }
.cd-qwho { grid-area: who; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-qrow .cd-hb { grid-area: hb; }
.cd-rescue { display: flex; flex-wrap: wrap; gap: 6px; }
/* 未確認の「まとめて登録」（翔さん 10/30）: ボタン → 確かめの 1 行 → 登録中 n／m */
.cd-bulk { display: flex; flex-direction: column; gap: 8px; padding: 8px 0; font-size: 13px; }
.cd-bulk.ask { padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); }
.cd-bulk p { margin: 0; line-height: 1.6; }
.cd-bulk-acts { display: flex; flex-wrap: wrap; gap: 6px; }
/* 顔のアイコンと向き（docs/card-capture-design.md §3.5・PR D-7）: 詳細のヘッダーとドロワーの上・40px の丸・読めなければ頭文字 */
.ld-avatar { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 16px; }
.ld-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ld-who { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 14px; }
.ld-who .muted { font-size: 12.5px; }
.ld-imgacts { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.ld-cardimg .ld-img { overflow: hidden; }
.ld-cardimg .ld-img.tall img { max-height: 360px; }
.ld-cardimg .ld-img img[data-rot] { transition: transform .15s; }

/* 撮影画面の切替（自動・枠の縦横・ライト）は下の行に（10/13 翔さん: 上はブラウザの「カメラへのアクセスが許可されています」の帯に隠れる・親指で届く位置） */
.cam-warnrow { height: auto; min-height: 36px; }
.cam-warnrow .cam-tools { flex: none; display: inline-flex; gap: 6px; }
.cam-warnrow .cam-auto, .cam-warnrow .cam-turn { flex: none; background: none; border: 1px solid rgba(255, 255, 255, .4); border-radius: 999px; color: var(--cam-ink); font: inherit; font-size: 12px; padding: 0 10px; height: 28px; cursor: pointer; }

/* 招待のダイアログ（10/14 翔さん「表示崩れ」）: 見出しの文字と入力欄を縦に積む・入力欄は横いっぱい・役割名は折り返さない */
.inv-dlg { width: min(460px, 100%); }
.inv-dlg .block { margin-top: 12px; }
.inv-dlg .block > label:not(.radio) { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); }
.inv-dlg .block > label:not(.radio) input { width: 100%; box-sizing: border-box; font-size: 14px; color: var(--ink); }
.inv-dlg .radio { display: grid; grid-template-columns: auto max-content 1fr; align-items: start; column-gap: 8px; padding: 6px 0; color: var(--ink); }
.inv-dlg .radio input { margin-top: 3px; }
.inv-dlg .radio .muted { font-size: 12px; line-height: 1.5; }

/* 自動シャッターの四角（v6 §6.8・PR E-1）: 自動 ON では白い枠を隠し、検出した名刺の四角を描く（points だけ書き換える）。止まると緑 */
.cam-quad { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.cam-quad polygon { fill: none; stroke: var(--cam-ink); stroke-width: 3; stroke-linejoin: round; transition: stroke .15s; }
.cam-quad.ready polygon { stroke: var(--cam-ok); }
.cam-quad.stale polygon { opacity: .4; } /* v6.1: ok が途切れた直後だけ前の四角を薄く残す */

/* 撮影画面 v6（PR E-2）: 見出し行は ✕・カウンター・「終了（n）›」の 3 つ（カウンターを真ん中に）。右下は「次の名刺 ›」／「確認して次へ ›」（常設）。
   両面のときは左の「裏面も撮る」を隠すが場所は残す（◯ が動かない） */
.cam-top { display: grid; grid-template-columns: 1fr auto 1fr; }
.cam-top .cam-x { justify-self: start; }
.cam-top .cam-end { justify-self: end; font-weight: 700; white-space: nowrap; }
.cam-top .cam-end.primary { background: var(--accent); border-radius: 10px; padding: 8px 12px; }
.cam-row > #camBack[hidden] { display: block !important; visibility: hidden; }
.cam-next { justify-self: end; white-space: nowrap; }
.cam-warnrow .cam-sides { flex: none; background: none; border: 1px solid rgba(255, 255, 255, .4); border-radius: 999px; color: var(--cam-ink); font: inherit; font-size: 12px; padding: 0 10px; height: 28px; cursor: pointer; }

/* ===================================================================
   商談（docs/pipeline-s0-design.md §7・PR 2）: 一覧（表）・カンバン・詳細・作成シート。
   色は変数だけ（段のチップ: コンタクト／商談予定＝灰・ヒアリング＝青薄・Cヨミ＝青・Bヨミ＝青濃・Aヨミ＝accent）
   =================================================================== */
.dl-titlebar { display: flex; align-items: center; gap: 12px; margin: 4px 2px 0; min-height: 36px; }
.dl-titlebar h2 { font-size: 17px; margin: 0; }
.dl-titlebar .btn { margin-left: auto; }
#dlBody, .dl-wrap, #dlBar, #dlStrip { min-width: 0; } /* 横に長い中身（カンバン・表）でページが横に伸びない */
/* 要約の帯（固定 3 枠＋警告） */
.dl-strip { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; font-size: 13px; padding: 2px 2px 0; }
.dl-sv { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.dl-sv b { font-variant-numeric: tabular-nums; font-size: 14px; }
.dl-sk { color: var(--muted); font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.dl-warn { color: var(--warn); font-weight: 600; font-size: 12px; }
.dl-views { margin-bottom: 0; }
.dl-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.dl-tabs .num { font-variant-numeric: tabular-nums; opacity: .8; }
.dl-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dl-filters select, .dl-filters input { min-width: 0; flex: 0 1 auto; padding: 6px 10px; font-size: 13px; }
.dl-filters input[type=search] { flex: 1 1 160px; max-width: 260px; }
.dl-colbtn { margin-left: auto; }
/* 段のチップ・状態の札 */
.dl-chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--muted);
  font: inherit; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
button.dl-chip { cursor: pointer; }
button.dl-chip:hover { border-color: currentColor; }
button.dl-chip:disabled { opacity: .55; cursor: progress; }
.dl-chip .chev { font-size: 9px; opacity: .7; }
.dl-chip.s-hearing { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.dl-chip.s-yomi_c { background: var(--deal-c-bg); color: var(--deal-c-ink); border-color: transparent; }
.dl-chip.s-yomi_b { background: var(--deal-b-bg); color: var(--deal-b-ink); border-color: transparent; }
.dl-chip.s-yomi_a { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.dl-chip.closed { opacity: .6; }
.dl-status { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.dl-status.st-open { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.dl-status.st-won { background: var(--up-soft); color: var(--up); border-color: transparent; }
.dl-status.st-lost { background: var(--down-soft); color: var(--down); border-color: transparent; }
.dl-status.st-on_hold { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.dl-over { color: var(--down); font-weight: 700; }
.dl-tag { display: inline-block; padding: 0 6px; border-radius: 999px; background: var(--up-soft); color: var(--up); font-size: 11px; font-weight: 700; margin-left: 4px; }
/* 表 */
.dl-table thead th { text-align: left; padding: 0; }
.dl-sort { border: 0; background: none; font: inherit; color: inherit; font-weight: 600; padding: 12px 14px; cursor: pointer; white-space: nowrap; }
.dl-table thead th:not(:has(.dl-sort)) { padding: 12px 14px; cursor: default; }
.dl-table tbody td { text-align: left; padding: 9px 14px; }
.dl-table tbody td:first-child { max-width: 300px; }
.dl-table td.c-amount, .dl-table td.c-rot { text-align: right; }
.dl-table tr.st-lost td, .dl-table tr.st-on_hold td { color: var(--muted); }
.dl-title { color: var(--ink); text-decoration: none; font-weight: 700; }
.dl-title:hover { color: var(--accent); text-decoration: underline; }
.dl-setco { margin-left: 6px; height: 24px; padding: 0 8px; font-size: 12px; border-style: dashed; }
.dl-rowmenu { height: 28px; min-width: 32px; padding: 0 6px; }
.dl-pager { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 10px 0 2px; font-size: 12.5px; }
.dl-count { margin: 8px 2px 0; font-size: 12px; }
/* スマホ: 表の行をカードに（横スクロールを出さない） */
@media (max-width: 700px) {
  .dl-table, .dl-table tbody, .dl-table tr, .dl-table td { display: block; width: 100%; }
  .dl-table thead { display: none; }
  .dl-table tr { position: relative; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .dl-table tbody td { border: 0; padding: 2px 0; white-space: normal; max-width: none; text-align: left; display: flex; gap: 8px; align-items: center; min-height: 0; }
  .dl-table tbody td:first-child { max-width: none; padding-right: 40px; font-size: 14px; }
  .dl-table tbody td[data-l]:not(.c-co)::before { content: attr(data-l); color: var(--muted); font-size: 11.5px; font-weight: 600; min-width: 6.5em; flex: none; }
  .dl-table td.c-amount, .dl-table td.c-rot { text-align: left; }
  .dl-table td.c-menu { position: absolute; top: 6px; right: 6px; width: auto; padding: 0; }
  .dl-table td.c-status:empty { display: none; }
  .dl-rowmenu { min-width: 40px; height: 40px; }
  .dl-filters select { flex: 1 1 calc(50% - 6px); }
  .dl-filters input[type=search] { max-width: none; flex-basis: 100%; }
  .dl-colbtn { display: none; }
}
/* カンバン（横スクロールは帯の中だけ・列は 240px 以上） */
.dl-holdnote { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 12px; }
.dl-board { display: flex; gap: 10px; overflow-x: auto; max-width: 100%; padding-bottom: 8px; align-items: flex-start; -webkit-overflow-scrolling: touch; }
.dl-col { flex: 1 0 240px; min-width: 240px; max-width: 320px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 220px); }
.dl-col.over, .dl-drop.over { outline: 2px solid var(--accent); outline-offset: -2px; background: var(--accent-soft); }
.dl-colh { display: flex; align-items: center; gap: 6px; padding: 10px 12px 8px; border-bottom: 1px solid var(--line); font-size: 13px; position: sticky; top: 0; }
.dl-coln { font-weight: 700; white-space: nowrap; }
.dl-colh .num { color: var(--muted); font-variant-numeric: tabular-nums; }
.dl-colsum { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.dl-colb { overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.dl-colempty { margin: 6px 4px; font-size: 12px; }
.dl-colmore { font-size: 12px; color: var(--accent); text-decoration: none; padding: 4px; }
.dl-card { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; font-size: 12.5px; }
.dl-card[data-drag] { cursor: grab; }
.dl-card:hover { border-color: var(--accent); }
.dl-card.dragging { opacity: .4; }
.dl-card-t { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 13px; overflow-wrap: anywhere; }
.dl-card-t:hover { color: var(--accent); }
.dl-card-m, .dl-card-s { display: flex; align-items: center; gap: 8px; justify-content: space-between; min-width: 0; }
.dl-card-o { display: inline-flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.dl-card-mv { align-self: flex-start; height: 26px; padding: 0 6px; font-size: 12px; color: var(--muted); }
.dl-ghost { position: fixed; z-index: 70; pointer-events: none; box-shadow: var(--shadow); opacity: .92; background: var(--panel); }
.dl-drops { display: flex; flex-direction: column; gap: 10px; flex: 0 0 96px; }
.dl-drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 18px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; text-align: center; min-height: 120px; justify-content: center; }
.dl-drop.won b { color: var(--up); }
.dl-drop.lost b { color: var(--down); }
@media (hover: none) { .dl-drops { display: none; } } /* 指ではドラッグしない（カードの「段を変える」・詳細の受注／失注で同じことができる） */
/* メニューの中身 */
.dl-stagemenu .lead-mi { justify-content: flex-start; }
.dl-mi-l { flex: 1; }
.dl-mi-p { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.dl-mdate { display: flex; align-items: center; gap: 8px; padding: 6px 10px; font-size: 12.5px; color: var(--muted); }
.dl-mdate input { min-width: 0; padding: 6px 8px; }
/* 作成シート（PC は右から・スマホは下から） */
.dl-sheet-bg { z-index: 58; }
.dl-sheet { position: fixed; z-index: 59; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: var(--panel); border-left: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.dl-sheet.wide { width: min(500px, 100vw); }
.dl-sheet-h { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 8px 18px; border-bottom: 1px solid var(--line); }
.dl-sheet-h h3 { margin: 0; font-size: 15px; }
.dl-sheet-b { overflow-y: auto; padding: 12px 18px 18px; flex: 1; }
.dl-form { display: flex; flex-direction: column; gap: 14px; }
.dl-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dl-field input, .dl-field select { min-width: 0; width: 100%; }
.dl-k { font-size: 12px; font-weight: 700; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.dl-req { font-style: normal; font-size: 10.5px; color: var(--down); }
.dl-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dl-opts { display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow-y: auto; }
.dl-opt { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 10px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 13.5px; color: var(--ink); text-align: left; cursor: pointer; }
.dl-opt:hover, .dl-opt:focus-visible { background: var(--accent-soft); outline: none; }
.dl-opt .muted { margin-left: auto; font-size: 12px; }
.dl-opt-new { color: var(--accent); font-weight: 700; }
.dl-opthint { margin: 6px 4px; font-size: 12px; }
.dl-picked { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 9px; }
.dl-picked .btn { margin-left: auto; }
.dl-newpr { display: flex; gap: 6px; margin-top: 6px; }
.dl-stagegrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.dl-sg { min-height: 44px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--ink); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: 4px; }
.dl-sg small { color: var(--muted); font-weight: 600; font-size: 10.5px; }
.dl-sg.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.dl-more > summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.dl-more[open] > summary { margin-bottom: 10px; }
.dl-more .dl-field + .dl-field { margin-top: 10px; }
.dl-ferr { color: var(--down); font-size: 12px; margin: 0; }
.dl-sheet-f { display: flex; gap: 8px; position: sticky; bottom: 0; background: var(--panel); padding: 10px 0 calc(4px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.dl-sheet-f .btn.primary { flex: 1; }
@media (max-width: 700px) {
  .dl-sheet, .dl-sheet.wide { top: auto; left: 0; width: 100%; max-height: 88vh; border-left: 0; border-top: 1px solid var(--line); border-radius: 14px 14px 0 0; }
  .dl-row2 { grid-template-columns: 1fr; }
}
/* 詳細（リード詳細と同じ 3 列の器・スマホは 1 列に積む） */
.dlp { display: flex; flex-direction: column; gap: 12px; padding-bottom: 24px; }
.dlp-top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; min-height: 40px; }
.dlp-id { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 auto; }
.dlp-id h2 { margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.dlp-owner { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.dlp-cols { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 1.1fr) minmax(240px, .9fr); gap: 12px; align-items: start; }
.dlp-sec { padding: 12px 16px; min-width: 0; }
.dlp-sec h3 { margin: 0 0 10px; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.dl-facts { margin: 0; display: flex; flex-direction: column; }
.dl-fact { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: 8px; align-items: start; padding: 6px 0; border-top: 1px solid var(--line); min-height: 36px; }
.dl-fact:first-child { border-top: 0; }
.dl-fact dt { font-size: 12px; color: var(--muted); padding-top: 3px; }
.dl-fact dd { margin: 0; font-size: 13px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; overflow-wrap: anywhere; }
.dl-fact dd a { color: var(--accent); text-decoration: none; }
.dl-fact dd a:hover { text-decoration: underline; }
.dl-fix { height: 24px; padding: 0 6px; font-size: 12px; color: var(--muted); }
.dl-eform { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; width: 100%; margin: 0; }
.dl-eform input, .dl-eform select { flex: 1 1 140px; min-width: 0; padding: 6px 10px; }
.dl-ebtns { display: inline-flex; gap: 6px; flex: none; }
.dl-eform .dl-ferr { flex-basis: 100%; }
.dl-ladder .dl-pct { font-size: 11.5px; font-variant-numeric: tabular-nums; }
.dl-term.won .ldp-fn-x { color: var(--up); }
.dl-term.lost .ldp-fn-x { color: var(--down); }
.dl-holdbar { margin: 0 0 10px; padding: 6px 10px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); font-size: 12.5px; font-weight: 600; }
.dl-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.dl-crit { margin: 6px 0 0; font-size: 12px; }
@media (max-width: 1100px) { .dlp-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .dlp-c { grid-column: 1 / -1; } }
@media (max-width: 720px) {
  .dlp-cols { display: flex; flex-direction: column; align-items: stretch; }
  .dl-acts .btn { min-height: 44px; flex: 1 1 calc(33% - 6px); }
  .dl-acts .btn.primary { flex-basis: 100%; }
  .dl-fix, .dl-fact .lead-owner { min-height: 40px; }
}

/* ===== 成果地点（docs/conversion-point-design.md §3） ===== */
.cvp-slot { margin-top: 16px; }
.cvp-mk { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; vertical-align: 0; flex: none; }
.cvp-mk.t1 { background: var(--cvp-1); } .cvp-mk.t2 { background: var(--cvp-2); } .cvp-mk.t3 { background: var(--cvp-3); } .cvp-mk.t4 { background: var(--cvp-4); }
.cvp-mk.none { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }
.cvp-row .cvp-nm { font-weight: 600; }
.cvp-row.ended { color: var(--muted); }
.cvp-sum { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); display: grid; gap: 4px; font-size: 13px; }
.cp-points { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; }
.cp-points .cvp-mk { margin-right: 4px; }
.cp-sheet th.cp-pt-h, .cp-sheet td.cp-pt, .cp-sheet th.cp-pt { text-align: left; white-space: nowrap; min-width: 150px; }
.cp-sheet td.cp-pt.cp-pted { cursor: pointer; }
.cp-sheet td.cp-pt.cp-pted:hover, .cp-sheet td.cp-pt.cp-pted:focus { box-shadow: inset 0 0 0 1px var(--line); outline: none; }
.cp-sheet .cp-ptsel { font: inherit; font-size: 12px; max-width: 160px; }
.cp-vs { display: inline-grid; grid-template-columns: auto minmax(30px, auto); align-items: baseline; column-gap: 4px; }
.cp-vs .cp-ptv { white-space: nowrap; }
.cp-vsr > span:first-child { text-align: right; }
.cp-sub { font-size: 10.5px; color: var(--muted); text-align: left; font-weight: 500; }
.cp-i { font-style: normal; color: var(--muted); font-size: 11px; margin-left: 3px; cursor: help; }
.cp-sheet tr.cp-grp th, .cp-sheet tr.cp-grp td { background: var(--bg); font-weight: 700; font-size: 12.5px; border-top: 1px solid var(--line); }
.cp-sheet tr.cp-grp th.stk { text-align: left; }
/* 成果地点ごとの目標（区切り行の札の列・docs/cv-point-targets-design.md §3.6）: 内なら無色・注意は黄・警告は赤の点 */
.cp-sheet .cp-tgt { font-weight: 500; font-size: 12px; }
.cp-tgt-v { white-space: nowrap; }
.tg-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; vertical-align: 0; }
.tg-dot.warn { background: var(--warn); }
.tg-dot.crit { background: var(--down); }
/* ダッシュボードの成果地点別（媒体別の下・同じ格子） */
.pfrows.cvp { margin-top: 14px; }
#pf .pfrows.cvp .pfrow { grid-template-columns: 104px repeat(3, minmax(0, 1fr)) minmax(0, 1.4fr); }
.pfrows.cvp .cvp-span { display: block; font-weight: 500; }
.pfrows.cvp .pfrow.total { color: var(--muted); }
.pfrows.cvp .cvp-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pfrows.cvp .cvp-v { margin-left: 6px; font-size: 11px; color: var(--muted); font-weight: 500; }
.pfrows.cvp .cvp-t.warn .cvp-v { color: var(--warn); font-weight: 700; }
.cr-map .cr-split + .cr-split { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.cr-map .cr-unset { margin: 10px 0 0; font-size: 12.5px; }

/* ----- 設定 › 費用・ROI（docs/sales-roi-design.md §5.5）: 月次の費用の表。引き継いだ値（未確定）は薄字 ----- */
table.data.costgrid { width: auto; min-width: 640px; box-shadow: none; border: 1px solid var(--line); font-size: 13px; font-variant-numeric: tabular-nums; }
table.data.costgrid thead th { cursor: default; }
table.data.costgrid tbody tr { cursor: default; }
table.data.costgrid tbody tr:hover { background: transparent; }
table.data.costgrid td.lft, table.data.costgrid th.lft { text-align: left; }
table.data.costgrid td { padding: 6px 10px; }
.costgrid .cost-in { width: 8.5em; text-align: right; font: inherit; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink); }
.costgrid .cost-in.inh { color: var(--muted); }
.costgrid .cost-in:disabled { background: var(--bg); color: var(--muted); }
.costgrid .unit { margin-left: 3px; color: var(--muted); }
.costgrid .cost-kind { margin-left: 6px; font-size: 11px; font-weight: 500; }
.costgrid tr.sumrow td { font-weight: 700; }
.cost-month { min-width: 5em; text-align: center; }

/* ----- ROI 画面（docs/sales-roi-design.md §5.2）: 列 15・凍結列＝媒体・横スクロール・区切り行（全体）・段（成果地点）・暦月の期間率は薄字・獲得月の暫定はグレー ----- */
.roi-panel { display: flex; flex-direction: column; gap: 10px; }
.roi-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 12px; color: var(--muted); }
.roi-chips .rchip.warn { color: var(--warn); font-weight: 600; text-decoration: none; }
.roi-chips a.rchip:hover { text-decoration: underline; }
.roi-wrap { overflow-x: auto; }
table.data.roigrid { width: max-content; min-width: 100%; box-shadow: none; border: 1px solid var(--line); font-size: 13px; font-variant-numeric: tabular-nums; }
table.data.roigrid thead th { cursor: help; padding: 8px 10px; }
table.data.roigrid tbody tr { cursor: default; }
table.data.roigrid tbody td { padding: 7px 10px; }
table.data.roigrid th.lft, table.data.roigrid td.lft { text-align: left; }
table.data.roigrid .name { position: sticky; left: 0; z-index: 2; background: var(--panel); box-shadow: 1px 0 0 var(--line); min-width: 170px; max-width: 260px; }
table.data.roigrid thead th.name { z-index: 6; }
table.data.roigrid tr.total td { font-weight: 700; background: var(--bg); }
table.data.roigrid tr.total td.name { background: var(--bg); }
table.data.roigrid tr.pt-row td { font-size: 12px; color: var(--muted); }
table.data.roigrid tr.pt-row td.name { font-weight: 500; padding-left: 50px; }
table.data.roigrid tr.side td { color: var(--muted); }
table.data.roigrid td.period { color: var(--muted); font-weight: 400; }
table.data.roigrid td.prov { color: var(--muted); background: color-mix(in srgb, var(--muted) 8%, transparent); }
table.data.roigrid td.few { text-decoration: underline dotted; text-underline-offset: 3px; }
/* 受注 0 の利益・ROI は事実のまま薄字（色なし）・有効 0 なのに媒体 CV がある成果地点は ⓘ（docs/roi-screen-ui-design.md §5） */
table.data.roigrid td.zero { color: var(--muted); font-weight: 400; }
table.data.roigrid td.nolead { cursor: help; }
/* 日割りの費用（§4.4）: ホバーに式・印は小さな ⓘ／月別の端の月の「一部 10/1〜21」 */
table.data.roigrid td.prorated { cursor: help; }
table.data.roigrid td.prorated::after { content: ' ⓘ'; color: var(--muted); font-size: 11px; }
table.data.roigrid .roi-part { font-size: 11px; font-weight: 400; margin-left: 4px; }
table.data.roigrid td.nolead::after { content: ' ⓘ'; color: var(--warn); }
table.data.roigrid td.chk { font-size: 12px; font-weight: 500; white-space: nowrap; }
table.data.roigrid td a { color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
table.data.roigrid td a:hover { color: var(--accent); text-decoration-color: currentColor; }
/* 行ホバーの水色は全画面共通（押すと詳細が開く一覧の合図）。ROI の行は押しても何も起きないので消す＝光るのはリンクのあるセルだけ（docs/roi-screen-ui-design.md §1-2） */
table.data.roigrid tbody tr:hover { background: transparent; }
/* 開閉（§1-1）: トグルスイッチのクラス（白い丸の ::after）とは別の専用クラス。印は期間ボタンと同じ線の SVG chevron 16px・押せる範囲 32px（Carbon）。行の高さは変えない */
.roigrid .roi-tgl { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; width: 32px; height: 32px; margin: -7px 0 -7px -6px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; font: inherit; }
.roigrid .roi-tgl:hover { color: var(--ink); background: color-mix(in srgb, var(--muted) 12%, transparent); }
.roigrid .roi-tgl:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.roigrid .roi-chev { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.roigrid .roi-tgl-sp { display: inline-block; width: 26px; }
table.data.roigrid td[data-tog] { cursor: pointer; }
table.data.roigrid td[data-tog]:hover .roi-nm { color: var(--accent); }
/* 開いた親の行＝淡い面・月別に選んでいる行＝左の細枠（選択中の型 §45）。凍結列は不透明に混ぜる */
table.data.roigrid tr.src.open td { background: color-mix(in srgb, var(--accent) 8%, var(--panel)); }
table.data.roigrid tr.sel td.name { box-shadow: inset 3px 0 0 var(--accent), 1px 0 0 var(--line); }
table.data.roigrid td[data-sel] { cursor: pointer; }
table.data.roigrid td[data-sel]:hover .roi-nm { color: var(--accent); }
/* 2 段見出し（§6）: 上段＝束（中央寄せ）・束の境目だけ縦罫線をやや濃く */
table.data.roigrid thead th { position: static; }
table.data.roigrid thead th.name { position: sticky; left: 0; }
table.data.roigrid thead tr.hd1 th { vertical-align: bottom; }
table.data.roigrid thead th.grp { text-align: center; color: var(--ink); padding: 6px 10px 4px; cursor: default; }
table.data.roigrid thead tr.hd2 th { padding-top: 4px; }
table.data.roigrid th.gs, table.data.roigrid td.gs { border-left: 1px solid color-mix(in srgb, var(--ink) 22%, var(--line)); }
.roi-tablebar { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.roi-cols { display: inline-flex; align-items: center; gap: 6px; }
.roi-cols .seg { height: 26px; }
.roi-cols .seg button { font-size: 12px; padding: 0 10px; }
/* 横の続きの影（§46・リード一覧と同じ）: 左に隠れている間は凍結列の右に・右に続きがある間は右端のグラデーション */
.roi-frame { position: relative; }
.roi-frame::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 18px; pointer-events: none; z-index: 4; background: linear-gradient(to left, var(--edge), transparent); opacity: 0; transition: opacity .15s; }
.roi-frame.more-r::after { opacity: 1; }
.roi-frame.more-l table.data.roigrid .name { box-shadow: 8px 0 8px -8px var(--edge), 1px 0 0 var(--line); }
.roi-frame.more-l table.data.roigrid tr.sel td.name { box-shadow: inset 3px 0 0 var(--accent), 8px 0 8px -8px var(--edge), 1px 0 0 var(--line); }
.roi-empty { margin: 0; }
@media (max-width: 700px) { .roi-bar .seg { width: auto; } table.data.roigrid .name { min-width: 120px; max-width: 150px; } }
.roi-months { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.roi-months .rowline { display: flex; align-items: center; gap: 10px; }
.roi-months .rowline .muted { font-size: 12px; }
table.data.roigrid td.lft.prov { color: var(--muted); }
.roi-med { margin: 4px 0 0; font-size: 12px; }
/* ===== クリエイティブの束（docs/research-creative-analysis.md §4.2） ===== */
/* 名前のマス: サムネ＋名前（…）＋「広告 N 本」の固定の枠（全行で同じ幅・数字は右寄せ） */
.cp-sheet td.nm .cr-cell { display: flex; align-items: center; min-width: 0; }
.cp-sheet td.nm .cr-cell .cr-thumb { flex: none; }
.cp-sheet td.nm .cr-none { display: inline-block; opacity: .5; }
.cp-sheet td.nm .cr-nm { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-sheet td.nm .cr-n { flex: none; min-width: 4.8em; margin-left: 8px; text-align: right; color: var(--muted); font-weight: 500; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.cp-gnote { font-size: 12px; }
/* 行の展開の下: 中の広告の表（語の列は左・数は右・1 行で切ってホバー全文） */
.cp-bundle { position: sticky; left: 14px; width: min(1000px, calc(100vw - 320px)); margin-top: 14px; overflow-x: auto; }
.cp-sheet .cp-bat { border-collapse: collapse; font-size: 12px; width: 100%; }
.cp-sheet .cp-bat th, .cp-sheet .cp-bat td { padding: 0 10px; height: 28px; text-align: right; border-bottom: 1px solid var(--line); background: transparent; position: static; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cp-sheet .cp-bat th { color: var(--muted); font-weight: 600; font-size: 11.5px; }
.cp-sheet .cp-bat .l { text-align: left; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.cp-sheet .cp-bat td.nm { font-weight: 600; }
.cp-sheet .cp-bat td.nm .sdot { margin-right: 6px; }
.cp-sheet .cp-bat td.nm a { color: inherit; text-decoration: none; }
.cp-sheet .cp-bat td.nm a:hover { color: var(--accent); text-decoration: underline; }
.cp-sheet .cp-bat td.dash { color: var(--muted); }
@media (max-width: 760px) { .cp-bundle { width: calc(100vw - 60px); } }

/* ===== コンテンツ（資料・docs/research-whitepaper.md §6） ===== */
.ct-panel { display: flex; flex-direction: column; gap: 10px; }
.ct-bar select { height: var(--seg-h); border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; padding: 0 8px; }
.ct-wrap { overflow-x: auto; }
table.data.ctgrid { width: max-content; min-width: 100%; box-shadow: none; border: 1px solid var(--line); font-size: 13px; font-variant-numeric: tabular-nums; }
table.data.ctgrid thead th { position: sticky; top: 0; z-index: 3; padding: 8px 10px; border-right: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
table.data.ctgrid thead th[data-sort] { cursor: pointer; }
table.data.ctgrid th.lft, table.data.ctgrid td.lft { text-align: left; }
table.data.ctgrid tbody td { padding: 6px 10px; border-right: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
table.data.ctgrid tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--line) 18%, var(--panel)); }
table.data.ctgrid .name { position: sticky; left: 0; z-index: 2; background: var(--panel); box-shadow: 1px 0 0 var(--line); min-width: 220px; max-width: 300px; }
table.data.ctgrid thead th.name { z-index: 6; }
table.data.ctgrid tr.total td { font-weight: 700; background: var(--bg); }
table.data.ctgrid tr.off td { color: var(--muted); }
table.data.ctgrid td.dash { color: var(--muted); }
table.data.ctgrid td.few { text-decoration: underline dotted; text-underline-offset: 3px; }
table.data.ctgrid td.period { color: var(--muted); font-weight: 400; }
table.data.ctgrid td.prov { color: var(--muted); background: color-mix(in srgb, var(--muted) 8%, transparent); }
table.data.ctgrid td.fa { color: var(--muted); min-width: 4.5em; }
table.data.ctgrid.sub { width: 100%; }
.ct-namecell { display: flex; align-items: center; gap: 8px; min-width: 0; color: inherit; text-decoration: none; }
.ct-namecell:hover .ct-nm { color: var(--accent); text-decoration: underline; }
.ct-nm { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-cover { flex: none; display: inline-grid; place-items: center; overflow: hidden; border-radius: 4px; border: 1px solid var(--line); background: var(--bg); }
.ct-cover.sm { width: 28px; height: 36px; }
.ct-cover.lg { width: 100%; aspect-ratio: 3 / 4; border-radius: 8px; }
.ct-cover.xl { width: 180px; aspect-ratio: 3 / 4; border-radius: 8px; }
.ct-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.ct-cover-k { font-size: 10px; color: var(--muted); font-weight: 600; }
.ct-cover.lg .ct-cover-k, .ct-cover.xl .ct-cover-k { font-size: 18px; }
.ct-kind { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }
.ct-kind::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }
.ct-kind.k-checklist::before { background: var(--up); }
.ct-kind.k-casebook::before { background: var(--warn); }
.ct-kind.k-seminar::before, .ct-kind.k-lp::before { background: var(--muted); }
.ct-kind.k-bundle::before { background: var(--down); }
.ct-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 45%), 1fr)); gap: 14px; }
.ct-card { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; color: inherit; text-decoration: none; background: var(--panel); }
.ct-card:hover { border-color: var(--accent); }
.ct-card.off { opacity: .6; }
.ct-card-t { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-card-k { font-size: 12px; }
.ct-card-n { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; font-variant-numeric: tabular-nums; font-size: 13px; }
.ct-card-n span { display: flex; flex-direction: column; align-items: flex-end; }
.ct-card-n i { font-style: normal; font-size: 11px; color: var(--muted); }
.ctd { display: flex; flex-direction: column; gap: 12px; }
.ctd-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.ctd-top h2 { margin: 0; font-size: 19px; }
.ctd-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12.5px; flex: 1 1 auto; }
.ct-st { font-size: 12px; color: var(--warn); font-weight: 600; }
.ctd-head { display: flex; gap: 18px; align-items: flex-start; }
.ctd-fn { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.ct-funnel { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.ct-step { display: inline-flex; flex-direction: column; align-items: flex-end; min-width: 64px; font-variant-numeric: tabular-nums; }
.ct-step i { font-style: normal; font-size: 11px; color: var(--muted); }
.ct-step b { font-size: 16px; }
.ct-step small { font-size: 11.5px; color: var(--muted); }
.ct-step small.few { text-decoration: underline dotted; }
.ct-arrow { color: var(--muted); }
.ct-kpi { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px 14px; margin: 0; }
.ct-kpi div { display: flex; flex-direction: column; }
.ct-kpi dt { font-size: 11px; color: var(--muted); }
.ct-kpi dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.ct-people { margin: 0; font-size: 13px; }
.ct-trend { width: 100%; max-width: 760px; height: auto; }
.ct-trend .b { fill: color-mix(in srgb, var(--accent) 55%, transparent); }
.ct-trend .m { fill: var(--up); }
.ct-trend .v { stroke: var(--warn); stroke-dasharray: 3 3; }
.ct-trend .vt { fill: var(--warn); font-size: 10px; }
.ct-trend .l { fill: var(--muted); font-size: 10px; }
.ct-forms, .ct-files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ct-forms li { display: grid; grid-template-columns: 4em minmax(0, 1fr) auto auto; gap: 10px; align-items: center; font-size: 13px; }
.ct-plat { font-size: 11px; color: var(--muted); }
.ct-file { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; }
.ct-file.off { opacity: .65; }
.ct-file-v { font-weight: 700; min-width: 2.2em; font-variant-numeric: tabular-nums; }
.ct-file-n { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-sync { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; }
.ct-old summary { cursor: pointer; font-size: 12.5px; margin-top: 6px; }
.ct-adthumb { width: 28px; height: 28px; object-fit: cover; border-radius: 4px; vertical-align: middle; margin-right: 8px; }
.ct-adthumb.none { display: inline-block; background: var(--bg); border: 1px solid var(--line); }
.ct-note { white-space: pre-wrap; }
.ct-dlg { width: 520px; }
.ct-dlg input, .ct-dlg select, .ct-dlg textarea { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink); }
.fc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.fc-list li { display: grid; grid-template-columns: 4em minmax(0, 1fr) 4.5em minmax(160px, 260px); gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.fc-list li.inq { color: var(--muted); }
.fc-list select { max-width: 260px; font: inherit; font-size: 12.5px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink); }
.fc-list .num { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
@media (max-width: 700px) {
  table.data.ctgrid .name { min-width: 150px; max-width: 170px; }
  .ctd-head { flex-direction: column; }
  .ct-cover.xl { width: 120px; }
  .fc-list li { grid-template-columns: minmax(0, 1fr) auto; }
  .fc-list li .ct-plat, .fc-list li .num { display: none; }
}

/* 会社の AI 調査（docs/lead-enrichment-design.md §3.1・§3.2・PR 6）: 優先度の札（A 濃い・B 普通・C 薄い・D 灰）・推定年商の札・HP・モールのチップ・一括のモーダル。新しい色は足さない */
.lead-table .c-grade { width: 96px; min-width: 96px; }
.lead-table .c-rev { width: 128px; min-width: 128px; white-space: nowrap; }
/* 顧客とのつながり（docs/client-connections-design.md §3.2）: 56px・●＝確定あり（濃）・○＝推定だけ（薄） */
.lead-table .c-cn { width: 56px; min-width: 56px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lead-table td.c-cn.cn-sure { color: var(--accent); font-weight: 600; }
.lead-table td.c-cn.cn-likely { color: var(--muted); }
.lead-table .c-hp { width: 120px; min-width: 72px; max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eg-hp { font-size: 12px; }
.eg-hp-dom { color: var(--muted); }  /* メールのドメインから作った HP（10/27・確かめていない＝薄く） */
.lead-table .c-sns { width: 132px; min-width: 64px; white-space: nowrap; }
/* SNS・EC のアイコン（10/27・線画 16px・色は既存トークン） */
.eg-wis { display: inline-flex; align-items: center; gap: 4px; flex-wrap: nowrap; }
.eg-wi { display: inline-flex; color: var(--muted); border-radius: 4px; text-decoration: none; }
.eg-wi svg { width: 16px; height: 16px; stroke-width: 1.8; }
.eg-wi:hover, .eg-wi:focus-visible { color: var(--accent); outline: none; }
.eg-wi:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.eg { display: inline-block; min-width: 2.4em; padding: 1px 6px; border-radius: 6px; font-size: 12px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; cursor: help; }
.eg-A { background: var(--accent-soft); color: var(--accent); }
.eg-A.eg-top { background: var(--accent); color: var(--panel); }
.eg-B { background: var(--accent-soft); color: var(--ink); }
.eg-C { background: var(--bg); color: var(--ink); border: 1px solid var(--line); }
.eg-D { background: var(--bg); color: var(--muted); }
/* 優先度の札 S／A／B／C（docs/lead-priority-design.md §3.1）: S＝濃い赤系・A＝橙・B＝青灰・C＝灰（文字も灰）。新しい色は足さない */
.eg-pS { background: var(--down); color: var(--panel); }
.eg-pA { background: var(--warn-soft); color: var(--unsure-ink); border: 1px solid var(--warn); }
.eg-pB { background: var(--accent-soft); color: var(--ink); }
.eg-pC { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.eg-el { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.eg-el.red { color: var(--down); font-weight: 700; }
.eg-hu { font-size: 12px; cursor: help; white-space: nowrap; }
.lead-table td.c-grade { white-space: nowrap; }
.eg-prio .eg-prio-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 4px; font-size: 13px; }
.eg-prio .eg-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.eg-chip { display: inline-block; padding: 0 7px; border-radius: 10px; font-size: 12px; background: var(--bg); border: 1px solid var(--line); color: var(--ink); }
.eg-prio .eg-next { margin: 6px 0; font-size: 13px; }
.eg-prio .eg-pin { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.eg-card .eg-fitr { margin: 0 0 6px; font-size: 12px; }
.eg-card .eg-shops { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; }
.eg-card .eg-shops a { font-size: 12px; }
.eg-st { font-size: 12px; color: var(--muted); white-space: nowrap; }
button.eg-st { border: 0; background: none; padding: 0; font: inherit; font-size: 12px; cursor: pointer; }
.eg-failed { color: var(--down); }
button.eg-failed:hover, button.eg-failed:focus-visible { text-decoration: underline; outline: none; }
.eg-tag { display: inline-block; padding: 0 5px; border-radius: 5px; font-size: 12px; background: var(--warn-soft); color: var(--unsure-ink); white-space: nowrap; }
.eg-web { text-decoration: none; }
/* 年商の 1 文字の札（10/27 翔さん「低中高実でスマートに」）: 実・高＝濃い／中／低＝薄い。新しい色は足さない */
.eg-rk { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; font-size: 11px; font-weight: 700; line-height: 1; vertical-align: 1px; cursor: help; flex: none; }
.eg-rk-hi { background: var(--accent); color: var(--on-accent); }
.eg-rk-mid { background: var(--accent-soft); color: var(--accent); }
.eg-rk-lo { background: var(--bg); color: var(--muted); border: 1px solid var(--line); box-sizing: border-box; }
.lead-table th:has(> .lead-hint) { white-space: nowrap; }
.lead-table th:has(> .lead-hint) > .lead-sort { display: inline-flex; }
.lead-hint { font-size: 12px; color: var(--muted); cursor: help; padding-right: 8px; font-weight: 400; }

.eg-mall { display: inline-block; padding: 0 6px; border-radius: 10px; font-size: 12px; background: var(--bg); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
a.eg-mall:hover { border-color: var(--accent); color: var(--accent); }
.eg-more { font-size: 12px; color: var(--muted); }
.eg-notew:not(:empty) { margin-left: 8px; }
.eg-note { border: 0; background: none; padding: 0; font: inherit; font-size: 12px; color: var(--accent); cursor: pointer; }
.eg-note:hover, .eg-note:focus-visible { text-decoration: underline; outline: none; }
.lead-range:has(> #lstRangeNote:empty):has(> #lstEnrichNote:empty) { display: none; }
@media (max-width: 700px) {
  .lead-table td.c-grade { order: 4; width: auto; min-width: 0; }
  .lead-table td.c-cn { order: 4; width: auto; min-width: 0; }
  .lead-table td.c-cn.muted { display: none; }
  .lead-table td.c-rev, .lead-table td.c-hp, .lead-table td.c-sns { order: 8; width: auto; min-width: 0; color: var(--muted); }
}
/* 詳細の会社カード（docs/lead-enrichment-design.md §3.3〜§3.5・PR 7）: 主の列の「この人」の下（PC・v6）／固定帯の下の 1 行の帯（スマホ・タップで開く） */
.eg-card .eg-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.eg-card .eg-head h3 { margin: 0; }
/* 会社セクション（docs/lead-detail-v4-design.md §3.5＝企業 DB の型）: 先頭ブロック（ロゴ 40px・名前 14px 太字・一行紹介・サマリ 3 行・タグ）→ グループ（.pl）→ フッター 1 行 */
.eg-card .eg-top { display: flex; align-items: flex-start; gap: 10px; margin: 8px 0 6px; min-width: 0; }
.eg-card .eg-id { flex: 1 1 auto; min-width: 0; }
.eg-card .eg-nm { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; min-width: 0; font-size: 14px; min-height: 20px; }
.eg-card .eg-nm b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; max-width: 100%; }  /* 10/27: 札・HP が並ぶと名前が「ク・」まで潰れた＝折り返して名前を優先 */
.eg-card .eg-nm .eg-tag, .eg-card .eg-nm .eg-site { flex: none; }
.eg-card .eg-one { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eg-card .eg-site { flex: none; margin-left: auto; font-size: 12px; color: var(--accent); text-decoration: none; white-space: nowrap; max-width: 120px; overflow: hidden; text-overflow: ellipsis; line-height: 20px; }
.eg-card .eg-site:hover { text-decoration: underline; }
.eg-card .eg-site.eg-hp-dom { color: var(--muted); }  /* メールのドメインから作った HP（未確認）は薄く */
.eg-card .eg-sum { margin: 0 0 4px; font-size: 13px; color: var(--ink); }
.eg-card .eg-sum.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.eg-moresum { border: 0; background: none; padding: 0; margin: 0 0 6px; font: inherit; font-size: 12px; color: var(--accent); cursor: pointer; }
.eg-moresum:hover, .eg-moresum:focus-visible { text-decoration: underline; outline: none; }
.eg-logo-box { position: relative; display: inline-flex; flex: none; width: 40px; height: 40px; }
.eg-ini { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); font-size: 16px; font-weight: 700; }
.eg-logo { position: absolute; inset: 0; width: 40px; height: 40px; object-fit: contain; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); }
.eg-card .eg-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0 10px; }
/* グループ（基本情報・規模・ネット上の窓口）: 見出し 32px＋罫線・閉じているときだけ覗き 1 行 */
.eg-card .eg-grp { border-top: 1px solid var(--line); }
.eg-card .eg-gh { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 32px; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--muted); }
.eg-card .eg-gh::-webkit-details-marker { display: none; }
.eg-card .eg-gh::before { content: '▸'; font-size: 11px; flex: none; }
.eg-card .eg-grp[open] > .eg-gh::before { content: '▾'; }
.eg-card .eg-peek { font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.eg-card .eg-grp[open] .eg-peek { display: none; }
.eg-card .eg-grp > .pl { padding-bottom: 6px; }
.eg-card .pl .v .eg-lock, .eg-card .pl .v .eg-unlock { flex: none; }
.eg-card .pl .v .eg-mall, .eg-card .pl .v .eg-chip { margin-right: 4px; }
.eg-card .pl .v > .eg-basis { margin: 0; flex: none; }
.eg-card .pl .v > .eg-basis[open] { flex-basis: 100%; padding-bottom: 6px; }
/* v6 §3.6・§3.11: 主の列が 600px 以上で .pl-2 は 2 列・1,000px 以上で .pl-3 は 3 列（行は左 → 右 → 次の行・DOM は dt/dd の並びのまま）。
   ラベル–値 10px・組と組の間 24px（2 つ目以降のラベルの左に 14px）。名札の行は折らない・HP（.eg-site）は 220px まで。脇の列・スマホは 1 列のまま */
@container ldp-main (min-width: 600px) {
  .pl.pl-2 { grid-template-columns: var(--pl-k) minmax(0, 1fr) calc(var(--pl-k) + 14px) minmax(0, 1fr); }
  .pl.pl-2 > .k:nth-child(4n+3) { padding-left: 14px; }
  .eg-card .eg-nm { flex-wrap: nowrap; }
  .eg-card .eg-site { max-width: 220px; }
}
@container ldp-main (min-width: 1000px) {
  .pl.pl-3 { grid-template-columns: var(--pl-k) minmax(0, 1fr) calc(var(--pl-k) + 14px) minmax(0, 1fr) calc(var(--pl-k) + 14px) minmax(0, 1fr); }
  .pl.pl-3 > .k:nth-child(4n+3) { padding-left: 0; }
  .pl.pl-3 > .k:nth-child(6n+3), .pl.pl-3 > .k:nth-child(6n+5) { padding-left: 14px; }
}
.eg-form .eg-prof-form { display: flex; flex-direction: column; gap: 8px; }
.eg-form .eg-prof-form label { margin-top: 6px; }
.eg-form textarea { flex: 1; min-width: 0; font: inherit; }
.eg-form input[type="number"] { width: 10em; }
.eg-card .eg-msg { margin: 8px 0; font-size: 13px; }
/* v5 §3.6: 見つからなかった時＝文＋HP の 1 行（「HP を入れる」は右端）＋右下に「もう一度調べる」 */
.eg-card .pl > .v > .eg-hpbtn { margin-left: auto; flex: none; }
.eg-card .eg-again { display: flex; justify-content: flex-end; margin-top: 4px; }
.eg-card .eg-basis { font-size: 12px; }
.eg-card .eg-basis summary { cursor: pointer; color: var(--accent); }
.eg-card .eg-basis p { margin: 4px 0; color: var(--muted); }
.eg-card .eg-srcs { margin: 4px 0 0; padding-left: 18px; font-size: 12px; }
/* フッター 1 行: 日付（title にモデル名）・調べたページ（開くと下に箇条書き）・右端にボタン */
.eg-card .eg-foot { margin-top: 0; min-height: 32px; padding-top: 6px; border-top: 1px solid var(--line); font-size: 12px; display: flex; flex-wrap: nowrap; align-items: center; gap: 4px 8px; white-space: nowrap; }
.eg-card .eg-foot:has(> .eg-srcd[open]) { flex-wrap: wrap; }
.eg-card .eg-foot > span, .eg-card .eg-foot > b { flex: none; }
.eg-card .eg-foot > .btn { margin-left: auto; padding: 4px 8px; }
.eg-card .eg-srcd { min-width: 0; flex: 0 1 auto; overflow: hidden; }
.eg-card .eg-srcd > summary { overflow: hidden; text-overflow: ellipsis; }
.eg-card .eg-srcd[open] { order: 9; flex-basis: 100%; }
.eg-card .eg-srcd > summary { cursor: pointer; color: var(--accent); }
.eg-card .eg-stale { color: var(--warn); }
.eg-lock { font-size: 12px; color: var(--muted); white-space: nowrap; }
.eg-unlock { border: 0; background: none; padding: 0; font: inherit; font-size: 12px; color: var(--accent); cursor: pointer; }
.eg-unlock:hover, .eg-unlock:focus-visible { text-decoration: underline; outline: none; }
.eg-form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; font-size: 13px; }
.eg-form label { display: flex; align-items: center; gap: 8px; }
.eg-form input[type="url"], .eg-form input[type="text"] { flex: 1; min-width: 0; }
.eg-form .eg-malls { display: flex; flex-wrap: wrap; gap: 4px 12px; border: 0; padding: 0; margin: 0; }
.eg-form .eg-malls legend { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.eg-form .eg-hint { margin: 0; font-size: 12px; }
.eg-band { margin: 6px 0; container: ldp-main / inline-size; } /* スマホの会社カードは .ldp-col-a の外＝帯を同じ名前の入れ物にして、つながりの行の折り返し（@container ldp-main）を効かせる */
.eg-band > summary { list-style: none; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); cursor: pointer; font-size: 12.5px; }
.eg-band > summary::-webkit-details-marker { display: none; }
.eg-band > summary::after { content: '▾'; margin-left: auto; color: var(--muted); }
.eg-band[open] > summary::after { content: '▴'; }
.eg-band > .eg-card { margin-top: 6px; }
/* 2 行目の優先度の札とメニュー（docs/lead-detail-v4-design.md §3.6）: 札の色は .eg-pS〜.eg-pC と同じ・メニューは .lead-menu の中に理由・内訳・固定 */
.ldp-prio { min-width: 44px; justify-content: center; }
.eg-prio-menu { width: min(320px, calc(100vw - 16px)); }
.eg-pm-body { padding: 6px 8px 8px; font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.eg-pm-body .eg-prio-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.eg-pm-body .eg-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.eg-pm-body .eg-fitr { margin: 0; font-size: 12px; }
.eg-pm-body .eg-basis { font-size: 12px; }
.eg-pm-body .eg-basis summary { cursor: pointer; color: var(--accent); }
.eg-pm-body .eg-basis p { margin: 4px 0; color: var(--muted); }
.eg-prio-menu .lead-mh { border-top: 1px solid var(--line); padding-top: 6px; margin-top: 2px; }
/* 設定「AI 調査」（docs/lead-enrichment-design.md §3.6・PR 8） */
.eg-set h3 { margin: 0 0 10px; font-size: 15px; }
.eg-set-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.eg-set-row .eg-k { width: 9em; color: var(--muted); font-size: 12px; }
.eg-set-row input[type="number"] { width: 8em; }
/* 顧客とのつながり（docs/client-connections-design.md §3.1・§3.3）: 会社カードの先頭グループ。行は .pl と同じラベル 84px・札は確かさの札（.eg-rk）を流用＝新しい色なし
   grid: 種類 84px ｜ 相手＋担当 1fr ｜ 札＋根拠 auto ｜ 紹介 auto ｜ ⋯ 28px。主の列が 600px 未満では札・紹介を 2 行目へ */
.cn-list { padding-bottom: 6px; }
.cn-row { display: grid; grid-template-columns: var(--pl-k) minmax(0, 1fr) auto auto 28px; column-gap: 10px; align-items: center; min-height: var(--pl-h); font-size: 13px; }
.cn-row > .k { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.cn-row .cn-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cn-row .cn-ev { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.cn-row .cn-rk { width: auto; padding: 0 6px; border-radius: 9px; cursor: default; }
.cn-row .cn-basis { position: relative; }
.cn-row .cn-basis[open] > p { position: absolute; right: 0; z-index: 3; min-width: 220px; max-width: 320px; margin: 4px 0 0; padding: 6px 8px; white-space: normal; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.cn-row .cn-basis[open] > p + p { top: 100%; margin-top: 34px; }
.cn-pop { position: relative; }
.cn-pop > summary { list-style: none; cursor: pointer; white-space: nowrap; font-size: 12px; }
.cn-pop > summary::-webkit-details-marker { display: none; }
.cn-more > summary { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 6px; color: var(--muted); font-size: 14px; }
.cn-more > summary:hover, .cn-more > summary:focus-visible { color: var(--accent); }
.cn-menu { position: absolute; right: 0; top: 100%; z-index: 4; display: flex; flex-direction: column; gap: 2px; min-width: 150px; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.cn-menu .cn-opt { display: block; text-align: left; padding: 4px 8px; border: 0; border-radius: 6px; background: none; font: inherit; font-size: 13px; color: var(--ink); cursor: pointer; white-space: nowrap; }
.cn-menu .cn-opt:hover, .cn-menu .cn-opt:focus-visible, .cn-menu .cn-opt.on { background: var(--accent-soft); color: var(--accent); }
.cn-menu .cn-mh { padding: 2px 8px; font-size: 11px; }
.cn-menu .cn-confirm > summary { list-style: none; }
.cn-menu .cn-confirm > summary::-webkit-details-marker { display: none; }
.cn-menu .cn-confirm[open] > summary { display: none; }
.cn-menu .cn-danger { color: var(--down); font-weight: 600; }
.cn-menu .cn-note { display: flex; flex-direction: column; gap: 2px; padding: 4px 8px 0; font-size: 11px; color: var(--muted); }
.cn-menu .cn-note input { font: inherit; font-size: 12px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink); min-width: 200px; }
.cn-row.cn-x { color: var(--muted); }
.cn-add { padding: 0; border: 0; background: none; font: inherit; font-size: 12px; color: var(--muted); cursor: pointer; }
.cn-add:hover, .cn-add:focus-visible { color: var(--accent); text-decoration: underline; }
.cn-form { margin: 4px 0 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.cn-form select { font: inherit; font-size: 13px; height: var(--pl-h); }
.cn-picks { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 4px 0 4px calc(var(--pl-k) + 10px); font-size: 13px; }
.cn-picks p { margin: 0; font-size: 12px; }
.cn-fbtn { display: flex; justify-content: flex-end; gap: 6px; margin-top: 6px; }
.cn-band { white-space: nowrap; }
@container ldp-main (max-width: 599px) {
  .cn-row { grid-template-columns: var(--pl-k) minmax(0, 1fr) 28px; grid-template-areas: "k who more" ". ev ev" ". ref ref"; row-gap: 2px; padding: 2px 0; }
  .cn-row > .k { grid-area: k; }
  .cn-row > .cn-who { grid-area: who; }
  .cn-row > .cn-ev { grid-area: ev; }
  .cn-row > .cn-ref { grid-area: ref; justify-self: start; }
  .cn-row > .cn-more, .cn-row.cn-x > :last-child { grid-area: more; }
  .cn-row > .cn-ref .cn-menu { right: auto; left: 0; }
}
