/*
 * news-top.css — /news/ トップ「きょうのボード」専用（index だけで読む）
 *
 * 一枚で今日の状態が分かる板。最上段「きょうの一目」→ 3列（左=読む / 中=暮らし / 右=数字）。
 * 紙色のパネル＋1px の線＋小さな角丸。影・blur・glow・グラデーションの装飾は使わない。
 * 色は .news-studio-page の --studio-news-* を使う。文字として使う色は紙色に対して 4.5:1 以上。
 */

/* layout.css より後で効くよう、.news-studio-page と重ねて指定する（font_extra は layout.css より前に読まれる） */
.news-studio-page.news-top {
  --top-paper: var(--studio-news-paper);
  --top-ink: var(--studio-news-line);
  --top-muted: var(--studio-news-muted);
  --top-line: var(--studio-news-line);
  --top-soft-line: var(--studio-news-soft-line);
  --top-accent-text: #8a6508;
  --top-ok: #2f6b4f;
  --top-warn: #b98610;
  --top-warn-text: #7f5c05;
  --top-bad: #a8432c;
  --top-hi: #a3442f;
  --top-lo: #2f6286;
  font-size: 14px;
  line-height: 1.55;
}

.news-top-wrap {
  max-width: 74rem;
  margin-inline: auto;
  padding: 0.75rem 16px 2.5rem;
}

.news-top :where(h1, h2, h3, p, ul, ol, dl, dd) { margin: 0; }
.news-top :where(ul, ol) { padding: 0; list-style: none; }
.news-top a { color: inherit; text-decoration: none; }
.news-top a:hover { text-decoration: underline; text-decoration-color: var(--studio-news-yuzu-deep); text-underline-offset: 0.18em; }
.news-top :where(a, button, summary):focus-visible { outline: 2px solid var(--studio-news-green); outline-offset: 2px; }
.news-top [hidden] { display: none !important; }

.news-top-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.news-top :where(time, .news-top-glance-value, .news-top-fx-value, .news-top-hi, .news-top-lo, .news-top-tr-sum dd, .news-top-wx-pop) {
  font-variant-numeric: tabular-nums;
}

/* 見出し行 */
.news-top-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--top-line);
}

.news-top-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
}

.news-top-title span {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--top-muted);
  margin-left: 0.25rem;
}

.news-top-date { font-size: 0.86rem; color: var(--top-muted); }

.news-top-status-chip {
  margin-left: auto;
  padding: 0 0.45rem;
  border: 1px solid var(--top-line);
  border-radius: 3px;
  font-family: var(--font-latin);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.6;
}

/* きょうの一目 */
.news-top-glance { margin-top: 0.75rem; }

.news-top-glance-list {
  --glance-columns: 6;
  display: grid;
  grid-template-columns: repeat(var(--glance-columns), minmax(0, 1fr));
  gap: 0.5rem;
}

.news-top-glance-list[data-count="1"] { --glance-columns: 1; }
.news-top-glance-list[data-count="2"] { --glance-columns: 2; }
.news-top-glance-list[data-count="3"] { --glance-columns: 3; }
.news-top-glance-list[data-count="4"] { --glance-columns: 4; }
.news-top-glance-list[data-count="5"] { --glance-columns: 5; }

.news-top-glance-card {
  height: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 0.5rem;
  align-items: center;
  padding: 0.5rem 0.65rem;
  background: var(--top-paper);
  border: 1px solid var(--top-line);
  border-radius: 6px;
}

.news-top-glance-card svg { width: 28px; height: 28px; }
.news-top-glance-body { min-width: 0; display: grid; }
.news-top-glance-k { font-size: 0.75rem; color: var(--top-muted); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.news-top-glance-v {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.3rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

/* 値は省略せず2行まで折り返す。前日比などの注記は入りきらなければ次の行へ落とす。 */
.news-top-glance-value {
  min-width: 0;
  max-width: 100%;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.news-top-glance-v small { font-size: 0.75rem; font-weight: 500; color: var(--top-muted); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.news-top-glance-v .news-top-dot { align-self: center; }
/* 状態点つきの値（鉄道など）は点と同じ行に収め、値側を縮める。 */
.news-top-glance-v .news-top-dot + .news-top-glance-value { flex: 1 1 0; }

.news-top-ic-line { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.news-top-ic-fill { fill: currentColor; }
.news-top-ic-accent, .news-top-ic-sun { fill: var(--studio-news-yuzu-deep); }
.news-top-ic-cloud { fill: var(--studio-news-mint); stroke: currentColor; stroke-width: 1.4; }

/* 3列グリッド。DOM順＝モバイル順 */
.news-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  margin-top: 0.75rem;
}

.news-top-col { min-width: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.news-top-col:empty { display: none; }
/* 天気・鉄道が未設定の build は、左（記事）と右（数字）の2列 */
.news-top-grid--two { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }

/* パネル。一目の札からのページ内リンク先なので、固定ヘッダー（約68px）に隠れないよう余白を取る。 */
.news-top-panel {
  min-width: 0;
  scroll-margin-top: 5rem;
  padding: 0.65rem 0.75rem 0.75rem;
  background: var(--top-paper);
  border: 1px solid var(--top-line);
  border-radius: 6px;
}

/* 長い文字列（記事タイトル・要約・運行情報の本文）だけ、どこでも折り返せるようにする。数値や短い札には付けない。 */
.news-top :is(.news-top-lead h3, .news-top-lead-summary, .news-top-hl-t a, .news-top-recent-list a, .news-top-cal-t, .rail-alert p, .news-top-foot) { overflow-wrap: anywhere; }

.news-top-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--top-line);
}

.news-top-panel-head h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.5rem;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.news-top-kicker {
  font-family: var(--font-latin);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--top-accent-text);
}

.news-top-meta { font-size: 0.75rem; font-weight: 500; color: var(--top-muted); }
.news-top-more { flex: none; font-size: 0.78rem; color: var(--studio-news-green); white-space: nowrap; }
.news-top-more::after { content: " ›"; }

.news-top-status, .news-top-notice, .news-top-empty { font-size: 0.82rem; color: var(--top-muted); }
.news-top-notice { margin-bottom: 0.5rem; }

.news-top-foot {
  margin-top: 0.6rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--top-soft-line);
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--top-muted);
}

/* 短報への1行の入口（重要ニュース枠の下）。新しい枠にはしない。 */
.news-top-brief-entry[hidden] { display: none; }
.news-top-brief-entry { margin: 0.6rem 0 0; padding-top: 0.45rem; border-top: 1px solid var(--top-soft-line); font-size: 0.875rem; line-height: 1.6; }
.news-top-brief-entry a { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.15rem 0.6rem; min-height: 2.75rem; padding-block: 0.4rem; color: var(--top-ink); text-decoration: none; }
.news-top-brief-entry b { font-weight: 700; }
.news-top-brief-entry [data-brief-entry-count] { color: var(--top-accent-text); font-weight: 650; font-variant-numeric: tabular-nums; }
.news-top-brief-entry-go { margin-left: auto; text-decoration: underline; text-underline-offset: 0.18em; }
.news-top-brief-entry-go::after { content: " →"; }

.news-top-foot a, .news-top-panel details a { text-decoration: underline; text-underline-offset: 0.18em; }

.news-top-subhead { margin: 0.7rem 0 0.3rem; font-size: 0.78rem; font-weight: 700; color: var(--top-muted); }
.news-top-subhead span { font-weight: 500; }

.news-top-tag {
  display: inline-block;
  padding: 0 0.4rem;
  border: 1px solid var(--top-soft-line);
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.6;
}

.news-top-tag--desk { font-weight: 500; color: var(--top-muted); }

/* 判定チップは既存の部品を小さく使う（影なし）。見出しに番号が無いぶん、判定のある記事はチップの枠と色で目立たせる。
   layout.css の .news-surface-page 用の平らなチップ（枠・地色なし）より後で効くよう、.news-studio-page と重ねて指定する。
   枠・地色・文字色は layout.css の判定別トークン（--judgment-chip-*）を使う。 */
.news-studio-page.news-top .yuzufuka-judgment-chip {
  min-height: 0;
  gap: 0.25rem;
  padding: 0 0.4rem;
  border: 1px solid var(--judgment-chip-border);
  border-radius: 3px;
  background: var(--judgment-chip-bg);
  color: var(--judgment-chip-text);
  box-shadow: none;
  font-size: 0.78rem;
  line-height: 1.6;
  white-space: nowrap;
}

.news-studio-page.news-top .yuzufuka-judgment-chip::before { width: 0.36rem; height: 0.36rem; background: var(--judgment-chip-accent); }
.news-top-headlines .yuzufuka-judgment-chip b {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

/* 今日の重要ニュース */
.news-top-lead {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 0.75rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--top-line);
}

.news-top-lead--text { grid-template-columns: minmax(0, 1fr); }

.news-top-lead-thumb, .news-top-recent-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--studio-news-mint);
  border: 1px solid var(--top-soft-line);
  border-radius: 4px;
}

.news-top-lead-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; font-size: 0.8125rem; color: var(--top-muted); }
.news-top-lead h3 { margin: 0.3rem 0; font-size: 1.12rem; line-height: 1.4; text-wrap: balance; }
.news-top-lead-summary { font-size: 0.86rem; color: var(--top-muted); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }

/* 題名は全幅。日付・カテゴリと判定は次の行で折り返し、省略しない。 */
.news-top-headlines li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--top-soft-line);
}

.news-top-headlines li:last-child { border-bottom: 0; }
.news-top-hl-t a { font-weight: 500; }
.news-top-hl-meta { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.1rem 0.5rem; margin-top: 0.1rem; }
.news-top-hl-meta small { font-size: 0.8125rem; color: var(--top-muted); overflow-wrap: anywhere; }

/* 最近の記事 */
.news-top-recent-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem 0.9rem; }
.news-top-recent-list li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 0.5rem; align-items: start; font-size: 0.86rem; line-height: 1.45; }
.news-top-recent-list li.news-top-recent--text { grid-template-columns: minmax(0, 1fr); }
.news-top-recent-thumb { width: 56px; aspect-ratio: 1; }
/* 記事ごとの切り抜き位置（content/thumbnail-focus/<asset id>.json の x から build.js が選ぶ。5% 刻み） */
.thumb-pos-0 { object-position: 0% 50%; }
.thumb-pos-5 { object-position: 5% 50%; }
.thumb-pos-10 { object-position: 10% 50%; }
.thumb-pos-15 { object-position: 15% 50%; }
.thumb-pos-20 { object-position: 20% 50%; }
.thumb-pos-25 { object-position: 25% 50%; }
.thumb-pos-30 { object-position: 30% 50%; }
.thumb-pos-35 { object-position: 35% 50%; }
.thumb-pos-40 { object-position: 40% 50%; }
.thumb-pos-45 { object-position: 45% 50%; }
.thumb-pos-50 { object-position: 50% 50%; }
.thumb-pos-55 { object-position: 55% 50%; }
.thumb-pos-60 { object-position: 60% 50%; }
.thumb-pos-65 { object-position: 65% 50%; }
.thumb-pos-70 { object-position: 70% 50%; }
.thumb-pos-75 { object-position: 75% 50%; }
.thumb-pos-80 { object-position: 80% 50%; }
.thumb-pos-85 { object-position: 85% 50%; }
.thumb-pos-90 { object-position: 90% 50%; }
.thumb-pos-95 { object-position: 95% 50%; }
.thumb-pos-100 { object-position: 100% 50%; }
.news-top-recent-list small { display: block; margin-top: 0.15rem; font-size: 0.8125rem; color: var(--top-muted); }
.news-top-today-tag { display: inline-block; margin-right: 0.35em; padding: 0 0.35em; border-radius: 3px; background: var(--top-ok); color: #fff; font-size: 0.75rem; font-weight: 700; line-height: 1.5; }
.news-top-today-tag[hidden] { display: none; }

/* 状態の点（色だけに頼らず、必ず文字を添える） */
.news-top-dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--top-muted); }
.news-top-dot.is-ok { background: var(--top-ok); border-color: var(--top-ok); }
.news-top-dot.is-warn { background: var(--top-warn); border-color: var(--top-warn); }
.news-top-dot.is-bad { background: var(--top-bad); border-color: var(--top-bad); }
.news-top-dot.is-na { background: transparent; }

/* 天気 */
.news-top-weather[data-weather-empty] :is(.news-top-wx-now, .news-top-subhead, .news-top-wx-week, .news-top-wx-cities) { display: none; }
.news-top-wx-now { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 0.25rem 0.6rem; align-items: center; margin-top: 0.4rem; }
.news-top-wx-icon { display: block; flex: none; }
.news-top-wx-sun { fill: var(--studio-news-yuzu-deep); }
.news-top-wx-cloud { fill: var(--studio-news-mint); stroke: var(--top-ink); stroke-width: 1.3; }
.news-top-wx-rain { fill: none; stroke: var(--top-lo); stroke-width: 1.4; stroke-linecap: round; }
.news-top-wx-snow { fill: none; stroke: var(--top-muted); stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: 1 2; }
.news-top-wx-temp { display: flex; align-items: baseline; gap: 0.4rem; }
.news-top-wx-temp .news-top-hi { font-size: 1.75rem; font-weight: 700; line-height: 1.1; }
.news-top-wx-temp small { font-size: 0.82rem; }
.news-top-wx-temp .news-top-hi--none { font-size: 1rem; }
/* 発表なしは気温の値ではないので、最高・最低の色を付けない。 */
.news-top-wx-temp :is(.news-top-hi--none, .news-top-lo--none) { color: var(--top-muted); }
.news-top-wx-desc { font-size: 0.82rem; color: var(--top-muted); }
.news-top-wx-next { display: grid; text-align: right; font-size: 0.75rem; color: var(--top-muted); line-height: 1.4; }
.news-top-wx-next b { font-size: 0.92rem; color: var(--top-ink); }
.news-top-wx-slots { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.25rem; margin-top: 0.3rem; text-align: center; }
.news-top-wx-slots > span:not(.news-top-sr) { display: grid; padding: 0.15rem 0; border: 1px solid var(--top-soft-line); border-radius: 4px; }
.news-top-wx-slots small { font-size: 0.75rem; color: var(--top-muted); }
.news-top-wx-slots b { font-size: 0.82rem; font-weight: 600; color: var(--top-lo); }
.news-top-wx-missing, .news-top-wx-city-missing { font-size: 0.78rem; color: var(--top-muted); }
.news-top-wx-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.2rem; text-align: center; font-size: 0.75rem; }
.news-top-wx-day { white-space: nowrap; display: grid; justify-items: center; gap: 0.05rem; min-width: 0; padding: 0.2rem 0; }
.news-top-wx-dow { color: var(--top-muted); }
.news-top-wx-pop { font-size: 0.75rem; color: var(--top-lo); }
.news-top-hi { color: var(--top-hi); }
.news-top-lo { color: var(--top-lo); }
.news-top-wx-cities { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.2rem 0.3rem; }

.news-top-wx-city {
  min-width: 0;
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.15rem 0.15rem;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.75rem;
  text-align: left;
  white-space: nowrap;
  overflow-wrap: normal;
  cursor: pointer;
}
.news-top-wx-city :is(.news-top-hi, .news-top-lo, svg) { flex: none; }

.news-top-wx-city:hover .news-top-wx-city-name { text-decoration: underline; }
.news-top-wx-city[aria-pressed="true"] { background: var(--studio-news-mint); border-color: var(--top-soft-line); font-weight: 700; }
.news-top-wx-city-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.news-top-wx-sunline { grid-column: 1 / -1; font-size: 0.75rem; color: var(--top-muted); }
/* きょう／あすの服と持ちもの（天気ページの判定と同じ結果を1行で。詳細は天気ページ）。 */
.news-top-wx-outfit { margin: 0.5rem 0 0; }
.news-top-wx-outfit-link { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 0.5rem; padding: 0.35rem 0.55rem; border: 1px solid var(--top-soft-line); border-radius: 4px; color: inherit; text-decoration: none; font-size: 0.82rem; line-height: 1.5; }
.news-top-wx-outfit-link:hover b { text-decoration: underline; }
.news-top-wx-outfit-label { font-size: 0.75rem; color: var(--top-muted); }
.news-top-weather[data-weather-empty] .news-top-wx-outfit { display: none; }

/* 警報・地震（行の形は鉄道の .news-top-state と同じ） */
.news-top-alerts .news-top-state li > span:nth-child(2) { min-width: 0; }

/* 鉄道 */
.news-top-state li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 0.5rem; align-items: center; padding: 0.3rem 0; border-bottom: 1px solid var(--top-soft-line); font-size: 0.86rem; }
.news-top-state li:last-child { border-bottom: 0; }
.news-top-state-label { font-size: 0.78rem; color: var(--top-muted); white-space: nowrap; }
.news-top-state-label.is-warn { color: var(--top-warn-text); font-weight: 700; }
.news-top-rail .news-top-status { margin-bottom: 0.3rem; }
.news-top-rail .rail-alert { margin: 0.45rem 0; padding: 0.55rem 0.65rem; border: 1px solid var(--top-soft-line); border-left: 4px solid #9e7129; border-radius: 5px; }
.news-top-rail .rail-alert--suspended, .news-top-rail .rail-alert--cancelled { border-left-color: #bd675b; }
.news-top-rail .rail-alerts { margin: 0; padding: 0; list-style: none; }
.news-top-rail .rail-alert-heading strong { font-size: 0.95rem; }
.news-top-rail .rail-alert-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.news-top-rail .rail-alert p { margin: 0.2rem 0; font-size: 0.82rem; white-space: pre-line; }
.news-top-rail .rail-alert a { font-size: 0.78rem; text-decoration: underline; }
.news-top-rail .rail-panel-meta { font-size: 0.8125rem; color: var(--top-muted); }
.news-top-rail .rail-badge { display: inline-block; padding: 0 0.4rem; border: 1px solid #9e7129; border-radius: 3px; background: #fff2ce; color: #684407; font-size: 0.75rem; font-weight: 700; }
.news-top-rail .rail-badge--suspended, .news-top-rail .rail-badge--cancelled { background: #fff0ee; border-color: #bd675b; color: #852f25; }
.news-top-rail details { margin-top: 0.4rem; font-size: 0.78rem; color: var(--top-muted); }
.news-top-rail summary { min-height: 32px; padding: 0.3rem 0; cursor: pointer; color: var(--studio-news-green); }
.news-top-rail details p { margin: 0.3rem 0; }
.news-top-rail details h3 { margin: 0.5rem 0 0.2rem; font-size: 0.82rem; color: var(--top-ink); }
.news-top-rail details ul { padding-left: 1.1rem; list-style: disc; }

/* 為替 */
.news-top-fx li { display: grid; grid-template-columns: auto minmax(0, 1fr) 72px; gap: 0.5rem; align-items: center; padding: 0.4rem 0; border-bottom: 1px solid var(--top-soft-line); font-size: 0.86rem; }
.news-top-fx li:last-child { border-bottom: 0; }
.news-top-fx-label { white-space: nowrap; overflow-wrap: normal; word-break: keep-all; }
.news-top-fx-value { min-width: 0; display: grid; justify-items: end; text-align: right; line-height: 1.3; }
.news-top-fx-value b { font-size: 1rem; font-weight: 700; }
.news-top .market-movement { margin: 0; font-size: 0.75rem; font-weight: 700; }
.news-top .market-movement--up { color: #7a5500; }
.news-top .market-movement--down { color: #2c5a71; }
.news-top .market-movement--flat { color: var(--top-muted); }
.news-top-spark { display: block; width: 72px; height: 26px; }
.news-top-spark path { fill: none; stroke: var(--studio-news-green); stroke-width: 1.5; stroke-linejoin: round; }
[data-market-state="unavailable"] .news-top-fx { display: none; }
/* 東証の開場・休場（予定）。4通貨の下に本文1行と補足1行まで */
.news-top-tse { display: grid; gap: 0.1rem; margin-top: 0.2rem; padding-top: 0.4rem; border-top: 1px solid var(--top-soft-line); font-size: 0.86rem; line-height: 1.4; }
.news-top-tse small { font-size: 0.75rem; color: var(--top-muted); }
.news-top-foot[data-tse-source] { margin-top: 0.2rem; padding-top: 0; border-top: 0; }

/* ネットの空気 */
.news-top-tr-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.35rem; margin-bottom: 0.5rem; }
.news-top-tr-sum div { display: flex; flex-direction: column-reverse; padding: 0.3rem 0.45rem; border: 1px solid var(--top-soft-line); border-radius: 4px; }
.news-top-tr-sum dt { font-size: 0.75rem; color: var(--top-muted); line-height: 1.35; }
.news-top-tr-sum dd { font-size: 1.05rem; font-weight: 700; }
.news-top-tr { columns: 2; column-gap: 0.9rem; font-size: 0.82rem; }
.news-top-tr li { display: flex; align-items: baseline; gap: 0.3rem; padding: 0.15rem 0; break-inside: avoid; }
.news-top-tr-w { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-top-tr small { flex: none; font-size: 0.75rem; color: var(--top-muted); }
.news-top-tr-new { flex: none; font-family: var(--font-latin); font-size: 0.75rem; font-weight: 700; color: var(--top-accent-text); }

/* きょう・この先 */
.news-top-cal li { display: grid; grid-template-columns: 6.2em minmax(0, 1fr); gap: 0.5rem; align-items: baseline; padding: 0.3rem 0; border-bottom: 1px solid var(--top-soft-line); font-size: 0.86rem; }
.news-top-cal li:last-of-type { border-bottom: 0; }
.news-top-cal-d { font-size: 0.8125rem; font-weight: 700; white-space: nowrap; }
.news-top-cal-d.is-today { color: var(--top-accent-text); }
.news-top-cal-t.is-holiday { color: var(--top-hi); font-weight: 700; }
.news-top-cal small { margin-left: 0.35rem; font-size: 0.75rem; font-weight: 500; color: var(--top-muted); }

/* 編集室の一言 */
.news-top-note { margin-top: 1rem; font-size: 0.82rem; color: var(--top-muted); }
.news-top-note b { margin-right: 0.5rem; color: var(--top-ink); }

/* 3列で天気パネルが狭い幅（981〜1180px）は、都市一覧を2列にして都市名と気温を割らない */
/* ── 気になる話題から（YUZ-501）────────────────────────────
 * PC は見出しの下に3列。スマホ（700px 以下）は上の切り替えで「最新」と各話題を入れ替える。
 * 色の点は飾り（文字の色には使わない）。札（家庭向け／運営者向け）は安全の枠だけ。 */
.news-topics { margin-top: 0.85rem; padding-top: 0.7rem; border-top: 1px solid var(--top-soft-line); }
.news-topics-title { margin: 0 0 0.45rem; font-size: 0.95rem; }
.news-topics-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; }
.news-topic h4 { display: flex; align-items: center; gap: 0.35rem; margin: 0; font-size: 0.86rem; }
.news-topic-note { margin: 0 0 0.25rem; font-size: 0.75rem; color: var(--top-muted); }
.news-topic-list { list-style: none; margin: 0; padding: 0; }
.news-topic-list li { padding: 0.35rem 0; border-bottom: 1px solid var(--top-soft-line); font-size: 0.86rem; line-height: 1.45; overflow-wrap: anywhere; }
.news-topic-list li:last-child { border-bottom: 0; }
.news-topic-list li:nth-child(n+3) { display: none; }
.news-topic-list small { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; margin-top: 0.1rem; font-size: 0.75rem; color: var(--top-muted); }
.news-topic-who { padding: 0 0.3rem; border: 1px solid var(--top-soft-line); border-radius: 4px; color: var(--top-ink); }
.news-topic-empty { margin: 0.2rem 0 0; font-size: 0.8rem; color: var(--top-muted); }
.news-topic-dot { display: inline-block; flex: none; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: currentColor; }
.news-topic--life .news-topic-dot, .news-topic-chip--life .news-topic-dot { background: var(--top-ok); }
.news-topic--safety .news-topic-dot, .news-topic-chip--safety .news-topic-dot { background: var(--top-warn); }
.news-topic--ai .news-topic-dot, .news-topic-chip--ai .news-topic-dot { background: var(--top-lo); }
.news-topic-switch { display: none; flex-wrap: wrap; gap: 0.4rem; margin: 0.25rem 0 0.7rem; }
.news-topic-chip { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 2.75rem; padding: 0 0.95rem; border: 1px solid var(--top-soft-line); border-radius: 999px; background: transparent; color: var(--top-ink); font: inherit; font-size: 0.9rem; cursor: pointer; }
.news-topic-chip[aria-pressed="true"] { border-color: var(--top-ink); background: var(--top-ink); color: var(--top-paper); }
.news-topic-chip:focus-visible { outline: 2px solid var(--top-ink); outline-offset: 2px; }
.news-topic-switch[hidden] { display: none !important; }

@media (max-width: 700px) {
  .news-topics-cols { grid-template-columns: minmax(0, 1fr); }
  .news-topic-list li:nth-child(n+3) { display: list-item; }
  .has-topic-switch .news-topic-switch { display: flex; }
  .has-topic-switch .news-topics { margin-top: 0; padding-top: 0; border-top: 0; }
  .has-topic-switch .news-topics-title,
  .has-topic-switch .news-topic h4 { display: none; }
  .has-topic-switch[data-topic-view="latest"] .news-topics { display: none; }
  .has-topic-switch:not([data-topic-view="latest"]) .news-topic-latest { display: none; }
  .has-topic-switch[data-topic-view="life"] .news-topic:not(.news-topic--life),
  .has-topic-switch[data-topic-view="safety"] .news-topic:not(.news-topic--safety),
  .has-topic-switch[data-topic-view="ai"] .news-topic:not(.news-topic--ai) { display: none; }
}

@media (min-width: 981px) and (max-width: 1180px) {
  .news-top-grid:not(.news-top-grid--two) .news-top-wx-cities { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .news-top-fx li { grid-template-columns: auto minmax(0, 1fr) 56px; }
  .news-top-spark { width: 56px; }
}

@media (max-width: 980px) {
  .news-top-grid--two .news-top-col--numbers { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .news-top-glance-list,
  .news-top-glance-list[data-count] { --glance-columns: 3; }
  .news-top-glance-list[data-count="1"] { --glance-columns: 1; }
  .news-top-glance-list[data-count="2"] { --glance-columns: 2; }
  .news-top-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .news-top-col--main { grid-column: 1 / -1; }
}

/* 700px 以下ではヘッダーが固定されない（layout.css）ので、ページ内リンク先の余白は小さくてよい */
@media (max-width: 700px) {
  .news-top-panel { scroll-margin-top: 0.75rem; }
}

@media (max-width: 620px) {
  .news-top-glance-list,
  .news-top-glance-list[data-count] { --glance-columns: 2; }
  .news-top-glance-list[data-count="1"] { --glance-columns: 1; }
  /* 2列で札が奇数（3枚・5枚）のときは、最後の札を全幅にして空き枠を残さない（data-count は news-top.js も札の数に合わせて書き換える）。 */
  .news-top-glance-list:is([data-count="3"], [data-count="5"]) > li:last-child { grid-column: 1 / -1; }
  .news-top-grid { grid-template-columns: minmax(0, 1fr); }
  .news-top-grid--two .news-top-col--numbers { display: flex; }
  .news-top-lead { grid-template-columns: 6rem minmax(0, 1fr); }
  .news-top-lead--text { grid-template-columns: minmax(0, 1fr); }
  .news-top-recent-list { grid-template-columns: minmax(0, 1fr); }
  .news-top-status-chip { margin-left: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .news-top-wx-city { transition: background-color 0.15s; }
}

/* 初回の読み込み中は、届いたときの高さを先に取っておく（下の為替や警報の枠が押し下がらないように）。 */
.news-top-weather[data-weather-loading] .news-top-wx-now { display: block; min-height: 28.5rem; border-radius: 4px; background: var(--top-soft-line); opacity: 0.35; }
/* 今日のゆずふかちゃん（きょうのコーデ、天気Workerの /v1/outfit）。ニュースの見出しより目立たせず、広告に見える飾りは付けない。 */
.weather-coord--compact { margin: 0.6rem 0 0; }
.weather-coord--compact .weather-coord-link { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 0.7rem; align-items: start; padding: 0.55rem; border: 1px solid var(--top-soft-line); border-radius: 4px; color: inherit; text-decoration: none; }
.weather-coord--compact .weather-coord-link:hover .weather-coord-title { text-decoration: underline; }
.weather-coord--compact img { width: 112px; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px; background: #f4f2ee; }
.weather-coord--compact .weather-coord-kicker { margin: 0; font-size: 0.72rem; color: var(--top-muted); display: flex; flex-wrap: wrap; gap: 0.2rem 0.45rem; align-items: center; }
.weather-coord--compact .weather-coord-title { margin: 0.15rem 0 0.35rem; font-size: 0.88rem; font-weight: 700; line-height: 1.45; }
.weather-coord--compact .weather-coord-items { display: flex; flex-wrap: wrap; gap: 0.25rem; margin: 0 0 0.35rem; padding: 0; list-style: none; }
.weather-coord--compact .weather-coord-items li { font-size: 0.72rem; line-height: 1.5; padding: 0 0.45rem; border-radius: 999px; background: var(--top-soft-line); }
.weather-coord--compact .weather-coord-note { margin: 0; font-size: 0.68rem; line-height: 1.55; color: var(--top-muted); }
.weather-coord-tag { font-size: 0.68rem; padding: 0 0.4rem; border: 1px solid currentColor; border-radius: 3px; }
.news-top-weather[data-weather-empty] .weather-coord { display: none; }
