/* 色やフォントを変えたいときは、この :root の値を書き換えてください */
:root {
  --bg: #f8f6fb;
  --surface: #ffffff;
  --ink: #332d3a;
  --muted: #7f778a;
  --line: #e3dcec;
  --accent: #7d5fa8;
  --accent-dark: #644a8c;
  --accent-soft: #efe9f7;
  --few: #c08a2e;
  --error: #c0392b;
  --radius: 14px;
  --font-body: 'Zen Kaku Gothic New', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
  --font-head: 'Shippori Mincho', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
}

[hidden] { display: none !important; }

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

/* ---------- ヘッダー ---------- */
.hero {
  padding: 44px 16px 36px;
  text-align: center;
  background: linear-gradient(180deg, var(--accent-soft), var(--bg));
}
.hero__studio {
  margin: 0 0 8px;
  font-size: 13px;
  letter-spacing: 0.22em;
  color: var(--accent-dark);
  text-transform: uppercase;
}
.hero__title {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(21px, 5.6vw, 28px);
  line-height: 1.5;
  text-wrap: balance;
}

/* ---------- コース ---------- */
.course {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.course__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
}
.course__name {
  margin: 0;
  font-family: var(--font-head);
  font-size: 19px;
  font-weight: 600;
}
.course__meta {
  margin: 0;
  color: var(--accent-dark);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.course__desc { margin: 10px 0 8px; font-size: 14.5px; }
.course__points {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.course__points li {
  padding: 2px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 12.5px;
}

/* ---------- ステップ表示 ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 28px 0 20px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  padding-top: 8px;
  border-top: 3px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.steps li::before {
  content: counter(step) '. ';
  font-variant-numeric: tabular-nums;
}
.steps li.is-done { border-color: var(--accent-soft); border-top-color: #cdbde3; }
.steps li.is-current {
  border-top-color: var(--accent);
  color: var(--ink);
  font-weight: 700;
}

/* ---------- パネル共通 ---------- */
.panel__title {
  margin: 0 0 16px;
  font-family: var(--font-head);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.5;
}
.actions {
  display: flex;
  flex-wrap: wrap-reverse;
  gap: 10px;
  margin-top: 24px;
}
.actions--center { justify-content: center; }
.btn {
  flex: 1 1 200px;
  min-height: 52px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, opacity 0.15s;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); }
.btn--primary:disabled { opacity: 0.4; cursor: not-allowed; }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { background: var(--surface); }
.actions--center .btn { flex: 0 1 320px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- カレンダー ---------- */
.cal {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 10px 12px;
}
.cal__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.cal__month {
  margin: 0;
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.cal__btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.cal__btn:disabled { opacity: 0.3; cursor: not-allowed; }
.cal__week,
.cal__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal__week {
  margin-bottom: 4px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
.cal__week .is-sat { color: #4a78a8; }
.cal__week .is-sun { color: #b85a5a; }
.day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-height: 54px;
  padding: 4px 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.day--empty { visibility: hidden; }
button.day { cursor: pointer; background: var(--accent-soft); }
button.day:hover { border-color: var(--accent); }
.day.is-off { color: #b9b3c0; }
.day.is-today .day__num { text-decoration: underline; text-underline-offset: 3px; }
.day.is-selected { background: var(--accent); color: #fff; }
.day.is-selected .mark { color: #fff; }
.mark { font-size: 12px; line-height: 1; }
.mark--ok { color: var(--accent); }
.mark--few { color: var(--few); }
.mark--full,
.mark--none { color: #b9b3c0; }
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 12px 4px 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: var(--muted);
}
.legend .mark { margin-right: 4px; }

/* ---------- 時間枠 ---------- */
.slots { margin-top: 24px; }
.slots__title { margin: 0 0 10px; font-size: 15px; font-weight: 700; }
.slots__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 8px;
}
.slot {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.slot:hover { border-color: var(--accent); }
.slot.is-selected { background: var(--accent); border-color: var(--accent); color: #fff; }
.slot:disabled {
  background: transparent;
  color: #b9b3c0;
  font-weight: 400;
  text-decoration: line-through;
  cursor: not-allowed;
}
.slots__group + .slots__group { margin-top: 14px; }
.slots__period { margin: 0 0 6px; color: var(--muted); font-size: 13px; }
.avail-note { margin: 10px 4px 0; color: var(--muted); font-size: 12.5px; }
.avail-note:empty { display: none; }
.course__instructor { margin: 0 0 12px; font-size: 14px; font-weight: 700; }
.footer a { color: inherit; }
.slots__empty { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- フォーム ---------- */
.picked {
  margin: 0 0 20px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 700; }
.field input[type='text'],
.field input[type='email'],
.field input[type='tel'],
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
.field textarea { resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field.is-invalid input,
.field.is-invalid select { border-color: var(--error); }
.field--check label { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.field--check input { width: 20px; height: 20px; margin-top: 4px; accent-color: var(--accent); flex: none; }
.req {
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  vertical-align: 1px;
}
.field__err { margin: 6px 0 0; color: var(--error); font-size: 13px; }
.field__err:empty { display: none; }

/* ---------- 確認・完了 ---------- */
.summary {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 18px;
}
.summary > div {
  display: grid;
  grid-template-columns: 7.5em 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.summary > div:last-child { border-bottom: 0; }
.summary dt { color: var(--muted); font-size: 13.5px; }
.summary dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.notices {
  margin: 18px 0 0;
  padding: 0 0 0 1.2em;
  color: var(--muted);
  font-size: 13.5px;
}
.panel--done { text-align: center; }
.panel--done .summary,
.panel--done .notices { text-align: left; }
.done__mark {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin: 8px auto 14px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 28px;
}
.done__lead { margin: -8px 0 20px; }

/* ---------- フッター ---------- */
.footer {
  padding: 28px 16px 40px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.footer p { margin: 0; }
.footer p:first-child { color: var(--ink); font-family: var(--font-head); font-size: 15px; margin-bottom: 4px; }
