:root {
  --bg: #faf9f6;
  --surface: #ffffff;
  --surface-2: #f1efe8;
  --text: #2c2c2a;
  --muted: #5f5e5a;
  --hint: #888780;
  --border: rgba(0,0,0,0.12);
  --coral: #d85a30;
  --coral-bg: #faece7;
  --coral-text: #712b13;
  --teal-bg: #e1f5ee;
  --teal-text: #085041;
  --info: #185fa5;
  --radius: 12px;
  --radius-sm: 8px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Sans", "Noto Sans JP", sans-serif;
  line-height: 1.6;
}
.wrap { max-width: 860px; margin: 0 auto; padding: 24px 20px 60px; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.brand { font-size: 17px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--info); display: inline-block; }
.logo { width: 16px; height: 16px; border-radius: 5px; background: var(--info); display: inline-block; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { font-size: 13px; padding: 5px 12px; border-radius: var(--radius-sm); border: 0.5px solid var(--border); color: var(--muted); text-decoration: none; background: transparent; flex: none; white-space: nowrap; }
.pill.active { background: var(--surface-2); color: var(--text); }
.weekbar { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.wk { font-size: 20px; font-weight: 500; }
.wk-sub { font-size: 13px; color: var(--muted); }
.btn { font-size: 13px; padding: 7px 13px; border-radius: var(--radius-sm); border: 0.5px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; cursor: pointer; display: inline-block; }
.btn:hover { background: var(--surface-2); }
.statusline { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--hint); margin-bottom: 20px; }
/* 全体の記事量。伸長クラスターの判定では割って消しているぶんを、実数のまま添える。 */
.sdot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.sdot.ok { background: #1d9e75; }
.sdot.warn { background: #ef9f27; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 30px; }
.stat { border-radius: var(--radius); padding: 18px 18px 20px; }
.stat .lab { font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.stat .val { font-size: 40px; font-weight: 500; line-height: 1.05; letter-spacing: -0.5px; }
.stat:nth-child(1) { background: #e6f1fb; }
.stat:nth-child(1) .lab { color: #185fa5; } .stat:nth-child(1) .val { color: #0c447c; }
.stat:nth-child(2) { background: #faece7; }
.stat:nth-child(2) .lab { color: #993c1d; } .stat:nth-child(2) .val { color: #712b13; }
.stat:nth-child(3) { background: #faeeda; }
.stat:nth-child(3) .lab { color: #854f0b; } .stat:nth-child(3) .val { color: #633806; }
.stat:nth-child(4) { background: #e1f5ee; }
.stat:nth-child(4) .lab { color: #0f6e56; } .stat:nth-child(4) .val { color: #085041; }
.sec { font-size: 15px; font-weight: 500; margin: 0 0 12px; }
.sec .sub { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 8px; }
.panel { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius); padding: 2px 18px 18px; margin-bottom: 20px; }
.panel-head { display: flex; align-items: baseline; gap: 10px; font-size: 19px; font-weight: 500; padding: 16px 0 14px; margin-bottom: 16px; border-bottom: 0.5px solid var(--border); }
.panel-head .acc { width: 6px; height: 18px; border-radius: 3px; align-self: center; flex: none; }
.panel-head .sub { font-size: 13px; color: var(--muted); font-weight: 400; }
.panel.rise .panel-head .acc { background: var(--coral); }
.panel.front .panel-head .acc { background: #0f6e56; }
.panel.sigtheme .panel-head .acc { background: #a86b12; }
/* 兆しの多いテーマ：1行1テーマ。件数の棒は、その週でいちばん多いテーマを満幅にした相対値。 */
.sgt .rnum { flex: none; }
.sgt .sgt-name { font: inherit; font-size: 14px; color: var(--text); background: none; border: 0;
                 padding: 0; cursor: pointer; text-align: left; }
.sgt .sgt-name:hover { color: var(--info); }
.sgt .sgt-rise { margin-left: 8px; font-size: 11px; color: var(--coral-text); }
.sgt .meter { width: 90px; }
.sgt .meter > span { background: #a86b12; }
.sgt .nov { min-width: 150px; }
/* リレーション。伸長（コーラル）・フロンティア（緑）と見分けが付く色にする。 */
.panel.rel .panel-head .acc { background: #185fa5; }
.notebar { margin: 0 0 14px; font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin-bottom: 0; }
.card { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius); padding: 14px 16px; cursor: pointer; }
.card:hover { border-color: rgba(0,0,0,0.25); }
/* 伸長カードは「記事を見る」ボタンだけがクリック対象。カード全体は非クリックに見せる。 */
.card[data-region] { cursor: default; }
.card[data-region]:hover { border-color: var(--border); }
.card .lbl { font-size: 14px; font-weight: 500; line-height: 1.5; margin-bottom: 10px; }
.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.rnum { font-size: 13px; font-weight: 500; color: var(--coral-text); background: var(--coral-bg); border-radius: var(--radius-sm); padding: 2px 10px; }
.rname { font-size: 15px; font-weight: 500; line-height: 1.4; margin-bottom: 4px; }
.rinterp { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 8px; }
.rsig { font-size: 12px; color: var(--hint); background: var(--surface-2); border-radius: var(--radius-sm); padding: 5px 9px; margin-bottom: 12px; }
.rlabel { border: 0.5px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); padding: 8px 10px; margin-bottom: 12px; }
.rlabel-cap { font-size: 11px; color: var(--hint); margin-bottom: 4px; }
.rlabel-list { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.6; }
.rlabel-list li { margin: 0; }
.card .meta { display: flex; align-items: center; justify-content: space-between; }
.tags { display: flex; gap: 6px; }
.tag { font-size: 12px; padding: 2px 9px; border-radius: var(--radius-sm); white-space: nowrap; }
.tag.vel { background: var(--coral-bg); color: var(--coral-text); }
/* 増分そのものより「揺れの何倍か」のほうが判定の実体なので、小さく添える。 */
.vel-z { margin-left: 6px; opacity: 0.75; font-size: 0.86em; }
.tag.arc { background: var(--teal-bg); color: var(--teal-text); }
.card .note { font-size: 13px; color: var(--muted); margin-top: 10px; }
.card .open { margin-top: 10px; padding: 5px 11px; font-size: 12px; }
.list { margin-bottom: 24px; }
.fr { display: flex; align-items: center; gap: 12px; padding: 11px 0 11px 8px; border-top: 0.5px solid var(--border); border-left: 3px solid transparent; }
.chip { font-size: 12px; padding: 2px 8px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.fr .ti { flex: 1; font-size: 14px; }
.fr a { color: var(--text); text-decoration: none; }
.fr a:hover { color: var(--info); }
.meter { width: 56px; height: 5px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--info); }
/* 右端に出る小さな数字。フロンティア/月間は「上位4%」「兆し4」と短く、
   かつてここに「新規度 上位87%」を出していた頃の名残。いまは兆しの内訳などの短い文字だけ。
   共通で折り返しを止め、長いほうにだけ幅を与える。 */
.nov { font-size: 12px; color: var(--muted); text-align: right;
       flex: 0 0 auto; white-space: nowrap; }
.fr .nov { min-width: 36px; }
.muted { color: var(--muted); }
.cold { font-size: 12px; padding: 2px 9px; border-radius: var(--radius-sm); background: var(--coral-bg); color: var(--coral-text); }
.wrap.wide { max-width: 1160px; }
.map-layout { display: flex; gap: 20px; align-items: flex-start; }
.map-col { flex: 0 0 600px; position: sticky; top: 14px; }
.list-col { flex: 1; min-width: 0; }
.mapcanvas { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius-lg); padding: 8px; margin: 0; }
@media (max-width: 1000px) { .map-layout { flex-direction: column; } .map-col { position: static; flex: none; width: 100%; max-width: 600px; } }
.mapcanvas svg { width: 100%; height: auto; display: block; }
.lreg { width: 11px; height: 11px; border-radius: 50%; border: 1px solid #0f6e56; background: var(--surface); flex: none; }
.rlist { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-content: start; }
@media (max-width: 1100px) { .rlist { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px)  { .rlist { grid-template-columns: 1fr; } }
.rlist-head { display: flex; align-items: baseline; gap: 14px; margin: 0 0 12px; flex-wrap: wrap; }
.rlist-head .sec { margin: 0; }
.rlist-sort { font-size: 13px; color: var(--muted); }
.rlist-sort select { font: inherit; font-size: 13px; margin-left: 6px; padding: 3px 6px; }
.rlist-note { font-size: 12px; }
/* カード下段: ミニグラフと件数。グラフを外すときはこの .rcard-spark を display:none にする。 */
.rcard-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.rcard-spark { flex: none; line-height: 0; }
.rcard-sig { color: var(--coral-text); }
.snum { color: var(--hint); font-size: 12px; }
.trbadge { display: inline-block; font-size: 10px; line-height: 1; padding: 2px 5px; margin-left: 4px; border-radius: 999px; background: var(--surface-2, rgba(0,0,0,0.06)); color: var(--muted); vertical-align: middle; }
.rtag { display: inline-block; font-size: 11px; line-height: 1; padding: 2px 7px; margin-left: 6px; border-radius: 999px; background: var(--success-bg, rgba(31,157,140,0.12)); color: var(--info, #1F9D8C); vertical-align: middle; }
/* フロンティア記事の出どころのクラスター。押すと伸長クラスターと同じドロワーを開く。 */
.rchip { display: inline-block; font: inherit; font-size: 11px; line-height: 1; padding: 3px 8px;
  margin-left: 6px; border-radius: 999px; border: 0.5px solid var(--border);
  background: transparent; color: var(--muted); cursor: pointer; vertical-align: middle; }
.rchip:hover { border-color: var(--info); color: var(--info); }
/* 研究・論文チャネル由来の印（緑のLLMタグ・コーラルの新規色と衝突しない落ち着いた藍系）。 */
.ctag { display: inline-block; font-size: 11px; line-height: 1; padding: 2px 7px; margin-left: 6px; border-radius: 999px; background: rgba(90,79,153,0.12); color: #5a4f99; vertical-align: middle; white-space: nowrap; }
/* フロンティア該当の印（研究・論文ページ用。注目の兆しを示す金系）。 */
.ftag { display: inline-block; font-size: 11px; line-height: 1; padding: 2px 7px; margin-left: 6px; border-radius: 999px; background: rgba(224,161,26,0.15); color: #9a6a00; vertical-align: middle; font-weight: 500; white-space: nowrap; }
/* 直近の取り込みバッチで新規に入った記事の行を色替え（左のコーラルアクセント＋淡い地色）。 */
.fr.is-new, .arch-row.is-new, .drawer-row.is-new { border-left-color: var(--coral-text); background: var(--coral-bg); }
.reptag { color: var(--info); font-size: 13px; margin-right: 4px; cursor: help; }
.acts { display: inline-flex; gap: 4px; flex: none; }
.act { width: 26px; height: 26px; padding: 0; border: 0.5px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--muted); font-size: 13px; line-height: 1; cursor: pointer; }
.act:hover { background: var(--surface-2, rgba(0,0,0,0.05)); }
.act-scrap.on { color: #E0A11A; border-color: #E0A11A; background: rgba(245,165,36,0.12); }
.act-exclude:hover { color: #B85042; border-color: #B85042; }
.fr .acts { margin: 0 4px; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.filters label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.filters select { height: 34px; border: 0.5px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); font-size: 13px; padding: 0 8px; color: var(--text); }
.filters input[type=text] { flex: 1; min-width: 160px; height: 34px; padding: 0 12px; border: 0.5px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); font-size: 14px; color: var(--text); }
.filters button { height: 34px; padding: 0 14px; border: 0.5px solid var(--border-secondary, rgba(0,0,0,0.2)); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-size: 13px; cursor: pointer; }
.filters button:hover { background: var(--surface-2); }
.filters button.ghost { color: var(--muted); }
/* 検索ボタンの列。絞り込みとテーマの両方に効くので、2つの枠の下に置く。 */
.filters-actions { display: flex; gap: 8px; margin-top: 10px; }
.filters-actions button { height: 34px; padding: 0 18px; border: 0.5px solid var(--border-secondary, rgba(0,0,0,0.2));
  border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-size: 13px; cursor: pointer; }
.filters-actions button:hover { background: var(--surface-2); }
.filters-actions button.ghost { color: var(--muted); }
.arch-list { display: flex; flex-direction: column; }
.arch-row { display: flex; align-items: baseline; gap: 12px; padding: 10px 2px 10px 8px; border-top: 0.5px solid var(--border); border-left: 3px solid transparent; }
/* 週ラベル＋出典。出典名が長い媒体（ダイヤモンド・オンライン等）だと 200px に収まらず、
   週ラベルのほうが潰れて「2026-\nW34」と折り返していた。週は折り返させず、
   はみ出す出典名だけを省略する。 */
.arch-meta { display: flex; align-items: center; gap: 8px; flex: none; width: 232px; }
.arch-meta .wkid { flex: none; white-space: nowrap; }
.arch-meta .chip { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arch-title { flex: 1; min-width: 0; font-size: 14px; }
.arch-title a { color: var(--text); text-decoration: none; }
.arch-title a:hover { color: var(--info); }
.arch-cl { flex: none; width: 200px; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) { .arch-row { flex-wrap: wrap; } .arch-meta, .arch-cl { width: auto; } }
.rcard { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius); padding: 14px 16px; cursor: pointer; }
.rcard:hover { border-color: rgba(0,0,0,0.25); }
.rcard.rising { border-color: var(--coral); }
.rcard-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.rmk { display: inline-flex; flex: none; }
.rmk svg { display: block; }
.rcard-name { font-size: 15px; font-weight: 500; }
.rcard-badge { font-size: 11px; color: var(--coral-text); background: var(--coral-bg); border-radius: var(--radius-sm); padding: 2px 8px; }
.rcard-interp { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 8px; }
.rcard-kw { font-size: 12px; color: var(--hint); background: var(--surface-2); border-radius: var(--radius-sm); padding: 5px 9px; margin-bottom: 8px; }
.rcard-cap { font-size: 11px; color: var(--hint); margin-bottom: 2px; }
.rcard-scamas { margin: 0 0 8px; padding-left: 18px; font-size: 13px; line-height: 1.6; }
.rcard-scamas li { margin: 0; }
.rcard-meta { font-size: 12px; color: var(--muted); }
.region-explain { display: flex; gap: 14px; align-items: flex-start; }
.regionmapcanvas { flex: none; width: 460px; max-width: 460px; margin: 0; }
.regionlist-side { flex: 1; grid-template-columns: 1fr; max-height: 460px; overflow-y: auto; margin-top: 0; }
@media (max-width: 760px) { .region-explain { flex-direction: column; } .regionmapcanvas { width: 100%; max-width: 560px; } .regionlist-side { max-height: none; } }
.regionlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin-top: 10px; }
.regrow { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 8px 12px; background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius-md); cursor: pointer; }
.regrow:hover { border-color: rgba(0,0,0,0.25); }
.regrow.rising { border-color: var(--coral); background: var(--coral-bg); }
.regname { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.regmeta { font-size: 11px; color: var(--muted); flex: none; }
.regrow.rising .regmeta { color: var(--coral-text); }
.maplegend { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius-lg); padding: 14px; }
.maplegend.horiz { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-bottom: 12px; padding: 12px 16px; }
.maplegend.horiz .legrow { margin-bottom: 0; }
.legrow { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text); margin-bottom: 10px; }
.ldot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.ldot.known { background: #b4b2a9; }
.ldot.art { background: #1d9e75; }
.ldot.front { background: #d85a30; }
.ldot.hover { background: #185fa5; }
.lring { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid #d85a30; flex: none; }
@media (max-width: 640px) { .maprow { flex-direction: column; } .maplegend { width: auto; } }
.drawer { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-top: 8px; }
.drawer.hidden { display: none; }
.modal { position: fixed; inset: 0; background: transparent; display: flex; align-items: flex-start; justify-content: flex-end; z-index: 100; padding: 84px 28px 28px; }
.modal.hidden { display: none; }
.modal-card { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius); width: 100%; max-width: 500px; max-height: 80vh; overflow: auto; padding: 16px 20px; box-shadow: 0 12px 48px rgba(0,0,0,0.22); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.drawer-head span { font-size: 15px; font-weight: 500; }
.drawer-head button { border: none; background: transparent; font-size: 20px; cursor: pointer; color: var(--muted); }
.drawer-row { padding: 8px 0 8px 8px; border-top: 0.5px solid var(--border); border-left: 3px solid transparent; font-size: 13px; display: flex; gap: 10px; }
.drawer-row .wkid { color: var(--hint); width: 64px; flex: none; }
@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: 1fr; }
}

/* ログインページ */
.login-wrap { max-width: 420px; }
.login-box { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius); padding: 24px; }
.login-box label { font-size: 12px; color: var(--muted); display: block; margin: 12px 0 4px; }
.login-box input { width: 100%; height: 36px; padding: 0 12px; border: 0.5px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface); font-size: 14px; color: var(--text); box-sizing: border-box; }
.login-box input:focus { outline: none; border-color: var(--info); box-shadow: 0 0 0 2px rgba(24,95,165,0.15); }
.login-box button { width: 100%; margin-top: 18px; height: 36px; border: 0.5px solid var(--info); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--info); font-size: 14px; cursor: pointer; }
.login-box button:hover { background: var(--surface-2); }
.toast { padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px; }
.toast.err { background: var(--coral-bg); color: var(--coral-text); }

/* フロンティア読解ページ（研究・論文専用・実験的機能）（①時間の手がかり＋②だから何？） */
.fread-guide { font-size: 12px; color: var(--muted); background: var(--surface); border: 0.5px solid var(--border);
  border-radius: var(--radius); padding: 10px 14px; margin: 8px 0 4px; line-height: 2.0; }
.fread-list { display: flex; flex-direction: column; gap: 12px; }
.fread-card { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.fread-top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.fread-score { font-size: 12px; color: var(--muted); }
.fread-top .act-scrap { margin-left: auto; }
.fread-title { font-size: 15px; font-weight: 500; color: var(--text); text-decoration: none; line-height: 1.55; }
.fread-title:hover { color: var(--info); }
/* ②「だから何？」= このページの主役。淡いコーラルで強調。 */
/* 要約行に添える「上位○％」の断り。幾何の順位であってAI判定ではないことを示す。 */
.fread-legend { display: block; margin-top: 3px; }
.fread-note { margin: 9px 0 7px; padding: 9px 12px; background: var(--coral-bg); color: var(--coral-text);
  border-radius: var(--radius-sm); font-size: 14px; line-height: 1.6; }
.fread-meta { font-size: 12px; color: var(--muted); }
/* 「だから何？」が出せなかった理由。黙って省くと機能が消えたように見えるため出す。 */
.fread-warn { display: block; font-size: 12px; margin-top: 6px; padding: 6px 10px;
              border-radius: var(--radius-sm); background: var(--coral-bg); color: var(--coral-text); }
.fread-grow { color: #B85C1E; font-weight: 500; }
.fread-site { color: var(--muted); }
.fread-prev { font-size: 12px; color: var(--muted); margin-top: 5px; }
.fread-prev .wkid { color: var(--hint); margin-right: 4px; }
.fread-tag { display: inline-block; font-size: 11px; line-height: 1; padding: 3px 8px; border-radius: 999px;
  vertical-align: middle; white-space: nowrap; }
.fread-tag.t-imp { background: var(--coral-bg); color: var(--coral-text); }
.fread-tag.t-grow { background: rgba(184,92,30,0.12); color: #B85C1E; font-weight: 500; }
.fread-tag.t-recur { background: rgba(31,157,140,0.12); color: #1F9D8C; }
.fread-tag.t-new { background: var(--surface-2, rgba(0,0,0,0.06)); color: var(--muted); }
.fread-tag.t-today { background: var(--coral-bg); color: var(--coral-text); }
.fread-tag.t-res { background: rgba(90,79,153,0.12); color: #5a4f99; }
/* フロンティア読解のページヘッダ（タイトル＋週セレクタ） */
.frontmap-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin: 8px 0 16px; }
.frontmap-title { margin: 0 0 4px; font-size: 22px; font-weight: 500; }
.frontmap-week { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.frontmap-week select { height: 34px; border: 0.5px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); padding: 0 10px; }
@media (max-width: 640px) { .frontmap-head { flex-direction: column; } }
/* ナビの仕切り（本流｜研究・論文系｜個人 の性格の違いを示す細い縦線） */
.nav-sep { width: 2px; border-radius: 1px; background: rgba(24,95,165,0.4); align-self: stretch; margin: 3px 2px; flex: none; }

/* 月間概観ページ（直近4週のクラスターの動き） */
.mon-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (max-width: 760px) { .mon-grid { grid-template-columns: 1fr; } }
.mon-card { cursor: default; }
.mon-card:hover { border-color: var(--border); }
.mon-tags { display: flex; gap: 6px; align-items: center; }
.mon-move { font-size: 12px; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.mon-move.m-rise { background: var(--coral-bg); color: var(--coral-text); font-weight: 500; }
.mon-move.m-spike { background: rgba(224,161,26,0.15); color: #9a6a00; }
.mon-move.m-flat { background: var(--surface-2); color: var(--muted); }
.mon-move.m-fall { background: var(--teal-bg); color: var(--teal-text); }
.mon-move.m-spor { background: var(--surface-2); color: var(--hint); }
.mon-grow { font-size: 12px; color: #B85C1E; font-weight: 500; white-space: nowrap; }
.mon-spark { display: flex; align-items: center; gap: 10px; margin: 4px 0 8px; }
.mon-total { font-size: 12px; color: var(--muted); white-space: nowrap; }
/* クラスターごとの兆しの出方。4週計の右に並べる。件数が主で、割合は添えもの。
   0件も「なし」と出す（空欄だと、判定していないのか0なのか読み分けられない）。 */
.mon-sig { font-size: 12px; color: var(--coral-text); background: var(--coral-bg);
           border-radius: 999px; padding: 2px 9px; white-space: nowrap; flex: none; }
.mon-sig-rate { margin-left: 6px; opacity: 0.75; }
.mon-sig-none { color: var(--hint); background: var(--surface-2); }
/* 並べ替えの切り替え。見出しのすぐ下に置く（並びの説明文と対で読む）。 */
.sortbar { display: flex; align-items: center; gap: 6px; margin: -4px 0 12px; }
.sortbar-cap { font-size: 12px; color: var(--hint); margin-right: 2px; }
.sortbar .pill { cursor: pointer; }
.sortbar .pill.on { background: var(--surface-2); color: var(--text); }
.mon-arts { border-top: 0.5px solid var(--border); padding-top: 8px; }
.mon-arts-cap { font-size: 11px; color: var(--hint); margin-bottom: 4px; }
.mon-arts ul { margin: 0; padding-left: 0; list-style: none; }
.mon-arts li { font-size: 13px; line-height: 1.7; display: flex; gap: 8px; align-items: baseline; }
.mon-arts li .wkid { color: var(--hint); font-size: 11px; flex: none; width: 62px; }
.mon-arts li a { color: var(--text); text-decoration: none; min-width: 0; }
.mon-arts li a:hover { color: var(--info); }
/* 「兆し3」のバッジ。li は flex なので、見出しが長いとバッジが押し縮められて
   「兆」「し3」と割れる（実測で84件中67件、3行になるものもあった）。
   縮まない・折り返さない、の両方を指定する。ハイライトの .rtag は長い文なので、ここだけに効かせる。 */
.mon-arts li .rtag { flex: none; white-space: nowrap; }

/* スクラップ画面：選択してスキャマ草案（PPTX）に書き出す */
.scrap-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.scrap-bar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.btn.primary { border-color: var(--info); color: var(--info); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn:disabled:hover { background: var(--surface); }
.scrap-pick { flex: none; margin: 0 2px 0 0; }

/* 動向ページ（選んだクラスターを直近4週×その前4週で比べる） */
.trend-bar { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; flex-wrap: wrap; }
.trend-bar label { font-size: 13px; color: var(--muted); }
.trend-bar select { max-width: min(100%, 460px); }
.trend-count { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 4px 2px; }
.trend-nums { display: flex; flex-direction: column; gap: 5px; font-size: 13px; align-items: flex-start; }
.trend-big b { font-size: 22px; font-weight: 500; }

.trend-words { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 22px; }
@media (max-width: 760px) { .trend-words { grid-template-columns: 1fr; } }
.tw-h { font-size: 13px; margin: 0 0 6px; font-weight: 600; }
.tw-h.up { color: #712b13; }
.tw-h.down { color: var(--muted); }
.tw-list { list-style: none; padding: 0; margin: 0; }
.tw { display: grid; grid-template-columns: 8.5em 1fr auto auto; align-items: center;
  gap: 8px; font-size: 12.5px; padding: 3px 0; }
.tw-term { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tw-bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.tw-bar i { display: block; height: 100%; border-radius: 3px; background: #d85a30; }
.tw.down .tw-bar i { background: #b4b2a9; }
.tw-num { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tw-cnt { color: var(--muted); white-space: nowrap; font-size: 11.5px; }
/* 比較の窓がクラスター再構築をまたいでいるときの断り。数字より先に読ませたいので上に出す。 */
.rebuild-warn { font-size: 12.5px; line-height: 1.7; color: var(--coral-text);
  background: var(--coral-bg); border-radius: var(--radius-sm);
  padding: 10px 14px; margin: 0 0 14px; }

/* アーカイブの「どんなテーマで？」欄。入力が長い文になるので幅を広く取る。 */
/* キーワード検索と「どんなテーマで？」を同じ箱に置いた（2026-08-24）。
   キーワードは単語一致なので短くてよく、テーマは文を打つので広く要る。幅を非対称にした
   （キーワード=固定280px・テーマ=残り全部）。ヒント文はテーマの説明なので、
   全幅ではなくテーマの入力欄の真下（同じ列）に付ける——.theme-block で1つに囲い、
   キーワード側とは別の縦積みブロックにしてある。 */
.theme-row { margin-top: 10px; flex-direction: column; align-items: stretch; }
.theme-row label { font-size: 13px; color: var(--muted); }
.theme-fields { display: flex; gap: 24px; width: 100%; align-items: flex-start; }
.theme-line { display: flex; align-items: center; gap: 10px; }
.theme-line label { flex: none; white-space: nowrap; }
.theme-line input[type=text] { flex: 1; min-width: 0; }
.theme-line-kw { flex: 0 0 360px; }
.theme-block { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.theme-hint { margin-top: 2px; }
.theme-hint { font-size: 12px; }
@media (max-width: 760px) { .theme-hint { display: none; } }

/* 頻出語ランキング。順位を追えるよう2段組でも左列→右列の順に並べる。 */
.tw-rank { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 26px; }
@media (max-width: 760px) { .tw-rank { columns: 1; } }
.tr { display: grid; grid-template-columns: 1.6em 8.5em 1fr auto; align-items: center;
  gap: 8px; padding: 3.5px 0; font-size: 13px; break-inside: avoid; }
.tr-no { color: var(--muted); font-size: 11.5px; text-align: right;
  font-variant-numeric: tabular-nums; }
.tr-term { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-up { color: #d85a30; font-size: 11px; margin-left: 3px; }
.tr-down { color: #8d8b84; font-size: 11px; margin-left: 3px; }
.tr .tw-bar i { background: #c9a227; }
.tr-num { color: var(--text); white-space: nowrap; font-size: 12px;
  font-variant-numeric: tabular-nums; }

.panel > .note { font-size: 12px; color: var(--muted); margin: 12px 0 0; }

/* 兆しの内訳（波及・転換）。主役は兆しの数字なので、内訳は下に小さく添える。 */
.axes { display: block; font-size: 10px; line-height: 1.3; opacity: 0.72; white-space: nowrap; }
.fr .nov { min-width: 62px; }
.fread-score .axes { font-weight: 400; }

/* 兆しの列。幅を固定して、判定の無い行でも右端の位置がそろうようにする。 */
.sigcol { flex: 0 0 auto; width: 40px; text-align: right; }
.sigcol .sig { margin-left: 0; }

/* 一覧に出す兆しのバッジ。数字は小さく、フロンティアの線（3以上）だけ色を付ける。 */
.sig { display: inline-block; margin-left: 6px; padding: 0 5px; border-radius: 3px;
       font-size: 10.5px; line-height: 16px; vertical-align: 1px; white-space: nowrap;
       background: var(--surface-2, rgba(0,0,0,0.05)); color: var(--muted); }
/* 3以上は塗りつぶし。淡い背景だと --coral-bg と同じ色になり、今日の記事の行（同じ色で
   塗られている）でバッジが完全に消える。地の色に依存しない見せ方にする。 */
.sig-on { background: var(--coral); color: #fff; font-weight: 500; }
/* 判定待ち。空欄と区別が付けばよいので、兆しより弱く見せる。 */
.sig-wait { background: transparent; border: 0.5px dashed rgba(0,0,0,0.18); color: #888780; }
/* 下切りで外した記事。判定が「無い」ことを示すので、待ち（点線枠）より更に弱く見せる。
   空欄にすると「まだ付いていない」のか「対象外」なのか読み分けられない。 */
.sig-none { background: transparent; color: var(--hint); }

/* 兆しバッジ・コメントの吹き出し（tip.js）。標準の title は出るまでが遅く、待ち時間を変えられない。
   overflow:auto の中でも切れないよう body 直下に置くので、位置は fixed で JS が入れる。 */
#tip {
  position: fixed; left: 0; top: 0; z-index: 200; max-width: 340px;
  padding: 8px 11px; border-radius: var(--radius-sm);
  font-size: 12px; line-height: 1.6; text-align: left;
  /* 画面の他の要素と同じ「白いカード」に寄せる。黒い吹き出しはこの画面では浮く。
     カードの上に重なっても見分けがつくよう、影は少し強めに置く。 */
  background: var(--surface); color: var(--text);
  border: 0.5px solid var(--border);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.14), 0 1px 3px rgba(0, 0, 0, 0.06);
  pointer-events: none;                 /* 吹き出し自身がホバーを奪わないように */
  opacity: 0; visibility: hidden; transition: opacity 0.08s ease;
}
#tip.on { opacity: 1; visibility: visible; }
.sig[data-tip], .rtag[data-tip], .nov[data-tip] { cursor: help; }

/* 絞り込みのチェックボックス。selectと同じ高さに揃える。 */
/* クラスターの複数選択。閉じているときはプルダウン相当の小さなボタンだけ（場所を取らない）。
   開くと横幅いっぱいを使い、全クラスターをチップで一覧できる（選んでいるものが一目で分かる）。
   2026-08-24: 最初はポップオーバー（絶対配置・幅300px）で作ったが、
   「一覧できる・非表示なら場所を取らない」という要望に合わず、この形に作り直した。 */
.cluster-toggle { height: 34px; padding: 0 10px; border: 0.5px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--text);
  font-size: 12px; cursor: pointer; white-space: nowrap; }
.cluster-toggle:hover { background: var(--surface-2); }
.cluster-toggle[aria-expanded="true"] { background: var(--surface-2); }
#f-cluster-label { color: var(--muted); }

.cluster-panel { background: var(--surface); border: 0.5px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px; margin: 8px 0 0; }
.cluster-panel.hidden { display: none; }
.cluster-panel-actions { display: flex; gap: 6px; margin-bottom: 10px; }
.cluster-panel-actions button { font-size: 11px; padding: 3px 9px; border: 0.5px solid var(--border);
  border-radius: 999px; background: var(--surface); color: var(--muted); cursor: pointer; }
.cluster-panel-actions button:hover { background: var(--surface-2); }

/* チップは折り返して横幅いっぱいに並べる。選んでいるものは色を変えて一目で分かるようにする
   （枠線だけの変化だと見比べないと分からない）。「強い兆し」のコーラルとは意味が違うので、
   selectedの色は別の系統（teal）を使う。 */
.cluster-chip-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.cluster-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px;
  border: 0.5px solid var(--border); border-radius: 999px; font-size: 12.5px;
  cursor: pointer; background: var(--surface); color: var(--muted); user-select: none; }
.cluster-chip:hover { border-color: var(--muted); }
.cluster-chip.on { background: var(--teal-bg); color: var(--teal-text); border-color: transparent; }
.cluster-chip input { margin: 0; flex: none; }

.filters .chk { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
                font-size: 13px; color: var(--text); }
.filters .chk input { margin: 0; }

/* フロンティア一覧の断り書き。一覧の上に小さく置く。 */
.fnote { margin: 0 0 8px; font-size: 12px; color: var(--muted); }
.fnote a { color: var(--muted); text-decoration: underline; }

/* 「スキャマの続き」。どのスキャマの続きかを、記事タイトルの下に添える。 */
.slink-from { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }

/* AI判定の理由は折り返して全部見せる。max-width を ch で切ったことがあるが、
   ch は半角基準で日本語だと半分の文字数しか入らず、ほぼ全件が省略されてしまった。 */

/* 週の行き来。見出しの右に小さく置く。 */
.wknav { display: inline-flex; align-items: center; gap: 8px; margin-left: 14px; }
.wkbtn { font-size: 12px; color: var(--muted); border: 0.5px solid var(--border);
         border-radius: var(--radius-sm); padding: 2px 10px; text-decoration: none; background: var(--surface); }
.wkbtn:hover { color: var(--text); border-color: var(--muted); }
.wkflag { font-size: 12px; color: var(--coral-text); background: var(--coral-bg);
          border-radius: var(--radius-sm); padding: 2px 9px; }

/* --- 月次レポート（月間ページ内のタブ） --- */
/* 汎用の .hidden は既存が .drawer/.modal/.cluster-panel に限定されているので、ここで単独定義する。 */
#viewOverview.hidden, #viewReport.hidden { display: none; }
.subtabs { margin: 0 0 16px; }
.subtabs .pill { font-size: 14px; padding: 5px 16px; }

.report { max-width: 760px; }
.report-head { margin: 0 0 18px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.report-period { font-size: 20px; font-weight: 600; color: var(--text); }
.report-meta { display: block; font-size: 12px; margin-top: 4px; }
.report h3 {
  font-size: 17px; line-height: 1.55; margin: 30px 0 10px;
  padding-left: 12px; border-left: 3px solid var(--coral); color: var(--text);
}
.report h3:first-of-type { margin-top: 6px; }
.report h4 { font-size: 15px; margin: 22px 0 8px; color: var(--text); }
.report p { line-height: 1.95; margin: 0 0 14px; color: var(--text); }
.report ul { margin: 0 0 14px; padding-left: 22px; }
.report li { line-height: 1.9; margin-bottom: 4px; }
/* 要点。地の文と混ざらないよう、太字だけでなく淡い下敷きを付ける。 */
.report strong { font-weight: 600; background: var(--coral-bg); padding: 1px 3px; border-radius: 3px; }
.report th strong, .report h3 strong { background: none; padding: 0; }

/* 表。横に長いときはページごと横スクロールさせず、表の中だけスクロールさせる。 */
.report-table-wrap { overflow-x: auto; margin: 0 0 18px; }
.report-table { border-collapse: collapse; width: 100%; font-size: 14px; }
.report-table th, .report-table td {
  border: 1px solid var(--border); padding: 8px 12px;
  text-align: left; vertical-align: top; line-height: 1.7;
}
.report-table th { background: var(--surface-2); font-weight: 600; white-space: nowrap; }
.report-table tr:nth-child(even) td { background: rgba(0,0,0,0.015); }

/* 後から足した受け皿の軸の印。兆しから作った軸と由来が違うことを示す。 */
.rcard-supp { color: var(--muted); font-weight: 700; cursor: help; }
.lsupp { display:inline-block; width:12px; text-align:center; color: var(--muted); font-weight:700; }

/* ===== 質問（兆しに聞く） ===== */
.ask-layout { display: flex; gap: 22px; align-items: flex-start; }
.ask-main { flex: 1; min-width: 0; }
.ask-side { flex: 0 0 280px; position: sticky; top: 14px; }
@media (max-width: 900px) { .ask-layout { flex-direction: column; } .ask-side { position: static; flex: none; width: 100%; } }
.ask-box { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius); padding: 12px; margin-bottom: 14px; }
.ask-box textarea { width: 100%; font: inherit; font-size: 15px; border: 0; resize: vertical; outline: none; background: transparent; color: var(--text); }
.ask-bar { display: flex; align-items: flex-end; gap: 10px; margin-top: 8px; }
.ask-examples { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; }
.ask-ex { font: inherit; font-size: 12px; color: var(--muted); background: var(--surface-2); border: 0; border-radius: var(--radius-sm); padding: 4px 9px; cursor: pointer; text-align: left; }
.ask-ex:hover { color: var(--text); }
.ask-go { flex: none; background: var(--info); color: #fff; border-color: var(--info); }
.ask-go:hover { background: #0c447c; }
.ask-go:disabled { opacity: 0.5; cursor: default; }
.ask-progress { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 14px; font-size: 13px; }
.ask-spin { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.ask-spin .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--info); animation: askpulse 1s ease-in-out infinite; }
@keyframes askpulse { 0%,100% { opacity: 0.25; } 50% { opacity: 1; } }
.ask-steps { margin: 8px 0 0; padding-left: 20px; color: var(--muted); line-height: 1.7; }
.ask-answer { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius); padding: 16px 22px 18px; margin-bottom: 14px; line-height: 1.8; font-size: 14.5px; }
.ask-answer .ask-q { font-size: 13px; color: var(--muted); border-bottom: 0.5px solid var(--border); padding-bottom: 8px; margin-bottom: 10px; }
.ask-answer h3, .ask-answer h4, .ask-answer h5 { margin: 16px 0 6px; font-weight: 500; }
.ask-answer h3 { font-size: 17px; } .ask-answer h4 { font-size: 15.5px; } .ask-answer h5 { font-size: 14.5px; }
.ask-answer ul, .ask-answer ol { padding-left: 22px; margin: 6px 0 10px; }
.ask-answer li { margin: 3px 0; }
.ask-answer a { color: var(--info); word-break: break-all; }
.ask-answer blockquote { margin: 8px 0; padding: 4px 12px; border-left: 3px solid var(--border); color: var(--muted); }
.ask-answer code { background: var(--surface-2); border-radius: 4px; padding: 0 4px; font-size: 0.92em; }
.ask-table { overflow-x: auto; margin: 8px 0 12px; }
.ask-table table { border-collapse: collapse; font-size: 13px; }
.ask-table th, .ask-table td { border: 0.5px solid var(--border); padding: 5px 9px; text-align: left; vertical-align: top; }
.ask-table th { background: var(--surface-2); font-weight: 500; }
.ask-meta { margin-top: 12px; font-size: 12px; color: var(--hint); }
.ask-err { color: #a32d2d; margin: 0; }
.ask-note { font-size: 12px; }
.ask-history { display: flex; flex-direction: column; gap: 6px; }
.ask-hist { font: inherit; text-align: left; background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius-sm); padding: 7px 10px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.ask-hist:hover { border-color: rgba(0,0,0,0.25); }
.ask-hist-q { font-size: 13px; color: var(--text); }
.ask-hist-at { font-size: 11px; color: var(--hint); }

/* hidden 属性を確実に効かせる。
   .theme-block のように display を明示している要素では、CSSの方が勝つため
   el.hidden = true が無視される（実際にそれで隠れなかった）。 */
[hidden] { display: none !important; }
