/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   暖簾AI ネット集客総合管理AI — Design System (Light)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@import "tokens.css";

/* ★hidden 属性は**必ず**隠す（2026-09-07）。
   UA 既定の [hidden]{display:none} は詳細度0で、著者が書いた display（.cv-rb の
   inline-flex、section の block 等）に負ける。同じ穴をこれまで3か所で別々に塞いだ
   （client.html の #opening / .mblock / .cv-topbar-grp）——入り口が増え続けるので、
   ここで この型 ごと閉じる。実測で出ていた症状: 打っていないのにリボンの
   「✓ 編集をやめる」（111px）が常に出ていた。 */
[hidden] { display: none !important; }

:root {
  /* ★色・余白・書体・影の定義は tokens.css を単一のソースにする。
     ここに同じ変数を再定義すると、読み込み順で勝敗が決まる不安定な状態になる
     （どちらが効いているか画面を見るまで分からない）。
     アプリ固有で tokens.css に無いものだけをここに残す。 */
  /* ★これらも新パレットから導出する。生の royal-blue を残すと、tokens.css で teal に
     切り替えたのに一部だけ青が残って**ちぐはぐになる**。
     （--blue2 はどこからも参照されていなかったので削除した） */
  --surface2: var(--surface-2);
  --border2:  var(--border-2);
  --navy2:    var(--brand-strong);
  /* JS側インラインstyleの var(--panel, fallback) / var(--accent, fallback) の
     フォールバックがダークテーマ前提の値で、ライトテーマ上で微妙にズレていた。
     ここで正式定義してフォールバックを二度と発火させない */
}

*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html,body {
  height:100%; font-family:var(--sans); background:var(--bg); color:var(--ink);
  font-size:16px; line-height:1.55; overflow:hidden; -webkit-font-smoothing:antialiased;
}

/* ── Layout ── */
#sidebar {
  position:fixed; top:0; left:0; bottom:0; width:var(--sidebar);
  background:var(--surface); border-right:1px solid var(--border);
  display:flex; flex-direction:column; z-index:50; padding:0;
}
#main {
  margin-left:var(--sidebar); height:100vh; overflow-y:auto;
  padding:32px 36px;
}
#view { max-width:1100px; }

/* ── Sidebar ── */
.sidebar-brand {
  display:flex; align-items:center; gap:10px;
  padding:20px 18px 16px; border-bottom:1px solid var(--border);
}
.brand-symbol {
  width:30px; height:30px; border-radius:8px; background:var(--navy);
  display:flex; align-items:center; justify-content:center;
  font-size:.82rem; color:#fff; font-weight:800; flex-shrink:0;
}
.brand-name {
  font-size:.66rem; font-weight:700; letter-spacing:.2em;
  color:var(--navy); text-transform:uppercase; line-height:1.3;
}
/* ★min-height:0 が要る。フレックス項目の既定は min-height:auto で、中身より小さく
   縮まない＝overflow-y を付けてもスクロールバーが出ず、画面外の項目が押せないまま
   だった（依頼で報告された症状）。flex:1 だけでは足りない。 */
.sidebar-links { flex:1 1 auto; min-height:0; overflow-y:auto; overscroll-behavior:contain;
                 display:flex; flex-direction:column; padding:12px 10px; gap:2px; }
.sidebar-footer { flex:0 0 auto; }
/* ★「よく見る」と「その他の機能」の仕切り（2026-09-17）。CNAV_PRIMARY_KEYS(app.js)の
   後ろに1つだけ出る（0〜1個・複数階層にはしない）。畳んだ左メニューでは文字が
   読めても意味が無いので、細い線だけに変える（text-indentで画面外へ逃がす）。 */
.cnav-group-label {
  margin:14px 6px 4px; padding:0 4px;
  font-size:.66rem; font-weight:700; letter-spacing:.06em;
  color:var(--dim); white-space:nowrap;
}
body.nav-collapsed .cnav-group-label {
  height:1px; margin:10px 8px; padding:0; overflow:hidden;
  text-indent:-9999px; background:var(--border);
}
.nav-link {
  display:flex; align-items:center; gap:10px;
  padding:9px 10px; border-radius:var(--r-sm);
  color:var(--muted); text-decoration:none; font-size:.78rem; font-weight:500;
  transition:all .15s;
}
.nav-link:hover { background:var(--bg); color:var(--ink); }
.nav-link.active { background:rgba(15,31,61,.07); color:var(--navy); font-weight:700; }
.nav-icon { font-size:.92rem; width:18px; text-align:center; opacity:.7; }
.nav-link.active .nav-icon { opacity:1; }
.sidebar-footer {
  padding:14px 18px; border-top:1px solid var(--border);
}

/* ── Buttons ── */
.btn-primary {
  background:var(--navy); color:#fff;
  border:none; border-radius:var(--r-sm);
  padding:9px 18px; font-family:var(--sans); font-size:.82rem; font-weight:700;
  cursor:pointer; transition:all .2s; letter-spacing:.01em;
}
.btn-primary:hover { background:var(--navy2); transform:translateY(-1px); }
.btn-ghost {
  background:var(--surface); color:var(--muted);
  border:1px solid var(--border2); border-radius:var(--r-sm);
  padding:8px 16px; font-family:var(--sans); font-size:.82rem; font-weight:500;
  cursor:pointer; transition:all .18s;
}
.btn-ghost:hover { background:var(--bg); color:var(--ink); }
.btn-danger {
  background:transparent; color:var(--red);
  border:1px solid rgba(200,32,32,.25); border-radius:var(--r-sm);
  padding:8px 16px; font-family:var(--sans); font-size:.82rem;
  cursor:pointer; transition:all .18s;
}
.btn-danger:hover { background:rgba(200,32,32,.06); }
.btn-sm { padding:7px 14px; font-size:.76rem; }

/* ★押せない物を、押せる見た目のまま置かない（2026-09-02）。
   :disabled の指定がどこにも無かったため、無効化した「サイトに反映する」が
   紺のグラデーションのまま・カーソルも pointer のままで、押しても何も起きなかった。
   目視では気づけない（見た目が変わらないのが症状そのもの）ので、機械で固定する。 */
.btn-primary:disabled, .btn-ghost:disabled, .btn-sm:disabled, .btn-xs:disabled,
button:disabled {
  opacity:.45; cursor:not-allowed; filter:grayscale(.35);
}
.btn-primary:disabled:hover, .btn-ghost:disabled:hover, button:disabled:hover {
  transform:none; background:inherit;
}
.btn-xs { padding:5px 10px; font-size:.72rem; }
.w-full { width:100%; }

/* ── Cards ── */
.card {
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--r); padding:22px; box-shadow:var(--shadow-sm);
}
.card-sm {
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--r-sm); padding:16px; box-shadow:var(--shadow-sm);
}
.card-hover { cursor:pointer; transition:all .2s; }
.card-hover:hover {
  border-color:var(--border2);
  box-shadow:0 2px 4px rgba(0,0,0,.06), 0 8px 32px rgba(0,0,0,.1);
  transform:translateY(-2px);
}

/* ── Page headers ── */
.page-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:28px; }
.page-title  { font-size:1.5rem; font-weight:800; letter-spacing:-.045em; color:var(--ink); }
.page-subtitle { font-size:.78rem; color:var(--muted); margin-top:4px; }
.section-title {
  font-size:.66rem; font-weight:700; letter-spacing:.14em; text-transform:uppercase;
  color:var(--dim); margin-bottom:14px;
}

/* ── Score badges ── */
.score-badge {
  display:inline-flex; align-items:center; justify-content:center;
  width:42px; height:42px; border-radius:10px;
  font-size:.95rem; font-weight:800; letter-spacing:-.02em;
  border:1.5px solid transparent;
}
.score-badge.lg { width:56px; height:56px; font-size:1.2rem; border-radius:12px; }
.score-badge.xl { width:72px; height:72px; font-size:1.6rem; border-radius:16px; }
.score-s { background:rgba(13,153,102,.08);  border-color:rgba(13,153,102,.2);  color:var(--green); }
.score-a { background:rgba(176,120,0,.08);   border-color:rgba(176,120,0,.2);   color:var(--yellow); }
.score-b { background:rgba(201,95,0,.08);    border-color:rgba(201,95,0,.2);    color:var(--orange); }
.score-c { background:rgba(200,32,32,.08);   border-color:rgba(200,32,32,.2);   color:var(--red); }
.score-na { background:var(--bg); border-color:var(--border2); color:var(--dim); }

/* ── Mini bar ── */
.mini-bar-wrap { display:flex; align-items:center; gap:8px; }
.mini-bar-track { flex:1; height:4px; background:var(--bg); border-radius:999px; overflow:hidden; }
.mini-bar-fill  { height:100%; border-radius:999px; transition:width .6s ease; }
.mini-bar-label { font-size:.7rem; color:var(--muted); width:28px; text-align:right; font-weight:600; }

/* ── Client grid ── */
.client-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:16px; }
.client-card {
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--r); padding:22px; cursor:pointer; transition:all .2s;
  box-shadow:var(--shadow-sm);
}
.client-card:hover {
  border-color:var(--border2);
  box-shadow:0 2px 4px rgba(0,0,0,.06), 0 8px 32px rgba(0,0,0,.1);
  transform:translateY(-2px);
}
.cc-header { display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:14px; }
.cc-name  { font-size:.95rem; font-weight:700; color:var(--ink); margin-bottom:3px; }
.cc-url   { font-size:.7rem; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:200px; }
.cc-meta  { font-size:.68rem; color:var(--dim); margin-bottom:14px; }
.cc-scores { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.cc-score-item { text-align:center; background:var(--bg); border-radius:8px; padding:8px 4px; }
.cc-score-val  { font-size:1rem; font-weight:800; letter-spacing:-.03em; }
.cc-score-lbl  { font-size:.62rem; color:var(--dim); margin-top:2px; }

/* ── Detail ── */
.detail-header { margin-bottom:28px; }
.detail-name  { font-size:1.5rem; font-weight:800; letter-spacing:-.04em; color:var(--ink); }
.detail-url   { font-size:.76rem; color:var(--muted); margin-top:4px; }
.detail-meta  { display:flex; gap:8px; margin-top:12px; flex-wrap:wrap; }
.tag {
  display:inline-flex; align-items:center;
  font-size:.68rem; font-weight:600; letter-spacing:.06em;
  padding:4px 10px; border-radius:999px;
  background:var(--bg); border:1px solid var(--border2); color:var(--muted);
}
.tag.accent { background:rgba(35,80,212,.07); border-color:rgba(35,80,212,.2); color:var(--blue); }

.scores-row { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:24px; }
.score-cell {
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--r); padding:20px 16px; text-align:center; box-shadow:var(--shadow-sm);
}
.score-cell-val {
  font-size:2.2rem; font-weight:800; letter-spacing:-.05em; line-height:1; margin-bottom:5px;
}
.score-cell-lbl { font-size:.68rem; color:var(--muted); font-weight:600; letter-spacing:.04em; }

/* ── Charts ── */
.charts-row { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:16px; margin-bottom:24px; }
.chart-wrap {
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--r); padding:22px; box-shadow:var(--shadow-sm);
  min-width:0;   /* ★story-chips と同じ穴。これが無いと上の minmax が効かず、320px で
                    トラックが346pxのまま器(292px)を突き破る（実測） */
}
.chart-title { font-size:.66rem; font-weight:700; letter-spacing:.12em; text-transform:uppercase; color:var(--dim); margin-bottom:16px; }
.chart-canvas-wrap { position:relative; height:220px; }

/* ── Proposals ── */
.proposals-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin-bottom:24px; }
.proposal-card {
  background:var(--surface); border:1px solid var(--border);
  border-left:3px solid var(--navy); border-radius:var(--r); padding:20px;
  box-shadow:var(--shadow-sm); transition:box-shadow .2s;
  display:flex; flex-direction:column;   /* 効果ボックス＋依頼ボタンをカード下端に揃える */
}
.proposal-card:hover { box-shadow:0 2px 4px rgba(0,0,0,.06), 0 8px 32px rgba(0,0,0,.1); }
.prop-rank  { font-size:.62rem; font-weight:700; letter-spacing:.15em; text-transform:uppercase; color:var(--navy); margin-bottom:6px; }
.prop-cat   { display:inline-flex; align-self:flex-start; padding:3px 9px; border-radius:999px; font-size:.64rem; font-weight:700; text-transform:uppercase; letter-spacing:.08em; background:rgba(35,80,212,.07); color:var(--blue); margin-bottom:8px; }
.prop-title { font-size:.88rem; font-weight:700; color:var(--ink); margin-bottom:8px; line-height:1.4; }
.prop-detail{ font-size:.74rem; color:var(--muted); line-height:1.75; margin-bottom:14px; }
.prop-code-wrap { background:var(--bg); border:1px solid var(--border); border-radius:8px; padding:10px 12px; margin-bottom:14px; }
.prop-code-head { display:flex; align-items:center; justify-content:space-between; font-size:.66rem; color:var(--muted); margin-bottom:6px; }
.prop-code { font-size:.7rem; line-height:1.6; white-space:pre-wrap; word-break:break-all; max-height:220px; overflow-y:auto; margin:0; }
.prop-impact{ background:var(--bg); border-radius:8px; padding:10px 12px; margin-top:auto; }
.prop-impact-row { display:flex; align-items:center; justify-content:space-between; }
.prop-gain  { font-size:.95rem; font-weight:800; color:var(--green); }
.prop-sub   { font-size:.68rem; color:var(--muted); margin-top:3px; }
.prop-diff  { font-size:.68rem; color:var(--dim); margin-top:4px; }
/* ★カード頭を1行に束ねる（2026-09-01）。#ランク・カテゴリ・難易度が縦に3段積まれて
   タイトルまで遠かった。難易度はここに移し、下段の重複表示は廃止した。 */
.prop-head  { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:8px; }
.prop-head .prop-rank { margin-bottom:0; }
.prop-head .prop-cat  { margin-bottom:0; }
.prop-diff-chip { font-size:.64rem; font-weight:600; color:var(--dim); background:var(--input,rgba(0,0,0,.04));
                  border-radius:999px; padding:3px 9px; white-space:nowrap; }
/* 続きの本文。既定では畳んでおき、開いた分だけ伸びる */
.prop-more  { margin:-8px 0 12px; }
.prop-more > summary { cursor:pointer; font-size:.7rem; color:var(--blue); padding:2px 0; }
.prop-more[open] > summary { color:var(--muted); }
.prop-more .prop-detail { margin-top:6px; margin-bottom:0; }

/* ── Metrics ── */
.metrics-section { margin-bottom:24px; }
.metrics-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:8px; }
.metric-row {
  display:flex; align-items:center; justify-content:space-between;
  background:var(--bg); border-radius:var(--r-sm); padding:10px 14px;
}
.metric-label { font-size:.74rem; color:var(--muted); }
.metric-value { font-size:.8rem; font-weight:700; }
.metric-ok   { color:var(--green); }
.metric-warn { color:var(--yellow); }
.metric-ng   { color:var(--red); }

/* ── Forms ── */
.form-group { margin-bottom:16px; }
.form-label {
  font-size:.68rem; font-weight:700; letter-spacing:.1em; text-transform:uppercase;
  color:var(--muted); margin-bottom:7px; display:block;
}
.form-input {
  width:100%; background:var(--input); border:1.5px solid var(--border2);
  border-radius:var(--r-sm); padding:10px 14px;
  font-family:var(--sans); font-size:.84rem; color:var(--ink);
  outline:none; transition:border-color .2s, box-shadow .2s;
}
.form-input:focus { border-color:var(--blue); box-shadow:0 0 0 3px rgba(35,80,212,.1); }
.form-input::placeholder { color:var(--dim); }
/* ★iOS Safari は font-size が 16px 未満の入力欄にフォーカスすると**画面を自動で拡大**し、
   拡大したまま戻らない（.84rem = 13.44px だった）。編集画面は入力が主役なので、
   狭い画面では 16px を下回らせない。 */
@media (max-width: 640px) {
  .form-input, textarea.form-input, select.form-input { font-size:16px; }
}
select.form-input { background-image:none; }
.form-card {
  max-width:520px; background:var(--surface); border:1px solid var(--border);
  border-radius:var(--r); padding:28px; box-shadow:var(--shadow-sm);
}
/* レポート系パネル用: 520px制限を外して上部カードと横幅を揃える（入力フォームは520のまま） */
.form-card.wide { max-width:none; }

/* ── Compare ── */
.compare-inputs { display:grid; grid-template-columns:1fr 1fr 1fr; gap:14px; margin-bottom:20px; }
.compare-result-row { display:grid; gap:14px; margin-top:20px; }
.compare-item {
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--r); padding:20px; box-shadow:var(--shadow-sm);
}
.compare-site-name { font-size:.84rem; font-weight:700; color:var(--ink); margin-bottom:12px; }
.compare-scores-mini { display:flex; gap:12px; flex-wrap:wrap; }
.cs-mini { text-align:center; }
.cs-mini-val { font-size:1.4rem; font-weight:800; letter-spacing:-.03em; }
.cs-mini-lbl { font-size:.66rem; color:var(--dim); }

/* ── Loading ── */
#loading-overlay {
  position:fixed; inset:0; background:rgba(255,255,255,.75); backdrop-filter:blur(6px);
  z-index:999; display:flex; align-items:center; justify-content:center;
}
.loading-box { text-align:center; }
.spin {
  width:36px; height:36px; border:2.5px solid var(--border2);
  border-top-color:var(--navy); border-radius:50%;
  margin:0 auto 16px; animation:spin .7s linear infinite;
}
@keyframes spin { to { transform:rotate(360deg); } }
#loading-msg  { font-size:.92rem; font-weight:700; color:var(--ink); }
.loading-sub  { font-size:.74rem; color:var(--muted); margin-top:6px; }

/* ── Toast ── */
.toast {
  position:fixed; bottom:24px; right:24px; z-index:1000;
  /* ★札はクリックを通す（2026-09-02）。保存直後の3〜6秒、プレビュー右下の
     320x44px を塞いでいて、そこの部品が押せなかった。中の閉じるボタンだけ拾う。 */
  pointer-events:none;
  background:var(--ink); color:#fff;
  border-radius:var(--r-sm); padding:12px 18px;
  font-size:.8rem; max-width:320px;
  box-shadow:0 4px 32px rgba(0,0,0,.2);
  animation:slideUp .2s ease;
}
.toast.err  { background:var(--red); }
@keyframes slideUp { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }

/* ── Misc ── */
.hidden      { display:none !important; }
.flex        { display:flex; }
.flex-center { display:flex; align-items:center; justify-content:center; }
.gap-8  { gap:8px; }
.gap-12 { gap:12px; }
.gap-16 { gap:16px; }
.row    { display:flex; align-items:center; gap:10px; }
.col    { display:flex; flex-direction:column; gap:8px; }
.text-muted  { color:var(--muted); }
.text-dim    { color:var(--dim); }
.text-accent { color:var(--blue); }
.text-green  { color:var(--green); }
.text-red    { color:var(--red); }
.font-7 { font-size:.7rem; }
.font-8 { font-size:.8rem; }
.back-btn {
  display:inline-flex; align-items:center; gap:6px;
  font-size:.76rem; color:var(--muted); background:none; border:none;
  cursor:pointer; font-family:var(--sans); margin-bottom:22px; padding:0;
  transition:color .18s;
}
.back-btn:hover { color:var(--ink); }
.divider { height:1px; background:var(--border); margin:20px 0; }
.empty-state { text-align:center; padding:64px 20px; color:var(--dim); }
.empty-state h3 { font-size:1rem; font-weight:700; color:var(--muted); margin-bottom:8px; }
.empty-state p  { font-size:.8rem; line-height:1.7; }
.schema-chips { display:flex; flex-wrap:wrap; gap:6px; }
.schema-chip {
  background:rgba(35,80,212,.07); border:1px solid rgba(35,80,212,.18);
  color:var(--blue); font-size:.67rem; font-weight:600;
  padding:3px 9px; border-radius:999px;
}

/* ── PageSpeed ── */
.ps-row { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:12px; }
.ps-cell { background:var(--bg); border-radius:var(--r-sm); padding:12px; text-align:center; }
.ps-val  { font-size:.95rem; font-weight:700; color:var(--ink); }
.ps-lbl  { font-size:.66rem; color:var(--dim); margin-top:2px; }

/* ── Notification badge ── */
.req-badge {
  display:inline-flex; align-items:center; justify-content:center;
  min-width:18px; height:18px; border-radius:999px;
  background:var(--red); color:#fff; font-size:.62rem; font-weight:700;
  padding:0 4px; margin-left:4px; vertical-align:middle;
}
.req-badge.hidden { display:none; }

/* ── Request inbox ── */
.req-inbox-item {
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--r); padding:20px; margin-bottom:10px; box-shadow:var(--shadow-sm);
}
.req-inbox-header {
  display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:10px;
}
.req-inbox-title  { font-size:.9rem; font-weight:700; color:var(--ink); margin-bottom:2px; }
.req-inbox-meta   { font-size:.68rem; color:var(--dim); }
.req-inbox-body   { font-size:.76rem; color:var(--muted); line-height:1.75; margin-bottom:14px; }
.req-inbox-client { font-size:.7rem; font-weight:700; color:var(--blue); margin-bottom:8px; }
.req-inbox-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.req-note-input {
  width:100%; background:var(--input); border:1.5px solid var(--border2);
  border-radius:var(--r-sm); padding:8px 12px; font-family:var(--sans);
  font-size:.78rem; color:var(--ink); outline:none; margin-bottom:10px;
  transition:border-color .2s;
}
.req-note-input:focus { border-color:var(--blue); }
.status-badge {
  font-size:.66rem; font-weight:700; letter-spacing:.04em; padding:3px 10px; border-radius:999px;
}
.badge-pending     { background:rgba(176,120,0,.08); color:var(--yellow); border:1px solid rgba(176,120,0,.2); }
.badge-in_progress { background:rgba(35,80,212,.08); color:var(--blue);   border:1px solid rgba(35,80,212,.2); }
.badge-completed   { background:rgba(13,153,102,.08); color:var(--green); border:1px solid rgba(13,153,102,.2); }
.badge-rejected    { background:rgba(200,32,32,.08);  color:var(--red);   border:1px solid rgba(200,32,32,.2); }

/* ── 4幕構成の幕見出し（クライアント総合ページ・2026-08-11）──
   ベース宣言はメディアクエリより前に置く（後勝ち事故防止の掟） */
.act-head { display:flex; align-items:baseline; gap:12px; margin:36px 0 14px; flex-wrap:wrap; }
/* ★letter-spacing は**最後の文字の後ろにも**入る。justify-content:center は
   その余白まで含めて中央に置くので、見えている数字は字間の半分だけ左へずれる。
   1文字しか入らない丸バッジでは字間そのものが要らない（実測 -0.54px）。 */
.act-num {
  font-size:.68rem; font-weight:800; letter-spacing:normal; color:var(--blue);
  border:1.5px solid rgba(35,80,212,.4); border-radius:999px;
  width:24px; height:24px; line-height:1;
  display:inline-flex; align-items:center; justify-content:center;
  flex-shrink:0; align-self:center;
  font-variant-numeric:tabular-nums;
}
.act-title { font-size:1.04rem; font-weight:800; color:var(--navy); letter-spacing:.01em; }
.act-desc { font-size:.74rem; color:var(--muted); }

/* ── 月次まとめの6ブロック器（2026-09-01）──
   器はブロック間の距離だけを持つ。中の畳み・カードは今までどおりの余白で並ぶ。
   ★display を宣言しない。<section> は UA 既定で block であり、ここに display:block を
     書くと著者規則が UA の [hidden]{display:none} に勝ち、hidden を付けたブロックが
     「高さ25pxの空の見出し」として全客に出る（Chrome 152 で実測: computed display=block /
     rect 25px / innerText に本文が出た）。同型の前例が client.html の #opening[hidden]。 */
/* ①のカード: 見出し行と名前行に、説明とURLを横に添える（縦を詰める・2026-09-01）。
   狭い画面では自然に折り返って2行になる（消えるのではなく折り返す）。 */
/* ★letter-spacing は px で継承される。親の .detail-name は 34px の見出し用に
   letter-spacing:-1.892px を持っており、そのまま 12.5px の子へ降りると
   文字幅の-15%の詰めになって「文字化けのよう」に潰れる（実測で確認）。
   フォントサイズを変える子では letter-spacing を明示的に戻すこと。 */
.ident-lead-inline { font-size:.72rem; font-weight:400; color:var(--muted); margin-left:10px;
                     letter-spacing:normal; }
.detail-url-inline { font-size:.78rem; font-weight:400; color:var(--muted); margin-left:12px;
                     letter-spacing:normal; word-break:break-all; }
.mblock + .mblock { margin-top: var(--s7); }   /* 48px。従来の .act-head の margin-top と同値 */
.mblock[hidden]   { display: none; }           /* 保険: 将来ここに display が付いても閉じる */
@media print { .mblock { break-inside: auto; } .act-head { break-after: avoid; } }

/* 幕1の主要数値チップ */
/* ★minmax(0,1fr) にする（2026-09-01）。1fr は暗黙に minmax(auto,1fr) で、トラックが
   min-content 未満に縮まない。チップ内の .leaf-sub が white-space:nowrap を持つため
   min-content が大きく、390px で8件・768px で4件が画面外へはみ出していた（実測）。 */
/* ★4列固定をやめる（2026-09-02）。サイドバーを畳むと本文幅が +176px 広がるので、
   固定列だとチップだけが間延びする。auto-fit なら幅に合わせて列数が決まる。
   下限 210px は「値＋ラベル＋但し書き＋詳しくボタン」が2行で収まる実測値。 */
.story-chips { display:grid; grid-template-columns:repeat(auto-fit, minmax(210px, 1fr)); gap:10px; }
.story-chip {
  background:var(--surface2); border:1px solid var(--border); border-radius:var(--r-sm);
  padding:12px 14px; transition:border-color .15s;
  min-width:0;   /* グリッド項目の既定 min-width:auto を解除（これが無いと上の minmax が効かない） */
}
/* チップの中では折り返しを許す。ここの .leaf-sub は「直近28日」等の但し書きで、
   1行に収める必要が無い（ツリーの葉では nowrap のままが正しいので、ここだけ上書き）。 */
.story-chip .leaf-sub { white-space:normal; }
.story-chip:hover { border-color:var(--border2); }
/* ── ③のチップ「詳しく ▾」（2026-09-02）──
   ★→ ではなく ▾ にした。→ は「別の場所へ行く」約束で、実際に別ページへ飛ばしていた
     ものを「その場で開く」に変えたので、同じ記号を残すと約束と挙動が食い違う。
     位置は依頼どおり右下。文字ラベルを添えて「押せる物」だと分かるようにする
     （記号だけの三角はクリック可能だと読まれないことがある）。 */
.story-chip { position:relative; padding-bottom:34px; }
.story-more {
  position:absolute; right:10px; bottom:9px;
  display:inline-flex; align-items:center; gap:5px;
  padding:4px 10px; border-radius:999px;
  border:1px solid var(--border2); background:var(--surface);
  font-size:.66rem; font-weight:700; color:var(--blue);
  cursor:pointer; line-height:1; transition:background .15s, color .15s;
}
.story-more:hover { background:var(--bg); }
.story-more-caret { transition:transform .18s ease; font-size:.6rem; }
.story-chip.open .story-more-caret { transform:rotate(180deg); }
.story-chip.open { border-color:var(--blue); }
/* 詳細はチップの下・カードの中に開く（別ページへ飛ばさない） */
.story-detail {
  margin-top:12px; border-radius:var(--r-sm);
  border:1px solid var(--border2); background:var(--surface2);
  padding:14px 16px; font-size:.78rem; line-height:1.9; color:var(--body);
}
.story-detail[hidden] { display:none; }
.story-detail-h { font-size:.86rem; font-weight:800; color:var(--ink); margin-bottom:4px; }
.story-detail-big { font-size:1.5rem; font-weight:800; color:var(--ink); line-height:1.2; }
.story-detail-row { display:flex; gap:18px; flex-wrap:wrap; align-items:baseline; margin:6px 0 8px; }
.story-detail-note { font-size:.72rem; color:var(--muted); line-height:1.85; }
.story-detail-foot { margin-top:10px; text-align:right; }
.story-chip-val { font-size:1.3rem; font-weight:800; color:var(--ink); line-height:1.3; }
.story-chip-lbl { font-size:.7rem; color:var(--muted); margin-top:2px; }
.story-unit { font-size:.72rem; font-weight:600; color:var(--muted); margin-left:1px; }
.story-wait { font-size:.78rem; font-weight:600; color:var(--dim); }

/* ── 管理コックピット「今日やること」（2026-08-11）── */
.today-card {
  background:var(--surface); border:1px solid var(--border2); border-radius:var(--r);
  box-shadow:var(--shadow-sm); padding:16px 20px; margin-bottom:20px;
  font-size:.82rem; line-height:2;
}
.today-card.today-ok { color:var(--muted); border-color:var(--border); font-size:.8rem; }
.today-title {
  font-size:.74rem; font-weight:800; letter-spacing:.08em; color:var(--navy);
  text-transform:uppercase; margin-bottom:6px; display:flex; align-items:center; gap:8px;
}
.today-count {
  background:var(--red); color:#fff; font-size:.66rem; font-weight:800;
  border-radius:999px; min-width:18px; height:18px; padding:0 5px;
  display:inline-flex; align-items:center; justify-content:center;
}
.today-item { border-top:1px solid var(--border); padding:6px 0; }
.today-item:first-of-type { border-top:none; }
@media (max-width: 640px) {
  .story-chips { grid-template-columns:repeat(2, 1fr); }
  .act-desc { width:100%; margin-top:-2px; }
}

/* ── Responsive ── */
@media (max-width: 900px) {
  #sidebar { width:56px; padding:0; }
  .brand-name, .sidebar-links span, .sidebar-footer { display:none; }
  .sidebar-brand { justify-content:center; padding:16px 10px; }
  .nav-link { justify-content:center; padding:10px; }
  /* .sidebar-links span の一括 display:none が icon span も消すので、アイコンだけ復活させる。
     opacity:1 では display が戻らない（.sidebar-links span の方が詳細度で勝つ）ため display を明示。 */
  .sidebar-links .nav-icon { display:inline-flex !important; align-items:center; justify-content:center;
    width:auto; margin:0; opacity:1; font-size:1.15rem; }
  #main { margin-left:56px; padding:18px; }
  .scores-row { grid-template-columns:1fr 1fr; }
  .proposals-grid { grid-template-columns:1fr; }
  .charts-row { grid-template-columns:minmax(0, 1fr); }
  .compare-inputs { grid-template-columns:1fr; }
  .metrics-grid { grid-template-columns:1fr; }
  .score-hero-row { grid-template-columns:1fr; justify-items:center; }
  .dash-summary { grid-template-columns:repeat(2,1fr); }
}
@media (max-width: 600px) {
  .cs-head-l { min-width:0; }        /* 320pxで260px固定が横スクロールを作っていた */
  .cs-chip   { min-width:0; }
  .client-grid { grid-template-columns:1fr; }
  .scores-row { grid-template-columns:1fr 1fr; }
  #main { padding:14px; }
  .score-sub-grid { grid-template-columns:1fr 1fr; }
  .dash-summary { grid-template-columns:repeat(2,1fr); }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   UI/UX v2 — Design Enhancements
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ── Sidebar polish ── */
#sidebar { background: linear-gradient(180deg,#fff 0%,#fafafa 100%); }
.brand-symbol {
  background: linear-gradient(140deg,#0f1f3d 0%,#1a3260 100%);
  box-shadow: 0 2px 8px rgba(15,31,61,.22);
}
.nav-link.active {
  background: linear-gradient(90deg,rgba(35,80,212,.09) 0%,rgba(35,80,212,.03) 100%);
  border-right: 2px solid var(--blue);
  color: var(--navy);
}

/* ── Dashboard summary bar ── */
.dash-summary {
  display:grid; grid-template-columns:repeat(4,1fr);
  gap:12px; margin-bottom:28px;
}
.dash-stat {
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--r); padding:18px 20px; box-shadow:var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}
.dash-stat:hover {
  box-shadow:0 2px 4px rgba(0,0,0,.06),0 8px 28px rgba(0,0,0,.09);
  transform:translateY(-1px);
}
.dash-stat-val {
  font-size:1.8rem; font-weight:900;
  letter-spacing:-.05em; color:var(--ink); line-height:1;
}
.dash-stat-lbl {
  font-size:.66rem; color:var(--muted);
  margin-top:5px; font-weight:600; letter-spacing:.02em;
}
.dash-stat-sub { font-size:.62rem; color:var(--dim); margin-top:2px; }

/* ── Score hero (ring + sub-cards) ── */
/* ★スコアの題と評価語（2026-09-01）。リング／評価語／5軸 の3列にし、
   以前バラバラに置かれていた「総合スコア」「現在の状態」を1つの箱へ束ねた。 */
.score-hero-head {
  font-size:.68rem; font-weight:700; letter-spacing:.12em; text-transform:uppercase;
  color:var(--dim); margin:0 0 10px 2px;
}
/* ★1列目は固定幅にする（上限だけでは足りなかった）。
   auto にすると .score-hero-main の max-content で解決され実測288pxに太り、
   HEADの165pxより123px多く食って 1040〜1340px で5軸が4列→2〜3列に後退していた（純粋な退行）。
   さらに「点数の目安」の開閉で 288⇄350px と動き、そのたび右のカードが組み直されていた。
   幅を固定し、リングと評価語を縦積みにすることで、開閉しても右は1px も動かない。 */
.score-hero-main {
  display:flex; flex-direction:column; align-items:center; gap:10px;
  width:100%; min-width:0; text-align:center;
}
.score-grade { min-width:0; max-width:100%; }
.score-grade-note { max-width:100%; }
.score-grade-word { font-size:1.15rem; }
.score-grade-word { font-size:1.35rem; font-weight:800; line-height:1.3; letter-spacing:-.01em; }
.score-grade-note { font-size:.7rem; color:var(--muted); line-height:1.7; margin-top:5px; }
.score-grade-note > summary { cursor:pointer; color:var(--dim); font-size:.68rem; }
@media (max-width: 760px) {
  .score-hero-row { grid-template-columns:1fr !important; justify-items:center; }
}
.score-hero-row {
  display:grid; grid-template-columns:170px minmax(0,1fr);
  gap:26px; align-items:start;
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--r); padding:28px 28px 24px;
  margin-bottom:24px; box-shadow:var(--shadow-sm);
}
.score-ring-wrap {
  position:relative; width:120px; height:120px;
  display:flex; align-items:center; justify-content:center;
  flex-shrink:0;
}
/* ★弧のSVGは輪の中央に置く。inset:0 だけだと固定サイズの絶対配置要素は左上に貼り付き、
   輪(140px)より小さいSVG(122px)が9pxずつ左上へずれて「縁がずれている」ように見える
   （soft-white テーマで実測）。margin:auto が4方向の余りを等分する。 */
.score-ring-wrap > svg { margin:auto; }
.score-ring-center {
  position:relative; z-index:1;
  display:flex; flex-direction:column; align-items:center; text-align:center;
}
.score-ring-number {
  font-size:2.1rem; font-weight:900; letter-spacing:-.06em; line-height:1;
}
.score-ring-label {
  font-size:.60rem; font-weight:700; letter-spacing:.12em;
  text-transform:uppercase; color:var(--dim); margin-top:3px;
}
.score-sub-grid {
  display:grid; grid-template-columns:repeat(3,1fr); gap:12px;
}
.score-sub-card {
  background:var(--bg); border-radius:var(--r-sm); padding:14px 16px;
}
.score-sub-val {
  font-size:1.65rem; font-weight:900;
  letter-spacing:-.04em; line-height:1;
}
.score-sub-bar { margin:8px 0 6px; }
.score-sub-lbl {
  font-size:.66rem; color:var(--dim); font-weight:600; letter-spacing:.02em;
}
.score-trend {
  display:inline-flex; align-items:center; gap:1px;
  font-size:.64rem; font-weight:700;
  padding:2px 5px; border-radius:4px;
  margin-left:5px; vertical-align:middle;
}
.score-trend.up   { background:rgba(13,153,102,.1); color:var(--green); }
.score-trend.down { background:rgba(200,32,32,.08); color:var(--red); }
.score-trend.flat { background:rgba(0,0,0,.05); color:var(--dim); }

/* ── Section head with divider ── */
.section-head {
  display:flex; align-items:center; gap:12px;
  margin:32px 0 16px;
}
.section-head-title {
  font-size:.64rem; font-weight:700; letter-spacing:.16em;
  text-transform:uppercase; color:var(--dim); white-space:nowrap;
}
.section-head-line { flex:1; height:1px; background:var(--border); }
.section-head-badge {
  font-size:.64rem; font-weight:700;
  padding:2px 8px; border-radius:999px; white-space:nowrap;
}
.section-head-badge.warn {
  background:rgba(200,32,32,.08); color:var(--red);
  border:1px solid rgba(200,32,32,.15);
}
.section-head-badge.ok {
  background:rgba(13,153,102,.08); color:var(--green);
  border:1px solid rgba(13,153,102,.15);
}
.section-head-badge.neutral {
  background:var(--bg); color:var(--muted);
  border:1px solid var(--border2);
}

/* ── Proposal category colors ── */
.proposal-card[data-cat="google"] { border-left-color:var(--blue); }
.proposal-card[data-cat="ai"]     { border-left-color:#7c3aed; }
.proposal-card[data-cat="content"]{ border-left-color:var(--green); }
.proposal-card[data-cat="tech"]   { border-left-color:var(--orange); }
.prop-cat.cat-google { background:rgba(35,80,212,.07); color:var(--blue); border:none; }
.prop-cat.cat-ai     { background:rgba(124,58,237,.07); color:#7c3aed; border:none; }
.prop-cat.cat-content{ background:rgba(13,153,102,.07); color:var(--green); border:none; }
.prop-cat.cat-tech   { background:rgba(201,95,0,.07); color:var(--orange); border:none; }

/* ── Metric groups ── */
.metric-group { margin-bottom:20px; }
.metric-group-header {
  font-size:.63rem; font-weight:700; letter-spacing:.13em;
  text-transform:uppercase; color:var(--dim);
  margin-bottom:8px; padding-left:4px;
}

/* ── Crawl stat cards ── */
.crawl-stats-grid {
  display:grid; grid-template-columns:repeat(4,1fr);
  gap:12px; margin-bottom:16px;
}
.crawl-stat-card {
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--r); padding:16px; text-align:center;
  box-shadow:var(--shadow-sm);
}
.crawl-stat-val {
  font-size:1.8rem; font-weight:900;
  letter-spacing:-.04em; line-height:1; margin-bottom:5px;
}
.crawl-stat-lbl { font-size:.68rem; color:var(--muted); font-weight:500; }
.crawl-stat-ok   { color:var(--green); }
.crawl-stat-warn { color:var(--orange); }
.crawl-stat-bad  { color:var(--red); }

/* ── Text ellipsis for metric values ── */
.val-ellipsis {
  max-width:220px; overflow:hidden; text-overflow:ellipsis;
  white-space:nowrap; display:inline-block; vertical-align:middle;
}

/* ── Client card: scan-age pill ── */
.cc-age-pill {
  font-size:.62rem; font-weight:600; padding:2px 7px; border-radius:999px;
  background:var(--bg); border:1px solid var(--border2); color:var(--dim);
}
.cc-age-pill.fresh  { background:rgba(13,153,102,.07); color:var(--green); border-color:rgba(13,153,102,.2); }
.cc-age-pill.stale  { background:rgba(176,120,0,.07); color:var(--yellow); border-color:rgba(176,120,0,.2); }
.cc-age-pill.old    { background:rgba(201,95,0,.07); color:var(--orange); border-color:rgba(201,95,0,.2); }

/* ── Hover animation for cards ── */
.card, .card-sm { transition: box-shadow .2s; }
.card:hover { box-shadow:0 2px 6px rgba(0,0,0,.06),0 10px 32px rgba(0,0,0,.09); }

/* ── Detail header bar ── */
.detail-header {
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--r); padding:22px 24px;
  margin-bottom:24px; box-shadow:var(--shadow-sm);
}

/* ── Scan info tag row ── */
.scan-info-tags { display:flex; gap:6px; flex-wrap:wrap; margin-top:12px; }

/* ── Proposals grid: 2-col on wide screens ── */
@media (min-width:1200px) {
  .proposals-grid { grid-template-columns:repeat(3,1fr); }
}

/* ── Folder Drop Zone ── */
.drop-zone {
  border: 2px dashed var(--border2);
  border-radius: var(--r);
  padding: 18px 20px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  background: var(--surface);
  margin-bottom: 24px;
}
.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--blue);
  background: rgba(35,80,212,.03);
}
.drop-zone.dragover { border-style: solid; }
.drop-zone-icon { font-size: 1.5rem; margin-bottom: 6px; }
.drop-zone-label {
  font-size: .82rem; font-weight: 700; color: var(--ink); margin-bottom: 3px;
}
.drop-zone-sub { font-size: .72rem; color: var(--dim); }
.drop-zone-files {
  margin-top: 10px; font-size: .72rem; color: var(--blue); font-weight: 600;
}

/* ── Scan mode modal ── */
.scan-mode-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.35);
  z-index: 500; display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.scan-mode-box {
  background: var(--surface); border-radius: var(--r);
  padding: 28px; max-width: 480px; width: 100%;
  box-shadow: 0 8px 48px rgba(0,0,0,.18);
}
.scan-mode-title { font-size: 1rem; font-weight: 800; color: var(--ink); margin-bottom: 6px; }
.scan-mode-sub   { font-size: .78rem; color: var(--muted); margin-bottom: 20px; line-height: 1.6; }
.scan-mode-opts  { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.scan-mode-opt {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--bg); border: 1.5px solid var(--border2);
  border-radius: var(--r-sm); padding: 14px 16px; cursor: pointer;
  transition: all .15s;
}
.scan-mode-opt:hover, .scan-mode-opt.selected {
  border-color: var(--blue); background: rgba(35,80,212,.04);
}
.scan-mode-opt-icon { font-size: 1.4rem; flex-shrink: 0; }
.scan-mode-opt-title { font-size: .84rem; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.scan-mode-opt-desc  { font-size: .72rem; color: var(--muted); line-height: 1.5; }
.scan-mode-badge {
  font-size: .62rem; font-weight: 700; padding: 2px 7px;
  border-radius: 999px; margin-left: 6px;
  background: rgba(35,80,212,.1); color: var(--blue);
  vertical-align: middle;
}

/* ── Site Coverage Section ── */
.cov-summary {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 16px;
}
.cov-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow-sm);
}
.cov-card-val { font-size: 1.4rem; font-weight: 900; letter-spacing: -.04em; }
.cov-card-bar { margin: 6px 0; height: 4px; background: var(--border); border-radius: 4px; overflow: hidden; }
.cov-card-lbl { font-size: .66rem; color: var(--dim); font-weight: 600; }

.cov-table { width: 100%; border-collapse: collapse; font-size: .74rem; }
.cov-table th {
  font-size: .64rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--dim); padding: 6px 10px; text-align: left;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.cov-table td {
  padding: 8px 10px; border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.cov-table tr:last-child td { border-bottom: none; }
.cov-table tr:hover td { background: var(--bg); }
.cov-dot { display: inline-block; font-size: .82rem; font-weight: 700; line-height: 1; }
.cov-dot.ok   { color: var(--green); }
.cov-dot.ng   { color: var(--red); }
.cov-dot.warn { color: var(--orange); }
.cov-filename { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-family: monospace; font-size: .72rem; }

/* drop zone file chips */
.dz-file-chip {
  display: inline-block; background: rgba(35,80,212,.08); color: var(--blue);
  border: 1px solid rgba(35,80,212,.18); border-radius: 6px;
  font-size: .68rem; font-weight: 600; padding: 2px 8px; margin: 3px 3px 0 0;
}
.dz-file-chip.dz-file-more {
  background: var(--bg); color: var(--dim); border-color: var(--border2);
}

/* scan-mode blue badge variant */
.scan-mode-badge-blue {
  background: rgba(35,80,212,.15); color: var(--blue); font-weight: 800;
}

/* scan source badge */
.source-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .66rem; font-weight: 700; padding: 3px 9px; border-radius: 999px;
}
.source-url      { background: rgba(35,80,212,.08); color: var(--blue); border: 1px solid rgba(35,80,212,.2); }
.source-folder   { background: rgba(176,120,0,.08); color: var(--yellow); border: 1px solid rgba(176,120,0,.2); }
.source-combined { background: rgba(13,153,102,.08); color: var(--green); border: 1px solid rgba(13,153,102,.2); }
.source-local    { background: rgba(201,95,0,.08); color: var(--orange); border: 1px solid rgba(201,95,0,.2); }

@media (max-width: 900px) {
  .cov-summary { grid-template-columns: repeat(2,1fr); }
}

/* ── GEO accent (violet) ──
   紫は「GEOという分野の識別色」（ラベル・アイコン用）に限定する。
   数値とバーまで紫にすると、同じ80点がダッシュボード（採点色=緑）と
   詳細（紫）で違う色になり「GEOだけ問題?」と誤読される事故が実際に起きた。 */
:root { --violet: #7c3aed; }
.geo-accent { color: #7c3aed; }

/* ── Score sub-grid: 4-col when GEO added ── */
/* ★align-items:start だと各カードが自分の中身の高さで止まる。未計測カードだけ説明文が
   長く、実測で 135.4 / 135.4 / 135.4 / 119.1 / 195 と5枚がばらばらだった（2026-09-02）。
   stretch にして、カード側を縦フレックスにし、最下段（評価語・理由）を下端に寄せる。
   ★minmax の下限を 116→150px に上げる。116px は「はみ出さない下限」であって
   「読める下限」ではなく、5枚並ぶ幅では文字が2〜3行に折れて詰まって見えていた。 */
.score-sub-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: stretch; }
.score-sub-card { display:flex; flex-direction:column; }
.score-sub-card > .score-sub-grade,
.score-sub-card > .score-sub-why { margin-top:auto; }
@media (max-width: 900px) {
  .score-sub-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .score-sub-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── スコアヒーローのモバイル是正 ──────────────────────────────
   ★このファイルは「v2」ブロックのベース定義（.score-hero-row=140px 1fr など）が
     前方の @media モバイル上書きより後に書かれており、カスケードで打ち消していた。
     実機390pxでリング左・カード右見切れになっていた（クライアントが見る画面）。
     ソース順で確実に勝つよう、ベース定義より後のここで最終上書きする。
   【規約】ベース宣言は必ずメディアクエリより前に書く。後からベース定義を
   追加する時は、このブロックと同様に「最終上書き」をここより後に置くこと。 */
@media (max-width: 900px) {
  /* ダッシュボードKPI: L430のv2ベース定義(repeat(4,1fr))がL400/410のモバイル
     上書きに後勝ちし、390pxで4列のままラベルが縦1文字組みに崩壊していた（同型事故） */
  .dash-summary { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  /* リングを上・カードを下に積む（横並びをやめる） */
  .score-hero-row {
    grid-template-columns: 1fr;
    justify-items: stretch;
    gap: 18px;
    padding: 20px 16px 18px;
  }
  .score-ring-wrap { justify-self: center; }
  .score-sub-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .score-sub-card { min-width: 0; }          /* grid track からの溢れを止める */
  /* 「未計測＋理由」カードは説明文が長いので、2列に押し込めず横いっぱいで読ませる */
  .score-sub-card--empty { grid-column: 1 / -1; }
  /* 根拠ノートも詰める */
  .score-basis { font-size: .7rem; }
}
@media (max-width: 380px) {
  .score-sub-grid { grid-template-columns: 1fr; }   /* 360/320px は1列に */
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   診断ツリー（領域別） — メイン平易ラベル + サブ専門用語
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.tree-toolbar {
  display:flex; align-items:center; justify-content:space-between;
  margin:2px 0 10px;
}
.tree-legend { display:flex; align-items:center; gap:4px; font-size:.7rem; color:var(--muted); }
.tree-wrap { display:flex; flex-direction:column; gap:10px; }

.tree-group {
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--r); box-shadow:var(--shadow-sm); overflow:hidden;
}
.tree-summary {
  display:flex; align-items:center; gap:12px; padding:14px 18px;
  cursor:pointer; list-style:none; user-select:none;
}
.tree-summary::-webkit-details-marker { display:none; }
.tree-summary:hover { background:var(--surface2); }
.tree-caret { font-size:.7rem; color:var(--dim); transition:transform .15s; flex-shrink:0; }
.tree-group[open] .tree-caret { transform:rotate(90deg); }
.tree-icon { font-size:1.05rem; flex-shrink:0; }
.tree-titles { display:flex; flex-direction:column; gap:1px; flex:1; min-width:0; }
.tree-main { font-size:.92rem; font-weight:700; color:var(--ink); }
.tree-sub  { font-size:.67rem; font-weight:700; letter-spacing:.08em; color:var(--dim); text-transform:uppercase; }
.tree-stat { display:flex; gap:5px; flex-shrink:0; }
.tree-cnt  { font-size:.68rem; font-weight:700; padding:2px 9px; border-radius:999px; }
.cnt-ok   { background:rgba(13,153,102,.1);  color:var(--green); }
.cnt-warn { background:rgba(176,120,0,.12);  color:var(--yellow); }
.cnt-bad  { background:rgba(200,32,32,.1);   color:var(--red); }
.tree-body { border-top:1px solid var(--border); padding:6px 18px 14px; }

.tree-subhead {
  font-size:.67rem; font-weight:700; letter-spacing:.1em; text-transform:uppercase;
  color:var(--dim); margin:16px 0 2px; padding-bottom:5px;
  border-bottom:1px solid var(--border);
}
.tree-leaf {
  display:flex; align-items:flex-start; gap:10px;
  padding:9px 0; border-bottom:1px solid var(--border);
}
.tree-body .tree-leaf:last-child { border-bottom:none; }
/* 状態は色だけで示さない（WCAG 1.4.1）。記号を併記して色覚に依存させない。 */
.leaf-dot {
  width:14px; height:14px; border-radius:50%; flex-shrink:0;
  margin-top:2px; display:inline-flex; align-items:center; justify-content:center;
  font-size:9px; font-weight:800; line-height:1; color:#fff;
  font-family:-apple-system,"Segoe UI Symbol",sans-serif;
}
.leaf-dot-ok   { background:var(--green); }
.leaf-dot-warn { background:var(--yellow); }
.leaf-dot-bad  { background:var(--red); }
.leaf-dot-na   { background:var(--dim); opacity:.4; }
.leaf-dot-ok::before   { content:"✓"; }
.leaf-dot-warn::before { content:"!"; }
.leaf-dot-bad::before  { content:"✕"; font-size:8px; }
.leaf-dot-na::before   { content:"–"; }
.leaf-text { flex:1; min-width:0; }
.leaf-main { font-size:.8rem; font-weight:600; color:var(--ink); }
.leaf-sub  {
  font-size:.66rem; font-weight:600; color:var(--dim);
  background:var(--input); border-radius:5px; padding:1px 7px; margin-left:8px;
  letter-spacing:.03em; white-space:nowrap; vertical-align:1px;
}
.leaf-hint { font-size:.7rem; color:var(--muted); margin-top:2px; line-height:1.6; }
.leaf-val  {
  font-size:.78rem; text-align:right; flex-shrink:0; max-width:46%;
  word-break:break-word; color:var(--ink); line-height:1.6;
}
.leaf-val .schema-chips { justify-content:flex-end; }

.score-sub-tag {
  font-size:.64rem; font-weight:700; color:var(--dim); margin-left:6px;
  letter-spacing:.06em; text-transform:uppercase;
}
.chart-sub { font-size:.66rem; font-weight:700; color:var(--dim); margin-left:6px; letter-spacing:.06em; }

.alert-banner {
  background:rgba(200,32,32,.07); border:1px solid rgba(200,32,32,.3);
  color:var(--red); border-radius:var(--r-sm); padding:12px 16px;
  font-size:.8rem; margin-bottom:18px; line-height:1.7;
}
/* SPA注記。app_public.py の .spa-note と同じ配色（rgba(176,120,0,...)=var(--yellow)）。
   有料のクライアントポータルにも無料の公開App/営業レポートと同じ注記を出す（Task3）。 */
.spa-note {
  background:rgba(176,120,0,.08); border:1px solid rgba(176,120,0,.22);
  color:var(--yellow); border-radius:var(--r-sm); padding:12px 16px;
  font-size:.8rem; margin-bottom:18px; line-height:1.7;
}
/* 複数ページ集約スコープ注記。点数(サイト平均)と実測値・状態表示(代表ページ)の
   スコープが違うことを明示する（2026-08-06、代表1ページの状態表示と全ページ平均の
   点数が同じ行に混在して「◯なのに0点」のように矛盾して見える問題への対応）。
   警告ではなく説明なのでalert-banner/spa-noteとは別トーン(--blue)にする。 */
/* ★<details> になったので、閉じているときは1行の控えめな帯にする（2026-09-01）。
   常時3行の青帯が画面上部を占め、毎回同じ文が読み飛ばされていた。 */
.scope-note {
  background:rgba(35,80,212,.06); border:1px solid rgba(35,80,212,.2);
  color:var(--blue); border-radius:var(--r-sm); padding:9px 16px;
  font-size:.78rem; margin-bottom:18px; line-height:1.7;
}
.scope-note > summary { cursor:pointer; font-size:.74rem; font-weight:600; }
.scope-note[open] { padding:12px 16px; }
.scope-note[open] > summary { margin-bottom:6px; }
/* ★ツリー「これまでの改善と、その効果」の前月比表示（2026-09-01）。
   既存の葉（leaf-val）の中に増減チップと内訳を積む形にして、他のグループと見た目を揃える。 */
.leaf-mom {
  font-size:.68rem; font-weight:700; margin-left:7px; white-space:nowrap;
  font-variant-numeric:tabular-nums;
}
.leaf-mom.up   { color:var(--ok); }
.leaf-mom.down { color:var(--bad); }
.leaf-mom.flat { color:var(--dim); }
.leaf-mom-note {
  display:block; font-size:.64rem; font-weight:400; color:var(--dim);
  line-height:1.5; margin-top:2px; white-space:normal;
}
.hist-summary {
  display:flex; gap:14px; flex-wrap:wrap; align-items:center;
  font-size:.76rem; padding:4px 0 8px;
}
.hist-summary .leaf-mom { margin-left:0; }
/* .hist-head-delta は撤去（見出しの増減チップは実装ごと取りやめ・2026-09-01） */
.crawl-head-row { display:flex; gap:18px; align-items:center; padding:8px 0 12px; }
.score-ring-wrap.sm { width:92px; height:92px; }
.score-ring-number.sm { font-size:1.4rem; }
.ps-cta-row {
  display:flex; align-items:center; justify-content:space-between;
  gap:14px; padding:8px 0 10px; flex-wrap:wrap;
}

@media print {
  .tree-group { break-inside:avoid; }
  .tree-toolbar button, .tree-caret { display:none; }
}

/* ━━ 数値化v2: 配点チップ・領域スコア・月次サマリー・修正依頼パネル ━━ */
.leaf-pts {
  font-size:.64rem; font-weight:700; padding:1px 7px; border-radius:999px;
  margin-left:8px; white-space:nowrap; vertical-align:1px;
}
.pts-full { background:rgba(13,153,102,.1); color:var(--green); }
.pts-part { background:rgba(176,120,0,.12); color:var(--yellow); }
.pts-zero { background:rgba(200,32,32,.1);  color:var(--red); }
.tree-score { font-size:1.05rem; font-weight:800; flex-shrink:0; margin-right:2px; }
.tree-score small { font-size:.64rem; font-weight:600; color:var(--dim); margin-left:1px; }

/* 月次サマリー */
.msum-wrap {
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--r); box-shadow:var(--shadow-sm);
  padding:16px 20px; margin-bottom:24px;
}
.msum-head { font-size:.8rem; font-weight:700; color:var(--ink); margin-bottom:12px; }
.msum-grid {
  display:grid; grid-template-columns:repeat(auto-fit, minmax(130px, 1fr)); gap:10px;
}
.msum-card {
  background:var(--surface2); border:1px solid var(--border);
  border-radius:var(--r-sm); padding:12px 14px;
}
.msum-val { font-size:1.5rem; font-weight:800; line-height:1.2; display:flex; align-items:baseline; gap:6px; flex-wrap:wrap; }
.msum-val small { font-size:.68rem; font-weight:600; color:var(--dim); }
.msum-lbl { font-size:.68rem; color:var(--muted); margin-top:3px; }
.msum-trend { font-size:.68rem; font-weight:700; padding:1px 7px; border-radius:999px; }
.msum-trend.up   { background:rgba(13,153,102,.1); color:var(--green); }
.msum-trend.down { background:rgba(200,32,32,.1);  color:var(--red); }
.msum-trend.flat { background:var(--input); color:var(--dim); }
/* .msum-deltas は撤去（軸スコアの再掲をやめたため・2026-09-01） */
.msum-diff { margin-top:12px; }
.msum-diff summary {
  font-size:.74rem; font-weight:600; color:var(--blue);
  cursor:pointer; list-style:none; user-select:none;
}
.msum-diff summary::-webkit-details-marker { display:none; }
.msum-diff summary::before { content:'▸ '; }
.msum-diff[open] summary::before { content:'▾ '; }
.diff-row {
  display:flex; align-items:center; gap:7px; padding:7px 0;
  border-bottom:1px solid var(--border); font-size:.76rem;
}
.diff-row:last-child { border-bottom:none; }
.diff-row .leaf-dot { margin-top:0; }
.diff-arrow { color:var(--dim); font-size:.7rem; }
.diff-main { font-weight:600; color:var(--ink); }
.diff-val { margin-left:auto; color:var(--muted); font-size:.7rem; text-align:right; }

/* 修正依頼パネル */
.quota-row { display:flex; align-items:center; gap:14px; margin-bottom:4px; flex-wrap:wrap; }
.quota-track {
  flex:1; min-width:160px; height:8px; background:var(--input);
  border-radius:999px; overflow:hidden;
}
.quota-fill { height:100%; background:var(--blue); border-radius:999px; transition:width .3s; }
.quota-fill.full { background:var(--orange); }
.quota-text { font-size:.74rem; color:var(--muted); }
.quota-text strong { color:var(--ink); }
.creq-form { margin-top:12px; display:flex; flex-direction:column; gap:8px; }
.creq-form .form-input { margin:0; }
.creq-form button { align-self:flex-start; }
.creq-form-title { font-size:.8rem; font-weight:700; color:var(--ink); }
.creq-form-empty {
  font-size:.76rem; color:var(--muted); background:var(--input);
  border-radius:var(--r-sm); padding:12px 14px; line-height:1.7;
}
.creq-item {
  display:flex; align-items:flex-start; gap:10px;
  padding:9px 0; border-bottom:1px solid var(--border);
}
.creq-item:last-child { border-bottom:none; }
.creq-item .status-badge { flex-shrink:0; margin-top:1px; }
.creq-item-body { flex:1; min-width:0; }
.creq-item-title { font-size:.78rem; font-weight:600; color:var(--ink); }
.creq-item-detail { font-size:.7rem; color:var(--muted); margin-top:2px; }
.creq-item-note {
  font-size:.7rem; color:var(--green); margin-top:4px;
  background:rgba(13,153,102,.06); border-radius:6px; padding:5px 9px;
}
.creq-item-date { font-size:.68rem; color:var(--dim); flex-shrink:0; }

@media print {
  .msum-diff, .tree-group { break-inside:avoid; }
  .creq-form { display:none; }
  /* ①の4指標は1つのまとまりとして読む数字なので、ページ跨ぎで割らない */
  .cs-chips--quad { break-inside:avoid; }
}

/* ── サイドバーのブランドアイコン（アプリアイコンと統一） ── */
.brand-icon { width: 36px; height: 36px; flex-shrink: 0; }

/* ── クライアント画面: ジャンル別ナビ ── */
.nav-link.cnav { align-items: flex-start; }
.cnav-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cnav-main { font-size: .8rem; }
.cnav-sub {
  font-size: .64rem; font-weight: 700; letter-spacing: .07em;
  color: var(--dim); text-transform: uppercase;
}

/* ── 「AI検索対策」ツリーの子ノード（エンジン別ページへのリンク）── */
.cnav-children { display: flex; flex-direction: column; gap: 1px; margin: 2px 4px 6px 28px; }
.cnav-child {
  display: flex; align-items: center;
  padding: 7px 10px; border-radius: var(--r-sm);
  color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 600;
  border-left: 2px solid var(--border); transition: all .15s;
}
.cnav-child:hover { background: var(--bg); color: var(--ink); }
.cnav-child.active { background: rgba(15,31,61,.07); color: var(--navy); border-left-color: var(--navy); font-weight: 700; }

/* ── AIジャンルページ内の「総合」⇄ エンジン別タブ（サイドバーが隠れるモバイルでも同じ導線を出す）── */
.ai-engine-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.ai-engine-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--border2); background: var(--surface);
  font-family: var(--sans); font-size: .78rem; font-weight: 600; color: var(--muted);
  cursor: pointer; transition: all .15s;
}
.ai-engine-tab:hover { background: var(--bg); color: var(--ink); }
.ai-engine-tab.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ── Evidence実測値を「経営者にとっての意味」に翻訳した1文（evidenceOpportunityLine）── */
.evidence-headline {
  font-size: .84rem; font-weight: 600; line-height: 1.7; color: var(--ink);
  background: var(--bg); border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0; padding: 10px 14px; margin-bottom: 14px;
}

/* ── ジャンルページ ヘッダー ── */
.cs-head {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); box-shadow: var(--shadow-sm);
  padding: 18px 22px; margin-bottom: 20px;
  display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap;
}
.cs-head-l { flex: 1; min-width: 260px; }
.cs-title { font-size: 1.05rem; font-weight: 800; color: var(--ink); margin-bottom: 6px; }
.cs-desc { font-size: .78rem; color: var(--muted); line-height: 1.85; }
.cs-chips { display: flex; gap: 10px; flex-shrink: 0; }
/* ── ①「今月はこうでした」の4指標（お問い合わせ件数／訪問回数／CVR／到達率）──
   ★4枚は常に4枚出す（欠測は「—」）。折り返す前提で幅を配るので、狭い画面では
     2×2 になり、それ以上狭ければ縦1列になる。1枚だけ次の行に落ちる形は作らない。
   ★.cs-chips は元々「見出しの右にぶら下がる固定幅の並び」だったので flex-shrink:0。
     こちらは器の全幅を4等分する並びなので、ここで上書きする。 */
.cs-chips--quad {
  flex-wrap: wrap;
  flex-shrink: 1;
  gap: 12px;
}
.cs-chips--quad > .cs-chip {
  flex: 1 1 150px;
  min-width: 0;   /* ★flex項目の既定 min-width:auto を解除。これが無いと下の折り返し指定が効かない */
}
/* ★但し書きを折り返させる（.leaf-sub の既定は white-space:nowrap）。
   幕1のチップで**まったく同じ罠**を踏んでいる: nowrap の但し書きが min-content を押し上げ、
   390px で中身が画面外へはみ出していた。ここは値より説明が長い（「来訪30回のうち3回
   （実測できた9日分）」）ので、必ず折り返す。ラベルの直後ではなく次の行から始める。 */
.cs-chips--quad .leaf-sub {
  white-space: normal;
  display: block;
  margin-left: 0;
  margin-top: 4px;
  background: none;
  padding: 0;
  line-height: 1.6;
}
/* 主役（お問い合わせ件数）は枠線でも見分けられるようにする。色だけに頼らない。
   ★soft-white-ui.css が .cs-chip に border ショートハンドを後から当てるので、
     同じ詳細度では負ける。子セレクタで1段上げて取り返す（詳細度で殴らない範囲）。 */
.cs-chips--quad > .cs-chip--lead { border-color: var(--accent); }
@media (max-width: 900px) {
  /* 4枚を2×2に。150px指定のままだと3+1に割れて、最後の1枚が孤立して見える */
  .cs-chips--quad > .cs-chip { flex: 1 1 calc(50% - 12px); }
}
@media (max-width: 480px) {
  .cs-chips--quad > .cs-chip { flex: 1 1 100%; }
}
.cs-chip {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 12px 16px; min-width: 130px;
}
.cs-chip-val { font-size: 1.7rem; font-weight: 800; line-height: 1.2; display: flex; align-items: baseline; gap: 6px; }
.cs-chip-val small { font-size: .68rem; font-weight: 600; color: var(--dim); }
.cs-chip-lbl { font-size: .68rem; color: var(--muted); margin-top: 3px; }

/* ── 未計測の枠：空欄で放置せず、理由と対処を書く ───────────────── */
.score-sub-card--empty { opacity: .78; }
.score-sub-why {
  margin-top: 6px; font-size: .68rem; line-height: 1.55; color: var(--muted);
}
.score-sub-how { color: var(--accent); }
.score-sub-how b { font-weight: 600; }

/* ── 総合スコアの根拠：どの軸を何%で使ったか（読み手が検算できるように）── */
.score-basis {
  margin-top: 14px; padding: 9px 14px;
  font-size: .72rem; line-height: 1.7; color: var(--muted);
  background: var(--bg-subtle, rgba(0,0,0,.02));
  border-left: 2px solid var(--border);
  border-radius: 0 6px 6px 0;
}
.score-basis b { color: var(--text); font-weight: 600; }

/* ── 計測が客のサイトを向いていないときの注記（①カード内）───────────────
   数字を出さない代わりに理由を書く帯。警告色にはするが、事故ではないので赤にはしない。 */
.cv-hostwarn {
  margin-top: 12px; padding: 10px 14px;
  background: rgba(176,120,0,.08); border: 1px solid rgba(176,120,0,.28);
  border-radius: var(--r-sm);
  font-size: .76rem; line-height: 1.85; color: var(--ink);
}
.cv-hostwarn b { font-weight: 700; }

/* ── ②「今月のサイト評価」カードの右下（2026-09-02 指定）─────────────────
   「総合スコアは◯軸から算出…」と「採点したページの範囲について」を、カードの外ではなく
   **中の右下**へ置く。点数と、その点数の但し書きが別の器に離れていたのを1つにまとめる。
   .score-hero-row は 2列グリッド（180px + 1fr）なので、全幅を張って右へ寄せる。 */
/* ★5枚と但し書きを**1つのセル**に入れる（2026-09-03 指定）。
   以前は但し書きだけ `grid-column: 2` の**2行目**に置いていたため、1行目の高さ
   （＝背の高い左カラム: リング＋評価語＋「点数の目安」で202px）を消化してから
   始まっていた。5枚は592で終わるのに但し書きは666から＝**74pxの空き帯**ができ、
   「おおむね良好」の真横が抜けて見えていた（本番で実測）。
   ★列を持つのを器（.score-right）にすると、
     ・但し書きの `grid-column` / `justify-self` が要らなくなる
     ・900px以下で全幅に戻す上書きも要らなくなる（器ごと1列に落ちるだけ）
   このファイルは 760px !important / 900px / 640px の3か所で列を畳んでいるので、
   特別扱いを減らせる形の方が事故りにくい。 */
.score-right { display: grid; gap: 12px; min-width: 0; }
.score-foot {
  max-width: 100%;
  margin-top: 0;
  text-align: left;
}
/* ★カードの中に入った以上、外に置いていた時の重さのままだと主役（点数）を食う。
   背景と枠を落として、点数の但し書きらしい見た目にする。 */
.score-foot .score-basis {
  margin-top: 0; text-align: left;
  background: none; border-left: 0; padding: 0;
  font-size: .7rem; color: var(--dim);
}
.score-foot .scope-note {
  margin: 6px 0 0; text-align: left;
  background: none; border: 0; padding: 0;
  color: var(--muted); font-size: .72rem;
}
.score-foot .scope-note > summary { font-size: .72rem; color: var(--blue); }
.score-foot .scope-note[open] { padding: 0; }
/* 空のときに余白だけ残さない */
.score-foot:empty { display: none; }


/* ── 来訪経路の内訳（②カード下部・横棒）───────────────────────────
   ★合計は出さない。訪問の絶対値は①の4指標に一本化してある。 */
/* カードのいちばん下。上の行との区切りに細い線を1本だけ引く */
.score-bottom {
  grid-column: 1 / -1;
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--border);
}
.score-bottom:empty { display: none; }
.chmix { margin-top: 0; }
.chmix-head {
  font-size: .78rem; font-weight: 700; color: var(--ink);
  margin-bottom: 10px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px;
}
.chmix-sub { font-size: .68rem; font-weight: 400; color: var(--dim); }
.chmix-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.chmix-lbl {
  width: 190px; flex-shrink: 0; text-align: right;
  font-size: .76rem; color: var(--muted); line-height: 1.5;
}
.chmix-track {
  flex: 1; min-width: 0; height: 14px; border-radius: 7px;
  background: var(--input, rgba(0,0,0,.06)); overflow: hidden;
}
.chmix-bar { height: 100%; min-width: 3px; border-radius: 7px; background: var(--accent); }
.chmix-val { width: 96px; flex-shrink: 0; text-align: right; font-size: .78rem; font-weight: 700; color: var(--ink); }
.chmix-val small { font-size: .66rem; font-weight: 400; color: var(--dim); margin-left: 1px; }
.chmix-pct { display: block; font-size: .66rem; font-weight: 400; color: var(--dim); }
/* 経路の内訳を出せないときの一行（別サイトの内訳を客の実績として出さないため） */
.chmix-none { font-size: .76rem; line-height: 1.85; color: var(--muted); }
@media (max-width: 600px) {
  /* ラベルを上に逃がす（190px固定だと棒が消える） */
  .chmix-row { flex-wrap: wrap; }
  .chmix-lbl { width: 100%; text-align: left; }
  .chmix-val { width: auto; min-width: 74px; }
}

/* ── スマホのタップ領域・可読性（UI/UXレビュー 2026-07-25） ──
   店舗オーナーはスマホで見る前提。小ボタンとリンクは指で確実に押せる高さ（44px近辺）へ。
   ※このブロックはファイル末尾に置いてカスケードで必ず勝たせる（前方の基本宣言を参照） */
@media (max-width: 600px) {
  .btn-sm { padding: 12px 16px; font-size: .82rem; }
  .btn-xs { padding: 10px 14px; font-size: .78rem; }
  .leaf-sub { font-size: .7rem; }
}

/* ── クライアント画面のスマホナビ（上部タブバー + FAB） ──
   ≤600px: 左の絵文字レールを消し、日本語ラベル付きの横スクロールタブに切り替える。
   管理画面（body.client-pageなし）は従来の56pxレールのまま。 */
.cnav-top { display: none; }
.fab-top { display: none; }
@media (max-width: 600px) {
  body.client-page #sidebar { display: none; }
  body.client-page #main { margin-left: 0; }
  body.client-page .cnav-top {
    position: sticky; top: 0; z-index: 40;
    display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch;
    background: var(--bg); padding: 10px 14px;
    margin: -18px -18px 16px; border-bottom: 1px solid var(--border);
    scrollbar-width: none;
  }
  body.client-page .cnav-top::-webkit-scrollbar { display: none; }
  .cnav-tab {
    flex: 0 0 auto; display: flex; align-items: center; gap: 6px;
    min-height: 44px; padding: 8px 14px; border-radius: 999px;
    border: 1px solid var(--border2); background: var(--surface);
    font-family: var(--sans); font-size: .8rem; font-weight: 600; color: var(--muted);
    cursor: pointer;
  }
  .cnav-tab.active { background: var(--navy); color: #fff; border-color: var(--navy); }
  body.client-page .fab-top {
    position: fixed; right: 14px; bottom: 18px; width: 48px; height: 48px;
    border-radius: 50%; background: var(--navy); color: #fff; border: none;
    font-size: 1.15rem; box-shadow: var(--shadow); z-index: 45;
    align-items: center; justify-content: center; cursor: pointer;
  }
}

/* ── 接続・スキャン設定の折りたたみ（管理・詳細ページ） ── */
.setup-fold { margin-bottom: 20px; }
.setup-fold > summary {
  cursor: pointer; list-style: none; user-select: none;
  font-size: .82rem; font-weight: 700; color: var(--muted);
  padding: 12px 16px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-sm);
}
.setup-fold > summary:hover { color: var(--ink); }
.setup-fold > summary::before { content: '▸ '; color: var(--dim); }
.setup-fold[open] > summary { border-radius: var(--r-sm) var(--r-sm) 0 0; }
.setup-fold[open] > summary::before { content: '▾ '; }
.setup-fold[open] > .card, .setup-fold[open] > div { margin-top: 10px; }

/* クライアント総合ページの内訳チャート折りたたみ。
   ★「押すと開く」が一目で分かるプルダウンバーにする（枠＋右端に回転する▼）。
   以前はマーカーを消したのに開く印が無く、クリックすると突然チャートが現れて驚く事故があった */
.charts-fold > summary {
  list-style: none; user-select: none; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface2, rgba(120,130,150,.06));
  padding-left: 14px !important; padding-right: 14px !important;
  transition: background .15s ease;
}
.charts-fold > summary:hover { background: var(--surface3, rgba(120,130,150,.13)); }
.charts-fold > summary::-webkit-details-marker { display: none; }
.charts-fold > summary::after {
  content: '▼'; margin-left: auto; font-size: .72em; color: var(--muted);
  transition: transform .2s ease; flex: 0 0 auto;
}
.charts-fold[open] > summary::after { transform: rotate(180deg); }
.charts-fold[open] > summary { border-radius: 10px 10px 0 0; }

/* 小さめの折りたたみ（改善の下書き / AIの回答 / 機会損失の根拠）も同じ▼プルダウン印に統一。
   ネイティブ三角は環境差が大きく「開くと変わる」が伝わりにくいため、回転する▼を明示する */
.mini-fold > summary, .opp-method > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
}
.mini-fold > summary::-webkit-details-marker,
.opp-method > summary::-webkit-details-marker { display: none; }
.mini-fold > summary::before, .opp-method > summary::before {
  content: '▼'; font-size: .78em; display: inline-block; transition: transform .2s ease;
}
.mini-fold[open] > summary::before, .opp-method[open] > summary::before { transform: rotate(180deg); }
.mini-fold > summary:hover, .opp-method > summary:hover { text-decoration: underline; }

/* ヒアリング（取材フォーム）の選択チップ。タップで選ぶ＝タイピング摩擦を最小化 */
.hchips { display: flex; flex-wrap: wrap; gap: 8px; }
.hchip {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none;
  border: 1px solid var(--border); border-radius: 999px; padding: 6px 13px;
  font-size: .82rem; background: var(--surface); transition: all .12s ease;
}
.hchip input { margin: 0; width: 0; height: 0; position: absolute; opacity: 0; }
.hchip:hover { border-color: var(--accent); }
.hchip:has(input:checked) {
  border-color: var(--accent); color: var(--accent); font-weight: 700;
  background: var(--input, rgba(35,80,212,.08));
}
.hchip:has(input:checked)::before { content: '✓ '; }

/* ── 取材ウィザード（逐次入力・1問1画面）── */
.wiz-progress { height: 5px; border-radius: 999px; background: var(--border); overflow: hidden; margin-bottom: 16px; }
.wiz-bar { height: 100%; background: var(--accent); border-radius: 999px; transition: width .28s ease; }
.wiz-step-no {
  font-size: .74rem; color: var(--muted); font-weight: 700; letter-spacing: .04em;
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.wiz-req, .wiz-opt {
  font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; letter-spacing: 0;
}
.wiz-req { color: var(--accent); background: var(--input, rgba(35,80,212,.1)); }
.wiz-opt { color: var(--muted); background: var(--border); }
.wiz-title { font-size: 1.18rem; font-weight: 800; line-height: 1.5; text-wrap: balance; margin-bottom: 6px; }
.wiz-hint { font-size: .8rem; color: var(--muted); line-height: 1.8; margin-bottom: 14px; }
.wiz-input { margin-bottom: 18px; }
.wiz-seeds { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.wiz-seed {
  font-size: .78rem; padding: 5px 11px; border-radius: 999px; cursor: pointer;
  border: 1px dashed var(--border2, var(--border)); background: var(--surface); color: var(--muted);
  transition: all .12s ease;
}
.wiz-seed:hover { border-style: solid; border-color: var(--accent); color: var(--accent); }
.wiz-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.wiz-skiprest {
  display: block; margin: 14px auto 0; background: none; border: none; cursor: pointer;
  font-size: .78rem; color: var(--accent); text-decoration: underline; text-underline-offset: 3px;
}
.wiz-review { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.wiz-rev-row { display: flex; gap: 12px; padding: 9px 13px; font-size: .84rem; line-height: 1.7; }
.wiz-rev-row:nth-child(even) { background: var(--input, rgba(0,0,0,.03)); }
.wiz-rev-k { flex: 0 0 96px; color: var(--muted); font-weight: 700; font-size: .78rem; }
.wiz-rev-v { flex: 1; white-space: pre-wrap; word-break: break-word; }

/* ── 取材チャット（キャッチボール）── */
.chat.card { padding: 0; overflow: hidden; }
.chat-log { max-height: 58vh; overflow-y: auto; padding: 16px 16px 6px; display: flex; flex-direction: column; gap: 10px; }
.chat-row { display: flex; gap: 8px; align-items: flex-end; }
.chat-row.me { flex-direction: row-reverse; }
.chat-av { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center;
  background: var(--input, rgba(35,80,212,.1)); font-size: .9rem; }
.chat-bub { max-width: 80%; padding: 9px 13px; border-radius: 14px; font-size: .86rem; line-height: 1.75;
  white-space: pre-wrap; word-break: break-word; }
.chat-row.bot .chat-bub { background: var(--input, rgba(0,0,0,.05)); border-bottom-left-radius: 4px; }
.chat-row.me .chat-bub { background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.chat-hint { font-size: .76rem; opacity: .8; line-height: 1.7; margin-top: 4px; }
.chat-opt { font-size: .66rem; font-weight: 700; padding: 1px 7px; border-radius: 999px;
  background: var(--surface); color: var(--muted); }
.chat-input { border-top: 1px solid var(--border); padding: 12px 16px; display: flex; flex-direction: column; gap: 8px;
  background: var(--surface); }
.chat-quick { display: flex; flex-wrap: wrap; gap: 7px; }
.qchip { font-size: .82rem; padding: 8px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border2, var(--border)); background: var(--surface); color: inherit; transition: all .12s ease; }
.qchip:hover { border-color: var(--accent); color: var(--accent); background: var(--input, rgba(35,80,212,.06)); }
.qchip.skip { color: var(--muted); border-style: dashed; }
.chat-send-btns { display: flex; justify-content: flex-end; gap: 8px; align-items: center; }
.chat-done { align-self: center; background: none; border: none; cursor: pointer; margin-top: 2px;
  font-size: .78rem; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.chat-recap { margin-bottom: 4px; }
.chat-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

/* ── AI生成の複数案（選択カード・390px縦積み主戦場）── */
.ai-cands { display: flex; flex-direction: column; gap: 10px; }
.ai-cand { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; transition: border-color .12s ease, box-shadow .12s ease; }
.ai-cand.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.ai-cand-head {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 12px 14px; background: var(--surface); border: none; cursor: pointer;
  font-family: inherit; font-size: .9rem; color: inherit;
}
.ai-cand.sel .ai-cand-head { background: var(--input, rgba(35,80,212,.06)); }
.ai-cand-head:hover { background: var(--input, rgba(0,0,0,.03)); }
.ai-cand-dot {
  flex: 0 0 auto; width: 16px; height: 16px; border-radius: 999px;
  border: 2px solid var(--border2, var(--border)); box-sizing: border-box;
}
.ai-cand.sel .ai-cand-dot { border-color: var(--accent); background:
  radial-gradient(circle, var(--accent) 0 4px, transparent 5px); }
.ai-cand-label { flex: 0 0 auto; font-weight: 800; font-size: .82rem; color: var(--accent); }
.ai-cand-title { flex: 1 1 auto; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-cand-badges { flex: 0 0 auto; display: flex; gap: 5px; flex-wrap: wrap; }
.ai-badge {
  font-size: .67rem; font-weight: 700; padding: 2px 7px; border-radius: 999px;
  background: var(--border); color: var(--muted); white-space: nowrap;
}
.ai-badge.warn { background: var(--input, rgba(178,106,0,.12)); color: var(--orange); }
.ai-cand-prev { padding: 0 14px 12px; font-size: .78rem; color: var(--muted); line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ai-cand-body { padding: 4px 14px 14px; }
.ai-cand-checks {
  font-size: .74rem; color: var(--orange); line-height: 1.7; margin-bottom: 8px;
  padding: 8px 12px; background: var(--input, rgba(178,106,0,.08));
  border-left: 3px solid var(--orange); border-radius: 8px;
}

/* ── 合鍵の取り方ガイド（WordPress画面の再現・非技術クライアント向け）── */
.wpg-body { margin-top: 10px; }
.wpg-note { font-size: .72rem; color: var(--muted); margin: 6px 0 12px; line-height: 1.7; }
.wpg-note b { color: var(--fg, inherit); }
.wpg-warn { margin-top: 14px; font-size: .76rem; color: var(--orange, #b26a00); line-height: 1.8;
  background: var(--input, rgba(178,106,0,.08)); border-radius: 8px; padding: 9px 13px; }

/* WordPress管理画面の再現（本物どおりの見た目＝テーマ非依存の固定色）*/
.wpx { border: 1px solid #c3c4c7; border-radius: 8px; overflow: hidden;
  box-shadow: 0 3px 10px rgba(0,0,0,.12); margin: 4px 0 2px; }
.wpx-frame { display: flex; background: #f0f0f1;
  font-family: -apple-system, "Hiragino Sans", "Yu Gothic UI", sans-serif; color: #1d2327; }
.wpx-side { flex: 0 0 132px; background: #1d2327; color: #c3c4c7; padding: 6px 0; font-size: 11px; }
.wpx-si { padding: 6px 12px; white-space: nowrap; }
.wpx-si.active { background: #2271b1; color: #fff; font-weight: 700; }
.wpx-sub { padding: 5px 12px 5px 24px; background: #2c3338; color: #72aee6; font-size: 10.5px; }
.wpx-main { flex: 1 1 auto; min-width: 0; padding: 14px 16px; }
.wpx-h { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.wpx-p { font-size: 11px; color: #50575e; line-height: 1.7; margin-bottom: 12px; }
.wpx-label { font-size: 11.5px; font-weight: 600; margin-bottom: 5px; }
.wpx-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 13px; }
.wpx-input { display: inline-block; border: 1px solid #8c8f94; border-radius: 4px; padding: 5px 9px;
  font-size: 12px; background: #fff; color: #2c3338; min-width: 96px; box-shadow: inset 0 1px 2px rgba(0,0,0,.06); }
.wpx-btn { display: inline-block; border: 1px solid #2271b1; background: #f6f7f7; color: #2271b1;
  border-radius: 4px; padding: 5px 12px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.wpx-notice { background: #fff; border: 1px solid #c3c4c7; border-left: 4px solid #00a32a;
  border-radius: 4px; padding: 9px 13px; }
.wpx-pwrow { display: flex; align-items: center; gap: 8px; margin: 6px 0; flex-wrap: wrap; }
.wpx-pw { font-family: var(--mono, ui-monospace, monospace); background: #f0f0f1; border: 1px solid #c3c4c7;
  border-radius: 4px; padding: 5px 10px; font-size: 12.5px; letter-spacing: 1.5px; color: #1d2327; }
.wpx-small { font-size: 10.5px; color: #50575e; line-height: 1.6; }
.wpx-badge { display: inline-flex; width: 19px; height: 19px; border-radius: 50%; background: #d63638;
  color: #fff; font-size: 11px; font-weight: 700; align-items: center; justify-content: center;
  flex: 0 0 auto; box-shadow: 0 1px 3px rgba(214,54,56,.4); }
.wpx-legend { list-style: none; padding: 0; margin: 13px 0 0; display: flex; flex-direction: column; gap: 8px; }
.wpx-legend li { display: flex; align-items: flex-start; gap: 9px; font-size: .8rem; line-height: 1.65; color: var(--fg, inherit); }
.wpx-legend b { font-weight: 700; }
@media (max-width: 520px) { .wpx-side { flex-basis: 104px; font-size: 10px; } .wpx-main { padding: 11px 12px; } }

/* ── 詳細ヘッダーのドロップダウンメニュー（スキャン▾ / …） ── */
.dd { position: relative; display: inline-block; }
.dd > summary { list-style: none; user-select: none; display: inline-flex; align-items: center; }
.dd > summary::-webkit-details-marker { display: none; }
.dd-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 60;
  min-width: 250px; background: var(--surface);
  border: 1px solid var(--border2); border-radius: 10px;
  box-shadow: var(--shadow); padding: 6px;
  display: flex; flex-direction: column; gap: 2px;
}
.dd-menu.dd-right { left: auto; right: 0; }
.dd-menu button {
  display: flex; flex-direction: column; gap: 2px; text-align: left;
  padding: 10px 12px; border-radius: 8px; cursor: pointer;
  background: none; border: none; font-family: var(--sans);
  font-size: .8rem; font-weight: 600; color: var(--ink);
}
.dd-menu button:hover { background: var(--bg); }
.dd-menu button span { font-size: .68rem; color: var(--muted); font-weight: 400; }
.dd-menu .dd-danger b { color: var(--red); }
@media (max-width: 600px) {
  .dd-menu { min-width: 220px; }
}

/* キャンバス編集: プレビューiframeに重ねる選択オーバーレイ */
/* ★選択中とホバーが**同系色の青**で、スクロール中にカーソルが他の部品を撫でると
   どれが選択中か分からなくなっていた（実測: ホバー rgba(35,80,212,.45) と
   選択 #2350d4 は同じ色相）。ホバーは薄い点線、選択は実線＋白フチ＋「選択中」の札にして、
   色だけに意味を持たせない（[[色だけに意味を持たせない]]と同じ考え方）。 */
.cv-box { border: 2px solid transparent; border-radius: 4px; transition: border-color .12s; }
.cv-box:hover { border-color: rgba(35, 80, 212, .22); border-style: dashed; }
.cv-box-sel, .cv-box-sel:hover {
  border-color: var(--accent, #2350d4); border-style: solid;
  box-shadow: 0 0 0 2px rgba(35, 80, 212, .18) inset, 0 0 0 3px rgba(255, 255, 255, .8);
}
/* ★上端の箱では札が #cv-mini の overflow:hidden に切られて1枚も見えない。
   追従ヘッダーは常に最上部なので、そこを触る限り「いま何を選んでいるか」の
   手掛かりが枠線の太さだけになる。上端では箱の下に出す。 */
.cv-box-sel.cv-box-label-below::after { top:auto; bottom:-18px; border-radius:0 0 4px 4px; }

/* ★札は「何を選んだか」を言う（2026-09-07）。data-cv-name はオーバーレイを描く側
   （_cvPartName）が入れる。取れなかったときは '選択中' に落ちる——名前を推測しない。 */
.cv-box-sel::after {
  content: attr(data-cv-name); position: absolute; left: -2px; top: -18px;
  font-size: 10px; line-height: 16px; padding: 0 6px; border-radius: 4px 4px 0 0;
  background: var(--accent, #2350d4); color: #fff; white-space: nowrap; pointer-events: none;
}
/* ── 上部リボン（横軸で書式を設定する・Word/PowerPoint と同じ位置）──────
   ★プレビューの上に**貼り付ける**。送っても消えないので、下の方を直しているときも
     手が届く（消えると、直すたびに上へ戻ることになる）。
   ★狭い画面では横に流す。畳んで隠すと「その機能が無い」と受け取られる。 */
/* ★リボンとプレビューを**1つの器**で貼り付ける。別々に position:sticky; top:0 に
   すると、どちらも同じ高さに来て**リボンがプレビューの上端を覆う**
   （実測: ホイールもクリックもリボンに吸われ、プレビューが1pxも動かなくなった）。
   器ごと貼れば、中は普通に縦に並ぶので重ならない。 */
.cv-stick {
  /* ★器は**画面の高さいっぱい**を占めるようになった（2026-09-03）ので、浮かせたカード
     （#cv-dock）と重なる面積が一気に増えた。61 のままだとカードが器の下敷きになり、
     中のボタンが押せない（実測: 作成ボタンの真上が cv-topbar だった）。
     カード(60)より下に置く。リボンを覆わない保証は z-index ではなく
     _cvPositionDock の幾何（リボンの下端より下にしか置かない）が持っている。 */
  position: sticky; top: 0; z-index: 5;
  background: var(--bg, #eef1f6);
}
.cv-ribbon {
  /* ★z-index は浮かせたカード(.cv-dock=60)**より上**。位置でも重ならないようにして
     いるが（_cvPositionDock がリボンの下端より下へ置く）、万一重なったときに
     **道具そのものが押せなくなる**方が悪い。両方で守る。 */
  position: relative; z-index: 2;
  background: var(--surface, #fff); border: 1px solid var(--border, #2a2f3a);
  border-radius: 8px; margin-bottom: 10px; padding: 6px 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}
/* ★**1行**に収める（折り返さない）。折り返すと 119px まで伸びて、その分だけ
   プレビューが下がる——実測（窓950px）で、プレビューの中央が画面の外に出て
   ホイールが届かなくなった。入り切らない分は横に流す。
   ★畳んで隠さない——「入り切らないから隠す」は、機能が無いのと同じに見える。 */
/* ★2026-09-03に本物のSafariで実測: 操作子が15個になり、行が 1600px / 器が 1166px＝
   **434px はみ出して「書式コピー」と「書式クリア」が画面の外**に居た（右端 1568/1660 に対し
   器の右端 1461）。横に流せば触れる、は理屈であって、ツールバーを横スクロールする客は居ない。
   ＝「入り切らないから隠す」と実質同じだった。折り返して**必ず全部見える**形にする。
   高さが変わる分はプレビューが下がるだけ（プレビュー自身がスクロールする）。
   ★折り返しても位置が動かないよう、対象ラベルの幅は固定してある（min-width）。 */
.cv-ribbon-in {
  /* ★横の隙間を 6px→4px（2026-09-08）。操作子は20個以上あるので、1つ2px でも
     40px 以上戻る。折り返す境界がそれだけ細い窓まで下がる＝「窓幅を変えたら
     サイトが 34px 動く」が起きにくくなる。縦（row-gap）は詰めない——2行になった
     ときに行どうしがくっつくと、どのボタンがどの行か分からなくなる。 */
  display: flex; align-items: center; gap: 4px;
  flex-wrap: wrap; row-gap: 6px;
}
/* ★幅で案内文を隠さない（2026-09-05・実測で確定した欠陥）。「範囲と部品ぜんぶで効き方が違う」を
   説明する唯一の文で、1200px 未満＝多くのノートPCで一度も出ていなかった。
   「入り切らないから隠す」は機能が無いのと同じ（上の方針と同じ）。 */
.cv-ribbon-sep { width: 1px; height: 20px; background: var(--border, #2a2f3a); margin: 0 2px; flex: 0 0 auto; }
.cv-ribbon-lbl { font-size: .68rem; color: var(--muted); margin: 0 2px; flex: 0 0 auto; }
/* ★案内文は「操作子」ではないのに 231px＝はみ出しの半分を1人で食っていた。
   操作子と場所を取り合わせない——自分の行に落とす（flex-basis 100%）。
   ★同じ選択子の宣言をあとから足して上書きしない。詳細度の勝ち負けに寄りかかると、
     別のファイルの同名クラスで静かに壊れる（過去に実踏）。ここを直接直す。 */
/* ★案内文は自分の行を丸ごと持っている（flex:1 0 100%・高さ16.8px）。
   「選んだ文字」の札はここへ**絶対配置**で乗せる（2026-09-08）。操作子の行に
   置くと、範囲を選んだ瞬間に 108.4px 割り込んで1行増え、サイトが 34px 下がる
   ——「出し入れせず場所は常に確保する」を ✓ と 位置 で2回やった、その3件目。
   案内文の行に乗せれば行数は増えない（札 20.8px は案内文の行に収まる）。 */
.cv-ribbon-hint { font-size: .68rem; color: var(--dim); flex: 1 1 0; min-width: 0; margin-left: 6px;
                  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* いま何に効くか。範囲を選んでいるときは色を変えて、押す前に分かるようにする */
.cv-ribbon-target {
  font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: var(--surface2, rgba(128,132,148,.12)); color: var(--muted); flex: 0 0 auto;
  /* ★文言で幅が変わると、後ろのボタンが全部ずれる。「この部品ぜんぶ」→「選んだ文字」で
     92px→70px＝**22px 左へ**動くのを本番で実測（2026-09-03）。文字を選んでから
     太字を押す——という一番よくある手順の途中で、狙っていたボタンが指の下から逃げる。
     一番長い文言の幅で固定して、姿が変わっても行が動かないようにする。 */
  min-width: 6.4rem; text-align: center;
}
/* ★札は範囲を選んだときだけ出す（それ以外は言うことが無く、幅だけ取る）。
   DOM からは消さない——消すと _cvUpdateRibbonTarget が el=null で早期 return する。 */
.cv-ribbon-target { display: none; }
.cv-ribbon-target.is-range {
  display: inline-flex; background: var(--accent, #2350d4); color: #fff;
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%); margin: 0;
}
.cv-rb {
  min-width: 30px; height: 28px; padding: 0 7px; flex: 0 0 auto;
  border: 1px solid transparent; border-radius: 6px; background: transparent;
  color: var(--ink); font-size: .82rem; cursor: pointer; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 3px;
}
.cv-rb:hover { background: var(--surface2, rgba(128,132,148,.14)); }
.cv-rb.is-active { background: var(--accent, #2350d4); color: #fff; border-color: transparent; }
.cv-rb-sel {
  height: 28px; border: 1px solid var(--border, #2a2f3a); border-radius: 6px;
  background: var(--surface, #fff); color: var(--ink); font-size: .74rem; padding: 0 4px;
  /* ★1行に収まる幅にする（2026-09-07・実測 1168px の中で内訳を合わせた）。
     150 のままだと合計 1185px で 17px はみ出し、「▾ こまかい書式」だけが次の行へ落ちて
     ツールバーが1段増える＝その分サイトが下がる。中身は開けば全部読める。
     ★2026-09-08 に 118→84px。**リボンで一番幅を食っている操作子**がこれで、
     ここを詰めると折り返す境界が一番大きく下がる。選んでいる書体の名前は
     切れても、開けば全部読めるし title にも入っている。 */
  max-width: 84px; flex: 0 0 auto;
}
.cv-rb-chip { width: 12px; height: 12px; border-radius: 3px; border: 1px solid rgba(0,0,0,.2); display: inline-block; }

/* 色を選ぶ小窓 */
.cv-color-pop {
  position: fixed; z-index: 70; width: 252px; padding: 10px;
  background: var(--surface, #fff); border: 1px solid var(--border, #2a2f3a);
  border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
}
.cv-color-head { font-size: .7rem; color: var(--muted); margin: 2px 0 6px; }
.cv-color-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 8px; }
.cv-sw {
  width: 100%; aspect-ratio: 1; border-radius: 6px; cursor: pointer;
  border: 1px solid rgba(0, 0, 0, .18);
}
.cv-sw.is-active { outline: 2px solid var(--accent, #2350d4); outline-offset: 1px; }
.cv-color-free { display: flex; gap: 6px; align-items: center; }
.cv-color-free input[type="color"] { width: 32px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; }
.cv-color-free .form-input { flex: 1; min-width: 0; height: 28px; font-size: .76rem; }
.cv-color-foot { margin-top: 8px; text-align: right; }

/* 書式のコピー（刷毛）を構えている間 */
.cv-painting, .cv-painting .cv-box { cursor: copy !important; }

/* 反映ボタンの行。上の中身との区切り線は、**上に何かあるときだけ**引く。
   反映ボタンだけの姿（何も選んでいない）で区切り線と余白を出すと、線の上に空の帯が
   残って別のカードが重なっているように見える。 */
.cv-publish-row { border-top: 1px solid var(--border, #2a2f3a); margin-top: 12px; padding-top: 12px; }
.cv-publish-row:first-child { border-top: 0; margin-top: 0; padding-top: 0; }

/* ── 改善提案・ヒートマップが指している箇所の目印 ──────────────────
   ★選択枠（青）と**別の色・別の形**にする。同じ青だと「選んだ物」と
     「問題の物」が見分けられない。 */
.cv-box-issue {
  border-color: var(--red, #c0392b) !important; border-style: solid !important;
  box-shadow: 0 0 0 2px rgba(192, 57, 43, .14) inset, 0 0 0 3px rgba(255, 255, 255, .75);
}
.cv-box-issue::before {
  content: '!'; position: absolute; right: -9px; top: -9px; width: 18px; height: 18px;
  border-radius: 50%; background: var(--red, #c0392b); color: #fff;
  font-size: 12px; font-weight: 700; line-height: 18px; text-align: center;
  pointer-events: none; box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}
/* ★選択中と問題が重なったときは、選択の札を優先して読ませる（両方出すと重なる） */
.cv-box-issue.cv-box-sel::before { top: -9px; right: -9px; }

/* ── 箱の大きさを指で変える取っ手 ─────────────────────────────
   ★選択中の箱にだけ出す。常時出すと、押したい文字の上に取っ手が乗って選べなくなる。 */
.cv-grip {
  position: absolute; z-index: 4; background: var(--accent, #2350d4);
  border: 2px solid #fff; border-radius: 3px; box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
  width: 12px; height: 12px; pointer-events: auto;
  /* ★指で引くときブラウザのパンを始めさせない（始まると pointercancel で掴みが切れる） */
  touch-action: none;
}
/* ★取っ手は箱の**内側**に置く（外へはみ出させない）。実測: 画面幅いっぱいの部品では
   右の取っ手が親（#cv-mini{overflow:hidden}）の外に落ち、**見えるのに掴めない**
   （boundingBox が null＝描かれていない）。はみ出した子は当たり判定を失う。 */
.cv-grip-e { right: 1px; top: 50%; margin-top: -6px; cursor: ew-resize; }
.cv-grip-s { bottom: 1px; left: 50%; margin-left: -6px; cursor: ns-resize; }
.cv-grip-se { right: 1px; bottom: 1px; cursor: nwse-resize; }
/* ★動かす取っ手（左上）。記号で「掴める」ことを言う。掴むと箱を薄くして差し込み線を出す。 */
.cv-grip-mv {
  left: 1px; top: 1px; width: 18px; height: 18px; cursor: grab; border-radius: 4px;
  display: flex; align-items: center; justify-content: center; font-size: 12px; line-height: 1; color: #fff;
}
/* ★自由配置の取っ手（2026-09-08）。並べ替え（⠿・左上）と**別の場所**に置く——
   同じ角に2つ重ねると、どちらを掴んだのか客にも分からず、片方が押せなくなる。
   ★右上に置く。左上は並べ替え、右下は大きさ、下辺・右辺も大きさで埋まっている。 */
.cv-grip-free {
  right: 1px; top: 1px; width: 18px; height: 18px; cursor: move; border-radius: 4px;
  display: flex; align-items: center; justify-content: center; font-size: 12px; line-height: 1; color: #fff;
}
.cv-grip-mv:active { cursor: grabbing; }
.cv-box.is-dragging { opacity: .45; }
.cv-drop-line {
  position: absolute; height: 4px; border-radius: 2px; background: var(--accent, #2350d4);
  box-shadow: 0 0 0 2px #fff; pointer-events: none; z-index: 5;
}
/* 引いている間の寸法表示 */
.cv-grip-hint {
  position: fixed; z-index: 61; background: #111; color: #fff; font-size: 12px;
  padding: 4px 8px; border-radius: 4px; pointer-events: none; white-space: nowrap;
}

/* 選択した部品が窓の外へ出たときの戻り口。★プレビューの上には置かない（サイトの文字を覆って指を飲んだ・
   2026-09-15 全数監査）。リボンの案内文の行の右端に絶対配置＝行の高さも並びも変えない。 */
.cv-ribbon-jump {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%); z-index: 1;
  background: var(--accent, #2350d4); color: #fff; border: 0; border-radius: 999px;
  padding: 4px 12px; font-size: .7rem; font-weight: 700; cursor: pointer; white-space: nowrap;
}

/* ━━ タイポグラフィ（tokens 適用・2026-08-25）━━━━━━━━━━━━━━━━━━━━
   ★見出しと数値を本文と別の書体・別の字詰めにする。
     以前は全部が同じ sans で、**視覚的な階層が「文字の大きさ」だけ**に載っていた。
     大きさだけで階層を作ると、狭い画面や情報量が多い画面で差が潰れて読めなくなる。
   ★数値は tabular-nums（等幅数字）にする。表・推移・スコアが縦に並ぶ画面で、
     桁がガタつくと「同じ位置の数字を比べる」ができない。担当者レポートの格に直結する。
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
h1, h2, h3,
.detail-name, .act-title, .score-ring-label,
.prop-title, .card > h2, .card > h3 {
  font-family: var(--font-display);
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-tight);
  font-weight: var(--wt-bold);
}

/* 数値は等幅で。桁の位置が揃うことが比較の前提になる */
.score-ring-number, .score-sub-val, .score-trend,
.mini-bar-label, .kpi-value, .story-num,
td.num, .num {
  font-family: var(--num);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
  letter-spacing: var(--ls-tight);
}

/* ━━ 余白（8pxスケールへ揃える・2026-08-25）━━━━━━━━━━━━━━━━━━━━
   ★詰まりすぎの是正。1画面に情報が多く、要素同士がほぼ等間隔で並んでいたため、
     **どこで話題が変わるのかが余白から読み取れなかった**（＝視線の誘導が効かない）。
   ★数値をスケール（--s1..--s8）に載せる。22px / 18px / 13px のような
     半端な値が散ると、間隔の差が「意図」なのか「たまたま」なのか区別できなくなる。
   ★セクション間 > カード内 > 要素間 の順に必ず広くする。この大小関係が階層そのもの。
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.card      { padding: var(--s5); }          /* 22px → 24px（スケール上の値へ） */
.card-sm   { padding: var(--s4); }          /* 16px */

/* 話題の切れ目。カード内の余白より明確に広くして「ここで変わる」を作る */
.act-head        { margin-top: var(--s7); margin-bottom: var(--s4); }
.act-head:first-child { margin-top: 0; }
.charts-fold     { margin-bottom: var(--s5); }
.alert-banner,
.scope-note,
.spa-note        { margin-bottom: var(--s5); }

/* カード同士は、カード内の余白より広く（詰まって1枚に見えるのを防ぐ） */
.score-sub-grid  { gap: var(--s3); }
.proposal-card + .proposal-card { margin-top: var(--s3); }

/* 脚注・注記は本文から引き離しつつ、直前の内容に属して見える距離に置く */
.score-sub-grade { margin-top: var(--s1); }

/* ━━ ナビのアイコン（自前SVG・2026-08-25）━━━━━━━━━━━━━━━━━━━━━━━
   ★色を持たせない（`currentColor`）。トークン側が色を決めるので、
     アイコン側に色を書くと**パレットを変えたときにここだけ取り残される**
     （barColor の生16進で実際に踏んだ型）。
   ★大きさは em 基準。文字サイズが変わってもアイコンだけ取り残されない。
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.nav-svg {
  width: 1.15em; height: 1.15em;
  vertical-align: -.18em;
  flex: 0 0 auto;
  opacity: .9;
}
.nav-icon { display: inline-flex; align-items: center; }
.cnav-tab { display: inline-flex; align-items: center; gap: var(--s1); }
.cnav-tab.active .nav-svg { opacity: 1; }

/* 「詳しく見る」メニュー（狭い画面のタブから畳んだ項目）*/
.cnav-more > summary { cursor: pointer; }
/* ★狭い画面ではメニューのラベルを畳んでアイコンだけにする。
   主要4つ＋メニューで幅が足りず、**畳み先のメニューまで見切れて**いた（実測520px）。
   畳んだ意味が消えるので、いちばん譲れる「詳しく見る」の文字を先に落とす。 */
@media (max-width: 560px) {
  .cnav-more > summary > span:not([aria-hidden]) { display: none; }
  .cnav-more > summary { padding-left: 10px; padding-right: 10px; }
}
.cnav-more .dd-menu { min-width: 240px; max-width: 78vw; }
.cnav-more .dd-menu .leaf-sub { font-size: .68rem; color: var(--muted); font-weight: 400; }

/* ━━ 識別ブロック（このアプリが何なのかを開口一番に言う）━━━━━━━━━━━━
   ★以前はいきなりクライアント名から始まっていて、**客は「何のアプリか」を
     最後まで教えられなかった**。2行で収め、下のカードを押し下げすぎない。 */
.ident-block { margin: 0 0 var(--s4); }
.ident-eyebrow {
  font-family: var(--font-display);
  font-size: .78rem; font-weight: var(--wt-bold);
  letter-spacing: .08em; color: var(--brand);
}
.ident-lead {
  font-size: .82rem; color: var(--muted);
  margin-top: 2px; line-height: 1.7;
}

/* ポータル最下部のひとこと */
.portal-tagline {
  margin: var(--s7) 0 var(--s5);
  padding-top: var(--s4);
  border-top: 1px solid var(--border);
  text-align: center;
  font-family: var(--font-display);
  font-size: .82rem; color: var(--muted); letter-spacing: .02em;
}

/* ━━ 配信停止の告知（画面で一番強い箱）━━━━━━━━━━━━━━━━━━━━━━━━
   ★売上が止まっている状態の告知。以前は淡いピンクの箱＋絵文字で、
     **内容の重さと見た目が釣り合っていなかった**。
   ★点滅はしない。無限に動くものは、緊急を伝えるのでなく**読ませなくする**。
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.alert-critical {
  display: flex; align-items: stretch;
  background: var(--bad-soft, rgba(209,67,67,.07));
  border: 1px solid var(--bad); border-radius: var(--r-sm);
  margin-bottom: var(--s5); overflow: hidden;
}
.alert-critical-bar { width: 5px; background: var(--bad); flex: 0 0 5px; }
.alert-critical-body { padding: var(--s4); flex: 1 1 auto; }
.alert-critical-head {
  display: flex; align-items: center; gap: var(--s2);
  font-family: var(--font-display); font-weight: var(--wt-bold);
  font-size: .92rem; color: var(--bad); line-height: var(--lh-snug);
}
.alert-critical-ic { color: var(--bad); display: inline-flex; }
.alert-critical-ic .nav-svg { width: 1.25em; height: 1.25em; opacity: 1; }
.alert-critical-why { font-size: .78rem; color: var(--bad); margin-top: var(--s1); }
.alert-critical-lead {
  font-size: .84rem; color: var(--ink); line-height: 1.8;
  margin: var(--s2) 0 var(--s3);
}
/* ★既存の .btn-danger（危険操作＝削除などの淡いゴースト）とは別物なので名前を分ける。
   同じ名前にすると、私の塗りつぶしスタイルが**削除ボタンにまで適用**されて、
   壊す操作が「押してほしいボタン」に見えてしまう。 */
.btn-recover {
  background: var(--bad); color: #fff; border: 1px solid var(--bad);
  border-radius: var(--r-sm); padding: 9px 16px; cursor: pointer;
  font-family: var(--font-display); font-weight: var(--wt-bold); font-size: .82rem;
}
.btn-recover:hover { filter: brightness(1.06); }

/* サマリーの「初回」「変化なし」カード。2枚ぶんの幅を取って、
   0が2つ並ぶより「今どういう状態か」が一目で分かるようにする */
.msum-card--wide { grid-column: span 2; }

/* 反映先の判定を待っているあいだ。★隠さない——隠すと後から生えて位置がずれ、
   押そうとした瞬間にボタンが動く（webkit で実測）。同じ形のまま「いま押せない」
   ことだけを見た目で伝える。disabled は既定の打ち消しが無いと押せるように
   見えてしまうので、薄さと矢印をここで明示する。 */
.cv-ribbon-wait { opacity: .45; }
.cv-ribbon-wait button, .cv-ribbon-wait select, .cv-ribbon-wait input { cursor: not-allowed; }

/* 文中リンクの小窓。色の小窓と同じ器を使い、幅と中身だけ変える。 */
.cv-link-pop { width: 316px; }
.cv-link-on { font-size: .72rem; color: var(--muted); margin-bottom: 6px; }
.cv-link-pop .form-input { width: 100%; font-size: .8rem; }
/* ★断る理由はその場に出す。出さないとサーバが span ごと捨てて「押したのに
   何も起きない」になる（成功したように見えるのが一番たちが悪い）。 */
.cv-link-ng { font-size: .72rem; color: var(--danger, #c0392b); line-height: 1.6; min-height: 1.1em; margin: 4px 0 2px; }

/* スマホ・タブレットの実寸プレビュー。端末の枠らしく見せて「縮尺で小さいのではなく
   これが実寸」と伝える。★拡大はしない——拡大したら実機確認の目的そのものを失う。 */
.cv-mini-device { box-shadow: 0 6px 28px rgba(0,0,0,.22); border-radius: 14px !important; }

/* ── ページ編集: サイトが主役の版面（2026-09-03）───────────────────────
   見出し・説明・ページ選択・大きさ・端末・断り書きが縦に積まれ、実サイトが
   画面の下1/3に押し込まれていた。操作子は上部の細いバー1本にまとめ、
   残りをぜんぶサイトに渡す。器（#cv-stick）は画面の高さいっぱいを占め、
   その中で「バー＋リボン」が上、プレビューが残り全部を取る。 */
.cv-shell { display: block; }
/* ★編集画面を開いている間は、本文の最大幅（soft-white-ui.css の #view{max-width:1240px}）を外す（2026-09-15）。
   外さないと、どれだけ広い画面でも器が 1240px で頭打ちになり、右パネル（280px）と部品の一覧（240px）を
   開くとプレビューが 700px 前後しか残らない（実測: 1760/1920/2560px の窓で器 1240・プレビュー 904）。
   ほかの節の読みやすさのための上限なので、編集画面の節にだけ効かせる（:has で、JS の状態を持たない）。 */
#view:has(.cv-shell) { max-width: none; }
/* ★高さは JS（_cvFitShell）が実測して入れる。上に何px在るかは、ページ見出し・
   案内・断り書きの有無で変わるので CSS からは分からない。ここは JS が入れるまでの
   保険（入れ損ねても画面からはみ出さない値）。 */
.cv-stick { display: flex; flex-direction: column; height: 72vh; min-height: 420px; }
.cv-body { flex: 1 1 auto; min-height: 220px; }
/* ── 器: プレビュー＋右の設定パネル（Figma化①・2026-09-15）─────────────────
   ★判定（横に並べる dock ／下の引き出し sheet）は**ここだけ**が持つ。JS は --cv-side-mode を読む。
   ★sheet でもパネルはプレビューに**重ねない**。重ねると閉じている間もプレビューの下端が
     「描かれるのに押せない帯」になる（2026-09-03 に同じ形の帯を実測で塞いだ）。 */
.cv-work { flex: 1 1 auto; min-height: 220px; display: flex; flex-direction: column; container-type: inline-size; }
.cv-work-in { flex: 1 1 auto; min-height: 0; display: flex; gap: 8px; }
.cv-work-in > .cv-body { flex: 1 1 auto; min-width: 0; min-height: 0; }
/* ── 端末の板を並べる（Figma化③ Task 13・2026-09-16）───────────────────────
   ★作業中の板だけが #cv-mini を持つ。見るだけの板は押せない（pointer-events:none）＝作業中の選択を奪わない。
   ★名札は並べているときだけ（1つだけのときは上バーの端末ボタンが同じことを言う）。 */
.cv-canvas-bar { position: sticky; left: 0; top: 0; z-index: 3; display: flex; justify-content: flex-end; align-items: center; padding: 4px 2px 6px; }
/* ★帯の高さと負の下余白は JS（_cvPlaneHtml）が板の面の上の余白と同じ値で書く＝帯は面の上の余白に重なり、流れの場所を取らない。 */
/* ★縦長（2026-09-16）では器を下へ送ると、この帯が版面の上に貼り付く。帯そのものは押さない（下の部品へ通す）＝
   「描かれるのに押せない帯」を作らない。押せるのは切り替えのボタンだけ（見えている分だけ版面を覆う）。 */
.cv-canvas-bar { pointer-events: none; }
.cv-canvas-bar > * { pointer-events: auto; }
.cv-canvas-bar .cv-seg { flex: 0 0 auto; }
.cv-canvas-bar .cv-seg-b { flex: 0 0 auto; padding: 0 10px; }
/* ★#cv-mini は重ね層（#cv-overlay・absolute）の基準。_cvSwapFrame は入れ替えの最後に style.position を '' に戻すので、
   インラインの relative だけに頼ると基準が #cv-body へ逃げ、上に何かが在ると選択枠がその高さだけずれる
   （2026-09-16 実測: 切り替えの帯の分 41px。帯が無かった頃は #cv-mini が #cv-body の左上ちょうどで偶然一致していた）。 */
#cv-mini { position: relative; }
/* ★手ぶり（ピンチ／パン）の滑らかさ（2026-09-16）。枠と見るだけの板は transform:scale で毎フレーム動くので合成層に置く。
   器（#cv-mini／.cv-board-view）は中の組み直し・描画を外へ漏らさない（どちらも overflow:hidden で JS が寸法を書く＝含んでよい）。
   ★will-change は**手ぶりの間だけ**（#cv-body.is-gesturing・_cvGestureTouch が付けて _cvGestureEnd が外す）。
     常時付けると、Chrome は倍率を変えても描き直さず最初の倍率のビットマップを伸ばす＝25%で開いて100%へ上げると文字がにじむ。
     外した次の描画で、いまの倍率で描き直される。 */
#cv-body.is-gesturing #cv-frame, #cv-body.is-gesturing .cv-board-frame { will-change: transform; }
#cv-mini, .cv-board-view { contain: layout paint; }
/* ★枠と器の寸法は遷移させない（2026-09-16・縦長表示）。「動きを減らす」のとき soft-white-ui.css が
   *{transition-duration:.01ms!important} を当て、transition-property の既定は all なので**全部の性質が遷移**する。
   すると枠の高さを書いた同じ手番の中では、読める値が遷移の始点（古い高さ）のまま——子の 100svh も古い画面の高さで
   解かれ、縦長の判定が「差が無い」と読んで固定しないまま伸ばし、暴走した（実測 2506→43123px）。
   器の高さも同じで、書いた直後に器（#cv-body）を送ると古い高さで頭打ちになる。詳細度で上書きする（!important 同士）。 */
/* ★板の面（.cv-plane）の幅と余白も同じ（2026-09-16）。遷移させると、面の幅を書いた直後の器の横の送れる範囲が古い幅のまま
   （実測: 面 2670px を書いても計算値 896px のまま・右端の余白が 0）。 */
#cv-frame, .cv-board-frame, #cv-mini, .cv-board-view, #cv-overlay, .cv-plane { transition: none !important; }
/* パン（Figma化③ Task 14）: スペースを押している間は掴める手、動かしている間は掴んだ手。箱・取っ手の矢印より優先する */
#cv-body.is-pan-ready, #cv-body.is-pan-ready * { cursor: grab !important; }
#cv-body.is-panning, #cv-body.is-panning * { cursor: grabbing !important; }
.cv-plane { display: flex; align-items: flex-start; }
/* ★板どうしの隙間・上下左右の余白・面の幅は JS が書く（CV_BOARD_GAP / CV_BOARD_PAD・値は app.js の1か所）。
   面の幅は「器の内側」と「板の並び＋左右の余白」の大きい方＝はみ出したら器が横に送り、両端まで送っても余白が残る。 */
.cv-plane > .cv-board { flex: 0 0 auto; min-width: 0; }
.cv-plane:not(.is-side) > .cv-board.is-work { flex: 1 1 auto; }
.cv-board-name { margin: 0 0 4px 2px; font-size: .72rem; font-weight: 700; color: var(--dim); white-space: nowrap; }
.cv-plane:not(.is-side) .cv-board-name { display: none; }
.cv-board-view { position: relative; overflow: hidden; background: #fff; border: 1px solid var(--border, #2a2f3a); border-radius: 8px; pointer-events: none; }
.cv-board-frame { display: block; border: 0; transform-origin: top left; background: #fff; }
/* 縦長にできない板（窓表示）の断り書き（2026-09-16）。板の上に1行・版面は覆わない */
.cv-board-note { margin: 0 0 4px 2px; font-size: .72rem; line-height: 1.5; color: var(--muted, #6b7280); }
.cv-board-note[hidden] { display: none; }
/* 見るだけの板は押すとその端末を編集する（Task 15）。載せると縁で「押せる」を言う */
.cv-plane > .cv-board.is-passive { cursor: pointer; border-radius: 10px; outline: 2px solid transparent; outline-offset: 2px; }
.cv-plane > .cv-board.is-passive:hover .cv-board-view, .cv-plane > .cv-board.is-passive:focus-visible .cv-board-view { border-color: var(--brand, #0e8c82); box-shadow: 0 0 0 2px var(--brand-soft, #e4f3f1); }
.cv-plane > .cv-board.is-passive:hover .cv-board-name { color: var(--brand-ink, #08423e); }
@container (max-width: 899px) { .cv-canvas-bar, .cv-plane > .cv-board.is-passive { display: none; } }
/* ── 左の部品の一覧（Figma化②・2026-09-15）─────────────────────────────
   ★行は作り直さず印だけ付け替える（選択が軽い）。畳んだ入れ物の中身は DOM に残したまま隠す。
   ★狭い器（sheet）では左に置かない。下の引き出しの「部品の一覧」タブで、設定と同じ場所に出す。 */
.cv-tree {
  flex: 0 0 240px; width: 240px; min-height: 0; position: relative;
  display: flex; flex-direction: column;
  background: var(--surface, #fff); border: 1px solid var(--border, #d6dae2); border-radius: 8px;
}
.cv-tree-body { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.cv-tree-toggle {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px;
  border: 1px solid var(--border, #d6dae2); border-radius: 6px; background: var(--surface, #fff);
  color: var(--muted); font-size: .72rem; font-weight: 700; cursor: pointer;
}
.cv-tree-toggle-ico::before { content: '⟨'; }
.cv-tree.is-closed .cv-tree-toggle-ico::before { content: '⟩'; }
.cv-tree-toggle-lbl { display: none; }
.cv-tree.is-closed { flex-basis: 40px; width: 40px; }
.cv-tree.is-closed .cv-tree-body { display: none; }
.cv-tree.is-closed .cv-tree-toggle {
  left: 6px; right: 6px; height: auto; padding: 10px 0; flex-direction: column; justify-content: center; writing-mode: vertical-rl;
}
.cv-tree.is-closed .cv-tree-toggle-lbl { display: inline; }
.cv-tree-h { position: sticky; top: 0; z-index: 1; padding: 12px 44px 8px 12px; background: var(--surface, #fff);
             border-bottom: 1px solid var(--border, #e3e6ec); font-weight: 800; font-size: .84rem; color: var(--ink, #141a1a); }
.cv-tree-hidden-count { font-weight: 600; font-size: .7rem; color: var(--dim); }
.cv-tree-list { position: relative; padding: 6px 4px 12px; }
/* 引いて並べ替える（掴める接続のときだけ、載せた行のしるしが ⠿ に変わる） */
.cv-tree-list.can-move .cv-tree-row:hover .cv-tree-ico { font-size: 0; cursor: grab; }
.cv-tree-list.can-move .cv-tree-row:hover .cv-tree-ico::before { content: '⠿'; font-size: .8rem; font-weight: 400; }
.cv-tree-list.is-dragging-row, .cv-tree-list.is-dragging-row .cv-tree-row { cursor: grabbing; }
.cv-tree-row.is-dragging { opacity: .45; }
/* 引いている間は 🙈 を出さない（置き先の行に載るたびに出て、線より目立つ）。隠している行の 👁 は残す */
.cv-tree-list.is-dragging-row .cv-tree-row:not(.is-hidden) .cv-tree-eye { visibility: hidden; }
.cv-tree-drop {
  position: absolute; height: 2px; border-radius: 1px; background: var(--brand, #0e8c82);
  box-shadow: 0 0 0 1px #fff; pointer-events: none; z-index: 2;
}
.cv-tree-empty { margin: 10px 8px; font-size: .74rem; color: var(--dim); line-height: 1.6; }
.cv-tree-row {
  display: flex; align-items: center; gap: 4px; height: 26px;
  padding: 0 4px 0 calc(4px + (var(--cv-lv, 1) - 1) * 12px);
  border-radius: 6px; font-size: .75rem; color: var(--body); cursor: pointer; white-space: nowrap; outline: none;
  user-select: none; -webkit-user-select: none;   /* 引いたときに文字が選ばれない */
}
.cv-tree-row:hover { background: var(--surface-2, #f4f5f2); }
.cv-tree-row:focus-visible { box-shadow: inset 0 0 0 2px var(--brand, #0e8c82); }
.cv-tree-row[aria-selected="true"] { background: var(--brand-soft, #e4f3f1); color: var(--brand-ink, #08423e); }
.cv-tree-row.is-hidden .cv-tree-name, .cv-tree-row.is-hidden .cv-tree-snip, .cv-tree-row.is-hidden .cv-tree-ico { opacity: .45; }
.cv-tree-caret, .cv-tree-caret-sp { flex: 0 0 16px; width: 16px; height: 16px; }
.cv-tree-caret { border: 0; background: none; padding: 0; color: var(--dim); cursor: pointer; font-size: .7rem; line-height: 16px; }
.cv-tree-caret::before { content: '▾'; }
.cv-tree-item.is-collapsed > .cv-tree-row .cv-tree-caret::before { content: '▸'; }
.cv-tree-item.is-collapsed > .cv-tree-group { display: none; }
.cv-tree-ico { flex: 0 0 16px; text-align: center; font-size: .66rem; font-weight: 800; color: var(--dim); }
.cv-tree-name { flex: 0 0 auto; font-weight: 700; }
.cv-tree-snip { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--dim); }
.cv-tree-eye { flex: 0 0 auto; visibility: hidden; border: 0; background: none; padding: 0 2px; font-size: .8rem; cursor: pointer; }
.cv-tree-row:hover .cv-tree-eye, .cv-tree-row:focus-within .cv-tree-eye, .cv-tree-row.is-hidden .cv-tree-eye { visibility: visible; }
/* ★一覧の行に載せたときのプレビュー側の薄い枠。選択（青の実線）と取り違えない点線。 */
.cv-box.cv-box-hover { outline: 2px dashed var(--accent, #2350d4); outline-offset: 1px; }
@container (max-width: 899px) { .cv-tree { display: none; } }
.cv-insp {
  --cv-side-mode: dock;
  flex: 0 0 280px; width: 280px; min-height: 0; position: relative;
  display: flex; flex-direction: column;
  background: var(--surface, #fff); border: 1px solid var(--border, #d6dae2); border-radius: 8px;
}
.cv-insp-tab-tree { display: none; }   /* dock では一覧は左に在る（引き出しのタブは sheet でだけ） */
.cv-insp-body { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.cv-insp-toggle {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px;
  border: 1px solid var(--border, #d6dae2); border-radius: 6px; background: var(--surface, #fff);
  color: var(--muted); font-size: .72rem; font-weight: 700; cursor: pointer;
}
.cv-insp-toggle-ico::before { content: '⟩'; }
.cv-insp.is-closed .cv-insp-toggle-ico::before { content: '⟨'; }
.cv-insp-toggle-lbl { display: none; }
.cv-insp.is-closed { flex-basis: 40px; width: 40px; }
.cv-insp.is-closed .cv-insp-body { display: none; }
.cv-insp.is-closed .cv-insp-toggle {
  left: 6px; right: 6px; height: auto; padding: 10px 0; flex-direction: column; justify-content: center;
  writing-mode: vertical-rl;
}
.cv-insp.is-closed .cv-insp-toggle-lbl { display: inline; }
.cv-insp-head { padding: 12px 44px 10px 14px; border-bottom: 1px solid var(--border, #e3e6ec); }
.cv-insp-name { font-weight: 800; color: var(--ink, #141a1a); font-size: .9rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cv-insp-dev { font-size: .66rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--brand-soft, #e4f3f1); color: var(--brand, #0e8c82); }
.cv-insp-sub { margin: 4px 0 0; font-size: .74rem; color: var(--dim); line-height: 1.6; }
.cv-insp-note { margin-top: 8px; }
.cv-insp-page { padding: 12px 14px; }
.cv-insp-h { margin: 0 0 8px; font-size: .7rem; letter-spacing: .06em; color: var(--dim); font-weight: 700; }
.cv-insp .cv-ai-out { margin: 0 14px; }
.cv-insp-page .cv-note { margin-bottom: 8px; }
/* 指摘（_cvInspectorNote）。★左に赤い帯のカード。浮かせない（パネルの最上段に置く）。 */
.cv-insp-note-slot:empty { display: none; }
/* ★横に並べる形（dock）では、開閉ボタンがパネルの右上に浮いている。指摘カードをその下から始めて重ねない。 */
.cv-insp-note-slot { padding-top: 30px; }
.cv-insp-notecard { margin: 10px 12px 0; padding: 10px 12px; border-radius: 8px; background: #fff5f4;
                    border: 1px solid rgba(217,45,32,.22); border-left: 4px solid #d92d20; }
.cv-insp-notecard-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; font-size: .82rem; color: var(--ink, #141a1a); }
.cv-insp-notecard-x { flex: 0 0 auto; border: 0; background: none; color: var(--muted); font-size: .7rem; font-weight: 700; cursor: pointer; padding: 2px 4px; border-radius: 4px; }
.cv-insp-notecard-x:hover { background: rgba(0,0,0,.05); }
.cv-insp-notecard-p { margin: 6px 0 0; font-size: .76rem; line-height: 1.7; color: var(--body); }
.cv-insp-notecard-what { margin: 6px 0 0; font-size: .74rem; line-height: 1.6; color: #b42318; font-weight: 700; }
.cv-insp-notecard-target { margin: 6px 0 0; font-size: .7rem; color: #b42318; }
.cv-insp-note-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cv-insp-note-actions .cv-insp-btn:disabled { opacity: .5; cursor: not-allowed; }
/* ★指摘の赤枠。選択の青枠（.cv-box-sel）と別の線で、両方付いても見分けられる。 */
.cv-box.cv-box-note { outline: 3px solid #d92d20; outline-offset: 3px; }
/* 節（文字・配置・色・画像・余白と箱・部品・AI） */
.cv-insp-sec { padding: 12px 14px; border-bottom: 1px solid var(--border, #e3e6ec); }
.cv-insp-sec-h { margin: 0 0 8px; font-size: .7rem; letter-spacing: .06em; color: var(--dim); font-weight: 700;
                 display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cv-insp-link { border: 0; background: none; padding: 0; color: var(--brand, #0e8c82); font-size: .7rem; font-weight: 700; letter-spacing: 0; cursor: pointer; }
.cv-insp-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto auto; align-items: center; gap: 6px; margin-bottom: 6px; min-height: 28px; }
.cv-insp-row > .cv-seg, .cv-insp-row > .cv-insp-sel { grid-column: 2 / -1; }
.cv-insp-lbl { font-size: .74rem; color: var(--muted); white-space: nowrap; }
/* ★つまみの行は、後ろで定義された .cv-sl { display: inline-flex } に負けていた（2026-09-15・目視で発覚）。
   負けると見出しの列が縮んで「大/き/さ」と1字ずつ縦に折れ、画像の「横幅」と「最低の高さ」が
   1行に横並びになる。詳細度で取り返す（宣言は継承に勝つ、の型）。 */
.cv-insp .cv-sl.cv-insp-row { display: grid; }
.cv-insp .cv-sl-in { width: 100%; min-width: 0; }
.cv-insp .cv-sl-val { min-width: 4.4em; }
.cv-insp .cv-sl-off[hidden] { display: inline-block !important; visibility: hidden; }
.cv-insp-sel { height: 30px; font-size: .78rem; border: 1px solid var(--border-2, #d0d5dd); border-radius: 7px; padding: 0 6px; background: #fff; min-width: 0; width: 100%; }
.cv-seg { display: flex; gap: 2px; padding: 2px; border-radius: 8px; background: var(--surface-2, #f4f5f2); }
.cv-seg-b { flex: 1 1 0; height: 26px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: .74rem; cursor: pointer; }
.cv-seg-b.is-active { background: #fff; color: var(--ink, #141a1a); font-weight: 700; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.cv-insp-hint { margin: 4px 0 0; font-size: .7rem; line-height: 1.6; color: var(--dim); }
.cv-insp-swrow { display: flex; align-items: center; gap: 8px; width: 100%; padding: 5px 4px; margin-bottom: 2px; border: 0; border-radius: 6px; background: transparent; font-size: .78rem; color: var(--body); cursor: pointer; text-align: left; }
.cv-insp-swrow:hover:not(:disabled) { background: var(--surface-2, #f4f5f2); }
.cv-insp-chip { width: 20px; height: 20px; border-radius: 5px; border: 1px solid var(--border-2, #d0d5dd); flex: 0 0 auto; }
.cv-insp-chip.is-none { background: repeating-conic-gradient(#ddd 0 25%, #fff 0 50%) 0 0 / 8px 8px; }
.cv-insp-val { margin-left: auto; color: var(--dim); font-variant-numeric: tabular-nums; font-size: .72rem; }
.cv-insp-stack { display: flex; flex-direction: column; gap: 6px; }
.cv-insp-stack + .cv-insp-stack { margin-top: 0; }
.cv-insp-pair { display: flex; gap: 6px; margin-top: 6px; }
.cv-insp-pair > .cv-insp-btn { flex: 1 1 0; text-align: center; }
.cv-insp-btn { min-height: 30px; padding: 5px 10px; border: 1px solid var(--border-2, #d0d5dd); border-radius: 8px; background: #fff; color: var(--body); font-size: .76rem; text-align: left; cursor: pointer; }
.cv-insp-btn:hover:not(:disabled) { background: var(--surface-2, #f4f5f2); }
.cv-insp-btn.is-primary { background: var(--brand, #0e8c82); border-color: var(--brand, #0e8c82); color: #fff; text-align: center; font-weight: 700; }
/* ★主ボタンの地を、ホバーと押せない間も白文字が読める色に保つ（2026-09-15・computed style で実測）。
   上の :hover:not(:disabled) は薄い灰の地にし、共通の button:disabled:hover は地を inherit（透明）にする
   ——どちらも .is-primary より強く、白文字が消えていた。押した直後はマウスがボタンの上に居るので、
   「AIで書き換え案を作る」は作っている間ずっと白い無地のボタンに見えた。 */
.cv-insp-btn.is-primary:hover:not(:disabled) { background: var(--brand, #0e8c82); filter: brightness(.92); }
.cv-insp-btn.is-primary:disabled, .cv-insp-btn.is-primary:disabled:hover { background: var(--brand, #0e8c82); }
.cv-insp-btn.is-danger { color: var(--red, #c0392b); }
/* ★ファイルを選ぶ口。白い角丸の箱は下の入力欄と見分けが付かず、押す物に見えなかった（2026-09-15・820px で目視）。
   点線の枠＋中央寄せ＝「ここへ入れる」口の見た目（プレビューへのドラッグでも入る）。 */
.cv-insp-btn.is-pick { text-align: center; font-weight: 700; color: var(--brand-ink, #08423e);
                       border: 1px dashed var(--brand, #0e8c82); background: var(--brand-soft, #e4f3f1); }
.cv-insp-btn.is-pick:hover:not(:disabled) { background: var(--brand-soft, #e4f3f1); filter: brightness(.97); }
.cv-insp-in { height: 30px; font-size: .78rem; width: 100%; box-sizing: border-box; margin-top: 4px; }
/* ★範囲を選んでいる間は薄く＋押せない。disabled は既定の打ち消しが無いと押せる姿のままなので明示する。
   幅も高さも変えない（opacity だけ）＝プレビューは動かない。 */
.cv-insp-part.is-range .cv-insp-sec { opacity: .45; }
.cv-insp-part button:disabled, .cv-insp-part select:disabled, .cv-insp-part input:disabled { cursor: not-allowed; }
@container (max-width: 899px) {
  .cv-work-in { flex-direction: column; gap: 6px; }
  .cv-insp { --cv-side-mode: sheet; flex: 0 0 44px; width: auto; }
  /* ★sheet では dock の「畳む」は意味を持たない（覚えた値で引き出しを潰さない） */
  .cv-insp.is-closed { flex-basis: 44px; width: auto; }
  .cv-insp .cv-insp-body, .cv-insp.is-closed .cv-insp-body { display: none; }
  .cv-insp.is-open { flex-basis: 60%; }
  .cv-insp.is-open .cv-insp-body { display: block; }
  .cv-insp-toggle, .cv-insp.is-closed .cv-insp-toggle {
    position: static; writing-mode: horizontal-tb; flex-direction: row; justify-content: space-between;
    width: 100%; height: 42px; padding: 0 12px; border: 0; border-bottom: 1px solid var(--border, #e3e6ec); border-radius: 8px 8px 0 0;
  }
  .cv-insp-toggle-lbl, .cv-insp.is-closed .cv-insp-toggle-lbl { display: inline; order: -1; }
  .cv-insp-toggle-ico::before, .cv-insp.is-closed .cv-insp-toggle-ico::before { content: '▴'; }
  .cv-insp.is-open .cv-insp-toggle-ico::before { content: '▾'; }
  .cv-insp-head { padding-right: 14px; }
  .cv-insp-note-slot { padding-top: 0; }
  /* ★引き出しの見出しは1行に2つのタブ（設定：… ／ 部品の一覧）。中身は見出しの下いっぱい。 */
  .cv-insp { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 42px minmax(0, 1fr); }
  .cv-insp-body { grid-column: 1 / -1; }
  .cv-insp-toggle, .cv-insp.is-closed .cv-insp-toggle { border-radius: 8px 0 0 0; }
  .cv-insp-tab-tree {
    display: inline-flex; align-items: center; height: 42px; padding: 0 14px; border: 0;
    border-left: 1px solid var(--border, #e3e6ec); border-bottom: 1px solid var(--border, #e3e6ec); border-radius: 0 8px 0 0;
    background: var(--surface, #fff); color: var(--muted); font-size: .72rem; font-weight: 700; cursor: pointer; white-space: nowrap;
  }
  .cv-insp-toggle[aria-expanded="true"], .cv-insp-tab-tree[aria-expanded="true"] { color: var(--brand-ink, #08423e); box-shadow: inset 0 -2px 0 var(--brand, #0e8c82); }
  /* 並びはプレビュー → 見出し → 一覧。DOM の順（一覧・プレビュー・設定）は dock のためのもの */
  .cv-work-in > .cv-body { order: 0; }
  .cv-work-in > .cv-insp { order: 1; }
  .cv-work-in > .cv-tree { order: 2; }
  .cv-insp.is-open[data-sheet-tab="tree"] { flex-basis: 44px; border-radius: 8px 8px 0 0; }
  .cv-insp.is-open[data-sheet-tab="tree"] .cv-insp-body { display: none; }
  .cv-insp.is-open[data-sheet-tab="tree"] .cv-insp-toggle-ico::before { content: '▴'; }   /* 設定は閉じている向き */
  /* ★高さは設定を開いたときと同じ 60%（見出し 44px ＋ 隙間 6px を引く）＝タブを替えてもプレビューの背が動かない */
  .cv-work-in:has(> .cv-insp.is-open[data-sheet-tab="tree"]) > .cv-tree {
    display: flex; flex: 0 0 calc(60% - 44px); width: auto; margin-top: -7px; border-top: 0; border-radius: 0 0 8px 8px;
  }
  .cv-work-in > .cv-tree .cv-tree-toggle { display: none; }
  .cv-work-in > .cv-tree.is-closed .cv-tree-body { display: block; }   /* dock で畳んだ好みは引き出しに持ち込まない */
  .cv-tree-h { padding-right: 12px; }
}
.cv-topbar {
  /* ★隙間は 6px→4px（2026-09-08・リボンと同じ理由）。 */
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  padding: 6px 8px; margin-bottom: 6px; border-radius: 8px;
  background: var(--surface, #171b24); border: 1px solid var(--border, #2a2f3a);
}
.cv-topbar-title { font-weight: 700; font-size: .92rem; white-space: nowrap; }
.cv-topbar-beta {
  font-size: .62rem; font-weight: 700; margin-left: 6px; padding: 1px 6px; border-radius: 999px;
  background: var(--surface2, rgba(128,132,148,.16)); color: var(--muted); vertical-align: middle;
}
.cv-topbar-sep { width: 1px; height: 20px; background: var(--border, #2a2f3a); margin: 0 2px; flex: 0 0 auto; }
.cv-topbar-in { max-width: 190px; height: 30px; font-size: .8rem; }
/* ★select は高さ30px＋上下padding 10px で文字が上下に切れていた（2026-09-06・UXレビュー）。 */
/* ★幅は上バーが1行に収まる範囲で取る（2026-09-07・実測 1184px の中で内訳を合わせた）。
   300px のままだと主ボタン（142px）が次の行へ落ち、押せる位置から外れる。
   中身が切れても選択欄は開けば全部読める——落ちた主ボタンは開いても読めない。 */
select.cv-topbar-in { height: auto; min-height: 30px; padding: 3px 26px 3px 8px; line-height: 1.3; max-width: 180px; }   /* 200→180（2026-09-15・倍率の口の分） */
/* ★「保存」を足した分（2026-09-16）。狭い窓では選択欄を詰めて上バーを1行に保つ（1180 の窓で反映ボタンが2行目へ落ちた）。
   中身が切れても選択欄は開けば全部読める——落ちた主ボタンは開いても読めない（上の注記と同じ判断）。 */
@media (max-width: 1240px) { select.cv-topbar-in { max-width: 112px; } }
.cv-topbar-note { font-size: 12px; }
/* 倍率（Figma化③）。% は幅を固定して、数字が変わっても上バーの並びを動かさない */
/* ★幅は上バーを1行に保てる分だけ（1180 の窓で内側 820px・倍率の口を足して 18px はみ出し、反映ボタンが
   2行目の左へ落ちた＝2026-09-15 実測）。余白を詰め、% は数字の幅（tabular-nums）で固定して動かさない。 */
.cv-zoom { display: inline-flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.cv-topbar .cv-zoom .btn-ghost { padding-inline: 6px; }
.cv-zoom .cv-zoom-pct { min-width: 42px; justify-content: center; font-variant-numeric: tabular-nums; }
.cv-zoom button:disabled { opacity: .4; cursor: not-allowed; }
.cv-insp-zoomhint { color: var(--orange, #b26a00); }
.cv-topbar-grow { flex: 1 1 auto; }
/* ★上バーは**1段**に収める（2026-09-07・客の画面で実測）。2段になると、その分だけ
   実サイトが縮む（実測: バー105px・注意帯96+33px・リボン132px＝合計350〜382pxが
   805pxの窓の上に積まれ、サイトに残っていたのは220px＝27%だった）。
   ★折り返しは禁止しない——狭い窓で「操作子が横に消える」方が悪い。 */
.cv-find-in { max-width: 110px; }
.cv-icon-btn { min-width: 26px; padding-inline: 8px; font-size: 1rem; line-height: 1; }

/* 上部バーの中の小さなまとまり（検索・大きさ）。バーは折り返すので、
   まとまりごと次の行へ落ちるようにして、途中で切れないようにする。 */
.cv-topbar-grp { display: inline-flex; align-items: center; gap: 4px; }
/* ★display を持つ規則は hidden 属性に**勝つ**（実測: hidden を付けてもアドレス欄が
   234px 分そのまま並んでいた）。隠す指定は隠す側で書き切る。 */
.cv-topbar-grp[hidden] { display: none; }
/* ── 「サイトに反映する」は上バーの右端に置く（2026-09-07）──────────────
   ★主ボタンは**常に視野内**。以前は浮くカードの中に在り、客の画面で実測すると
     見えている所から756px下（＝押せない）だった。 */
/* ★カードの中に居たときの区切り線・上余白は、バーの中では要らない（実測: 51px の背が
   バーを77pxに押し上げていた）。置き場が変わったら、その置き場の作法に合わせる。 */
.cv-topbar .cv-publish-row {
  /* ★保存の状態の札を主ボタンの**上**に重ねる（2026-09-08）。横に並べると上バーの
     幅が 131px 増えて行が折り返し、サイトが 36〜38px 下がる。縦に積めば幅は
     1pxも増えず、行の高さ（57px）にも収まる（ボタン40px＋隙間2px＋札14px＝56px）。 */
  display: inline-flex; flex-direction: column; align-items: stretch; gap: 2px;
  flex: 0 0 auto; border-top: 0; margin-top: 0; padding-top: 0;
  /* ★札は流れから外してボタンの真上に置く（2026-09-17・客の指摘「縦のセンターラインが合っていない」）。
     流れに積むと、この列だけボタンが札の分（16px）下がり、左の操作子と中心が 8px ずれていた。 */
  position: relative;
}
.cv-topbar .cv-publish-row > .cv-save-state {
  position: absolute; right: 18px; top: -7px; z-index: 1; pointer-events: none;
  font-size: 10px; line-height: 11px; min-height: 0; padding: 0 6px;
}
.cv-topbar .cv-publish-row > .cv-save-state:not(:empty) { background: #fff; box-shadow: 0 1px 3px rgba(11,23,48,.12); }
/* ★上バーの操作子は**全部同じ背（30px）**（2026-09-17・客の指摘「揃わない」「縦長すぎる」）。
   29/30/32/38px が混ざっていて、中心は揃っても上下の縁が段違いに見えた。 */
.cv-topbar button:not(.cv-worst), .cv-topbar select.cv-topbar-in, .cv-topbar input.cv-topbar-in {
  height: 30px; min-height: 30px; padding-top: 0; padding-bottom: 0; box-sizing: border-box;
}
/* ★行の高さを固定する（2026-09-15・実測）。line-height: normal のままだと、最初に文字の部品を
   選んだ瞬間に書体の見本（_cvEnsureFontPreview が Google Fonts を読む）が入って和文の書体が
   差し替わり、ボタンの背が 39px→37px に変わる。上バーの背はこのボタンで決まっているので、
   **選んだだけでサイトが2px動いていた**（右パネルの門「選んでも動かない」で発覚）。 */
.cv-topbar #cv-publish { width: auto; white-space: nowrap; line-height: 20px; }
/* ── 「保存」（2026-09-16・v59）: 「サイトに反映する」の左隣。★押せないときも消さない（並びを動かさない）。
   ★押せる／押せないは**見た目で**分かる: 押せないときは .cv-topbar .btn-ghost:disabled の灰色（薄く・矢印が禁止）、
     押せるときは紺の縁と文字で「いま押す物」と分かる。背と行の高さは反映ボタンと揃える（選んだだけで上バーが動かない）。 */
.cv-topbar .cv-publish-btns { display: inline-flex; align-items: stretch; gap: 6px; }
.cv-topbar #cv-save-page { width: auto; min-width: 0; padding-inline: 12px; white-space: nowrap; line-height: 20px; justify-content: center; }
.cv-topbar #cv-save-page.is-dirty:not(:disabled) { color: var(--cv-navy); box-shadow: var(--cv-neo-sh), inset 0 0 0 1.5px var(--cv-navy); }
.cv-note-block#cv-publish-note { color: var(--orange, #b26a00); flex: 1 1 320px; }
/* ── 保存の状態（デモの「バージョン v11 ・ 自動保存」に当たる1チップ）─────────
   ★出来事（トースト）と状態（ここ）は別。トーストは消えるので、消えたあとに
     「保存されたのか」を確かめられる面が要る。 */
.cv-save-state {
  /* ★主ボタンの上に載る1行。**空でも高さを持たせる**（min-height）＝保存の前後で
     上バーの背が1pxも変わらない。中身が無いときは背景も出さない。 */
  font-size: 10px; font-weight: 700; line-height: 12px; padding: 1px 6px;
  min-height: 14px; border-radius: 999px; white-space: nowrap;
  text-align: center; overflow: hidden; text-overflow: ellipsis;
  color: var(--muted);
}
.cv-save-state:not(:empty) { background: var(--surface2, rgba(128,132,148,.16)); }
.cv-save-state.is-saved   { color: var(--ok-ink, #1a7f5a); }
.cv-save-state.is-dirty   { color: var(--orange, #b26a00); }
/* 「変更は保存されません」の確認（2026-09-16・v59）。器は既存のモーダル（.scan-mode-overlay / .scan-mode-box）。 */
.cv-leave-box { max-width: 460px; }
.cv-leave-msg { min-height: 1.4em; font-size: .78rem; line-height: 1.6; color: var(--orange, #b26a00); margin: -8px 0 12px; }
.cv-leave-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.cv-leave-actions .cv-leave-discard { color: var(--red, #c0392b); }
.cv-leave-actions button:disabled { opacity: .45; cursor: not-allowed; }
/* ── 直接編集の操作バーの見た目（2026-09-07・客が渡したスクリーンショットの実装）──
   ★値は自社HPの 03 EDIT のデモ（noren-studio.css:14）からそのまま取る。目分量にしない。
     --cv-neo    linear-gradient(145deg,#f0f3f8,#e2e6ed)
     --cv-neo-sh 5px 5px 12px rgba(160,172,192,.5), -5px -5px 12px rgba(255,255,255,.95)
     --cv-neo-in inset 4px 4px 10px …（押された／選ばれている状態）
   ★影は柔らかいが**面積を食う**ので、実物では 5px→3px に詰める。デモの版面は1120px、
     こちらは編集画面の中で1180px前後を20個近い操作子で分け合うため。
     形（浮いて見える／沈んで見える）は同じで、寸法だけ実物に合わせる。 */
:root {
  --cv-neo: linear-gradient(145deg, #f6f8fb, #e6eaf1);
  --cv-neo-sh: 3px 3px 7px rgba(160,172,192,.42), -3px -3px 7px rgba(255,255,255,.95);
  --cv-neo-in: inset 3px 3px 6px rgba(160,172,192,.45), inset -3px -3px 6px rgba(255,255,255,.95);
  --cv-navy: #1d3f7f;
}
/* 上バー・ツールバーは1枚の面に見せる（デモは角丸の白い板が1枚） */
.cv-topbar, .cv-ribbon {
  background: linear-gradient(180deg, #f4f6fa, #eef1f6);
  border: 0; box-shadow: none;
}
/* ★保存の札は右上の角に重ねるので、上下の余白は同じでよい（2026-09-17・「縦長すぎる」）。 */
.cv-topbar { border-radius: 14px 14px 0 0; padding: 8px 16px; margin-bottom: 0; }
.cv-ribbon { border-radius: 0 0 14px 14px; border-top: 1px solid rgba(11,23,48,.07); }
.cv-topbar-title { font-size: .95rem; font-weight: 800; color: #1c2a4a; letter-spacing: .01em; }
/* ページの選択欄は白い錠剤（デモの .sel-page） */
select.cv-topbar-in, .cv-topbar-in {
  border: 0; background: #fff; box-shadow: var(--cv-neo-in);
  border-radius: 9px; color: #4a5670; font-weight: 600;
}
/* 操作子はぜんぶ同じ錠剤。押されている物だけ沈める（色だけに意味を持たせない） */
.cv-topbar .btn-ghost, .cv-rb, .cv-icon-btn {
  border: 0; background: var(--cv-neo); box-shadow: var(--cv-neo-sh);
  border-radius: 9px; color: #4a5670; font-weight: 700;
}
/* ★押せない物は「押せない」と見た目で言う。:disabled の打ち消しが無いと、
   薄くもならず矢印も変わらないので、有効な物と見分けられない（実測で客が押していた）。 */
.cv-rb:disabled, .cv-topbar .btn-ghost:disabled {
  opacity: .4; cursor: not-allowed; box-shadow: none; background: #eceff4;
}
.cv-rb:disabled:active { transform: none; }
.cv-topbar-lbl[hidden] { display: none; }
.cv-topbar .btn-ghost.is-active, .cv-rb.is-active, .cv-icon-btn.is-active {
  background: #fff; box-shadow: var(--cv-neo-in); color: var(--cv-navy);
}
.cv-topbar .btn-primary {
  background: var(--cv-navy); color: #fff; border: 0; font-weight: 700;
  border-radius: 9px; box-shadow: 0 10px 20px -10px rgba(29,63,127,.8);
}
.cv-topbar .btn-primary:disabled { opacity: .45; box-shadow: none; }
.cv-ribbon-sep, .cv-topbar-sep { background: rgba(11,23,48,.12); }
/* 離脱の札（デモの .exit）。白地に赤——押す物ではなく「読む物」なので沈めない */
.cv-worst {
  background: #fff; box-shadow: var(--cv-neo-in); border: 0; border-radius: 9px;
  color: var(--red, #c0392b); font-weight: 700; font-size: .74rem; padding: 6px 11px;
}

/* ── 直接編集の「動き」（2026-09-07・自社HPの 03 EDIT のデモから実値を移植）──────
   ★数値はデモの CSS/GSAP から取った物をそのまま使う。目分量で置き換えない。
       ease            cubic-bezier(.2,.7,.2,1)      （noren-studio.css:19 --ease）
       押した凹み       transform .2s ＋ .hit を260ms （同 493/496・noren-top.js:250）
       文字の大きさ     font-size .35s var(--ease)    （同 511）
       選択枠が出る     opacity .25s                  （noren-top.js:243）
       画像が入る       .7s back.out(1.4)             （noren-top.js:255）
       クリックの波紋   30px・opacity .9→0・scale .4→1.4・.5s power2.out（同 240-241）
   ★動きは「押せたか」を返すためのもの。保存もプレビューの更新も往復があるので、
     押してから画面が変わるまでに間が空く。その間に何も返らないと客はもう一度押す。
   ★prefers-reduced-motion では全部止める（酔いの訴えは実際に来る）。 */
:root { --cv-ease: cubic-bezier(.2, .7, .2, 1); }
.cv-rb, .cv-topbar .btn-ghost, .cv-topbar .btn-primary { transition: transform .2s, box-shadow .2s; }
.cv-rb:active, .cv-topbar .btn-ghost:active, .cv-topbar .btn-primary:active { transform: scale(.94); }
/* 押した直後の凹み。指を離しても 260ms 残るので、速い押下でも手応えが見える */
.cv-rb.cv-hit, .cv-topbar .btn-primary.cv-hit, .cv-topbar .btn-ghost.cv-hit { transform: scale(.94); }
.cv-rb.cv-hit { background: #fff; color: var(--accent, #2350d4); }

/* 選んだ枠がすっと出る（いきなり現れると「何が起きたか」を目が追えない）。
   ★動かすのは**札だけ**。箱そのものに opacity の動きを付けると、動いている間
     opacity < 1 になって箱が**新しい重なりの文脈**を作り、中の取っ手（.cv-grip・z-index 4）が
     外の膜（.cv-shield）より上に立てなくなる——見えているのに掴めない。
     実測（2026-09-07・実Chrome）: 取っ手(600,291)の当たり先が DIV.cv-shield になり、
     ドラッグで幅が1度も変わらなかった。枠の出方は既にある border-color の遷移が担う。 */
.cv-box-sel::after { animation: cvSelIn .25s var(--cv-ease); }
@keyframes cvSelIn { from { opacity: 0; } to { opacity: 1; } }

/* クリックの波紋。★当たり判定を持たない（膜の上に置くので、持つと下が押せなくなる） */
.cv-ripple {
  position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px;
  border: 2px solid var(--accent, #2350d4); border-radius: 50%;
  pointer-events: none; z-index: 6; opacity: .9;
  animation: cvRipple .5s cubic-bezier(.22, .61, .36, 1) forwards;
}
@keyframes cvRipple {
  from { opacity: .9; transform: scale(.4); }
  to   { opacity: 0;  transform: scale(1.4); }
}

@media (prefers-reduced-motion: reduce) {
  .cv-rb, .cv-topbar .btn-ghost, .cv-topbar .btn-primary { transition: none; }
  .cv-rb:active, .cv-topbar .btn-ghost:active, .cv-topbar .btn-primary:active,
  .cv-rb.cv-hit, .cv-topbar .btn-primary.cv-hit, .cv-topbar .btn-ghost.cv-hit { transform: none; }
  .cv-box-sel::after { animation: none; }
  .cv-ripple { display: none; }
}
.cv-save-state.is-pending { color: var(--orange, #b26a00); }
/* 反映の結果（幅が要る）。空のあいだは場所を取らない。 */
.cv-publish-result:empty { display: none; }
.cv-publish-result { margin-bottom: 6px; }
/* 断り書きは1行。★内容は捨てない——見出しは常に見えたまま、理由は［詳しく］で開く。
   全幅の帯（57px）で出していたぶん、実サイトが縮んでいた。 */
.cv-note {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  font-size: .74rem; line-height: 1.6; padding: 4px 10px; border-radius: 8px;
  background: var(--surface, rgba(128,132,148,.06)); margin-bottom: 6px;
}
.cv-note-txt { flex: 1 1 auto; min-width: 0; }
/* ★断り書きの置き場。横に流して、幅が足りるあいだは隣に並べる（2026-09-07）。
   縦に積むと 1本33px×3＝99px が実サイトの上に乗る。内容は減らさない。
   ★各部の中では従来どおり縦に積む（同じ出所の話をばらばらの列に散らさない）。 */
.cv-notes { display: flex; flex-wrap: wrap; gap: 0 8px; align-items: flex-start; }
/* ★入れ物ではなく**断り書き1本ずつ**を並べる。入れ物ごと並べると、同じ入れ物に
   2本入っている側だけ縦に積まれたままになる（実測: 99px→78px にしか減らなかった）。 */
.cv-notes-part { display: contents; }
.cv-notes > .cv-notes-part > .cv-note { flex: 1 1 320px; min-width: 0; }
.cv-note-more > summary { cursor: pointer; font-size: .72rem; color: var(--muted); list-style: none; }
.cv-note-more > summary::-webkit-details-marker { display: none; }
.cv-note-more > summary::after { content: ' ▾'; }
.cv-note-more[open] > summary::after { content: ' ▴'; }
/* ★［詳しく］は**閉じているあいだ1行を占有しない**。flex-basis 100% を常時掛けると、
   閉じていても2行目ができて、畳んだ意味が消える（実測 59px＝1行に見えて2行だった）。 */
.cv-note-more { flex: 0 1 auto; color: var(--muted); font-size: .72rem; }
.cv-note-more[open] { flex: 1 1 100%; }

/* ★「✓ 完了」は場所を常に確保する（2026-09-07）。hidden で出し入れすると、文字を
   タップした瞬間に行の折り返しが変わってツールバーの背が伸び、サイトが33px下がる。
   見た目だけ消して、幅は取ったままにする＝**選択で画面が動かない**。 */
.cv-rb-done.is-off { visibility: hidden; pointer-events: none; }

/* 「こまかい書式」の中の入力欄（画像URL・説明・AIの指示）。行に収まる細さで、
   足りなければ折り返す（1行に収めるために本体を削らない）。 */
.cv-rb-in { height: 28px; font-size: .76rem; min-width: 140px; max-width: 260px; flex: 1 1 160px; }
/* AIの案。幅が要るのでリボンには入れず、プレビューの上の全幅の帯に出す。 */
.cv-ai-out:empty { display: none; }
.cv-ai-out { margin-bottom: 6px; }
/* ドラッグ中だけ出る受け入れ帯。★当たり判定を持たない（下の部品を塞がない）。 */
.cv-drop-hint {
  position: absolute; left: 12px; right: 12px; top: 12px; z-index: 7;
  border: 2px dashed var(--accent, #2350d4); border-radius: 10px;
  background: rgba(255, 255, 255, .92); color: var(--accent, #2350d4);
  font-size: .8rem; font-weight: 700; text-align: center; padding: 14px;
  pointer-events: none;
}
.cv-ribbon-grp { font-size: .68rem; font-weight: 700; color: var(--muted); flex: 0 0 auto; }
.cv-ribbon-dev { font-size: .66rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--accent, #2350d4); color: #fff; flex: 0 0 auto; }
/* 「重なりをほどく」がオンの間の札。同じ行に納める（行を増やすとプレビューが下がる） */
.cv-unstack-btn { flex: 0 0 auto; white-space: nowrap; font-size: .72rem; font-weight: 700; padding: 0 8px; }
#cv-unstack.is-active { background: #b45309; color: #fff; border-color: #b45309; }

/* ── 実測の離脱を示す赤い線（2026-09-03）──────────────────────────────
   常時カードで積むのをやめ、離脱が一番大きい位置にだけ線を引く。触れたときに
   中身を出し、線の**直前**の部品を橙色で示す（客が知りたいのは「どこを直すか」）。 */
.cv-issue-band {
  position: absolute; left: 0; width: 100%; height: 0; margin-top: -1px;
  border-top: 2px dashed var(--red, #c0392b); z-index: 3;
  /* ★帯に当たり判定を持たせない（2026-09-03）。幅いっぱい×高さ14px にしていたので、
     その高さに在る部品のクリックを**全部飲んで**いた（実測: 帯の上を横に走査すると、
     札の外でも当たるのは常に帯）。触れるのは札だけで足りる。 */
  pointer-events: none;
}
.cv-issue-band.is-worst { border-top-style: solid; border-top-width: 3px; }
.cv-issue-tag {
  /* ★掴めるのはここだけ。指で狙える大きさにしたいので、上下に少し余白を持たせる。 */
  pointer-events: auto; cursor: help;
  position: absolute; left: 6px; top: 2px; max-width: calc(100% - 12px);
  background: var(--red, #c0392b); color: #fff; font-size: 11px; line-height: 1.6;
  padding: 2px 8px; border-radius: 0 0 4px 4px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.cv-issue-band.is-worst .cv-issue-tag { font-weight: 700; }
.cv-issue-pop {
  position: fixed; z-index: 80; width: 340px; max-width: calc(100vw - 16px);
  padding: 12px 14px; border-radius: 10px;
  background: var(--surface, #171b24); border: 1px solid var(--red, #c0392b);
  box-shadow: 0 12px 38px rgba(0,0,0,.4); pointer-events: none;
}
/* ★「ここで○%が離脱」を押して出した吹き出し（2026-09-17）。左の余白に固定し、線の高さを矢印で指す。 */
.cv-issue-pop.is-pinned { pointer-events: auto; padding-right: 30px; }
.cv-issue-x {
  position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border: 0; border-radius: 6px;
  background: none; color: var(--muted); font-size: 1rem; line-height: 1; cursor: pointer;
}
.cv-issue-x:hover { background: rgba(0,0,0,.06); }
.cv-issue-pop.is-gutter::after {
  content: ''; position: absolute; right: -8px; top: calc(var(--cv-arrow-y, 20px) - 7px);
  border-style: solid; border-width: 7px 0 7px 8px;
  border-color: transparent transparent transparent var(--red, #c0392b);
}
.cv-issue-pop.is-gutter.is-offview::after { display: none; }
.cv-issue-num { font-size: 1.6rem; font-weight: 800; color: var(--red, #c0392b); line-height: 1.2; }
.cv-issue-num span { font-size: .72rem; font-weight: 600; color: var(--muted); margin-left: 6px; }
.cv-issue-ttl { font-weight: 700; font-size: .84rem; line-height: 1.6; margin: 6px 0 4px; }
/* ★色を書かない（2026-09-03）。var(--text, #e6e8ee) と書いていたが --text は
   **この配色に存在しない**トークンで、淡い既定値に落ちて背景 rgb(229,232,236) と
   コントラスト比 1.00＝本文が完全に読めなかった（本番で実測）。
   見出し（.cv-issue-ttl）は色を書いていないので読めていた——同じく継承に任せる。 */
.cv-issue-txt { font-size: .76rem; line-height: 1.75; }
.cv-issue-act { font-size: .76rem; line-height: 1.75; margin-top: 6px; color: var(--muted); }
.cv-issue-foot { font-size: .68rem; line-height: 1.6; margin-top: 8px; color: var(--dim, #8b93a7); }
/* ★線の直前の部品には、既にある .cv-box-issue（赤枠＋「!」）をそのまま使う。
   同じ選択子をあとから定義し直して上書きしない——詳細度と順序の勝ち負けに寄りかかると、
   別の場所の同名クラスで静かに壊れる（今日1度踏んだ）。 */
.cv-issue-rest > summary { cursor: pointer; font-size: .74rem; color: var(--muted); }
.cv-issue-rest-row { font-size: .76rem; line-height: 1.7; padding: 6px 0 0; }

/* 一番大きい離脱への入口。★赤い線は深い位置だと開いた時点で画面の外に居る
   （実測 y=3985 / 窓950）。線に気づけないと指摘そのものが存在しないのと同じ。 */
.cv-worst {
  display: inline-flex; align-items: center; gap: 4px; cursor: pointer;
  font-size: .74rem; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: var(--red, #c0392b); color: #fff; border: 0; white-space: nowrap;
}
.cv-worst:hover { filter: brightness(1.1); }
/* ★上バーが1行に収まらないときは、札とページの選択欄が縮む（2026-09-17・実測: 1456px の窓で札の136pxが
   「↺・保存・反映」を2行目へ押し出し、バーが縦長になっていた）。折り返しの判定は基準幅（札0px・選択欄60px）で行い、
   余った幅はまず札へ（grow 1000・max-content で頭打ち）、次に選択欄と隙間へ配る。札は数字が先に来る文言にして、
   切れても割合が読めるようにする（全文は title）。 */
.cv-topbar .cv-worst {
  display: block; flex: 1000 1 0px; min-width: 0; max-width: max-content;
  overflow: hidden; text-overflow: ellipsis; line-height: 18px; text-align: left; padding-inline: 8px;
}
.cv-topbar select.cv-topbar-in { flex: 1 1 60px; min-width: 60px; }

/* ★原因まで言えていない線。位置と割合は実測なので**引く**が、断定しているように
   見せない（細い破線・控えめな色）。「どこで何%落ちたか」と「なぜ落ちたか」は別の話。 */
.cv-issue-band.is-unsure { border-top-style: dotted; border-top-color: var(--orange, #e08a00); }
.cv-issue-band.is-unsure .cv-issue-tag { background: var(--orange, #e08a00); }
.cv-issue-band.is-worst.is-unsure { border-top-width: 2px; border-top-style: dashed; }
.cv-issue-unsure { font-size: .74rem; line-height: 1.7; margin-top: 8px; padding: 6px 8px;
  border-radius: 6px; background: rgba(224,138,0,.12); color: var(--orange, #e08a00); }

/* ★サイトの文字をそのまま直しているあいだの見た目（2026-09-04）。
   囲みは選択枠（.cv-box-sel）が担う。ここでは「打てる場所」であることを、
   薄い下地とIビームで示す。★outline は使わない——客のサイトの余白を動かさない。 */
.cv-hint-inline { font-size: .78rem; line-height: 1.8; }

/* ── 横バーで決める見た目（2026-09-04）────────────────────────────────
   ★段階（小/中/大）だと「いまより少しだけ」ができない。動かしながら決められる形に。
   つまみは指でも掴める大きさにする（12px の点は狙えない）。 */
.cv-sl { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.cv-sl-in { width: 68px; height: 18px; accent-color: var(--accent, #2350d4); cursor: pointer; }
.cv-sl-val { font-size: .68rem; color: var(--muted); min-width: 3.2em; text-align: right;
             font-variant-numeric: tabular-nums; }
.cv-sl-val.is-default { opacity: .6; }
/* 「サイトのまま」へ戻す。★戻せないと、客は一度触ったら元に戻せず触らなくなる。 */
.cv-sl-off {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  font-size: .72rem; line-height: 1; padding: 2px 3px; border-radius: 4px;
}
.cv-sl-off:hover { background: var(--surface2, rgba(128,132,148,.16)); }

/* ★中身が空の部品に出す小さな印（2026-09-04）。見えない当たり判定は罠になる——
   客は見えている文字を押したつもりで、空の部品を選んでしまう。18px の点線で
   「ここに空の部品が在る」と示し、押す先が分かる状態にする。 */
.cv-box-stub {
  border: 1px dashed rgba(35, 80, 212, .55);
  background: rgba(35, 80, 212, .10);
  border-radius: 3px;
}
.cv-box-stub:hover { background: rgba(35, 80, 212, .22); }

/* ★打っている間は取っ手を箱の外へ出す（2026-09-04）。内側に置くと 12x12px が
   文字に乗り、その位置でカーソルを置けない／なぞれない。消してしまうと、
   文字の部品は押した瞬間に打つ状態になるので大きさを変える手段が永久に無くなる。 */
.cv-grip-out.cv-grip-e  { right: -14px; }
.cv-grip-out.cv-grip-s  { bottom: -14px; }
.cv-grip-out.cv-grip-se { right: -14px; bottom: -14px; }

/* ★整列ガイド（2026-09-09・Canva 風）。✥ で動かす最中、他の部品の端・中央と揃う位置で出る線。
   pointer-events:none＝掴みの邪魔をしない。指を離すと消える（_cvGuidesClear）。 */
.cv-guide { position: absolute; z-index: 5; pointer-events: none; background: #ff3d8a; opacity: .95; }
.cv-guide-v { top: 0; bottom: 0; width: 1px; }
.cv-guide-h { left: 0; right: 0; height: 1px; }

/* ★上の帯の小さな見出し（2026-09-05）。ページの欄が2つ並ぶ理由を言葉で示す。 */
.cv-topbar-lbl {
  font-size: .74rem; color: var(--muted); white-space: nowrap; margin-right: 2px;
}

/* ★色の書き方が違うときの案内（2026-09-05）。小窓の中で言う——隅のトーストだけだと、
   小窓が閉じたのか間違えたのかが分からない。 */
.cv-color-err {
  margin-top: 8px; font-size: .74rem; line-height: 1.5;
  color: var(--danger, #d64545); max-width: 260px;
}

/* ★読まれ方: 離脱率を大きく（2026-09-06・客の要望「色分けを無くして離脱率を大きく」） */
.hm-exit { margin: 2px 0 12px; }
.hm-exit-lbl { font-size: .78rem; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.hm-exit-num { font-size: 3.2rem; font-weight: 800; line-height: 1.05; color: var(--ink); letter-spacing: -.02em; }
.hm-exit-unit { font-size: 1.4rem; font-weight: 700; margin-left: 2px; }
.hm-exit-sub { font-size: .76rem; color: var(--muted); margin-top: 2px; }

/* ★客の画面の専門語: 初出に短い説明を添える（2026-09-06・UXレビュー） */
abbr.gloss { text-decoration: underline dotted; text-underline-offset: 2px; cursor: help; }
.gloss-ex { font-size: .78em; color: var(--muted); margin-left: 2px; }
/* スマホ幅の「登録情報・設定」ページ版（サイドバーの中身を本文に出す） */
.side-account--page .side-account > summary { display: none; }
.side-account--page .side-account-body { padding: 0; }

/* ── 問題カードの「やること」（2026-09-15・設計 actionable-cards §5-1）──────────
   ★主役は「やること」の1文。見出し（何が起きたか）は灰色で小さく、根拠は畳む。 */
.step { margin: 2px 0 0; }
.step-do { font-size: .9rem; font-weight: 700; line-height: 1.7; }
.step-tag {
  display: inline-block; margin-right: 8px; vertical-align: .1em;
  font-size: .64rem; font-weight: 800; color: #fff; background: var(--red, #c0392b);
  border-radius: 10px; padding: 1px 8px;
}
.step-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.step-chip, .step-choice {
  font: inherit; font-size: .74rem; line-height: 1.5; padding: 3px 10px; border-radius: 999px;
  cursor: pointer; color: inherit; background: var(--input, rgba(0, 0, 0, .04));
  border: 1px solid var(--border, rgba(0, 0, 0, .12));
}
.step-choice { border-color: var(--accent, #2350d4); }
.step-chip:hover, .step-choice:hover { filter: brightness(.96); }
.step-meta { font-size: .72rem; color: var(--muted); line-height: 1.7; margin-top: 4px; }
.step-legacy { font-size: .8rem; line-height: 1.9; }
.step-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.step-act {
  font: inherit; font-size: .74rem; font-weight: 700; padding: 3px 12px; border-radius: 999px; cursor: pointer;
  color: #fff; background: var(--accent, #2350d4); border: 0;
}
.step-link { font: inherit; font-size: .72rem; color: var(--muted); background: none; border: 0; padding: 2px 4px; cursor: pointer; text-decoration: underline; }
.step-skip > summary { cursor: pointer; font-size: .72rem; color: var(--muted); list-style: revert; }
.step-state { font-size: .74rem; line-height: 1.7; margin-top: 6px; color: var(--muted); }
.step-skipped { font-size: .78rem; color: var(--muted); }
.step-result-row { padding: 4px 0; font-size: .8rem; line-height: 1.6; }

/* 問い合わせの分析と暖簾AIの成果: 印刷では操作（ボタン・同意・管理者の欄）を出さない */
@media print { .lz-noprint { display: none !important; } }

/* ── AIからの見られ方（AI クロールの実測・static/js/aicrawl.js）──────────────
   ★色は dataviz スキルの手順で決定: 表・状態文言はテキストトークン（--muted / --warn）、
     推移の棒グラフは単一系列（凡例不要）なので var(--brand) 一色のみを使う。 */
.aic-scroll { overflow-x: auto; margin: 10px 0; }
.aic-table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: .84rem; }
.aic-table th, .aic-table td { padding: 8px 10px; border-bottom: 1px solid var(--border, rgba(0, 0, 0, .1)); text-align: left; vertical-align: top; }
.aic-table thead th { font-size: .72rem; color: var(--muted); font-weight: 700; white-space: nowrap; }
.aic-table tbody th { font-weight: 700; white-space: nowrap; }
.aic-crawls { display: flex; flex-direction: column; gap: 2px; }
.aic-kind { font-size: .74rem; color: var(--muted); }
.aic-muted { color: var(--muted); font-size: .82rem; }
.aic-warn { color: var(--warn); font-size: .82rem; }
.aic-note { color: var(--muted); font-size: .76rem; line-height: 1.7; margin: 6px 0; }
.aic-bar { fill: var(--brand); }
.aic-trend { margin: 18px 0; }
.aic-trend h4, .aic-top h4, .aic-status h4 { font-size: .9rem; font-weight: 700; margin: 0 0 10px; }
.aic-top h5 { font-size: .8rem; font-weight: 700; margin: 10px 0 4px; }
.aic-trend-row {
  display: grid; grid-template-columns: 8em 1fr 1fr; gap: 12px; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--border, rgba(0, 0, 0, .06));
}
.aic-trend-name { font-size: .82rem; font-weight: 700; }
.aic-status p { font-size: .84rem; line-height: 1.7; margin: 4px 0; }
@media (max-width: 600px) {
  .aic-trend-row { grid-template-columns: 1fr; gap: 4px; }
}

/* ── 受信箱: 返信済みの目印 ─────────────────────────────────
   ★仕事は「二度送りを防ぐこと」。送信は取り消せないので、届いた順に目で追う手が
     見落とさない強さで出す（小さな灰色の1行では、本文に目が行って気づかない）。
   ★色は塗りつぶし＋白文字にする。`--ok-ink` は明所用の1値しか無く、暗所でも
     同じ濃い緑のままなので、**文字色に使うと暗い地で消える**。地に使えば
     白文字とのコントラストが明暗どちらでも保たれる。 */
.lz-inq-done {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .72rem; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
  color: #fff; background: var(--ok-ink, #0a6c4a);
  border-radius: 999px; padding: 3px 10px;
}
.lz-inq-done .lz-inq-done-when { font-weight: 500; opacity: .85; }
/* 一覧を上から舐めたときに、対応済みの行が地の色で分かるようにする */
.lz-inq.is-done { border-left: 3px solid var(--ok-ink, #0a6c4a); }

/* ── 読まれ方: ヒートマップの色・離脱の注記 ─────────────────────
   ★2026-09-18（客の要望）で色の帯を戻した。2026-09-06 に外した理由（5%刻みの段が
     縞に見えて下地が読めない）は、①連続グラデーション ②濃さ一定 ③消すボタン で潰す。
     経緯は tests/test_frontend.js の同名の門にも書いてある（理由が消えると、
     また「客の要望で戻す／外す」を繰り返す）。 */
/* ★この列は「広げて折り返す」ではなく「縮む」。2026-09-18、注記の列のぶん max-width を
     360→498px に広げたら、この行（flex-wrap:wrap）が 498+16+右列の min-width 220 = 734px を
     要求するようになり、**窓幅が概ね910pxより狭いと右の列ごと画像の下に落ちた**
     （離脱の一覧・離脱率の大きい数字・凡例が全部スクロール必須になる）。本番で発覚。
     flex:0 0 auto + width:100% は「縮まない」の意味なので、行に入らなければ折り返すしか
     道が無い。縮める形にしておけば、狭いときは画像が小さくなるだけで横並びは保たれる。 */
/* ★並べ方は**インラインstyleに書かない**。2026-09-18 に一度書いて踏んだ: インラインは
     どのCSS規則より強いので、狭い窓用の @media が**1つも効かなかった**（積む指定を
     書いたのに積まなかった）。幅の面倒を見るのはCSSの仕事なので、CSSに置く。 */
/* ★幅の面倒を見る基準は「窓の幅」ではなく「この行の幅」。左メニューが畳まれる幅があるので、
     行の幅は窓の幅に対して**単調でない**（実測: 窓920pxで行550px、窓880pxで行706px）。
     窓で切ると、窓は広いのに行は狭い帯（920px付近）が必ず取り残される。
     ＝測るべき物をそのまま測る（container query）。 */
.hm-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start;
          container-type: inline-size; }
/* ★flex-basis を 0 にするのが要点。`flex:0 0 auto`＋`max-width:498px` だと**基準幅が498px**に
     なり、行に入らなければ折り返すしか道が無い——右の列（min-width:220px）ごと画像の下に
     落ちて、離脱の一覧も離脱率の大きい数字も凡例も見えなくなった（本番で発覚）。
     基準0で伸ばす形なら、狭いときは縮むだけで横並びが保たれる。伸び幅は右の列より
     大きく取る（2:1）——画像の方が幅を必要とするため。 */
.hm-scroll { flex: 2 1 0; min-width: 0; max-width: 360px;
             max-height: 600px; overflow-y: auto; overflow-x: hidden; }
.hm-scroll.has-rail { max-width: 498px; }   /* 注記の列（138px）のぶんだけ広げる */
.hm-side   { flex: 1 1 0; min-width: 220px; }
/* 画像と注記を1つの器に並べる。注記を器の外に置くと、画像が長くて器がスクロールした
   ときに注記だけ取り残されて、**違う高さを指す**（%は画像の高さに対する比なので、
   一緒に流れる位置に置いて初めて意味が合う）。 */
.hm-stage { display: flex; align-items: stretch; }
.hm-shot  { position: relative; flex: 1 1 0; min-width: 0;
            border: 1px solid var(--border, #2a2f3a); border-radius: 8px; overflow: hidden; }
/* 熱の帯。曲線(z-index:3)・残存ラベル(4)より下、下地の真上に敷く */
.hm-band  { position: absolute; inset: 0; pointer-events: none; z-index: 2; }

/* 右の余白＝離脱の注記の置き場 */
.hm-rail      { flex: 0 1 138px; min-width: 96px; position: relative; }
.hm-rail-mark { position: absolute; left: 0; right: 0; display: flex; align-items: center;
                transform: translateY(-50%); }
.hm-rail-line { flex: 0 0 10px; height: 0; border-top: 2px dashed var(--bad, #D14343); }
.hm-rail-txt  { flex: 1 1 auto; min-width: 0;
                font-size: .68rem; line-height: 1.4; color: var(--ink, #141A1A);
                background: var(--surface, #fff); border: 1px solid var(--border, #2a2f3a);
                border-left: 3px solid var(--bad, #D14343); border-radius: 6px; padding: 3px 7px; }
.hm-rail-txt b { color: var(--bad, #D14343); font-size: .84rem; font-weight: 800; }
.hm-rail-n     { display: block; font-style: normal; font-size: .6rem; color: var(--dim, #6E7B77); }

/* 凡例。色だけ出して意味を書かないと、赤が「良い」か「悪い」かで読み手が反転する */
.hm-legend     { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.hm-legend-bar { flex: 1 1 60px; min-width: 56px; max-width: 150px; height: 8px; border-radius: 999px; }
.hm-legend-lbl { font-size: .66rem; color: var(--muted, #566360); white-space: nowrap; }

/* ★狭い窓では横に並べるのをやめ、数字を先・画像を後にする。
   `flex:2 1 0` は「絶対に折り返さない」形なので、狭くすると画像がどこまでも細くなる
   （実測: 窓420pxで画像の幅10px＝何も読めない）。折り返さないことと、画像が読めることは
   両立しないので、ある幅から下は**積む**。積むときに画像が上に来ると、画像は最大600px
   あるので数字がその下に隠れる——だから右の列を先に出す（order:-1）。
   ★この幅は「窓の幅」で切っている。本当に見たいのは行の幅（左メニューの開閉で変わる）だが、
     行の幅は窓の幅に対して単調でないので、幅を掃いて実測した上でこの値にしている。 */
/* 行が狭いときは横並びをやめて積む。★画像を上に置くと、画像は最大600pxあるので
   数字がその下に隠れる——数字（右の列）を先に出す。 */
@container (max-width: 640px) {
  .hm-side   { order: -1; flex: 1 1 100%; }
  .hm-scroll, .hm-scroll.has-rail { flex: 1 1 100%; max-width: 100%; }
}
@container (max-width: 480px) {
  .hm-rail      { flex: 0 1 104px; min-width: 88px; }
  .hm-rail-txt  { font-size: .62rem; padding: 2px 5px; }
  .hm-rail-txt b { font-size: .74rem; }
}

/* ── 反応（CV）の内訳・その他の外部遷移 2026-09-18 ──
   ★色は tokens.css の明暗2値ある物だけを使う（--muted / --dim / --border / --surface）。
   --ok-ink のような1値しか無い名前を文字色に使うと、暗い画面で沈む。 */
.lz-cv-intent      { margin-top:10px; display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.lz-cv-intent-label{ font-size:.7rem; color:var(--dim); margin-right:2px; }
.lz-cv-chip        { font-size:.72rem; color:var(--muted); background:var(--surface);
                     border:1px solid var(--border); border-radius:10px; padding:2px 9px; }
.lz-cv-chip b      { color:var(--ink); font-weight:700; }
.lz-cv-out         { margin-top:10px; font-size:.74rem; color:var(--muted); }
.lz-cv-out summary { cursor:pointer; color:var(--muted); }
.lz-cv-out-list    { margin:8px 0 0; padding-left:1.2em; line-height:1.9; }
.lz-cv-host        { word-break:break-all; }
.lz-cv-out-note    { margin-top:8px; font-size:.7rem; color:var(--dim); line-height:1.8; }

/* 離脱の一覧（右の列・常に見える）。
   ★器（.hm-scroll）の外に置くことが仕事。中に置くと、中身が器より長いときに
     高さで置いた注記が既定の表示範囲に1つも入らない（実測: 器600px に対し
     実サイト縮小版の中身5127px・注記は1410/2692/3717px＝初期表示でゼロ個）。 */
.hm-exits { margin: 12px 0 4px; }
.hm-exits-ttl { font-size: .72rem; font-weight: 700; color: var(--muted, #566360); margin-bottom: 6px; }
.hm-exits-row {
  display: flex; align-items: baseline; gap: 8px; width: 100%;
  font: inherit; text-align: left; cursor: pointer;
  background: var(--surface, #fff); color: var(--ink, #141A1A);
  border: 1px solid var(--border, #2a2f3a); border-left: 3px solid var(--bad, #D14343);
  border-radius: 6px; padding: 5px 10px; margin-bottom: 5px;
}
.hm-exits-row:hover { background: var(--surface-2, #F4F5F2); }
.hm-exits-at { font-size: .72rem; color: var(--muted, #566360); white-space: nowrap; }
.hm-exits-n  { font-size: .84rem; font-weight: 800; color: var(--bad, #D14343); white-space: nowrap; }
.hm-exits-v  { font-size: .68rem; color: var(--dim, #6E7B77); margin-left: auto; white-space: nowrap; }
.hm-exits-note { font-size: .66rem; color: var(--dim, #6E7B77); }
/* 押した先の注記を一瞬だけ強調する（どれに飛んだか分からないと、押した意味が消える） */
.hm-rail-mark.is-focus .hm-rail-txt { box-shadow: 0 0 0 3px var(--bad-soft, rgba(209,67,67,.25)); }
