:root {
  --bg: #f7f5ef;
  --surface: #ffffff;
  --text: #2f3b32;
  --text-muted: #6b7568;
  --accent: #7c9473;
  --accent-dark: #5f7857;
  --accent-soft: #e8ede2;
  --gold: #c9a227;
  --gold-soft: #f3ead0;
  --border: #e3e0d5;
  --radius: 14px;
  --font-heading: 'Shippori Mincho', 'Noto Serif JP', serif;
  --font-body: 'Noto Sans JP', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.5;
  margin: 0 0 0.6em;
  letter-spacing: 0.02em;
}

p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

.demo-banner {
  background: var(--accent-dark);
  color: #fff;
  text-align: center;
  font-size: 0.75rem;
  padding: 6px 12px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 245, 239, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--accent-dark);
}

.logo svg { color: var(--gold); flex-shrink: 0; }
.logo small { display: block; font-size: 0.6rem; font-weight: 500; color: var(--text-muted); letter-spacing: 0.1em; font-family: var(--font-body); }

.nav { display: flex; align-items: center; gap: 26px; font-size: 0.88rem; font-weight: 500; }
.nav a { padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--accent-dark); }
.nav a.active { color: var(--accent-dark); border-bottom-color: var(--gold); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.btn-primary { background: var(--accent-dark); color: #fff; box-shadow: 0 8px 20px rgba(95,120,87,0.3); }
.btn-primary:hover { background: #4c6247; transform: translateY(-2px); }
.btn-primary:disabled { background: #b7c2b1; box-shadow: none; cursor: not-allowed; transform: none; }

.btn-outline { background: transparent; color: var(--accent-dark); border: 1.5px solid var(--accent-dark); }
.btn-outline:hover { background: var(--accent-soft); transform: translateY(-2px); }

.btn-gold { background: var(--gold); color: #fff; box-shadow: 0 8px 20px rgba(201,162,39,0.3); }
.btn-gold:hover { background: #ac8a1f; transform: translateY(-2px); }

.btn-ghost { background: var(--surface); color: var(--accent-dark); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); transform: translateY(-2px); }

.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; color: var(--accent-dark); }

/* Hero */
.hero { overflow: hidden; }

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(220px, 0.9fr);
  gap: 32px;
  align-items: center;
  padding: 76px 0;
}

.hero-label {
  display: inline-block;
  background: var(--gold-soft);
  color: #8a6d16;
  border-radius: 999px;
  padding: 5px 16px;
  font-size: 0.78rem;
  font-weight: 500;
  margin-bottom: 20px;
}

.hero-title { font-size: clamp(1.8rem, 1.2rem + 2.6vw, 2.7rem); color: var(--text); }
.hero-title .hi { color: var(--gold); }
.hero-sub { color: var(--text-muted); font-size: 0.98rem; max-width: 480px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 20px; }
.hero-visual img { display: block; width: 100%; }

/* Page header */
.page-header { background: var(--accent-soft); padding: 56px 0; }
.page-header .crumbs { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 8px; }
.page-header .crumbs a:hover { color: var(--accent-dark); }
.page-header h1 { margin: 0; font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.1rem); }

section { padding: 84px 0; }
.alt { background: var(--surface); }

.section-label {
  font-family: var(--font-heading);
  color: var(--gold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
  margin: 0 0 10px;
}

.section-title { font-size: clamp(1.4rem, 1.1rem + 1.4vw, 1.9rem); margin-bottom: 40px; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.alt .card { background: var(--bg); }
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(47,59,50,0.08); }

.card-icon {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent-dark);
  border-radius: 14px; margin-bottom: 16px;
}

.card h3 { font-size: 1.05rem; }
.card p { color: var(--text-muted); font-size: 0.9rem; margin: 0; }
.card .price { display: flex; align-items: baseline; gap: 10px; border-top: 1px dashed var(--border); padding-top: 14px; margin-top: 14px; }
.card .price span { color: var(--text-muted); font-size: 0.85rem; }
.card .price strong { font-size: 1.25rem; color: var(--accent-dark); }
.card .card-more { display: inline-block; margin-top: 14px; color: var(--accent-dark); font-size: 0.85rem; font-weight: 700; }
.card .card-more:hover { text-decoration: underline; }

/* Schedule teaser table */
.schedule-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; font-size: 0.9rem; }
.schedule-table th, .schedule-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); text-align: left; }
.schedule-table tr:last-child td { border-bottom: none; }
.schedule-table th { background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; }

/* Instructor cards */
.instructor-card { display: flex; gap: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.instructor-photo {
  flex-shrink: 0; width: 108px; height: 108px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-dark);
  display: flex; align-items: center; justify-content: center;
}
.instructor-card h3 { margin-bottom: 4px; }
.instructor-role { color: var(--gold); font-size: 0.82rem; font-weight: 700; margin-bottom: 10px; }
.instructor-card p:last-child { margin-bottom: 0; }

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, var(--accent-dark), #445a3f);
  color: #fff; text-align: center; border-radius: 20px; padding: 56px 32px;
}
.cta-band h2 { color: #fff; font-size: clamp(1.3rem, 1rem + 1.4vw, 1.7rem); }
.cta-band p { color: rgba(255,255,255,0.88); }
.cta-band .hero-actions { justify-content: center; }
.cta-band .btn-outline { color: #fff; border-color: rgba(255,255,255,0.5); }
.cta-band .btn-outline:hover { background: rgba(255,255,255,0.12); }

/* ===== Booking flow ===== */
.booking-steps {
  display: flex; justify-content: center; gap: 8px; margin-bottom: 48px; flex-wrap: wrap;
}
.booking-steps .step {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.85rem; color: var(--text-muted); font-weight: 500;
  padding: 8px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
}
.booking-steps .step .num {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--border); color: var(--text-muted);
  display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700;
}
.booking-steps .step.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-dark); }
.booking-steps .step.active .num { background: var(--accent-dark); color: #fff; }
.booking-steps .step.done .num { background: var(--gold); color: #fff; }

.booking-panel { display: none; }
.booking-panel.active { display: block; }

.course-pick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.course-pick {
  display: block; cursor: pointer;
  background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius);
  padding: 22px; transition: border-color 0.2s ease, background 0.2s ease;
}
.course-pick input { position: absolute; opacity: 0; pointer-events: none; }
.course-pick:has(input:checked) { border-color: var(--accent-dark); background: var(--accent-soft); }
.course-pick h3 { font-size: 1rem; margin-bottom: 4px; }
.course-pick .meta { font-size: 0.85rem; color: var(--text-muted); }
.course-pick .price { border-top: none; padding-top: 8px; margin-top: 8px; }

.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin-bottom: 8px; }
.slot {
  display: block; cursor: pointer; text-align: center;
  background: var(--surface); border: 2px solid var(--border); border-radius: 10px;
  padding: 12px 8px; font-size: 0.85rem; transition: border-color 0.2s ease, background 0.2s ease;
}
.slot input { position: absolute; opacity: 0; pointer-events: none; }
.slot .d { font-weight: 700; display: block; }
.slot .t { color: var(--text-muted); font-size: 0.8rem; }
.slot:has(input:checked) { border-color: var(--gold); background: var(--gold-soft); }
.slot.full { opacity: 0.4; cursor: not-allowed; }
.slot.full .t::after { content: "（満席）"; }

.day-block { margin-bottom: 28px; }
.day-block h3 { font-size: 0.95rem; color: var(--accent-dark); margin-bottom: 12px; }

.form-row { margin-bottom: 20px; max-width: 480px; }
.form-row label { display: block; font-weight: 700; font-size: 0.88rem; margin-bottom: 6px; }
.req { display: inline-block; background: var(--gold); color: #fff; font-size: 0.66rem; border-radius: 3px; padding: 1px 6px; margin-left: 8px; vertical-align: 2px; }
.form-row input, .form-row textarea { width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 8px; font: inherit; background: var(--bg); color: var(--text); }
.form-row input:focus, .form-row textarea:focus { outline: none; border-color: var(--accent); background: #fff; }

.summary-box {
  background: var(--accent-soft); border-radius: var(--radius); padding: 24px 28px; margin-bottom: 28px; max-width: 480px;
}
.summary-box dl { display: grid; grid-template-columns: 88px 1fr; gap: 8px 12px; margin: 0; font-size: 0.9rem; }
.summary-box dt { color: var(--text-muted); }
.summary-box dd { margin: 0; font-weight: 500; }

.booking-nav { display: flex; gap: 12px; margin-top: 32px; }

.confirm-box {
  text-align: center; padding: 40px 20px;
}
.confirm-icon {
  width: 72px; height: 72px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 24px;
}

#confirm-pre.hide { display: none; }
#confirm-done { display: none; }
#confirm-done.show { display: block; }

/* ===== Login / mypage ===== */
.login-card {
  max-width: 420px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 40px 36px;
}
.login-demo-hint {
  background: var(--gold-soft); color: #7a611a; border-radius: 8px; padding: 12px 16px; font-size: 0.82rem; margin-bottom: 24px;
}

.login-error {
  display: none;
  background: #fbe6e2; color: #a8402a; border-radius: 8px; padding: 12px 16px; font-size: 0.85rem; margin-bottom: 18px;
}
.login-error.show { display: block; }

.mypage-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 24px; }
.profile-card { text-align: center; }
.profile-avatar {
  width: 84px; height: 84px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 14px;
}
.profile-card h3 { margin-bottom: 2px; }
.profile-card p { color: var(--text-muted); font-size: 0.85rem; }

.reservation-item {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 0; border-bottom: 1px solid var(--border);
}
.reservation-item:last-child { border-bottom: none; }
.reservation-item .r-date { font-weight: 700; color: var(--accent-dark); font-size: 0.95rem; }
.reservation-item .r-course { font-size: 0.85rem; color: var(--text-muted); }
.reservation-item .badge { font-size: 0.75rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); }
.reservation-item .badge.past { background: var(--border); color: var(--text-muted); }

#mypage-dashboard { display: none; }
#mypage-dashboard.show { display: block; }
#login-section.hide { display: none; }

/* Footer */
.site-footer { background: #2f3b32; color: #b7c1b0; padding: 56px 0 28px; font-size: 0.85rem; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 0.8fr 0.8fr; gap: 40px; margin-bottom: 40px; }
.footer-grid h4 { color: #fff; font-size: 0.9rem; margin-bottom: 14px; font-family: var(--font-heading); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a:hover { color: #fff; }
.footer-logo { display: flex; align-items: center; gap: 10px; color: #fff; font-family: var(--font-heading); font-weight: 700; font-size: 1.1rem; margin-bottom: 14px; }
.footer-logo svg { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 22px; text-align: center; font-size: 0.76rem; }
.footer-bottom p { margin: 4px 0; }

.sp-only { display: none; }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; padding: 56px 0; }
  .hero-visual { max-width: 300px; margin: 0 auto; }
  .instructor-card { flex-direction: column; align-items: flex-start; }
  .mypage-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .sp-only { display: inline; }
  .menu-toggle { display: block; }
  .nav {
    position: absolute; top: 76px; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 24px 16px; display: none;
  }
  .nav a { padding: 12px 4px; border-bottom: 1px solid var(--border); }
  .site-header.nav-open .nav { display: flex; }
  .header-cta { display: none; }
  section { padding: 60px 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .booking-steps .step span.label { display: none; }
}
