:root {
  --bg: #fff9f7;
  --card: #ffffff;
  --ink: #33302e;
  --sub: #7a716c;
  --line: #f0ddd8;
  --accent: #d4577a;
  --accent-soft: #fbe9ee;
  --radius: 16px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* Page-level safety net: nothing may scroll the page sideways
 * (overflow-x: clip, unlike hidden, keeps position: sticky working).
 * Real overflow sources are fixed at their components below. */
html, body { overflow-x: clip; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP",
    "Segoe UI", system-ui, sans-serif;
  line-height: 1.7;
  font-size: 16.5px;
}

a { color: var(--accent); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 24px;
  background: rgba(255, 249, 247, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-weight: 800;
  font-size: 20px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.04em;
}
.brand span { color: var(--accent); font-size: 14px; font-weight: 600; }

.site-header nav {
  margin-left: auto;
  display: flex;
  gap: 20px;
}
.site-header nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.15s var(--ease-out);
}
.site-header nav a:hover { color: var(--accent); }
.site-header nav a#nav-admin { color: var(--accent); font-weight: 700; }

/* ---------- Button system (public site) ----------
 * One system for every call-to-action on the public pages:
 *   .btn         primary (pink pill)
 *   .btn-ghost   secondary (white, pink outline)
 *   .btn-light   white button for the pink CTA band
 *   .btn-small   compact size modifier
 * The base rule fully resets native <button> chrome (border, font,
 * appearance) so <button class="btn"> and <a class="btn"> render
 * identically — a .btn must never pick up the UA default border
 * (that was the clunky dark outline on the course-card buttons). */
button { font-family: inherit; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.35;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: 0 6px 18px rgba(212, 87, 122, 0.28);
  transition: transform 0.16s var(--ease-out), box-shadow 0.15s ease,
    background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(212, 87, 122, 0.34);
  }
}
.btn:active { transform: translateY(0) scale(0.97); box-shadow: 0 4px 12px rgba(212, 87, 122, 0.26); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-small { padding: 8px 20px; font-size: 14.5px; }
.btn-ghost {
  background: var(--card);
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: none;
}
.btn-ghost:hover { background: var(--accent-soft); box-shadow: none; }
.btn-ghost:active { box-shadow: none; }
.btn-light { background: #fff; color: var(--accent); box-shadow: 0 6px 18px rgba(0,0,0,0.15); }
.btn-light:focus-visible { outline-color: #fff; }
/* Round icon buttons (reviews pager, calendar nav, modal close)
 * share the system's keyboard-focus ring. */
.vp-btn:focus-visible, .cal-nav:focus-visible, .modal-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

.hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: 72px 24px 64px;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  color: var(--accent);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.11em;
  margin: 0 0 14px;
}
.eyebrow.center, h2.center { text-align: center; }

.hero h1 {
  font-size: clamp(34px, 4.8vw, 50px);
  line-height: 1.22;
  margin: 0 0 20px;
  max-width: 560px;
  /* Even, deliberate line breaks instead of ragged wraps (the hard
     <br> is gone); unsupported browsers just wrap at the column edge. */
  text-wrap: balance;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
}

.lead { font-size: 18px; color: var(--sub); margin: 0 0 30px; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 36px; }

.hero-stats {
  display: flex;
  gap: 34px;
  list-style: none;
  margin: 26px 0 0;
  padding: 24px 0 0;
  border-top: 1px dashed var(--line);
}
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 21px; color: var(--accent); }
.hero-stats span { font-size: 13px; color: var(--sub); }

.hero-langs { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 18px 0 0; padding: 0; }
.hero-langs li {
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 14px;
  color: var(--ink);
}
.hero-langs span { color: var(--sub); }
/* Task 8: the "(13 years teaching English)" credential inside the
 * English chip drops to its own quieter sub-line instead of being
 * squeezed onto the chip's main line. The span exists only in that
 * chip, in all three front-end languages. */
.hero-langs li span { display: block; font-size: 12.5px; margin-top: 1px; }

/* The photo + caption read as ONE composed unit, centered against the
 * text column (the .hero grid already centers items vertically). */
.hero-photo { text-align: center; justify-self: center; position: relative; }
.hero-photo-frame { position: relative; width: fit-content; margin: 0 auto; }
/* Pale-pink disc behind the photo, offset up-right: a deliberate anchor
   so the portrait feels placed rather than floating. */
.hero-photo-frame::before {
  content: "";
  position: absolute;
  width: 106%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--accent-soft);
  top: -4%;
  right: -9%;
  z-index: 0;
}
/* Echo ring in the photo's own organic shape, nudged down-right. */
.hero-photo-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50% 50% 46% 54% / 55% 52% 48% 45%;
  border: 2px solid rgba(212, 87, 122, 0.35);
  transform: translate(10px, 12px);
  z-index: 0;
}
.hero-photo img {
  position: relative;
  z-index: 1;
  display: block;
  width: min(288px, 78vw);
  height: auto;
  border-radius: 50% 50% 46% 54% / 55% 52% 48% 45%;
  border: 6px solid #fff;
  box-shadow: 0 18px 40px rgba(212, 87, 122, 0.22);
}
.hero-photo-caption { font-size: 17px; margin: 18px 0 0; position: relative; }
.hero-photo-caption small { color: var(--sub); }

/* The language chips live in the photo column now (moved out of the
 * text column): stacked under the caption, centred, completing the
 * photo + caption + chips unit that the hero grid centres vertically
 * against the text column. The chips' own pill styling is untouched;
 * the long English chip may wrap inside its pill rather than
 * overflow the narrower column. */
.hero-photo .hero-langs {
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  margin-top: 20px;
}
.hero-photo .hero-langs li { max-width: 100%; text-align: center; }

.section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 64px 24px;
}
.section-alt {
  background: var(--card);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}
.section-alt > * { max-width: 1080px; margin-left: auto; margin-right: auto; padding-left: 24px; padding-right: 24px; }

.section h2, .cta h2 {
  font-size: clamp(26px, 3.4vw, 36px);
  margin: 0 0 30px;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
}
/* Sections where the eyebrow IS the heading (the big restating h2
   was removed): keep the small pink eyebrow look on the h2. */
.section h2.eyebrow {
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.11em;
  color: var(--accent);
  margin: 0 0 16px;
}
/* Alt sections center each direct child via .section-alt > * (auto side
   margins), but the h2 rules above zero those margins and outrank it, so
   headings in alt sections hug the left edge. Restore their centering. */
.section.section-alt > h2 {
  margin-left: auto;
  margin-right: auto;
}
.section-lead { color: var(--sub); max-width: 640px; }

.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: 0 8px 24px rgba(51, 48, 46, 0.05);
  transition: transform 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out), border-color 0.18s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .card:hover {
    transform: translateY(-4px);
    border-color: #eecdd7;
    box-shadow: 0 16px 34px rgba(212, 87, 122, 0.14);
  }
}
.card-icon { font-size: 34px; }
.card h3 { margin: 10px 0 10px; font-size: 19px; }
.card p { margin: 0; color: var(--sub); font-size: 15.5px; }

.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 44px;
}
.about-grid p { margin: 0 0 16px; }

.fact-list { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.fact-list div {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
}
.fact-list dt { font-size: 12.5px; font-weight: 800; letter-spacing: 0.1em; color: var(--accent); }
.fact-list dd { margin: 2px 0 0; font-size: 15px; }

/* Lessons: Sakura-inspired card grid — icon medallion + small pink
 * label on top, tidy type, arrow CTA pinned to the card foot so every
 * card in a row is the same height; hover lifts the card and zooms
 * the medallion. Stacks to one column on mobile. */
.lesson-list { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.lesson {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 6px 18px rgba(51, 48, 46, 0.04);
  transition: transform 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out), border-color 0.18s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .lesson:hover {
    transform: translateY(-4px);
    border-color: #eecdd7;
    box-shadow: 0 16px 34px rgba(212, 87, 122, 0.14);
  }
}
.lesson-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.lesson-icon {
  width: 52px; height: 52px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 26px;
  background: var(--accent-soft);
  border-radius: 50%;
  transition: transform 0.18s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .lesson:hover .lesson-icon { transform: scale(1.1); }
}
.lesson-label { margin: 0; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: 0.14em; }
.lesson h3 { margin: 0 0 8px; font-size: 20.5px; line-height: 1.35; }
.lesson p { margin: 0 0 8px; }
.lesson-for { color: var(--sub); font-size: 14.5px; margin-bottom: 0; }
.lesson .book-course { margin-top: auto; align-self: flex-start; }
.lesson p.lesson-for { margin-bottom: 16px; }
@media (max-width: 700px) {
  .lesson-list { grid-template-columns: 1fr; }
  .lesson { padding: 22px 20px; }
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.price-table th, .price-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.price-table thead th { background: var(--accent-soft); font-size: 14px; letter-spacing: 0.06em; }
.price-table tbody tr:last-child td { border-bottom: 0; }
.note { color: var(--sub); font-size: 14.5px; }

/* ---------- Price card (Sakura-style single card) ---------- */
.price-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 36px 40px 30px;
  box-shadow: 0 18px 44px rgba(212, 87, 122, 0.10);
}
.price-card-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.price-eyebrow { color: var(--accent); font-size: 14px; font-weight: 800; letter-spacing: 0.14em; margin: 0 0 8px; }
.price-title { font-family: "Hiragino Mincho ProN", "Yu Mincho", serif; font-size: clamp(24px, 3vw, 32px); margin: 0 0 10px; }
.price-sub { color: var(--sub); margin: 0; max-width: 560px; }
.price-grid { margin-top: 28px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.price-grid-head, .price-row {
  display: grid; grid-template-columns: 1.1fr 1fr 1.2fr auto; gap: 16px; align-items: center;
  padding: 15px 22px;
}
.price-grid-head { background: var(--accent-soft); font-size: 13.5px; font-weight: 800; letter-spacing: 0.07em; color: var(--sub); }
.price-row { border-top: 1px solid var(--line); transition: background 0.15s var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .price-row:hover { background: #fff7f9; }
}
.price-dur { font-weight: 700; font-size: 17px; }
.price-amt { color: var(--accent); font-weight: 800; font-size: 20px; }
.price-per { color: var(--sub); font-size: 14.5px; }
.price-packages { display: grid; grid-template-columns: 180px 1fr; border-top: 1px solid var(--line); background: #fffcfb; }
.price-pkg-label {
  display: flex; align-items: center; padding: 20px 22px; font-weight: 800; font-size: 16.5px;
  border-right: 1px solid var(--line); line-height: 1.45;
}
.price-pkg-list { display: flex; flex-direction: column; }
.price-pkg-row {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 16px 22px;
}
.price-pkg-row + .price-pkg-row { border-top: 1px dashed var(--line); }
.price-pkg-main { display: flex; flex-direction: column; min-width: 170px; }
.price-pkg-main strong { font-size: 16.5px; }
.price-pkg-per { color: var(--sub); font-size: 13px; }
.price-pkg-totals { display: flex; gap: 16px; flex-wrap: wrap; margin-left: auto; }
.price-pkg-totals span { display: flex; flex-direction: column; line-height: 1.3; }
.price-pkg-totals small { color: var(--sub); font-size: 11.5px; letter-spacing: 0.04em; }
.price-pkg-totals b { color: var(--accent); font-size: 16.5px; }
.price-pkg-totals s { color: var(--sub); font-size: 13.5px; }
.save-badge {
  display: inline-block; align-self: flex-start;
  background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: 0.03em;
  padding: 2px 7px; border-radius: 999px; white-space: nowrap;
}
.choice .save-badge { margin-left: 8px; align-self: center; }
.bk-total-row s { color: var(--sub); }
.price-note { margin: 16px 2px 0; }
.price-card-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: 18px;
}
.price-card-foot .note { margin: 0; }
@media (max-width: 700px) {
  .price-card { padding: 26px 18px 22px; border-radius: 22px; }
  .price-grid-head { display: none; }
  .price-row { grid-template-columns: 1fr auto; row-gap: 4px; padding: 14px 16px; }
  .price-per { grid-column: 1; }
  .price-action { grid-column: 2; grid-row: 1 / span 2; }
  .price-packages { grid-template-columns: 1fr; }
  .price-pkg-label { border-right: none; border-bottom: 1px solid var(--line); padding: 14px 16px; }
  .price-pkg-label br { display: none; }
  .price-pkg-row { padding: 14px 16px; }
  .price-pkg-totals { margin-left: 0; }
  .price-card-foot .btn { width: 100%; }
}

.rating-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 24px;
}
.rating-big { display: flex; flex-direction: column; }
.rating-big strong { font-size: 42px; line-height: 1; color: var(--accent); }
.rating-big span { color: var(--accent); letter-spacing: 0.2em; }
.rating-big small { color: var(--sub); }
.rating-bars { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 30px; }
.rating-bars li { display: flex; gap: 12px; justify-content: space-between; min-width: 170px; }
/* Mobile: the desktop li min-width (170px × 2 + gap) is wider than a
 * phone card, so the right column (Clarity / its 4.9) spilled past
 * the card edge. One pair per row, no min-width, full card width —
 * label left, score right, always inside the padding. */
@media (max-width: 560px) {
  .rating-summary { padding: 20px; gap: 18px; }
  .rating-bars { grid-template-columns: minmax(0, 1fr); width: 100%; }
  .rating-bars li { min-width: 0; }
}
/* Long unbroken strings (meeting URLs, emails) in booking summary
 * tables must wrap instead of widening the page on narrow screens. */
.summary td { overflow-wrap: anywhere; }
.rating-note { flex-basis: 100%; margin: 0; color: var(--sub); font-size: 14.5px; }

/* Desktop pager shows 6 reviews per page as 3 columns × 2 rows —
 * never a 3-row arrangement at any width ≥861px. */
.voices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.voices blockquote {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
}
.voices blockquote p { margin: 0 0 10px; }
/* Long reviews: only the text scrolls — the star row above and the
 * reviewer row below stay put (the reviewer row is pinned to the
 * card's bottom edge, so cards in a grid row line up). The cap
 * (~9 lines) bounds every card's height, so the desktop pager's
 * 2-row grid never grows because one review is long. */
.voices blockquote p:not(.stars) {
  overflow-y: auto;
  min-height: 0;
  max-height: 14.5em;
  line-height: 1.6;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: #eecdd7 transparent;
}
.voices blockquote p:not(.stars)::-webkit-scrollbar { width: 6px; }
.voices blockquote p:not(.stars)::-webkit-scrollbar-thumb {
  background: #eecdd7;
  border-radius: 3px;
}
.voices blockquote p:not(.stars)::-webkit-scrollbar-track { background: transparent; }
.voices footer.reviewer { margin-top: auto; }
.voices footer { color: var(--sub); font-size: 14px; }

/* Per-card star row inside each review blockquote. */
.voices .stars {
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.2em;
  margin: 0 0 8px;
}

/* Reviewer name in the card footer stands out from the muted footer text. */
.voices footer strong { color: var(--ink); font-weight: 700; }

/* Reviewer row: round avatar (or an initial circle for reviewers
   without a photo) left of the stacked name + date. */
.voices footer.reviewer { display: flex; align-items: center; gap: 12px; }
.reviewer-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}
.reviewer-initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
  font-size: 19px;
}
.reviewer-meta { display: flex; flex-direction: column; line-height: 1.35; }
.reviewer-meta small { color: var(--sub); }

/* Reviews pager: one control row under the cards — arrows + dots +
   a page counter on desktop; on mobile the dots track the carousel. */
.voices-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 20px;
}
.vp-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  /* Flex-centred chevron, same fix as .cal-nav / .modal-close. */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: border-color 0.15s var(--ease-out), color 0.15s var(--ease-out), transform 0.16s var(--ease-out);
}
.vp-btn:active:not(:disabled) { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .vp-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
}
.vp-btn:disabled { opacity: 0.35; cursor: default; }
.vp-dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.vp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: var(--line);
  cursor: pointer;
}
.vp-dot.active { background: var(--accent); }
.vp-count { color: var(--sub); font-size: 13px; font-variant-numeric: tabular-nums; min-width: 34px; }
@keyframes vpFade { from { opacity: 0.25; } to { opacity: 1; } }
.voices.vp-fade { animation: vpFade 0.25s var(--ease-out); }
@media (min-width: 861px) {
  .voices blockquote.vp-off { display: none; }
}

.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 12px;
}
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin: 10px 0 2px; color: #55504d; }

.cta {
  text-align: center;
  padding: 72px 24px;
  background: linear-gradient(135deg, #e0688a, #d4577a 55%, #c2496e);
  color: #fff;
}
.cta h2 { margin-bottom: 10px; }
.cta p { margin: 0 0 26px; opacity: 0.92; }

.site-footer {
  text-align: center;
  padding: 34px 24px 44px;
  color: var(--sub);
  font-size: 14.5px;
}
.site-footer p { margin: 4px 0; }
.footer-social a { color: var(--accent); font-weight: 700; text-decoration: none; }
.footer-social a:hover { text-decoration: underline; }

/* ---------- Contact (pale-pink, two columns + thin divider) ---------- */
.section-contact { background: #fdf1f4; }
.contact-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 0;
  align-items: start;
}
.contact-left { padding-right: 44px; }
.contact-intro { font-size: 17px; margin: 0 0 22px; max-width: 480px; }
.contact-submit { width: 100%; }
.contact-success {
  margin: 14px 0 0; padding: 12px 16px;
  background: #eaf6ec; border: 1px solid #bfe3c6; border-radius: 10px;
  color: #2e7d32; font-size: 15px;
}
.contact-right {
  border-left: 1px solid #f3cbd6;
  padding-left: 44px;
  text-align: left;
}
.contact-avatar {
  width: 120px; height: 120px; border-radius: 50%; object-fit: cover;
  border: 4px solid #fff; box-shadow: 0 10px 26px rgba(212, 87, 122, 0.20);
}
.contact-name { font-size: 22px; font-weight: 800; margin: 14px 0 0; }
.contact-brand { color: var(--accent); font-weight: 700; margin: 0; }
.contact-loc { color: var(--sub); margin: 2px 0 18px; }
.contact-label { color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: 0.14em; margin: 16px 0 2px; }
.contact-right p { margin-top: 0; }
.contact-right a { word-break: break-all; }
.contact-ig { font-weight: 700; text-decoration: none; }
.contact-ig:hover { text-decoration: underline; }
@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-left { padding-right: 0; }
  .contact-right {
    border-left: none; border-top: 1px solid #f3cbd6;
    padding-left: 0; padding-top: 28px; margin-top: 30px;
  }
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 44px; gap: 0; }
  /* Stacked hero: the two column wrappers dissolve (display:
   * contents) so every piece joins the hero grid directly and can
   * be ordered — the visual sequence stays exactly what it was
   * (photo, caption, eyebrow, headline, lead, CTAs, language chips
   * right under the CTAs, stats), even though the chips now live
   * inside the photo unit in the DOM for the desktop layout.
   * Spacing comes from the pieces' own margins, as before. */
  .hero-text, .hero-photo { display: contents; }
  .hero-photo-frame { order: 1; justify-self: center; }
  .hero-photo-caption { order: 2; }
  .hero .eyebrow { order: 3; margin-top: 32px; }
  .hero h1 { order: 4; }
  .hero .lead { order: 5; }
  .hero-cta { order: 6; }
  .hero-langs { order: 7; }
  .hero-stats { order: 8; }
  .cards-3, .voices, .about-grid { grid-template-columns: 1fr; }
  .site-header nav { display: none; }
  .hero-stats { gap: 22px; flex-wrap: wrap; }
  /* Mobile header: brand on ONE line (smaller type, no truncation)
   * and the Book button as a single-line pill that never shrinks or
   * wraps — at 360px the two fit side by side with room to spare.
   * (The nav, incl. the Admin shortcut, is hidden at this width and
   * the account avatar lives in My Bookings, so nothing else in the
   * header can overflow.) */
  .site-header { gap: 10px; padding: 10px 12px; align-items: center; }
  .brand { font-size: 15px; white-space: nowrap; }
  .brand span { font-size: 12px; }
  .site-header .btn {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 8px 13px;
    font-size: 13px;
  }
}

/* ---------- Booking flow ---------- */

.hidden { display: none !important; }

/* Booking progress: a classic stepper, NOT a button row — numbered
 * round nodes joined by a track line, cursor: default, no hover.
 * State classes come from showPane in app.js (unchanged): .done for
 * steps behind, .active for the current step, neither for todo.
 * .done swaps the number for a ✓ (pure CSS); the track segment
 * BEFORE a step fills pink once that step is done or current, so the
 * filled line always reaches exactly the current step. */
.steps {
  display: flex;
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  cursor: default;
}
.steps li {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  color: var(--sub);
  font-size: 13.5px;
  font-weight: 600;
}
.steps li::before {
  content: "";
  position: absolute;
  top: 15px; /* centred on the 32px dot */
  left: -50%;
  width: 100%;
  height: 2px;
  background: var(--line);
}
.steps li:first-child::before { display: none; }
.steps li.done::before, .steps li.active::before { background: var(--accent); }
.step-dot {
  position: relative;
  z-index: 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--sub);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
.steps li.active .step-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 5px var(--accent-soft); /* restrained halo */
}
.steps li.done .step-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-size: 0; /* hide the number; the ✓ below replaces it */
}
.steps li.done .step-dot::after { content: "✓"; font-size: 15px; font-weight: 800; }
.step-label { white-space: nowrap; }
.steps li.active .step-label { color: var(--ink); font-weight: 800; }
.steps li.done .step-label { color: var(--accent); }

.booking-box, .lookup-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 8px 24px rgba(51, 48, 46, 0.05);
}
.lookup-box { max-width: 640px; }

/* Google-only sign-in (Sakura-style single button). */
.google-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #dadce0;
  /* Google's white brand look, aligned to the button system's
     pill radius and height. */
  border-radius: 999px;
  min-height: 48px;
  padding: 10px 22px;
  font-weight: 600;
  font-size: 14.5px;
  color: #3c4043;
  text-decoration: none;
}
.google-btn:hover { background: #f8f9fa; box-shadow: 0 1px 3px rgba(60, 64, 67, 0.18); }
/* The booking modal's sign-in gate button sits between paragraphs. */
.bk-gate-btn { margin: 8px 0 4px; }
.auth-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: -7px;
  margin-right: 7px;
}
.booking-box h3 { margin: 6px 0 14px; font-size: 19px; }
/* Booking pane titles carry a STEP badge so the four panes read as
   one flow with the step pills above them. */
.bk-pane-title { display: flex; align-items: center; gap: 10px; }
.step-badge {
  flex: 0 0 auto;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
  padding: 4px 9px;
  border-radius: 999px;
  line-height: 1;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
/* Booking-mode switch + lesson-package picker (Feature F) */
.bk-mode { display: flex; border: 1.5px solid var(--line); border-radius: 999px;
  overflow: hidden; margin: 4px 0 16px; }
.bk-mode-btn { flex: 1; border: none; background: #fff; font: inherit;
  font-size: 14.5px; padding: 10px 4px; cursor: pointer; color: var(--sub);
  min-height: 44px; }
.bk-mode-btn + .bk-mode-btn { border-left: 1.5px solid var(--line); }
.bk-mode-btn.selected { background: var(--accent); color: #fff; font-weight: 700; }
.pkg-slot { display: flex; gap: 10px; flex-wrap: wrap; align-items: end;
  border: 1px dashed var(--line); border-radius: 12px; padding: 10px 12px;
  margin-bottom: 10px; }
.pkg-slot .field { margin-bottom: 0; flex: 1; min-width: 130px; }
.pkg-slot-title { width: 100%; font-weight: 700; font-size: 14px; }
.done-lessons { margin: 6px 0 10px; padding-left: 20px; line-height: 1.7; }
.choice .choice-price { display: block; font-weight: 700; color: var(--accent);
  font-size: 17px; margin-top: 2px; }
.choice-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.choice {
  text-align: left;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  font-size: 15.5px;
  cursor: pointer;
  color: var(--ink);
}
.choice:hover { border-color: var(--accent); }
.choice.selected { border-color: var(--accent); background: var(--accent-soft); }
.choice-row { display: flex; justify-content: space-between; align-items: center; }
.choice-row strong { color: var(--accent); }

.field { display: block; margin: 0 0 16px; font-weight: 600; font-size: 15px; }
.field input, .field textarea, .field select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px 13px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-weight: 400;
  background: #fff;
  color: var(--ink);
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.slot-grid { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 14px; }
.slot {
  padding: 9px 16px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink);
}
.slot:hover:not(:disabled) { border-color: var(--accent); }
.slot.selected { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- Custom pickers (booking flow: no native selects) ----------
 * Available times = a scrollable grid of chips (local range on the
 * main line, JST range as the sub-line); durations and package
 * weekdays/times use the same chip language. */
.time-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 8px;
  margin-top: 8px;
  max-height: 264px;
  overflow-y: auto;
  padding: 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.time-grid::-webkit-scrollbar { width: 6px; }
.time-grid::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.time-hint { grid-column: 1 / -1; color: var(--sub); font-size: 14px; margin: 4px 0; }
.time-chip {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  padding: 8px 11px;
  border: 1.5px solid var(--line); border-radius: 10px;
  background: #fff; font: inherit; color: var(--ink);
  cursor: pointer; text-align: left;
}
.time-chip:hover:not(:disabled) { border-color: var(--accent); }
.time-chip.selected { background: var(--accent); border-color: var(--accent); color: #fff; }
.time-chip:disabled { opacity: 0.45; cursor: default; background: #faf7f5; }
.time-chip:focus-visible, .dur-chip:focus-visible, .wd-chip:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
.tc-main { font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.tc-sub { font-size: 11.5px; opacity: 0.75; font-variant-numeric: tabular-nums; }
.time-chips-sm { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.time-chip.sm { flex-direction: row; align-items: baseline; gap: 6px; padding: 7px 12px; }
.dur-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.dur-chip {
  display: inline-flex; align-items: baseline; gap: 7px;
  padding: 9px 15px;
  border: 1.5px solid var(--line); border-radius: 999px;
  background: #fff; font: inherit; font-size: 14.5px; color: var(--ink);
  cursor: pointer;
}
.dur-chip:hover { border-color: var(--accent); }
.dur-chip.selected { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.dur-price { font-size: 13px; opacity: 0.8; }
.wd-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.wd-chip {
  padding: 7px 11px;
  border: 1.5px solid var(--line); border-radius: 999px;
  background: #fff; font: inherit; font-size: 13.5px; color: var(--ink);
  cursor: pointer;
}
.wd-chip:hover { border-color: var(--accent); }
.wd-chip.selected { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.slot.off, .slot:disabled { opacity: 0.38; cursor: not-allowed; text-decoration: line-through; }

.bk-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; gap: 12px; flex-wrap: wrap; }

.msg { min-height: 1.2em; font-size: 15px; margin: 8px 0; }
.msg-err { color: #b3261e; }
.msg-ok { color: #2e7d32; }

.summary { width: 100%; border-collapse: collapse; margin: 0 0 18px; }
.summary th, .summary td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 15.5px;
  vertical-align: top;
}
.summary th { width: 180px; color: var(--sub); font-weight: 600; }

.test-banner {
  background: #fff4d6;
  border: 1px solid #e3c565;
  color: #6d5510;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14.5px;
  font-weight: 600;
  margin-bottom: 18px;
}

.my-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 10px 0 16px; }
.my-section-title { margin: 26px 0 12px; font-size: 19px; }
.my-card { border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin-bottom: 16px; background: var(--card); }
.my-card .summary { margin-bottom: 6px; }

/* Past activity compact list (/account): one row per booking,
 * click to expand the full summary table. The history variant
 * keeps the muted background the tall cards had. */
.my-list { border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); overflow: hidden; }
#my-history .my-list { background: #fbf8f6; }
.my-row + .my-row { border-top: 1px solid var(--line); }
.my-row-head { display: flex; align-items: center; gap: 14px; width: 100%;
  min-height: 58px; padding: 8px 16px; background: none; border: none;
  font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.my-row-head:hover { background: #fff7f9; }
.my-row-when { display: flex; flex-direction: column; gap: 1px;
  min-width: 168px; }
.my-row-date { font-weight: 650; font-size: 14.5px; }
.my-row-time { color: var(--sub); font-size: 13px; }
.my-row-what { flex: 1; min-width: 0; display: flex; flex-direction: column;
  gap: 1px; }
.my-row-course { font-weight: 600; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }
.my-row-dur { color: var(--sub); font-size: 13px; }
.my-row-side { display: flex; flex-direction: column; align-items: flex-end;
  gap: 2px; }
.my-row-total { font-weight: 700; }
.my-row-status { font-size: 11.5px; font-weight: 700; color: var(--accent);
  background: var(--accent-soft); border-radius: 999px; padding: 2px 9px; }
.my-row-status.is-cancelled { color: #b03a5b; background: #f9e8ec; }
.my-row-paid { font-size: 12px; font-weight: 600; color: var(--sub);
  white-space: nowrap; }
.my-row-chev { color: var(--sub); font-size: 12px; flex: none;
  transition: transform .15s; }
.my-row.open .my-row-chev { transform: rotate(90deg); }
.my-row-detail { padding: 6px 16px 10px; border-top: 1px dashed var(--line); }
.my-row-detail .summary { margin-bottom: 6px; }
@media (max-width: 640px) {
  /* Course + total on the first line, date/time as a sub-line —
     still one compact row per booking. */
  .my-row-head { flex-wrap: wrap; gap: 3px 12px; padding: 10px 14px; }
  .my-row-what { order: 1; flex: 1; }
  .my-row-dur { white-space: nowrap; }
  .my-row-side { order: 2; margin-left: auto; }
  .my-row-chev { order: 3; }
  .my-row-when { order: 4; flex: 1 1 100%; flex-direction: row;
    align-items: baseline; gap: 8px; min-width: 0; }
  .my-row-detail { padding: 6px 14px 8px; }
}
.lesson .book-course { margin-top: auto; }

.field select:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.field select:disabled { opacity: 0.6; cursor: not-allowed; }

/* Booking pane: Sakura-style two columns (calendar | duration + times) */
.bk-sub { margin: 18px 0 10px; font-size: 16px; }
.bk-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 36px; align-items: start; }
.picker-note { min-height: 1.4em; margin: 4px 0 0; }

.cal { max-width: 340px; }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.cal-title { font-weight: 700; font-size: 16.5px; }
.cal-nav {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid var(--line); background: #fff;
  font-size: 19px; line-height: 1; cursor: pointer; color: var(--ink);
  /* Same centring fix as .modal-close: flex-centre the chevron's
     line box instead of letting it ride at the top of the button. */
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0;
}
.cal-nav:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.cal-nav:disabled { opacity: 0.35; cursor: not-allowed; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.cal-week span { font-size: 11.5px; font-weight: 700; color: var(--sub); padding: 4px 0; }
.cal-day {
  aspect-ratio: 1; border: none; background: transparent; border-radius: 50%;
  font: inherit; font-size: 14.5px; cursor: pointer; color: var(--ink); position: relative;
}
.cal-day:hover:not(:disabled) { background: var(--accent-soft); }
.cal-day:disabled { opacity: 0.3; cursor: not-allowed; }
.cal-day.selected { background: var(--accent); color: #fff; font-weight: 700; }
.cal-day.today::after {
  content: ""; position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
}
.cal-day.today.selected::after { background: #fff; }

.bk-selected {
  background: var(--accent-soft); border-radius: 10px;
  padding: 10px 14px; font-size: 14.5px; margin: 14px 0 12px;
}
/* Task 3: a package-slot conflict must be unmissable — the summary
 * banner turns into a strong alert, the offending slots get a red
 * frame plus their own named error line, and the disabled Continue
 * explains itself through its wrapper (a disabled button receives
 * no hover events, so the tooltip hangs on #bk-to-2-wrap). */
.bk-selected.alert {
  background: #c2274b; color: #fff; font-weight: 700;
}
.pkg-slot.conflict {
  border: 2px solid #c2274b; background: #fff5f7;
}
.pkg-slot-err {
  width: 100%; margin: 2px 0 0; color: #c2274b;
  font-weight: 700; font-size: 13.5px; line-height: 1.45;
}
.bk-to2-wrap { position: relative; display: inline-block; }
#bk-to-2:disabled { pointer-events: none; }
.bk-to2-wrap.has-reason:hover::after,
.bk-to2-wrap.has-reason:focus-within::after {
  content: attr(data-reason);
  position: absolute; bottom: calc(100% + 10px); right: 0;
  width: max-content; max-width: min(320px, 82vw);
  background: #38262b; color: #fff; font-size: 13px; font-weight: 600;
  line-height: 1.45; text-align: left;
  padding: 9px 12px; border-radius: 10px;
  box-shadow: 0 10px 26px rgba(56, 38, 43, 0.35);
  z-index: 80; pointer-events: none;
}
@keyframes bkflash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(194, 39, 75, 0); }
  50% { box-shadow: 0 0 0 4px rgba(194, 39, 75, 0.55); }
}
.flash { animation: bkflash 0.45s ease-in-out 4; }
.bk-total { border: 1.5px solid var(--accent); border-radius: 12px; padding: 12px 16px; background: #fff; }
.bk-total-row { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; padding: 2px 0; }
.bk-total-sum { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; font-weight: 700; font-size: 16px; }
.bk-total .note { margin: 8px 0 0; }

#my-picker .cal { margin-bottom: 14px; }
#my-resched-go { margin-top: 14px; }

/* ---------- Upcoming lessons: month calendar (task 1) ----------
 * Replaces the stack of one tall card per lesson in My bookings /
 * /account. Day cells carry compact time chips on desktop; on
 * narrow screens the chips give way to dots + a count so the grid
 * never overflows. The selected day's lessons open as compact
 * cards in the .upcal-drawer (see below), not underneath. */
.upcal {
  border: 1.5px solid var(--line); border-radius: 16px;
  background: #fff; padding: 16px 16px 8px; margin-bottom: 18px;
}
.upcal-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.upcal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.upcal-week span {
  text-align: center; font-size: 11.5px; font-weight: 700;
  color: var(--sub); padding: 2px 0 6px;
}
.upcal-day {
  border: 1.5px solid transparent; background: transparent;
  border-radius: 10px; font: inherit; color: var(--ink);
  cursor: pointer; padding: 5px 4px 6px; min-height: 66px;
  display: flex; flex-direction: column; align-items: stretch;
  gap: 3px; text-align: left; min-width: 0;
}
.upcal-day:hover { border-color: var(--accent); }
.upcal-day:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.upcal-num { font-size: 13.5px; font-weight: 600; line-height: 1.1; }
.upcal-day.outside { opacity: 0.38; }
.upcal-day.today .upcal-num { color: var(--accent); font-weight: 800; }
.upcal-day.selected { border-color: var(--accent); background: var(--accent-soft); }
.upcal-chips { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.upcal-chip {
  display: block; font-size: 10.5px; line-height: 1.3;
  background: var(--accent-soft); color: var(--ink);
  border-radius: 5px; padding: 1px 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.upcal-day.selected .upcal-chip { background: #fff; }
.upcal-chip-time { font-weight: 700; color: var(--accent); }
.upcal-chip.upcal-more { background: transparent; color: var(--accent); font-weight: 700; }
.upcal-dots { display: none; }
/* Contact form honeypot: off-screen, never seen or filled by humans */
.hp-field { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Day drawer (/account): slides in from the right; the calendar
 * itself no longer grows a full-width detail area. */
.upcal-overlay { position: fixed; inset: 0; background: rgba(43, 24, 33, .45);
  z-index: 55; }
.upcal-drawer { position: fixed; top: 0; right: 0; height: 100dvh;
  width: min(430px, 100vw); background: #fff; z-index: 58;
  transform: translateX(105%); transition: transform .28s ease;
  display: flex; flex-direction: column;
  box-shadow: -18px 0 44px rgba(60, 20, 40, .18); }
.upcal-drawer.open { transform: none; }
.upcal-drawer-head { display: flex; align-items: center; gap: 10px;
  padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.upcal-drawer-title { margin: 0; font-size: 17px; flex: 1; min-width: 0; }
.upcal-drawer-close { appearance: none; border: 1px solid var(--line);
  background: #fff; width: 34px; height: 34px; border-radius: 50%;
  font-size: 19px; line-height: 1; cursor: pointer; color: var(--ink); flex: none; }
.upcal-drawer-close:hover { border-color: var(--accent); color: var(--accent); }
.upcal-drawer-list { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 16px; }
.upcal-drawer-note { margin: 0; padding: 10px 18px 14px;
  border-top: 1px solid var(--line); font-size: 12px; color: var(--sub);
  line-height: 1.55; }
/* Compact lesson card inside the drawer */
.my-card-compact { padding: 14px 16px; }
.mcc-time { font-size: 20px; font-weight: 750; line-height: 1.25; }
.mcc-tz { font-size: 13px; font-weight: 600; color: var(--sub); }
.mcc-meta { margin-top: 3px; font-size: 14px; }
.mcc-sub { margin-top: 2px; font-size: 12.5px; color: var(--sub); }
/* Meet button inside the compact drawer card: an in-card primary
   action, NOT a hero CTA — content-width (never stretched by the
   card), compact padding/type so it matches the card's density. */
.mcc-meet { margin-top: 10px; display: inline-flex; width: auto;
  padding: 8px 18px; font-size: 14px;
  box-shadow: 0 4px 12px rgba(212, 87, 122, 0.24); }
.mcc-actions { display: flex; gap: 18px; margin-top: 10px; }
.mcc-btn { appearance: none; background: none; border: none; padding: 2px 0;
  font: inherit; font-size: 13.5px; font-weight: 650; color: var(--accent);
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.mcc-btn-danger { color: #b03a5b; }
@media (max-width: 560px) {
  .upcal { padding: 12px 10px 6px; }
  .upcal-day { min-height: 46px; align-items: center; padding: 5px 2px; }
  .upcal-chips { display: none; }
  .upcal-dots {
    display: flex; gap: 3px; align-items: center;
    justify-content: center; min-height: 7px;
  }
  .upcal-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
  .upcal-count { font-size: 10px; font-weight: 700; color: var(--accent); line-height: 1; }
}

/* Booking modal (Sakura-style pop-up) */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(51, 40, 38, 0.45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 24px 14px;
}
/* The card is viewport-bound and lays out as a column: the step
   pills (and the close button) stay pinned, the booking box scrolls
   internally, and inside it each pane's title sticks to the top and
   its nav row sticks to the bottom. The page behind never scrolls
   (openBooking locks body overflow). */
.modal-card {
  position: relative;
  background: var(--card);
  border-radius: 20px;
  max-width: 920px;
  width: 100%;
  margin: auto;
  padding: 26px 28px;
  box-shadow: 0 24px 60px rgba(51, 40, 38, 0.28);
  display: flex;
  flex-direction: column;
  max-height: 92vh;
  max-height: 92dvh;
  overflow: hidden;
}
.modal-card .booking-box {
  border: none;
  box-shadow: none;
  padding: 0;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.modal-card .booking-box::-webkit-scrollbar { width: 6px; }
.modal-card .booking-box::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.modal-card .bk-pane-title {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--card);
  padding: 4px 0 8px;
  margin-top: 0;
}
.modal-card .bk-nav {
  position: sticky;
  bottom: 0;
  z-index: 3;
  background: var(--card);
  border-top: 1px solid var(--line);
  padding-top: 12px;
  padding-bottom: 2px;
}

/* Compact spacing inside the modal so pane 1 fits shorter viewports:
   the nav row (Continue) should be visible without scrolling. */
.modal-card .steps { margin-bottom: 12px; }
.modal-card .booking-box h3 { margin: 2px 0 10px; }
.modal-card .choice-grid { margin-bottom: 12px; }
.modal-card .bk-sub { margin: 10px 0 8px; }
.modal-card .field { margin-bottom: 10px; }
.modal-card .cal-day { aspect-ratio: auto; height: 36px; }
.modal-card .bk-selected { margin: 10px 0; }
.modal-card .bk-nav { margin-top: 12px; }
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: #fff;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
  z-index: 5;
  /* Pixel-centred ×: the button is a flex box and the glyph is an
     inline SVG drawn symmetrically around the viewBox centre, so
     it sits at the exact centre of the circle on every platform.
     (A text × rides high in its line box and shifts with fonts.) */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.modal-close svg { display: block; width: 15px; height: 15px; }
.modal-close:hover { border-color: var(--accent); color: var(--accent); }

/* Steps + close wrapper: transparent on desktop (display: contents —
 * the close button keeps its absolute top-right corner position and
 * the steps keep their own row), a real flex row on phones. */
.modal-top { display: contents; }

/* uiConfirm — the shared custom confirmation dialog that replaces
 * native confirm() in My Bookings / My Packages. Same overlay + card
 * language as the booking modal above, sized for a short question;
 * motion follows the site standard (opacity + scale(.97), 180ms
 * --ease-out, symmetric out; reduced motion keeps only the fade). */
.ui-confirm-overlay {
  position: fixed; inset: 0; z-index: 200; display: none;
  background: rgba(51, 40, 38, 0.45);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  align-items: center; justify-content: center; padding: 24px 14px;
  opacity: 0; transition: opacity 0.18s var(--ease-out);
}
.ui-confirm-overlay.open { display: flex; }
.ui-confirm-overlay.show { opacity: 1; }
.ui-confirm-card {
  background: var(--card); border-radius: 20px; max-width: 430px; width: 100%;
  padding: 26px 28px; box-shadow: 0 24px 60px rgba(51, 40, 38, 0.28);
  opacity: 0; transform: scale(0.97);
  transition: opacity 0.18s var(--ease-out), transform 0.18s var(--ease-out);
}
.ui-confirm-overlay.show .ui-confirm-card { opacity: 1; transform: scale(1); }
.ui-confirm-msg { margin: 0; font-size: 15px; line-height: 1.65; white-space: pre-line; overflow-wrap: break-word; }
.ui-confirm-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
.btn.ui-confirm-danger { background: #a3402f; box-shadow: 0 8px 20px rgba(163, 64, 47, 0.3); }
.btn.ui-confirm-danger:hover { background: #8f3727; box-shadow: 0 10px 24px rgba(163, 64, 47, 0.34); }
@media (prefers-reduced-motion: reduce) {
  .ui-confirm-overlay, .ui-confirm-card { transition: opacity 0.1s ease; }
  .ui-confirm-card { transform: none; }
}

/* Toast — fixed bottom pill for action results (app.js showToast).
 * Dark plum pill, same ink as the booking tooltip. z-index 90:
 * above the day drawer (58) and booking modal (60), below
 * uiConfirm (200). On phones it floats above the sticky book bar. */
.ui-toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 90;
  transform: translate(-50%, 14px);
  max-width: min(540px, calc(100vw - 32px));
  background: #38262b; color: #fff;
  font-size: 14.5px; font-weight: 600; line-height: 1.5; text-align: center;
  padding: 12px 20px; border-radius: 12px;
  box-shadow: 0 14px 34px rgba(56, 38, 43, 0.35);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.ui-toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 860px) {
  .ui-toast { bottom: 86px; }
}
@media (prefers-reduced-motion: reduce) {
  .ui-toast { transition: opacity 0.1s ease; transform: translate(-50%, 0); }
}

/* Booking-success confirmation popup: reuses the uiConfirm
 * overlay/card (classes above); sized up for a booking summary
 * table and adds a title, an email line and a Paid pill. */
.bk-confirm-card { max-width: 520px; }
.bk-confirm-title { margin: 0 0 6px; font-size: 22px; line-height: 1.35; }
.bk-confirm-sub { margin: 0 0 12px; color: var(--sub); font-size: 14.5px; line-height: 1.6; }
.bk-confirm-status { margin: 0 0 14px; }
.bk-confirm-pill {
  display: inline-block; padding: 3px 12px; border-radius: 999px;
  background: #e4f2e5; color: #2e7d32; font-size: 13px; font-weight: 700;
}
.bk-confirm-table { margin-bottom: 4px; }
.bk-confirm-note { margin: 10px 0 0; }
@media (max-width: 640px) {
  .bk-confirm-card { padding: 22px 18px; }
  .bk-confirm-table th { width: 108px; }
}

@media (max-width: 640px) {
  /* Near-fullscreen sheet on phones: same pinned header/footer with
     the internal scroll, edge to edge. */
  .modal-overlay { padding: 0; }
  .modal-card {
    padding: 20px 16px;
    max-height: 100dvh;
    height: 100dvh;
    border-radius: 0;
  }
  /* Stepper + close on ONE flex row: the close button becomes a
   * flex item (flex-shrink: 0) instead of an absolutely-positioned
   * overlay, so it can never cover the stepper; the stepper shrinks
   * (26px dots, 11px nowrap labels, equal columns) so all four steps
   * fit at 360px without wrapping. */
  .modal-top {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
  }
  .modal-top .steps {
    flex: 1 1 auto;
    min-width: 0;
    margin-bottom: 0;
  }
  .modal-top .steps li { font-size: 11px; }
  .modal-top .steps li::before { top: 12px; /* centred on the 26px dot */ }
  .modal-top .step-dot { width: 26px; height: 26px; font-size: 12px; }
  .modal-top .steps li.done .step-dot::after { font-size: 13px; }
  .modal-top .modal-close {
    position: static;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    font-size: 18px;
  }
  /* Mode switch （单次/课时包）: smaller type so both bilingual labels
   * fit their half at 360px without ugly wrapping. */
  .bk-mode-btn { font-size: 13px; padding: 9px 2px; line-height: 1.35; }
  /* Keep the pinned nav row's buttons fully visible at 360px. */
  .bk-nav .btn { flex-shrink: 0; }
}

@media (max-width: 760px) {
  .bk-cols { grid-template-columns: 1fr; }
  .cal { max-width: 100%; }
}

@media (max-width: 640px) {
  .field-row { grid-template-columns: 1fr; }
  .summary th { width: 120px; }
}

/* ---------- Mobile density: review carousel + sticky booking bar ----------
   Both features live at the site's existing mobile breakpoint (860px,
   where the nav collapses and grids stack). Desktop is untouched. */

/* The bar markup is always in the page; it only appears on mobile. */
.sticky-book { display: none; }

@media (max-width: 860px) {
  /* Reviews: horizontal swipe carousel (was a stacked 1-column grid).
     Cards are ~82vw so the next card peeks in from the right edge. */
  .voices {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 14px;
    padding-bottom: 10px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .voices::-webkit-scrollbar { display: none; }
  .voices blockquote {
    flex: 0 0 82vw;
    max-width: 430px;
    scroll-snap-align: start;
  }

  /* Sticky booking bar: trust line + the same .open-booking button the
     header/hero use, so it opens the booking modal via the shared wiring. */
  .sticky-book {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50; /* below the booking modal overlay (z-index 60) */
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 20px rgba(51, 40, 38, 0.08);
  }
  .sticky-book-text { font-weight: 700; font-size: 14.5px; white-space: nowrap; }
  .sticky-book .btn { flex: none; }

  /* Keep page content (footer) clear of the fixed bar. */
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }

  /* Never stack the bar under the open booking modal. */
  body:has(#book-modal:not(.hidden)) .sticky-book { display: none; }
}

/* ---------- Account page (/account) ----------
 * Sakura-style single column of stacked cards, narrower than the
 * marketing sections. Booking/package cards inside are the shared
 * .my-card components rendered by app.js. */
.acct-col { max-width: 860px; margin: 0 auto; }
.acct-title {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: clamp(26px, 3.4vw, 34px);
  margin: 0 0 8px;
}
.acct-head { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 26px; }
.acct-head-text { flex: 1; min-width: 0; }
.acct-head-text .eyebrow { margin: 6px 0 8px; }
.acct-head-text .note { margin: 0; }
.acct-name-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 8px; }
.acct-name-row .acct-title { margin: 0; }
/* Subscriber badge — motion-prompt #022 Light sweep, mapped from the
 * official spec (demo badge 400px wide, cycle 2.35s): main band 29% of
 * badge width (116/400), peak white .72; thin band 3% (12/400) at .5,
 * offset +21% of width from band centre (78px in demo, leading side);
 * both rotated .42rad (~24deg); sweep travels band centre from -32.5%
 * to +132.5% of badge width (130px margins) during 19.15%-63.83% of
 * the cycle (0.45-1.5s) with quadratic ease-in-out; sparkle at the
 * top-right corner during 58.72%-84.26% (1.38-1.98s), scale following
 * sin(pi*q)*(1+0.2(1-q)), rotating .9rad. Colours are the site's own:
 * a deep plum-rose derived from the accent rose, NOT the demo blue. */
.sub-badge {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px; flex: none;
  background: linear-gradient(135deg, #843550, #552037);
  color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .1em;
  line-height: 1.5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 2px 10px rgba(85, 32, 55, .35);
}
.sub-badge[hidden] { display: none; }
.sub-badge-ico { width: 10px; height: 10px; fill: #ffd98a; flex: none; }
.sub-badge-clip {
  position: absolute; inset: 0; border-radius: inherit;
  overflow: hidden; pointer-events: none;
}
.sub-badge-sweep {
  position: absolute; top: -100%; left: 0; width: 100%; height: 300%;
  transform-origin: 0 50%;
  animation: sub-sweep 2.35s linear infinite;
}
.sb-band { position: absolute; top: 0; height: 100%; }
.sb-band-main {
  left: -14.5%; width: 29%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0),
    rgba(255, 255, 255, .72) 50%, rgba(255, 255, 255, 0));
}
.sb-band-thin { left: 19.5%; width: 3%; background: rgba(255, 255, 255, .5); }
@keyframes sub-sweep {
  0% { transform: translateX(-32.5%) rotate(.42rad); animation-timing-function: cubic-bezier(.42, 0, .58, 1); }
  19.15% { transform: translateX(-32.5%) rotate(.42rad); animation-timing-function: cubic-bezier(.42, 0, .58, 1); }
  63.83% { transform: translateX(132.5%) rotate(.42rad); }
  100% { transform: translateX(132.5%) rotate(.42rad); }
}
.sub-badge-star {
  position: absolute; top: -6px; right: -6px; width: 13px; height: 13px;
  fill: #fff; opacity: 0; pointer-events: none;
  animation: sub-sparkle 2.35s linear infinite;
}
@keyframes sub-sparkle {
  0%, 58.72% { opacity: 0; transform: scale(0) rotate(0deg); animation-timing-function: ease-out; }
  71.49% { opacity: 1; transform: scale(1.08) rotate(25.8deg); animation-timing-function: ease-in; }
  84.26%, 100% { opacity: 0; transform: scale(0) rotate(51.6deg); }
}
@media (prefers-reduced-motion: reduce) {
  .sub-badge-sweep, .sub-badge-star { animation: none; }
  .sub-badge-star { opacity: 0; }
}
.acct-head .btn { flex-shrink: 0; margin-top: 6px; }
.acct-avatar-img {
  width: 64px; height: 64px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
}
.acct-avatar-initial {
  width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800;
}
.acct-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px; margin: 0 0 36px;
}
.acct-stat {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; min-width: 0;
}
.acct-stat-num { font-size: 30px; font-weight: 800; color: var(--accent); line-height: 1.15; }
.acct-stat-num.is-email {
  font-size: 16.5px; font-weight: 700; color: var(--ink);
  overflow-wrap: anywhere; padding-top: 7px;
}
.acct-stat-label {
  font-size: 12px; font-weight: 800; letter-spacing: 0.12em;
  color: var(--sub); text-transform: uppercase; margin-top: 6px;
}
.acct-stat-sub { font-size: 13px; color: var(--sub); }
.acct-sec { margin: 0 0 36px; }
.acct-sec-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 16px; margin: 0 0 14px;
}
.acct-sec-head h2 { font-family: inherit; font-size: 20px; margin: 0; }
.acct-sec-link { font-weight: 700; text-decoration: none; white-space: nowrap; font-size: 14.5px; }
.acct-sec-link:hover { text-decoration: underline; }
/* Section layout: sticky side menu + content column (desktop).
 * The menu is a card in the page's own language (white, line
 * border, pill items in the accent); scrollspy in account.js
 * toggles .active. Sections carry a scroll-margin so anchor jumps
 * land clear of the sticky site header (measured 60px tall on
 * desktop; the menu sticks at the same 84px line). */
.acct-layout { display: grid; grid-template-columns: 188px minmax(0, 1fr);
  gap: 28px; align-items: start; }
.acct-layout-main { min-width: 0; }
.acct-layout-main .acct-sec:last-child { margin-bottom: 0; }
.acct-layout .acct-sec { scroll-margin-top: 84px; }
.acct-menu {
  position: sticky; top: 84px;
  display: flex; flex-direction: column; gap: 4px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 8px;
}
.acct-menu-item {
  padding: 9px 14px; border-radius: 999px;
  color: var(--ink); text-decoration: none;
  font-size: 15px; font-weight: 600; line-height: 1.4;
  transition: background 0.15s var(--ease-out), color 0.15s var(--ease-out);
}
.acct-menu-item:hover { background: var(--accent-soft); color: var(--accent); }
.acct-menu-item.active { background: var(--accent); color: #fff; }
@media (max-width: 860px) {
  /* Chip bar: horizontal, scrollable, sticky under the site
   * header (measured 55px tall on phones); sections need the
   * header + bar + a breath of gap in their scroll-margin. */
  .acct-layout { display: block; }
  .acct-menu {
    flex-direction: row; gap: 6px;
    top: 55px; z-index: 5;
    margin: 0 0 22px; padding: 6px;
    overflow-x: auto; scrollbar-width: none;
  }
  .acct-menu::-webkit-scrollbar { display: none; }
  .acct-menu-item { white-space: nowrap; flex: none; padding: 7px 13px; font-size: 14px; }
  .acct-layout .acct-sec { scroll-margin-top: 124px; }
}
.profile-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px;
}
.profile-card .note { margin-top: 0; }
.lvl-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
/* Past activity reads as history: same cards, visually quieter. */
#my-history .my-card { opacity: 0.72; background: #fbf8f6; }
@media (max-width: 700px) {
  .acct-stats { grid-template-columns: minmax(0, 1fr); }
  .acct-head { flex-wrap: wrap; }
  .profile-card { padding: 18px; }
}

/* ---------- language switcher (front) ---------- */
.lang-switch { position: relative; margin-left: 10px; flex: none; }
.lang-btn { background: none; border: 1px solid var(--line, #e8dfe3); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; color: inherit; white-space: nowrap; }
.lang-btn:hover { border-color: #d98aa5; }
.lang-pop { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line, #e8dfe3); border-radius: 12px; box-shadow: 0 12px 32px rgba(60, 20, 40, .14); padding: 6px; z-index: 60; min-width: 132px; display: flex; flex-direction: column; transform-origin: top right; transition: opacity 0.15s var(--ease-out), transform 0.15s var(--ease-out), display 0.15s allow-discrete; }
.lang-pop[hidden] { display: none; }
@starting-style {
  .lang-pop { opacity: 0; transform: scale(0.95); }
}
.lang-pop button { background: none; border: 0; text-align: left; padding: 8px 10px; border-radius: 8px; font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap; }
.lang-pop button:hover { background: #fdf0f4; }
.lang-pop button.active { font-weight: 700; color: #bd4465; }
@media (max-width: 860px) { .lang-switch { margin-left: 6px; } .lang-btn { padding: 5px 9px; font-size: 12.5px; } }

/* ---------- Homepage reveal (motion pass) ----------
 * Sections used to teleport in while scrolling; now they bridge in:
 * opacity + a small rise, cards also scale from 0.97, all on the
 * shared --ease-out curve at 300ms, siblings staggered 60ms by the
 * observer in app.js (it owns .rv-in and the --rvd delays; the .rv
 * class on <html> is set by the inline script in index.html, which
 * also removes it again if app.js never arms the observer — content
 * can never stay hidden because of an animation). */
.rv [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
  transition-delay: var(--rvd, 0ms);
}
.rv [data-reveal="pop"] { transform: translateY(8px) scale(0.97); }
.rv [data-reveal].rv-in { opacity: 1; transform: none; }
@media (scripting: none) {
  .rv [data-reveal] { opacity: 1; transform: none; }
}
/* Reduced motion: gentler, not zero — a short fade stays, all
 * travel/scale goes away. */
@media (prefers-reduced-motion: reduce) {
  .rv [data-reveal] {
    transform: none;
    transition: opacity 0.1s ease;
    transition-delay: 0ms;
  }
  .rv [data-reveal="pop"] { transform: none; }
  .btn:hover, .lesson:hover, .card:hover,
  .lesson:hover .lesson-icon,
  .btn:active, .vp-btn:active:not(:disabled) { transform: none; }
  .lang-pop { transition: opacity 0.1s ease; }
  @starting-style { .lang-pop { transform: none; } }
  .voices.vp-fade { animation-duration: 0.1s; }
}
