/* ぬか床の講座の申込ページ。
   色は台所にあるものから取っている: 糠、きゅうり、なす、にんじん、だいこん。 */
:root {
  --nuka: #d8b55c;
  --nuka-deep: #b48a34;
  --nuka-pale: #f1e6c4;
  --cucumber: #2f5d3a;
  --eggplant: #33233f;
  --carrot: #c9601a;
  --carrot-text: #a04708; /* 小さな文字に使う、濃いめの橙 */
  --daikon: #f6f6ec;
  --paper: #ffffff;
  --leaf: #e9f1df; /* きゅうりの薄い緑。読む部分の地は白にして、色はここぞという所だけに使う */
  --line: #cfc7a6;

  --display: "Zen Antique Soft", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --body: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;

  --go: #2f5d3a;
  --go-deep: #224630;

  /* 実在の申込ページ10件を測った範囲に合わせている
     (本文14〜16px、行間1.5〜1.8倍、注記12px前後、題名は最大でも48px、文章の幅550〜770px)。 */
  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: 1.375rem;
  --step-3: 1.75rem;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--eggplant);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.75;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, p, ol, ul, dl, dd, fieldset, legend { margin: 0; padding: 0; }
ol, ul { list-style: none; }
fieldset { border: 0; min-width: 0; }

h2 {
  text-wrap: balance;
  font-family: var(--display);
  font-weight: 400;
  font-size: var(--step-3);
  line-height: 1.4;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--carrot);
  outline-offset: 3px;
}

.wrap {
  width: min(100% - 2.5rem, 48rem);
  margin-inline: auto;
}

.sample-note {
  background: var(--eggplant);
  color: var(--daikon);
  font-size: var(--step--1);
  line-height: 1.6;
  padding: 0.5rem 1.25rem;
  text-align: center;
}

.button {
  display: inline-block;
  background: var(--go);
  color: #fff;
  border: 0;
  border-radius: 999px;
  min-height: 3.25rem;
  padding: 0.8rem 2.25rem;
  font: 700 1rem/1.6 var(--body);
  letter-spacing: 0.06em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--go-deep); }

/* ---------- 冒頭: ページの上がそのまま、ぬか床になっている ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.28) 0 1.5px, transparent 2px) 0 0 / 23px 19px,
    radial-gradient(circle at 70% 60%, rgba(120, 84, 20, 0.22) 0 1.5px, transparent 2px) 0 0 / 31px 27px,
    var(--nuka);
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(100% - 2.5rem, 56rem);
  margin-inline: auto;
  padding: 2.5rem 0 17rem;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "school title" "photo title" "lead title" "cta title";
  grid-template-rows: auto 1fr auto auto;
  column-gap: 3rem;
}
/* 台所に置いた1枚の写真のように、白いふちを付けて少し傾ける */
.hero-photo {
  grid-area: photo;
  align-self: center;
  margin: 1.5rem 0;
  width: min(100%, 21rem);
  padding: 0.4rem;
  background: #fff;
  transform: rotate(-2deg);
}
.hero-photo img { display: block; width: 100%; height: auto; }

.hero-school {
  grid-area: school;
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: 0.2em;
}

.hero-title {
  grid-area: title;
  writing-mode: vertical-rl;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.25rem, 3.75vw, 3rem);
  line-height: 1.5;
  letter-spacing: 0.08em;
  height: 9.2em;
}
.hero-title span { display: block; }
.hero-title span:nth-child(2) { padding-top: 1.1em; }
.hero-title span:nth-child(3) { padding-top: 2.2em; }

.hero-lead {
  grid-area: lead;
  align-self: end;
  max-width: 27rem;
}
.hero-lead p { font-weight: 500; }
.hero-cta { grid-area: cta; max-width: 27rem; margin-top: 1.5rem; }
.hero-fact {
  margin-top: 0.6rem;
  font-size: var(--step--1);
  line-height: 1.7;
}
.hero-fact + .hero-fact { margin-top: 0.15rem; }

.bed {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: auto;
  display: block;
}
.bed-surface { fill: var(--nuka-deep); }

/* ---------- ページ内の目次 ---------- */
.tabs {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--eggplant);
  color: var(--daikon);
}
.tabs-inner {
  width: min(100% - 2.5rem, 48rem);
  margin-inline: auto;
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs-inner::-webkit-scrollbar { display: none; }
.tabs a {
  flex: none;
  padding: 0.75rem 0;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.tabs a:hover { text-decoration: underline; text-underline-offset: 0.4em; }
section[id] { scroll-margin-top: 3rem; }

/* ---------- 漬け時間を試す ---------- */
.pickle {
  background: var(--nuka-deep);
  /* 白い文字では背景との差が足りないので、濃い紫の文字にしている */
  color: var(--eggplant);
  padding: 1rem 0 4rem;
  /* 上の波の絵との間に、細いすき間が出ないように少し重ねる */
  position: relative;
  margin-top: -2px;
}
.pickle h2 { color: var(--eggplant); }
.pickle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.veg-choice { margin-top: 1.5rem; }
.veg-choice legend, .hours span:first-child {
  font-weight: 700;
  font-size: var(--step--1);
  letter-spacing: 0.1em;
}
.veg-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.5rem;
}
.veg-buttons button {
  background: transparent;
  color: var(--eggplant);
  border: 1px solid var(--eggplant);
  border-radius: 999px;
  min-height: 2.75rem;
  padding: 0.4rem 1.1rem;
  font: 500 0.9375rem/1.4 var(--body);
  cursor: pointer;
}
.veg-buttons button[aria-pressed="true"] {
  background: var(--eggplant);
  color: var(--daikon);
  font-weight: 700;
}

.hours {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 2rem;
}
.hours output {
  font-family: var(--display);
  font-size: var(--step-2);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 2.75rem;
  background: transparent;
  margin: 0;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: var(--eggplant);
}
input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: var(--eggplant);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 2rem;
  height: 2rem;
  margin-top: calc(-1rem + 3px);
  border-radius: 50%;
  background: var(--daikon);
  border: 3px solid var(--eggplant);
}
input[type="range"]::-moz-range-thumb {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--daikon);
  border: 3px solid var(--eggplant);
}
.scale {
  display: flex;
  justify-content: space-between;
  font-size: var(--step--1);
}

.result {
  background: var(--daikon);
  color: var(--eggplant);
  border-radius: 2px;
  padding: 1.5rem;
}
.result-veg {
  height: 2.5rem;
  border-radius: 1.25rem;
  margin-bottom: 1.25rem;
  transition: background-color 0.25s, width 0.25s;
}
.result-what { font-weight: 700; font-size: var(--step--1); letter-spacing: 0.06em; }
.result-label {
  font-family: var(--display);
  font-size: var(--step-2);
  line-height: 1.3;
}
.result-advice { margin-top: 0.5rem; font-weight: 500; }
.result-note {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: var(--step--1);
  line-height: 1.8;
}

/* ---------- 向いている人 ---------- */
/* 箱に入れず、線1本で左右に分ける */
.fit { padding: 4.5rem 0 0; }
.fit-grid { display: grid; grid-template-columns: 3fr 2fr; }
.fit-yes { padding-right: 2rem; }
.fit-no { padding-left: 2rem; border-left: 1px solid var(--eggplant); }
.fit h3 { font-family: var(--display); font-weight: 400; font-size: var(--step-1); margin-bottom: 0.5rem; }
.fit li { position: relative; padding: 0.3rem 0 0.3rem 1.6rem; line-height: 1.7; }
.fit li::before { content: ""; position: absolute; left: 0; }
.fit-yes li::before { width: 0.9rem; height: 0.45rem; border-left: 3px solid var(--cucumber); border-bottom: 3px solid var(--cucumber); transform: rotate(-45deg); top: 0.7em; }
.fit-no li::before { width: 0.9rem; height: 2px; background: var(--eggplant); top: 1.1em; }

/* ---------- 4週間 ---------- */
/* 各週の絵が、1本のぬか床の上に並ぶ。冒頭の絵と同じ世界を、ここまで続ける */
.weeks { padding: 4.5rem 0; }
.section-lead { max-width: 36rem; }

.week-list {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.week-art {
  display: block;
  width: 100%;
  height: 4.5rem;
  border-bottom: 0.5rem solid var(--nuka-deep);
}
.week-text { padding: 1rem 1.25rem 0 0; }
.week-list h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: var(--step-2);
  line-height: 1.4;
  margin-bottom: 0.4rem;
}
.week-no {
  display: block;
  font-family: var(--body);
  font-weight: 700;
  font-size: var(--step--1);
  color: var(--cucumber);
  letter-spacing: 0.1em;
}
.week-list p { font-size: 0.875rem; }

/* ---------- 届くもの ---------- */
.kit {
  background: var(--cucumber);
  color: var(--daikon);
  padding: 4rem 0;
}
.kit h2 { color: var(--daikon); }
.kit-grid {
  display: grid;
  grid-template-columns: 4fr 8fr;
  gap: 2.5rem;
}
.kit-photo { margin: 1.5rem 0 0; }
.kit-photo img { display: block; width: 100%; height: auto; }
.kit-photo figcaption { margin-top: 0.4rem; font-size: 0.75rem; opacity: 0.85; }
.kit-list { font-size: 0.9375rem; }
.kit-list div {
  display: grid;
  grid-template-columns: 11.5rem 1fr;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(246, 246, 236, 0.35);
}
.kit-list div:first-child { border-top: 1px solid rgba(246, 246, 236, 0.35); }
.kit-list dt { font-weight: 700; }

/* ---------- 日程と受講料 ---------- */
.terms { padding: 4.5rem 0; }
.term-table td { font-size: 0.9375rem; }
.term-table-wrap { overflow-x: auto; }
.term-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 34rem;
}
.term-table th, .term-table td {
  text-align: left;
  padding: 1rem 1rem 1rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.term-table thead th {
  font-size: var(--step--1);
  border-bottom: 2px solid var(--eggplant);
  padding-bottom: 0.5rem;
}
.term-table tbody th {
  font-family: var(--display);
  font-weight: 400;
  font-size: var(--step-1);
  white-space: nowrap;
}

.left {
  display: block;
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--cucumber);
}
.terms-note { margin-top: 0.75rem; font-size: var(--step--1); }
.pay { margin-top: 1.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.pay dt { font-weight: 700; }
.pay dd { font-size: 0.95rem; line-height: 1.8; }

/* 料金は箱に入れず、大きな数字そのものを見せる */
.price {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--eggplant);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2.5rem;
  align-items: center;
  font-size: 0.9375rem;
}
.price-main { font-weight: 700; white-space: nowrap; }
.price-figure {
  font-family: var(--display);
  font-weight: 400;
  font-size: 3rem;
  line-height: 1;
  margin-right: 0.2rem;
}
.price-main small { font-weight: 500; font-size: var(--step--1); }
.price li { padding-left: 1.4em; position: relative; }
.price li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85em;
  width: 0.8em;
  height: 2px;
  background: var(--cucumber);
}

/* ---------- 教える人 ---------- */
.teacher { border-top: 1px solid var(--line); padding: 4.5rem 0 0; }
.teacher-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  align-items: start;
}
.teacher-mark {
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  background: var(--eggplant);
  color: var(--nuka);
  font-family: var(--display);
  font-size: 3.25rem;
  line-height: 6rem;
  text-align: center;
}
.teacher-name {
  font-family: var(--display);
  font-size: var(--step-2);
  margin-bottom: 0.5rem;
}
.teacher-note { margin-top: 1rem; font-size: var(--step--1); }

/* ---------- 受講した方の声 ---------- */
.voices { padding: 4.5rem 0 0; }
.voices-empty { border-left: 3px solid var(--line); padding-left: 1.25rem; font-size: 0.9375rem; }

/* ---------- よくある質問 ---------- */
.faq { padding: 4.5rem 0; }
.faq-more { margin-top: 1.5rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 2px solid var(--eggplant); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 2.5rem 1rem 0;
  font-weight: 700;
  font-size: 1rem;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 0.5rem;
  top: 50%;
  width: 0.7rem;
  height: 0.7rem;
  border-right: 2px solid var(--eggplant);
  border-bottom: 2px solid var(--eggplant);
  transform: translateY(-70%) rotate(45deg);
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { padding: 0 2.5rem 1.4rem 0; }

/* ---------- 申込 ---------- */
.apply {
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.28) 0 1.5px, transparent 2px) 0 0 / 23px 19px,
    var(--nuka);
  padding: 4.5rem 0 5rem;
}
.apply-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 2.5rem;
  align-items: start;
}
.apply-demo {
  margin-top: 1.25rem;
  padding-left: 1rem;
  border-left: 3px solid var(--eggplant);
  font-size: var(--step--1);
  line-height: 1.8;
  font-weight: 500;
}

/* 申込用紙。上の辺だけを太くして、紙の束から1枚めくった形にする */
form {
  background: #fff;
  border-top: 0.5rem solid var(--eggplant);
  border-radius: 2px;
  padding: 1.75rem;
}
.field { margin-bottom: 1.25rem; }
.field > label, .field > legend {
  display: block;
  font-weight: 700;
  font-size: 0.9375rem;
  margin-bottom: 0.35rem;
}
.optional { font-weight: 400; font-size: var(--step--1); margin-left: 0.5rem; }
input[type="text"], input[type="email"], textarea {
  width: 100%;
  font: inherit;
  color: inherit;
  background: #fff;
  min-height: 3rem;
  border: 1px solid #8d8496;
  border-radius: 0.375rem;
  padding: 0.6rem 0.8rem;
}
textarea { resize: vertical; line-height: 1.7; }
.radio, .check {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  min-height: 2.75rem;
  font-size: 0.9375rem;
  cursor: pointer;
}
.radio input, .check input {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--cucumber);
  flex: none;
}
.error {
  margin-top: 0.4rem;
  color: #a1260d;
  font-weight: 700;
  font-size: var(--step--1);
}
[aria-invalid="true"] { border-color: #a1260d !important; }
.hp { position: absolute; left: -9999px; }
form .button { width: 100%; }
.notice {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  background: var(--nuka-pale);
  font-weight: 500;
  font-size: 0.9375rem;
}
.notice.is-error { background: #a1260d; color: #fff; }

/* ---------- 末尾 ---------- */
.footer {
  background: var(--eggplant);
  color: var(--daikon);
  padding: 2.5rem 0 6rem;
  font-size: var(--step--1);
}
.footer p + p { margin-top: 0.25rem; }
.footer a { display: inline-block; padding: 0.6rem 0; }

/* ---------- 特定商取引法に基づく表記 ---------- */
.legal { padding: 4rem 0 6rem; max-width: 46rem; }
.legal h1 { font-family: var(--display); font-weight: 400; font-size: var(--step-3); line-height: 1.3; margin-bottom: 1rem; }
.legal dl { margin-top: 2rem; border-top: 2px solid var(--eggplant); }
.legal dl div { display: grid; grid-template-columns: 12rem 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.legal dt { font-weight: 700; }
.legal .back { display: inline-block; margin-top: 2rem; }

.sticky-cta { display: none; }

/* ---------- 狭い画面 ---------- */
@media (max-width: 52rem) {
  :root { --step-3: 1.375rem; --step-2: 1.25rem; }
  body { font-size: 0.9375rem; }
  .wrap, .hero-inner, .tabs-inner { width: min(100% - 2rem, 48rem); }

  /* 説明は左、縦書きの見出しは右。ボタンは幅いっぱいにして、スクロールの前に見えるようにする */
  .hero-inner {
    grid-template-columns: 1fr auto;
    grid-template-areas: "photo photo" "school title" "lead title" "cta cta";
    grid-template-rows: auto auto 1fr auto;
    column-gap: 1rem;
    padding: 1.25rem 0 9.5rem;
  }
  .hero-school { font-size: 0.8125rem; }
  .hero-photo { width: 100%; margin: 0 0 1.25rem; transform: rotate(-1deg); }
  .hero-photo img { height: 9rem; object-fit: cover; object-position: 60% 45%; }
  .hero-title {
    font-size: clamp(1.75rem, 8.2vw, 2.25rem);
    line-height: 1.45;
  }
  .hero-lead { max-width: none; align-self: end; }
  .hero-lead p { font-size: 0.875rem; line-height: 1.7; }
  .hero-lead br { display: none; }
  .hero-cta { max-width: none; margin-top: 1.25rem; }
  .hero-cta .button { display: block; }
  .bed { height: 9rem; }

  .pickle { padding-bottom: 3rem; }
  .pickle-grid, .kit-grid, .apply-grid { grid-template-columns: 1fr; gap: 2rem; }

  .weeks, .terms, .faq { padding: 3rem 0; }
  .fit, .voices, .teacher { padding-top: 3rem; }
  .fit-grid, .pay { grid-template-columns: 1fr; }
  .fit-yes { padding-right: 0; }
  .fit-no { padding: 1.25rem 0 0; margin-top: 1.25rem; border-left: 0; border-top: 1px solid var(--eggplant); }
  .tabs-inner { gap: 1.1rem; }
  .legal dl div { grid-template-columns: 1fr; gap: 0; }
  .week-list { grid-template-columns: 1fr; gap: 1.5rem; }
  .week-list li { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1rem; align-items: start; }
  .week-art { height: 4rem; }
  .week-text { padding: 0; }
  .kit-photo { margin-top: 1rem; max-width: 20rem; }

  .kit { padding: 3rem 0; }
  .kit-list div { grid-template-columns: 1fr; gap: 0; }

  .price { grid-template-columns: 1fr; gap: 1rem; }
  .teacher-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .teacher-mark { width: 4.5rem; height: 4.5rem; font-size: 2.4rem; line-height: 4.5rem; }

  .apply { padding: 3rem 0 6rem; }
  form { padding: 1.25rem; }

  .sticky-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    line-height: 1.45;
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    z-index: 5;
    background: var(--go);
    color: #fff;
    border-radius: 999px;
    padding: 0.5rem 1rem;
    letter-spacing: 0.06em;
    text-decoration: none;
    box-shadow: 0 6px 0 rgba(51, 35, 63, 0.25);
    transition: transform 0.2s, opacity 0.2s;
  }
  .sticky-cta span { font-weight: 400; font-size: var(--step--1); letter-spacing: 0; }
  .sticky-cta.is-hidden { transform: translateY(150%); opacity: 0; pointer-events: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
