/* 法泉寺 第1段階（Wixと同じ中身）用の見た目 — 寺の自前の部品。Wixのデザインは使っていない
   ・スマホ1列が基本。パソコンでも読みやすい幅で中央に
   ・書体は端末に入っているもの（ダウンロード0） */
:root { --sumi: #1c1a17; --gofun: #fbfaf8; --ishi: #eeebe6; --shu: #b7282e; --hai: #6b665f; --kai: #dcd6cd; --ai: #2d5174; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0; padding-bottom: 60px; background: var(--gofun); color: var(--sumi);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "BIZ UDPGothic", "Yu Gothic", "Meiryo", sans-serif;
  font-size: 16px; line-height: 1.9; letter-spacing: .03em; overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ai); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 8px; top: 8px; z-index: 100; padding: 8px 14px; background: var(--sumi); color: #fff; border: 0; }

/* ヘッダー */
.hdr { position: sticky; top: 0; z-index: 50; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-height: 60px; padding: 8px 60px 8px 12px; background: #fff; border-bottom: 1px solid var(--kai); }
.hdr > a.card img, .hdr a.card:first-of-type img { height: 44px; width: auto; }
.hdr .card { display: inline-flex; }
.hdr img { max-height: 44px; width: auto; }
.menu-btn { position: absolute; right: 6px; top: 8px; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; }
.menu-btn i, .menu-btn i::before, .menu-btn i::after { position: absolute; left: 11px; width: 22px; height: 2px; background: var(--sumi); content: ""; }
.menu-btn i { top: 21px; }
.menu-btn i::before { left: 0; top: -7px; }
.menu-btn i::after { left: 0; top: 7px; }
.menu { position: fixed; inset: 60px 0 0; z-index: 49; overflow-y: auto; padding: 8px 16px 90px; background: #fff; isolation: isolate; }
.menu > img:first-child { position: fixed; inset: 60px 0 0; z-index: -1; width: 100%; height: calc(100% - 60px); max-height: none; object-fit: cover; opacity: .18; }   /* Wixのメニューの背景画像：同じ画像を背景として薄く */
.menu ul li a img { display: inline-block; width: 26px; height: 26px; }
.menu[hidden] { display: none; }
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu li { border-bottom: 1px solid var(--kai); }
.menu li p { margin: 0; }
.menu a { display: block; padding: 11px 4px; color: var(--sumi); text-decoration: none; }
.menu ul ul { padding-left: 18px; border-top: 1px solid var(--kai); }
.menu ul ul li:last-child { border-bottom: 0; }
html.menu-open { overflow: hidden; }

/* 本文 */
main { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.strip { padding: 26px 0; border-bottom: 1px solid var(--kai); }
.strip:last-child { border-bottom: 0; }
.rt { margin: 6px 0; }
.rt p, main > p { margin: 0 0 .35em; }
h1, h2, h3, h4, h5, h6 { margin: .7em 0 .35em; font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif; font-weight: 700; line-height: 1.5; letter-spacing: .06em; }
h1 { font-size: 26px; } h2 { font-size: 22px; } h3 { font-size: 19px; } h4 { font-size: 17px; } h5, h6 { font-size: 16px; }
h1.long { font-size: 20px; }
h2.long, h3.long, h4.long, h5.long, h6.long { font-family: inherit; font-size: 16px; line-height: 1.9; letter-spacing: .03em; }
main img.wide { width: 100%; }
.vertical { writing-mode: vertical-rl; max-height: 460px; margin: 10px auto; }
.vertical p { margin: 0 0 0 .4em; }
.btn { display: flex; align-items: center; justify-content: center; min-height: 48px; margin: 12px 0; padding: 8px 16px; border-radius: 4px; background: var(--ai); color: #fff; text-align: center; text-decoration: none; }
.card { display: block; color: inherit; text-decoration: none; }
main img { margin: 12px auto; border-radius: 2px; }
.embed { margin: 14px 0; }
.embed iframe { display: block; width: 100%; min-height: 460px; border: 0; background: #fff; }
ul, ol { padding-left: 1.4em; }
/* Wixのボタン（ボタンの台帳どおり。ChatGPT 3回目 G01・G08：中身を隠さない）
   ・押すと移動するもの（data-go＝同じページ、data-href＝別のページ）は青いボタン
   ・Wixでも押せないもの（受付停止のフォームなど）は押せない形のボタン
   ・Wixでも押して何も起きないものは、押せる形にせず文字の札（.wlabel）として見せる */
.wbtn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; margin: 12px 0; padding: 8px 16px; border: 0; border-radius: 4px; background: var(--ai); color: #fff; font: inherit; cursor: pointer; }
.wbtn[disabled] { background: var(--ishi); color: var(--hai); cursor: not-allowed; }
.wlabel { display: inline-block; margin: 6px 6px 6px 0; padding: 3px 12px; border: 1px solid var(--kai); border-radius: 4px; background: #fff; color: var(--sumi); font-size: 15px; line-height: 1.7; }
/* ページ内の移動先の目印。固定の見出し（高さ約60px）に隠れない余白は html の scroll-padding-top（72px）だけで取る
   （目印側にも付けると二重になり144px下がる＝2026-10-01 の検査で発見） */
.anchor { display: block; height: 0; }
/* 受付を停止中のフォームの案内（住職の文言） */
.notice { margin: 12px 0; padding: 12px 14px; border: 2px solid var(--shu); border-radius: 4px; background: #fff; color: var(--shu); font-weight: 700; text-align: center; }
/* ギャラリーの写真の拡大表示（Wixのギャラリーと同じ働き。寺の自前の部品） */
img[data-zoom] { cursor: zoom-in; }
img[data-zoom]:focus-visible { outline: 3px solid var(--ai); outline-offset: 2px; }
.zoom { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: rgba(20, 18, 16, .92); }
.zoom[hidden] { display: none; }
.zoom-f { margin: 0; max-width: calc(100vw - 24px); max-height: calc(100vh - 110px); display: flex; align-items: center; justify-content: center; }
.zoom-f img, .zoom-f video { display: block; max-width: calc(100vw - 24px); max-height: calc(100vh - 110px); width: auto; height: auto; margin: 0; border-radius: 0; background: #000; }
.zoom button { position: absolute; border: 0; background: rgba(255, 255, 255, .14); color: #fff; font: 32px/1 sans-serif; width: 48px; height: 48px; border-radius: 24px; cursor: pointer; }
.zoom button:focus-visible { outline: 3px solid #fff; }
.zoom-x { top: 12px; right: 12px; }
.zoom-p { left: 8px; top: 50%; transform: translateY(-50%); }
.zoom-n { right: 8px; top: 50%; transform: translateY(-50%); }
.zoom button[hidden] { display: none; }
.zoom-c { position: absolute; bottom: 14px; left: 0; right: 0; margin: 0; color: #fff; text-align: center; font-size: 14px; }
html.zoom-open { overflow: hidden; }

/* スライド表示のギャラリー（Wixと同じく1枚ずつ。枠の縦横はWixで測った大きさ。矢印・指で送る） */
.slides { position: relative; margin: 12px 0; overflow: hidden; background: #2b2a28; }
.slides > img { margin: 0; border-radius: 0; width: 100%; }
.slides[style*="aspect-ratio"] > img { position: absolute; inset: 0; height: 100%; object-fit: cover; }
.slides[data-fit="contain"] > img { object-fit: contain; }
.slides > img.sl-off { display: none; }
.sl-p, .sl-n { position: absolute; top: 50%; z-index: 2; width: 44px; height: 44px; margin-top: -22px; border: 0; border-radius: 22px; background: rgba(0, 0, 0, .38); cursor: pointer; }
.sl-p { left: 6px; }
.sl-n { right: 6px; }
.sl-p::before, .sl-n::before { content: ""; position: absolute; top: 15px; width: 12px; height: 12px; border: solid #fff; border-width: 0 0 3px 3px; }
.sl-p::before { left: 17px; transform: rotate(45deg); }
.sl-n::before { left: 13px; transform: rotate(-135deg); }
.sl-p:focus-visible, .sl-n:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }
.slides button[hidden] { display: none; }
.sl-count { margin: 4px 0 10px; text-align: right; color: var(--hai); font-size: 14px; }

/* /tomb/ikotsu-azukari の「ご利用の流れ」：ページの中身の並び（Googleが読む順）では見出しが手順の後ろにあるが、Wixでは見出しが手順の上に見える。
   並び順は変えず、表示の順だけ見出しを上に（2026-10-03。移動リンクの目印は見出しの直前） */
main section.strip:has(#anchors-mef97z89) { display: flex; flex-direction: column; }
main section.strip:has(#anchors-mef97z89) > .rt:has(#anchors-mef97z89) { order: -1; }

/* トップの最初の写真（自動で送るスライド）の上に、見出し・案内・2つのボタンを重ねる（Wixと同じく、最初の画面に「樹木葬の詳細」「ご相談」の
   入口が入る。2026-10-03 ChatGPT 5回目 I07）。ページの中の順番・文字・リンクは変えない（見た目だけ）。:has() が使えない古いブラウザでは今までどおり縦に並ぶ */
main > section.strip:first-child:has(> .slides[data-auto]) { position: relative; margin: 0 -16px; padding: 20px 16px 16px; min-height: 300px; border-bottom: 0; color: #fff; text-align: center; }
main > section.strip:first-child:has(> .slides[data-auto]) > .slides { position: absolute; inset: 0; margin: 0; aspect-ratio: auto !important; }
main > section.strip:first-child:has(> .slides[data-auto]) > .slides::after { content: ""; position: absolute; inset: 0; background: rgba(20, 18, 16, .46); pointer-events: none; }
main > section.strip:first-child:has(> .slides[data-auto]) > :not(.slides) { position: relative; z-index: 1; }
main > section.strip:first-child:has(> .slides[data-auto]) > .rt { padding: 0 22px; }
main > section.strip:first-child:has(> .slides[data-auto]) h1 { margin: 0 0 10px; font-size: 27px; line-height: 1.45; letter-spacing: .02em; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .7); }
main > section.strip:first-child:has(> .slides[data-auto]) h1::first-line { font-size: 16px; color: #ffe27a; }
main > section.strip:first-child:has(> .slides[data-auto]) .rt p { font-size: 14.5px; line-height: 1.7; text-shadow: 0 1px 2px rgba(0, 0, 0, .7); }
main > section.strip:first-child:has(> .slides[data-auto]) > .rt:nth-of-type(4) p { text-align: right; font-size: 12px; opacity: .85; }
main > section.strip:first-child:has(> .slides[data-auto]) > a.btn { display: inline-flex; width: calc(50% - 5px); margin: 12px 0 0; min-height: 44px; padding: 4px 6px; border-radius: 22px; background: rgba(255, 255, 255, .96); color: var(--ai); font-size: 13px; font-weight: 700; letter-spacing: 0; white-space: nowrap; }
main > section.strip:first-child:has(> .slides[data-auto]) > a.btn + a.btn { margin-left: 10px; }
main > section.strip:first-child:has(> .slides[data-auto]) .sl-p, main > section.strip:first-child:has(> .slides[data-auto]) .sl-n { width: 30px; height: 30px; margin-top: -15px; }
main > section.strip:first-child:has(> .slides[data-auto]) .sl-p::before, main > section.strip:first-child:has(> .slides[data-auto]) .sl-n::before { top: 9px; width: 9px; height: 9px; border-width: 0 0 2px 2px; }
main > section.strip:first-child:has(> .slides[data-auto]) .sl-p::before { left: 12px; }
main > section.strip:first-child:has(> .slides[data-auto]) .sl-n::before { left: 9px; }

/* ページの先頭へ戻るボタン（Wixの右下の丸いボタンと同じ働き） */
.to-top { position: fixed; right: 14px; bottom: 72px; z-index: 55; width: 44px; height: 44px; border: 1px solid var(--kai); border-radius: 22px; background: rgba(255, 255, 255, .92); box-shadow: 0 2px 8px rgba(0, 0, 0, .15); cursor: pointer; }
.to-top::before { content: ""; position: absolute; left: 15px; top: 18px; width: 12px; height: 12px; border: solid var(--ai); border-width: 3px 3px 0 0; transform: rotate(-45deg); }
.to-top[hidden] { display: none; }
html.menu-open .to-top, html.zoom-open .to-top { display: none; }

/* メニューの下の階層の開け閉め（Wixと同じく▼で開く） */
.menu li.has-sub { position: relative; }
.menu li.has-sub > p, .menu li.has-sub > a { padding-right: 48px; }
.sub-t { position: absolute; right: 0; top: 2px; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; }
.sub-t::before { content: ""; position: absolute; left: 16px; top: 14px; width: 10px; height: 10px; border: solid var(--sumi); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .15s; }
.sub-t[aria-expanded="true"]::before { top: 19px; transform: rotate(-135deg); }
.menu ul ul[hidden] { display: none; }
.menu .sub-label { padding: 11px 48px 11px 4px; cursor: pointer; }

/* チェック欄・入力欄の名前：1つずつ行を分ける（Wixと同じく縦に並ぶ。例：/tomb/ihaibo「こんな方にお勧めです」） */
main label { display: block; margin: 8px 0; }
main input[type="checkbox"] { width: 20px; height: 20px; margin: 0 8px 0 0; vertical-align: -4px; }

/* サイト内検索（/search） */
.wsearch input[type="search"] { width: 100%; min-height: 46px; padding: 8px 12px; border: 1px solid var(--kai); border-radius: 4px; font: inherit; background: #fff; }
.sresults h2 { font-size: 18px; }
.sresults ul { list-style: none; padding: 0; }
.sresults li { padding: 10px 0; border-bottom: 1px solid var(--kai); }
.sresults li p { margin: 2px 0 0; color: var(--hai); font-size: 14px; }
.search-default[hidden] { display: none; }

/* 寺の動画（Wixの動画プレーヤーの置き換え） */
.video { margin: 14px 0; }
.video video { display: block; width: 100%; height: auto; background: #000; }

/* フッター */
footer { margin-top: 30px; padding: 26px 16px 34px; background: var(--ishi); font-size: 14px; }
footer > * { max-width: 760px; margin-left: auto; margin-right: auto; }
footer img { max-height: 48px; width: auto; }

/* 画面の下の連絡の帯（Wixのスマホ版と同じ4つ） */
.qab { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--sumi); }
.qab a { display: flex; align-items: center; justify-content: center; min-height: 54px; margin: 0; padding: 4px 2px; color: #fff; font-size: 12.5px; letter-spacing: 0; white-space: nowrap; overflow-wrap: normal; text-decoration: none; border-left: 1px solid rgba(255, 255, 255, .14); }
.qab a p { margin: 0; }
.qab a:first-child { border-left: 0; background: var(--shu); }

@media (min-width: 900px) {
  body { font-size: 16.5px; }
  .hdr { padding-left: max(16px, calc((100% - 1100px) / 2)); }
  .qab { left: auto; right: 16px; bottom: 16px; width: 440px; border-radius: 6px; overflow: hidden; box-shadow: 0 6px 24px rgba(0, 0, 0, .18); }
}
