
  /* ---- Booking flow ---- */
  .bk-steps{ list-style:none; display:grid; grid-template-columns:repeat(3,1fr); gap:6px; padding:0; margin:10px 0 12px; }
  .bk-steps li{ background:var(--card); border:1px solid var(--line); border-radius:14px; padding:8px 8px 9px; font-family:var(--font); display:flex; flex-direction:column; gap:1px; min-width:0; }
  .bk-steps li span{ width:22px; height:22px; border-radius:999px; background:var(--cover); color:var(--on-cover,#fff); font:800 12px var(--font); display:inline-flex; align-items:center; justify-content:center; margin-bottom:3px; }
  .bk-steps li b{ font-size:12.5px; line-height:1.2; }
  .bk-steps li em{ font-style:normal; font-size:11px; color:var(--muted); line-height:1.25; }
  .teacher-bookable{ display:inline-block; margin-top:6px; font:800 11px var(--font); color:var(--cover-deep); background:var(--primary-tint); padding:3px 8px; border-radius:999px; }
  body.dark-mode .teacher-bookable{ color:var(--cover); }
  .tm-lesson-info{ display:flex; gap:6px; margin:12px 0 10px; }
  .tm-lesson-info > div{ flex:1; background:var(--card); border:1px solid var(--line); border-radius:12px; padding:8px 6px; text-align:center; display:flex; flex-direction:column; }
  .tm-lesson-info b{ font-size:14.5px; } .tm-lesson-info span{ font-size:11px; color:var(--muted); }
  .tm-book-btn{ margin-top:12px; min-height:48px; font-size:15px; }
  .tm-pay-info{ margin-top:14px; border-top:1px solid var(--line); padding-top:12px; }
  .tm-pay-chips{ display:flex; flex-wrap:wrap; gap:6px; }
  .tm-pay-chip{ font:700 12px var(--font); background:var(--card); border:1px solid var(--line); border-radius:999px; padding:5px 10px; }
  .bk-modal{ max-width:440px; }
  .bk-stepper{ list-style:none; display:flex; gap:4px; padding:0; margin:0 0 12px; counter-reset:bk; }
  .bk-stepper li{ flex:1; font:700 11px var(--font); color:var(--muted); text-align:center; border-top:3px solid var(--line); padding-top:5px; }
  .bk-stepper li.on{ color:var(--ink); border-top-color:var(--cover); }
  .bk-days{ display:flex; gap:6px; overflow-x:auto; padding-bottom:4px; -webkit-overflow-scrolling:touch; scrollbar-width:thin; }
  .bk-day{ flex:0 0 auto; min-width:56px; border:1px solid var(--line); background:var(--card); color:var(--ink); border-radius:14px; padding:6px 4px; display:flex; flex-direction:column; align-items:center; cursor:pointer; font-family:var(--font); }
  .bk-day span, .bk-day em{ font-size:10.5px; font-style:normal; color:var(--muted); }
  .bk-day b{ font-size:17px; line-height:1.2; }
  .bk-day.on{ background:var(--cover); border-color:transparent; } .bk-day.on, .bk-day.on span, .bk-day.on em{ color:var(--on-cover,#fff); }
  .bk-slot-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(92px,1fr)); gap:6px; }
  .bk-slot{ border:1.5px solid var(--cover); background:var(--card); color:var(--cover-deep); border-radius:12px; padding:10px 4px; font:800 14px var(--font); cursor:pointer; min-height:44px; }
  body.dark-mode .bk-slot{ color:var(--cover); }
  .bk-slot:hover, .bk-slot:focus-visible{ background:var(--primary-tint); }
  .bk-sum{ background:var(--card); border:1px solid var(--line); border-radius:14px; padding:4px 12px; }
  .bk-sum-row{ display:flex; justify-content:space-between; gap:12px; padding:9px 0; border-bottom:1px solid var(--line); font-family:var(--font); font-size:13.5px; }
  .bk-sum-row:last-child{ border-bottom:none; }
  .bk-sum-row span{ color:var(--muted); flex-shrink:0; } .bk-sum-row b{ text-align:right; } .bk-sum-row small{ font-weight:600; color:var(--muted); }
  .bk-next-box{ background:var(--gold-tint); border-radius:14px; padding:10px 12px; font-family:var(--font); display:flex; flex-direction:column; gap:2px; text-align:left; }
  .bk-next-box span{ font-size:12.5px; color:var(--muted); }
  .bk-summary{ display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
  .bk-sum-chip{ font:700 12px var(--font); background:var(--card); border:1px solid var(--line); border-radius:999px; padding:5px 10px; }
  .bk-sum-chip.due, .bk-pay-chip.due{ background:var(--gold-tint); border-color:transparent; }
  .bk-sum-chip.wait, .bk-pay-chip.wait{ background:var(--warn-bg); border-color:transparent; }
  .bk-card{ margin-top:8px; padding:12px 14px; }
  .bk-card.due{ border-left:4px solid var(--gold); }
  .bk-card.past{ opacity:.85; }
  .bk-when{ font-family:var(--font); font-size:14.5px; }
  .bk-rel{ font-size:11.5px; font-weight:800; color:var(--cover-deep); background:var(--primary-tint); border-radius:999px; padding:2px 8px; margin-left:4px; white-space:nowrap; }
  body.dark-mode .bk-rel{ color:var(--cover); }
  .bk-who{ font-family:var(--font); font-size:13px; color:var(--muted); margin-top:2px; } .bk-who b{ color:var(--ink); }
  .bk-note{ margin-top:4px; }
  .bk-pay-row{ margin-top:8px; }
  .bk-pay-chip{ display:inline-block; font:700 12px var(--font); border-radius:10px; padding:5px 9px; background:var(--paper-dark); line-height:1.35; }
  .bk-pay-chip.ok{ background:var(--ok-bg); color:var(--ok); }
  .bk-acts{ display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
  .bk-acts button{ flex:1 1 auto; margin:0 !important; min-height:40px; }
  /* ---- Pay sheet ---- */
  .pay-amount{ text-align:center; margin:2px 0 10px; font-family:var(--font); }
  .pay-amount b{ display:block; font-size:28px; line-height:1.15; }
  .pay-amount span{ font-size:12.5px; color:var(--muted); }
  .pay-ref{ display:flex; align-items:center; justify-content:space-between; gap:8px; background:var(--gold-tint); border-radius:12px; padding:8px 10px; font:600 12.5px var(--font); margin-bottom:10px; }
  .pay-ref code{ font:800 14px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing:.5px; }
  .pay-method{ border:1px solid var(--line); border-radius:14px; background:var(--card); margin-bottom:8px; overflow:hidden; }
  .pay-method > summary{ list-style:none; cursor:pointer; padding:12px; display:flex; align-items:center; gap:10px; font:800 14px var(--font); min-height:48px; box-sizing:border-box; }
  .pay-method > summary::-webkit-details-marker{ display:none; }
  .pay-method > summary .pm-ic{ font-size:20px; width:28px; text-align:center; }
  .pay-method > summary .pm-sub{ display:block; font-weight:600; font-size:11.5px; color:var(--muted); }
  .pay-method > summary::after{ content:'›'; margin-left:auto; font-size:20px; color:var(--muted); transition:transform .15s; }
  .pay-method[open] > summary::after{ transform:rotate(90deg); }
  .pay-method-body{ padding:0 12px 12px; font-family:var(--font); font-size:13px; }
  .pay-row{ display:flex; justify-content:space-between; align-items:center; gap:8px; padding:6px 0; border-top:1px dashed var(--line); }
  .pay-row span{ color:var(--muted); } .pay-row b{ word-break:break-all; text-align:right; }
  .pay-copy{ border:1px solid var(--line); background:var(--paper); color:var(--ink); border-radius:999px; padding:4px 10px; font:700 11.5px var(--font); cursor:pointer; flex-shrink:0; }
  .pay-qr{ display:block; width:100%; max-width:260px; margin:4px auto 8px; border-radius:12px; background:#fff; }
  .pay-open{ display:block; text-align:center; text-decoration:none; margin-top:8px; }
  /* ---- Teacher profile editor ---- */
  .tf-checklist{ background:var(--card); border:1px solid var(--line); border-radius:14px; padding:10px 12px; margin-bottom:12px; font-family:var(--font); }
  .tf-checklist .tfc-head{ font-weight:800; font-size:13.5px; margin-bottom:6px; display:flex; justify-content:space-between; gap:8px; }
  .tf-checklist .tfc-bar{ height:6px; border-radius:999px; background:var(--paper-dark); overflow:hidden; margin-bottom:8px; }
  .tf-checklist .tfc-bar i{ display:block; height:100%; background:var(--cover); border-radius:999px; }
  .tf-checklist button{ display:flex; width:100%; text-align:left; gap:8px; align-items:flex-start; background:none; border:none; padding:5px 0; font:600 12.5px var(--font); color:var(--ink); cursor:pointer; }
  .tf-checklist button.done{ color:var(--muted); cursor:default; }
  .tf-checklist button .tfc-fix{ margin-left:auto; color:var(--cover-deep); font-weight:800; white-space:nowrap; }
  body.dark-mode .tf-checklist button .tfc-fix{ color:var(--cover); }
  .tf-section{ border-top:1px solid var(--line); padding-top:12px; margin-top:12px; scroll-margin-top:12px; }
  .tf-section:first-of-type{ border-top:none; margin-top:0; padding-top:0; }
  .tf-sec-head{ font:800 15px var(--font); margin-bottom:10px; display:flex; align-items:center; gap:8px; }
  .tf-sec-num{ width:24px; height:24px; border-radius:999px; background:var(--cover); color:var(--on-cover,#fff); font-size:12.5px; display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; }
  .tf-section.flash{ animation:tfFlash 1.2s ease; }
  @keyframes tfFlash{ 0%,60%{ background:var(--gold-tint); } 100%{ background:transparent; } }
  .tf-pay-group{ background:var(--card); border:1px solid var(--line); border-radius:14px; padding:10px; margin-bottom:8px; }
  .tf-pay-group .teacher-search{ margin-top:0; }
  .tf-pay-title{ font:800 13px var(--font); margin-bottom:6px; }
  .tf-pay-tag{ font-weight:700; font-size:10.5px; background:var(--gold-tint); border-radius:999px; padding:2px 7px; margin-left:4px; white-space:nowrap; }
  .tf-vqr-preview{ text-align:center; }
  .tf-vqr-preview img{ width:150px; border-radius:10px; background:#fff; }
  .tf-more{ margin:4px 0 8px; }
  .tf-more > summary{ cursor:pointer; font:700 12.5px var(--font); color:var(--cover-deep); padding:4px 0; }
  body.dark-mode .tf-more > summary{ color:var(--cover); }
  /* ---- Quiz maker ---- */
  .cq-q{ border:1px solid var(--line); background:var(--card); border-radius:14px; padding:10px; margin-bottom:8px; }
  .cq-q-head{ display:flex; align-items:center; gap:8px; font:800 12.5px var(--font); margin-bottom:6px; }
  .cq-q-head .cq-type{ color:var(--muted); font-weight:700; }
  .cq-q-head button{ margin-left:auto; }
  .cq-choice{ display:flex; align-items:center; gap:6px; margin-bottom:5px; }
  .cq-choice input[type=radio]{ width:18px; height:18px; flex-shrink:0; accent-color:var(--cover); }
  .cq-choice .teacher-search{ margin:0; }
  .cq-tone-preview{ display:flex; flex-wrap:wrap; gap:4px; margin-top:6px; }
  .cq-tone-preview span{ font:700 13px var(--font); background:var(--paper-dark); border-radius:8px; padding:3px 8px; }
  .cq-tone-preview span.ans{ background:var(--ok-bg); color:var(--ok); }
  .cq-add-row{ display:flex; gap:6px; margin-bottom:8px; } .cq-add-row button{ flex:1; }
  .cq-run-q{ font:800 20px var(--font); text-align:center; margin:8px 0 4px; line-height:1.3; }
  .cq-run-hint{ text-align:center; font-size:12.5px; color:var(--muted); margin-bottom:12px; font-family:var(--font); }
  .cq-run-opts{ display:grid; gap:8px; }
  .cq-run-opts.tones{ grid-template-columns:repeat(3,1fr); }
  .cq-opt{ border:1.5px solid var(--line); background:var(--card); color:var(--ink); border-radius:14px; padding:12px; font:700 15px var(--font); cursor:pointer; min-height:50px; text-align:left; }
  .cq-run-opts.tones .cq-opt{ text-align:center; font-size:20px; }
  .cq-opt.right{ border-color:var(--ok); background:var(--ok-bg); color:var(--ok); }
  .cq-opt.wrong{ border-color:var(--bad); background:var(--bad-bg); color:var(--bad); }
  .cq-opt:disabled{ cursor:default; }
  .cq-progress{ height:6px; background:var(--paper-dark); border-radius:999px; overflow:hidden; margin-bottom:6px; }
  .cq-progress i{ display:block; height:100%; background:var(--cover); transition:width .2s; }
  .cq-score{ text-align:center; font-family:var(--font); margin:6px 0 10px; }
  .cq-score b{ display:block; font-size:34px; }
  .cq-review-row{ font-family:var(--font); font-size:13px; padding:7px 0; border-bottom:1px solid var(--line); }
  /* ---- Watch together (YouTube) ---- */
  #ytPanel{ position:fixed; right:12px; bottom:calc(90px + env(safe-area-inset-bottom)); width:min(460px, calc(100vw - 24px)); z-index:9600; background:#0b0f0e; border-radius:16px; box-shadow:0 20px 50px rgba(0,0,0,.45); overflow:hidden; display:none; font-family:var(--font); }
  #ytPanel.show{ display:block; }
  #ytPanel.big{ width:min(900px, calc(100vw - 24px)); }
  #ytPanel .yt-head{ display:flex; align-items:center; gap:6px; padding:8px 10px; color:#fff; font-size:12.5px; font-weight:800; }
  #ytPanel .yt-head .yt-who{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  #ytPanel .yt-head button{ background:rgba(255,255,255,.14); color:#fff; border:none; border-radius:999px; min-width:32px; height:32px; padding:0 10px; cursor:pointer; font:700 12px var(--font); }
  #ytPanel .yt-stage{ position:relative; aspect-ratio:16/9; background:#000; }
  #ytPanel .yt-stage > div, #ytPanel .yt-stage iframe{ position:absolute; inset:0; width:100%; height:100%; border:0; }
  #ytPanel .yt-empty{ position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; color:#fff; padding:16px; text-align:center; }
  #ytPanel .yt-empty input{ width:100%; max-width:360px; }
  #ytPanel .yt-tap{ position:absolute; inset:0; display:none; align-items:center; justify-content:center; background:rgba(0,0,0,.55); z-index:2; }
  #ytPanel .yt-tap.show{ display:flex; }
  /* ---- Teacher recordings ---- */
  .wr-row{ display:flex; align-items:center; gap:8px; padding:7px 0; border-bottom:1px solid var(--line); font-family:var(--font); font-size:13.5px; }
  .wr-row .wr-word{ flex:1; min-width:0; } .wr-row .wr-for{ display:block; font-size:11.5px; color:var(--muted); }
  .wr-rec-box{ display:flex; gap:8px; align-items:center; margin:8px 0; }
  .wr-rec-box .check-btn{ flex:1; margin:0 !important; min-height:46px; }
  .wr-time{ font:800 13px var(--font); min-width:48px; text-align:center; }
  #flashTeacherVoice{ font-size:15px; }
  /* ---- Word list import ---- */
  .wl-preview{ font-family:var(--font); font-size:12.5px; background:var(--card); border:1px solid var(--line); border-radius:12px; padding:8px 10px; margin:6px 0; max-height:140px; overflow:auto; }
  .wl-preview table{ width:100%; border-collapse:collapse; } .wl-preview td{ padding:3px 4px; border-bottom:1px solid var(--line); }
  .wl-opts{ display:flex; gap:6px; flex-wrap:wrap; align-items:center; font:600 12px var(--font); color:var(--muted); margin-bottom:6px; }
