@charset "UTF-8";
/* =====================================================
   みのかも地域文化資源（cultural/sekihi/index.cfm） 専用CSS
   ・共通CSS（com_layout / com_item / com_acce）の後に読み込む
   ・ページタイトル(.page-head)・見出し(.common_title_line)・戻る(.com_backbar)・UPボタンは共通CSS側
   ・このファイルは石碑ページ固有の部分だけを定義。クラス名は sh_ で始める
   ・背景色テーマ（標準／黒／黄）に対応：色はすべて --sh-* 変数で指定し、
     テーマごとの値は下の html.theme-black / html.theme-yellow で入れ替える
     （テーマの切替は com_acce.css が html 要素にクラスを付ける）
   ===================================================== */

/* ---------- 標準テーマ（白地） ---------- */
:root {
  --sh-text: #222;
  --sh-sub: #4a4a4a;            /* 白地で 8:1 以上 */
  --sh-accent: #1d5c4a;         /* 白地で 7:1 以上。ボタン背景(白文字)でも 7:1 以上 */
  --sh-accent-dark: #123d31;
  --sh-on-accent: #fff;         /* accent を背景にしたボタンの文字色 */
  --sh-card: #fff;              /* 「文化資源紹介ページ」の囲み・スキップリンクの背景 */
  --sh-mark: #c00000;           /* 「※」の赤 */
  --sh-border: #c9d3cf;
  --sh-bg-soft: #f3f7f5;        /* 「地図の見方」の枠の背景 */
  --sh-focus: #0b57d0;
}

/* ---------- 黒テーマ（黒地・黄文字）：共通CSSの変数を参照 ---------- */
html.theme-black {
  --sh-text: var(--ink);                  /* #ffe987 */
  --sh-sub: var(--ink-soft);              /* #d8cf9c */
  --sh-accent: var(--forest);             /* #8fd18f  ボタン背景・リンク */
  --sh-accent-dark: var(--forest-2);      /* #a8dba8 */
  --sh-on-accent: var(--forest-contrast); /* 暗色。明るい緑のボタン上の文字 */
  --sh-card: var(--paper);                /* #0b0b0b */
  --sh-mark: #ff9b9b;                     /* 黒地で読める明るい赤 */
  --sh-border: var(--line-strong);        /* #5a5a5a */
  --sh-bg-soft: var(--paper-2);           /* #161616 */
  --sh-focus: var(--focus);               /* #ffe987 */
}

/* ---------- 黄テーマ（黄地・黒文字） ---------- */
html.theme-yellow {
  --sh-text: var(--ink);                  /* #1a1a00 */
  --sh-sub: var(--ink-soft);              /* #2e2e00 */
  --sh-accent: var(--forest);             /* #1a1a00 */
  --sh-accent-dark: var(--forest-2);      /* #333300 */
  --sh-on-accent: var(--forest-contrast); /* #fff */
  --sh-card: var(--paper);                /* #fff200 */
  --sh-mark: #c00000;
  --sh-border: var(--line);               /* #4d4d00 */
  --sh-bg-soft: var(--paper-2);           /* #fffbcf */
  --sh-focus: var(--focus);               /* #d40000 */
}

#sekihi {
  color: var(--sh-text);
  margin-top: 2.5em;
  padding-bottom: 64px;
}

/* ---------- 各ブロック ---------- */
#sekihi .sh_section {
  margin-top: 48px;
}
#sekihi .sh_section:first-child {
  margin-top: 0;
}
#sekihi .sh_section > h2 {
  margin-bottom: 16px;
}

/* ---------- 説明文 ---------- */
#sekihi .sh_intro p {
  max-width: 46em;
  margin: 0 0 0.75em;
  font-size: 1rem;
  line-height: 1.7;
}
#sekihi .sh_intro p:last-child {
  margin-bottom: 0;
}

/* ---------- 地図の見方（1つの枠） ---------- */
#sekihi .sh_guide_box {
  max-width: 60em;
  padding: 16px 20px 20px;
  background: var(--sh-bg-soft);
  border: 1px solid var(--sh-border);
  border-radius: 8px;
}
#sekihi .sh_guide_label {
  margin: 0 0 12px;
  padding-bottom: 12px;
  font-weight: bold;
  line-height: 1.7;
  border-bottom: 1px solid var(--sh-border);
}

/* 石碑アイコン8種：囲みなしの文字だけの一覧（ボタンに見えないようにする） */
#sekihi .sh_icon_list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
#sekihi .sh_icon_list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  line-height: 1.7;
}
#sekihi .sh_icon_list img {
  flex: 0 0 auto;
  width: 32px;
  height: auto;
}
#sekihi .sh_icon_title {
  display: block;
  font-weight: bold;
}
#sekihi .sh_icon_text {
  display: block;
}
/* 文化資源紹介ページ：一覧の枠内（2列表示では石仏の下）。参考扱いのため小さめの文字・囲み */
#sekihi .sh_links {
  align-self: start;
  padding: 8px 12px;
  background: var(--sh-card);
  border: 1px solid var(--sh-border);
  border-radius: 6px;
}
#sekihi .sh_links_title {
  margin: 0 0 2px;
  font-size: 0.8125rem;
  line-height: 1.6;
}
#sekihi .sh_links_mark {
  color: var(--sh-mark);        /* 赤：標準は白地で 6:1 以上。黒テーマは明るい赤 */
}
#sekihi .sh_links_list {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.8125rem;
  line-height: 1.6;
}
#sekihi .sh_links_list a {
  color: var(--sh-accent);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
#sekihi .sh_links_list a:hover {
  color: var(--sh-accent-dark);
  text-decoration-thickness: 2px;
}
#sekihi .sh_links_list a:focus-visible {
  outline: 3px solid var(--sh-focus);
  outline-offset: 2px;
}

/* 地図の見方：注意書きの箇条書き */
#sekihi .sh_list {
  margin: 20px 0 0;
  padding: 16px 0 0 1.4em;
  line-height: 1.8;
  list-style: circle;
  border-top: 1px solid var(--sh-border);
}
#sekihi .sh_list > li + li {
  margin-top: 0.5em;
}

/* ---------- ボタン（リンク） ---------- */
#sekihi .sh_btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 24px;
  font-size: 1rem;
  font-weight: bold;
  line-height: 1.4;
  color: var(--sh-on-accent);
  background: var(--sh-accent);
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
}
#sekihi .sh_btn:hover {
  background: var(--sh-accent-dark);
  text-decoration: none;
}
#sekihi .sh_btn:focus-visible {
  outline: 3px solid var(--sh-focus);
  outline-offset: 2px;
}
#sekihi .sh_btn_sub {
  font-size: 0.875rem;
  font-weight: normal;
}
#sekihi .sh_arrow {
  width: 9px;
  height: 9px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
#sekihi .sh_btn:hover .sh_arrow {
  transform: translateX(4px) rotate(45deg);
}

/* ---------- 地図 ---------- */
#sekihi .sh_map_actions {
  margin: 0 0 16px;
}

/* 地図を飛ばすリンク：キーボードで移動したときだけ表示 */
#sekihi .sh_skip {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
#sekihi .sh_skip:focus {
  position: static;
  display: inline-block;
  width: auto;
  height: auto;
  margin: 0 0 12px;
  padding: 8px 12px;
  overflow: visible;
  clip: auto;
  white-space: normal;
  color: var(--sh-accent-dark);
  background: var(--sh-card);
  outline: 3px solid var(--sh-focus);
  outline-offset: 2px;
}

#sekihi .sh_map iframe {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 3;
  border: 1px solid var(--sh-border);
  border-radius: 8px;
}

/* ---------- 石碑の全リスト（PDF） ---------- */
#sekihi .sh_siryou {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}
#sekihi .sh_siryou p {
  margin: 0;
  line-height: 1.7;
}

/* ---------- スマートフォン ---------- */
@media (max-width: 749px) {
  #sekihi {
    margin-top: 1.5em;
  }
  #sekihi .sh_section {
    margin-top: 40px;
  }
  #sekihi .sh_icon_list {
    grid-template-columns: 1fr;
  }
  #sekihi .sh_map_actions .sh_btn,
  #sekihi .sh_siryou .sh_btn {
    width: 100%;
  }
  #sekihi .sh_map iframe {
    aspect-ratio: auto;
    height: 480px;
  }
  #sekihi .sh_siryou {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ---------- 動きを減らす設定 ---------- */
@media (prefers-reduced-motion: reduce) {
  #sekihi .sh_arrow {
    transition: none;
  }
  #sekihi .sh_btn:hover .sh_arrow {
    transform: rotate(45deg);
  }
}

/* ---------- 強制カラーモード（Windows ハイコントラスト） ---------- */
@media (forced-colors: active) {
  #sekihi .sh_btn {
    border: 2px solid ButtonText;
    color: ButtonText;
    background: ButtonFace;
  }
}
