/* ==========================================================
   四国八十八箇所霊場マップ — Design System  (desktop, min-width: 769px)
   ========================================================== */

:root {
    /* 旧サイトのロゴ・背景画像から実測した紫を基調に、黄をアクセントとするパレット（autocamp/golfの緑、onsenの茶と差別化） */
    --brand:        #804D90;
    --brand-deep:   #4F2675;
    --brand-mid:    #8C46CD;
    --sun:          #FFCC00; /* 紫地上のアクセント。縁取り・アイコン・大きめ文字専用（小さい文字は--sun-softを使う） */
    --sun-soft:     #FFE9B0; /* 彩度を落とした金色。紫地の上の小さい常時表示テキスト用（純色の金はチラついて読みにくいため） */
    --mist:         #F6F0FA;
    --text-dark:    #2b2b2b;
    --text-mid:     #666;
    --text-light:   #949494;
    --border:       #E3D3EC;
    --border-dark:  #C9A8D9;
    --link:         #6B3FA0;
    --link-hover:   #4F2675;
    --cta:          var(--brand);
    --cta-hover:    var(--brand-deep);

    /* 既存コードとの互換のためのエイリアス */
    --text:    var(--text-dark);
    --muted:   var(--text-mid);
    --accent:  var(--brand);
    --bg-mist: var(--mist);
}

/* U+2026（水平省略記号）だけArialで描画し、日本語フォントの中点表示を回避 */
@font-face {
    font-family: 'EllipsisLatin';
    src: local('Arial'), local('Helvetica Neue'), local('Helvetica');
    unicode-range: U+2026;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Noto Sans JP', Tahoma, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-dark);
    /* 旧サイトのbg.jpgから実測した紫のキャンバス（白いコンテンツカラムを中央に置く） */
    background-color: var(--brand);
}

img { border: 0; max-width: 100%; height: auto; }

h1 { font-size: 24px; font-weight: 700; margin: 0; }
h2 { font-size: 16px; font-weight: 700; margin: 0; }
h3 { font-size: 15px; font-weight: 700; margin: 0; }
h4 { font-size: 16px; font-weight: 500; margin: 0; }

p { line-height: 1.8; margin: 0 0 1.1em; color: var(--text-mid); }

a            { color: var(--link); text-decoration: none; }
a:visited    { color: var(--link); }
a:hover      { color: var(--link-hover); text-decoration: underline; }
a:focus      { outline: none; }
a:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

.bold { font-weight: 600; }

/* ===== WRAPPER ===== */

#wrapper {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    background: #fff;
}

/* ===== ヘッダー ===== */

/* shiroと同じ方式: 帯全体をCSSグラデーションにし、ロゴ画像(logo.jpg)を帯の高さいっぱいに表示する。
   グラデーションの両端色はロゴ画像の縁からサンプリングした実測値（上端#B157ED→下端#985ECF）の
   ため、画像背景なしでロゴと帯が切れ目なく揃う */
#header-top {
    background-color: var(--brand-deep);
    text-align: right;
    padding: 4px 16px;
}
#header-tagline { font-size: 12px; color: rgba(255, 255, 255, 0.9); letter-spacing: 0.02em; }

#header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* ロゴ画像の縁を実測した多段ストップ（JPEG側のグラデーションが非線形のため、
       2色の線形補間だと中間の明度がずれて継ぎ目が見える） */
    background: linear-gradient(to bottom,
        #B157ED 0%, #9E4FE0 10%, #8C46CD 20%, #783AB5 30%, #653196 40%,
        #52287C 50%, #4F2675 60%, #5D2E8E 70%, #6E34A4 80%, #854DBC 90%, #985ECF 100%);
}

#logo-block h1,
#logo-block .site-logo { margin: 0; line-height: 0; }
#logo-block .site-logo img,
#logo-block h1 img { display: block; width: 555px; height: 80px; }

#header-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    padding-right: 16px;
}

#search-form > div { display: flex; gap: 6px; }
#search-form input[type="text"] {
    width: 220px;
    padding: 7px 12px;
    font-size: 13px;
    font-family: 'Noto Sans JP', sans-serif;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(79, 38, 117, 0.3);
    border-radius: 4px;
    color: var(--brand-deep);
    outline: none;
    transition: background 0.2s, border-color 0.2s;
}
#search-form input[type="text"]::placeholder { color: rgba(79, 38, 117, 0.45); }
#search-form input[type="text"]:focus {
    background: #fff;
    border-color: var(--brand-deep);
}
#search-form input[type="submit"] {
    padding: 7px 18px;
    font-size: 13px;
    font-family: 'Noto Sans JP', sans-serif;
    background: var(--brand-deep);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}
#search-form input[type="submit"]:hover { background: #000; }

#headmenu { list-style: none; display: flex; gap: 16px; }
#headmenu a { font-size: 12px; color: #fff; font-weight: 500; }
#headmenu a:hover { color: var(--sun); }

.search-result-count { margin-bottom: 12px; color: var(--text-mid); }

/* ===== パンくず ===== */

#navi {
    padding: 8px 24px;
    font-size: 12px;
    color: var(--text-mid);
    background-color: var(--mist);
    border-bottom: 1px solid var(--border);
}
#navi ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; margin: 0; padding: 0; }
#navi li { display: flex; align-items: center; }
#navi li + li::before { content: "›"; margin: 0 6px; color: var(--text-mid); }
#navi a { color: var(--link); }
#navi a:hover { color: var(--brand); }
.breadcrumb-current { font-weight: 500; color: var(--text-dark); }

.content-heading {
    font-family: 'Noto Serif JP', serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    border-bottom: 2px solid var(--brand-mid);
    padding-bottom: 8px;
    margin-bottom: 16px;
}
ruby { ruby-align: center; }
rt { font-size: 0.55em; font-weight: 400; color: var(--text-light); letter-spacing: 0.02em; }

/* ===== MAIN AREA（shiroと同じ構造: page-main > page-h1-wrap + page-body(flex) ===== */

.page-main { min-width: 0; }

.page-h1-wrap { padding: 24px 24px 0; }
.page-h1-wrap .content-heading { margin-bottom: 0; }

.page-body {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 24px;
}
.page-content { flex: 1; min-width: 0; }
.page-sidebar { width: 300px; flex-shrink: 0; }

.page-lead { margin: 0 0 20px; line-height: 1.7; color: var(--text-dark); }

.sidebar-banner { display: block; margin-bottom: 12px; }
.sidebar-banner img { display: block; max-width: 100%; height: auto; }
.sidebar-doc {
    padding: 14px 16px;
    background: var(--mist);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.8;
    color: var(--text-mid);
}

/* ===== LINE BOX（セクションコンテナ） ===== */

.line_box {
    background-color: #fff;
    border: 1px solid var(--border);
    border-top: 2px solid var(--link);
    border-radius: 0 0 4px 4px;
    margin-bottom: 24px;
}
.line_head {
    background-color: #fafaf8;
    border-bottom: 1px solid var(--border);
    padding: 14px 16px;
}
.line_head h2, .line_head p, .line_head h3 {
    font-family: 'Noto Serif JP', serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
}

/* ===== トップページ 地方ナビ ===== */

#map_box {
    display: flex;
    align-items: flex-start;
    gap: 32px;
    padding: 16px;
    margin-top: 10px;
}
#map_box > img { flex-shrink: 0; }
#map_box ul {
    flex: 1;
    min-width: 0;
    list-style: none;
}
#map_box ul li {
    margin-bottom: 15px;
    line-height: 1.4;
    border-left: 3px solid var(--link);
    padding-left: 8px;
}
#map_box ul li a { color: var(--link); }
#map_box ul li a:hover { color: var(--link-hover); text-decoration: underline; }

/* ===== 施設詳細 ===== */

#temple-detail { display: flow-root; }
#temple-detail.temple-detail--deleted { margin-top: 200px; text-align: center; }

/* 詳細ページ冒頭の注意リンク（旧サイトの赤字注記を踏襲） */
.caution-note { color: #f00; font-size: 11px; margin: 0 0 10px; }
.caution-note a { color: var(--link); text-decoration: underline; }

/* 利用上の注意ボックス（旧サイトの.cautionを踏襲） */
.caution {
    border: solid 2px var(--text-dark);
    border-radius: 4px;
    padding: 16px 20px 8px;
    background-color: #fff;
    margin-bottom: 20px;
}
.caution strong {
    color: #DF0003;
    font-size: 14px;
    display: block;
}
.caution p {
    margin: 10px 0;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-dark);
}

.temple-gallery { margin-bottom: 16px; }

.temple-gallery-single {
    margin-bottom: 16px;
}
.temple-gallery-single img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.temple-swiper-main { width: 100%; margin-bottom: 6px; cursor: zoom-in; }
.temple-swiper-main .swiper-slide img { width: 100%; height: auto; display: block; }
.temple-swiper-main .swiper-button-prev,
.temple-swiper-main .swiper-button-next { color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.6); }

.temple-swiper-thumbs { width: 100%; }
.temple-swiper-thumbs .swiper-slide { width: 64px; height: 64px; opacity: 0.55; cursor: pointer; }
.temple-swiper-thumbs .swiper-slide-thumb-active { opacity: 1; outline: 2px solid var(--link); }
.temple-swiper-thumbs .swiper-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ライトボックス */
#temple-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
#temple-lightbox.open { display: flex; }
#temple-lightbox img {
    max-width: 92vw;
    max-height: 92vh;
    object-fit: contain;
    border-radius: 2px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}
#temple-lb-close {
    position: absolute;
    top: 16px;
    right: 20px;
    color: rgba(255,255,255,0.8);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    user-select: none;
}
#temple-lb-close:hover { color: #fff; }

#infocanvas {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

/* 解説とスクエア地図は#infocanvasの外（写真の直下）に単独配置しているため、flexのgapが効かず
   自前でmargin-bottomを持たせる */
.temple-comment-map-row { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.temple-comment-map-row .temple-comment-section { flex: 1; min-width: 0; }

.temple-location-map {
    flex: 0 0 200px;
    width: 200px;
    height: 200px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 2px 6px rgba(79, 38, 117, 0.10);
}
.temple-location-map--unavailable {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #f7fafd;
    color: var(--text-mid);
    font-size: 12px;
}

/* 各区分を独立したカードに分離し、影と余白で「別グループ」であることを一目で伝える */
.info-section {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(79, 38, 117, 0.10);
}
.info-section-title {
    font-family: 'Noto Serif JP', serif;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: var(--brand-mid);
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.info-section-title i { font-size: 12px; opacity: 0.9; }
.info-section-title--with-accessory { justify-content: space-between; padding: 5px 8px 5px 12px; }

/* 基本情報＝最優先層。濃いバー＋アイコンで最も強い視線誘導にする */
.info-section--primary dl dt i {
    color: var(--brand-mid);
    width: 14px;
    text-align: center;
    margin-right: 2px;
}

/* 料金・サイト情報・キャンピングカー＝補足層。バーを外し静かな見出しにして基本情報と差をつける */
.info-section--soft {
    box-shadow: 0 1px 3px rgba(79, 38, 117, 0.06);
    border-color: #e8dcf0;
}
.info-section--soft .info-section-title {
    background: transparent;
    color: var(--brand-mid);
    font-size: 12px;
    padding: 10px 12px 7px;
    border-bottom: 2px solid var(--brand-mid);
    margin-bottom: 2px;
}
.info-section--soft .info-section-title i { color: var(--brand); }

.info-section dl {
    display: grid;
    grid-template-columns: 168px 1fr;
    width: 100%;
}
.info-section dl dt {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-mid);
    padding: 9px 12px;
    border-bottom: 1px solid var(--border);
    background: #f7fafd;
}
.info-section dl dd {
    font-size: 13px;
    padding: 9px 12px;
    border-bottom: 1px solid var(--border);
    word-break: break-word;
}
.info-section dl dt:last-of-type,
.info-section dl dd:last-of-type { border-bottom: none; }

/* 解説・アクセス等の長文は改行で段落(<p>)に分割して表示し、段落間に余白を持たせる */
.info-section-text {
    padding: 12px 16px 16px;
}
.info-section-text p,
.info-section dl dd p {
    line-height: 1.9;
    margin: 0 0 1em;
}
.info-section-text p:last-child,
.info-section dl dd p:last-child { margin-bottom: 0; }

.link-map {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 10px;
    padding: 3px 11px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--brand-deep);
    background: #e7f1fb;
    border: 1px solid #9ec7ec;
    border-radius: 999px;
    white-space: nowrap;
    text-decoration: none;
    vertical-align: middle;
}
.link-map:hover { background: #d5e7f8; color: var(--brand-deep); text-decoration: none; }
.link-map i { color: var(--brand); }

/* 開設月ダイヤルは常に白いバッジの上に載せ、帯背景との配色干渉を避ける */
.season-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    border-radius: 8px;
    padding: 4px 9px 3px;
    line-height: 0;
    flex-shrink: 0;
}
.season-badge-caption {
    display: block;
    line-height: normal;
    font-size: 9px;
    font-weight: 600;
    color: var(--brand-mid);
    margin-top: 1px;
    white-space: nowrap;
}
.season-dial-ring { fill: none; stroke: var(--border); stroke-width: 1.4; }
.season-dial-dot { fill: #fff; stroke: var(--border-dark); stroke-width: 1.2; }
.season-dial-dot.is-open { fill: var(--brand); stroke: var(--brand-deep); }
.season-dial-alt { font-size: 14px; fill: var(--text-dark); font-weight: 700; }
.season-dial-unit { font-size: 7px; fill: var(--text-mid); }

/* 設備＝チェックリスト層。ラベル＋色分けピルで文章を読まずに可否が判別できるようにする */
.equipment-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    background: var(--mist);
}
.equipment-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.equipment-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 6px;
    background: #fff;
    text-align: center;
}
.equipment-label {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: nowrap;
}
.equipment-label i { color: var(--brand-mid); font-size: 14px; }
.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 12px;
    flex-shrink: 0;
}
.status-pill--yes { background: var(--brand); color: #fff; border: 1px solid var(--brand); }
.status-pill--no { background: #f1f1ee; color: #999; border: 1px solid #d8d8d2; }
.status-pill--unknown { background: transparent; color: var(--text-light); border: 1px dashed #cfcfc8; }

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.btn-external-link,
.btn-external-link:visited {
    display: inline-block;
    padding: 0 20px;
    height: 36px;
    line-height: 36px;
    background: var(--cta);
    color: #fff;
    border-radius: 4px;
    font-size: 14px;
    text-decoration: none;
}
.btn-external-link:hover { background: var(--cta-hover); color: #fff; text-decoration: none; }

/* タイトル直下に置く公式サイトボタン。カードで囲わず、右寄せで単体で目立たせる */
.btn-external-link--top {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    margin: 2px 0 18px auto;
}

/* 詳細ページ最下部の公式サイト導線（中央寄せ） */
.detail-bottom-actions { display: flex; justify-content: center; margin: 4px 0 8px; }
.detail-bottom-actions .btn-external-link { display: inline-flex; align-items: center; gap: 8px; }

.nearby-divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
.nearby-temples h3 { font-family: 'Noto Serif JP', serif; margin-bottom: 8px; }

/* ===== 施設一覧カード ===== */

.temple-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    padding: 16px 0;
}
.temple-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid var(--border);
    border-left: 3px solid var(--border);
    border-radius: 0 4px 4px 0;
    padding: 20px 12px;
    transition: box-shadow 0.2s;
}
.temple-list-item:hover { box-shadow: 0 2px 8px rgba(79, 38, 117, 0.18); text-decoration: none; }

.temple-list-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }

.temple-list-body { flex: 1; min-width: 0; }
.temple-list-name {
    font-family: 'EllipsisLatin', 'Noto Sans JP', Tahoma, Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    display: block;
    color: var(--brand-mid);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.temple-list-item:hover .temple-list-name { color: var(--brand-deep); text-decoration: underline; }
.temple-list-address {
    font-family: 'EllipsisLatin', 'Noto Sans JP', Tahoma, Arial, sans-serif;
    display: block;
    font-size: 12px;
    color: var(--text-mid);
    line-height: 1.6;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* ===== バッジ ===== */

.temple-badges { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 5px; }
.temple-badges--detail { margin-top: 0; margin-bottom: 16px; gap: 6px; }
.temple-badges--detail .temple-badge { font-size: 12px; padding: 4px 9px; }
.temple-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    line-height: 1;
    padding: 2px 5px;
    border-radius: 2px;
    background: var(--mist);
    color: var(--text-mid);
    border: 1px solid var(--border);
    white-space: nowrap;
}
.temple-badge i { font-size: 9px; }

/* 別格二十霊場は八十八ヶ所と番号が1〜20/1〜88で重複するため、地図ピン(myicon_num)と
   同じ琥珀色でバッジも塗り分け、一覧・詳細どちらでも一目で区別できるようにする */
.temple-badge--bekkaku {
    background: #FFF3D9;
    color: #8A5A00;
    border-color: #E6B84D;
}

/* ===== ページネーション ===== */

.temple-pagination { padding: 20px 0 8px; text-align: center; }
.temple-pagination-page-count { display: none; }
.temple-pagination-info { font-size: 12px; color: var(--text-mid); margin-bottom: 10px; }
.temple-pagination-list { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; }
.temple-pagination-list li a,
.temple-pagination-list li span {
    display: inline-block;
    padding: 6px 12px;
    font-size: 13px;
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--brand-mid);
    background: #fff;
    text-decoration: none;
    transition: background 0.15s;
}
.temple-pagination-list li a:hover { background: var(--mist); color: var(--brand-deep); }
.temple-pagination-list li.active span { background: var(--brand); border-color: var(--brand); color: #fff; }
.temple-pagination-list li.disabled span { color: var(--text-light); background: #fafaf8; }
.temple-pagination-list li.dots span { border: none; background: none; color: var(--text-light); }

/* ===== エリア/都道府県/市区町村 サイドリスト ===== */

.content-with-aside { display: flex; gap: 20px; align-items: flex-start; }
.content-with-aside__main { flex: 1; min-width: 0; }

.area-pref-list { flex: 0 0 180px; font-size: 14px; }
.area-pref-title {
    appearance: none;
    border: none;
    background: none;
    padding: 0;
    font: inherit;
    cursor: default;
    text-align: left;
    font-weight: 700;
    display: block;
    margin-bottom: 6px;
    color: var(--text-dark);
}
.area-pref-list ul { list-style: none; line-height: 2; }
.area-pref-list ul li a { color: var(--link); }
.area-pref-list ul li a.active { color: var(--link-hover); font-weight: 700; }

/* ===== フッター ===== */

/* 旧サイトのフッター構成（帯地 + foot_bg.jpg、白リンク、アクセント#FFCC00）を踏襲。地色は紫に差し替え。
   本文との境目に太いアクセント線を入れ、フッターの開始位置を明確にする */
#footer {
    color: rgba(255, 255, 255, 0.85);
    background: var(--brand) url('/img/foot_bg.jpg') repeat-x top left;
    border-top: 4px solid var(--sun);
}

.footer-area a { color: rgba(255, 255, 255, 0.85); text-decoration: none; }
.footer-area a:hover { color: var(--sun); text-decoration: underline; }
.footer-area-heading {
    font-family: 'Noto Serif JP', serif;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}
.footer-area ul { list-style: none; margin-top: 5px; }
.footer-area ul li { display: inline-block; white-space: nowrap; font-size: 12px; margin: 3px 6px 3px 0; }

/* ===== 補助ゾーン（札所一覧・姉妹サイト）：背景を一段濃くして上の主要導線とゾーンを分ける ===== */

.footer-secondary {
    background: var(--brand-deep);
    padding: 22px 20px;
}

/* 札所一覧（八十八ヶ所・別格の番号リンク。108件を常時表示すると footer が間延びするため折りたたみ） */

#foot_temple_list { margin: 0 0 16px; }
#foot_temple_list summary {
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 6px;
    list-style: none;
}
#foot_temple_list summary::-webkit-details-marker { display: none; }
#foot_temple_list summary::before {
    content: '\25b8';
    display: inline-block;
    margin-right: 8px;
    color: var(--sun);
    transition: transform 0.15s;
}
#foot_temple_list[open] summary::before { transform: rotate(90deg); }
#foot_temple_list summary:hover { background: rgba(255, 255, 255, 0.2); border-color: var(--sun); }
#foot_temple_list nav { padding: 18px 6px 0; }
.footer-area--temples { margin-bottom: 16px; }
.footer-area--temples:last-child { margin-bottom: 0; }
.footer-area--temples .footer-area-heading { color: var(--sun-soft); }

/* 全国MAPサイトシリーズ */

#map_site_links {
    margin: 0;
    background-color: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 8px;
    padding: 16px 20px;
}
#map_site_links h3 {
    margin: 0;
    font-family: 'Noto Serif JP', serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--sun-soft);
}
#map_site_links ul { list-style: none; margin: 6px 0 0; padding: 0; }
#map_site_links ul li { display: inline-block; font-size: 12px; margin: 0 12px 4px 0; }
#map_site_links ul a { color: rgba(255, 255, 255, 0.8); text-decoration: none; }
#map_site_links ul a:hover { color: var(--sun); text-decoration: underline; }

#footer p {
    color: rgba(255, 255, 255, 0.75);
    padding: 14px 24px;
    font-size: 11px;
    line-height: 1.6;
    background: var(--brand-deep);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}
#footer p a { color: var(--sun-soft); text-decoration: underline; }
#footer p a:hover { color: #fff; }

/* ===== お問い合わせ・このサイトについて ===== */

dl#about dt {
    font-family: 'Noto Serif JP', serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--mist);
    border-left: 4px solid var(--brand);
    padding: 8px 12px;
    margin-bottom: 10px;
    margin-top: 20px;
}
dl#about dt:first-child { margin-top: 0; }
dl#about dd { margin-bottom: 24px; line-height: 1.7; color: var(--text-mid); }
dl#about dd p { margin: 0 0 8px 0; }

ul.about-badge-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 24px;
    margin-top: 12px;
}
ul.about-badge-list li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-mid); }

.form-honeypot { display: none; }

.form-required {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    background-color: #c0392b;
    padding: 1px 6px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
}

.form-char-count { font-size: 12px; color: #888; text-align: right; margin-top: 2px; }

.form-error { color: #f00; font-size: 0.85rem; margin-top: 4px; }
.form-error--notice {
    margin-bottom: 16px;
    padding: 10px 14px;
    background: #fff3cd;
    border: 1px solid #f0c040;
    border-radius: 4px;
    color: #856404;
    font-size: 14px;
}

.confirm-box { border: 1px solid var(--border); border-radius: 6px; overflow: hidden; margin: 16px 0 24px; }
.confirm-row { display: flex; border-bottom: 1px solid var(--border); }
.confirm-row:last-child { border-bottom: none; }
.confirm-label { font-weight: 600; width: 160px; flex-shrink: 0; padding: 14px 16px; background-color: rgba(0,0,0,0.04); }
.confirm-value { flex: 1; padding: 14px 16px; word-break: break-all; line-height: 1.7; background: #fff; }

/* フォーム入力欄（お問い合わせ・写真投稿。shiroと同じIDベースの指定） */
#mail,
#name,
#tel {
    width: 100%;
    height: 40px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Noto Sans JP', sans-serif;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}
#mail:focus,
#name:focus,
#tel:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(140, 70, 205, 0.15);
}

#txt {
    width: 100%;
    height: 200px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Noto Sans JP', sans-serif;
    box-sizing: border-box;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
}
#txt:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(140, 70, 205, 0.15);
}

/* 送信ボタン（お問い合わせ・写真投稿共通） */
#btn {
    display: block;
    margin: 20px auto 50px;
    width: 140px;
    height: 42px;
    background: linear-gradient(135deg, var(--brand-mid), var(--brand-deep));
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    font-family: 'Noto Sans JP', sans-serif;
    transition: filter 0.2s;
}
#btn:hover:not(:disabled) { filter: brightness(1.08); }
#btn:disabled { opacity: 0.6; cursor: not-allowed; }

#btn_2 {
    margin: 0;
    width: 80px;
    height: 36px;
    background: #fff;
    color: var(--text-dark);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-family: 'Noto Sans JP', sans-serif;
}

.confirm-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    margin: 20px 0 50px;
}
.confirm-actions #btn,
.confirm-actions #btn_2 { margin: 0; }

.thanks-actions { display: flex; justify-content: center; margin-top: 24px; }
.btn-back-top, .btn-back-top:visited {
    display: inline-block;
    width: 140px;
    height: 42px;
    line-height: 42px;
    text-align: center;
    background: var(--brand);
    color: #fff;
    border-radius: 4px;
    font-size: 15px;
    text-decoration: none;
}
.btn-back-top:hover { background: var(--brand-deep); color: #fff; text-decoration: none; }

/* ===== 都道府県別リンクリスト（カテゴリページ等） ===== */

#top-area-list {
    list-style: none;
    margin: 0;
    padding: 16px;
}
#top-area-list > li {
    margin-bottom: 15px;
    line-height: 1.8;
    border-left: 3px solid var(--link);
    padding-left: 10px;
}
#top-area-list > li:last-child { margin-bottom: 0; }

/* ===== カテゴリ絞り込みタブ ===== */

.category-tabs { margin-bottom: 16px; }
.category-tabs--in-box { margin-bottom: 0; padding: 14px 16px; }
.category-tabs ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.category-tab {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--link);
    font-size: 13px;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
a.category-tab:hover { background: var(--mist); color: var(--link-hover); text-decoration: none; }
.category-tab--active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }

/* ボックス内（トップ・カテゴリページ）は8カテゴリが箱幅いっぱいに揃う4列グリッドにする */
.category-tabs--in-box ul { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.category-tabs--in-box .category-tab {
    display: block;
    text-align: center;
    padding: 10px 8px;
    border-radius: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* line_head右側の補助リンク */
.line_head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.line-head-link { margin: 0; font-size: 13px; }

/* ===== FAQ（トップページ） ===== */

.faq-section { padding: 14px 16px; }
.faq-section details {
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-bottom: 8px;
    background: #fff;
}
.faq-section summary {
    padding: 12px 14px;
    font-weight: 600;
    color: var(--brand-deep);
    cursor: pointer;
}
.faq-section summary:hover { background: var(--mist); }
.faq-section details[open] summary { border-bottom: 1px solid var(--border); }
.faq-section details p { margin: 0; padding: 12px 14px; color: var(--text-mid); line-height: 1.8; }

/* ===== pcam: 写真投稿フォーム（shiroより移植、変数名をpcamの配色に合わせて置換） ===== */
.form-required-note {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--text-mid);
}

.upload-notes {
    margin: 0 0 20px;
    padding-left: 20px;
    color: var(--text-dark);
    font-size: 13px;
    line-height: 1.7;
}

.upload-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.upload-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 28px 16px;
    background: var(--mist);
    border: 2px dashed var(--brand-mid);
    border-radius: 10px;
    color: var(--brand-deep);
    text-align: center;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.upload-dropzone i {
    font-size: 28px;
    color: var(--brand);
}

.upload-dropzone-text {
    font-size: 14px;
    font-weight: 700;
}

.upload-dropzone-note {
    font-size: 12px;
    color: var(--text-mid);
}

.upload-dropzone:hover,
.upload-dropzone--dragover {
    background: #fff;
    border-color: var(--brand);
}

.upload-dropzone--filled {
    border-style: solid;
    background: #fff;
}

#upload-preview {
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

#upload-preview li {
    position: relative;
    width: 72px;
    height: 72px;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
}

#upload-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-preview-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    padding: 0;
    line-height: 1;
    border: none;
    border-radius: 50%;
    background: rgba(9, 40, 75, 0.75);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}

.upload-preview-remove:hover {
    background: var(--brand);
}

/* 写真投稿：送信前の確認モーダル */
.upload-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(9, 40, 75, 0.6);
}

.upload-modal-box {
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
    background: #fff;
    border-radius: 10px;
    border-top: 4px solid var(--brand);
}

.upload-modal-title {
    margin: 0 0 16px;
    font-family: 'Noto Serif JP', serif;
    font-size: 17px;
    color: var(--brand-deep);
}

.upload-modal-summary {
    margin: 0 0 12px;
}

.upload-modal-summary dt {
    font-size: 12px;
    color: var(--text-mid);
    margin-top: 8px;
}

.upload-modal-summary dt:first-child {
    margin-top: 0;
}

.upload-modal-summary dd {
    margin: 2px 0 0;
    font-size: 14px;
    color: var(--text-dark);
    word-break: break-all;
}

.upload-modal-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 20px;
    padding: 0;
    list-style: none;
}

.upload-modal-thumbs li {
    width: 56px;
    height: 56px;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.upload-modal-thumbs img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.upload-modal-btn {
    padding: 12px;
    border-radius: 4px;
    border: none;
    font-size: 14px;
    font-family: 'Noto Sans JP', sans-serif;
    cursor: pointer;
}

.upload-modal-btn--send {
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
    color: #fff;
    order: -1;
}

.upload-modal-btn--send:hover {
    filter: brightness(1.08);
}

.upload-modal-btn--cancel {
    background: var(--mist);
    color: var(--text-dark);
}

.upload-modal-btn--cancel:hover {
    background: var(--border);
}

/* ===== ohenro: トップページ都道府県カード ===== */

.top-pref-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    padding: 16px;
}
.top-pref-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 18px 10px;
    background: var(--mist);
    border: 1px solid var(--border);
    border-radius: 6px;
    text-align: center;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.top-pref-item:hover {
    text-decoration: none;
    border-color: var(--border-dark);
    box-shadow: 0 2px 8px rgba(79, 38, 117, 0.18);
}
.top-pref-name {
    font-family: 'Noto Serif JP', serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
}
.top-pref-dojo { font-size: 12px; color: var(--link); }
.top-pref-count { font-size: 12px; color: var(--text-mid); }
.top-all-link { padding: 0 16px 16px; margin: 0; }

/* ===== ohenro: 霊場セクション ===== */

.holy-place-section { margin-bottom: 24px; }
.holy-place-heading {
    font-family: 'Noto Serif JP', serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
    border-left: 4px solid var(--brand);
    background: var(--mist);
    padding: 8px 12px;
    margin-bottom: 12px;
}

.content-heading-note {
    margin-left: 10px;
    font-size: 13px;
    font-weight: 400;
    color: var(--text-mid);
}
.pref-dojo { font-size: 11px; color: var(--text-light); }

.temple-badge--heading {
    display: inline-block;
    margin-right: 8px;
    vertical-align: middle;
}

/* ===== ohenro: 巡礼順の前後の札所ナビ ===== */

.temple-prev-next {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
}
.temple-prev-next__link {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    background: var(--mist);
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.temple-prev-next__link:hover {
    text-decoration: none;
    border-color: var(--border-dark);
    box-shadow: 0 2px 8px rgba(79, 38, 117, 0.18);
}
.temple-prev-next__link--next { text-align: right; }
.temple-prev-next__label { font-size: 11px; color: var(--text-mid); }
.temple-prev-next__name {
    font-size: 13px;
    font-weight: 500;
    color: var(--link);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.temple-prev-next__spacer { flex: 1; }
