/* =====================================================
   Mandarin Tutor — one-page static site
   Palette (Preply-style):
     pink  #FF79AC  → primary CTAs & highlights only
     mint  #3DE3A7  → subtle decorative accent
     bg    #FFFFFF
     ink   #121118
   ===================================================== */

:root {
  --pink: #FF79AC;
  --pink-d: #E8558D;
  --pink-soft: #FFF0F5;
  --mint: #3DE3A7;
  --mint-soft: #EAFBF3;
  --ink: #121118;
  --ink-2: #3C3A44;
  --muted: #6E6B78;
  --line: #ECEAF0;
  --bg-alt: #FAFAFB;
  --r-l: 22px;
  --r-m: 16px;
  --r-s: 10px;
  --shadow: 0 10px 30px -14px rgba(18, 17, 24, .14);
  --shadow-pink: 0 12px 26px -12px rgba(255, 121, 172, .55);
  --max: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #fff;
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
/* anchor jump offset for the sticky header */
section[id], main[id] { scroll-margin-top: 78px; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: clamp(30px, 4.4vw, 46px); font-weight: 800; }
h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; }
h3 { font-size: 18px; font-weight: 700; }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: var(--pink); color: #fff; font-family: "Songti SC", SimSun, serif;
  font-size: 19px; font-weight: 700;
}
.brand-name { font-weight: 800; line-height: 1.15; display: flex; flex-direction: column; }
.brand-name small { font-weight: 600; font-size: 11px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }

.nav { display: flex; align-items: center; gap: 4px; position: relative; }
.nav > a {
  font-size: 14px; font-weight: 600; color: var(--ink-2);
  padding: 8px 11px; border-radius: 99px; transition: background .15s;
}
.nav > a:hover { background: var(--pink-soft); color: var(--pink-d); }
.nav-cta { margin-left: 6px; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2.5px; background: var(--ink); border-radius: 2px; margin: 4.5px 0; transition: .2s; }
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 66px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 12px 20px 18px; gap: 2px;
    box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav > a { padding: 12px 14px; font-size: 15px; }
  .nav-cta { margin: 8px 0 0; text-align: center; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-weight: 700; font-size: 15px; border-radius: 99px;
  padding: 13px 26px; border: 2px solid transparent; cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:active { transform: translateY(1px); }
/* pink (red) areas use BLACK text per requirement — no white-on-pink anywhere */
.btn-pink { background: var(--pink); color: var(--ink); box-shadow: var(--shadow-pink); }
.btn-pink:hover { background: var(--pink-d); color: #fff; }
.btn-outline { background: #fff; color: var(--pink-d); border-color: var(--pink); }
.btn-outline:hover { background: var(--pink-soft); }
.btn-sm { padding: 8px 18px; font-size: 13.5px; }
.btn-lg { padding: 15px 30px; font-size: 16px; }
.btn-block { width: 100%; }
.ic { width: 20px; height: 20px; flex: none; }

/* ---------- hero ---------- */
.hero { padding: 68px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 44px; align-items: center; }
.pill {
  display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .05em;
  color: var(--pink-d); background: var(--pink-soft);
  padding: 6px 14px; border-radius: 99px; margin-bottom: 16px;
}
h1 em { font-style: normal; color: var(--pink); }
.lead { font-size: 18px; color: var(--ink-2); margin: 16px 0 24px; max-width: 34em; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-meta { list-style: none; margin-top: 26px; display: grid; gap: 8px; }
.hero-meta li { font-size: 14.5px; color: var(--muted); font-weight: 600; }

.photo-ph {
  border-radius: var(--r-l);
  background: linear-gradient(145deg, var(--pink-soft), var(--mint-soft));
  border: 2px dashed rgba(255, 121, 172, .45);
  min-height: 340px; display: grid; place-content: center; text-align: center;
  color: var(--muted); padding: 24px;
}
.photo-ph span { font-size: 44px; }
.photo-ph p { margin-top: 10px; font-size: 14px; }
.photo-ph.tall { min-height: 480px; }

/* ---------- features ---------- */
.features { padding: 26px 0 10px; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature-card {
  background: var(--bg-alt); border: 1px solid var(--line);
  border-radius: var(--r-m); padding: 22px 20px;
}
.f-icon {
  display: inline-grid; place-items: center; width: 42px; height: 42px;
  border-radius: 13px; background: var(--mint-soft); font-size: 20px; margin-bottom: 12px;
}
.feature-card h3 { font-size: 15.5px; margin-bottom: 6px; }
.feature-card p { font-size: 13.5px; color: var(--muted); }

/* ---------- sections ---------- */
.section { padding: 74px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sect-head { text-align: center; max-width: 640px; margin: 0 auto 42px; }
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--pink-d); background: var(--pink-soft);
  padding: 5px 13px; border-radius: 99px; margin-bottom: 14px;
}
.sect-head p { color: var(--muted); margin-top: 10px; }
.pink-text { color: var(--pink-d); }

/* ---------- pricing ---------- */
.price-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; align-items: stretch; }
.price-card {
  position: relative; background: #fff; border: 1.5px solid var(--line);
  border-radius: var(--r-l); padding: 26px 22px; display: flex; flex-direction: column;
  transition: box-shadow .15s, transform .15s;
}
.price-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.price-card.featured { border-color: var(--pink); box-shadow: 0 18px 44px -20px rgba(255, 121, 172, .5); }
.tag-pop {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--pink); color: var(--ink); font-size: 11px; font-weight: 800;
  letter-spacing: .08em; padding: 4px 14px; border-radius: 99px; white-space: nowrap;
}
.price-card h3 { font-size: 18px; margin-bottom: 12px; }
.price { font-size: 40px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 14px; }
.price .cur { font-size: 22px; vertical-align: 14px; margin-right: 2px; color: var(--pink-d); }
.price .unit { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 6px; }
.price-card ul { list-style: none; display: grid; gap: 9px; margin-bottom: 16px; }
.price-card li { font-size: 14px; color: var(--ink-2); padding-left: 24px; position: relative; }
.price-card li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--mint); font-weight: 800;
}
.suit { font-size: 13px; color: var(--muted); margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); margin-bottom: 16px; }
.pay-note {
  text-align: center; margin-top: 30px; font-size: 14.5px; color: var(--ink-2);
  background: var(--mint-soft); border: 1px solid rgba(61, 227, 167, .35);
  border-radius: var(--r-m); padding: 14px 20px;
}

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 46px; align-items: start; }
.about-text h2 { margin: 6px 0 18px; }
.about-text h3 { margin: 22px 0 8px; font-size: 16px; }
.about-text p { color: var(--ink-2); font-size: 15.5px; }
.about-text .btn { margin-top: 26px; }
.check-list { list-style: none; display: grid; gap: 8px; }
.check-list li { font-size: 15px; color: var(--ink-2); padding-left: 26px; position: relative; }
.check-list li::before { content: "✔"; position: absolute; left: 0; color: var(--mint); font-weight: 800; }

/* ---------- testimonials ---------- */
.quote-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.quote-card {
  position: relative; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-l); padding: 30px 28px 24px;
  box-shadow: 0 6px 20px -12px rgba(18, 17, 24, .08);
}
.qmark {
  position: absolute; top: -4px; left: 18px;
  font-family: Georgia, serif; font-size: 72px; line-height: 1;
  color: var(--mint); opacity: .55;
}
.quote-card blockquote { font-size: 15px; color: var(--ink-2); margin: 20px 0 14px; font-style: italic; }
.quote-card figcaption { font-size: 13.5px; color: var(--muted); }

/* ---------- book ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 36px; counter-reset: step; }
.steps li {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-m); padding: 20px;
}
.steps h3 { font-size: 15px; margin-bottom: 6px; color: var(--pink-d); }
.steps p { font-size: 13.5px; color: var(--muted); }
.cal-ph {
  border: 2px dashed rgba(255, 121, 172, .5); border-radius: var(--r-l);
  background: var(--pink-soft); min-height: 320px;
  display: grid; place-content: center; text-align: center; padding: 30px; color: var(--ink-2);
}
.cal-ph-icon { font-size: 42px; }
.cal-ph p { max-width: 480px; margin-top: 10px; font-size: 14.5px; }
.cal-ph code { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: 13px; }

/* ---------- resources ---------- */
.res-title { font-size: 17px; margin: 40px 0 16px; }
.res-title:first-of-type { margin-top: 0; }
.res-title small { font-weight: 500; color: var(--muted); font-size: 13px; }

.vocab-box { max-height: 420px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-m); }
.vocab { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.vocab th {
  position: sticky; top: 0; background: var(--mint-soft); text-align: left;
  padding: 10px 16px; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2);
}
.vocab td { padding: 9px 16px; border-top: 1px solid var(--line); }
.vocab td:first-child { font-size: 16px; font-weight: 600; }
.vocab td:nth-child(2) { color: var(--pink-d); font-weight: 600; }
.vocab tbody tr:hover { background: var(--pink-soft); }

.read-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.read-card { background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--r-m); padding: 24px; }
.read-card h4 { margin-bottom: 12px; font-size: 15.5px; }
.read-card .zh { font-size: 16px; font-weight: 600; }
.read-card .py { color: var(--pink-d); font-size: 14px; margin: 8px 0; }
.read-card .en { color: var(--muted); font-size: 14px; }

.listen-box {
  background: var(--mint-soft); border: 1px solid rgba(61, 227, 167, .35);
  border-radius: var(--r-m); padding: 22px 24px; max-width: 560px;
}
.listen-label { font-weight: 700; font-size: 15px; margin-bottom: 12px; }
.listen-box audio { width: 100%; }
.listen-note { margin-top: 10px; color: var(--ink-2); }
.listen-note code { background: #fff; border-radius: 6px; padding: 1px 6px; font-size: 12.5px; border: 1px solid var(--line); }
.listen-tip { margin-top: 8px; color: var(--muted); }
.listen-box audio { margin-top: 14px; }

/* mini-lesson tap-to-hear lines */
.mat-lines { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.mat-line {
  font: inherit; cursor: pointer; text-align: left; width: 100%;
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; transition: all .15s;
}
.mat-line:hover { border-color: var(--pink); background: var(--pink-soft); }
.ml-spk { align-self: center; color: var(--pink-d); display: flex; flex: 0 0 auto; }
.ml-zh { font-size: 17px; font-weight: 700; white-space: nowrap; }
.ml-py { font-size: 13px; color: var(--pink-d); font-weight: 600; }
.ml-en { font-size: 12.5px; color: var(--muted); margin-left: auto; text-align: right; }
.mat-tip { font-size: 13px; color: var(--ink-2); line-height: 1.6; margin-top: 4px; }
@media (max-width: 560px) {
  .mat-line { gap: 4px 10px; }
  .ml-en { margin-left: 0; flex-basis: 100%; text-align: left; padding-left: 25px; }
}

.quiz-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.quiz {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-m);
  padding: 16px 20px; cursor: pointer;
}
.quiz summary { font-weight: 700; font-size: 14.5px; }
.quiz .ans { margin-top: 12px; font-size: 14px; color: var(--ink-2); }

/* ---------- contact ---------- */
.contact-grid { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
.contact-btn { min-width: 220px; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #B9B6C4; padding: 26px 0; }
.footer-wrap { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 13.5px; }
.footer-links { display: flex; gap: 16px; }
.footer-links a { display: inline-flex; align-items: center; gap: 7px; color: #fff; font-weight: 600; }
.footer-links a:hover { color: var(--pink); }
.footer-links .ic { width: 18px; height: 18px; }
.footer-links a.foot-admin { color: rgba(255,255,255,.55); font-weight: 500; font-size: 13px; border-bottom: 1px dotted rgba(255,255,255,.4); }
.footer-links a.foot-admin:hover { color: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .price-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  .hero-grid, .about-grid, .read-grid, .quiz-grid, .quote-grid { grid-template-columns: 1fr; }
  .feature-grid, .steps { grid-template-columns: 1fr 1fr; }
  .price-grid { grid-template-columns: 1fr 1fr; max-width: 640px; margin: 0 auto; }
  .about-photo { order: -1; }
}
@media (max-width: 640px) {
  .price-grid { grid-template-columns: 1fr; max-width: 460px; }
}
@media (max-width: 560px) {
  .section { padding: 54px 0; }
  .hero { padding: 44px 0 24px; }
  .feature-grid, .steps { grid-template-columns: 1fr; }
  .hero-cta .btn { width: 100%; }
  .footer-wrap { justify-content: center; text-align: center; }
}

/* ---------- Lead capture band ---------- */
.leadband { padding: 40px 0 64px; }
.leadband-grid {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 36px; align-items: center;
  background: linear-gradient(135deg, #fff 0%, #fff5f9 60%, #eafff7 100%);
  border: 1px solid var(--line); border-radius: 24px; padding: 40px;
}
.leadband-text h2 { font-size: 30px; margin-bottom: 10px; }
.leadband-text p { color: var(--muted); margin-bottom: 14px; }
.check-list.small li { font-size: 14px; }

/* ---------- Forms ---------- */
.form-card { padding: 26px; box-shadow: var(--shadow); }
.frow { margin-bottom: 14px; }
.frow label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.frow label small { color: var(--muted); font-weight: 400; }
.frow input, .frow textarea {
  width: 100%; padding: 11px 14px; font: inherit; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff;
  transition: border-color .15s;
}
.frow input:focus, .frow textarea:focus { outline: none; border-color: var(--pink); }
.frow textarea { resize: vertical; }
.privacy { font-size: 11.5px; color: var(--muted); line-height: 1.5; margin-top: 10px; }
.form-card h3 { margin-bottom: 14px; }

.success-card { text-align: center; padding: 34px 26px; }
.success-ic { font-size: 40px; display: block; margin-bottom: 8px; }
.success-card h3 { margin-bottom: 8px; }
.success-card p { color: var(--muted); margin-bottom: 18px; font-size: 14.5px; }

/* ---------- Contact two-column ---------- */
.contact-links { display: flex; flex-direction: column; gap: 14px; }
.contact-links .contact-btn { justify-content: flex-start; }

/* ---------- Materials ---------- */
.m-html p { margin: 0 0 10px; color: var(--ink); font-size: 15px; }
.listen-box audio { width: 100%; max-width: 480px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .leadband-grid { grid-template-columns: 1fr; padding: 28px; }
  .contact-grid { grid-template-columns: 1fr !important; }
  .form-card { max-width: 560px; margin: 0 auto; width: 100%; }
}

/* Contact section: links column + message form */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 36px; align-items: start; }

/* utility */
.hidden { display: none !important; }

/* ---------- language switcher ---------- */
.lang-sel {
  font: inherit; font-size: 13.5px; color: var(--ink); background: #fff;
  border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 10px; cursor: pointer;
}
.lang-sel:focus { outline: none; border-color: var(--pink); }

/* ---------- forms: select ---------- */
.frow select {
  width: 100%; padding: 11px 14px; font: inherit; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff;
}
.frow select:focus { outline: none; border-color: var(--pink); }

/* ---------- WeChat card ---------- */
.contact-links .wx-card { max-width: 340px; }
.wx-card h3 { margin-bottom: 10px; font-size: 16px; }
.wx-qr { width: 100%; max-width: 210px; margin: 0 auto 10px; }
.wx-qr img { width: 100%; border-radius: 12px; border: 1px solid var(--line); display: block; }
.wx-qr .photo-ph { min-height: 150px; }
.wx-id { font-size: 14px; text-align: center; margin-bottom: 2px; }
.wx-scan { font-size: 12.5px; color: var(--muted); text-align: center; }

/* ---------- testimonial stars ---------- */
.quote-card .stars {
  display: block; color: #FFB703; font-size: 14px; letter-spacing: 2px; margin-bottom: 4px;
}

@media (max-width: 900px) {
  .lang-sel { padding: 8px 12px; }
}

/* ---------- nav fit with language switcher ---------- */
.nav { gap: 1px; }
.nav > a { white-space: nowrap; padding: 8px 9px; font-size: 13.5px; }
.brand-name small { white-space: nowrap; }
.nav-cta { white-space: nowrap; padding-left: 14px; padding-right: 14px; }
.nav-wrap { gap: 10px; }
.lang-sel { flex: 0 0 auto; }
@media (max-width: 1180px) {
  .nav > a { padding: 8px 7px; font-size: 13px; }
  .nav-cta { font-size: 13px; padding: 8px 12px; }
}
@media (max-width: 960px) {
  .nav > a { padding: 11px 14px; font-size: 15px; }
  .lang-sel { margin: 8px 0 0; align-self: flex-start; }
  .nav-cta { margin-top: 10px; }
}

/* WeChat card fixes */
.contact-links .wx-card { width: 100%; max-width: 360px; margin-top: 4px; }
.wx-qr img[hidden] { display: none !important; }
.wx-qr img { max-height: 210px; object-fit: contain; }

/* WeChat card: make it a real card */
.contact-links .wx-card {
  display: block; width: 100% !important; max-width: 360px;
  box-sizing: border-box; padding: 20px; margin-top: 6px;
  background: #fff; border: 1.5px solid var(--line); border-radius: 18px;
}
.wx-card h3 { margin-top: 0; }

/* ---------- FAQ (under pricing) ---------- */
.faq-list { max-width: 720px; margin: 0 auto; display: grid; gap: 12px; }
.faq-item {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-m);
  padding: 16px 20px; cursor: pointer;
}
.faq-item summary { font-weight: 700; font-size: 15px; list-style-position: outside; }
.faq-item summary::marker { color: var(--pink-d); }
.faq-item p { margin-top: 10px; font-size: 14.5px; color: var(--ink-2); }

/* ---------- book: direct booking links ---------- */
.book-direct { text-align: center; font-weight: 700; margin-bottom: 14px; }
.book-links {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-l);
  padding: 22px; box-shadow: var(--shadow);
}

/* ---------- videos section ---------- */
.video-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  max-width: 960px; margin: 0 auto;
}
.video-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-m);
  overflow: hidden; display: flex; flex-direction: column; gap: 0;
  transition: box-shadow .15s, transform .15s;
}
.video-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.video-frame {
  width: 100%; aspect-ratio: 16 / 9; display: block; border: 0; background: #000;
}
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-thumb {
  position: relative; display: block; aspect-ratio: 16 / 9; background: var(--ink);
}
.video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-thumb.ph {
  background: linear-gradient(145deg, var(--pink-soft), var(--mint-soft));
  display: grid; place-items: center;
}
.video-play {
  width: 52px; height: 52px; border-radius: 50%; background: var(--pink); color: var(--ink);
  display: grid; place-items: center; font-size: 20px; padding-left: 4px;
}
.video-name { font-size: 14px; font-weight: 600; color: var(--ink-2); padding: 12px 14px; }

/* ---------- intro video (about) ---------- */
.intro-video { margin-top: 18px; }
.intro-video .video-frame { border-radius: var(--r-m); overflow: hidden; }
.iv-caption { font-size: 12.5px; color: var(--muted); margin-top: 8px; text-align: center; }

/* ---------- collapsible testimonials ---------- */
.testi-more { max-width: 720px; margin: 26px auto 0; text-align: center; }
.testi-more > summary {
  display: inline-block; cursor: pointer; font-weight: 700; font-size: 14.5px;
  color: var(--pink-d); background: var(--pink-soft); border-radius: 99px;
  padding: 10px 24px; transition: background .15s;
}
.testi-more > summary:hover { background: #ffe4ee; }
.testi-more[open] > summary { margin-bottom: 8px; }
@media (max-width: 960px) {
  .video-grid { grid-template-columns: 1fr; max-width: 560px; }
}

/* ---------- real photos (hero / about) ---------- */
.hero-photo > img,
.about-photo > img {
  display: block; width: 100%; height: auto; max-height: 620px;
  object-fit: cover; object-position: center 18%;
  border-radius: var(--r-l); box-shadow: var(--shadow);
}

/* ---------- portrait video (9:16 clip) ---------- */
.video-grid.single {
  grid-template-columns: minmax(0, 340px);
  justify-content: center; max-width: 340px;
}
.video-frame.portrait { aspect-ratio: 9 / 16; max-width: 340px; margin: 0 auto; }
video.video-frame { object-fit: contain; background: #000; }
.video-grid.single .video-name { text-align: center; }
@media (max-width: 960px) {
  .video-grid.single { grid-template-columns: minmax(0, 320px); max-width: 320px; margin: 0 auto; }
  .video-frame.portrait { max-width: 320px; }
}

/* ---------- live chat ---------- */
.chat-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--pink); color: var(--ink); font-size: 24px;
  box-shadow: 0 12px 30px -8px rgba(255, 121, 172, .65);
  display: grid; place-items: center; transition: transform .15s, background .15s;
}
.chat-fab:hover { transform: translateY(-3px); background: var(--pink-d); }
.chat-fab-ic { display: grid; place-items: center; line-height: 1; }
.chat-fab-dot {
  position: absolute; top: 2px; right: 2px; width: 14px; height: 14px;
  border-radius: 50%; background: #E5484D; border: 2.5px solid #fff;
}
.chat-panel[hidden] { display: none !important; }
.chat-panel {
  position: fixed; right: 22px; bottom: 92px; z-index: 91;
  width: min(360px, calc(100vw - 28px)); height: min(480px, calc(100vh - 140px));
  background: #fff; border: 1.5px solid var(--line); border-radius: 22px;
  box-shadow: 0 30px 70px -25px rgba(18, 17, 24, .45);
  display: flex; flex-direction: column; overflow: hidden;
}
.chat-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: var(--pink-soft); border-bottom: 1px solid var(--line);
}
.chat-head-l { display: flex; align-items: center; gap: 10px; }
.chat-avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--pink);
  display: grid; place-items: center; font-weight: 800; color: var(--ink);
}
.chat-head strong { display: block; font-size: 14.5px; }
.chat-status { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px;
  max-width: 232px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-status .dot { width: 8px; height: 8px; border-radius: 50%; background: #b9b9c2; display: inline-block; }
.chat-status.on .dot { background: #2fb47c; }
.chat-close { background: none; border: 0; font-size: 24px; line-height: 1; cursor: pointer; color: var(--ink-2); padding: 2px 6px; }
.chat-sub { margin: 0; padding: 8px 16px 0; font-size: 12.5px; color: var(--muted); }
.chat-body { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; background: #fff; }
.cmsg { max-width: 82%; padding: 9px 12px; border-radius: 16px; font-size: 14px; line-height: 1.45; word-wrap: break-word; }
.cmsg.student { align-self: flex-end; background: var(--pink); color: var(--ink); border-bottom-right-radius: 5px; }
.cmsg.tutor { align-self: flex-start; background: var(--mint-soft, #eafff5); color: var(--ink); border-bottom-left-radius: 5px; }
.cmsg.sys { align-self: center; background: #f4f4f7; color: var(--muted); font-size: 12.5px; max-width: 94%; text-align: center; }
.cmsg-time { display: block; font-size: 10.5px; opacity: .55; margin-top: 3px; text-align: right; }
.chat-form { border-top: 1px solid var(--line); padding: 10px 12px; background: #fff; }
.chat-form .chat-name { margin-bottom: 8px; }
.chat-row { display: flex; gap: 8px; }
.chat-row input {
  flex: 1; border: 1.5px solid var(--line); border-radius: 99px;
  padding: 10px 14px; font-size: 14px; outline: none; font-family: inherit;
}
.chat-row input:focus { border-color: var(--pink); }
.chat-row button {
  width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--pink); color: var(--ink); font-size: 15px; flex: 0 0 auto;
  transition: background .15s;
}
.chat-row button:hover { background: var(--pink-d); }
.chat-form input.chat-name {
  width: 100%; box-sizing: border-box; border: 1.5px solid var(--line);
  border-radius: 99px; padding: 9px 14px; font-size: 13.5px; outline: none; font-family: inherit;
}
.chat-form input.chat-name:focus { border-color: var(--pink); }
@media (max-width: 560px) {
  .chat-fab { right: 14px; bottom: 14px; }
  .chat-panel { right: 8px; bottom: 86px; }
}

/* ---------- review card: date / lessons / tutor reply ---------- */
.quote-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 6px 0 10px; font-size: 12.5px; color: var(--muted);
}
.quote-meta time { font-weight: 600; }
.qlessons {
  background: var(--pink-soft); border-radius: 99px; padding: 2px 10px;
  font-size: 11.5px; color: var(--ink-2); font-weight: 600;
}
.qreply {
  margin: 4px 0 10px; padding: 10px 12px;
  background: var(--mint-soft, #eafff5); border-left: 3px solid var(--mint, #3DE3A7);
  border-radius: 10px; font-size: 13px; line-height: 1.55; color: var(--ink);
}
.qreply-label {
  display: block; font-size: 11px; font-weight: 800; letter-spacing: .04em;
  color: var(--ink-2); margin-bottom: 3px; text-transform: uppercase;
}

/* =====================================================
   Booking modal — in-site booking + manual confirmation
   ===================================================== */
.bmodal {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(18, 17, 24, .55);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.bmodal[hidden] { display: none !important; }
.bmodal-box {
  position: relative;
  width: min(620px, 100%);
  max-height: min(92vh, 860px);
  overflow-y: auto;
  background: #fff;
  border-radius: var(--r-l);
  box-shadow: 0 40px 90px -30px rgba(18, 17, 24, .5);
  padding: 30px 30px 26px;
}
.bmodal-close {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: var(--pink-soft); color: var(--ink);
  font-size: 22px; line-height: 1; cursor: pointer;
}
.bmodal-close:hover { background: var(--pink); }
.bmodal-box h3 { font-size: 24px; margin-bottom: 6px; }
.bm-sub { font-size: 14px; color: var(--ink-2); margin-bottom: 18px; }
.bm-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .bm-grid2 { grid-template-columns: 1fr; } }
.bmodal .frow { margin-bottom: 14px; }
.bmodal label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.bmodal input, .bmodal select, .bmodal textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 11px 14px; font-size: 15px; font-family: inherit; outline: none; background: #fff;
}
.bmodal input:focus, .bmodal select:focus, .bmodal textarea:focus { border-color: var(--pink); }
.bdates { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.bdate {
  flex: 0 0 auto; min-width: 64px;
  border: 1.5px solid var(--line); background: #fff; border-radius: 12px;
  padding: 8px 10px; font-size: 12px; color: var(--ink-2);
  cursor: pointer; font-family: inherit; line-height: 1.35; text-align: center;
}
.bdate strong { font-size: 15px; color: var(--ink); }
.bdate .bdate-n { display: block; margin-top: 2px; font-style: normal; font-size: 11px; font-weight: 700; color: var(--ok, #128a66); }
.bdate .bdate-n.is-full { color: #b3aeb8; }
.bdate.is-full { opacity: .72; }
.bdate:hover { border-color: var(--pink); }
.bdate.on { border-color: var(--pink); background: var(--pink-soft); }
.bslots { display: flex; flex-wrap: wrap; gap: 8px; }
.bslot {
  border: 1.5px solid var(--line); background: #fff; border-radius: 99px;
  padding: 8px 16px; font-size: 14px; font-weight: 600; color: var(--ink);
  cursor: pointer; font-family: inherit;
}
.bslot:hover { border-color: var(--pink); }
.bslot.on { background: var(--pink); border-color: var(--pink); color: var(--ink); }
.bslot.is-booked {
  display: inline-flex; align-items: baseline; gap: 5px;
  color: #b3aeb8; border-style: dashed; cursor: not-allowed; background: #fafafa;
}
.bslot.is-booked:hover { border-color: var(--line); }
.bslot.is-booked i { font-style: normal; font-size: 11px; font-weight: 600; }
.bm-legend { flex-basis: 100%; margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.bm-loading { font-size: 13.5px; color: var(--muted); }
.bm-pay { background: var(--bg-alt); border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.bm-pay[hidden] { display: none !important; }
.bm-pay-note { font-size: 13.5px; color: var(--ink-2); margin: 4px 0 10px; }
.bm-pay input { margin-top: 10px; }

/* booking modal: submit-state feedback (never let a click feel dead) */
.bm-picked {
  margin: 4px 0 10px; padding: 9px 13px; border-radius: 12px;
  background: #EEFBF3; border: 1.5px solid #C6EBD7;
  font-size: 13.5px; font-weight: 700; color: #15794A;
}
.bm-picked[hidden], .bm-need[hidden] { display: none !important; }
.bm-need { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); text-align: center; }
.btn.btn-pink.is-need { background: var(--pink-soft); color: var(--pink-d); box-shadow: inset 0 0 0 1.5px var(--pink); }
.btn.btn-pink.is-need:hover { background: #FFE3EE; color: var(--pink-d); }
.frow.is-need > label { color: var(--pink-d); }
.frow.is-flash, .bslots.is-flash { border-radius: 14px; animation: bmFlash .8s ease-in-out 2; }
.bm-slot-hint { margin: 8px 0 0; font-size: 12.5px; font-weight: 700; color: #D6336C; }
.bm-slot-hint[hidden] { display: none !important; }
@keyframes bmFlash { 0%, 100% { background: transparent; } 50% { background: var(--pink-soft); } }
.bm-success { text-align: center; padding: 26px 10px 10px; }
.bm-success .success-ic { font-size: 44px; display: block; margin-bottom: 10px; }
.bm-success h3 { margin-bottom: 8px; }
.bm-success p { font-size: 14.5px; color: var(--ink-2); margin-bottom: 18px; }

/* ---------- mobile polish: booking modal + tutor panel ---------- */
@media (max-width: 560px) {
  .bmodal { padding: 0; align-items: flex-end; }
  .bmodal-box {
    width: 100%; max-height: 94vh; border-radius: 22px 22px 0 0;
    padding: 22px 18px 20px;
  }
  .bmodal-close { top: 10px; right: 10px; width: 34px; height: 34px; }
  .bmodal-box h3 { font-size: 20px; padding-right: 40px; }
  .bdate { min-width: 58px; padding: 7px 8px; }
  .bslot { padding: 8px 13px; font-size: 13.5px; }
  .bmodal input, .bmodal select, .bmodal textarea { font-size: 16px; } /* 防 iOS 聚焦自动放大 */
  .tut-fab { left: 14px; bottom: 14px; padding: 11px 15px; }
  .tut-panel { left: 8px; bottom: 70px; height: min(560px, calc(100vh - 90px)); }
}

/* ---------- mobile: footer doesn't collide with chat bubble ---------- */
@media (max-width: 640px) {
  .site-footer { padding: 22px 0 88px; }
  .footer-wrap { flex-direction: column; align-items: flex-start; gap: 12px; }
  .footer-links { flex-wrap: wrap; gap: 14px; }
}

/* ---------- tip jar (footer) ---------- */
.tip-line {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 8px 14px;
  margin: 0 auto 26px; padding: 14px 20px;
  max-width: 640px;
  background: rgba(255, 255, 255, .06);
  border: 1px dashed rgba(255, 255, 255, .25);
  border-radius: 16px;
  font-size: 14px; color: rgba(255, 255, 255, .85);
  text-align: center;
}
.tip-line a {
  display: inline-block; white-space: nowrap;
  background: var(--pink); color: var(--ink);
  padding: 7px 16px; border-radius: 99px;
  font-weight: 700; font-size: 13.5px;
  transition: transform .15s ease;
}
.tip-line a:hover { transform: translateY(-1px); }
.tip-line a { display: inline-flex; align-items: center; gap: 7px; }
.tip-line .ic { width: 16px; height: 16px; }

/* ---------- tip jar inside booking success (after payment) ---------- */
.bm-tip {
  margin: 20px auto 4px; padding: 16px 18px;
  max-width: 420px;
  background: var(--pink-soft);
  border: 1.5px dashed var(--pink);
  border-radius: 16px;
  text-align: center;
}
.bm-tip[hidden] { display: none !important; }
.bm-tip p { margin: 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.6; }
.bm-tip a {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 10px; padding: 9px 22px;
  background: var(--pink); color: var(--ink);
  border-radius: 99px; font-weight: 700; font-size: 14px;
  text-decoration: none; transition: transform .15s ease;
}
.bm-tip a:hover { transform: translateY(-1px); }
.bm-tip .ic { width: 16px; height: 16px; }

/* remove old footer tip styles (kept harmless) */

/* ---------- Free lessons grid (home) ---------- */
.lesson-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: stretch; }
#lessonsGrid { display: grid; gap: 12px; }

/* bridge from the free-lesson list to the beginner / pinyin lab */
.lessons-next {
  display: flex; align-items: center; gap: 16px; margin: 26px 0 30px; padding: 18px 22px;
  background: #FFF7FA; border: 1.5px solid #F7D6E1; border-radius: var(--r-m);
  text-decoration: none; color: var(--ink); transition: border-color .15s, background .15s, transform .15s;
  scroll-margin-top: 104px;
}
.lessons-next:hover { border-color: var(--pink); background: #FFF1F6; transform: translateY(-1px); }
.lessons-next .ln-ico { font-size: 26px; line-height: 1; flex: 0 0 auto; }
.lessons-next .ln-txt { flex: 1 1 auto; font-size: 13.5px; color: var(--ink-2); line-height: 1.55; }
.lessons-next .ln-txt b { display: block; font-size: 15px; color: var(--ink); margin-bottom: 2px; }
.lessons-next .ln-txt em { display: block; font-style: normal; font-size: 12.5px; color: var(--pink-d); font-weight: 700; margin-top: 4px; }
.lessons-next .ln-go { flex: 0 0 auto; font-size: 13.5px; font-weight: 800; color: var(--pink-d); white-space: nowrap; }
@media (max-width: 560px) {
  .lessons-next { gap: 12px; padding: 15px 16px; align-items: flex-start; }
  .lessons-next .ln-ico { font-size: 22px; }
  .lessons-next .ln-go { display: none; }
}

/* collapsible level panels (only 2 lessons visible per level) */
.lg { background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.lg-head {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: none; border: 0; padding: 15px 18px; font: inherit; text-align: left; cursor: pointer;
  transition: background .15s;
}
.lg-head:hover { background: #FFFAFC; }
.lg-n { font-size: 13px; color: var(--muted); }
.lg-lvl { font-size: 12px; color: var(--ink-2); background: #F6F4F8; border-radius: 99px; padding: 2px 9px; }
.lg-caret { margin-left: auto; color: var(--ink-2); display: block; transition: transform .2s; }
.lg.is-open .lg-caret { transform: rotate(180deg); }
.lg-body { display: none; padding: 2px 18px 16px; }
.lg.is-open .lg-body { display: block; }
.lg .lesson-grid { grid-template-columns: repeat(2, 1fr); }
.lg.is-all .lesson-grid { grid-template-columns: repeat(4, 1fr); }
.lg-more {
  display: block; width: 100%; margin-top: 14px; padding: 11px 16px; font: inherit;
  font-size: 13.5px; font-weight: 700; color: var(--pink-d); cursor: pointer;
  background: #FFF7FA; border: 1.5px dashed #F5C2D3; border-radius: 12px;
  transition: background .15s, border-color .15s;
}
.lg-more:hover { background: #FFEFF5; border-color: var(--pink); }
.lg-more::after { content: ''; }
/* collapsed level hints that there is more inside */
.lg:not(.is-open) .lg-head { background: #FDFBFC; }
.lg:not(.is-open) .lg-head:hover { background: #FFFAFC; }
.lg-hint { margin-left: 8px; font-size: 12px; color: var(--muted); }
@media (max-width: 900px) {
  .lg .lesson-grid, .lg.is-all .lesson-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .lg-head { padding: 13px 14px; gap: 8px; }
  .lg-hint { display: none; }
  .lg-body { padding: 0 12px 12px; }
  .lg .lesson-grid, .lg.is-all .lesson-grid { grid-template-columns: 1fr; }
}
.lesson-card {
  display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-m); padding: 18px 16px;
  transition: box-shadow .15s, transform .15s;
}
.lesson-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.lesson-card .lc-top { display: flex; align-items: center; justify-content: space-between; }
.lesson-card .lc-icon { font-size: 28px; }
.badge-hsk {
  font-size: 11px; font-weight: 800; letter-spacing: .05em; color: var(--pink-d);
  background: var(--pink-soft, #FFE9F2); border-radius: 99px; padding: 3px 10px;
}
.lesson-card h3 { font-size: 16px; margin: 0; }
.lesson-card .lc-zh { font-size: 13px; color: var(--ink-2); margin-top: -4px; }
.lesson-card .lc-sum { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.lesson-card .lc-go { margin-top: auto; padding-top: 10px; font-size: 13px; font-weight: 700; color: var(--pink-d); }
.lesson-group-title { margin: 26px 0 12px; font-size: 15px; color: var(--ink-2); display: flex; align-items: center; gap: 10px; }
.lesson-group-title .badge-hsk { font-size: 12px; }
.lesson-group-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- Lesson page ---------- */
body.lesson-page { background: #FAFAFB; }
.ls-top { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.ls-top-wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.ls-top-right { display: flex; align-items: center; gap: 14px; }
.ls-back { font-size: 13px; font-weight: 700; color: var(--pink-d); text-decoration: none; white-space: nowrap; }
.ls-back:hover { text-decoration: underline; }
@media (max-width: 560px) {
  .ls-top-wrap { height: 56px; }
  .brand-mini { font-size: 13.5px; white-space: nowrap; }
  .brand-dot { width: 28px; height: 28px; border-radius: 8px; font-size: 13px; margin-right: -2px; }
  .ls-top-right { gap: 8px; }
  .ls-top-right .btn { display: none; }
  .ls-back { font-size: 12px; white-space: nowrap; }
}
.brand-mini { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; }
.brand-dot {
  width: 34px; height: 34px; border-radius: 10px; background: var(--pink); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800;
}
.ls-main { max-width: 860px; padding: 26px 24px 60px; }
.ls-main .card { background:#fff; border:1.5px solid var(--line); border-radius: var(--r-l); box-shadow: 0 12px 32px -26px rgba(18,17,24,.4); }
.ls-loading { color: var(--muted); text-align: center; padding: 60px 0; }
.ls-hero { padding: 24px; }
.ls-hero-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ls-hsk {
  background: var(--pink); color: var(--ink); font-weight: 800; font-size: 12.5px;
  padding: 4px 14px; border-radius: 99px; letter-spacing: .04em;
}
.ls-min { color: var(--muted); font-size: 13px; }
.ls-hero-title { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 10px; }
.ls-hero-title .ls-icon { font-size: 40px; line-height: 1; }
.ls-hero-title h1 { margin: 0 0 2px; font-size: 30px; }
.ls-zhtitle { margin: 0; color: var(--ink-2); font-size: 18px; }
.ls-summary { color: var(--muted); font-size: 15px; line-height: 1.6; }
.ls-audio-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; align-items: center; }
.chip {
  border: 1.5px solid var(--line); background: #fff; border-radius: 99px; padding: 6px 14px;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer;
}
.chip.on { border-color: var(--pink); color: var(--pink-d); background: #FFF5F9; }
.ls-sec { margin-top: 34px; }
.ls-sec h2 { font-size: 22px; margin-bottom: 14px; }
.ls-zh2 { font-size: 15px; color: var(--muted); font-weight: 600; }
.ls-hint { font-size: 12.5px; color: var(--muted); margin: -6px 0 10px; }

/* dialogue */
.ls-line { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.ls-who {
  flex: 0 0 96px; font-size: 12px; font-weight: 700; color: var(--ink-2);
  background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 8px 10px; text-align: center;
}
.ls-who small { display: block; color: var(--muted); font-weight: 500; }
.ls-bubble {
  flex: 1; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 16px;
}
.ls-line:nth-child(even) .ls-bubble { background: #FFF9FB; }
.ls-zhline { font-size: 18px; line-height: 1.55; }
.ls-py { font-size: 13.5px; color: var(--pink-d); margin-top: 4px; letter-spacing: .01em; }
.ls-en { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
body.hide-py .ls-py { display: none; }
body.hide-en .ls-en { display: none; }
.ls-play {
  flex: 0 0 40px; height: 40px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff;
  font-size: 17px; cursor: pointer; transition: border-color .15s, background .15s;
}
.ls-play:hover { border-color: var(--pink); }
.ls-play.playing { border-color: var(--pink); background: #FFF0F6; animation: lsPulse 1s infinite; }
@keyframes lsPulse { 50% { opacity: .55; } }

/* vocab */
.ls-vocab { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.ls-word {
  background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 8px;
  display: flex; flex-direction: column; gap: 3px; align-items: center; text-align: center;
  font: inherit; cursor: pointer; transition: border-color .15s;
}
.ls-word:hover { border-color: var(--pink); }
.ls-word .w-zh { font-size: 17px; font-weight: 700; }
.ls-word .w-py { font-size: 12px; color: var(--pink-d); }
.ls-word .w-en { font-size: 11.5px; color: var(--muted); line-height: 1.35; }

/* vocabulary flashcards */
.ls-flashgrid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
.ls-flash {
  position: relative; height: 132px; padding: 0; background: none; border: none;
  font: inherit; cursor: pointer; perspective: 600px; text-align: center;
}
.fc-inner {
  position: absolute; inset: 0; transform-style: preserve-3d;
  transition: transform .45s cubic-bezier(.4,.2,.2,1);
}
.ls-flash.flipped .fc-inner { transform: rotateY(180deg); }
.fc-face {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 6px;
  align-items: center; justify-content: center; border-radius: 16px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border: 1.5px solid var(--line); background: #fff; padding: 8px 6px;
  transition: border-color .15s, box-shadow .15s;
}
.fc-front { }
.fc-back { transform: rotateY(180deg); background: #FFF7FB; border-color: var(--pink-l, #ffd7ea); }
.ls-flash:hover .fc-face { border-color: var(--pink); }
.fc-emoji { font-size: 40px; line-height: 1; }
.fc-zh { font-size: 19px; font-weight: 800; color: var(--ink); line-height: 1.2; }
.fc-py { font-size: 15px; font-weight: 700; color: var(--pink-d); line-height: 1.3; }
.fc-en { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.fc-say {
  position: absolute; right: 6px; bottom: 6px; z-index: 2; width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center; font-size: 13px;
  background: #fff; border: 1px solid var(--line); border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.08); opacity: .9;
}
.fc-say:hover { border-color: var(--pink); opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .fc-inner { transition: none; }
}

/* grammar */
.ls-gram { padding: 18px 20px; margin-bottom: 12px; }
.ls-gram h3 { margin-bottom: 6px; font-size: 16.5px; }
.ls-gram > p { color: var(--ink-2); font-size: 14px; line-height: 1.6; margin-bottom: 10px; }
.ls-gram ul { list-style: none; display: grid; gap: 8px; }
.ls-gram li { background: #FAFAFB; border-radius: 10px; padding: 8px 12px; }
.ls-gram li .ls-zhline { font-size: 16px; }

/* quiz */
.ls-q { padding: 16px 18px; margin-bottom: 12px; }
.ls-q .q-t { font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.q-opts { display: grid; gap: 8px; }
.q-opt {
  text-align: left; font: inherit; font-size: 14.5px; padding: 10px 14px; border-radius: 10px;
  border: 1.5px solid var(--line); background: #fff; cursor: pointer; transition: border-color .15s;
}
.q-opt:hover { border-color: var(--pink); }
.q-opt.good { border-color: #3DE3A7; background: #EAFFF7; font-weight: 700; }
.q-opt.bad { border-color: #FF6B81; background: #FFF1F3; }
.q-why { margin-top: 10px; font-size: 13.5px; padding: 8px 12px; border-radius: 8px; }
.q-why.ok { background: #EAFFF7; color: #0B7A50; }
.q-why.no { background: #FFF1F3; color: #B3324C; }
.ls-score { font-size: 16px; font-weight: 700; margin-top: 6px; }
.ls-score .btn { margin-top: 10px; }
.ls-score .ls-score-n { display: inline-block; margin-right: 10px; }
.ls-score .ls-score-best { display: inline-block; font-size: 13px; font-weight: 600; color: var(--muted); }
.ls-score.is-done {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  background: #FFF7FB; border: 1.5px solid #FFD8E8; border-radius: 14px; padding: 12px 16px;
}
.ls-score.is-done .btn { margin-top: 0; }

/* next + cta */
.ls-next { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.ls-nextcard {
  text-decoration: none; color: var(--ink); background: #fff; border: 1.5px solid var(--line);
  border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 3px; font-size: 13px;
  transition: border-color .15s;
}
.ls-nextcard:hover { border-color: var(--pink); }
.ls-nextcard span:first-child { font-size: 22px; }
.ls-nextcard .n-t { font-weight: 700; font-size: 14px; }
.ls-nextcard .n-zh { color: var(--ink-2); }
.ls-nextcard .n-badge { color: var(--pink-d); font-weight: 700; font-size: 11.5px; }
.ls-cta { margin-top: 34px; text-align: center; padding: 30px 24px; }
.ls-cta h2 { margin-bottom: 8px; }
.ls-cta p { color: var(--muted); margin-bottom: 16px; }
.ls-foot { border-top: 1px solid var(--line); padding: 20px 0; color: var(--muted); font-size: 13px; }
.ls-foot a { color: var(--pink-d); }

@media (max-width: 900px) {
  .lesson-grid { grid-template-columns: 1fr 1fr; }
  .ls-vocab { grid-template-columns: repeat(3, 1fr); }
  .ls-flashgrid { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); }
  .ls-next { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .lesson-grid { grid-template-columns: 1fr; }
  .ls-vocab { grid-template-columns: 1fr 1fr; }
  .ls-flashgrid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
  .ls-line { flex-wrap: wrap; }
  .ls-who { flex: 0 0 auto; padding: 5px 10px; }
  .ls-who small { display: inline; margin-left: 4px; }
  .ls-play { flex: 0 0 44px; height: 44px; }
  .ls-bubble { flex: 1 1 100%; order: 3; }
  .ls-hero-title h1 { font-size: 24px; }
  .ls-zhline { font-size: 17px; }
}

/* =====================================================
   Starter kit / pinyin lab (starter.html)
   ===================================================== */
.starter-page .ls-main { max-width: 960px; }
.st-tabs { display: flex; gap: 10px; margin: 4px 0 22px; flex-wrap: wrap; }
.st-tab {
  font: inherit; font-size: 14.5px; font-weight: 700; cursor: pointer;
  background: #fff; color: var(--ink-2); border: 1.5px solid var(--line);
  border-radius: 99px; padding: 10px 20px; transition: all .15s;
}
.st-tab:hover { border-color: var(--pink); color: var(--pink-d); }
.st-tab.is-on { background: var(--pink); border-color: var(--pink); color: #fff; box-shadow: var(--shadow-pink); }

.st-hero { padding: 28px 26px; }
.st-hero .eyebrow { margin-bottom: 6px; }
.st-hero h1 { font-size: 30px; line-height: 1.25; margin-bottom: 4px; }
.st-zhtitle { color: var(--ink-2); font-size: 17px; margin-bottom: 12px; }
.st-lead { color: var(--muted); font-size: 15px; line-height: 1.7; }
.st-goals { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.st-goals li {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600;
  background: var(--pink-soft); color: var(--pink-d); border-radius: 99px; padding: 5px 14px;
}
.st-check { font-weight: 800; }
.st-hero-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.st-howto { margin: 14px 0 0 18px; color: var(--ink-2); font-size: 14px; line-height: 1.9; }

.st-h2 { font-size: 21px; margin: 36px 0 6px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.st-h2 span { font-size: 13.5px; font-weight: 500; color: var(--muted); }
.st-h3 { font-size: 19px; margin-bottom: 8px; }
.st-h3 span { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 8px; }
.st-note { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; line-height: 1.65; }

/* greetings */
.st-greet-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.st-greet {
  position: relative; background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-m);
  padding: 16px 58px 16px 18px; display: flex; flex-direction: column; gap: 2px;
}
.st-greet .st-zh { font-size: 22px; font-weight: 700; }
.st-greet .st-py { font-size: 13.5px; color: var(--pink-d); }
.st-greet .st-en { font-size: 13.5px; color: var(--muted); }
.st-greet .st-tip { font-size: 12px; color: var(--muted); margin-top: 6px; border-top: 1px dashed var(--line); padding-top: 6px; }
.st-spk {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 10px;
  border: 1.5px solid var(--line); background: #fff; color: var(--pink-d); font-size: 15px;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.st-spk:hover { border-color: var(--pink); background: var(--pink-soft); }
.st-spk.playing { background: var(--pink); border-color: var(--pink); color: #fff; animation: stPulse 1s infinite; }
.st-spk.sm { position: static; width: 26px; height: 26px; font-size: 12px; border-radius: 8px; flex: 0 0 26px; }
@keyframes stPulse { 50% { opacity: .5; } }

/* dialogue toolbar */
.ls-panel { padding: 18px; }
.st-diag-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.st-spk-line { font-size: 15px; }

/* vocab + patterns */
.st-vocab { grid-template-columns: repeat(6, 1fr); }
.st-patterns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.st-pattern { padding: 16px 18px; }
.st-pat-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.st-pattern .st-zh { font-size: 19px; font-weight: 700; }
.st-pattern .st-py { font-size: 13px; color: var(--pink-d); }
.st-pattern .st-en { font-size: 13.5px; color: var(--ink-2); margin-top: 8px; }
.st-pattern .st-tip { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* self intros */
.st-intros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.st-intro { padding: 16px 18px; display: flex; flex-direction: column; }
.st-intro-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.st-intro-top h3 { font-size: 16px; }
.st-intro-label { font-size: 11.5px; color: var(--pink-d); font-weight: 700; background: var(--pink-soft); border-radius: 99px; padding: 2px 10px; }
.st-intro-lines { list-style: none; display: grid; gap: 8px; margin-bottom: 14px; }
.st-intro-line { display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: start; }
.st-intro-line .l-zh { grid-column: 2; font-size: 15.5px; font-weight: 600; }
.st-intro-line .l-py { grid-column: 2; font-size: 12px; color: var(--pink-d); }
.st-intro-line .l-en { grid-column: 2; font-size: 12px; color: var(--muted); }

.st-tips { margin-top: 34px; padding: 20px 22px; background: var(--mint-soft); border-color: #CDF2E1; }
.st-tips h3 { font-size: 16px; margin-bottom: 8px; }
.st-tips ul { margin-left: 18px; color: var(--ink-2); font-size: 14px; line-height: 1.85; }

/* ---------- pinyin: the little speaker ---------- */
.py-spk {
  width: 30px; height: 30px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff;
  color: var(--pink-d); cursor: pointer; padding: 0; display: inline-flex; align-items: center;
  justify-content: center; flex: 0 0 auto; transition: all .15s;
}
.py-spk svg { width: 16px; height: 16px; }
.py-spk:hover { border-color: var(--pink); background: var(--pink-soft); }
.py-spk.playing { background: var(--pink); border-color: var(--pink); color: #fff; animation: stPulse 1s infinite; }

/* ---------- tones ---------- */
.py-tone-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.py-tone {
  position: relative; background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-m);
  padding: 14px 8px 12px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  cursor: pointer; transition: all .15s;
}
.py-tone:hover { border-color: var(--pink); box-shadow: var(--shadow); transform: translateY(-2px); }
.py-tone .py-spk { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 8px; }
.py-tone .py-spk svg { width: 14px; height: 14px; }
.tt-head { display: flex; align-items: center; gap: 5px; color: var(--pink-d); margin-bottom: 5px; }
.tt-num { font-size: 13px; font-weight: 800; }
.tt-curve { width: 32px; height: 15px; }
.tt-py { font-size: 23px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.tt-char { font-size: 26px; line-height: 1.25; }
.tt-en { font-size: 11.5px; color: var(--muted); text-align: center; line-height: 1.35; }
.tt-ex { font-size: 11.5px; color: var(--ink-2); }

.st-family { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.st-family-lab { font-size: 13px; font-weight: 800; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; flex: 0 0 46px; }
.st-family-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; flex: 1; }
.st-tonemini {
  background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 8px 10px;
  display: flex; align-items: center; gap: 8px; cursor: pointer; transition: all .15s;
}
.st-tonemini:hover { border-color: var(--pink); background: var(--pink-soft); }
.st-tonemini .tm-show { font-size: 16px; font-weight: 700; color: var(--pink-d); }
.st-tonemini .tm-char { font-size: 11.5px; color: var(--muted); flex: 1; }
.st-tonemini .py-spk { width: 24px; height: 24px; border-radius: 8px; }
.st-tonemini .py-spk svg { width: 13px; height: 13px; }

/* ---------- where the tone mark goes ---------- */
.py-rules { padding: 6px 20px; }
.py-rule { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px dashed var(--line); cursor: pointer; }
.py-rule:last-child { border-bottom: 0; }
.pr-l { flex: 1; }
.pr-l b { display: block; font-size: 15px; }
.pr-l span { font-size: 13px; color: var(--muted); line-height: 1.5; }
.pr-r { display: flex; align-items: center; gap: 10px; }
.pr-w { font-size: 15px; font-weight: 700; color: var(--pink-d); white-space: nowrap; }

/* ---------- sound cards: initial / final / whole syllable ---------- */
.py-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; }
.py-cell {
  position: relative; background: #fff; border: 1.5px solid var(--line); border-radius: 14px;
  padding: 12px 8px 10px; display: flex; flex-direction: column; align-items: center; gap: 1px;
  cursor: pointer; transition: all .15s; text-align: center;
}
.py-cell:hover { border-color: var(--pink); background: var(--pink-soft); }
.py-cell .py-spk { position: absolute; top: 7px; right: 7px; width: 24px; height: 24px; border-radius: 8px; }
.py-cell .py-spk svg { width: 13px; height: 13px; }
.py-cell .p-big { font-size: 21px; font-weight: 800; color: var(--ink); line-height: 1.25; }
.py-cell .p-tone { font-size: 14px; font-weight: 700; color: var(--pink-d); }
.py-cell .p-char { font-size: 12px; color: var(--ink-2); }
.py-cell .p-en { font-size: 10.5px; color: var(--muted); line-height: 1.3; margin-top: 3px; }
.py-grid.ws .p-big { font-size: 19px; }
.py-grp .py-grid { grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); }


.py-grp { margin-top: 16px; }
.py-grp-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.py-grp-head b { font-size: 14px; }
.py-grp-head span { font-size: 12px; color: var(--muted); }

/* ---------- spelling blends ---------- */
.py-blends { display: grid; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: 10px; }
.py-blend {
  display: flex; align-items: center; gap: 7px; background: #fff; border: 1.5px solid var(--line);
  border-radius: 14px; padding: 10px 12px; cursor: pointer; transition: all .15s;
}
.py-blend:hover { border-color: var(--pink); background: var(--pink-soft); }
.py-blend .bl-ini { font-size: 17px; font-weight: 800; color: var(--ink); }
.py-blend .bl-op { font-size: 13px; color: var(--muted); }
.py-blend .bl-fin { font-size: 17px; font-weight: 800; color: var(--pink-d); }
.py-blend .bl-syl { font-size: 17px; font-weight: 800; color: var(--ink); }
.py-blend .bl-char { font-size: 14px; color: var(--ink-2); flex: 1; }
.py-blend .py-spk { width: 26px; height: 26px; border-radius: 8px; }
.py-blend .py-spk svg { width: 14px; height: 14px; }

/* quiz extras */
.q-hanzi { font-size: 24px; font-weight: 700; line-height: 1; }
.q-opt-lg { font-size: 16px; font-weight: 700; }
.st-q .st-qplay svg { width: 15px; height: 15px; vertical-align: -3px; margin-right: 4px; }

/* drills */
.st-drills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.st-drill {
  font: inherit; cursor: pointer; text-align: left; background: #fff; border: 1.5px solid var(--line);
  border-radius: 13px; padding: 12px 16px; display: flex; align-items: center; gap: 12px; transition: all .15s;
}
.st-drill:hover { border-color: var(--pink); }
.st-drill .d-show { font-size: 16px; font-weight: 700; color: var(--ink); }
.st-drill .d-en { font-size: 12px; color: var(--muted); flex: 1; }
.st-drill .d-play { font-size: 12px; font-weight: 700; color: var(--pink-d); }
.st-drill.playing { border-color: var(--pink); background: var(--pink-soft); }

/* recorder */
.st-rec { margin-top: 30px; padding: 22px; }
.st-rec-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.st-rec-pick {
  font: inherit; font-size: 14px; padding: 9px 12px; border-radius: 10px;
  border: 1.5px solid var(--line); background: #fff; max-width: 240px;
}
.st-rec-msg { font-size: 13px; color: var(--muted); margin-top: 10px; min-height: 20px; }
.btn.rec-on { background: #FF4D6D !important; border-color: #FF4D6D !important; color: #fff !important; }
.btn[hidden], .st-takes[hidden] { display: none !important; }

/* my recording — saved takes */
.st-takes { list-style: none; margin-top: 14px; display: grid; gap: 8px; }
.st-take {
  display: flex; align-items: center; gap: 10px; background: #fff;
  border: 1.5px solid var(--line); border-radius: 12px; padding: 8px 12px;
}
.st-take .tk-play {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px; border: 1.5px solid var(--line);
  background: var(--pink-soft); color: var(--pink-d); cursor: pointer; font-size: 12px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; transition: all .15s;
}
.st-take .tk-play:hover { border-color: var(--pink); }
.st-take .tk-play.playing { background: var(--pink); border-color: var(--pink); color: #fff; animation: stPulse 1s infinite; }
.st-take .tk-label { font-weight: 700; font-size: 14px; }
.st-take .tk-meta { font-size: 12px; color: var(--muted); flex: 1; }
.st-take .tk-del {
  border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 13px;
  padding: 5px 8px; border-radius: 8px; transition: all .15s;
}
.st-take .tk-del:hover { background: #FFECEF; color: #E0324B; }

/* quiz */
.st-quiz { display: grid; gap: 12px; }
.st-q { padding: 16px 18px; }
.st-q-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.q-num {
  width: 24px; height: 24px; border-radius: 8px; background: var(--pink-soft); color: var(--pink-d);
  font-size: 12.5px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center;
}
.q-prompt { font-weight: 700; font-size: 14.5px; flex: 1; }
.st-q .q-opts { grid-template-columns: repeat(4, 1fr); display: grid; gap: 8px; }
.st-q .q-opt { text-align: center; }

@media (max-width: 900px) {
  .st-greet-grid, .st-patterns, .st-intros, .st-drills { grid-template-columns: 1fr; }
  .st-vocab { grid-template-columns: repeat(4, 1fr); }
  .py-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .py-tone-row { grid-template-columns: repeat(5, 1fr); gap: 8px; }
  .py-blends { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .st-family-row { grid-template-columns: repeat(4, 1fr); }
  .st-q .q-opts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .st-hero { padding: 22px 18px; }
  .st-hero h1 { font-size: 24px; }
  .st-vocab { grid-template-columns: repeat(2, 1fr); }
  .py-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .py-tone-row { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .py-blends { grid-template-columns: 1fr; }
  .py-rule { flex-wrap: wrap; gap: 8px; }
  .py-rules { padding: 4px 16px; }
  .st-family { flex-direction: column; align-items: stretch; }
  .st-family-row { grid-template-columns: repeat(2, 1fr); }
  .st-h2 { font-size: 19px; }
  .st-tabs { gap: 8px; }
  .st-tab { flex: 1; padding: 10px 12px; font-size: 13.5px; }
}

/* ---------- resources: beginner starter kit teaser (home) ---------- */
.st-home { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; margin-bottom: 34px; scroll-margin-top: 104px; }
.st-home-card {
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-l);
  padding: 24px; display: flex; flex-direction: column; box-shadow: var(--shadow);
}
.st-home-a { border-color: #FFD3E4; background: linear-gradient(180deg, #FFF7FA 0%, #FFFFFF 62%); }
.st-home-card .eyebrow { margin-bottom: 8px; }
.st-home-card h3 { font-size: 22px; line-height: 1.3; margin-bottom: 4px; }
.st-home-zh { font-size: 13.5px; color: var(--pink-d); font-weight: 700; margin-bottom: 10px; }
.st-home-lead { font-size: 14px; color: var(--muted); line-height: 1.7; }
.st-home-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 8px; }
.st-chip {
  font: inherit; cursor: pointer; background: #fff; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 8px 14px; display: inline-flex; flex-direction: column; align-items: flex-start; gap: 0;
  font-size: 16px; font-weight: 700; color: var(--ink); transition: all .15s; line-height: 1.35;
}
.st-chip small { font-size: 11px; font-weight: 600; color: var(--pink-d); letter-spacing: .01em; }
.st-chip:hover { border-color: var(--pink); background: var(--pink-soft); transform: translateY(-1px); }
.st-chip.playing { border-color: var(--pink); background: var(--pink); color: #fff; }
.st-chip.playing small { color: #fff; }
.st-home-hint { font-size: 12.5px; color: var(--muted); }
.st-home-tones { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 16px 0 8px; }
.st-tone-chip {
  font: inherit; cursor: pointer; background: #fff; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 10px 4px; display: flex; flex-direction: column; align-items: center; gap: 1px;
  font-size: 20px; font-weight: 700; color: var(--pink-d); transition: all .15s;
}
.st-tone-chip small { font-size: 10.5px; font-weight: 600; color: var(--muted); }
.st-tone-chip:hover { border-color: var(--pink); background: var(--pink-soft); }
.st-tone-chip.playing { background: var(--pink); border-color: var(--pink); color: #fff; }
.st-tone-chip.playing small { color: #fff; }
.st-home-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 14px; }

@media (max-width: 900px) {
  .st-home { grid-template-columns: 1fr; }
}

/* ---------- form UX: inline errors, invalid state, loading button ---------- */
.f-err { color: #d63045; font-size: 13px; margin: 6px 2px 0; }
.f-err-form { margin: 10px 0 0; }
.has-err input, .has-err textarea,
input.is-invalid, textarea.is-invalid {
  border-color: #d63045 !important;
  box-shadow: 0 0 0 3px rgba(214, 48, 69, .12);
}
.shake { animation: tw-shake .4s ease; }
@keyframes tw-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
.btn.is-loading { opacity: .8; pointer-events: none; }
.btn .spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff;
  border-radius: 50%; margin-right: 8px; vertical-align: -2px;
  animation: tw-spin .7s linear infinite;
}
@keyframes tw-spin { to { transform: rotate(360deg); } }

/* ---------- hero Chinese subtitle ---------- */
.hero-subzh {
  margin-top: 12px; font-size: 15px; font-weight: 700;
  letter-spacing: .1em; color: var(--pink-d);
}

/* ---------- collapsible free-resource cards ---------- */
.res-acc {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-m);
  margin: 12px 0; transition: box-shadow .2s, border-color .2s;
}
.res-acc[open] { border-color: #F7D3E1; box-shadow: 0 8px 26px -18px rgba(232, 85, 141, .45); }
.res-acc > summary {
  display: flex; align-items: center; gap: 12px; padding: 15px 18px;
  cursor: pointer; list-style: none;
}
.res-acc > summary::-webkit-details-marker { display: none; }
.ra-num {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  background: var(--pink-soft); color: var(--pink-d);
  display: grid; place-items: center; font-size: 13px; font-weight: 800;
}
.ra-title { font-size: 16px; font-weight: 700; }
.ra-meta { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.ra-caret { flex: 0 0 auto; color: var(--muted); transition: transform .25s; }
.res-acc[open] .ra-caret { transform: rotate(180deg); }
.res-acc-body { padding: 2px 18px 18px; }
.ra-lead { font-size: 13px; color: var(--muted); margin-bottom: 12px; }

/* small round speaker button (works on any [data-aud] button) */
.spk {
  display: inline-grid; place-items: center; width: 26px; height: 26px; padding: 0;
  border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--pink-d);
  cursor: pointer; flex: 0 0 auto; transition: all .15s;
}
.spk:hover { background: var(--pink-soft); border-color: var(--pink); }
.spk.playing { background: var(--pink); border-color: var(--pink); color: #fff; }

/* vocabulary table inside the card */
.vocab-box { max-height: 400px; background: #fff; }
.vocab th.vc-aud, .vocab td.vc-aud { width: 58px; text-align: center; padding: 8px 10px; }
.vocab td { padding: 8px 16px; }
.vocab td.vc-zh { font-size: 16px; font-weight: 600; white-space: nowrap; }
.vocab td.vc-py { color: var(--pink-d); font-weight: 600; }
.vocab td.vc-en { color: var(--ink-2); }

/* reading cards */
.res-acc .read-card { padding: 18px; }
.rc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.rc-head h4 { margin: 0; font-size: 15.5px; }
.rd-lines { display: flex; flex-direction: column; gap: 7px; }
.rd-line {
  font: inherit; text-align: left; cursor: pointer;
  display: grid; grid-template-columns: 16px 1fr; gap: 2px 9px;
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; transition: all .15s;
}
.rd-line:hover, .rd-line.playing { border-color: var(--pink); background: var(--pink-soft); }
.rd-ico { color: var(--pink-d); display: flex; align-items: center; grid-row: 1 / span 2; }
.rd-zh { font-size: 15.5px; font-weight: 700; color: var(--ink); display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.rd-zh small { font-size: 12.5px; font-weight: 600; color: var(--pink-d); }
.rd-en { font-size: 12.5px; color: var(--muted); }

/* quiz answer speaker */
.quiz .ans .spk { vertical-align: -6px; margin-left: 6px; width: 24px; height: 24px; }

/* mini lessons inside the accordion */
.res-acc .listen-box { max-width: 100%; }

@media (max-width: 640px) {
  .ra-meta { display: none; }
  .ra-title { font-size: 15px; }
  .res-acc-body { padding: 2px 14px 14px; }
  .res-acc > summary { padding: 14px; gap: 10px; }
}

/* vocab table: fixed columns so it never overflows on phones */
.vocab { table-layout: fixed; }
.vocab th:nth-child(1), .vocab td:nth-child(1) { width: 24%; }
.vocab th:nth-child(2), .vocab td:nth-child(2) { width: 28%; }
@media (max-width: 560px) {
  .vocab { font-size: 13.5px; }
  .vocab th, .vocab td { padding-left: 10px; padding-right: 10px; }
  .vocab td.vc-zh { font-size: 15px; white-space: normal; }
  .vocab th.vc-aud, .vocab td.vc-aud { width: 46px; }
}

/* accordion polish: hover affordance + separation when open */
.res-acc > summary:hover { background: #FFF9FB; }
.res-acc[open] > summary { background: #FFF9FB; border-bottom: 1px solid var(--line); }
.res-acc-body { padding: 14px 18px 18px; }
@media (max-width: 640px) { .res-acc-body { padding: 12px 14px 14px; } }

/* quiz answers: keep the speaker pinned to the right edge */
.quiz .ans { display: flex; gap: 8px; align-items: flex-start; }
.quiz .ans > span { flex: 1 1 auto; }
.quiz .ans .spk { margin-left: 0; margin-top: 1px; vertical-align: 0; }

.res-acc .read-grid { align-items: start; }

/* subtitle follows the page language: CJK gets letter-spacing, Latin/Cyrillic does not */
.hero-subzh { letter-spacing: 0; }
html:lang(zh) .hero-subzh,
html:lang(ja) .hero-subzh { letter-spacing: .1em; }
.hero-subzh:lang(ko) { letter-spacing: 0; }

/* ---------- click-to-play video posters (nothing loads until tapped) ---------- */
.video-poster {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9;
  padding: 0; margin: 0; border: 0; cursor: pointer; overflow: hidden;
  background: radial-gradient(120% 120% at 50% 0%, #34343f 0%, #16161c 72%);
}
.video-frame.yt-lazy { position: relative; background: #16161c; }
.yt-lazy > .video-poster { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; }
.video-poster.portrait { aspect-ratio: 9 / 16; }
.video-card .video-poster.portrait { max-width: 340px; margin: 0 auto; }
.video-poster img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  opacity: .94; transition: transform .35s ease, opacity .2s ease;
}
.video-poster:hover img { transform: scale(1.03); opacity: 1; }
.video-poster > .video-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 64px; height: 64px; padding-left: 5px; border-radius: 50%;
  background: rgba(255, 255, 255, .93); color: var(--pink-d);
  display: grid; place-items: center; font-size: 22px; line-height: 1;
  box-shadow: 0 10px 26px -8px rgba(0, 0, 0, .55);
  transition: transform .18s ease, background .18s ease, color .18s ease;
}
.video-poster:hover > .video-play,
.video-poster:focus-visible > .video-play {
  background: var(--pink); color: #fff; transform: translate(-50%, -50%) scale(1.07);
}
.video-poster:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.vp-empty { position: absolute; inset: 0; background: linear-gradient(145deg, #1b1b22, #2a2a33); }
@media (max-width: 640px) {
  .video-poster > .video-play { width: 54px; height: 54px; font-size: 19px; }
  .video-card .video-poster.portrait { max-width: 320px; }
}

/* poster fallback when the remote thumbnail cannot load (e.g. YouTube blocked) */
.video-poster.no-cover { background: radial-gradient(120% 120% at 50% 0%, #33333d 0%, #16161c 70%); }
.video-poster.no-cover::before {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.03) 0 12px, transparent 12px 24px);
}
.video-poster.no-cover > .video-play { background: var(--pink); color: #fff; }

/* =====================================================
   2026-10 restructure: hero value tags, level cards,
   excerpt reviews, CTA band, sub-pages
   ===================================================== */

/* ---------- hero ---------- */
.btn-lg { font-size: 16.5px; padding: 16px 32px; }
.hero-note { font-size: 13px; color: var(--muted); margin-top: 12px; font-weight: 600; }
.value-tags {
  list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px; margin-top: 28px;
}
.value-tags li {
  display: flex; gap: 9px; align-items: flex-start;
  font-size: 13px; font-weight: 600; color: var(--ink-2); line-height: 1.45;
  background: var(--bg-alt); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px;
}
.value-tags li > span { flex: 0 0 auto; font-size: 15px; line-height: 1.3; }
.hero-trust { margin-top: 16px; font-size: 13px; font-weight: 700; color: var(--muted); }

/* credentials strip under About Ruby (the old hero meta, nothing deleted) */
.about-facts { list-style: none; display: grid; gap: 5px; margin: 0 0 18px; }
.about-facts li { font-size: 13.5px; color: var(--muted); font-weight: 600; }

/* ---------- student level cards ---------- */
.level-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 30px; }
.level-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-l);
  padding: 26px 22px 22px; display: flex; flex-direction: column; gap: 9px;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.level-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #F7D3E1; }
.lv-emoji { font-size: 27px; line-height: 1; }
.level-card h3 { font-size: 17.5px; margin-top: 2px; }
.level-card p { font-size: 14px; color: var(--muted); flex: 1 1 auto; }
.lv-btn { margin-top: 8px; }

/* ---------- excerpt review cards ---------- */
.review-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.review-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-m);
  padding: 20px 20px 16px; display: flex; flex-direction: column; gap: 10px;
}
.review-card .stars { color: #FFB020; font-size: 12.5px; letter-spacing: 2px; }
.review-card blockquote { font-size: 14.5px; color: var(--ink-2); line-height: 1.6; }
.review-card figcaption { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.rc-init {
  width: 27px; height: 27px; border-radius: 50%; background: var(--pink-soft); color: var(--pink-d);
  display: grid; place-items: center; font-size: 11.5px; font-weight: 800; flex: 0 0 auto;
}
.rc-meta { font-size: 12px; color: var(--muted); font-weight: 600; }
.review-cta { text-align: center; margin-top: 28px; }
.review-source { font-size: 12.5px; color: var(--muted); margin-top: 10px; }

/* ---------- closing CTA band ---------- */
.cta-band { background: linear-gradient(180deg, var(--pink-soft) 0%, #fff 100%); padding: 56px 0 58px; text-align: center; }
.cta-band h2 { margin-bottom: 8px; }
.cta-band p { color: var(--muted); margin-bottom: 22px; }

.text-link { display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 700; color: var(--pink-d); }
.text-link:hover { text-decoration: underline; }

/* ---------- sub pages (FAQ / culture / reviews) ---------- */
.page-hero { padding: 48px 0 32px; background: linear-gradient(180deg, var(--pink-soft) 0%, #fff 100%); }
.page-hero .eyebrow { color: var(--pink-d); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.page-hero h1 { font-size: clamp(28px, 4vw, 40px); margin-top: 8px; }
.page-hero p { color: var(--ink-2); margin-top: 12px; max-width: 44em; font-size: 16.5px; }
.page-body { padding: 38px 0 64px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--pink-d); font-weight: 700; }

.faq-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.faq-nav a {
  font-size: 13px; font-weight: 700; color: var(--ink-2); background: #fff;
  border: 1px solid var(--line); border-radius: 99px; padding: 8px 15px; transition: all .15s;
}
.faq-nav a:hover { background: var(--pink-soft); border-color: #F7D3E1; color: var(--pink-d); }
.faq-cat { margin-bottom: 32px; scroll-margin-top: 92px; }
.faq-cat > h2 { font-size: 20px; margin-bottom: 12px; }
.faq-cat .faq-item {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  margin-bottom: 9px; overflow: hidden;
}
.faq-cat .faq-item > summary { padding: 14px 16px; font-weight: 700; font-size: 14.5px; cursor: pointer; }
.faq-cat .faq-item[open] > summary { color: var(--pink-d); }
.faq-cat .faq-item > p { padding: 0 16px 15px; font-size: 14px; color: var(--muted); }
.help-card {
  background: var(--pink-soft); border: 1px solid #F7D3E1; border-radius: var(--r-m);
  padding: 26px; text-align: center; margin-top: 8px;
}
.help-card h3 { margin-bottom: 6px; }
.help-card p { font-size: 14px; color: var(--muted); margin-bottom: 16px; }

/* culture timeline */
.tl { position: relative; padding-left: 28px; margin-top: 8px; }
.tl::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 28px; }
.tl-item::before {
  content: ""; position: absolute; left: -26px; top: 7px; width: 11px; height: 11px;
  border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 4px var(--pink-soft);
}
.tl-when { font-size: 12px; font-weight: 800; color: var(--pink-d); letter-spacing: .06em; text-transform: uppercase; }
.tl-item h3 { font-size: 17px; margin: 4px 0 3px; }
.tl-item p { font-size: 14px; color: var(--muted); max-width: 46em; }
.tl-ph { margin-top: 8px; height: 0; }

/* reviews page */
.rev-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.rev-list .review-card { gap: 9px; }

@media (max-width: 900px) {
  .value-tags { grid-template-columns: 1fr; }
  .level-grid, .review-grid { grid-template-columns: 1fr; }
  .rev-list { grid-template-columns: 1fr; }
  .level-card { padding: 22px 18px 18px; }
}
@media (max-width: 640px) {
  .hero { padding: 34px 0 26px; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .cta-band { padding: 42px 0 46px; }
  .cta-band .btn-lg { width: 100%; }
  .page-hero { padding: 34px 0 24px; }
  .page-body { padding: 28px 0 48px; }
}

/* teaching tagline card in About */
.tagline-card {
  margin: 18px 0 20px; padding: 16px 18px; border-radius: 14px;
  background: linear-gradient(135deg, var(--pink-soft) 0%, #fff 100%);
  border: 1px solid #F7D3E1; border-left: 4px solid var(--pink);
  font-size: 15.5px; font-weight: 800; color: var(--pink-d); line-height: 1.5;
}

/* culture page: left-aligned timeline heading */
.tl-head { margin-bottom: 20px; }
.tl-head h2 { font-size: 22px; margin-bottom: 6px; }
.tl-head p { font-size: 14.5px; color: var(--muted); max-width: 46em; }

/* reviews page: masonry columns so short quotes do not leave big gaps */
.rev-list { display: block; column-count: 2; column-gap: 14px; }
.rev-list .review-card { break-inside: avoid; margin: 0 0 14px; }
@media (max-width: 780px) { .rev-list { column-count: 1; } }

/* footer CTA row (sits above copyright + contact links) */
.footer-cta {
  flex: 1 1 100%; text-align: center;
  padding-bottom: 18px; margin-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.footer-cta .btn { font-size: 15px; padding: 13px 26px; }
.footer-cta p { font-size: 12.5px; color: #9C99A8; margin-top: 9px; }
@media (max-width: 640px) {
  .footer-cta .btn { width: 100%; }
  .footer-wrap { justify-content: center; text-align: center; }
  .footer-links { justify-content: center; flex-wrap: wrap; }
}

/* keep the footer button secondary so it does not double the CTA band above */
.footer-cta .btn.btn-pink {
  background: transparent; color: #fff;
  border: 1.5px solid rgba(255, 255, 255, .5);
  box-shadow: none;
}
.footer-cta .btn.btn-pink:hover {
  background: var(--pink); border-color: var(--pink); color: #fff;
  transform: translateY(-1px);
}

/* ---------- email list placeholder (reserved, not live yet) ---------- */
.subscribe-row {
  margin-top: 30px; padding: 26px 28px; border-radius: var(--r-l);
  background: #fff; border: 1px dashed #E6C9D6;
  display: grid; grid-template-columns: 1fr auto; gap: 10px 24px; align-items: center;
}
.sub-copy h3 { font-size: 17px; margin-bottom: 5px; }
.sub-copy p { font-size: 13.5px; color: var(--muted); max-width: 40em; }
.sub-form { display: flex; gap: 9px; }
.sub-form input {
  width: 220px; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg-alt);
  font-size: 14px; color: var(--ink); font-family: inherit;
}
.sub-form input:disabled, .sub-form .btn:disabled { opacity: .62; cursor: not-allowed; }
.sub-form .btn { white-space: nowrap; }
.sub-soon { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
@media (max-width: 760px) {
  .subscribe-row { grid-template-columns: 1fr; padding: 22px 18px; }
  .sub-form { flex-direction: column; }
  .sub-form input { width: 100%; }
  .sub-form .btn { width: 100%; }
}

.policy-link { text-align: center; margin: 14px 0 4px; }
.policy-link .text-link { margin-top: 0; }

/* ---------- Alipay QR payment option ---------- */
.alipay-box {
  margin: 30px auto 0; max-width: 560px; text-align: center;
  padding: 22px 24px; border-radius: var(--r-m);
  background: #fff; border: 1px solid var(--line);
}
.ap-label { font-weight: 800; font-size: 15.5px; margin-bottom: 12px; }
.ap-row { display: flex; gap: 18px; align-items: center; justify-content: center; }
.ap-row img {
  width: 176px; height: 209px; object-fit: contain; flex: 0 0 auto;
  border: 1px solid var(--line); border-radius: 10px; padding: 6px; background: #fff;
}
.ap-note { font-size: 13.5px; color: var(--muted); line-height: 1.55; text-align: left; max-width: 24em; }
@media (max-width: 640px) {
  .ap-row { flex-direction: column; }
  .ap-note { text-align: center; }
}

/* alipay card: keep the real QR aspect ratio */
.ap-row img { height: auto; aspect-ratio: 520 / 596; }

/* =====================================================
   Student account (/account.html)
   ===================================================== */
.account-page { background: #FBFAFC; }
.acc-main { max-width: 1040px; padding: 34px 24px 72px; }
.acc-main .ls-loading { padding: 60px 0; text-align: center; color: var(--muted); }

/* ---------- logged-out: split intro + card ---------- */
.auth-split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: start; }
.auth-intro { padding-top: 8px; }
.eyebrow {
  display: inline-block; font-size: 11.5px; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--pink-d); background: var(--pink-soft);
  padding: 5px 12px; border-radius: 99px; margin-bottom: 14px;
}
.auth-intro h1 { font-size: clamp(28px, 3.6vw, 40px); margin-bottom: 12px; }
.auth-lead { color: var(--muted); font-size: 16px; max-width: 30em; }
.auth-perks { list-style: none; margin: 22px 0 0; display: grid; gap: 11px; }
.auth-perks li { position: relative; padding-left: 30px; font-size: 14.5px; color: var(--ink-2); line-height: 1.55; }
.auth-perks li::before {
  content: "✓"; position: absolute; left: 0; top: 1px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--mint-soft); color: #16A277;
  font-size: 12px; font-weight: 800; display: grid; place-items: center;
}
.auth-quote {
  margin-top: 26px; padding: 16px 18px; border-left: 3px solid var(--pink);
  background: #fff; border-radius: 0 14px 14px 0; font-size: 14.5px; color: var(--ink-2); font-style: italic;
}
.auth-quote small { display: block; margin-top: 6px; font-style: normal; color: var(--muted); font-size: 12.5px; }

.auth-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-l);
  padding: 24px 24px 20px; box-shadow: var(--shadow); position: sticky; top: 88px;
}
.auth-tabs { display: flex; gap: 6px; background: var(--bg-alt); border-radius: 12px; padding: 4px; margin-bottom: 20px; }
.auth-tab {
  flex: 1; border: none; background: none; font: inherit; font-weight: 700; font-size: 14px;
  color: var(--muted); padding: 9px 10px; border-radius: 9px; cursor: pointer;
}
.auth-tab.on { background: #fff; color: var(--ink); box-shadow: 0 2px 8px -4px rgba(18,17,24,.2); }
.auth-card .frow { margin-bottom: 14px; }
.auth-card label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.auth-card input, .acc-card input, .acc-card select, .acc-card textarea {
  width: 100%; font: inherit; font-size: 14.5px; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 11px; padding: 11px 13px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.auth-card input:focus, .acc-card input:focus, .acc-card select:focus, .acc-card textarea:focus {
  outline: none; border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255,121,172,.14);
}
.auth-err { color: #D33; font-size: 13px; margin: -4px 0 12px; background: #FFF4F4; padding: 8px 11px; border-radius: 8px; }
.auth-alt { text-align: center; margin-top: 14px; font-size: 13px; }
.linkbtn { border: none; background: none; font: inherit; color: var(--pink-d); font-weight: 700; cursor: pointer; padding: 0; }
.linkbtn:hover { text-decoration: underline; }
.auth-fine { font-size: 12px; color: var(--muted); margin-top: 12px; text-align: center; line-height: 1.5; }

/* ---------- logged-in shell ---------- */
.acc-hello {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 18px;
  flex-wrap: wrap; margin-bottom: 22px;
}
.acc-hello h1 { font-size: clamp(25px, 3vw, 32px); margin: 6px 0 4px; }
.acc-hello p { color: var(--muted); font-size: 14.5px; }
.acc-hello-act { display: flex; gap: 10px; align-items: center; }

.acc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.acc-stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-m);
  padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; position: relative;
}
.acc-stat-ic { font-size: 17px; }
.acc-stat-num { font-size: 27px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.acc-stat-lab { font-size: 12px; color: var(--muted); font-weight: 600; }
.acc-stat:first-child { background: linear-gradient(135deg, #FFF6F9, #fff); border-color: #FFE0EB; }

.acc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; align-items: start; }
.acc-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-l);
  padding: 22px 22px 20px; margin-bottom: 16px; scroll-margin-top: 84px;
}
.acc-grid .acc-card { margin-bottom: 0; height: 100%; }
.acc-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.acc-card-head h2 { font-size: 18px; }
.acc-link { font-size: 13px; font-weight: 700; color: var(--pink-d); }
.acc-link:hover { text-decoration: underline; }
.acc-empty { color: var(--muted); font-size: 14px; padding: 10px 0 14px; }
.acc-hint { font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.acc-small { font-size: 12.5px; }
.acc-badge {
  font-size: 12px; font-weight: 700; color: var(--pink-d); background: var(--pink-soft);
  padding: 4px 11px; border-radius: 99px; white-space: nowrap;
}
.acc-badge.warn { color: #B26A00; background: #FFF4E0; }
.acc-badge-soft { color: var(--muted); background: var(--bg-alt); }
.acc-badge-soft.on { color: #16A277; background: var(--mint-soft); }

/* upcoming lessons */
.acc-lesson {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  padding: 12px 0; border-bottom: 1px dashed var(--line);
}
.acc-lesson:last-child { border-bottom: none; padding-bottom: 0; }
.acc-lesson-when { font-weight: 700; font-size: 14.5px; }
.acc-lesson-type { font-size: 12.5px; color: var(--muted); margin-top: 3px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.acc-lesson-act { display: flex; gap: 8px; flex-wrap: wrap; }
.acc-tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--bg-alt); color: var(--muted); }
.acc-tag.ok { background: var(--mint-soft); color: #128A66; }
.acc-tag.wait { background: #FFF4E0; color: #A96400; }
.acc-tag.off { background: #F4F3F6; color: #8B8894; }
.acc-tag.soft { background: var(--pink-soft); color: var(--pink-d); }

/* resume learning */
.resume-hero {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px;
  background: linear-gradient(135deg, #FFF7FA, #fff); border: 1px solid #FFE0EB; transition: transform .15s;
}
.resume-hero:hover { transform: translateY(-1px); }
.resume-ic { font-size: 24px; }
.resume-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.resume-body strong { font-size: 14.5px; }
.resume-sub { font-size: 12.5px; color: var(--muted); }
.resume-bar { height: 6px; background: #F3EFF4; border-radius: 99px; overflow: hidden; margin-top: 4px; }
.resume-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--pink), #FFA8C8); border-radius: 99px; }
.resume-go { font-size: 18px; color: var(--pink-d); }
.resume-list { margin-top: 12px; display: grid; gap: 2px; }
.resume-item {
  display: flex; align-items: center; gap: 10px; font-size: 13.5px; padding: 8px 6px;
  border-radius: 9px; color: var(--ink-2);
}
.resume-item:hover { background: var(--bg-alt); }
.resume-item-t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resume-item-p { font-size: 12px; color: var(--muted); font-weight: 700; }

/* booking */
.acc-book-top { margin-bottom: 14px; }
.acc-book-type { max-width: 340px; margin-bottom: 0; }
.acc-card .frow { margin-bottom: 14px; }
.acc-card .frow label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 7px; }
.acc-card .bdates, .acc-card .bslots { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 4px; }
.acc-card #bkSubmit { margin-top: 4px; }

/* packages */
.pkg-tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.pkg-tier {
  position: relative; text-align: left; cursor: pointer; font: inherit;
  border: 1.5px solid var(--line); border-radius: 16px; background: #fff;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 2px;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.pkg-tier:hover { border-color: #FFC3D8; transform: translateY(-1px); }
.pkg-tier.on { border-color: var(--pink); box-shadow: 0 8px 22px -14px rgba(255,121,172,.9); background: linear-gradient(160deg, #FFF8FB, #fff); }
.pkg-tier-top { font-size: 15px; font-weight: 800; }
.pkg-tier-off { font-size: 11.5px; font-weight: 800; color: #fff; background: var(--pink); border-radius: 99px; padding: 2px 9px; align-self: flex-start; }
.pkg-tier-per { font-size: 12.5px; color: var(--muted); }
.pkg-tier-price { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
.pkg-summary { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.pkg-summary .pkg-save { font-size: 12px; font-weight: 800; color: #128A66; background: var(--mint-soft); padding: 3px 9px; border-radius: 99px; }
.pkg-summary .pkg-list { font-size: 12px; color: var(--muted); text-decoration: line-through; font-weight: 600; }
.pkg-pay { margin-top: 18px; padding: 18px; border-radius: 16px; background: var(--bg-alt); border: 1px dashed #DED9E4; }
.pkg-pay h3 { font-size: 14.5px; margin-bottom: 6px; }
.pkg-pay-grid { display: grid; grid-template-columns: 1fr 220px; gap: 18px; align-items: start; margin-top: 12px; }
.pkg-pay-grid strong { font-size: 13px; }
.pkg-pay-qr img { width: 176px; height: auto; aspect-ratio: 520/596; border-radius: 10px; border: 1px solid var(--line); padding: 6px; background: #fff; margin-top: 6px; }

/* rows (orders + ledger) */
.acc-rows { display: grid; }
.acc-row {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px;
}
.acc-row:last-child { border-bottom: none; padding-bottom: 0; }
.acc-row-sub { font-size: 11.5px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.acc-row-right { text-align: right; font-weight: 800; white-space: nowrap; }
.acc-row-right.plus { color: #128A66; }
.acc-row-right.minus { color: var(--ink-2); }
.acc-mini { display: block; font-size: 11.5px; margin-top: 4px; }

/* messages */
.acc-msgs {
  max-height: 320px; min-height: 120px; overflow-y: auto; padding: 6px 4px 8px;
  display: flex; flex-direction: column; gap: 8px; background: #FCFBFC; border-radius: 14px;
}
.acc-msg { display: flex; flex-direction: column; max-width: 82%; }
.acc-msg.me { align-self: flex-end; align-items: flex-end; }
.acc-msg.them { align-self: flex-start; }
.acc-msg-b {
  padding: 9px 13px; border-radius: 14px; font-size: 13.8px; line-height: 1.55;
  background: #fff; border: 1px solid var(--line); white-space: pre-wrap; word-break: break-word;
}
.acc-msg.me .acc-msg-b { background: var(--pink); border-color: var(--pink); color: #121118; }
.acc-msg-t { font-size: 10.5px; color: #A9A6B2; margin-top: 3px; padding: 0 4px; }
.acc-msg-form { display: flex; gap: 8px; margin-top: 12px; }
.acc-msg-form input { flex: 1; }

/* settings */
.acc-set { display: grid; gap: 12px; max-width: 460px; }
.acc-set-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  background: #121118; color: #fff; font-size: 13.5px; font-weight: 600;
  padding: 11px 20px; border-radius: 99px; box-shadow: 0 12px 30px -10px rgba(0,0,0,.4);
  z-index: 999; max-width: min(90vw, 460px); text-align: center; animation: toastIn .2s ease;
}
.toast.bad { background: #B3261E; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (max-width: 900px) {
  .auth-split { grid-template-columns: 1fr; gap: 26px; }
  .auth-card { position: static; }
  .auth-intro { padding-top: 0; }
  .acc-stats { grid-template-columns: 1fr 1fr; }
  .acc-grid { grid-template-columns: 1fr; }
  .pkg-pay-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .acc-main { padding: 22px 16px 56px; }
  .acc-card { padding: 18px 16px; border-radius: 18px; }
  .acc-hello { align-items: flex-start; }
  .acc-hello-act { width: 100%; }
  .acc-lesson { flex-direction: column; align-items: flex-start; }
  .pkg-tiers { grid-template-columns: 1fr; }
  .acc-stat-num { font-size: 23px; }
}

/* ---------- nav: my account ---------- */
.nav-account { position: relative; font-weight: 700; white-space: nowrap; }
.nav-account::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--mint); margin-right: 6px; vertical-align: 1px;
}
@media (max-width: 900px) { .nav-account::before { display: none; } }

/* ---------- pricing card: package quantity picker ---------- */
.pkg-card .price { align-items: flex-end; }
.pkg-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 18px 0 6px; }
.pmt {
  position: relative;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer;
  font: inherit; padding: 9px 10px; display: flex; flex-direction: column; gap: 1px;
  align-items: flex-start; text-align: left; transition: border-color .15s, background .15s, transform .15s, box-shadow .15s;
}
.pmt:hover { border-color: #FFC3D8; transform: translateY(-1px); }
.pmt.on { border-color: var(--pink); background: var(--pink-soft); box-shadow: 0 0 0 2.5px rgba(255, 79, 133, .16); }
.pmt-tag {
  position: absolute; top: 0; right: 8px; transform: translateY(-50%);
  font-size: 8px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: #fff; background: var(--pink); border-radius: 99px; padding: 1px 6px; line-height: 1.5;
  box-shadow: 0 1px 3px rgba(255, 79, 133, .28);
}
.pmt-q { font-size: 12.5px; font-weight: 800; color: var(--ink); line-height: 1.3; }
.pmt-d { font-size: 10px; font-weight: 800; color: #fff; background: var(--pink); border-radius: 99px; padding: 1px 7px; margin: 2px 0; }
.pmt-p { font-size: 16px; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.pmt-per { font-size: 10.5px; color: var(--muted); }
.pkg-note { font-size: 11.5px; color: var(--muted); text-align: center; margin-top: 8px; line-height: 1.45; }

/* ---------- booking modal: logged-in bar ---------- */
.bm-me {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--mint-soft); border: 1px solid #CFF3E4; color: #0F7A5C;
  border-radius: 11px; padding: 8px 12px; font-size: 12.5px; margin: 2px 0 14px; line-height: 1.5;
}
.bm-me-ic {
  width: 18px; height: 18px; border-radius: 50%; background: #128A66; color: #fff;
  display: grid; place-items: center; font-size: 11px; font-weight: 800; flex: 0 0 auto;
}
.bm-me-link { margin-left: auto; font-weight: 800; color: #0F7A5C; white-space: nowrap; }
.bm-me[hidden] { display: none; }
.bm-me-link:hover { text-decoration: underline; }
.bmodal input[readonly] { background: #FAFAFB; color: var(--ink-2); }

/* account polish: fade the day strip so it reads as scrollable */
.acc-card .bdates {
  -webkit-mask-image: linear-gradient(to right, #000 92%, rgba(0, 0, 0, .18));
  mask-image: linear-gradient(to right, #000 92%, rgba(0, 0, 0, .18));
}
.acc-msgs { max-height: 280px; min-height: 96px; }
.acc-main { min-height: calc(100vh - 210px); }

/* day/slot strips: hide the native scrollbar, fade the right edge */
.bdates, .bslots { scrollbar-width: none; -ms-overflow-style: none; }
.bdates::-webkit-scrollbar, .bslots::-webkit-scrollbar { display: none; width: 0; height: 0; }
.bdates { -webkit-mask-image: linear-gradient(to right, #000 93%, rgba(0, 0, 0, .2)); mask-image: linear-gradient(to right, #000 93%, rgba(0, 0, 0, .2)); }

.acc-note-mini { font-size: 11.5px; color: #A96400; background: #FFF6E6; border-radius: 7px; padding: 3px 8px; margin-top: 6px; display: inline-block; }

/* booking success: guest → create an account */
.bm-acc {
  margin-top: 14px; font-size: 13px; text-align: center;
  background: #F7FBF9; border: 1px dashed #CFE9DE; border-radius: 12px; padding: 12px 12px 10px;
}
.bm-acc a {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 12px 18px; border-radius: 99px;
  background: var(--pink); color: #fff !important; font-weight: 800; font-size: 14px;
  box-shadow: var(--shadow-pink);
}
.bm-acc a:hover { background: var(--pink-d); text-decoration: none !important; }
.bm-acc small { display: block; margin-top: 8px; color: var(--muted); font-size: 11.5px; }

/* account header on phones: keep the brand from pushing the page wider */
@media (max-width: 640px) {
  .account-page .brand-mini { min-width: 0; max-width: 46vw; }
  .account-page #accBrand { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .account-page .ls-top-right { gap: 8px; flex: 0 0 auto; }
  .account-page .ls-back { font-size: 12.5px; }
}

/* =====================================================
   Account: next-lesson hero, buy tabs, reschedule modal
   ===================================================== */
.btn-line { background: transparent; color: var(--ink-2); border-color: #DCD7E3; }
.btn-line:hover { border-color: var(--pink); color: var(--pink-d); }

.next-card {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 22px; align-items: center;
  background: radial-gradient(130% 170% at 0% 0%, #3B2440 0%, #201A26 48%, #141119 100%);
  color: #fff; border-radius: 22px; padding: 22px 24px; margin-bottom: 18px;
  box-shadow: 0 20px 44px -30px rgba(18, 17, 24, .85);
}
.next-card::after {
  content: ""; position: absolute; right: -70px; top: -80px; width: 230px; height: 230px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255, 121, 172, .38), transparent 66%);
  pointer-events: none;
}
.next-eyebrow { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: #FFB9D3; font-weight: 800; }
.next-when { font-size: clamp(19px, 2.2vw, 25px); font-weight: 800; letter-spacing: -.01em; margin: 7px 0 4px; }
.next-meta { font-size: 13px; color: rgba(255, 255, 255, .68); }
.next-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; position: relative; z-index: 1; }
.next-count {
  font-size: 12.5px; font-weight: 800; color: #FFD7E4;
  background: rgba(255, 121, 172, .15); border: 1px solid rgba(255, 121, 172, .3);
  padding: 5px 12px; border-radius: 99px;
}
.next-count.live { background: var(--pink); color: #121118; border-color: var(--pink); }
.next-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.next-card .btn-line { border-color: rgba(255, 255, 255, .32); color: #fff; background: rgba(255, 255, 255, .07); }
.next-card .btn-line:hover { border-color: #fff; color: #fff; background: rgba(255, 255, 255, .14); }

.buy-tabs { display: inline-flex; gap: 4px; background: var(--bg-alt); border-radius: 12px; padding: 4px; margin: 4px 0 14px; }
.buy-tab {
  border: none; background: none; font: inherit; font-size: 13px; font-weight: 700; color: var(--muted);
  padding: 8px 16px; border-radius: 9px; cursor: pointer; white-space: nowrap;
}
.buy-tab.on { background: #fff; color: var(--ink); box-shadow: 0 2px 8px -4px rgba(18, 17, 24, .25); }

.pkg-tiers { grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); }
.pkg-tier-off.flat { background: var(--bg-alt, #F4F3F6); color: var(--muted); }
.pkg-tier.single .pkg-tier-price { font-size: 20px; }

.acc-modal {
  position: fixed; inset: 0; z-index: 900; background: rgba(18, 17, 24, .5);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(3px);
}
.acc-modal[hidden] { display: none; }
.acc-modal-box {
  width: min(560px, 100%); background: #fff; border-radius: 20px; padding: 22px 22px 18px;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .5); max-height: 88vh; overflow-y: auto;
}
.acc-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.acc-modal-head h3 { font-size: 18px; }
.acc-x {
  border: none; background: var(--bg-alt); width: 30px; height: 30px; border-radius: 50%;
  font-size: 13px; cursor: pointer; color: var(--ink-2); line-height: 1;
}
.acc-x:hover { background: #EDEAF1; }
.acc-modal-box .frow { margin: 14px 0; }
.acc-modal-box label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 7px; }

/* ---------- classroom ---------- */
.cls-main { max-width: 980px; padding: 30px 24px 70px; }
.cls-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 26px 26px;
  box-shadow: var(--shadow); margin-bottom: 16px;
}
.cls-hero h1 { font-size: clamp(24px, 3vw, 33px); margin: 8px 0 6px; }
.cls-when { color: var(--ink-2); font-size: 15px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cls-count { margin-top: 10px; font-size: 13px; font-weight: 800; color: var(--pink-d); background: var(--pink-soft); display: inline-block; padding: 6px 13px; border-radius: 99px; }
.cls-count.live { background: var(--pink); color: #121118; }
.cls-count.over { background: var(--bg-alt); color: var(--muted); }
.cls-hero-r { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; text-align: right; }
.cls-join.is-off { background: #EFEDF2; color: var(--muted); box-shadow: none; }
.cls-join-note { font-size: 12px; color: var(--muted); max-width: 220px; line-height: 1.5; }
.cls-prep { list-style: none; margin: 0 0 16px; display: grid; gap: 9px; }
.cls-prep li { position: relative; padding-left: 28px; font-size: 14px; color: var(--ink-2); }
.cls-prep li::before {
  content: "✓"; position: absolute; left: 0; top: 0; width: 19px; height: 19px; border-radius: 50%;
  background: var(--mint-soft); color: #16A277; font-size: 11px; font-weight: 800; display: grid; place-items: center;
}
.cls-teacher { display: flex; align-items: center; gap: 11px; padding-top: 14px; border-top: 1px dashed var(--line); }
.cls-teacher img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.cls-teacher strong { display: block; font-size: 14px; }
.cls-teacher span { font-size: 12px; color: var(--muted); }
.cls-msgs { max-height: 240px; }
.cls-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.cls-rule { font-size: 12.5px; color: var(--muted); flex: 1 1 260px; }

@media (max-width: 860px) {
  .next-card, .cls-hero { grid-template-columns: 1fr; }
  .next-side, .cls-hero-r { align-items: flex-start; text-align: left; }
  .next-acts { justify-content: flex-start; }
  .cls-join { width: 100%; }
  .cls-join-note { max-width: none; }
}
@media (max-width: 560px) {
  .next-card { padding: 18px 18px; border-radius: 18px; }
  .next-acts .btn { width: 100%; }
  .cls-main { padding: 20px 16px 56px; }
  .cls-hero { padding: 20px 18px; border-radius: 18px; }
}

/* account: timetable + resume go full width (Preply-style list) */
@media (min-width: 901px) {
  #upcomingCard, #resumeCard { grid-column: 1 / -1; }
  #rsBody { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
  #rsBody > .acc-empty { grid-column: 1 / -1; }
}
.acc-tag { white-space: nowrap; }
.acc-lesson-when { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.acc-lesson-act .btn { white-space: nowrap; }
.pkg-tier-off { min-height: 19px; display: inline-flex; align-items: center; }
.pkg-tier { min-height: 116px; justify-content: flex-start; }

/* resume card: a single item shouldn't leave a half-empty row */
@media (min-width: 901px) {
  #rsBody > .resume-hero:only-child { grid-column: 1 / -1; }
}
/* message box: keep the empty state readable, not a grey slab */
.acc-msgs { background: #FCFBFC; }
.acc-msgs .acc-empty { margin: 0; padding: 18px 14px; }

/* reschedule modal: same scroll fade as the booking strip */
.acc-modal-box .bdates {
  -webkit-mask-image: linear-gradient(to right, #000 92%, rgba(0, 0, 0, .18));
  mask-image: linear-gradient(to right, #000 92%, rgba(0, 0, 0, .18));
}

/* ---------- phones: buy tiers as a tidy list, lesson actions 1+2 ---------- */
@media (max-width: 560px) {
  .pkg-tiers { grid-template-columns: 1fr; }
  .pkg-tier {
    min-height: 0; display: grid; column-gap: 12px; row-gap: 2px; align-items: center;
    grid-template-columns: 1fr auto;
    grid-template-areas: "top price" "off price" "per price";
    padding: 12px 14px;
  }
  .pkg-tier-top { grid-area: top; }
  .pkg-tier-off { grid-area: off; justify-self: start; }
  .pkg-tier-per { grid-area: per; }
  .pkg-tier-price { grid-area: price; font-size: 21px; margin: 0; }
  .acc-lesson { flex-direction: column; align-items: stretch; gap: 10px; }
  .acc-lesson-act { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .acc-lesson-act .btn { width: 100%; }
  .acc-lesson-act .btn:first-child { grid-column: 1 / -1; }
}

.up-empty { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.up-empty .acc-empty { margin: 0; padding: 0; }

/* the card is display:grid, so [hidden] needs an explicit rule */
.next-card[hidden] { display: none !important; }

/* =====================================================
   Student-account entry (authnav.js) — 全站登录/免费注册入口
   ===================================================== */
.nav-auth { display: inline-flex; align-items: center; gap: 6px; margin: 0 4px 0 2px; }
.nav-signin {
  font-size: 14px; font-weight: 700; color: var(--ink-2);
  padding: 8px 10px; border-radius: 99px; white-space: nowrap;
}
.nav-signin:hover { background: var(--pink-soft); color: var(--pink-d); }
.nav-join {
  font-size: 13.5px; font-weight: 800; line-height: 1.1;
  padding: 9px 15px; border-radius: 99px;
  border: 2px solid var(--pink); color: var(--pink-d); background: #fff;
  white-space: nowrap; transition: background .15s, color .15s;
}
.nav-join:hover { background: var(--pink); color: #fff; }

.nav-me {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 13px 4px 4px; border-radius: 99px;
  background: var(--pink-soft); color: var(--pink-d);
}
.nav-me:hover { background: #FFE1EE; }
.nav-me-av {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto;
  background: var(--pink); color: #fff; display: grid; place-items: center;
  font-size: 13px; font-weight: 800;
}
.nav-me-tx { font-size: 13px; font-weight: 800; line-height: 1.15; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-me-tx small { display: block; font-size: 11px; font-weight: 700; color: var(--ink-2); opacity: .7; }

/* free-lesson / starter header */
.nav-auth--ls { margin: 0 10px 0 auto; }
.ls-top-right .nav-auth--ls { margin: 0 2px 0 10px; }

@media (max-width: 960px) {
  .nav-auth { display: flex; width: 100%; margin: 8px 0 0; gap: 8px; }
  .nav-signin, .nav-join { flex: 1 1 auto; text-align: center; padding: 12px 14px; font-size: 15px; }
  .nav-signin { border: 1.5px solid var(--line); color: var(--ink); }
  .nav-me { flex: 1 1 auto; justify-content: center; padding: 8px 14px 8px 8px; }
  .nav-me-tx { max-width: none; }
}
@media (max-width: 640px) {
  .nav-auth--ls { display: none; }
}

/* 游客学免费课时的注册提醒 */
.join-tip {
  position: fixed; right: 20px; bottom: 20px; z-index: 70;
  width: 332px; max-width: calc(100vw - 32px);
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-l);
  padding: 20px 20px 16px; box-shadow: 0 24px 60px rgba(31, 17, 26, .18);
  opacity: 0; transform: translateY(14px); transition: opacity .28s ease, transform .28s ease;
}
.join-tip.is-on { opacity: 1; transform: none; }
.join-tip h4 { margin: 0 0 8px; font-size: 15.5px; font-weight: 800; color: var(--ink); }
.join-tip p { margin: 0 0 14px; font-size: 13px; line-height: 1.6; color: var(--muted); }
.join-tip-x {
  position: absolute; top: 6px; right: 8px; background: none; border: 0;
  font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px 6px;
}
.join-tip-x:hover { color: var(--ink); }
.join-tip-go { width: 100%; justify-content: center; }
.join-tip-later {
  display: block; margin: 10px auto 0; background: none; border: 0;
  font-size: 12.5px; font-weight: 700; color: var(--muted); cursor: pointer; text-decoration: underline;
}
@media (max-width: 560px) {
  .join-tip { left: 12px; right: 12px; bottom: 12px; width: auto; }
}

/* =====================================================
   付款方式选择器（支付宝 / 派安盈 Payoneer）— pay.js
   ===================================================== */
.pay-wrap { max-width: 640px; margin: 26px auto 0; }

.payui {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-l);
  padding: 18px 18px 20px; text-align: left;
  box-shadow: 0 12px 34px rgba(31, 17, 26, .06);
}
.payui-loading { text-align: center; color: var(--muted); font-size: 14px; padding: 10px 0; }
.payui-head {
  margin: 0 0 10px; font-size: 12px; font-weight: 800; letter-spacing: .09em;
  text-transform: uppercase; color: var(--muted); text-align: center;
}

.payui-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  background: var(--bg-alt); border-radius: 15px; padding: 5px;
}
.payui-tab {
  display: flex; flex-direction: column; gap: 1px; align-items: flex-start;
  padding: 9px 14px; border-radius: 11px; cursor: pointer;
  background: transparent; border: 1.5px solid transparent;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.payui-tab-n { font-size: 14.5px; font-weight: 800; color: var(--ink); line-height: 1.2; }
.payui-tab-s { font-size: 11.5px; font-weight: 600; color: var(--muted); line-height: 1.3; }
.payui-tab:hover { background: rgba(255, 255, 255, .6); }
.payui-tab.is-on {
  background: #fff; border-color: var(--pink); box-shadow: 0 4px 14px rgba(255, 121, 172, .18);
}
.payui-tab.is-on .payui-tab-n { color: var(--pink-d); }

.payui-panel { margin-top: 15px; }
.payui-panel[hidden] { display: none !important; }

.payui-ap { display: grid; grid-template-columns: 1fr 168px; gap: 18px; align-items: start; }
.payui-ap-l { min-width: 0; }
.payui-amt { margin: 0 0 10px; font-size: 14.5px; color: var(--ink-2); }
.payui-amt strong { color: var(--pink-d); font-size: 17px; }

.payui-steps {
  margin: 0 0 10px; padding-left: 19px;
  font-size: 13.5px; line-height: 1.75; color: var(--ink-2);
}
.payui-steps li { margin-bottom: 1px; }
.payui-steps li::marker { color: var(--pink); font-weight: 800; }

.payui-note { margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--muted); }

.payui-qr { display: block; text-align: center; text-decoration: none; }
.payui-qr img {
  display: block; width: 100%; max-width: 168px; height: auto;
  aspect-ratio: 520 / 596; object-fit: contain; margin: 0 auto;
  border: 1px solid var(--line); border-radius: 12px; padding: 6px; background: #fff;
}
.payui-qr-cap { display: block; margin-top: 5px; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.payui-qr:hover img { border-color: var(--pink); }

.payui-po { text-align: center; }
.payui-po .payui-amt { margin-bottom: 12px; }
.payui-po-btn { min-width: 262px; max-width: 100%; }
.payui-po .payui-note { margin-top: 11px; padding: 0 4px; }

.payui-solo .payui-panel { margin-top: 0; }
.payui-solo-h { margin: 0 0 10px; font-size: 13px; font-weight: 800; color: var(--muted); text-align: center; }
.payui-empty {
  margin: 0; font-size: 13px; color: var(--muted); text-align: center;
}

/* 订课弹窗里的紧凑版 */
.bm-payui .payui { padding: 14px; border-radius: 14px; box-shadow: none; background: var(--bg-alt); border-style: dashed; }
.bm-payui .payui-tabs { background: #fff; }
.bm-payui .payui-ap { grid-template-columns: 1fr 132px; gap: 12px; }
.bm-payui .payui-qr img { max-width: 132px; }
.bm-payui .payui-steps { font-size: 12.5px; line-height: 1.65; }
.bm-payui .payui-note { font-size: 11.5px; }
.bm-payui .payui-po-btn { min-width: 0; width: 100%; }

/* 账户页购买面板 */
.pkg-pay .payui { background: #fff; box-shadow: none; }

@media (max-width: 640px) {
  .pay-wrap { margin-top: 20px; }
  .payui { padding: 15px 14px 17px; border-radius: var(--r-m); }
  .payui-tab { padding: 9px 10px; }
  .payui-tab-n { font-size: 13.5px; }
  .payui-tab-s { font-size: 10.5px; }
  .payui-ap { grid-template-columns: 1fr; gap: 14px; }
  .payui-qr { order: -1; }
  .payui-qr img { max-width: 190px; }
  .payui-po-btn { width: 100%; min-width: 0; }
  .bm-payui .payui-ap { grid-template-columns: 1fr; }
  .bm-payui .payui-qr img { max-width: 160px; }
}

/* ============ 零基础路线（roadmap） ============ */
.roadmap {
  margin-top: 54px; padding-top: 40px;
  border-top: 1px dashed var(--line);
}
.rm-head { max-width: 720px; }
.rm-head h3 { font-size: clamp(21px, 2.4vw, 26px); font-weight: 800; margin: 6px 0 8px; }
.rm-head p { color: var(--muted); font-size: 15px; }
.rm-track {
  list-style: none; margin: 26px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.rm-step {
  position: relative; background: #fff; border: 1.5px solid var(--line);
  border-radius: var(--r-m); padding: 20px 18px 18px 18px;
  display: flex; flex-direction: column; gap: 8px;
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.rm-step:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.rm-step.has-coach { border-color: #FFD8E8; }
.rm-num {
  position: absolute; top: -13px; left: 18px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--pink); color: #fff; font-size: 13px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px -4px rgba(255,121,172,.9);
}
.rm-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.rm-when {
  font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--pink-d);
}
.rm-coach {
  font-size: 11px; font-weight: 700; color: #7A4E00;
  background: #FFF3D6; border-radius: 99px; padding: 2px 9px;
}
.rm-step h4 { font-size: 16.5px; font-weight: 800; line-height: 1.35; }
.rm-goal { font-size: 14px; color: var(--ink-2); }
.rm-can { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 5px; }
.rm-can li { font-size: 13.2px; color: var(--muted); display: flex; gap: 7px; align-items: flex-start; }
.rm-tick { color: var(--mint); font-weight: 900; line-height: 1.5; }
.rm-free {
  margin-top: auto; font-size: 13.5px; font-weight: 800; color: var(--pink-d);
  border-top: 1px solid var(--line); padding-top: 10px;
}
.rm-free:hover { text-decoration: underline; }
.rm-foot {
  margin-top: 18px; background: var(--pink-soft); border-radius: var(--r-m);
  padding: 18px 20px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  justify-content: space-between;
}
.rm-note { font-size: 13px; color: var(--muted); flex: 1 1 320px; }
.rm-cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rm-cta p { font-size: 14px; font-weight: 700; max-width: 380px; }

/* ============ HSK 说明 ============ */
.hsk-grid { display: grid; grid-template-columns: 0.9fr 1.35fr; gap: 24px; align-items: start; }
.hsk-what h3 { font-size: 17px; margin-bottom: 6px; }
.hsk-what p { font-size: 14.5px; color: var(--ink-2); }
.hsk-note {
  margin-top: 16px; background: var(--bg-alt); border: 1.5px solid var(--line);
  border-radius: 14px; padding: 14px 16px;
}
.hsk-note strong { display: block; font-size: 14px; margin-bottom: 4px; }
.hsk-note p { font-size: 13.5px; color: var(--muted); }
.hsk-levels {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.hsk-lv {
  border: 1.5px solid var(--line); border-radius: 14px; padding: 13px 14px;
  background: #fff; transition: border-color .2s, box-shadow .2s;
}
.hsk-lv:hover { border-color: #FFD8E8; box-shadow: var(--shadow); }
.hsk-lv-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hsk-tag {
  display: inline-block; background: var(--pink-soft); color: var(--pink-d);
  font-size: 12.5px; font-weight: 800; border-radius: 99px; padding: 2px 10px;
}
.hsk-eq { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.hsk-words { font-size: 13px; font-weight: 800; margin-top: 8px; }
.hsk-can { font-size: 12.6px; color: var(--muted); line-height: 1.55; margin-top: 2px; }

@media (max-width: 980px) {
  .rm-track { grid-template-columns: repeat(2, 1fr); }
  .hsk-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .rm-track { grid-template-columns: 1fr; }
  .rm-foot { flex-direction: column; align-items: flex-start; }
  .hsk-levels { grid-template-columns: repeat(2, 1fr); }
}

/* ============ 拼音：口型卡片 / 重点音 / 对比练习 ============ */
.py-grid { grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 12px; }
.py-cell {
  align-items: flex-start; text-align: left; padding: 14px 13px 12px; gap: 2px;
}
.py-cell .p-head { display: flex; align-items: baseline; gap: 8px; }
.py-cell .p-big { font-size: 23px; }
.py-cell .p-tone { font-size: 15px; }
.py-cell .p-char { font-size: 13px; color: var(--ink-2); }
.py-cell .p-en { font-size: 12px; color: var(--muted); line-height: 1.45; margin-top: 4px; }
.py-grid.ws .p-big { font-size: 20px; }
.py-mouth {
  margin-top: 8px; display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 700; color: var(--pink-d);
  background: var(--pink-soft); border: 0; border-radius: 99px; padding: 3px 10px;
  cursor: pointer; transition: background .15s, color .15s;
}
.py-mouth:hover { background: #FFE0EC; }
.py-mouth.is-open { background: var(--pink); color: #fff; }
.py-cell.is-open { grid-column: span 2; border-color: var(--pink); background: #fff; }
.py-detail { width: 100%; margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 10px; }
.pd-grid { display: grid; grid-template-columns: 132px 1fr; gap: 10px; align-items: center; }
.pd-facts { margin: 0; display: grid; gap: 5px; }
.pd-facts > div { display: grid; grid-template-columns: 46px 1fr; gap: 6px; align-items: baseline; }
.pd-facts dt { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--pink-d); }
.pd-facts dd { margin: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.35; }
.pd-trap {
  margin-top: 8px; font-size: 12px; line-height: 1.5; color: #7A4E00;
  background: #FFF7E6; border-radius: 8px; padding: 7px 9px;
}
.pd-video { width: 100%; margin-top: 8px; border-radius: 10px; background: #000; }
.pd-video-empty {
  margin-top: 8px; font-size: 11.5px; color: var(--muted); line-height: 1.5;
  background: var(--bg-alt); border-radius: 8px; padding: 7px 9px;
}
/* 侧视口型图 */
.mouth-svg { width: 100%; max-width: 132px; height: auto; display: block; }
.mouth-svg .m-palate { fill: none; stroke: #C9C5D4; stroke-width: 3; stroke-linecap: round; }
.mouth-svg .m-teeth { stroke: #fff; stroke-width: 5; }
.mouth-svg .m-lip { fill: none; stroke: var(--pink); stroke-width: 3.4; stroke-linecap: round; }
.mouth-svg .m-lip-ring { fill: none; stroke: var(--pink); stroke-width: 3; }
.mouth-svg .m-tongue { fill: #FFD3E3; stroke: var(--pink-d); stroke-width: 2.4; stroke-linejoin: round; }
.mouth-svg .m-air { fill: none; stroke: var(--mint); stroke-width: 3; stroke-linecap: round; }
.mouth-svg .m-air path:nth-child(2) { animation: airPuff 1.1s ease-in-out infinite; }
.mouth-svg .m-nose { fill: none; stroke: var(--mint); stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 4 3; }
@keyframes airPuff { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .mouth-svg .m-air path:nth-child(2) { animation: none; } }

/* 重点音四张卡 */
.ks-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 14px; }
.ks-card {
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-m);
  padding: 18px 18px 16px;
}
.ks-head { display: flex; gap: 10px; align-items: flex-start; }
.ks-n {
  flex: 0 0 24px; height: 24px; border-radius: 50%; background: var(--pink); color: #fff;
  font-size: 12.5px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.ks-head h3 { font-size: 16px; font-weight: 800; }
.ks-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.ks-body { display: grid; grid-template-columns: 118px 1fr; gap: 12px; align-items: center; margin: 12px 0 10px; }
.ks-mouth .mouth-svg { max-width: 118px; }
.ks-steps { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.ks-steps li { font-size: 12.5px; color: var(--ink-2); line-height: 1.45; }
.ks-why { font-size: 12.8px; color: var(--muted); line-height: 1.55; margin-bottom: 10px; }
.ks-pairs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ks-pair {
  display: inline-flex; align-items: baseline; gap: 5px; cursor: pointer;
  background: var(--bg-alt); border: 1.5px solid var(--line); border-radius: 99px;
  padding: 5px 11px; transition: all .15s;
}
.ks-pair:hover { border-color: var(--pink); background: var(--pink-soft); }
.ks-pair b { font-size: 14px; font-weight: 800; }
.ks-pair span { font-size: 12px; color: var(--muted); }
.ks-all {
  cursor: pointer; border: 1.5px dashed var(--line); background: #fff; border-radius: 99px;
  padding: 5px 12px; font-size: 11.5px; font-weight: 700; color: var(--pink-d);
}
.ks-all:hover { border-color: var(--pink); }

/* 最小对立对 */
.ct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-top: 12px; }
.ct-item { background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.ct-label { font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--pink-d); }
.ct-row { display: flex; align-items: center; gap: 6px; margin: 6px 0 4px; }
.ct-btn {
  flex: 1; cursor: pointer; background: var(--bg-alt); border: 1.5px solid var(--line);
  border-radius: 10px; padding: 6px 4px; display: flex; flex-direction: column; align-items: center; gap: 1px;
}
.ct-btn:hover { border-color: var(--pink); background: var(--pink-soft); }
.ct-btn b { font-size: 15px; font-weight: 800; }
.ct-btn span { font-size: 11.5px; color: var(--muted); }
.ct-vs { color: var(--muted); font-size: 12px; }
.ct-all {
  cursor: pointer; border: 0; background: none; padding: 0; font-size: 11.5px;
  font-weight: 700; color: var(--pink-d); text-decoration: underline;
}
.ct-note { font-size: 11.5px; color: var(--muted); margin-top: 4px; line-height: 1.4; }

@media (max-width: 900px) {
  .ks-grid { grid-template-columns: 1fr; }
  .py-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
@media (max-width: 560px) {
  .py-cell.is-open { grid-column: span 1; }
  .pd-grid { grid-template-columns: 1fr; }
  .ks-body { grid-template-columns: 1fr; }
  .ks-mouth .mouth-svg { max-width: 150px; margin: 0 auto; }
}

/* ---------- HSK badge + popover（点徽标就地解释等级） ---------- */
.badge-hsk.is-tap {
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: background .15s, color .15s, box-shadow .15s;
}
.badge-hsk.is-tap:hover,
.badge-hsk.is-tap:focus-visible {
  background: var(--pink);
  color: #fff;
  box-shadow: 0 2px 8px rgba(233, 30, 99, .28);
  outline: none;
}
.badge-hsk.is-tap::after { content: '?'; font-size: 10px; margin-left: 3px; opacity: .55; }

.hsk-pop {
  position: fixed;
  z-index: 900;
  width: 300px;
  max-width: calc(100vw - 20px);
  padding: 14px 16px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(40, 20, 40, .16);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink);
  animation: hpIn .16s ease-out;
}
.hsk-pop[hidden] { display: none; }
@keyframes hpIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.hp-top { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.hp-tag { font-size: 15px; font-weight: 800; color: var(--pink-d); }
.hp-eq { font-size: 11.5px; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.hp-x {
  margin-left: auto;
  border: 0; background: none; padding: 0 2px;
  font-size: 19px; line-height: 1; color: var(--muted); cursor: pointer;
}
.hp-x:hover { color: var(--ink); }
.hp-w { margin: 0 0 4px; font-weight: 700; }
.hp-can { margin: 0 0 8px; color: var(--muted); }
.hp-note { margin: 0 0 8px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 12.5px; color: var(--muted); }
.hp-more { font-size: 12.5px; font-weight: 700; color: var(--pink-d); text-decoration: none; }
.hp-more:hover { text-decoration: underline; }

/* 语言 beta 提示（es/pt/ru/ja/ko 只翻译了界面的一小部分） */
.lang-beta {
  position: absolute;
  top: 100%;
  right: 0;
  margin: 6px 0 0;
  max-width: 320px;
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(40, 20, 40, .10);
  z-index: 60;
}
.lang-beta[hidden] { display: none; }
@media (max-width: 720px) {
  .lang-beta { right: -40px; max-width: 260px; }
}

/* ---------- About 区：三条完整长度的长评价 ---------- */
.about-quotes { margin-top: 54px; }
.aq-head { max-width: 660px; margin: 0 auto 26px; text-align: center; }
.aq-head h3 { margin: 10px 0 8px; font-size: 22px; line-height: 1.35; color: var(--ink); }
.aq-head p { margin: 0; font-size: 14px; color: var(--muted); }
.aq-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.aq-card {
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 26px 24px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  box-shadow: var(--shadow);
}
.aq-mark {
  position: absolute; top: 6px; left: 15px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 46px; line-height: 1;
  color: var(--pink); opacity: .18;
  pointer-events: none;
}
.aq-card blockquote {
  position: relative;
  flex: 1 1 auto;
  margin: 0 0 16px;
  padding: 0;
  font-size: 14.5px;
  line-height: 1.72;
  color: var(--ink-2);
}
.aq-card figcaption {
  display: flex; align-items: center; gap: 9px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.aq-init {
  flex: 0 0 auto;
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--pink-soft); color: var(--pink-d);
  font-size: 11.5px; font-weight: 800; letter-spacing: .02em;
}
.aq-meta { font-size: 12.5px; font-weight: 600; color: var(--muted); }

@media (max-width: 960px) {
  .aq-grid { grid-template-columns: 1fr; gap: 14px; }
  .about-quotes { margin-top: 34px; }
  .aq-head h3 { font-size: 19px; }
}
