/* デザインの方針と各変数の用途は standards/DESIGN.md を参照 */
:root {
  --color-bg: #faf7f0;
  --color-surface: #fff;
  --color-ink: #2b2926;
  --color-muted: #5e5850;
  --color-accent: #b33a22;
  --color-accent-dark: #8f2d19;
  --color-accent-light: #f5e4dc;
  --color-border: #d9d1c2;
  --font-serif: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-sans:
    "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP",
    "Yu Gothic UI", "Meiryo", sans-serif;
  --content-width: 64rem;
  --text-width: 48rem;
  --sticky-cta-height: 4.5rem;
}

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

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.8;

  /* スマホ用の固定申し込みボタンに本文が隠れないようにする */
  padding-bottom: var(--sticky-cta-height);
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.4;
}

a {
  color: var(--color-accent);
}

/* 電話番号が途中で折り返されないようにする */
a[href^="tel:"] {
  white-space: nowrap;
}

small,
.note {
  color: var(--color-muted);
  font-size: 0.875rem;
}

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

/* 中身の幅をそろえる入れ物。左右に最低 1rem の余白を取る */
.container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding-inline: 1rem;
}

/* ヘッダー */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.site-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 0.75rem;
}

.site-logo {
  display: flex;
  flex-direction: column;
  color: var(--color-ink);
  text-decoration: none;
  line-height: 1.3;
}

.site-logo-sub {
  color: var(--color-muted);
  font-size: 0.875rem;
}

.site-logo-main {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
}

/* スマホではメニューを横にスクロールさせる */
.site-nav {
  display: flex;
  gap: 0.25rem 1.25rem;
  overflow-x: auto;
  max-width: 100%;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--color-ink);
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--color-accent);
}

/* セクション */
.section {
  padding-block: 3rem;
}

.section-alt {
  background: var(--color-surface);
}

.section-title {
  margin-top: 0;
  font-size: 1.5rem;
}

.section-title::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 3px;
  margin-top: 0.5rem;
  background: var(--color-accent);
}

/* トップのメインビジュアル。写真が用意できたら背景に差し込む */
.hero {
  padding-block: 3rem 3.5rem;
}

.hero-lead {
  margin: 0;
  color: var(--color-accent);
  font-weight: 700;
}

.hero-title {
  margin: 0.5rem 0 1rem;
  font-size: clamp(2rem, 8vw, 3.25rem);
  line-height: 1.35;
}

.hero-text {
  max-width: var(--text-width);
}

/* トップ以外のページの見出し部分 */
.hero-sub {
  padding-block: 2.5rem;
}

.hero-sub .hero-title {
  font-size: clamp(1.75rem, 6vw, 2.5rem);
}

/* ボタン: タップしやすいよう高さ 44px 以上を確保する */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.5rem 1.5rem;
  border: 2px solid var(--color-accent);
  border-radius: 0.5rem;
  font-weight: 700;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.btn-primary:hover,
.btn-primary:active {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-accent);
}

.btn-secondary:hover,
.btn-secondary:active {
  background: var(--color-accent-light);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* 少年部・一般部の入口 */
.entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 1rem;
}

.entry-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  color: var(--color-ink);
  text-decoration: none;
}

.entry-card:hover {
  border-color: var(--color-accent);
}

.entry-label {
  align-self: flex-start;
  padding: 0 0.75rem;
  background: var(--color-accent-light);
  border-radius: 999px;
  color: var(--color-accent);
  font-size: 0.875rem;
  font-weight: 700;
}

.entry-title {
  margin-top: 0.5rem;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
}

.entry-target {
  color: var(--color-muted);
  font-size: 0.875rem;
}

.entry-text {
  margin-top: 0.5rem;
}

.entry-more {
  margin-top: auto;
  padding-top: 0.75rem;
  color: var(--color-accent);
  font-weight: 700;
}

/* 特徴 */
.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1.5rem 2rem;
}

.feature h3 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
}

.feature p {
  margin: 0;
}

/* 時間割 */
.schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1.5rem 2rem;
}

.schedule-block h3 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
}

.schedule-table th,
.schedule-table td {
  padding: 0.5rem 0.5rem 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
}

.schedule-table th {
  padding-right: 1rem;
  white-space: nowrap;
}

/* 時間とクラス名は横に並べ、幅が足りなければクラス名を次の行に送る */
.schedule-table td {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1rem;
}

.schedule-time {
  white-space: nowrap;
}

.schedule-note {
  flex-basis: 100%;
  color: var(--color-muted);
  font-size: 0.875rem;
}

/* 体験の流れ */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  padding: 1.25rem;
  background: var(--color-bg);
  border-radius: 0.75rem;
  counter-increment: step;
}

.steps h3 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
}

.steps h3::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  margin-right: 0.5rem;
  background: var(--color-accent);
  border-radius: 50%;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.875rem;
}

.steps p {
  margin: 0;
}

/* 持ち物などのチェックリスト */
.check-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 1.75rem;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 700;
}

.check-list small {
  color: var(--color-muted);
  font-size: 0.875rem;
}

/* フォーム */
.form {
  display: grid;
  gap: 1.5rem;
  max-width: var(--text-width);
  margin-top: 1.5rem;
}

.form-field {
  display: grid;
  gap: 0.375rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.form-field > label,
.form-field > legend {
  padding: 0;
  font-weight: 700;
}

.form-field small {
  color: var(--color-muted);
  font-size: 0.875rem;
}

.form input[type="text"],
.form input[type="email"],
.form input[type="tel"],
.form textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  color: var(--color-ink);
  font: inherit;
}

.form input:focus,
.form textarea:focus {
  border-color: var(--color-accent);
  outline: 2px solid var(--color-accent-light);
}

.required,
.optional {
  margin-left: 0.25rem;
  padding: 0 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  vertical-align: middle;
}

.required {
  background: var(--color-accent);
  color: #fff;
}

.optional {
  background: var(--color-border);
  color: var(--color-ink);
}

.choice-list {
  display: grid;
  gap: 0.25rem;
}

.choice-list-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.choice {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  cursor: pointer;
}

.choice input[type="radio"],
.choice input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  accent-color: var(--color-accent);
}

.form .btn {
  justify-self: start;
}

.form-thanks {
  max-width: var(--text-width);
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: var(--color-accent-light);
  border-radius: 0.75rem;
}

.form-thanks h3 {
  margin-top: 0;
}

/* 地図。iframe を画面幅に合わせて縮める */
.map {
  aspect-ratio: 4 / 3;
  max-width: var(--text-width);
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  overflow: hidden;
}

.map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (width >= 48rem) {
  .map {
    aspect-ratio: 16 / 9;
  }
}

/* 申し込みの案内 */
.cta {
  background: var(--color-accent-light);
  text-align: center;
}

.cta h2 {
  margin-top: 0;
}

.cta .btn-row {
  justify-content: center;
}

/* フッター */
.site-footer {
  padding-block: 2rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: 0.875rem;
}

.site-footer p {
  margin: 0.25rem 0;
}

/* 元の画像(226×65)を半分の大きさで出し、高精細な画面でもぼやけないようにする。
   画像の背景が白いので、乗算でフッターの背景色になじませる */
.site-footer-logo {
  display: block;
  margin-bottom: 0.75rem;
  mix-blend-mode: multiply;
}

.site-footer-name {
  color: var(--color-ink);
  font-weight: 700;
}

/* スマホ用の固定申し込みボタン。広い画面では各セクションのボタンで足りるので出さない */
.sticky-cta {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
  background: rgb(255 255 255 / 95%);
  border-top: 1px solid var(--color-border);
}

.sticky-cta .btn {
  width: 100%;
}

@media (width >= 48rem) {
  .sticky-cta {
    display: none;
  }

  body {
    padding-bottom: 0;
  }
}

/* 選べない選択肢は薄く表示する */
.choice:has(input:disabled) {
  color: var(--color-muted);
  cursor: not-allowed;
  opacity: 0.5;
}

/* 見出し部分に写真を並べるときの配置。スマホでは写真を下に回す */
.hero-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (width >= 48rem) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* 写真がまだない(枠が出ていない)ときは文章だけの1列にする */
  .hero-grid:not(:has(> .photo)) {
    grid-template-columns: 1fr;
  }
}

/* 文章と写真を横に並べる。スマホでは縦に並べる */
.media {
  display: grid;
  gap: 2rem;
  align-items: start;
}

@media (width >= 48rem) {
  .media {
    grid-template-columns: 3fr 2fr;
  }

  .media:not(:has(> .photo)) {
    grid-template-columns: 1fr;
  }
}

.media-body > :first-child {
  margin-top: 0;
}

.lead {
  max-width: var(--text-width);
  font-size: 1.0625rem;
}

/* 写真の枠と、写真がまだないときのプレースホルダー */
.photo {
  width: 100%;
  margin: 0;
  overflow: hidden;
  border-radius: 0.75rem;
}

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

.photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: repeating-linear-gradient(
    -45deg,
    var(--color-surface),
    var(--color-surface) 12px,
    var(--color-bg) 12px,
    var(--color-bg) 24px
  );
  border: 2px dashed var(--color-border);
  text-align: center;
}

.photo-placeholder figcaption {
  display: grid;
  gap: 0.5rem;
  max-width: 24rem;
}

.photo-placeholder-label {
  justify-self: center;
  padding: 0 0.75rem;
  background: var(--color-muted);
  border-radius: 999px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

.photo-placeholder-want {
  color: var(--color-ink);
  font-size: 0.875rem;
}

.photo-placeholder-note {
  color: var(--color-muted);
  font-size: 0.75rem;
}

/* クラスの説明 */
.class-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
}

.class-item {
  padding: 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
}

.section-alt .class-item {
  background: var(--color-bg);
  border-color: transparent;
}

.class-item h3 {
  margin: 0;
  font-size: 1.125rem;
}

.class-item p {
  margin: 0.5rem 0 0;
}

.class-time {
  color: var(--color-accent);
  font-weight: 700;
}

/* 道場長からのメッセージ */
.message {
  max-width: var(--text-width);
  padding: 1.5rem;
  background: var(--color-surface);
  border-left: 4px solid var(--color-accent);
  border-radius: 0 0.75rem 0.75rem 0;
}

.message p {
  margin: 0 0 1rem;
}

.message-from {
  font-family: var(--font-serif);
  text-align: right;
}

.message p.message-from {
  margin: 0;
}

/* よくある質問 */
.faq {
  display: grid;
  gap: 0.75rem;
  max-width: var(--text-width);
}

.faq details {
  background: var(--color-bg);
  border-radius: 0.75rem;
}

.section:not(.section-alt) .faq details {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.faq summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.75rem 1.25rem;
  font-weight: 700;
  cursor: pointer;
}

.faq summary::before {
  content: "Q";
  flex: none;
  margin-right: 0.75rem;
  color: var(--color-accent);
  font-family: var(--font-serif);
}

.faq details p {
  margin: 0;
  padding: 0 1.25rem 1rem 2.75rem;
}

/* 料金表 */
.table-scroll {
  overflow-x: auto;
}

.price-table {
  width: 100%;
  max-width: var(--text-width);
  border-collapse: collapse;
  background: var(--color-surface);
}

.price-table th,
.price-table td {
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
}

.price-table thead th {
  background: var(--color-accent-light);
  white-space: nowrap;
}

.price-table td {
  white-space: nowrap;
}

.note-list {
  margin: 0.75rem 0;
  padding-left: 1.25rem;
  color: var(--color-muted);
  font-size: 0.875rem;
}

/* 帯 */
.belt-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
  padding: 0;
  list-style: none;
}

.belt-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.belt {
  flex: none;
  width: 3rem;
  height: 0.875rem;
  border: 1px solid var(--color-border);
  border-radius: 0.25rem;
}

/* 指導員 */
.instructor-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.instructor {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1.25rem;
  align-items: start;
  padding: 1.5rem;
  background: var(--color-bg);
  border-radius: 0.75rem;
}

/* 写真がまだないときは文章だけの1列にする */
.instructor:not(:has(> .photo)) {
  grid-template-columns: 1fr;
}

.instructor .photo-placeholder {
  padding: 0.5rem;
}

.instructor .photo-placeholder-want {
  font-size: 0.6875rem;
}

/* 道場長はスマホでは写真を上に置き、文章の幅を確保する */
.instructor-lead {
  grid-column: 1 / -1;
  grid-template-columns: 1fr;
}

.instructor-lead .photo {
  max-width: 12rem;
}

@media (width >= 48rem) {
  .instructor-lead:has(> .photo) {
    grid-template-columns: 14rem 1fr;
  }

  .instructor-lead .photo {
    max-width: none;
  }

  .instructor-lead .photo-placeholder-want {
    font-size: 0.875rem;
  }
}

.instructor-body > :first-child {
  margin-top: 0;
}

.instructor-role {
  margin: 0;
  color: var(--color-accent);
  font-size: 0.875rem;
  font-weight: 700;
}

.instructor-name {
  margin: 0.25rem 0 0;
  font-size: 1.375rem;
}

.instructor-name small {
  margin-left: 0.5rem;
  color: var(--color-muted);
  font-size: 1rem;
}

.instructor-name-en {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

.instructor h3 {
  margin: 1.25rem 0 0.25rem;
  font-size: 1rem;
}

/* 理念 */
.philosophy {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 3rem;
}

.philosophy-label {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.875rem;
}

.philosophy-word {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 6vw, 2.5rem);
  font-weight: 600;
}

/* 沿革 */
.timeline {
  max-width: var(--text-width);
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 2px solid var(--color-border);
}

.timeline li {
  display: grid;
  gap: 0.25rem;
  position: relative;
  padding: 0 0 1.5rem 1.5rem;
}

.timeline li::before {
  content: "";
  position: absolute;
  top: 0.6em;
  left: -0.4rem;
  width: 0.7rem;
  height: 0.7rem;
  background: var(--color-accent);
  border-radius: 50%;
}

.timeline-date {
  color: var(--color-accent);
  font-weight: 700;
}

/* 年間行事・入賞歴などの「見出し+内容」の一覧 */
.event-list {
  max-width: var(--text-width);
  margin: 0 0 1.5rem;
}

.event-row {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1rem;
  padding-block: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

.event-row dt {
  font-weight: 700;
}

.event-row dd {
  margin: 0;
}

.event-row .note-list {
  margin: 0;
  color: var(--color-ink);
  font-size: 1rem;
}

/* カレンダー */
.calendar {
  aspect-ratio: 4 / 3;
  max-width: var(--text-width);
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  overflow: hidden;
}

.calendar iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (width < 48rem) {
  .calendar {
    aspect-ratio: 3 / 4;
  }
}

/* お問い合わせ先 */
.contact-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
}

.contact-list div {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 1rem;
}

.contact-list dt {
  font-weight: 700;
}

.contact-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

/* フッターのメニュー */
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
  margin-bottom: 1rem;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--color-ink);
}

/* 入会キャンペーン */
.campaign-section {
  padding-block: 2rem;
}

.campaign {
  display: grid;
  gap: 1rem;
  justify-items: center;
  padding: 1.5rem;
  background: var(--color-surface);
  border: 2px solid var(--color-accent);
  border-radius: 0.75rem;
  text-align: center;
}

.campaign-title {
  margin: 0;
  padding: 0.125rem 1rem;
  background: var(--color-accent);
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
}

.campaign-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 2.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.campaign-items li {
  display: grid;
}

.campaign-label {
  color: var(--color-muted);
  font-size: 0.875rem;
}

.campaign-value {
  color: var(--color-accent);
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 7vw, 2.5rem);
  font-weight: 600;
  line-height: 1.3;
}

.campaign-notes {
  margin: 0;
  padding: 0;
  color: var(--color-muted);
  font-size: 0.875rem;
  list-style: none;
}

.campaign-inline {
  color: var(--color-accent);
  font-weight: 700;
}
