/*
  CV1 デザインシステム（T4 No.3・No.4）
  トーン＆マナー：自然・アウトドア・旅情、明るく親しみやすい（要件定義書2章）
  ブレークポイント目安：768px（タブレット）、1024px（デスクトップ）
*/

/* ==========================================================================
   デザイントークン
   ========================================================================== */
:root {
  /* カラー：自然・海・木々を感じさせるパレット */
  --color-primary: #1f5f4f;        /* 深い森グリーン（見出し・強調） */
  --color-primary-dark: #163f34;
  --color-accent: #d98e3f;         /* 暖かみのある木・砂浜トーン（CTA・アクセント） */
  --color-accent-dark: #b56f26;
  --color-sea: #2f7f9e;            /* 海・空のブルー（サブアクセント） */
  --color-bg: #fbf9f4;             /* オフホワイト背景 */
  --color-surface: #ffffff;
  --color-text: #2a2f2b;
  --color-text-muted: #5b645d;
  --color-border: #e4e0d6;

  /* タイポグラフィ：幅広い年齢層が読みやすいサイズ・行間 */
  --font-family-base: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif;
  --font-size-base: 17px;
  --line-height-base: 1.8;

  /* 余白スケール */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;

  /* 記事の「柱」となる幅（T4 No.15）。
     本文はこの幅で日本語1行あたり39文字前後になり、読みやすさの最適域に収まる。
     タイトル・日付・アイキャッチも同じ幅に揃えることで、記事の左右に段差が出ないようにする。
     従来は .post-content だけが 72ch で、タイトルとアイキャッチはコンテナ幅（1088px）まで
     広がっていたため、右側に約370pxの段差が生じていた。 */
  --content-width: 720px;

  /* 固定ヘッダーの高さ（T4 No.15）。見出しへのアンカー移動時に、
     ヘッダーの下に見出しが隠れないよう scroll-margin-top で使う。
     スマホはメニューボタン（タップ領域44px）＋上下padding16pxで77px、
     768px以上はロゴ40px＋padding16pxで73px。いずれも実測値。 */
  --header-height: 77px;

  --radius: 10px;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  --container-width: 1120px;
}

/* ==========================================================================
   リセット・ベース
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background: var(--color-bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4 {
  color: var(--color-primary-dark);
  line-height: 1.4;
  margin: 0 0 var(--space-2);
}

ul, ol {
  padding-left: 1.4em;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-2);
}

/* ==========================================================================
   ヘッダー・ナビゲーション
   ========================================================================== */
/* ヘッダーは固定にする（T4 No.15）。記事が1万px超あり、スマホでメニューを開くために
   毎回先頭まで戻る必要が出てしまうため。メニューパネルを絶対配置する基準にもなる。
   z-indexは 読了バー(120) > ヘッダー(100) > 目次ボタン(90) の順に整理している。 */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-2);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

/* サイトロゴ（T4 No.15 ①）。英文を主・和文を従とする組み。
   シンボルはファビコンと同じ絵柄を用い、ヘッダーの白背景に溶けるよう四隅は白のまま使う。
   スマホでは「& TRAILS」と和文を隠し、シンボル＋「VICTORIA LIFE」の短縮形に切り替える
   （サイト名が17文字あり、そのままでは折り返してナビゲーションを押し下げてしまうため）。 */
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.55em;
  color: var(--color-primary-dark);
  text-decoration: none;
  line-height: 1.2;
}

.site-logo:hover {
  text-decoration: none;
  opacity: 0.85;
}

.site-logo-mark {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.site-logo-text {
  display: flex;
  flex-direction: column;
}

.site-logo-en {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* 和文は従。英文を主役に見せるため、サイズを落として字間を空け、色も一段淡くする */
.site-logo-ja {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* スマホでは短縮形にする */
.site-logo-en-rest,
.site-logo-ja {
  display: none;
}

/* スマホ用メニューボタン（T4 No.15）。三本線だけでは意味が伝わりにくいため「メニュー」を併記する。
   タップ領域は44px以上を確保する（小さいと押しづらく、誤タップも増える）。 */
.nav-toggle {
  display: flex;
  align-items: center;
  gap: 0.45em;
  min-height: 44px;
  padding: 0 0.6em;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-primary-dark);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.nav-toggle:hover {
  border-color: var(--color-primary);
}

/* 三本線のアイコン。中央の線を実体、上下を疑似要素で描く */
.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle-icon {
  position: relative;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-icon::before { top: -6px; }
.nav-toggle-icon::after  { top: 6px; }

/* 開いているときは×印に変える */
.nav-toggle[aria-expanded="true"] .nav-toggle-icon {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

/* スマホではナビを畳み、ボタンで開く。パネルはヘッダー直下に降りる形にした
   （全画面ドロワーはオーバーレイと背面スクロール固定が必要になり、項目4つには過剰なため）。 */
.site-nav {
  display: none;
}

header.is-nav-open .site-nav {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
  padding: var(--space-1) var(--space-2) var(--space-2);
}

/* パネル内は縦並び。1項目あたり44px以上のタップ領域を確保する */
header.is-nav-open .site-nav ul {
  flex-direction: column;
  gap: 0;
}

header.is-nav-open .site-nav li {
  border-bottom: 1px solid var(--color-border);
}

header.is-nav-open .site-nav li:last-child {
  border-bottom: none;
}

header.is-nav-open .site-nav a {
  display: block;
  padding: 0.85em 0.2em;
  font-weight: 500;
}

/* 動きを抑える設定の利用者にはアイコンのアニメーションを止める */
@media (prefers-reduced-motion: reduce) {
  .nav-toggle-icon,
  .nav-toggle-icon::before,
  .nav-toggle-icon::after {
    transition: none;
  }
}

header nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
}

header nav a {
  color: var(--color-text);
  font-weight: 500;
}

header nav a:hover {
  color: var(--color-primary);
}

/* ==========================================================================
   メインコンテンツ
   ========================================================================== */
main {
  display: block;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: var(--space-4) var(--space-2);
}

section {
  margin-bottom: var(--space-5);
}

/* ==========================================================================
   フッター
   ========================================================================== */
footer {
  background: var(--color-primary-dark);
  color: #ffffff;
  text-align: center;
  padding: var(--space-3) var(--space-2);
  margin-top: var(--space-5);
}

footer a {
  color: #ffffff;
}

footer p {
  margin: 0;
}

/* 掲載写真の利用条件（T4 No.15）。著作権表記より控えめにしつつ、読める濃さは保つ */
.footer-notice {
  margin-top: 0.4em;
  font-size: 0.82rem;
  opacity: 0.85;
}

/* ==========================================================================
   カード（記事一覧・新着記事）
   ========================================================================== */
.card {
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: var(--space-3);
}

.card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.card-body {
  padding: var(--space-2);
}

.card-title {
  font-size: 1.1rem;
  margin: 0 0 var(--space-1);
}

.card-title a {
  color: var(--color-primary-dark);
}

.card-excerpt {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin: 0 0 var(--space-1);
}

.card-date {
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

/* ==========================================================================
   サイドバー
   ========================================================================== */
aside {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}

aside h2 {
  font-size: 1.1rem;
}

aside ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

aside li {
  padding: var(--space-1) 0;
  border-bottom: 1px dashed var(--color-border);
}

/* ==========================================================================
   記事詳細
   ========================================================================== */
/* 下書きプレビュー時の告知バー（T5 No.5）。管理者ログイン中のみ表示される */
.draft-notice {
  background: #fff4e0;
  border: 1px solid var(--color-accent);
  border-left: 5px solid var(--color-accent);
  border-radius: var(--radius);
  padding: var(--space-2);
  margin: 0 0 var(--space-3);
  color: var(--color-accent-dark);
}

/* タイトル・日付・アイキャッチ・下書き告知バーを、本文と同じ幅に揃える（T4 No.15 ②） */
.post-title,
.post-date,
.post-eyecatch,
.draft-notice {
  max-width: var(--content-width);
  /* 720pxの柱をコンテナ（1088px）の中央に置く。左寄せだと右側に約370pxの余白が残り、
     中央寄せのパンくず・最新記事とも位置がずれてしまうため。 */
  margin-inline: auto;
}

.post-title {
  font-size: 2rem;
}

.post-date {
  display: block;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

/* アイキャッチの縦幅の上限（T4 No.15 ③）。
   元画像を差し替えずに16:9で切り出す。カード画像（.card img）と同じ比率にすることで、
   一覧・トップ・記事詳細で写真の見え方が揃う。
   4:3の写真は上下が切れるため、被写体が中央から外れている場合は
   個別に object-position で調整する。 */
.post-eyecatch {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: var(--space-3);
}

/* prose：Markdownから変換されたHTMLをテーマのグローバルCSSから独立して整えるための専用ブロック（T4 No.9対応） */
.post-content {
  max-width: var(--content-width);
  margin-inline: auto;
}

.post-content h1,
.post-content h2,
.post-content h3 {
  margin-bottom: var(--space-2);
}

.post-content h1 { font-size: 1.6rem; }
.post-content h2 { font-size: 1.35rem; }
.post-content h3 { font-size: 1.15rem; }

/* 見出しの装飾（T4 No.15 ④）。
   H2とH3は文字サイズの差が小さく（1.35rem / 1.15rem）階層が伝わりにくかったため、
   「H2＝章の区切り（下線）」「H3＝その中の項目（左罫）」と役割を描き分ける。
   上の余白もH2を広くとることで、装飾に頼らずリズムが出るようにしている。 */
.post-content h2 {
  margin-top: var(--space-5);
  padding-bottom: 0.3em;
  border-bottom: 2px solid var(--color-border);
}

.post-content h3 {
  margin-top: var(--space-4);
  padding-left: 0.6em;
  border-left: 4px solid var(--color-accent);
}

.post-content h1 {
  margin-top: var(--space-4);
}

.post-content p {
  margin: 0 0 var(--space-2);
}

.post-content ul,
.post-content ol {
  margin: 0 0 var(--space-2);
  padding-left: 1.6em;
}

.post-content li {
  margin-bottom: 0.4em;
}

.post-content blockquote {
  margin: var(--space-3) 0;
  padding: var(--space-2) var(--space-3);
  border-left: 4px solid var(--color-accent);
  background: #faf3e8;
  color: var(--color-text-muted);
}

.post-content blockquote p {
  margin: 0;
}

/* 列数の多い表は、この中だけで横スクロールさせる（ページ全体を横に広げない） */
.post-content .table-scroll {
  overflow-x: auto;
  margin: var(--space-3) 0;
  -webkit-overflow-scrolling: touch;
}

.post-content table {
  width: 100%;
  min-width: 20rem;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.post-content th,
.post-content td {
  border: 1px solid var(--color-border);
  padding: var(--space-1);
  text-align: left;
}

.post-content th {
  background: #f1efe6;
  color: var(--color-primary-dark);
}

.post-content code {
  background: #f1efe6;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}

.post-content pre {
  background: #2a2f2b;
  color: #f5f3ea;
  padding: var(--space-2);
  border-radius: var(--radius);
  overflow-x: auto;
}

.post-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* 本文画像の比率を16:9に統一する（T4 No.15）。
   アイキャッチ・トップのカード画像と同じ比率にすることで、サイト全体で写真の見え方が揃う。
   4:3の写真は上下が25%切り取られるため、被写体が中央にないものは下の object-position で個別に調整する。 */
.post-content img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  margin: var(--space-2) 0;
}

/* 16:9より横長の画像（パノラマ）はトリミングしない。
   横に広がる眺望がこの種の写真の見どころそのものであり、16:9にすると左右が約20%削られてしまうため。
   クラスは MarkdownRenderer が画像の実寸から自動で付ける。 */
.post-content img.is-wide {
  aspect-ratio: auto;
}

/* 切り出し位置の個別調整（Project Owner確認済み）。
   既定では中央を切り出すが、被写体が中央にない写真だけ下端合わせにする。
   ファイル名で指定しているのは、Markdownに画像ごとの指定を書く記法がないため。 */
.post-content img[src$="20260830-098f7d407a4f05c0.webp"],  /* マウントダグラス公園の看板と自転車：両方を写す */
.post-content img[src$="20260901-a0c2c9b82bf3066e.webp"],  /* ビーコンヒルパークの雪化粧：白飛びした上部の空を落とす */
.post-content img[src$="20260901-b5886eedcf97fe0d.webp"],  /* BCフェリー：altが指すデッキ・救命浮輪・人物が下端にあり、中央切り出しでは失われる */
.post-content img[src$="20260901-cd6c55735bc2920e.webp"] { /* ビュー・ストリートの桜：桜並木・スクールバス・道路が下部に集まっている */
  object-position: center bottom;
}

/* 記事の目次（Markdownの :::toc 記法／T5）。H2見出しから自動生成される */
.post-content .toc {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  margin: 0 0 var(--space-4);
}

.post-content .toc-title {
  margin: 0 0 var(--space-1);
  font-weight: 700;
  color: var(--color-primary-dark);
}

.post-content .toc-list {
  margin: 0;
  padding-left: 1.4em;
  font-size: 0.95rem;
}

.post-content .toc-list li {
  margin-bottom: 0.3em;
}

/* 目次から見出しへジャンプした際、ヘッダーに隠れないよう余白を確保する */
/* 目次から見出しへ飛んだとき、固定ヘッダーの下に見出しが隠れないようにする（T4 No.15） */
.post-content h2[id],
.post-content h3[id] {
  scroll-margin-top: calc(var(--header-height) + var(--space-2));
}

/* 執筆者の吹き出し（Markdownの :::voice / :::voice-opinion 記法／T5）。
   運営者の一次体験を本文と視覚的に区別し、E-E-A-Tを高めるためのコンポーネント。
   配色で「客観的な事実・助言（グリーン系）」と「主観・本音（アンバー系）」を描き分ける */
.post-content .voice {
  --voice-bg: #f2f7f5;
  --voice-border: #cfe0d9;
  --voice-label: var(--color-primary);
  --voice-icon: "✍";

  position: relative;
  background: var(--voice-bg);
  border: 1px solid var(--voice-border);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-3) var(--space-2);
  margin: var(--space-4) 0 var(--space-3);
}

/* 主観・本音系の吹き出し（親近感のあるアンバー系） */
.post-content .voice-opinion {
  --voice-bg: #fdf6e8;
  --voice-border: #e8cfa0;
  --voice-label: var(--color-accent-dark);
  --voice-icon: "💬";
}

/* 個人的なエピソード・思い出の吹き出し（温かみのあるクリーム／ピンク系）。
   実用アドバイスと明確に描き分け、読者のストーリーへの共感を促す */
.post-content .voice-story {
  --voice-bg: #fdf1f0;
  --voice-border: #eec7c2;
  --voice-label: #a85a54;
  --voice-icon: "💭";

  /* 思い出は特別枠として、左に太いアクセント罫を入れて印象づける */
  border-left-width: 5px;
  border-left-color: #d99a92;
}

/* 吹き出しの三角（上向き） */
.post-content .voice::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 32px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid var(--voice-border);
}

.post-content .voice::after {
  content: "";
  position: absolute;
  top: -9px;
  left: 33px;
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-bottom: 9px solid var(--voice-bg);
}

.post-content .voice-label {
  margin: 0 0 var(--space-1);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--voice-label);
  letter-spacing: 0.02em;
}

.post-content .voice-label::before {
  content: var(--voice-icon);
  margin-right: 0.4em;
}

.post-content .voice-body > :last-child {
  margin-bottom: 0;
}

/* 緊急時参照ボックス（Markdownの :::alert 記法／T5）。
   クマ・クーガー遭遇時の手順など、いざというときにスクロール中でも目で拾える必要がある情報を、
   サイト内で最も強いコントラストで囲む。吹き出し（運営者の声）とは役割が異なるため配色を分けている */
/* 吹き出し（:::voice-story）も淡いピンク系のため、地色だけでは見分けがつかない。
   こちらは「濃い色のヘッダー帯＋白地」という別の構造にして、一目で役割が違うと分かるようにする */
.post-content .alert-box {
  background: var(--color-surface);
  border: 2px solid #b4483a;
  border-radius: var(--radius);
  padding: 0 var(--space-3) var(--space-3);
  margin: var(--space-3) 0;
  overflow: hidden;
}

.post-content .alert-box-label {
  /* 枠いっぱいに広がるヘッダー帯にするため、親のpaddingを打ち消す */
  margin: 0 calc(var(--space-3) * -1) var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: #b4483a;
  color: #ffffff;
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.5;
}

.post-content .alert-box-label::before {
  content: "⚠";
  margin-right: 0.4em;
}

/* ラベルなしで使われた場合は、上端に余白を戻す */
.post-content .alert-box > .alert-box-body:first-child {
  padding-top: var(--space-3);
}

.post-content .alert-box-body > :last-child {
  margin-bottom: 0;
}

/* 手順を1項目ずつ目で追えるよう、項目間を破線で区切る。
   サイドバー用の汎用 aside li ルートに依存させず、このボックス専用として明示しておく */
.post-content .alert-box-body ol {
  margin: 0;
  padding-left: 1.5em;
  list-style: decimal;
}

.post-content .alert-box-body ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.post-content .alert-box-body li {
  margin: 0;
  padding: var(--space-2) 0;
  border-bottom: 1px dashed var(--color-border);
  line-height: 1.7;
}

.post-content .alert-box-body li:first-child {
  padding-top: 0;
}

.post-content .alert-box-body li:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.post-content .alert-box-body li::marker {
  color: #b4483a;
  font-weight: 700;
}

/* 手順は各項目が太字のため、太字まで赤にすると箱全体が赤一色になり、かえって読みづらい。
   赤はヘッダー帯と項目番号に限定し、本文は通常の文字色のままにする */
.post-content .alert-box-body strong {
  color: inherit;
}

/* カード型リンク（Markdownの :::related 記法／T5）。
   記事末尾やまとめ前に置き、サイト内の回遊を促すためのコンポーネント */
.post-content .related-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
  margin: var(--space-3) 0 var(--space-4);
}

.post-content .related-card {
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius);
  padding: var(--space-2);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: border-left-color 0.15s ease, transform 0.15s ease;
}

.post-content .related-card:hover {
  border-left-color: var(--color-primary);
  transform: translateX(2px);
  text-decoration: none;
}

.post-content .related-card-title {
  display: block;
  font-weight: 700;
  color: var(--color-primary-dark);
  line-height: 1.5;
}

.post-content .related-card-title::after {
  content: " →";
  color: var(--color-accent-dark);
}

.post-content .related-card-desc {
  display: block;
  margin-top: 0.2em;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

@media (min-width: 768px) {
  .post-content .related-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* セーフティアンカー（T5 No.6）。ハイキング記事の本文末尾にテンプレートから自動挿入される、
   野生動物安全ガイドへの必読導線。記事本文のカード型リンクより一段強い注意喚起として扱う */
.safety-notice {
  max-width: var(--content-width);
  margin-inline: auto;
  background: #fdf6e8;
  border: 1px solid var(--color-accent);
  border-left: 5px solid var(--color-accent-dark);
  border-radius: var(--radius);
  padding: var(--space-3);
  margin: var(--space-4) auto var(--space-3);
}

.safety-notice-heading {
  margin: 0 0 var(--space-1);
  font-weight: 700;
  color: var(--color-accent-dark);
  line-height: 1.5;
}

.safety-notice-heading::before {
  content: "⚠";
  margin-right: 0.4em;
}

.safety-notice-body {
  margin: 0 0 var(--space-2);
  font-size: 0.95rem;
  color: var(--color-text);
}

.safety-notice-link {
  display: inline-block;
  background: var(--color-accent);
  color: #ffffff;
  padding: var(--space-1) var(--space-3);
  border-radius: 6px;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none;
}

.safety-notice-link::after {
  content: " →";
}

.safety-notice-link:hover {
  background: var(--color-accent-dark);
  text-decoration: none;
}

.safety-notice-draft {
  margin: var(--space-2) 0 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.post-content figure.about-photo {
  margin: var(--space-3) 0;
}

.post-content figure.about-photo img {
  margin: 0;
  aspect-ratio: 10 / 7;
  object-fit: cover;
  width: 100%;
}

.post-content figure.about-photo figcaption {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-align: center;
  margin-top: var(--space-1);
}

/* ==========================================================================
   フォーム（管理画面ログイン等）
   ========================================================================== */
form input[type="text"],
form input[type="password"] {
  font-size: 1rem;
  padding: var(--space-1);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  width: 100%;
  max-width: 320px;
}

form button,
.button {
  display: inline-block;
  background: var(--color-accent);
  color: #ffffff;
  border: none;
  padding: var(--space-1) var(--space-3);
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
}

form button:hover,
.button:hover {
  background: var(--color-accent-dark);
  text-decoration: none;
}

/* ==========================================================================
   目的から探すカード（persona-card、T4 No.5で本実装。ここでは基礎スタイルのみ）
   ========================================================================== */
.persona-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

.persona-card {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  color: #ffffff;
  box-shadow: var(--shadow);
  min-height: 220px;
}

.persona-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.persona-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.55));
  z-index: 1;
}

.persona-card-label {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  height: 100%;
  padding: var(--space-3);
  font-size: 1.15rem;
  font-weight: 700;
}

/* ==========================================================================
   レスポンシブ
   ========================================================================== */
@media (min-width: 768px) {
  :root {
    --font-size-base: 18px;
  }

  /* タブレット以上ではメニューボタンを隠し、ナビを横並びで常時表示する（T4 No.15） */
  :root {
    --header-height: 73px;
  }

  .nav-toggle {
    display: none;
  }

  .site-nav {
    display: block;
  }

  /* タブレット以上ではロゴをフルネームに戻す（T4 No.15 ①） */
  .site-logo-mark {
    width: 40px;
    height: 40px;
  }

  .site-logo-en-rest {
    display: inline;
  }

  .site-logo-ja {
    display: block;
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .persona-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==========================================================================
   T4 No.15 PM提案1〜4
   ========================================================================== */

/* パンくずリスト（提案3）。記事・カテゴリの本文と同じ幅に揃える */
.breadcrumb {
  max-width: var(--content-width);
  margin: 0 auto var(--space-2);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2em 0.5em;
  margin: 0;
  padding: 0;
}

.breadcrumb li {
  display: flex;
  align-items: center;
}

/* 区切り記号はCSSで足す。文字として書くと読み上げで邪魔になるため */
.breadcrumb li + li::before {
  content: "›";
  margin-right: 0.5em;
  color: var(--color-border);
}

.breadcrumb a {
  color: var(--color-text-muted);
}

.breadcrumb a:hover {
  color: var(--color-primary);
}

/* 現在ページ。長いタイトルが折り返して2行以上になるのを防ぐ */
.breadcrumb [aria-current="page"] {
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 22em;
}

/* 著者表示（提案4）。記事末尾で書き手を明示し、Aboutページへ送る */
.author-box {
  max-width: var(--content-width);
  margin-inline: auto;
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-3);
  margin: var(--space-4) auto var(--space-3);
}

.author-box-avatar {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.author-box-label {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.author-box-name {
  margin: 0.1em 0 0.4em;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary-dark);
}

.author-box-bio {
  margin: 0 0 var(--space-2);
  font-size: 0.9rem;
  line-height: 1.75;
}

.author-box-link {
  font-weight: 700;
}

.author-box-link::after {
  content: " →";
}

/* 記事末尾の「最新記事」（提案1）。本文と同じ幅に収め、カード型リンクの見た目を流用する */
.latest-posts {
  max-width: var(--content-width);
  margin: var(--space-4) auto 0;
}

.latest-posts-heading {
  font-size: 1.25rem;
  padding-bottom: 0.35em;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: var(--space-2);
}

/* カード型リンクのスタイルは .post-content 配下に定義されているため、ここでも同じ見た目を与える */
.latest-posts .related-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
  margin: 0;
}

.latest-posts .related-card {
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius);
  padding: var(--space-2);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: border-left-color 0.15s ease, transform 0.15s ease;
}

.latest-posts .related-card:hover {
  border-left-color: var(--color-primary);
  transform: translateX(2px);
  text-decoration: none;
}

.latest-posts .related-card-title {
  display: block;
  font-weight: 700;
  color: var(--color-primary-dark);
  line-height: 1.5;
}

.latest-posts .related-card-title::after {
  content: " →";
  color: var(--color-accent-dark);
}

.latest-posts .related-card-desc {
  display: block;
  margin-top: 0.2em;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* 読了プログレスバー（提案2）。記事が長く現在地がわからないため画面上端に出す */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  /* 固定ヘッダー(100)より手前に置く。3pxの細いバーなので最前面でも邪魔にならない */
  z-index: 120;
  pointer-events: none;
}

.reading-progress-bar {
  display: block;
  width: 0;
  height: 100%;
  background: var(--color-accent);
}

/* 「目次へ戻る」ボタン（提案2）。目次を通過したときだけ現れる */
.to-toc {
  position: fixed;
  right: var(--space-2);
  bottom: var(--space-3);
  z-index: 90;
  padding: 0.6em 1.1em;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-primary-dark);
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.to-toc::before {
  content: "↑ ";
}

.to-toc.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.to-toc:hover {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}

/* 動きを抑える設定の利用者には、なめらかスクロールとアニメーションを止める */
@media (prefers-reduced-motion: reduce) {
  .to-toc {
    transition: none;
  }
}

@media (min-width: 768px) {
  .author-box-avatar {
    width: 64px;
    height: 64px;
  }

  .latest-posts .related-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}
