/* ============================================================
   画面ブラッシュアップ v3（2026-10-14）— ?design=preview の見本（body.brushup-v3）
   方針: 中小製造業の工場長・情シス（40〜55歳・ITに不慣れな人も）が落ち着いて読める、実務誌の趣。
   触らない: 特集ハブ・今日のヘッドラインの枠・深緑の配色・記事デザインv2・R11のスマホ表示。
   ============================================================ */
body.brushup-v3 {
  --b3-green-900: #003d33;
  --b3-green-800: #004d40;
  --b3-green-700: #00695c;
  --b3-ink: #16201d;
  --b3-ink-soft: #45524d;
  --b3-line: #d7e3df;
  --b3-panel: rgba(0, 40, 34, .82);
}

/* ------------------------------------------------------------
   [B9] PCヒーロー：文字ブロックの下だけ濃い緑の面を敷く（写真全体には被せない）／黄色い下線をやめる
   ------------------------------------------------------------ */
@media (min-width: 768px) {
  body.brushup-v3 .hero-kv--pc .hero-kv__media { padding-top: 176px !important; padding-bottom: 34px; }
  body.brushup-v3 .hero-kv--pc .hero-kv__panel {
    display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
    box-sizing: border-box; max-width: min(860px, 100%);
    padding: 22px 32px 24px; border-radius: 6px;
    background: var(--b3-panel);
  }
  body.brushup-v3 .hero-kv--pc .hero-kv__flag {
    margin-bottom: 8px; border-radius: 3px; backdrop-filter: none;
    background: rgba(255, 255, 255, .10); border-color: rgba(255, 255, 255, .28);
  }
  body.brushup-v3 .hero-kv--pc .hero-kv__title { text-shadow: none; letter-spacing: .01em; max-width: none; text-wrap: balance; }
  body.brushup-v3 .hero-kv--pc .hero-kv__sub { text-shadow: none; color: #d8f1ea; }
  body.brushup-v3 .hero-kv--pc .hero-kv__sub b,
  body.brushup-v3 .hero-kv--pc .hero-kv__concept strong {
    background: none !important; box-shadow: none !important; text-decoration: none !important;
    color: #fff !important; font-weight: 800;
  }
  body.brushup-v3 .hero-kv--pc .hero-kv__concept {
    margin-top: 6px; max-width: 700px; font-size: .9rem; line-height: 1.85; text-shadow: none;
    word-break: auto-phrase; text-wrap: pretty;
  }
}

/* ------------------------------------------------------------
   [B8] 実績ストリップ：件数の自慢をやめ、蛍光マーカーも外す（全サイズ）
   ------------------------------------------------------------ */
body.brushup-v3 .proof-strip { justify-content: center; }
body.brushup-v3 .proof-strip__num { background: none !important; box-shadow: none !important; color: var(--b3-green-800); }
/* PCはヒーローのボタン横に「登録不要・匿名でOK」があるため、実数帯の「匿名OK」は外す（スマホのヒーローには無いので残す）。実数が1つもなければ帯ごと隠す */
@media (min-width: 768px) {
  body.brushup-v3 .proof-strip__item--anon { display: none; }
  body.brushup-v3 .proof-strip:not(:has(.proof-strip__item:not(.proof-strip__item--anon))) { display: none; }
}

/* ------------------------------------------------------------
   [B10] 青い標準リンク→墨色／深緑＋ホバー・矢印（今日のヘッドラインの枠は触らない）
   ------------------------------------------------------------ */
@media (min-width: 768px) {
  body.brushup-v3 .portal-row--tail a,
  body.brushup-v3 .portal-row--tail a:visited { color: var(--b3-green-800); }
  body.brushup-v3 .portal-box__dir-link,
  body.brushup-v3 .portal-box__dir-link:visited {
    display: inline-flex; align-items: baseline; gap: 6px;
    color: var(--b3-ink); font-weight: 600; text-decoration: none;
    padding: 3px 0; transition: color .15s;
  }
  body.brushup-v3 .portal-box__dir-arrow {
    color: var(--b3-green-700); font-weight: 800; transition: transform .15s;
  }
  body.brushup-v3 .portal-box__dir-link:hover { color: var(--b3-green-700); text-decoration: underline; text-underline-offset: 3px; }
  body.brushup-v3 .portal-box__dir-link:hover .portal-box__dir-arrow { transform: translateX(3px); }
  body.brushup-v3 .portal-box__dir-link:focus-visible,
  body.brushup-v3 .portal-box__more a:focus-visible { outline: 2px solid var(--b3-green-700); outline-offset: 2px; border-radius: 2px; }
  body.brushup-v3 .portal-box__more a { transition: color .15s; }
  body.brushup-v3 .portal-box__more a:hover { color: var(--b3-green-900); }
}

/* ------------------------------------------------------------
   [B11] コミュニティ欄：絵文字をやめ線画アイコンに／トップでは記事の後ろにまとめる（PCのみ。スマホの並びはR11のまま）
   ------------------------------------------------------------ */
body.brushup-v3 .community-strip__icon svg { width: 22px; height: 22px; }
body.brushup-v3 .community-strip__icon { color: var(--b3-green-800); }
@media (min-width: 768px) {
  body.brushup-v3 .bento-posts-feed > .idea-spotlight,
  body.brushup-v3 .bento-posts-feed > .seiseiai-buzz--recipes { order: 30; }
  body.brushup-v3 .bento-posts-feed > .seiseiai-buzz--recipes { margin-bottom: 0; }
  /* 同じ「アイデアを投稿する」ボタンが上の見出しにもあるため、ここでは重ねて出さない */
  body.brushup-v3 .pillar-hub__idea-cta--band { display: none; }
}

/* ------------------------------------------------------------
   [B7] 右カラム：二重の枠をやめ、見出しを深緑の帯にそろえ、並びを「相談→人気記事→ベストテン→タグ→ツール→フォロー」に
   ------------------------------------------------------------ */
@media (min-width: 768px) {
  html body.brushup-v3 aside.right-sidebar > .widget {
    padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important;
    margin: 0 0 20px !important; border-radius: 0 !important;
  }
  body.brushup-v3 .right-sidebar > .widget:has(.ai-concierge-widget)  { order: 1; }
  body.brushup-v3 .right-sidebar > .widget:has(.card-5-ranking)       { order: 2; }
  body.brushup-v3 .right-sidebar > .widget:has(.xtrends)              { order: 3; }
  body.brushup-v3 .right-sidebar > .widget:has(.card-4-trend-pulse)   { order: 4; }
  body.brushup-v3 .right-sidebar > .widget:has(.card-3-tool-status)   { order: 5; }
  body.brushup-v3 .right-sidebar > .widget:has(.card-6-community)     { order: 6; }
  body.brushup-v3 .right-sidebar > .widget:has(.seiseiai-xfollow-box),
  body.brushup-v3 .right-sidebar > .widget:has(.seiseiai-newsletter-box) { order: 9; }

  /* 枠は1重・角は控えめ・影なし */
  body.brushup-v3 .right-sidebar .bento-card,
  body.brushup-v3 .right-sidebar .xtrends,
  body.brushup-v3 .right-sidebar .seiseiai-xfollow-box {
    border: 1px solid var(--b3-line) !important; border-radius: 8px !important; background: #fff !important;
    box-shadow: none !important; padding: 0 !important; margin: 0 !important; overflow: hidden;
  }
  body.brushup-v3 .right-sidebar .ai-concierge-widget { border-radius: 8px; }

  /* 見出し：深緑の帯にそろえる（ベストテンの帯を基準に） */
  body.brushup-v3 .right-sidebar .xtrends__head,
  body.brushup-v3 .right-sidebar .card-4-trend-pulse .pulse-header,
  body.brushup-v3 .right-sidebar .card-5-ranking .bento-title,
  body.brushup-v3 .right-sidebar .card-3-tool-status--compact .status-header h3,
  body.brushup-v3 .right-sidebar .seiseiai-xfollow-box__head {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    margin: 0 !important; padding: 11px 14px !important;
    background: var(--b3-green-800); color: #fff !important;
    font-size: .95rem !important; font-weight: 700 !important; line-height: 1.35 !important; border: 0 !important;
  }
  body.brushup-v3 .right-sidebar .card-4-trend-pulse .pulse-header { padding-bottom: 2px !important; }
  body.brushup-v3 .right-sidebar .card-4-trend-pulse .pulse-indicator { width: 8px; height: 8px; background: #8fd8c6 !important; box-shadow: none !important; animation: none; }
  body.brushup-v3 .right-sidebar .card-4-trend-pulse .pulse-sub {
    margin: 0 !important; padding: 0 14px 10px !important; background: var(--b3-green-800) !important; color: #bfe3da !important; font-size: .7rem !important; font-weight: 400 !important;
  }
  body.brushup-v3 .right-sidebar .card-3-tool-status--compact .pulse-dot { display: none; }
  body.brushup-v3 .right-sidebar .xtrends__title { font-size: .95rem; }
  body.brushup-v3 .right-sidebar .seiseiai-xfollow-box__lead { margin: 0 !important; padding: 12px 14px 2px; font-size: .88rem; line-height: 1.7; color: var(--b3-ink-soft); }
  html body.brushup-v3 .right-sidebar a.seiseiai-xfollow-box__btn { margin: 10px 14px 14px; }

  /* 本体の余白 */
  body.brushup-v3 .right-sidebar .card-4-trend-pulse .pulse-rank { margin: 12px 14px 0 !important; padding: 0; }
  body.brushup-v3 .right-sidebar .card-4-trend-pulse .pulse-more-tags { margin: 10px 14px 14px; padding-top: 10px; }
  body.brushup-v3 .right-sidebar .card-5-ranking .ranking-list { padding: 6px 14px 12px; }
  body.brushup-v3 .right-sidebar .card-3-tool-status--compact .tool-status-compact__note { margin: 12px 14px 8px !important; font-size: .85rem !important; color: var(--b3-ink-soft) !important; }
  body.brushup-v3 .right-sidebar .card-3-tool-status--compact .status-footer { margin: 0 14px 14px; }
  body.brushup-v3 .right-sidebar .card-3-tool-status--compact .status-footer a { color: var(--b3-green-800) !important; font-weight: 700 !important; }

  /* リンク：青をやめ墨色（ベストテン）。ホバーで深緑＋下線 */
  body.brushup-v3 .right-sidebar .xtrends__tag a,
  body.brushup-v3 .right-sidebar .xtrends__tag a:visited { color: var(--b3-ink); font-weight: 600; text-decoration: none; }
  body.brushup-v3 .right-sidebar .xtrends__tag a:hover { color: var(--b3-green-700); text-decoration: underline; text-underline-offset: 3px; }
}

/* ------------------------------------------------------------
   [B10追加] 参加のしかたチップの黄マーカーを外す／掲示板スレッド一覧の青リンクを墨色に（深緑のホバー）
   ------------------------------------------------------------ */
body.brushup-v3 .participation-nav__item b { background: none; }
body.brushup-v3 .board-index-table a.board-index-table__link,
body.brushup-v3 .board-index-table a.board-index-table__link:visited { color: var(--b3-ink); font-weight: 600; text-decoration: none; }
body.brushup-v3 .board-index-table a.board-index-table__link:hover { color: var(--b3-green-700); text-decoration: underline; text-underline-offset: 3px; }
body.brushup-v3 .board-index-table a.board-index-table__link:focus-visible { outline: 2px solid var(--b3-green-700); outline-offset: 2px; }

/* ------------------------------------------------------------
   [B12] トップの並べ替え：テーマ別に読む／編集部のお題／入口リンク
   ------------------------------------------------------------ */
body.brushup-v3 .bento-posts-feed > .b3-themes { grid-column: 1 / -1; min-width: 0; }
body.brushup-v3 .b3-themes { margin: 6px 0 30px; }
body.brushup-v3 .b3-themes__title {
  margin: 0 0 4px; padding: 2px 0 2px 12px; border-left: 6px solid var(--b3-green-800);
  font-size: 1.4rem; line-height: 1.4; color: var(--b3-ink);
}
body.brushup-v3 .b3-themes__lead { margin: 0 0 18px 18px; font-size: .88rem; color: var(--b3-ink-soft); }
body.brushup-v3 .b3-theme { margin: 0 0 26px; min-width: 0; }
body.brushup-v3 .b3-theme__head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 16px;
  margin: 0 0 12px; padding-bottom: 6px; border-bottom: 2px solid var(--b3-green-800);
}
body.brushup-v3 .b3-theme__name { margin: 0; font-size: 1.12rem; line-height: 1.5; color: var(--b3-green-800); }
body.brushup-v3 .b3-theme__more,
body.brushup-v3 .b3-theme__more:visited { font-size: .85rem; font-weight: 700; color: var(--b3-green-800); text-decoration: none; }
body.brushup-v3 .b3-theme__more:hover { color: var(--b3-green-700); text-decoration: underline; text-underline-offset: 3px; }
body.brushup-v3 .b3-theme__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
body.brushup-v3 .b3-card,
body.brushup-v3 .b3-card:visited {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  background: #fff; border: 1px solid var(--b3-line); border-radius: 8px;
  color: var(--b3-ink); text-decoration: none; transition: border-color .15s, box-shadow .15s;
}
body.brushup-v3 .b3-card:hover { border-color: var(--b3-green-700); box-shadow: 0 2px 10px rgba(0, 61, 51, .12); }
body.brushup-v3 .b3-card:focus-visible { outline: 2px solid var(--b3-green-700); outline-offset: 2px; }
body.brushup-v3 .b3-card__thumb { position: relative; display: block; aspect-ratio: 2 / 1; overflow: hidden; background: #e8f0ed; }
body.brushup-v3 .b3-card__thumb > * { max-width: 100%; }
body.brushup-v3 .b3-card__thumb .seiseiai-fb__label { display: none; }
body.brushup-v3 .b3-card__img { display: block; width: 100%; height: 100%; object-fit: cover; }
body.brushup-v3 .b3-card__body { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 12px; min-width: 0; }
body.brushup-v3 .b3-card__title {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
  font-size: .95rem; font-weight: 700; line-height: 1.55; overflow-wrap: anywhere;
}
body.brushup-v3 .b3-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: .75rem; color: var(--b3-ink-soft); }
body.brushup-v3 .b3-card__cmt { display: inline-flex; align-items: center; gap: 3px; }
body.brushup-v3 .b3-card__cmt svg { width: 14px; height: 14px; }
body.brushup-v3 .b3-themes__rest { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 0; }
body.brushup-v3 .b3-themes__rest-label { font-size: .85rem; font-weight: 700; color: var(--b3-ink-soft); }
body.brushup-v3 .b3-themes__chip,
body.brushup-v3 .b3-themes__chip:visited {
  display: inline-flex; align-items: center; min-height: 40px; padding: 4px 14px; box-sizing: border-box;
  border: 1px solid var(--b3-line); border-radius: 999px; background: #fff;
  font-size: .88rem; font-weight: 600; color: var(--b3-ink); text-decoration: none;
}
body.brushup-v3 .b3-themes__chip:hover { border-color: var(--b3-green-700); color: var(--b3-green-700); }
body.brushup-v3 .b3-themes__chip-count { font-weight: 400; color: var(--b3-ink-soft); }
body.brushup-v3 .b3-themes__chip--rank { border-color: var(--b3-green-800); color: var(--b3-green-800); }

/* 編集部のお題（掲示板の段の先頭に固定） */
body.brushup-v3 .b3-odai {
  margin: 0 0 18px; padding: 14px 18px 16px; box-sizing: border-box;
  background: #f1f7f5; border: 1px solid var(--b3-line); border-left: 6px solid var(--b3-green-800); border-radius: 6px;
}
body.brushup-v3 .b3-odai__label { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: .88rem; font-weight: 800; color: var(--b3-green-800); }
body.brushup-v3 .b3-odai__label svg { width: 18px; height: 18px; }
body.brushup-v3 .b3-odai__list { list-style: none; margin: 0; padding: 0; }
body.brushup-v3 .b3-odai__item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding: 8px 0; border-top: 1px solid var(--b3-line); }
body.brushup-v3 .b3-odai__item:first-child { border-top: 0; padding-top: 0; }
body.brushup-v3 .b3-odai__q { margin: 0; flex: 1 1 280px; min-width: 0; font-size: 1.02rem; font-weight: 700; line-height: 1.6; color: var(--b3-ink); overflow-wrap: anywhere; }
body.brushup-v3 .b3-odai__due { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 3px; background: #fff; border: 1px solid var(--b3-line); font-size: .74rem; font-weight: 700; color: var(--b3-ink-soft); }
body.brushup-v3 .b3-odai__go,
body.brushup-v3 .b3-odai__go:visited { flex: 0 0 auto; font-size: .9rem; font-weight: 700; color: var(--b3-green-800); text-decoration: none; }
body.brushup-v3 .b3-odai__go:hover { text-decoration: underline; text-underline-offset: 3px; }
body.brushup-v3 .b3-odai__sample { margin: 0; font-size: .85rem; line-height: 1.7; color: var(--b3-ink-soft); }
body.brushup-v3 .b3-odai--sample { border-style: dashed; border-left-style: solid; }

/* 参加の段の見出し：枠なしの見出しだけにする（中身は下に続く） */
body.brushup-v3 .participation-band .community-strip:not(.community-strip--links) {
  background: none; border: 0; box-shadow: none; padding: 0; margin: 0;
}
body.brushup-v3 .participation-band .community-strip__head { margin-bottom: 0; }

/* 掲示板の後ろの入口リンク（3つ） */
body.brushup-v3 .community-strip--links { margin: 18px 0 0; padding: 0; background: none; border: 0; box-shadow: none; }
body.brushup-v3 .community-strip--links .community-strip__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
body.brushup-v3 .community-strip--links .community-strip__item { grid-column: auto; padding: 14px 16px 12px; }
body.brushup-v3 .community-strip--links .community-strip__item:hover { transform: none; }

@media (max-width: 767px) {
  body.brushup-v3 .b3-themes__title { font-size: 1.2rem; }
  body.brushup-v3 .b3-themes__lead { margin-left: 0; }
  body.brushup-v3 .b3-theme__grid { grid-template-columns: 1fr; gap: 10px; }
  body.brushup-v3 .b3-card,
  body.brushup-v3 .b3-card:visited { flex-direction: row; align-items: stretch; }
  body.brushup-v3 .b3-card__thumb { flex: 0 0 104px; width: 104px; aspect-ratio: auto; min-height: 84px; }
  body.brushup-v3 .b3-card__body { flex: 1 1 auto; justify-content: space-between; padding: 8px 12px; }
  body.brushup-v3 .b3-card__title { font-size: .92rem; }
  body.brushup-v3 .b3-card__thumb .seiseiai-fb__credit { display: none; }
  body.brushup-v3 .b3-odai { padding: 12px 14px 14px; }
  body.brushup-v3 .community-strip--links .community-strip__grid { grid-template-columns: 1fr; }
}

/* スマホでも右カラム（ページ最後に回る）の並びをPCと同じに：AI相談→よく読まれている記事→ベストテン→注目のキーワード→ツール→フォロー */
@media (max-width: 767px) {
  body.brushup-v3 aside.right-sidebar { display: flex; flex-direction: column; }
  body.brushup-v3 .right-sidebar > .widget:has(.ai-concierge-widget)  { order: 1; }
  body.brushup-v3 .right-sidebar > .widget:has(.card-5-ranking)       { order: 2; }
  body.brushup-v3 .right-sidebar > .widget:has(.xtrends)              { order: 3; }
  body.brushup-v3 .right-sidebar > .widget:has(.card-4-trend-pulse)   { order: 4; }
  body.brushup-v3 .right-sidebar > .widget:has(.card-3-tool-status)   { order: 5; }
  body.brushup-v3 .right-sidebar > .widget:has(.card-6-community)     { order: 6; }
  body.brushup-v3 .right-sidebar > .widget:has(.seiseiai-xfollow-box),
  body.brushup-v3 .right-sidebar > .widget:has(.seiseiai-newsletter-box) { order: 9; }
}

/* [B12] AIレシピの見出し：「AIレシピ」＋副題。スマホでは副題を2行目に置き、途中で折り返さない */
body.brushup-v3 .recipe-feed__head { flex-wrap: wrap; row-gap: 0; align-items: baseline; }
body.brushup-v3 .recipe-feed__head .recipe-feed__icon { align-self: center; }
body.brushup-v3 .recipe-feed__sub--b3 { white-space: nowrap; }
body.brushup-v3 .recipe-feed__note { text-wrap: balance; }
body.brushup-v3 .recipe-feed__title { text-wrap: balance; word-break: auto-phrase; } /* [2026-10-16] 360/412幅で「する」「る」だけが2行目に残る泣き別れを防ぐ */
@media (max-width: 767px) {
  body.brushup-v3 .recipe-feed__sub--b3 { flex-basis: 100%; margin-left: 26px; margin-top: 2px; }
}
