/* Theme: Notion (mapped from DESIGN.md tokens).
   All component styling references these variables — swap this file to re-skin. */

:root {
  /* DESIGN.md raw tokens (subset actually used) */
  --color-primary:         #5645d4;
  --color-primary-pressed: #4534b3;
  --color-primary-deep:    #3a2a99;
  --color-on-primary:      #ffffff;
  --color-brand-navy:      #0a1530;
  --color-brand-navy-deep: #070f24;
  --color-brand-navy-mid:  #1a2a52;
  --color-link-blue:       #0075de;
  --color-canvas:          #ffffff;
  --color-paper:           #fbf8f1;   /* ページの地。blog.ikegaya.tokyo の --bg に揃えた (2026-12-03) */
  --color-surface:         #f6f5f4;
  --color-surface-soft:    #fafaf9;
  --color-hairline:        #e5e3df;
  --color-hairline-soft:   #ede9e4;
  --color-hairline-strong: #c8c4be;
  --color-ink:             #1a1a1a;
  --color-charcoal:        #37352f;
  --color-slate:           #5d5b54;
  --color-steel:           #787671;
  --color-stone:           #a4a097;
  --color-muted:           #bbb8b1;
  --color-on-dark:         #ffffff;
  --color-on-dark-muted:   #a4a097;
  --color-brand-pink:      #ff64c8;
  --color-brand-orange:    #dd5b00;
  --color-brand-orange-deep:#793400;
  --color-brand-purple:    #7b3ff2;
  --color-brand-purple-300:#d6b6f6;
  --color-brand-purple-800:#391c57;
  --color-brand-teal:      #2a9d99;
  --color-brand-green:     #1aae39;
  --color-brand-yellow:    #f5d75e;
  --color-card-peach:      #ffe8d4;
  --color-card-rose:       #fde0ec;
  --color-card-mint:       #d9f3e1;
  --color-card-lavender:   #e6e0f5;
  --color-card-sky:        #dcecfa;
  --color-card-yellow:     #fef7d6;
  --color-card-yellow-bold:#f9e79f;
  --color-card-cream:      #f8f5e8;
  --color-error:           #e03131;
  --color-warning:         #dd5b00;
  --color-success:         #1aae39;

  /* Generic role variables that templates consume */
  --bg:            var(--color-paper);
  --bg-elevated:   var(--color-brand-navy);   /* header band */
  --surface:       var(--color-canvas);
  --surface-2:     var(--color-surface);
  --border:        var(--color-hairline);
  --border-soft:   var(--color-hairline-soft);
  --text:          var(--color-ink);
  --text-muted:    var(--color-steel);
  --accent:        var(--color-primary);
  --accent-strong: var(--color-primary-pressed);
  --danger:        var(--color-error);
  --warning:       var(--color-warning);
  --success:       var(--color-success);

  /* Plotly trace palette — Notion brand spectrum (echoes DB property colors) */
  --chart-1: #5645d4;  /* primary purple   */
  --chart-2: #2a9d99;  /* teal             */
  --chart-3: #dd5b00;  /* orange           */
  --chart-4: #1aae39;  /* green            */
  --chart-5: #ff64c8;  /* pink             */
  --chart-6: #0075de;  /* link blue        */
  --chart-7: #f5d75e;  /* yellow           */
  --chart-8: #7b3ff2;  /* brand purple alt */

  /* radii / spacing (DESIGN.md) */
  --r-sm:  6px;
  --r-md:  8px;
  --r-lg:  12px;
  --r-xl:  16px;
  --r-full: 9999px;
}

html, body { background: var(--bg); color: var(--text); }
body {
  font-family: "Inter", "Inter Variable", ui-sans-serif, system-ui, -apple-system,
               "Segoe UI", Roboto, "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
}

/* Header band uses brand-navy + on-dark text */
.app-header        { background: var(--color-brand-navy); color: var(--color-on-dark); }
.app-header h1     { color: var(--color-on-dark); letter-spacing: -0.3px; }
.app-header .app-muted { color: var(--color-on-dark-muted); }

/* Cards: 12px rounded, hairline border, white canvas. Padding handled per-template. */
.app-card    { background: var(--surface);   border: 1px solid var(--border);  border-radius: var(--r-lg); }
.app-card-2  { background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: var(--r-md); }

.app-muted   { color: var(--text-muted); }
.app-accent  { color: var(--accent); }

/* Notion tag-style chips (lavender bg, brand-purple-800 text) — soft, editorial */
.app-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--color-surface);
  color: var(--color-charcoal);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-sm);
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}
.app-chip-accent {
  background: var(--color-card-lavender);
  color: var(--color-brand-purple-800);
  border-color: var(--color-card-lavender);
}
.app-chip-warn {
  background: var(--color-card-peach);
  color: var(--color-brand-orange-deep);
  border-color: var(--color-card-peach);
}
.app-chip-success {
  background: var(--color-card-mint);
  color: var(--color-brand-green);
  border-color: var(--color-card-mint);
}
.app-chip-danger {
  background: #fde2e2;
  color: var(--color-error);
  border-color: #fde2e2;
}
button.app-chip { cursor: pointer; }
button.app-chip[aria-pressed="true"] {
  background: var(--color-card-lavender);
  color: var(--color-brand-purple-800);
  border-color: var(--accent);
}

/* Header-band tab (legacy underline pattern, scoped to dark band only) */
.app-header .tab-btn         {
  color: var(--color-on-dark-muted);
  border-bottom: 2px solid transparent;
  font-size: 14px; font-weight: 500; line-height: 1.3;
  padding-bottom: 6px;
  transition: color .15s ease, border-color .15s ease;
}
.app-header .tab-btn:hover   { color: var(--color-on-dark); }
.app-header .tab-btn.active  { color: var(--color-on-dark); border-bottom-color: var(--color-on-dark); }

/* Title-下 タブバー (明背景・押せそうボタン) */
.tab-bar {
  background: var(--color-paper);
  border-bottom: 1px solid var(--border);
}
.tab-bar .tab-btn {
  padding: 12px 24px;
  border-radius: var(--r-lg);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .05s ease;
}
.tab-bar .tab-btn:hover {
  background: var(--color-card-lavender);
  border-color: var(--color-card-lavender);
  box-shadow: 0 2px 6px rgba(86,69,212,0.12);
}
.tab-bar .tab-btn:active { transform: translateY(1px); }
.tab-bar .tab-btn.active {
  background: var(--accent);
  color: var(--color-on-primary);
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(86,69,212,0.30);
}
@media (max-width: 640px) {
  .tab-bar .tab-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 8px 8px;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
    overflow: hidden;
  }
  .tab-bar .tab-btn .tab-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 1 1 auto;
  }
}

/* KPI typography (micro-uppercase + display-ish value) */
.kpi-label {
  color: var(--text-muted);
  font-size: 11px; letter-spacing: 1px; text-transform: uppercase; font-weight: 600;
}
.kpi-value {
  color: var(--color-ink);
  font-size: 28px; font-weight: 600; line-height: 1.15; letter-spacing: -0.5px;
}

/* Table */
.app-table  { width: 100%; border-collapse: collapse; font-size: 13px; }
.app-table th, .app-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-hairline-soft);
  text-align: left; vertical-align: top;
}
.app-table th {
  color: var(--text-muted);
  font-weight: 600; font-size: 11px;
  text-transform: uppercase; letter-spacing: 1px;
  cursor: pointer; user-select: none;
  background: var(--color-surface-soft);
}
.app-table tbody tr:hover td { background: var(--color-surface-soft); }
.candidate-row td { background: #fff7f7; }
.candidate-row td:first-child { box-shadow: inset 3px 0 0 var(--color-error); }

/* Form controls — Notion editorial input */
input[type="date"], input[type="text"], select {
  background: var(--color-canvas);
  color: var(--color-ink);
  border: 1px solid var(--color-hairline-strong);
  border-radius: var(--r-md);
  padding: 6px 10px;
  font-size: 14px;
  height: 36px;
}
input[type="date"]:focus, input[type="text"]:focus, select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(86,69,212,0.18);
}

a.link { color: var(--color-link-blue); }
a.link:hover { color: #005bab; text-decoration: underline; }

/* 検索ヒット時の CTA — 検索ボタンと同じ「押せる青ハコ」語彙。
   出現時に数回だけ軽くパルスして注意を引く（無限点滅はしない）。 */
.app-hit-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: var(--color-on-primary);
  border: 1px solid var(--accent);
  border-radius: 0.25rem;
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, transform .05s ease;
  animation: hit-cta-pop 0.7s ease-out 3;
}
.app-hit-cta:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}
.app-hit-cta:active { transform: translateY(1px); }
@keyframes hit-cta-pop {
  0%   { transform: scale(0.94); box-shadow: 0 0 0 0   rgba(86,69,212,0.55); }
  55%  { transform: scale(1);    box-shadow: 0 0 0 10px rgba(86,69,212,0);   }
  100% { transform: scale(1);    box-shadow: 0 0 0 0   rgba(86,69,212,0);   }
}
@media (prefers-reduced-motion: reduce) {
  .app-hit-cta { animation: none; }
}

.scroll-y { overflow-y: auto; }
.scroll-x { overflow-x: auto; }

/* HTMX request indicator */
.htmx-indicator { opacity: 0; transition: opacity 200ms; }
.htmx-request .htmx-indicator { opacity: 1; }
.htmx-request.htmx-indicator { opacity: 1; }

/* details/summary chevron polish */
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details[open] > summary .chev { transform: rotate(90deg); }
.chev { display: inline-block; transition: transform .15s ease; color: var(--text-muted); }

/* ============================================================
   新築マップビュー (/map)
   ============================================================ */

/* ヘッダのモード切替ボタン (ダッシュボード / 新築マップ) */
.app-header .nav-mode {
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 999px;
  color: var(--color-on-dark-muted);
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.app-header .nav-mode:hover { color: var(--color-on-dark); background: rgba(255,255,255,.08); }
.app-header .nav-mode.active {
  color: var(--color-on-dark);
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.25);
}

/* 日数スライダー */
#days-slider { accent-color: var(--accent); width: 160px; max-width: 40vw; }

/* レイアウト: 左=配信リスト / 右=地図 */
.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  gap: 20px;
  align-items: start;
}
@media (max-width: 860px) {
  /* 事件系同様、スマホでは右ペイン(地図)を下に置く。
     DOM 順が list→aside なので order 指定なしで地図が下に来る。 */
  .map-layout { grid-template-columns: 1fr; }
  .map-aside { position: static; }   /* sticky 解除 */
}

/* 配信リスト */
.dist-head { margin-bottom: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dist-count { font-size: 14px; color: var(--text); }
.dist-filter { color: var(--accent-strong); font-weight: 600; }
.dist-reset {
  font-size: 12px; color: var(--text-muted); text-decoration: none;
  border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px;
}
.dist-reset:hover { color: var(--text); border-color: var(--accent); }
.dist-empty { padding: 30px; text-align: center; color: var(--text-muted);
  background: var(--surface-2); border-radius: var(--r-md); }

/* 地方 (region) セクション見出し = 北→南で束ねる第1階層 */
.region-group { margin-bottom: 22px; }
.region-head {
  font-size: 14px; font-weight: 700; color: var(--text);
  margin: 0 0 8px; padding: 4px 0; border-bottom: 2px solid var(--border);
  display: flex; align-items: center; gap: 6px;
}
.region-head .region-n {
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  background: var(--surface-2); border-radius: 999px; padding: 0 7px;
}
/* 用途 (type) サブ見出し = 同じ地方内で type が変わるたびに挟む引っかかり */
.type-sep {
  list-style: none;
  display: flex; align-items: center; gap: 8px;
  margin: 6px 0 2px; padding: 0;
}
.type-sep::after {
  content: ""; flex: 1 1 auto;
  border-top: 1px dashed var(--border-soft);
}
.type-sep-label {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  background: var(--surface-2); border-radius: 999px;
  padding: 1px 9px; flex: 0 0 auto;
}
.badge.block { background: var(--color-card-peach, var(--surface-2)); }
.dist-date { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--accent-strong); }
.dist-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.dist-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 10px 12px;
}
.dist-item-head { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 4px; }
.dist-title { font-weight: 600; font-size: 14px; color: var(--color-link-blue); text-decoration: none; }
.dist-title:hover { text-decoration: underline; }
.dist-meta { color: var(--text-muted); font-size: 11px; margin-top: 3px; }
.dist-lead { color: var(--text-muted); font-size: 12px; margin-top: 4px; line-height: 1.5; }
.badge {
  display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border-soft);
}
.badge.region { background: var(--color-card-mint); }
.badge.type   { background: var(--color-card-lavender); }
.badge.sector { background: var(--color-card-sky); }
.badge.sent   { background: var(--color-card-sky); }
/* LLM 意味判定で通過した記事の印 (メールの🤖LLMバッジと対応)。緑の枠+太字で region と差別化。 */
.badge.llm { background: var(--color-card-mint); color: var(--color-brand-green); border-color: var(--color-brand-green); font-weight: 600; }

/* 地図 */
.map-aside { position: sticky; top: 12px; }
.japan-map-wrap {
  position: relative;
  background: var(--color-card-sky);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 6px;
}
#japan-svg { display: block; width: 100%; height: auto; }
/* 背景=原画 PNG <image> がそのまま地方色を表現する。
   region-shapes の polygon は **白の半透明オーバーレイ** として上に乗り、
   件数が少ない地方ほど不透明にして「フェードアウト」させる (JS が fill-opacity 制御)。
   selected の地方は濃いめのストロークで縁取り。 */
.region-shapes g[data-region] {
  cursor: pointer;
  transition: fill-opacity .25s ease;
}
.region-shapes polygon {
  fill: #ffffff;
  stroke: none;
}
.region-shapes g[data-region].selected polygon {
  stroke: #1a1a1a;
  stroke-width: 2;
  stroke-opacity: .9;
}

/* 引き出し線レイヤ: 陸SVGと同寸で重ね、地方アンカー→海側フキダシを結ぶ。
   bubble-layer より前 (DOM順) なのでフキダシの下に描かれる。 */
#leader-layer { position: absolute; inset: 6px; pointer-events: none; overflow: visible; }
.leader-line {
  stroke: var(--accent-strong); stroke-width: 1.2; stroke-opacity: .45;
  stroke-linecap: round; fill: none;
}

/* バブルオーバーレイ (海側レール配置) */
#bubble-layer { position: absolute; inset: 6px; pointer-events: none; }
#bubble-layer .map-anchor,
#bubble-layer .map-region-head,
#bubble-layer .map-bubble,
#bubble-layer .map-more { position: absolute; transform: translate(-50%, -50%); }
/* レール: 右(太平洋)はコンテナ右端に右端を固定し左(陸側)へ伸ばす /
   左(日本海)は左端に左端を固定し右(陸側)へ伸ばす。 */
#bubble-layer .rail-r { transform: translate(-100%, -50%); }
#bubble-layer .rail-l { transform: translate(0, -50%); }

.map-anchor {
  pointer-events: auto; cursor: pointer; padding: 0;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--accent-strong); border: 2px solid #fff;
  box-shadow: 0 0 0 3px rgba(86,69,212,.25);
  transform: translate(-50%, -50%);   /* アンカーは中心合わせ (rail 上書きしない) */
}
.map-anchor:hover { box-shadow: 0 0 0 5px rgba(86,69,212,.35); }

/* 地方見出しチップ: 引き出し線の着地点。クリックでその地方に絞り込み。 */
.map-region-head {
  pointer-events: auto; cursor: pointer;
  font-size: 11.5px; font-weight: 700; color: var(--accent-strong);
  background: var(--surface); border: 1px solid var(--accent);
  border-radius: 999px; padding: 2px 9px; white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.map-region-head:hover { background: var(--accent); color: #fff; }
.map-region-head b { margin-left: 2px; }

/* フキダシ: 用途絵文字 + タイトル + 元記事日付 */
.map-bubble {
  pointer-events: auto;
  display: inline-flex; align-items: center; gap: 5px;
  max-width: 200px;
  background: #fff; border: 1px solid var(--border);
  border-radius: 13px; padding: 3px 9px;
  font-size: 12px; line-height: 1.3; color: var(--text);
  text-decoration: none; white-space: nowrap;
  box-shadow: 0 3px 9px rgba(0,0,0,.16);
}
.map-bubble:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(0,0,0,.24); z-index: 200; }
.map-bubble .be { font-size: 14px; }
.map-bubble .bt { overflow: hidden; text-overflow: ellipsis; }
.map-bubble .bd { font-size: 10.5px; font-weight: 700; color: var(--accent-strong); }

.map-more {
  pointer-events: auto; cursor: pointer;
  font-size: 11px; font-weight: 700; color: var(--accent-strong);
  background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px;
}
.map-more:hover { border-color: var(--accent); }

/* 用途フィルタ チップバー */
.type-filter {
  display: flex; flex-wrap: wrap; gap: 5px;
  margin: 8px 0 4px;
}
.type-chip {
  cursor: pointer;
  font-size: 11.5px; line-height: 1.2; color: var(--text);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 3px 9px;
}
.type-chip:hover { border-color: var(--accent); }
.type-chip.is-active {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.type-chip .tc-n { font-weight: 700; opacity: .8; margin-left: 2px; }
.type-chip.is-active .tc-n { opacity: 1; }

/* 凡例 */
.map-legend {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 8px; font-size: 11px; color: var(--text-muted);
}
.legend-scale { display: inline-flex; }
.legend-scale i {
  width: 16px; height: 11px; display: inline-block; background: var(--color-brand-teal);
}
.legend-scale i:nth-child(1){opacity:.20} .legend-scale i:nth-child(2){opacity:.38}
.legend-scale i:nth-child(3){opacity:.56} .legend-scale i:nth-child(4){opacity:.74}
.legend-scale i:nth-child(5){opacity:.92}
.legend-ends { display: inline-flex; gap: 22px; }
.legend-hint { margin-left: auto; }

/* 全国・その他 (地図外) */
.overflow-box {
  margin-top: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 10px 12px;
}
.overflow-head {
  font-size: 13px; font-weight: 600; margin-bottom: 6px; cursor: pointer;
  background: none; border: none; padding: 0; color: var(--text);
}
.overflow-head:hover { color: var(--accent-strong); }
.overflow-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.overflow-list a { font-size: 12px; color: var(--color-link-blue); text-decoration: none; }
.overflow-list a:hover { text-decoration: underline; }
.overflow-list .more { font-size: 11px; color: var(--text-muted); }

/* ============================================================
   タブ③ 配信元ディレクトリ (検索付きRSSリーダー)
   縦2段: 上段=検索+エラー検知+地域ショートカット / 下段=配信元一覧(ここだけスクロール)
   ============================================================ */
.tier-wrap { display: flex; flex-direction: column; gap: 8px; }
.tier-top  { display: flex; flex-direction: column; gap: 6px; }

.search-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.search-row input { flex: 1 1 220px; min-width: 0; }
/* HIT ボタンは検索窓直下の左端に。結果が無いときは枠ごと畳んで余白を出さない */
.search-cta { display: flex; justify-content: flex-start; }
.search-cta:empty { display: none; }

/* 取得エラー検知行 (フィード名が並ぶだけ) */
.err-row  { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; }
.err-tag  { font-weight: 700; color: var(--danger); }
.err-tag.ok { color: var(--success); }
.err-feed {
  background: #fde2e2; color: var(--danger);
  border: 1px solid #f7c7c7; border-radius: 6px; padding: 1px 8px; font-weight: 600;
}

/* 地域ショートカット: 用途チップ(.type-chip)を流用し、地域色ドットで下段の色帯と対応 */
.region-jump { gap: 5px; }
.region-jump .type-chip { display: inline-flex; align-items: center; gap: 5px; }
.region-jump .rcdot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--rc); border: 1px solid rgba(0,0,0,.12);
}

/* 下段スクロール領域 */
.feed-pane {
  max-height: 64vh; overflow-y: auto;
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface);
}
.reg-block { border-bottom: 1px solid var(--border); }
.reg-block:last-child { border-bottom: none; }
.reg-h {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: baseline; gap: 8px;
  padding: 5px 12px;
  font-weight: 700; font-size: 13.5px; color: #37352f;
  border-left: 4px solid rgba(0,0,0,.18);
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.reg-h .n { font-size: 11px; font-weight: 700; opacity: .55; }

/* 多段カラムの縦並びリスト = 目で追える。FHDで自動的に列数が増える */
.reg-feeds { columns: 16rem; column-gap: 0; padding: 6px 4px 10px; }
.reg-feeds .feed {
  display: flex; align-items: center; gap: 7px;
  break-inside: avoid;
  margin: 0 8px; padding: 3px 6px;
  font-size: 13px; line-height: 1.4;
  color: var(--color-link-blue); text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-radius: 5px;
}
.reg-feeds .feed:hover { background: var(--surface-2); text-decoration: none; }
.reg-feeds .feed .nm  { overflow: hidden; text-overflow: ellipsis; }
.reg-feeds .feed .dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }

@media (max-width: 640px) {
  .feed-pane { max-height: 60vh; }
  .reg-feeds { columns: 11rem; }
}

/* 新施設(/map) 縦2段化: 配信リスト(地域グループ)だけをスクロールさせる下段 */
.dist-region-jump { margin: 4px 0 2px; }
.dist-scroll {
  max-height: 64vh; overflow-y: auto;
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface); padding: 8px;
}
.dist-scroll .region-group { margin-bottom: 14px; }
.dist-scroll .region-group:last-child { margin-bottom: 0; }
/* 地方見出しをスクロール内で固定し、どの地方を見ているか分かるように */
.dist-scroll .region-head {
  position: sticky; top: -8px; z-index: 1;
  background: var(--surface); margin: 0 0 8px; padding: 6px 2px 4px;
}
@media (max-width: 860px) {
  .dist-scroll { max-height: 60vh; }
}
