/* 新しい型に流し込んだ「古い本文」の調整と、ページの種類ごとの組み方。
   古い本文の見た目は legacy.css（旧 style.css を .legacy の中だけに効くよう書き換えたもの）が受け持ち、
   ここではスマホで読めるように、固定幅・回り込みを外し、文字を大きくする。 */

/* ---- ページの見出し ---- */
.page-head{padding-top:6px;padding-bottom:4px}
.page-title{font-size:clamp(24px,6.6vw,34px);font-weight:900;color:var(--green-deep);line-height:1.4;margin:6px 0 22px}

/* ---- 古い本文 ---- */
.legacy-wrap{max-width:780px;margin-inline:auto;padding:0 20px 56px}
.legacy-wrap.wide{max-width:1000px}
.legacy{font-size:16px;line-height:1.9;color:var(--ink);overflow-wrap:anywhere}
.legacy img{max-width:100%;height:auto}
.legacy iframe,.legacy video{max-width:100%}
.legacy a{color:var(--link)}
.legacy table{max-width:100%}
.legacy input,.legacy select,.legacy textarea,.legacy button{font:inherit;max-width:100%}
@media (max-width:759px){
  .legacy div,.legacy p,.legacy ul,.legacy ol,.legacy dl,.legacy dd,.legacy dt,.legacy li,.legacy span,.legacy h2,.legacy h3,.legacy h4,.legacy h5,.legacy table,.legacy form{
    float:none!important;width:auto!important;max-width:100%!important;margin-left:0!important;margin-right:0!important;
    position:static!important;height:auto!important;min-height:0!important}
  .legacy img{float:none!important;display:block;margin:0 auto 12px!important;max-width:100%!important;height:auto!important}
  .legacy table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .legacy td,.legacy th{min-width:0}
  .legacy br+br{display:none}
  .legacy .tellbox{padding:10px 14px!important;background:var(--bg-alt)!important;border-radius:12px;text-align:center;font-size:22px!important;font-weight:900}
}
iframe{max-width:100%}

/* ---- フォーム（予約・申請・お問い合わせ） ---- */
.legacy form table,.legacy form tbody,.legacy form tr{display:block;width:100%!important}
.legacy form th,.legacy form td{display:block;width:auto!important;padding:4px 0!important;border:0!important;background:none!important;text-align:left!important}
.legacy form tr{padding:12px 0;border-bottom:2px dotted var(--line)}
.legacy form th{font-weight:700;font-size:15px}
.legacy form input[type=text],.legacy form input[type=email],.legacy form input[type=tel],.legacy form input[type=number],
.legacy form input[type=date],.legacy form input:not([type]),.legacy form select,.legacy form textarea{
  width:100%!important;min-height:48px;padding:10px 14px;font-size:16px;border:2px solid var(--line);border-radius:12px;background:#fff;color:var(--ink)}
.legacy form textarea{min-height:140px}
.legacy form input:focus,.legacy form select:focus,.legacy form textarea:focus{outline:none;border-color:var(--green)}
.legacy form input[type=radio],.legacy form input[type=checkbox]{width:22px;height:22px;vertical-align:-5px;margin-right:6px;accent-color:var(--green-deep)}
.legacy form label{display:inline-flex;align-items:center;min-height:40px;margin-right:14px}
.legacy form input[type=submit],.legacy form input[type=button],.legacy form button,.legacy form input[type=image]{
  display:block;width:100%!important;max-width:360px!important;min-height:56px;margin:24px auto 0!important;border:0;border-radius:999px;
  background:var(--green-deep);color:#fff;font-weight:900;font-size:17px;cursor:pointer;box-shadow:0 4px 0 #1b4418}
.legacy form input[type=image]{background:none;box-shadow:none;height:auto}
.legacy form button.form-reset{background:none;box-shadow:none;color:var(--ink-soft);font-weight:500;font-size:14px;min-height:44px;margin-top:8px!important;text-decoration:underline;text-underline-offset:.2em}

/* ---- ページ下の案内（読み物ページなど） ---- */
.guide{background:var(--bg-alt);padding:44px 0 56px}
.guide h2{font-size:21px;font-weight:900;color:var(--green-deep);text-align:center;margin-bottom:20px}
.guide .learn{margin-top:0}
.guide-cta{display:grid;gap:14px;align-items:center;background:#fff;border-radius:var(--r);border:2px solid var(--line);box-shadow:0 6px 0 var(--line);padding:20px;margin-bottom:36px}
.guide-cta img{width:72px}
.guide-cta h2{text-align:left;margin:0 0 4px;font-size:19px}
.guide-cta p{font-size:14.5px;color:var(--ink-soft)}
@media (min-width:760px){.guide-cta{grid-template-columns:88px 1fr auto}}
@media (max-width:759px){.guide-cta{text-align:center}.guide-cta img{margin:0 auto}.guide-cta h2{text-align:center}}

/* ---- クラブのページ（自動で組んだもの） ---- */
.club-lead{margin-top:8px;font-size:15px;color:var(--ink-soft)}
.club-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:18px}
.club-actions .btn{flex:1 1 200px}
.club-title.no-photo{margin:8px 0 0}
.club-hero-grid.no-photo{display:block}
.legacy-club{margin-top:28px}
.back-link{margin:28px 0 0;text-align:center}

/* ---- クラブへの予約フォームのページ ---- */
.contact-card{display:grid;gap:16px;background:#fff;border-radius:var(--r);border:2px solid var(--line);box-shadow:0 6px 0 var(--line);padding:18px;margin-bottom:28px}
.contact-card img{border-radius:16px;width:100%;aspect-ratio:3/2;object-fit:cover}
.contact-card dl{display:grid;gap:6px}
.contact-card dl div{display:grid;grid-template-columns:6em 1fr;gap:8px}
.contact-card dt{font-size:13px;color:var(--ink-soft);font-weight:700;padding-top:2px}
.contact-card dd{font-weight:700}
.contact-note{font-size:15px}
@media (min-width:760px){.contact-card{grid-template-columns:240px 1fr;align-items:center}}

/* ---- トップの特集 ---- */
.features-top{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;list-style:none;margin:0;padding:0}
@media (min-width:960px){.features-top{grid-template-columns:repeat(5,1fr);gap:16px}}
.features-top a{display:block;height:100%;background:#fff;border-radius:18px;border:2px solid var(--line);box-shadow:0 4px 0 var(--line);padding:14px 16px;text-decoration:none;color:inherit}
.features-top b{display:block;font-weight:900;color:var(--green-deep)}
.features-top small{display:block;font-size:12.5px;color:var(--ink-soft);line-height:1.6;margin-top:4px}

/* ---- フッター ---- */
.fcols{display:grid;gap:8px 28px;margin:18px 0}
.fcols h3{font-size:13px;color:#cfe3c3;margin:10px 0 0;font-weight:700}
.fcols .fnav{margin:0}
@media (min-width:760px){.fcols{grid-template-columns:repeat(3,1fr)}.fcols .fnav{display:grid;grid-template-columns:1fr}}

/* フォームの入力チェックのエラー表示（旧 exvalidation.css は 11px で読みにくい） */
.legacy .formError .formErrorContent,.legacy .errMsg{width:auto!important;font-family:inherit!important;font-size:14px!important;line-height:1.5!important;font-weight:700}
.legacy .formError .formErrorContent{border-radius:10px!important;padding:6px 12px!important}

/* 画像の入った組版用の表（手順の説明など）は、スマホでは縦に積む */
@media (max-width:759px){
  .legacy table[data-r=stack],.legacy table[data-r=stack]>tbody,.legacy table[data-r=stack]>tbody>tr,
  .legacy table[data-r=stack]>tbody>tr>td,.legacy table[data-r=stack]>tbody>tr>th,
  .legacy table[data-r=stack]>tr,.legacy table[data-r=stack]>tr>td{display:block!important;width:auto!important;height:auto!important;overflow:visible}
  .legacy table[data-r=stack]>tbody>tr>td:empty{display:none!important}
}

/* ---- 県のページ ---- */
.pref{padding-bottom:48px}
.pref-desc{margin-bottom:26px}
.pref-club{display:grid;gap:0;background:#fff;border-radius:var(--r);border:2px solid var(--line);box-shadow:0 6px 0 var(--line);overflow:hidden;margin-bottom:24px}
.pref-club-photo img{width:100%;aspect-ratio:3/2;object-fit:cover;display:block}
.pref-club-body{padding:18px 18px 22px}
.pref-club h2{font-size:24px;font-weight:900;line-height:1.35}
.pref-club h2 a{color:var(--green-deep);text-decoration:none}
.ouen-chip{display:inline-block;background:var(--sun);color:var(--ink);font-weight:900;font-size:13px;padding:3px 14px;border-radius:999px;box-shadow:0 3px 0 var(--sun-deep);margin-bottom:10px}
.ouen-chip b{font-size:17px}
.pref-club .info{margin-top:14px}
.pref-club-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:18px}
.pref-club-actions .btn{flex:1 1 180px}
.pref-empty{background:#fff;border-radius:var(--r);border:2px solid var(--line);padding:24px;text-align:center}
@media (min-width:860px){.pref-club{grid-template-columns:2fr 3fr}.pref-club-photo img{height:100%;aspect-ratio:auto}}

/* ---- 文字入り画像を置き換えた部品（scripts/renew.py の IMG_BUTTONS / IMG_TEXTS） ---- */
.legacy a.btn{display:flex;flex-direction:column;max-width:440px;margin:14px auto;line-height:1.5;text-decoration:none}
.legacy a.btn small{display:block;font-size:13px;font-weight:700;opacity:.85}
.legacy a.btn.btn-primary{color:#fff}
.legacy a.btn.btn-secondary{color:var(--ink)}
.legacy a.r-tel{font-size:22px;letter-spacing:.04em;max-width:320px}
.legacy .r-banner{background:var(--sun-soft);border:2px solid #f3d9a4;border-radius:var(--r);padding:16px 18px;margin:0 0 20px;text-align:center;font-size:22px;font-weight:900;color:#b86400;line-height:1.5}
.legacy .r-banner small{display:block;font-size:14px;font-weight:700;color:var(--ink)}
.legacy .r-h2{font-size:21px;font-weight:900;color:var(--green-deep);line-height:1.5;margin:26px 0 12px;padding-left:12px;border-left:6px solid var(--leaf)}
.legacy .r-chip{display:inline-block;background:var(--green-deep);color:#fff;font-size:12px;font-weight:700;line-height:1.7;padding:0 10px;border-radius:999px;margin-right:6px}
.legacy .r-steps{background:#fff;border:2px solid var(--line);border-radius:var(--r);box-shadow:0 6px 0 var(--line);padding:22px 18px;margin:18px 0}
.legacy .r-steps-title{font-size:20px;font-weight:900;color:var(--green-deep);text-align:center;margin:0 0 14px}
.legacy .r-steps ol{list-style:none;margin:0;padding:0;display:grid;gap:12px}
.legacy .r-steps li{background:var(--bg-alt);border-radius:14px;padding:12px 14px}
.legacy .r-steps li b{display:block;font-size:16px;font-weight:900;color:var(--green-deep)}
.legacy .r-steps li span{display:block;font-size:15px;line-height:1.8}
.legacy .r-steps-goal{max-width:280px;margin:16px auto 0;padding:8px 16px;text-align:center;background:var(--sun);color:var(--ink);font-size:18px;font-weight:900;border-radius:999px;box-shadow:0 4px 0 var(--sun-deep)}
.legacy .r-prefs{display:flex;flex-wrap:wrap;gap:8px;list-style:none;margin:10px 0 20px;padding:0}
.legacy .r-prefs a{display:inline-flex;align-items:center;min-height:44px;padding:0 18px;border-radius:999px;background:var(--bg-alt);color:var(--green-deep);font-weight:700;border:2px solid #cde4b0;text-decoration:none}

/* 横並び用の「→」の矢印（入会応援金の手順）は、縦に積むスマホでは下向きに */
@media (max-width:759px){.legacy .yagi img{transform:rotate(90deg);width:36px!important;margin:6px auto!important}}

/* ---- 入会応援金の申請・乗馬予約の報告のフォーム（scripts/renew.py の FORMS） ---- */
.legacy .r-form-lead{background:#fff;border:2px solid var(--line);border-radius:16px;padding:14px 16px;margin:0 0 18px;font-size:15.5px;line-height:1.85}
.legacy .r-field{padding:12px 0;border-bottom:2px dotted var(--line)}
.legacy .r-field>label,.legacy .r-label{display:flex;align-items:center;gap:8px;font-weight:700;font-size:15px;margin:0 0 8px;min-height:0}
.legacy .r-req,.legacy .r-opt{font-size:11.5px;font-weight:700;line-height:1.7;padding:0 8px;border-radius:999px}
.legacy .r-req{background:#c0392b;color:#fff}
.legacy .r-opt{background:var(--bg-alt);color:var(--ink-soft)}
.legacy .r-choices{display:flex;flex-wrap:wrap;gap:4px 16px}
.legacy .r-form-note{font-size:13.5px;color:var(--ink-soft);margin:16px 0 0}
.legacy .r-thanks{background:#fff;border:2px solid var(--line);border-radius:var(--r);box-shadow:0 6px 0 var(--line);padding:24px 20px}
.legacy .r-thanks p{margin:0 0 12px}
.legacy .r-thanks-title{font-size:21px;font-weight:900;color:var(--green-deep)}

/* ---- トップの新着情報（renewal/news.txt。1年以内のものだけ） ---- */
.news{padding:28px 0 4px}
.news .wrap{max-width:860px}
.news-title{font-size:18px;font-weight:900;color:var(--green-deep);margin:0 0 10px;display:flex;align-items:center;gap:8px}
.news-title::before{content:"";width:10px;height:10px;border-radius:50%;background:var(--sun)}
.news-list{list-style:none;margin:0;padding:6px 18px;background:#fff;border:2px solid var(--line);border-radius:18px;box-shadow:0 4px 0 var(--line)}
.news-list li{display:grid;gap:2px;padding:12px 0;border-bottom:2px dotted var(--line)}
.news-list li:last-child{border-bottom:0}
.news-list time{font-size:13px;font-weight:700;color:var(--ink-soft)}
.news-list a{color:var(--ink);font-weight:700}
@media (min-width:760px){.news-list li{grid-template-columns:9.5em 1fr;align-items:baseline;gap:16px}}
