/* ===== Reset & Variables (PC同款配色) ===== */

/* ===== #43 Local IPA webfont (Charis SIL) ===== */
@font-face {
  font-family: "Charis Web";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/charis-latin.woff2") format("woff2");
 
}
@font-face {
  font-family: "Charis Web";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/ipa-full.woff2?v=2") format("woff2");
 
}

    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    :root {
      --primary: #534AB7;
      --primary-light: #EEEDFE;
      --primary-dark: #3C3489;
      --secondary: #1D9E75;
      --secondary-light: #E1F5EE;
      --accent-warm: #BA7517;
      --accent-warm-light: #FAEEDA;
      --danger: #E24B4A;
      --danger-light: #FCEBEB;
      --bg-gradient-start: #667eea;
      --bg-gradient-end: #764ba2;
      --bg-main: #f0f2f5;
      --bg-card: #ffffff;
      --text-primary: #1a1a2e;
      --text-secondary: #6c757d;
      --text-tertiary: #adb5bd;
      --text-light: #ffffff;
      --border: #e9ecef;
      --border-focus: #534AB7;
      --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
      --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
      --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
      --shadow-glow: 0 0 20px rgba(83,74,183,0.3);
      --radius-sm: 8px;
      --radius: 12px;
      --radius-md: 12px;
      --radius-lg: 16px;
      --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* ===== Dark Mode (PC同款) ===== */
    [data-theme="dark"] {
      --primary: #7C6EE8;
      --primary-light: #1A1640;
      --primary-dark: #9D8CFF;
      --secondary: #34D399;
      --secondary-light: #0F2A1E;
      --accent-warm: #F59E0B;
      --accent-warm-light: #2A1F05;
      --danger: #F87171;
      --danger-light: #2A1010;
      --bg-gradient-start: #0a0a14;
      --bg-gradient-end: #0f0f1a;
      --bg-main: #0f0f1a;
      --bg-card: #1C1C36;
      --text-primary: #E0E0EC;
      --text-secondary: #9C9CB4;
      --text-tertiary: #555568;
      --text-light: #E8E8F0;
      --border: #2A2A40;
      --border-focus: #7C6EE8;
      --shadow-sm: 0 2px 8px rgba(0,0,0,0.5);
      --shadow-md: 0 4px 16px rgba(0,0,0,0.6);
      --shadow-lg: 0 8px 32px rgba(0,0,0,0.7);
      --shadow-glow: 0 0 20px rgba(124,110,232,0.2);
    }
    [data-theme="dark"] .m-header {
      background: linear-gradient(135deg, #0d0d20 0%, #161635 100%);
    }
    [data-theme="dark"] body {
      background: var(--bg-main);
    }
    [data-theme="dark"] .m-phrase-notes {
      background: var(--bg-card);
      color: var(--text-secondary);
    }
    [data-theme="dark"] .m-score-note {
      box-shadow: none;
    }
    [data-theme="dark"] .m-back-btn {
      background: transparent;
    }
    [data-theme="dark"] .m-back-btn:hover {
      background: var(--primary);
      color: #fff;
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(124,110,232,0.35);
    }
    [data-theme="dark"] .m-summary {
      background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
    }
    [data-theme="dark"] .m-level-tabs {
      background: var(--bg-card);
    }
    [data-theme="dark"] .m-tutor-header {
      background: linear-gradient(135deg, var(--primary-light), var(--bg-card));
    }
    [data-theme="dark"] .m-phrase-loading {
      color: var(--text-tertiary);
    }
    [data-theme="dark"] .m-trend-section {
      background: var(--bg-card);
      border-color: var(--border);
    }
    [data-theme="dark"] .m-phoneme-section {
      background: var(--bg-card);
      border-color: var(--border);
    }
    [data-theme="dark"] .m-phrase-card {
      background: var(--bg-card);
      border-color: var(--border);
    }
    [data-theme="dark"] .m-tutor-section {
      background: var(--bg-card);
      border-color: var(--border);
    }
    body {
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
      background: var(--bg-main);
      color: var(--text-primary);
      min-height: 100vh;
      padding-bottom: 80px;
      -webkit-tap-highlight-color: transparent;
    }

    /* ===== Header (PC同款渐变色) ===== */
    .m-header {
      position: sticky; top: 0; z-index: 100;
      background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
      padding: 12px 16px;
      display: flex; align-items: center; justify-content: space-between;
      box-shadow: 0 4px 20px rgba(83, 74, 183, 0.3);
    }
    .m-header-title-link {
      text-decoration: none;
      color: inherit;
      display: inline-block;
    }
    .m-header-title {
      font-size: 16px; font-weight: 700; color: var(--text-light);
      text-shadow: 0 2px 4px rgba(0,0,0,0.1);
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .m-header-sub {
      font-size: 11px; color: rgba(255,255,255,0.8); margin-top: 1px;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .m-header-left { min-width: 0; flex: 1 1 auto; }
    .m-header-right { flex: 0 0 auto; display: flex; align-items: center; }
    .m-mode-switcher {
      position: relative; display: inline-flex; align-items: center; gap: 4px;
      font-size: 11px; color: rgba(255,255,255,0.95); padding: 2px 7px;
      border-radius: 12px; background: rgba(255,255,255,0.15);
      border: 1px solid rgba(255,255,255,0.25); cursor: pointer; user-select: none;
      backdrop-filter: blur(10px);
    }
    .m-mode-switcher::after { content: '▾'; font-size: 10px; margin-left: 1px; }
    .m-mode-dropdown {
      position: absolute; top: 100%; left: 0; margin-top: 5px; min-width: 150px;
      background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm);
      box-shadow: var(--shadow-md); z-index: 101; display: none; overflow: hidden;
    }
    .m-mode-dropdown.show { display: block; }
    .m-mode-option {
      padding: 9px 12px; font-size: 13px; color: var(--text-primary); cursor: pointer;
      border-bottom: 1px solid var(--border); transition: background 0.2s;
      display: flex; align-items: center; justify-content: space-between;
    }
    .m-mode-option:last-child { border-bottom: none; }
    .m-mode-option:active { background: var(--bg-main); }
    .m-mode-option.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
    [data-theme="dark"] .m-mode-dropdown { background: var(--bg-card); border-color: var(--border); }
    [data-theme="dark"] .m-mode-option { border-color: var(--border); }
    [data-theme="dark"] .m-mode-option.active { background: var(--primary-light); }
    /* ===== Phrase Selector ===== */
    .m-level-tabs {
      display: flex;
      background: var(--bg-card);
      border-bottom: 2px solid var(--border);
    }
    .m-level-tab {
      flex: 1; padding: 11px 8px; border: none;
      background: transparent; color: var(--text-secondary);
      font-size: 14px; font-weight: 500; cursor: pointer;
      transition: var(--transition); position: relative;
    }
    .m-level-tab:hover { background: var(--primary-light); color: var(--primary); }
    .m-level-tab.active {
      color: var(--primary); background: var(--bg-card);
      font-weight: 600;
    }
    .m-level-tab.active::after {
      content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
      height: 3px; background: var(--primary); border-radius: 3px 3px 0 0;
    }

    .m-phrase-list {
      padding: 8px 16px; display: none;
    }
    .m-phrase-list.active { display: block; }
    .m-phrase-item {
      background: var(--bg-card); border: 1px solid var(--border);
      border-radius: var(--radius); padding: 12px 14px;
      margin-bottom: 8px; cursor: pointer;
      transition: var(--transition);
      position: relative; overflow: hidden;
      -webkit-tap-highlight-color: transparent;
    }
    .m-phrase-item::before {
      content: ""; position: absolute; left: 0; top: 0; bottom: 0;
      width: 3px; background: transparent;
      transition: background 0.2s;
    }
    .m-phrase-item:active { transform: scale(0.98); }
    .m-phrase-item:hover {
      border-color: var(--primary); background: var(--primary-light);
      transform: translateY(-1px); box-shadow: var(--shadow-sm);
    }
    .m-phrase-item.active {
      border-color: var(--primary); background: var(--primary-light);
      box-shadow: var(--shadow-sm);
    }
    .m-phrase-item.active::before { background: var(--primary); }
    .m-phrase-row1 {
      display: flex; align-items: center; justify-content: space-between;
      gap: 8px; margin-bottom: 4px;
    }
    .m-phrase-item-text {
      font-size: 17px; font-weight: 700; color: var(--text-primary);
      line-height: 1.3;
    }
    .m-phrase-item-ipa {
      font-size: 12px; color: var(--text-tertiary);
      font-family: "Charis Web", "Gentium Plus", "Doulos SIL", "Charis SIL", "Noto Sans", serif;
      margin-bottom: 6px; line-height: 1.3;
    }
    .m-phrase-row2 {
      display: flex; align-items: center; justify-content: space-between;
      gap: 8px;
    }
    .m-phrase-item-trans {
      font-size: 13px; color: var(--text-secondary); flex: 1;
    }
    .m-phrase-arrow {
      font-size: 22px; color: var(--text-tertiary); font-weight: 300;
      transition: transform 0.2s, color 0.2s;
      flex-shrink: 0;
    }
    .m-phrase-item:hover .m-phrase-arrow,
    .m-phrase-item.active .m-phrase-arrow {
      color: var(--primary); transform: translateX(3px);
    }
    .m-phrase-loading {
      text-align: center; padding: 40px 16px; color: var(--text-tertiary);
      font-size: 14px;
    }
    .m-phrase-list.collapsed { display: none; }
    .m-level-tabs.collapsed { display: none; }
    .m-fav-filter-bar.collapsed { display: none; }

    /* ===== Back to List ===== */
    .m-back-row {
      display: flex; align-items: center; justify-content: space-between;
      margin-bottom: 8px;
    }
    .m-back-btn {
      display: inline-flex; align-items: center; justify-content: center;
      padding: 4px 10px;
      border: 2px solid var(--primary);
      border-radius: 10px;
      background: transparent; color: var(--primary);
      font-size: 11px; font-weight: 600;
      cursor: pointer;
      transition: background 0.2s, color 0.2s, transform 0.15s, box-shadow 0.2s;
    }
    .m-back-btn:hover {
      background: var(--primary); color: #fff;
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(83,74,183,0.25);
    }
    .m-back-btn:active { transform: translateY(0); }
    .m-phrase-badge {
      font-size: 11px; padding: 4px 10px; border-radius: 10px;
      background: var(--primary-light); color: var(--primary); font-weight: 600;
      border: 1px solid transparent;
    }

    /* ===== Practice Area ===== */
    .m-practice {
      display: none; padding: 16px;
    }
    .m-practice.active { display: block; }

    .m-phrase-text {
      font-size: 28px; font-weight: 800; margin-bottom: 4px;
      background: linear-gradient(135deg, var(--primary), var(--primary-dark));
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }
    /* IPA 字体回退：必须显式声明，否则系统中文/无衬线字体缺 ʑ/ʐ/ɔ/ˈ/͡ 等
       IPA 扩展字符，会显示成字盒(tofu)或直接掉字（#b14 修复）。
       serif 兜底比 sans-serif 兜底 IPA 覆盖更好（Times/Cambria 自带 IPA）。 */
    .m-phrase-ipa,
    .m-phoneme-label,
    .m-tutor-highlight-item,
    .m-tutor-suggestion-phoneme {
      font-family: "Charis Web", "Apple Symbols", "Segoe UI Symbol", "Noto Sans Symbols 2", "Doulos SIL", "Gentium Plus", "Charis SIL", "Noto Sans", "Arial Unicode MS", serif;
    }
    .m-phrase-ipa {
      font-size: 14px; color: var(--text-secondary); margin-bottom: 4px;
    
      font-family: "Charis Web", "Apple Symbols", "Segoe UI Symbol", "Noto Sans Symbols 2", "Doulos SIL", "Gentium Plus", "Charis SIL", "Noto Sans", "Arial Unicode MS", serif;}
    .m-phrase-trans {
      font-size: 15px; color: var(--text-tertiary);
    }
    .m-phrase-notes {
      font-size: 12px; color: var(--accent-warm); margin-top: 8px;
      padding: 8px 12px; background: #FEF8E7; border-radius: var(--radius-sm);
      display: none;
    }

    .m-tts-btn {
      display: block; width: 100%; padding: 10px 28px;
      margin-bottom: 12px;
      background: var(--primary-light); color: var(--primary);
      border: 2px solid var(--primary); border-radius: 25px;
      font-size: 15px; font-weight: 600; cursor: pointer;
      transition: var(--transition);
    }
    .m-tts-btn:active:not(:disabled) { background: var(--primary); color: #fff; transform: scale(0.98); }
    .m-retry-btn:active { transform: scale(0.98); }
    .m-tts-btn:hover:not(:disabled) {
      background: var(--primary); color: #fff;
      box-shadow: var(--shadow-glow);
    }
    .m-tts-btn:disabled { opacity: 0.4; cursor: not-allowed; }

    /* ===== Record Button ===== */
    .m-record-btn {
      width: 80px; height: 80px; border-radius: 50%;
      border: none;
      background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
      cursor: pointer;
      transition: var(--transition);
      display: inline-flex; align-items: center; justify-content: center;
      box-shadow: 0 4px 15px rgba(83, 74, 183, 0.4);
    }
    .m-record-icon {
      width: 28px; height: 28px; border-radius: 50%;
      background: #fff; transition: var(--transition);
      box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    }
    .m-record-btn:active { transform: scale(0.9); }
    .m-record-btn:hover { transform: scale(1.05); box-shadow: 0 6px 25px rgba(83, 74, 183, 0.6); }
    .m-record-btn.recording {
      background: linear-gradient(135deg, var(--danger) 0%, #c0392b 100%);
      animation: m-pulse 1s infinite;
      box-shadow: 0 4px 20px rgba(226, 75, 74, 0.5);
    }
    .m-record-btn.recording .m-record-icon {
      border-radius: 6px; width: 24px; height: 24px;
    }
    @keyframes m-pulse {
      0%, 100% { box-shadow: 0 0 0 0 rgba(226,75,74,0.4); }
      50% { box-shadow: 0 0 0 16px rgba(226,75,74,0); }
    }
    @keyframes m-phrase-in {
      from { opacity: 0; transform: translateY(6px); }
      to { opacity: 1; transform: translateY(0); }
    }
    .m-phrase-item { animation: m-phrase-in 0.3s ease-out both; }
    .m-phrase-item:nth-child(1) { animation-delay: 0.02s; }
    .m-phrase-item:nth-child(2) { animation-delay: 0.04s; }
    .m-phrase-item:nth-child(3) { animation-delay: 0.06s; }
    .m-phrase-item:nth-child(4) { animation-delay: 0.08s; }
    .m-phrase-item:nth-child(5) { animation-delay: 0.10s; }
    .m-phrase-item:nth-child(n+6) { animation-delay: 0.12s; }
    .m-record-status {
      margin-top: 8px; font-size: 13px; color: var(--text-secondary);
    }

    /* ===== Score ===== */
    .m-result-area { display: none; }
    .m-result-area.active {
      display: block;
      margin-top: 14px;
      animation: m-slideUp 0.5s ease-out;
    }
    @keyframes m-slideUp {
      from { opacity: 0; transform: translateY(20px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .m-score-section {
      background: var(--bg-card); border: 1px solid var(--border);
      border-radius: var(--radius); padding: 22px 16px 18px;
      margin-bottom: 14px; text-align: center;
      box-shadow: var(--shadow-sm);
    }
    .m-score-head {
      display: flex; align-items: center; justify-content: center;
      gap: 14px; margin-bottom: 8px;
    }
    .m-score-circle {
      position: relative; display: inline-flex; flex-direction: column; align-items: center;
      justify-content: center;
      width: 110px; height: 110px; border-radius: 50%;
      border: 0; background: transparent;
      transition: var(--transition);
    }
    .m-score-circle.good { border-color: var(--secondary); box-shadow: 0 0 20px rgba(29,158,117,0.3); }
    .m-score-circle.ok { border-color: var(--accent-warm); box-shadow: 0 0 20px rgba(186,117,23,0.3); }
    .m-score-circle.bad { border-color: var(--danger); box-shadow: 0 0 20px rgba(226,75,74,0.3); }
    .m-score-ring {
      position: absolute; inset: 0; width: 100%; height: 100%;
      transform: rotate(-90deg); pointer-events: none;
    }
    .m-score-ring-bg {
      fill: none; stroke: var(--border); stroke-width: 5;
    }
    .m-score-ring-progress {
      fill: none; stroke: var(--primary); stroke-width: 5;
      stroke-linecap: round; transition: stroke-dashoffset 0.8s cubic-bezier(0.4,0,0.2,1), stroke 0.3s;
    }
    .m-score-circle.good .m-score-ring-progress { stroke: var(--secondary); }
    .m-score-circle.ok .m-score-ring-progress { stroke: var(--accent-warm); }
    .m-score-circle.bad .m-score-ring-progress { stroke: var(--danger); }
    .m-score-num {
      font-size: 38px; font-weight: 800; line-height: 1;
      position: relative; z-index: 1;
    }
    .m-score-unit { font-size: 11px; color: var(--text-tertiary); position: relative; z-index: 1; }
    .m-grade-badge {
      display: inline-block; padding: 5px 20px; border-radius: var(--radius-sm);
      font-size: 15px; font-weight: 700;
    }
    .m-grade-badge.good { background: var(--secondary-light); color: var(--secondary); }
    .m-grade-badge.ok { background: var(--accent-warm-light); color: var(--accent-warm); }
    .m-grade-badge.bad { background: var(--danger-light); color: var(--danger); }
    .m-grade-badge.good { box-shadow: 0 4px 12px rgba(29,158,117,0.2); }
    .m-grade-badge.ok { box-shadow: 0 4px 12px rgba(186,117,23,0.2); }
    .m-grade-badge.bad { box-shadow: 0 4px 12px rgba(226,75,74,0.2); }

    .eval-mode-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 5px;
      margin: 0 auto 8px;
      padding: 5px 18px;
      font-size: 12px;
      font-weight: 600;
      letter-spacing: 0.3px;
    }
    .eval-mode-badge .mode-icon {
      font-size: 13px;
    }

    .m-score-note {
      margin: 8px auto 0; padding: 10px 14px 10px 36px;
      max-width: 100%; background: #FEF8E7;
      border: 1px solid #F5D76E; border-radius: var(--radius-sm);
      font-size: 13px; color: #856404; line-height: 1.6;
      text-align: left; position: relative; display: none;
      box-shadow: 0 2px 8px rgba(245, 215, 110, 0.15);
    }
    .m-score-note::before {
      content: "💡"; position: absolute; left: 10px; top: 10px; font-size: 14px;
    }

    /* ===== Summary ===== */
    .m-summary {
      font-size: 15px; color: var(--text-primary);
      padding: 12px 16px; text-align: center;
      background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
      border-radius: var(--radius-sm);
      font-weight: 500; line-height: 1.7;
    }

    /* ===== Phoneme Bars ===== */
    .m-phoneme-section {
      /* Collapsible card styles handle container */
    }
    .m-phoneme-row {
      display: flex; flex-wrap: wrap; gap: 8px;
      justify-content: center; padding: 4px 0;
    }
    .m-phoneme-item {
      flex: 0 0 calc(20% - 8px); text-align: center;
      min-width: 48px; max-width: 60px;
    }
    .m-phoneme-bar {
      width: 100%; height: 80px; margin: 0 auto 4px;
      border-radius: 8px; position: relative;
      background: var(--bg-main); overflow: hidden;
      border: 2px solid transparent; transition: border-color 0.3s;
    }
    .m-phoneme-item.is-weak .m-phoneme-bar { border-color: var(--danger); animation: m-phoneme-pulse 1.5s infinite; }
    @keyframes m-phoneme-pulse {
      0%, 100% { box-shadow: 0 0 0 0 rgba(226,75,74,0.4); }
      50% { box-shadow: 0 0 0 6px rgba(226,75,74,0); }
    }
    .m-phoneme-fill {
      position: absolute; bottom: 0; left: 0; right: 0;
      border-radius: 4px; transition: height 0.6s ease;
    }
    .m-phoneme-fill.good { background: linear-gradient(180deg, var(--primary), var(--secondary)); }
    .m-phoneme-fill.ok { background: var(--accent-warm); }
    .m-phoneme-fill.bad { background: var(--danger); }
    .m-phoneme-label {
      font-size: 12px; margin-bottom: 2px;
    }
    .m-phoneme-score {
      font-size: 11px; font-weight: 700; color: var(--text-secondary);
    }
    .m-phoneme-hint {
      font-size: 12px; color: var(--text-secondary);
      margin-top: 8px; padding: 8px 10px;
      background: var(--bg-main); border-radius: var(--radius-sm);
      display: none;
    }

    /* ===== Retry & AI Tutor (PC同款) ===== */
    .m-retry-btn {
      display: block; width: 100%; padding: 14px;
      border: 2px solid var(--primary);
      background: transparent; color: var(--primary);
      border-radius: var(--radius); font-size: 16px; font-weight: 600;
      cursor: pointer; margin-bottom: 12px;
      transition: background 0.2s, color 0.2s, transform 0.15s;
    }
    .m-retry-btn:hover {
      background: var(--primary); color: #fff;
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(83,74,183,0.25);
    }
    .m-retry-btn:active { transform: translateY(0); }

    .m-tutor-section {
      background: var(--bg-card); border: 1px solid var(--border);
      border-radius: var(--radius); overflow: hidden;
    }
    .m-tutor-header {
      padding: 14px 16px; font-size: 15px; font-weight: 700;
      display: flex; justify-content: space-between; align-items: center;
      cursor: pointer; user-select: none;
      background: linear-gradient(135deg, var(--primary-light), var(--bg-card));
      color: var(--primary);
    }
    .m-tutor-header.m-card-toggle {
      background: linear-gradient(135deg, var(--primary-light), var(--bg-card));
      color: var(--primary);
    }
    .m-tutor-header:active { background: var(--bg-main); }
    .m-tutor-body {
      padding: 0 16px 14px; font-size: 14px; color: var(--text-secondary);
      line-height: 1.7;
    }
    .m-tutor-loading { color: var(--text-tertiary); }
    .m-tutor-btn {
      padding: 8px 18px; border: 2px solid var(--primary);
      border-radius: var(--radius-sm);
      background: var(--primary-light); color: var(--primary);
      font-size: 13px; font-weight: 600; cursor: pointer;
      transition: var(--transition);
    }
    .m-tutor-btn:hover:not(:disabled) {
      background: var(--primary); color: #fff;
      box-shadow: var(--shadow-glow);
    }
    .m-tutor-btn:disabled { opacity: 0.5; }

    /* ===== Mobile Tutor Feedback Content ===== */
    .m-tutor-mode-badge {
      display: inline-block; padding: 3px 10px; border-radius: 20px;
      font-size: 11px; font-weight: 600; margin-bottom: 10px;
      background: var(--primary-light); color: var(--primary);
    }
    .m-tutor-encouragement {
      font-size: 15px; font-weight: 500; color: var(--text-primary);
      margin-bottom: 14px; line-height: 1.6;
    }
    .m-tutor-subsection { margin-bottom: 14px; }
    .m-tutor-subtitle {
      font-size: 13px; font-weight: 700; color: var(--text-primary);
      margin-bottom: 8px;
    }
    .m-tutor-highlight-item {
      display: inline-block; background: var(--secondary-light); color: var(--secondary);
      padding: 3px 10px; border-radius: 14px; font-size: 13px;
      margin: 0 5px 5px 0; font-weight: 600;
    }
    .m-tutor-suggestion-card {
      background: var(--bg-main); border-radius: var(--radius-sm);
      padding: 10px 12px; margin-bottom: 8px;
    }
    .m-tutor-suggestion-header {
      display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
    }
    .m-tutor-suggestion-phoneme {
      font-weight: 700; color: var(--primary); font-size: 15px;
    }
    .m-tutor-suggestion-score {
      color: var(--text-tertiary); font-size: 12px;
      margin-left: auto;
    }
    .m-phoneme-play {
      width: 26px; height: 26px; border-radius: 50%;
      border: none; background: rgba(255,255,255,0.25);
      color: #fff; font-size: 13px; cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      padding: 0; transition: transform 0.15s, background 0.15s;
      flex-shrink: 0;
    }
    .m-phoneme-play:active { transform: scale(0.9); background: rgba(255,255,255,0.45); }
    [data-theme="dark"] .m-phoneme-play { background: rgba(255,255,255,0.15); }
    [data-theme="dark"] .m-phoneme-play:active { background: rgba(255,255,255,0.3); }
    .m-tutor-suggestion-desc {
      font-size: 13px; color: var(--text-secondary); margin: 5px 0;
    }
    .m-tutor-suggestion-tip {
      font-size: 12px; color: var(--accent-warm); background: var(--accent-warm-light);
      padding: 5px 9px; border-radius: 6px; margin-top: 5px;
    }
    .m-tutor-drill-item {
      background: var(--primary-light); color: var(--primary); padding: 7px 11px;
      border-radius: 8px; font-size: 13px; margin-bottom: 5px;
    }
    .m-tutor-next-step {
      background: var(--bg-main); border-radius: var(--radius-sm); padding: 10px 12px;
      color: var(--text-secondary); font-size: 13px;
    }
    .m-tutor-empty {
      text-align: center; color: var(--text-tertiary); padding: 20px 0;
    }
    [data-theme="dark"] .m-tutor-suggestion-card,
    [data-theme="dark"] .m-tutor-next-step {
      background: var(--bg-main);
    }

    /* ===== Collapsible Cards (PC同款) ===== */
    .m-collapsible-card {
      background: var(--bg-card); border: 1px solid var(--border);
      border-radius: var(--radius); overflow: hidden;
      margin-bottom: 14px;
    }
    .m-card-toggle {
      padding: 14px 16px; font-size: 15px; font-weight: 700;
      display: flex; justify-content: space-between; align-items: center;
      cursor: pointer; user-select: none;
      background: var(--bg-main); border-bottom: 1px solid var(--border);
      color: var(--text-primary); transition: background 0.2s;
    }
    .m-card-toggle:hover { background: var(--primary-light); color: var(--primary); }
    .m-card-toggle-icon {
      font-size: 10px; transition: transform 0.3s ease;
      color: var(--text-tertiary);
    }
    .m-collapsible-card:not(.collapsed) .m-card-toggle-icon,
    .m-card-section:not(.collapsed) .m-card-toggle-icon { transform: rotate(90deg); }
    .m-card-body {
      max-height: 800px; opacity: 1; overflow: hidden;
      padding: 14px;
      transition: max-height 0.35s ease, opacity 0.3s ease, padding 0.35s ease;
    }
    .m-card-body.m-tutor-body {
      padding: 0 16px 14px;
    }
    .m-collapsible-card.collapsed .m-card-body {
      max-height: 0; opacity: 0; padding-top: 0; padding-bottom: 0;
    }

    /* ===== Card Sections (PC同款折叠) ===== */
    .m-card-section {
      background: var(--bg-card); border: 1px solid var(--border);
      border-radius: var(--radius); overflow: hidden;
      margin-bottom: 12px; box-shadow: var(--shadow-sm);
    }
    .m-toggle-left {
      display: flex; align-items: center; gap: 8px;
      overflow: hidden;
    }
    .m-phrase-compact {
      display: none; font-size: 13px; color: var(--text-secondary);
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
      max-width: 45vw;
    }
    .m-card-section.collapsed .m-card-body {
      max-height: 0; opacity: 0; padding-top: 0; padding-bottom: 0;
    }
    .m-card-section.collapsed .m-phrase-compact { display: block; }
    .m-phrase-compact-text {
      font-weight: 600; color: var(--primary);
    }
    .m-phrase-compact-ipa {
      color: var(--text-tertiary);
      font-family: "Charis Web", "Gentium Plus", "Doulos SIL", "Charis SIL", serif;
    }
    .m-phrase-compact-translation {
      color: var(--text-tertiary);
    }
    .m-phrase-compact-ipa {
      font-family: "Charis Web", "Gentium Plus", "Doulos SIL", "Charis SIL", serif; color: var(--text-tertiary);
      margin: 0 6px;
    }
    .m-phrase-compact-trans {
      color: var(--text-secondary);
    }

    /* ===== Volume Visualizer ===== */
    .m-volume-visual {
      text-align: center; padding: 16px 0 8px;
      display: none;
    }
    .m-volume-visual.active { display: block; }
    .m-wave-container {
      display: flex; align-items: flex-end; justify-content: center;
      gap: 4px; height: 50px; margin-bottom: 10px;
    }
    .m-wave-bar {
      width: 6px; background: var(--border); border-radius: 3px;
      transition: height 0.1s ease, background 0.2s;
      height: 4px;
    }
    .m-wave-bar.active {
      background: linear-gradient(180deg, var(--primary), var(--secondary));
    }
    .m-volume-level {
      width: 80%; max-width: 200px; height: 6px; margin: 0 auto 8px;
      background: var(--border); border-radius: 3px; overflow: hidden;
    }
    .m-volume-fill {
      height: 100%; width: 0%; background: linear-gradient(90deg, var(--primary), var(--secondary));
      border-radius: 3px; transition: width 0.1s ease;
    }
    .m-volume-hint {
      font-size: 12px; color: var(--text-tertiary);
    }
    .m-volume-visual.active .m-volume-hint {
      color: var(--secondary); font-weight: 500;
    }

    /* ===== Phrase Card inside collapsible ===== */
    .m-phrase-card {
      background: var(--bg-card); border: 1px solid var(--border);
      border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px;
      text-align: center; position: relative; overflow: hidden;
    }
    .m-phrase-card::before {
      content: ''; position: absolute; top: 0; left: 0; right: 0;
      height: 4px;
      background: linear-gradient(90deg, var(--primary), var(--secondary));
    }

    /* ===== Record Area inside collapsible ===== */
    .m-record-area {
      text-align: center; padding: 10px 0 0;
    }
    .m-card-toggle .m-tutor-btn, .m-card-toggle .m-trend-clear-btn {
      pointer-events: auto; margin-left: 8px;
    }

    /* ===== Trend Chart ===== */
    .m-trend-section {
      background: var(--bg-card); border: 1px solid var(--border);
      border-radius: var(--radius);
      margin-top: 12px; display: none;
    }
    .m-trend-section.active { display: block; }
    .m-trend-header {
      font-size: 14px; font-weight: 700;
      display: flex; justify-content: space-between; align-items: center;
    }
    .m-trend-stats {
      display: flex; gap: 12px; font-size: 12px; color: var(--text-secondary);
      margin-bottom: 10px; flex-wrap: wrap;
    }
    .m-trend-stat { white-space: nowrap; }
    .m-trend-stat strong { color: var(--text-primary); }
    .m-trend-empty {
      text-align: center; padding: 30px 16px; font-size: 13px;
      color: var(--text-tertiary);
    }
    .m-trend-chart-wrap { position: relative; width: 100%; }
    .m-trend-chart-wrap canvas { width: 100%; height: auto; display: block; }

/* ===== #29 Student Login & Bottom Tabs ===== */
/* Bottom tab bar */
#m-app { padding-bottom: 64px; }
.m-tab-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 56px; display: flex; z-index: 80;
  background: var(--bg-card); border-top: 1px solid var(--border);
}
.m-tab {
  flex: 1; border: none; background: none; cursor: pointer;
  font-size: 13px; color: var(--text-tertiary);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.m-tab.active { color: var(--primary); font-weight: 600; }
.m-tab-pane { display: none; }
.m-tab-pane.active { display: block; }

/* Mine page (stub / login-guide; #30 fills modules) */
.m-mine-stub { padding: 40px 20px; text-align: center; color: var(--text-tertiary); }
.m-mine-login-guide {
  margin: 32px 16px; padding: 28px 22px; text-align: center;
  background: var(--bg-card); border-radius: 16px; border: 1px solid var(--border);
}
.m-mine-guide-icon { font-size: 36px; }
.m-mine-login-guide h3 { margin: 12px 0 6px; color: var(--text-primary); }
.m-mine-login-guide p { margin: 0 0 16px; font-size: 13px; color: var(--text-secondary); }
.m-mine-go-login {
  padding: 11px 24px; font-size: 15px; color: #fff; cursor: pointer;
  background: linear-gradient(135deg, #6d28d, #4a1d6); border: none; border-radius: 10px;
}

/* ===== Student Center (#30) ===== */
.m-pane-mine { padding: 12px 12px 24px; }
.m-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.m-card-title {
  font-size: 15px; font-weight: 700; color: var(--text-primary);
  margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}
.m-card-sub { font-size: 12px; font-weight: 500; color: var(--text-secondary); }

/* profile */
.m-profile-card { display: flex; align-items: center; gap: 14px; }
.m-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; flex-shrink: 0;
}
.m-profile-info { min-width: 0; }
.m-profile-name { font-size: 17px; font-weight: 700; color: var(--text-primary); }
.m-profile-meta { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }

/* stats */
.m-stat-row { display: flex; gap: 8px; margin-bottom: 14px; }
.m-stat { flex: 1; background: var(--bg-main); border-radius: var(--radius); padding: 10px 6px; text-align: center; }
.m-stat-num { font-size: 20px; font-weight: 800; color: var(--primary); }
.m-stat-label { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

/* history list */
.m-hist-list { display: flex; flex-direction: column; gap: 8px; }
.m-hist-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.m-hist-row:last-child { border-bottom: none; }
.m-hist-main { min-width: 0; }
.m-hist-phrase { font-size: 14px; color: var(--text-primary); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-hist-sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.m-score-badge { flex-shrink: 0; min-width: 38px; text-align: center; font-weight: 700; font-size: 14px; padding: 4px 8px; border-radius: 8px; color: #fff; }
.m-score-badge.good { background: var(--secondary); }
.m-score-badge.mid { background: var(--accent-warm); }
.m-score-badge.low { background: var(--danger); }

.m-empty { font-size: 13px; color: var(--text-secondary); text-align: center; padding: 16px 8px; }

/* weakness */
.m-weak-list { display: flex; flex-direction: column; gap: 10px; }
.m-weak-item { background: var(--bg-main); border-radius: var(--radius); padding: 10px 12px; }
.m-weak-head { display: flex; align-items: center; justify-content: space-between; }
.m-weak-phon { font-weight: 700; color: var(--text-primary); font-size: 15px; font-family: "Charis Web", "Apple Symbols", "Segoe UI Symbol", "Noto Sans Symbols 2", "Doulos SIL", "Gentium Plus", "Charis SIL", "Noto Sans", "Arial Unicode MS", serif; }
.m-weak-avg { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 8px; color: #fff; }
.m-weak-avg.good { background: var(--secondary); }
.m-weak-avg.mid { background: var(--accent-warm); }
.m-weak-avg.low { background: var(--danger); }
.m-weak-group { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.m-weak-tip { font-size: 12.5px; color: var(--text-primary); margin-top: 6px; line-height: 1.5; }

/* rank */
/* #59: 班级排名 / 总排名 切换 tab */
.m-rank-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.m-rank-tab {
  flex: 1; padding: 9px 0; font-size: 13px; font-weight: 600;
  border: 1.5px solid var(--border); border-radius: 10px;
  background: var(--bg-main); color: var(--text-secondary);
  cursor: pointer; transition: var(--transition);
}
.m-rank-tab.active {
  background: linear-gradient(135deg, #534AB7, #667eea);
  color: #fff; border-color: transparent;
  box-shadow: 0 3px 12px rgba(83,74,183,0.25);
}
.m-rank-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.m-rank-num { font-size: 30px; font-weight: 800; color: var(--primary); }
.m-rank-of { font-size: 15px; color: var(--text-secondary); font-weight: 600; }
.m-rank-status { font-size: 13px; color: var(--text-secondary); }
.m-rank-bar { position: relative; height: 10px; background: var(--bg-main); border-radius: 6px; margin: 14px 0 20px; }
.m-rank-fill { position: absolute; left: 0; top: 0; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--primary), var(--secondary)); }
.m-rank-me { position: absolute; top: -22px; transform: translateX(-50%); font-size: 11px; font-weight: 700; color: var(--primary); background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 1px 6px; white-space: nowrap; }
.m-rank-stats { display: flex; gap: 8px; }
.m-rank-stat { flex: 1; text-align: center; background: var(--bg-main); border-radius: var(--radius); padding: 8px 4px; }
.m-rs-num { font-size: 16px; font-weight: 800; color: var(--text-primary); }
.m-rs-label { font-size: 11px; color: var(--text-secondary); margin-top: 2px; display: block; }

/* settings */
.m-set-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 14px; color: var(--text-primary); }
.m-set-row:last-of-type { border-bottom: none; }
.m-set-row.clickable { cursor: pointer; }
.m-set-arrow { color: var(--text-tertiary); font-size: 18px; }
.m-set-danger { color: var(--danger); font-weight: 600; }
.m-set-tip { font-size: 11.5px; color: var(--text-tertiary); margin-top: 10px; line-height: 1.5; }

/* switch */
.m-switch { width: 46px; height: 26px; border-radius: 13px; background: var(--border); border: none; position: relative; cursor: pointer; transition: var(--transition); }
.m-switch.on { background: var(--primary); }
.m-switch-knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: var(--transition); }
.m-switch.on .m-switch-knob { left: 23px; }

/* loading */
.m-mine-loading { text-align: center; color: var(--text-secondary); padding: 40px 0; font-size: 14px; }
.m-spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: mspin 0.8s linear infinite; vertical-align: -3px; margin-right: 6px; }
@keyframes mspin { to { transform: rotate(360deg); } }
    /* ===== Favorites (#32) ===== */
    .m-fav-btn {
      position: absolute; top: 8px; right: 8px;
      width: 30px; height: 30px;
      border: none; background: transparent;
      font-size: 18px; line-height: 1;
      display: flex; align-items: center; justify-content: center;
      cursor: pointer; border-radius: 50%;
      z-index: 2; padding: 0;
      color: #c8c0d8;
      transition: transform 0.15s, color 0.15s, background 0.15s;
      -webkit-tap-highlight-color: transparent;
    }
    .m-fav-btn:active { transform: scale(0.85); }
    .m-fav-btn.faved { color: #f59e0b; }
    .m-fav-btn:hover { background: rgba(124, 110, 232, 0.06); }
    [data-theme="dark"] .m-fav-btn { color: #6b6585; }
    [data-theme="dark"] .m-fav-btn.faved { color: #fbbf24; }

    .m-fav-filter-bar {
      display: flex; align-items: center; gap: 8px;
      padding: 0 14px;
      margin-bottom: 8px;
    }
    .m-fav-filter-chip {
      display: inline-flex; align-items: center; gap: 5px;
      padding: 6px 12px;
      border: 1px solid var(--border);
      border-radius: 20px;
      background: var(--bg-card);
      color: var(--text-secondary);
      font-size: 13px; font-weight: 500;
      cursor: pointer;
      transition: var(--transition);
      -webkit-tap-highlight-color: transparent;
    }
    .m-fav-filter-chip:active { transform: scale(0.96); }
    .m-fav-filter-chip.active {
      background: var(--primary);
      color: #fff;
      border-color: var(--primary);
    }
    .m-fav-filter-chip .m-fav-filter-count { font-weight: 700; }

    .m-mine-fav-card .m-card-title { display: flex; align-items: center; justify-content: space-between; }
    .m-mine-fav-empty {
      padding: 14px 0;
      color: var(--text-secondary);
      font-size: 13px;
      line-height: 1.9;
      text-align: center;
    }
    .m-fav-inline {
      display: inline-block;
      font-size: 16px;
      color: #c8c0d8;
      vertical-align: middle;
    }
    .m-mine-fav-empty-tip {
      padding: 6px 0;
      color: var(--text-secondary);
      font-size: 13px;
      line-height: 1.6;
    }
    .m-mine-fav-actions {
      display: flex; justify-content: center; align-items: center;
      gap: 10px; margin-top: 10px; flex-wrap: wrap;
    }
    .m-mine-fav-actions .m-btn-primary,
    .m-mine-fav-actions .m-btn-secondary {
      flex: 0 0 auto; padding: 6px 14px; border-radius: 999px;
      font-size: 12.5px; font-weight: 500; cursor: pointer;
      transition: var(--transition); border: 1px solid var(--border);
      -webkit-tap-highlight-color: transparent;
    }
    .m-mine-fav-actions .m-btn-primary {
      background: var(--primary); color: #fff; border-color: var(--primary);
    }
    .m-mine-fav-actions .m-btn-primary:active { transform: scale(0.97); }
    .m-mine-fav-actions .m-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
    .m-mine-fav-actions .m-btn-secondary {
      background: transparent; color: var(--text-secondary);
    }
    .m-mine-fav-actions .m-btn-secondary:active { background: var(--bg-main); }

    .m-toast {
      position: fixed;
      left: 50%; bottom: 76px;
      transform: translateX(-50%) translateY(20px);
      background: rgba(0, 0, 0, 0.85);
      color: #fff;
      padding: 9px 18px;
      border-radius: 22px;
      font-size: 13px; font-weight: 500;
      z-index: 9999;
      opacity: 0;
      transition: opacity 0.25s, transform 0.25s;
      pointer-events: none;
      white-space: nowrap;
      max-width: 80vw;
      text-align: center;
    }
    .m-toast.show {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }
    /* ===== Weak phoneme favorite button (#33) ===== */
    .m-weak-fav-btn {
      margin-top: 8px;
      padding: 6px 12px;
      border: 1px solid var(--primary);
      border-radius: var(--radius-sm);
      background: transparent;
      color: var(--primary);
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      transition: var(--transition);
      -webkit-tap-highlight-color: transparent;
    }
    .m-weak-fav-btn:active { transform: scale(0.97); }
    .m-weak-fav-btn:disabled { opacity: 0.6; cursor: not-allowed; }
    .m-weak-fav-btn.faved {
      background: rgba(124, 110, 232, 0.10);
      color: var(--primary);
      border-color: var(--primary);
    }
    [data-theme="dark"] .m-weak-fav-btn { color: #a5a0e8; border-color: #a5a0e8; }
    [data-theme="dark"] .m-weak-fav-btn.faved { background: rgba(165, 160, 232, 0.15); }

    /* #41: 薄弱音素"查看含此音素的短语"按钮 — 系统卡片风格（与 portal .entry-btn.student 一致） */
    .m-weak-view-btn {
      width: 100%; margin-top: 10px;
      background: linear-gradient(135deg, #EEEDFE, #DFDBF8);
      color: #3C3489;
      border: none;
      padding: 10px 14px;
      border-radius: 14px;
      font-size: 13px; font-weight: 600;
      cursor: pointer;
      display: flex; align-items: center; justify-content: center; gap: 6px;
      box-shadow: 0 4px 14px rgba(83,74,183,0.10);
      transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
      -webkit-tap-highlight-color: transparent;
    }
    .m-weak-view-btn:active { transform: scale(0.97); box-shadow: 0 2px 6px rgba(83,74,183,0.10); }
    [data-theme="dark"] .m-weak-view-btn {
      background: linear-gradient(135deg, rgba(83,74,183,0.25), rgba(102,126,234,0.20));
      color: #d4d2f8;
      box-shadow: 0 4px 14px rgba(0,0,0,0.35);
    }

/* #37 practice toolbar: 筛选 / 全部收藏 / phoneme filter */
.m-fav-filter-bar { flex-wrap: wrap; margin-top: 8px; }
.m-practice-toolbar {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.m-filter-btn {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 12px; line-height: 1.2; font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.m-filter-icon { display: inline-flex; align-items: center; justify-content: center; font-size: 11px; line-height: 1; }
.m-filter-btn:active { transform: scale(0.96); }
.m-filter-btn.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
[data-theme="dark"] .m-filter-btn { color: #a5a0e8; }
[data-theme="dark"] .m-filter-btn.active { color: #fff; }
.m-phoneme-filter-tag {
  display: none; align-items: center; gap: 3px;
  padding: 4px 5px 4px 10px;
  border: 1px solid var(--primary);
  border-radius: 16px;
  background: rgba(124,110,232,0.10);
  color: var(--primary);
  font-size: 12px; line-height: 1.2; font-weight: 600;
}
.m-phoneme-filter-clear {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%;
  cursor: pointer; font-size: 10px; line-height: 1;
}
.m-phoneme-filter-clear:active { background: rgba(124,110,232,0.25); }
.m-phoneme-filter-panel {
  display: none; flex-wrap: wrap; gap: 8px;
  padding: 0 14px 8px;
}
.m-phoneme-filter-panel.open { display: flex; }
.m-phoneme-chip {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 13px; cursor: pointer;
  font-family: "Charis Web", "Apple Symbols", "Segoe UI Symbol", "Noto Sans Symbols 2", "Doulos SIL", "Gentium Plus", "Charis SIL", "Noto Sans", "Arial Unicode MS", serif;
  font-feature-settings: "kern" 1;
}
.m-phoneme-chip.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.m-phoneme-chip:active { transform: scale(0.96); }
/* #38 薄弱音素高亮 */
.m-phoneme-chip.weak {
  border-color: #ef4444; color: #b91c1c; background: #fef2f2;
  font-weight: 600;
}
.m-phoneme-chip.weak.active {
  background: #ef4444; color: #fff; border-color: #ef4444;
}
.m-phoneme-chip .weak-pill {
  display: inline-block; margin-left: 5px;
  padding: 1px 5px; font-size: 10px; line-height: 1.4;
  background: rgba(239,68,68,0.18); color: #b91c1c;
  border-radius: 8px; font-weight: 700;
  vertical-align: middle;
}
.m-phoneme-chip.weak.active .weak-pill {
  background: rgba(255,255,255,0.25); color: #fff;
}
.m-phoneme-section-label {
  flex-basis: 100%;
  padding: 4px 2px 2px;
  font-size: 11px; font-weight: 600;
  color: var(--text-secondary);
  display: flex; align-items: center; gap: 5px;
}
.m-phoneme-section-label .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #ef4444; display: inline-block;
}
[data-theme="dark"] .m-phoneme-chip.weak {
  border-color: #f87171; color: #fca5a5; background: rgba(239,68,68,0.12);
}
[data-theme="dark"] .m-phoneme-chip.weak.active {
  background: #f87171; color: #1a1726;
}
[data-theme="dark"] .m-phoneme-chip .weak-pill {
  background: rgba(248,113,113,0.25); color: #fca5a5;
}
[data-theme="dark"] .m-phoneme-section-label { color: #9b95b8; }


/* ===== #42: 我的页小红书风格 ===== */
/* 小红书式个人卡: 上下结构(顶:头像+信息, 底:数据行) */
.m-profile-card {
  display: flex; flex-direction: column; align-items: stretch;
  padding: 20px 16px 14px; gap: 14px;
}
.m-profile-top { display: flex; align-items: center; gap: 14px; width: 100%; padding-right: 0; }
.m-profile-card .m-avatar {
  width: 68px; height: 68px; font-size: 28px;
  box-shadow: 0 4px 14px rgba(83, 74, 183, 0.18);
}
.m-profile-info { flex: 1; min-width: 0; }
.m-profile-card .m-profile-name { font-size: 19px; font-weight: 700; }
.m-profile-card .m-profile-meta { font-size: 13px; margin-top: 2px; }
.m-profile-bio {
  width: 100%; text-align: left;
  font-size: 12.5px; color: var(--text-tertiary);
  margin-top: -4px; line-height: 1.55;
}

/* #49: 统计详情按需展开，默认保持个人页简洁 */
.m-mine-detail[hidden],
.m-profile-card[hidden],
.m-settings-card[hidden] { display: none !important; }
.m-mine-detail-head {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 10px;
  padding-top: 6px;
  padding-left: 16px;
}
.m-mine-detail-title {
  font-size: 16px; font-weight: 700; color: var(--text-primary);
}
/* #51: 子视图整体上方留白, 头部按钮/标题不贴顶 */
.m-mine-detail {
  padding-top: 12px;
}

/* 数据行(小红书 64关注/16粉丝/26获赞 风格) */
.m-profile-stats {
  display: flex; gap: 18px;
  border-top: 1px solid var(--border);
  padding: 10px 12px 8px;
  margin-top: 6px;
}
.m-profile-stat {
  flex: 1; text-align: center;
  padding: 4px 6px; border-radius: 10px;
  transition: background 180ms ease, transform 180ms ease;
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(83,74,183,0.08);
  touch-action: manipulation;
}
.m-profile-stat:active { background: var(--bg-main); transform: scale(0.96); }
.m-profile-stat:hover { background: var(--bg-main); }
/* #46: 点击后 250ms 高亮残留, 让用户感知点击已被接收 */
.m-profile-stat.clicked { background: rgba(83,74,183,0.12); transform: scale(0.96); }
.m-profile-stat-num {
  font-size: 16px; font-weight: 800;
  color: var(--text-primary); line-height: 1.1;
}
.m-profile-stat-label {
  font-size: 10.5px; color: var(--text-secondary);
  margin-top: 2px;
  white-space: nowrap;
  letter-spacing: 0;
}

/* 汇总卡: 隐藏 stat-row(已挪到 profile 数据行) */
.m-card.m-summary-card .m-stat-row { display: none; }
.m-card.m-summary-card .m-card-title { margin-bottom: 8px; }



