/* ============================================================
   生徒側サイト共通スタイル
   ============================================================ */
:root {
  --paper: #faf7f2;
  --paper-deep: #f1ebe1;
  --ink: #26221d;
  --muted: #7d7568;
  --line: #e7e0d4;
  --accent: #b3433d;        /* 朱色 */
  --accent-dark: #92332e;
  --accent-soft: #f7e8e5;
  --ok: #3a7d44;
  --ok-soft: #e8f3ea;
  --warn: #a06a00;
  --warn-soft: #fdf3df;
  --card-shadow: 0 2px 14px rgba(60, 45, 30, 0.07);
  --radius: 12px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", "Noto Sans JP", "Yu Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.7;
}
img { max-width: 100%; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.35; }

.container { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.page-main { min-height: 62vh; padding-bottom: 64px; }

/* ---------- Header ---------- */
.site-header {
  background: rgba(250, 247, 242, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand {
  font-weight: 700; font-size: 1.15rem; color: var(--ink);
  text-decoration: none; letter-spacing: 0.02em; white-space: nowrap;
}
.brand::before { content: "語"; display: inline-block; margin-right: 8px; color: #fff; background: var(--accent); border-radius: 8px; width: 30px; height: 30px; line-height: 30px; text-align: center; font-size: 0.95rem; vertical-align: -6px; }
.main-nav { display: flex; align-items: center; gap: 20px; flex: 1; }
.main-nav a { color: var(--ink); text-decoration: none; font-size: 0.95rem; padding: 4px 2px; }
.main-nav a:hover { color: var(--accent); }
.nav-auth { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.nav-signup {
  background: var(--accent); color: #fff !important; padding: 7px 16px !important;
  border-radius: 999px; font-weight: 600;
}
.nav-signup:hover { background: var(--accent-dark); }
.header-right { display: flex; align-items: center; gap: 14px; }
.lang-switch {
  font-size: 0.85rem; color: var(--muted); text-decoration: none;
  border: 1px solid var(--line); padding: 5px 12px; border-radius: 999px; background: #fff;
  white-space: nowrap;
}
.lang-switch:hover { color: var(--accent); border-color: var(--accent); }
.menu-trigger {
  display: none;
  align-items: center; justify-content: center; line-height: 1;
  width: 42px; height: 42px; font-size: 1.3rem;
  background: none; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; color: var(--ink);
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--paper-deep); }
.footer-inner { padding: 28px 20px; display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 0.85rem; }
.footer-links a:hover { color: var(--accent); }
.footer-copy { color: var(--muted); font-size: 0.85rem; }

/* ---------- Buttons / forms ---------- */
.btn {
  display: inline-block; background: var(--accent); color: #fff; border: none; cursor: pointer;
  padding: 12px 26px; border-radius: 999px; font-size: 1rem; font-weight: 600;
  text-decoration: none; text-align: center; transition: background 0.15s;
  font-family: inherit;
}
.btn:hover { background: var(--accent-dark); }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--paper-deep); color: var(--ink); }
.btn-small { padding: 7px 16px; font-size: 0.88rem; }
.btn-danger { background: #fff; color: var(--accent); border: 1px solid var(--accent); }
.btn-danger:hover { background: var(--accent-soft); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 6px; }
.field .hint { font-size: 0.82rem; color: var(--muted); margin-top: 4px; }
input[type="text"], input[type="email"], input[type="password"], input[type="date"],
input[type="time"], input[type="number"], input[type="url"], select, textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 1rem; font-family: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(179, 67, 61, 0.35); border-color: var(--accent); }
textarea { min-height: 110px; resize: vertical; }

.form-narrow { max-width: 440px; margin: 40px auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--card-shadow); }
.form-narrow h1 { margin-top: 0; font-size: 1.5rem; }
.form-links { font-size: 0.9rem; margin-top: 18px; color: var(--muted); }

/* ---------- Flash / alerts ---------- */
.flash { margin: 18px 0 0; padding: 13px 18px; border-radius: 10px; font-size: 0.95rem; }
.flash-ok { background: var(--ok-soft); color: var(--ok); border: 1px solid #c6e2cc; }
.flash-err { background: var(--accent-soft); color: var(--accent-dark); border: 1px solid #ecc9c4; }
.flash-warn { background: var(--warn-soft); color: var(--warn); border: 1px solid #ecd9ac; }
.notice { background: var(--warn-soft); border: 1px solid #ecd9ac; color: var(--warn); border-radius: 10px; padding: 12px 16px; font-size: 0.92rem; }

/* ---------- Hero ---------- */
.hero { padding: 84px 0 70px; text-align: center; background: linear-gradient(180deg, #fdfbf7 0%, var(--paper) 100%); border-bottom: 1px solid var(--line); }
.hero-kicker { color: var(--accent); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.82rem; margin-bottom: 14px; }
.hero h1 { font-size: clamp(1.7rem, 4.5vw, 2.7rem); margin: 0 0 18px; }
.hero p { max-width: 620px; margin: 0 auto 30px; color: var(--muted); font-size: 1.05rem; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Sections ---------- */
.section { padding: 60px 0 10px; }
.section-title { text-align: center; font-size: 1.55rem; margin: 0 0 8px; }
.section-sub { text-align: center; color: var(--muted); margin: 0 auto 36px; max-width: 640px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--card-shadow);
}
.card h3 { margin: 0 0 10px; font-size: 1.08rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.card .num { display: inline-block; background: var(--accent-soft); color: var(--accent); font-weight: 700; border-radius: 8px; padding: 2px 10px; font-size: 0.85rem; margin-bottom: 12px; }

.cta-band { margin: 70px 0 0; padding: 54px 0; background: var(--ink); color: #fff; text-align: center; }
.cta-band h2 { margin: 0 0 22px; font-size: 1.5rem; }

/* ---------- Price cards ---------- */
.price-card { display: flex; flex-direction: column; }
.price-card .price { font-size: 1.7rem; font-weight: 700; color: var(--ink); margin: 8px 0 2px; }
.price-card .per { color: var(--muted); font-size: 0.85rem; margin-bottom: 12px; }
.price-card .desc { flex: 1; }
.price-card .meta { color: var(--muted); font-size: 0.85rem; margin: 10px 0; }
.price-card .btn { margin-top: 14px; }
.badge-duration { display: inline-block; background: var(--paper-deep); border-radius: 999px; padding: 3px 12px; font-size: 0.82rem; color: var(--muted); }

/* ---------- Booking ---------- */
.book-step { margin: 34px 0 10px; font-size: 1.15rem; }
.option-list { display: grid; gap: 12px; }
.option-item {
  display: flex; align-items: center; gap: 14px; background: #fff; border: 1.5px solid var(--line);
  border-radius: var(--radius); padding: 15px 18px; cursor: pointer; transition: border-color 0.12s;
}
.option-item:hover { border-color: #cbb9a3; }
.option-item.selected { border-color: var(--accent); background: #fffdfa; }
.option-item input { accent-color: var(--accent); width: 18px; height: 18px; }
.option-main { flex: 1; }
.option-name { font-weight: 600; }
.option-sub { font-size: 0.85rem; color: var(--muted); }
.option-price { font-weight: 700; white-space: nowrap; }

.tz-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0 22px; font-size: 0.92rem; color: var(--muted); }
.tz-bar select { width: auto; max-width: 320px; padding: 8px 12px; font-size: 0.9rem; }

.slot-day { margin-bottom: 26px; }
.slot-day h4 { margin: 0 0 10px; font-size: 0.98rem; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.slot-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.slot-chip {
  border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 16px;
  font-size: 0.95rem; cursor: pointer; font-family: inherit; color: var(--ink);
}
.slot-chip:hover { border-color: var(--accent); color: var(--accent); }
.slot-chip.selected { background: var(--accent); border-color: var(--accent); color: #fff; }
.slot-pager { display: flex; justify-content: space-between; margin: 20px 0; }
.slots-empty { color: var(--muted); padding: 26px 0; }

.confirm-box { background: #fff; border: 1.5px solid var(--accent); border-radius: var(--radius); padding: 24px; margin-top: 26px; }
.confirm-box h3 { margin-top: 0; }
.confirm-line { margin: 6px 0; }
.confirm-note { font-size: 0.85rem; color: var(--muted); margin: 14px 0; }

/* ---------- My page ---------- */
.my-section { margin: 38px 0; }
.my-section > h2 { font-size: 1.2rem; border-left: 4px solid var(--accent); padding-left: 12px; }
.lesson-row {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 20px; margin-bottom: 12px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.lesson-when { font-weight: 600; min-width: 230px; }
.lesson-what { color: var(--muted); font-size: 0.9rem; flex: 1; }
.lesson-actions { display: flex; gap: 10px; align-items: center; }
.lesson-note { width: 100%; background: var(--paper); border-radius: 8px; padding: 10px 14px; font-size: 0.9rem; }
.lesson-note b { color: var(--accent); }

.badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
.st-pending, .st-pending_payment { background: var(--warn-soft); color: var(--warn); }
.st-confirmed { background: var(--ok-soft); color: var(--ok); }
.st-completed { background: #e8eef5; color: #33587e; }
.st-declined, .st-expired, .st-cancelled_student, .st-cancelled_teacher, .st-no_show { background: #eee9e1; color: var(--muted); }

.credit-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.credit-left { font-size: 1.25rem; font-weight: 700; color: var(--accent); white-space: nowrap; }

/* ---------- Tables / legal ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; font-size: 0.93rem; vertical-align: top; }
.table th { background: var(--paper-deep); font-size: 0.85rem; }
.legal-body { max-width: 760px; margin: 0 auto; }
.legal-body h1 { font-size: 1.5rem; }
.legal-body h2 { font-size: 1.1rem; margin-top: 34px; }

.page-title { font-size: 1.7rem; margin: 42px 0 10px; }
.page-sub { color: var(--muted); margin-bottom: 30px; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .grid3 { grid-template-columns: 1fr; }
  .main-nav {
    display: none;
    position: absolute; top: 64px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: flex-start; gap: 0; padding: 8px 0;
  }
  .main-nav.open { display: flex; }
  .main-nav a { display: block; width: 100%; padding: 13px 24px; }
  .nav-auth { flex-direction: column; align-items: flex-start; gap: 0; margin-left: 0; width: 100%; }
  .nav-auth a { width: 100%; padding: 13px 24px; }
  .nav-signup { border-radius: 0; background: var(--accent-soft); color: var(--accent) !important; }
  .menu-trigger { display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
  .header-inner { justify-content: space-between; }
  .hero { padding: 56px 0 48px; }
  .lesson-when { min-width: 0; width: 100%; }
}
