/* 公開サイト（団体ごとの見た目）。プロトタイプの同じ節をそのまま移したもの。編集用の .blk-btn・.addrow・.hidlbl・.is-hidden は admin.css へ。 */
body { margin: 0; }
/* overflow: clip … 拡大した写真（transform で大きくして枠で切り抜く）が、サイトの中にスクロールできる余白を作らないように。clip が使えない古いブラウザは hidden */
.site { --latin: "Cormorant Garamond", Georgia, serif; container-type: inline-size; position: relative; background: var(--s-bg); color: var(--s-fg); font-family: var(--s-body); font-size: 15px; line-height: 1.95; text-align: left; overflow: hidden; overflow: clip; }
.site[data-pal="p1"] { --s-bg: #ffffff; --s-fg: #24272c; --s-accent: #8a6d3b; --s-soft: #f5f2ec; --s-on: #ffffff; }
.site[data-pal="p2"] { --s-bg: #14171e; --s-fg: #f1ede6; --s-accent: #c9a86a; --s-soft: #1e222b; --s-on: #14171e; }
.site[data-pal="p3"] { --s-bg: #f7f8f4; --s-fg: #25302a; --s-accent: #4f7a5d; --s-soft: #e8eee5; --s-on: #ffffff; }
.site[data-pal="p4"] { --s-bg: #fdf8f7; --s-fg: #3a2a2e; --s-accent: #b0566f; --s-soft: #f7e8ea; --s-on: #ffffff; }
.site[data-pal="p5"] { --s-bg: #f5f7fa; --s-fg: #1c2a44; --s-accent: #2f4f8f; --s-soft: #e5eaf3; --s-on: #ffffff; }
.site[data-font="f1"] { --s-head: "Shippori Mincho", "Yu Mincho", "Hiragino Mincho ProN", serif; --s-body: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif; --s-hw: 500; }
.site[data-font="f2"] { --s-head: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif; --s-body: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif; --s-hw: 700; }
.site[data-font="f3"] { --s-head: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", sans-serif; --s-body: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", sans-serif; --s-hw: 500; }
.site h1, .site h2, .site h3 { font-family: var(--s-head); font-weight: var(--s-hw); margin: 0; line-height: 1.4; text-wrap: balance; word-break: auto-phrase; }
.site p { margin: 0; white-space: pre-line; }
.site img { display: block; max-width: 100%; }
.site [contenteditable]:hover, .site.edit img[data-p]:hover, .site.edit .ph:hover { outline: 2px dashed var(--s-accent); outline-offset: 3px; cursor: pointer; }
.site [contenteditable]:focus { outline: 2px solid var(--s-accent); outline-offset: 3px; cursor: text; }
.s-head { display: flex; align-items: center; justify-content: space-between; padding: 4.5cqw 6cqw; }
.s-logo { font-family: var(--s-head); font-weight: var(--s-hw); font-size: 14px; letter-spacing: .12em; }
.eyebrow { font-family: var(--latin); font-size: 13px; letter-spacing: .28em; color: var(--s-accent); font-variant-numeric: lining-nums; }
.blk { position: relative; }
.sec { padding: 13cqw 6cqw; display: flex; flex-direction: column; gap: 6cqw; }
.sec-h { display: flex; flex-direction: column; gap: 1cqw; }
.sec-h h2 { font-size: 23px; letter-spacing: .06em; }
.b-news, .b-join { background: var(--s-soft); }
.s-btn { align-self: flex-start; display: inline-block; padding: 12px 30px; border: 1px solid var(--s-accent); color: var(--s-accent); font-size: 14px; letter-spacing: .12em; }
.s-btn.fill { background: var(--s-accent); color: var(--s-on); }
.s-foot { padding: 9cqw 6cqw; text-align: center; font-size: 12px; letter-spacing: .1em; border-top: 1px solid var(--s-soft); opacity: .8; }

/* ヒーロー：テンプレートごとに骨組みを変える */
.hero-ph img { object-fit: cover; }
.hero h1 { font-size: clamp(4.3cqw, calc(var(--hw, 76cqw) / var(--n, 10)), var(--hmax, 8.6cqw)); letter-spacing: .05em; }
.hero .sub { font-size: 14px; margin-top: 3cqw; letter-spacing: .08em; }
.hero-tx { display: flex; flex-direction: column; }
/* t1 全面写真 */
[data-tpl="t1"] .s-head { position: absolute; inset: 0 0 auto; z-index: 3; color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.4); }
[data-tpl="t1"] .hero { min-height: 150cqw; display: flex; align-items: flex-end; color: #fff; }
[data-tpl="t1"] .hero-ph { position: absolute; inset: 0; }
[data-tpl="t1"] .hero-ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.28), rgba(0,0,0,0) 30%, rgba(0,0,0,0) 45%, rgba(0,0,0,.6)); pointer-events: none; }
[data-tpl="t1"] .hero-ph img { width: 100%; height: 100%; } [data-tpl="t1"] .hero-ph img + img { display: none; }
[data-tpl="t1"] .hero-tx { position: relative; padding: 0 7cqw 11cqw; pointer-events: none; } [data-tpl="t1"] .hero-tx > * { pointer-events: auto; }
[data-tpl="t1"] .hero .eyebrow { color: #fff; opacity: .9; }
[data-tpl="t1"] .sec-h h2::after { content: ""; display: block; width: 40px; height: 1px; background: var(--s-accent); margin-top: 3cqw; }
/* t2 余白 */
[data-tpl="t2"] .s-head { justify-content: center; }
[data-tpl="t2"] .hero { display: flex; flex-direction: column-reverse; padding: 9cqw 9cqw 4cqw; text-align: center; gap: 9cqw; }
[data-tpl="t2"] .hero-ph img { width: 100%; aspect-ratio: 4 / 5; } [data-tpl="t2"] .hero-ph img + img { display: none; }
[data-tpl="t2"] .hero h1 { --hmax: 7.4cqw; --hw: 62cqw; letter-spacing: .14em; line-height: 1.7; }
[data-tpl="t2"] .sec { padding: 16cqw 9cqw; } [data-tpl="t2"] .sec-h { text-align: center; align-items: center; } [data-tpl="t2"] .sec-h h2 { letter-spacing: .16em; font-size: 20px; }
/* t3 コラージュ */
[data-tpl="t3"] .hero-ph { display: grid; grid-template-columns: 1.45fr 1fr; grid-template-rows: 1fr 1fr; gap: 1.6cqw; padding: 0 1.6cqw; height: 112cqw; }
[data-tpl="t3"] .hero-ph img { width: 100%; height: 100%; min-height: 0; } [data-tpl="t3"] .hero-ph img:first-child { grid-row: 1 / 3; }
[data-tpl="t3"] .hero h1 { --hw: 64cqw; }
[data-tpl="t3"] .hero-tx { position: relative; background: var(--s-bg); margin: -13cqw 6cqw 0; padding: 7cqw 6cqw 8cqw; border-top: 2px solid var(--s-accent); }
[data-tpl="t3"] .sec-h { border-left: 2px solid var(--s-accent); padding-left: 4cqw; }
/* t4 色の面 */
[data-tpl="t4"] .s-head { background: var(--s-accent); color: var(--s-on); }
[data-tpl="t4"] .hero { background: var(--s-accent); color: var(--s-on); padding-bottom: 10cqw; }
[data-tpl="t4"] .hero-ph img { width: 84%; margin-left: 16%; aspect-ratio: 1; } [data-tpl="t4"] .hero-ph img + img { display: none; }
[data-tpl="t4"] .hero-tx { position: relative; margin-top: -10cqw; padding: 0 7cqw; pointer-events: none; } [data-tpl="t4"] .hero-tx > * { pointer-events: auto; }
[data-tpl="t4"] .hero h1 { --hmax: 11cqw; --hw: 76cqw; line-height: 1.25; text-shadow: 0 2px 18px rgba(0,0,0,.3); }
[data-tpl="t4"] .hero .eyebrow { color: var(--s-on); }
[data-tpl="t4"] .sec-h h2 { font-size: 28px; }
/* t5 フィルム */
[data-tpl="t5"] .hero { display: flex; flex-direction: column-reverse; padding: 6cqw 0 4cqw; gap: 7cqw; }
[data-tpl="t5"] .hero-tx { padding: 0 6cqw; }
/* 横にめくる箱の写真の枠（render.mjs の framed）。拡大した写真を枠で切り、箱のスクロールの範囲を伸ばさない。大きさとめくりの止まる位置は枠が持つ */
.ph { display: block; overflow: hidden; overflow: clip; }
.ph img { width: 100%; height: 100%; object-fit: cover; }
/* overflow-y: hidden … 横にめくる箱が縦にも動いてしまわないように（下の .v-scroll .gal も同じ） */
[data-tpl="t5"] .hero-ph { display: flex; gap: 3cqw; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; padding: 0 6cqw; scrollbar-width: none; }
[data-tpl="t5"] .hero-ph .ph { flex: 0 0 66cqw; width: 66cqw; aspect-ratio: 3 / 4; scroll-snap-align: center; }
[data-tpl="t5"] .sec-h { flex-direction: row; align-items: baseline; gap: 3cqw; flex-wrap: wrap; }

/* 各ブロック */
.about-in { display: flex; flex-direction: column; gap: 6cqw; }
.about-in img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.v-right .about-in { flex-direction: column-reverse; }
.v-left .about-in img { width: 64%; aspect-ratio: 3 / 4; }
.nlist { display: flex; flex-direction: column; }
.nlist div { display: flex; gap: 4cqw; padding: 3.6cqw 0; border-bottom: 1px solid color-mix(in srgb, var(--s-fg) 16%, transparent); align-items: baseline; }
.nlist time { font-family: var(--latin); font-size: 15px; letter-spacing: .06em; font-variant-numeric: lining-nums; white-space: nowrap; color: var(--s-accent); }
.nlist span { min-width: 0; } .nlist em { font-style: normal; font-size: 11px; border: 1px solid currentColor; padding: 0 6px; margin-left: 6px; white-space: nowrap; opacity: .7; }
.gal { display: grid; grid-template-columns: 1fr 1fr; gap: 2cqw; }
.gal img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.v-mosaic .gal img:first-child { grid-column: 1 / 3; aspect-ratio: 16 / 10; }
.v-scroll .gal { display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; margin: 0 -6cqw; padding: 0 6cqw; scrollbar-width: none; }
.v-scroll .gal .ph { flex: 0 0 58cqw; width: 58cqw; aspect-ratio: 3 / 4; scroll-snap-align: center; }
.acts { display: flex; flex-direction: column; gap: 8cqw; }
.act { display: flex; flex-direction: column; gap: 3cqw; }
.act img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.act h3 { font-size: 17px; letter-spacing: .05em; } .act p { font-size: 14px; }
.v-list .acts { gap: 5cqw; } .v-list .act { flex-direction: row; gap: 4cqw; align-items: flex-start; }
.v-list .act img { width: 30%; flex: none; aspect-ratio: 1; } .v-list .act > div { min-width: 0; display: flex; flex-direction: column; gap: 1cqw; }
.ig { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2cqw; } .ig img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.note { font-size: 12px; opacity: .65; }
.tbl { display: grid; grid-template-columns: auto 1fr; border-top: 1px solid color-mix(in srgb, var(--s-fg) 18%, transparent); }
.tbl > * { padding: 3.4cqw 0; border-bottom: 1px solid color-mix(in srgb, var(--s-fg) 18%, transparent); }
.tbl b { font-weight: 500; padding-right: 6cqw; white-space: nowrap; color: var(--s-accent); }
.form { display: flex; flex-direction: column; gap: 3cqw; }
.form i { display: block; font-style: normal; font-size: 13px; padding: 12px; border: 1px solid color-mix(in srgb, var(--s-fg) 25%, transparent); opacity: .7; }
.form i.tall { height: 90px; }
.b-photo img { width: 100%; } .b-photo .cap { font-size: 12.5px; opacity: .75; padding: 2cqw 6cqw 0; }
.b-button { padding: 6cqw; text-align: center; }

/* 広い画面（PC の公開サイト） */
@container (min-width: 700px) {
  .s-head { padding: 26px 5cqw; } .sec { padding: 8cqw 9cqw; gap: 3.4cqw; } .sec-h h2 { font-size: 30px; }
  .hero h1 { font-size: clamp(2.2cqw, calc(var(--hw) / var(--n, 10)), var(--hmax)); } .hero .sub { font-size: 16px; margin-top: 1.4cqw; }
  [data-tpl] .hero h1 { --hw: 66cqw; --hmax: 4.6cqw; }
  [data-tpl="t3"] .hero h1 { --hw: 38cqw; }
  [data-tpl="t1"] .hero { min-height: 50cqw; } [data-tpl="t1"] .hero-tx { padding: 0 9cqw 6cqw; }
  [data-tpl="t2"] .hero { flex-direction: row-reverse; align-items: center; text-align: left; padding: 3cqw 9cqw 5cqw; gap: 7cqw; }
  [data-tpl="t2"] .hero-ph { flex: 0 0 38%; } [data-tpl="t2"] .hero-tx { flex: 1; } [data-tpl="t2"] .hero h1 { --hw: 33cqw; --hmax: 3.8cqw; }
  [data-tpl="t2"] .sec { padding: 9cqw 16cqw; }
  [data-tpl="t3"] .hero-ph { height: 46cqw; grid-template-columns: 1.7fr 1fr; gap: .8cqw; padding: 0 .8cqw; }
  [data-tpl="t3"] .hero-tx { margin: -7cqw 0 0 9cqw; width: 52cqw; padding: 3.4cqw 4cqw 1cqw; }
  [data-tpl="t4"] .hero { display: grid; grid-template-columns: 1fr 1fr; align-items: center; padding: 0; direction: rtl; } [data-tpl="t4"] .hero > * { direction: ltr; }
  [data-tpl="t4"] .hero-ph img { width: 100%; margin: 0; aspect-ratio: 5 / 4; } [data-tpl="t4"] .hero-tx { margin: 0; padding: 0 0 0 9cqw; } [data-tpl="t4"] .hero h1 { --hw: 34cqw; --hmax: 5.4cqw; text-shadow: none; }
  [data-tpl="t5"] .hero { padding: 3cqw 0; gap: 3.5cqw; } [data-tpl="t5"] .hero-tx { padding: 0 9cqw; } [data-tpl="t5"] .hero-ph { padding: 0 9cqw; gap: 1.6cqw; }
  [data-tpl="t5"] .hero-ph .ph { flex-basis: 26cqw; width: 26cqw; }
  .about-in, .v-right .about-in { flex-direction: row; align-items: center; gap: 6cqw; } .about-in > * { flex: 1; min-width: 0; }
  .v-right .about-in { flex-direction: row-reverse; } .v-left .about-in img { width: auto; flex: 0 0 34%; }
  .v-top .about-in { flex-direction: column; align-items: stretch; } .v-top .about-in img { aspect-ratio: 21 / 9; }
  .nlist div { gap: 3cqw; padding: 1.6cqw 0; }
  .gal { grid-template-columns: repeat(3, 1fr); gap: 1cqw; } .v-mosaic .gal img:first-child { grid-column: 1 / 3; grid-row: 1 / 3; aspect-ratio: auto; height: 100%; }
  .v-scroll .gal { margin: 0 -9cqw; padding: 0 9cqw; gap: 1cqw; } .v-scroll .gal .ph { flex-basis: 24cqw; width: 24cqw; }
  .acts { flex-direction: row; gap: 3cqw; } .act { flex: 1; min-width: 0; gap: 1.4cqw; }
  .v-list .acts { flex-direction: column; gap: 2.4cqw; } .v-list .act img { width: 16%; } .v-list .act { gap: 3cqw; align-items: center; }
  .ig { grid-template-columns: repeat(6, 1fr); gap: .6cqw; }
  .tbl > * { padding: 1.4cqw 0; } .form { max-width: 560px; gap: 12px; }
  .b-photo img { aspect-ratio: 21 / 9; object-fit: cover; } .s-foot { padding: 4cqw; }
}

/* 公開サイトで足したもの（リンクの見た目・お知らせの個別ページ） */
.site a { color: inherit; text-decoration: none; }
.site .s-btn { text-decoration: none; }
.site a.s-btn { color: var(--s-accent); } .site a.s-btn.fill { color: var(--s-on); }
.nlist a:hover, .s-logo:hover { text-decoration: underline; text-underline-offset: 4px; }
.post-in { display: flex; flex-direction: column; gap: 4cqw; }
.post-in img { width: 100%; max-height: 70vh; object-fit: cover; }
.post-in time { font-family: var(--latin); font-size: 15px; letter-spacing: .06em; font-variant-numeric: lining-nums; color: var(--s-accent); }
.post-back { align-self: flex-start; }

/* 合言葉のページ（テスト中の団体の公開ページの前に出す。api/gate.mjs）。色は p1、書体は f1。入力欄1つとボタン1つの、落ち着いた1枚 */
.site.gate { min-height: 100vh; min-height: 100dvh; box-sizing: border-box; display: flex; align-items: center; justify-content: center; padding: 32px 16px; background: var(--s-soft); }
.gate-box { width: 100%; max-width: 420px; box-sizing: border-box; display: flex; flex-direction: column; gap: 18px; padding: 40px 28px 34px; background: var(--s-bg); border: 1px solid color-mix(in srgb, var(--s-accent) 22%, transparent); text-align: center; }
.gate-ic { width: 30px; height: 30px; margin: 0 auto; fill: none; stroke: var(--s-accent); stroke-width: 1.3; stroke-linejoin: round; }
.site.gate h1 { font-size: 21px; letter-spacing: .06em; }
.site.gate h1::after { content: ""; display: block; width: 40px; height: 1px; background: var(--s-accent); margin: 16px auto 0; }
.gate-lead { font-size: 14px; line-height: 1.9; }
.gate-form { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; text-align: left; }
.gate-form label { font-size: 13px; letter-spacing: .08em; }
.gate-form input { width: 100%; box-sizing: border-box; padding: 13px 14px; font: inherit; font-size: 16px; line-height: 1.4; color: var(--s-fg); background: #fff; border: 1px solid color-mix(in srgb, var(--s-fg) 28%, transparent); border-radius: 0; }
.gate-form input:focus { outline: 2px solid var(--s-accent); outline-offset: 1px; border-color: var(--s-accent); }
.gate-form input[aria-invalid="true"] { border-color: #b3261e; }
.site .gate-err { font-size: 13.5px; line-height: 1.7; color: #b3261e; white-space: normal; }
.gate-form .s-btn { align-self: stretch; margin-top: 8px; padding: 14px 20px; font: inherit; font-size: 14px; letter-spacing: .16em; text-align: center; border-radius: 0; cursor: pointer; -webkit-appearance: none; appearance: none; }
