    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    :root {
      --font-sans: 'Geist', 'Geist Sans', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
      --font-mono: 'Geist Mono', 'JetBrains Mono', 'SF Mono', Consolas, monospace;
      --radius-sm: 4px;
      --radius-md: 6px;
      --radius-lg: 8px;
      --radius-xl: 12px;
      --t-fast: 120ms ease-out;
      --t-med: 200ms ease-out;
      --sidebar-w: 220px;
    }

    :root,
    [data-theme="dark"] {
      --bg:            #0F0F0E;
      --bg-subtle:     #1A1A18;
      --surface:       #1A1A18;
      --surface2:      #242422;
      --surface3:      #2E2E2C;
      --border:        #2E2E2C;
      --border-hover:  #3F3F3C;
      --text:          #F4F4F0;
      --text-soft:     #A1A1A0;
      --muted:         #71716E;
      --accent:        #4ADE80;
      --accent-bg:     rgba(74, 222, 128, 0.10);
      --accent-border: rgba(74, 222, 128, 0.28);
      --danger:        #F87171;
      --danger-bg:     rgba(248, 113, 113, 0.10);
      --warning:       #FBBF24;
      --shadow-sm:     0 1px 2px rgba(0, 0, 0, 0.3);
      --shadow-md:     0 4px 12px rgba(0, 0, 0, 0.4);
      --shadow-lg:     0 8px 32px rgba(0, 0, 0, 0.5);
      --theme-color:   #0F0F0E;
    }

    [data-theme="light"] {
      --bg:            #FAFAF7;
      --bg-subtle:     #F4F4F0;
      --surface:       #FFFFFF;
      --surface2:      #F4F4F0;
      --surface3:      #E8E8E0;
      --border:        #E4E4E0;
      --border-hover:  #D4D4CF;
      --text:          #0A0A0A;
      --text-soft:     #52525B;
      --muted:         #A1A1AA;
      --accent:        #1B4D3E;
      --accent-bg:     rgba(27, 77, 62, 0.08);
      --accent-border: rgba(27, 77, 62, 0.24);
      --danger:        #DC2626;
      --danger-bg:     rgba(220, 38, 38, 0.08);
      --warning:       #D97706;
      --shadow-sm:     0 1px 2px rgba(0, 0, 0, 0.04);
      --shadow-md:     0 4px 12px rgba(0, 0, 0, 0.06);
      --shadow-lg:     0 8px 32px rgba(0, 0, 0, 0.08);
      --theme-color:   #FAFAF7;
    }

    html, body { height: 100%; overflow: hidden; }
    body {
      font-family: var(--font-sans);
      background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased;
    }

    button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }

    /* ── APP LAYOUT ──────────────────────────────────────── */
    #app {
      display: grid;
      grid-template-columns: var(--sidebar-w) 1fr;
      height: 100vh;
    }

    /* ── SIDEBAR ─────────────────────────────────────────── */
    #sidebar {
      display: flex; flex-direction: column;
      background: var(--surface); border-right: 1px solid var(--border);
      overflow: hidden;
    }
    .sb-header {
      display: flex; align-items: center; gap: 10px;
      padding: 20px 16px 12px; flex-shrink: 0;
    }
    .logo {
      width: 28px; height: 28px; border-radius: var(--radius-md); flex-shrink: 0;
      background: var(--text);
      display: flex; align-items: center; justify-content: center;
      font-size: 13px; font-weight: 700; color: var(--bg); font-family: var(--font-sans);
    }
    .sb-title { font-size: 15px; font-weight: 700; letter-spacing: -0.2px; }
    .new-btn {
      margin: 0 12px 14px; height: 38px; border-radius: var(--radius-md); border: none; cursor: pointer;
      background: var(--text);
      color: var(--bg); font-size: 13px; font-weight: 600; font-family: inherit;
      display: flex; align-items: center; justify-content: center; gap: 6px;
      flex-shrink: 0; transition: opacity var(--t-fast);
    }
    .new-btn:hover { opacity: .82; }
    .sb-section {
      font-size: 10px; font-weight: 600; color: var(--muted);
      letter-spacing: 1.5px; text-transform: uppercase;
      padding: 6px 16px 8px; flex-shrink: 0;
      font-family: var(--font-mono);
    }
    #sidebar-courses { flex: 1; overflow-y: auto; padding: 2px 8px 12px; }
    .sb-month {
      font-size: 10px; font-weight: 500; color: var(--muted);
      letter-spacing: 1.2px; padding: 10px 8px 4px; text-transform: uppercase;
      font-family: var(--font-mono);
    }
    .sb-card {
      padding: 9px 10px; border-radius: var(--radius-lg); cursor: pointer; margin-bottom: 2px;
      transition: background var(--t-fast); position: relative;
    }
    .sb-card:hover { background: var(--surface2); }
    .sb-card.selected { background: var(--accent-bg); }
    .sb-card-title { font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .sb-card-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
    .sb-empty { padding: 32px 16px; color: var(--muted); font-size: 12px; text-align: center; line-height: 1.6; }

    /* ── MAIN ────────────────────────────────────────────── */
    #main { display: flex; flex-direction: column; overflow: hidden; }

    /* ── VIEWS ───────────────────────────────────────────── */
    .view { display: none; flex-direction: column; flex: 1; overflow: hidden; }
    .view.active { display: flex; }

    /* ── MAIN HEADER ─────────────────────────────────────── */
    .main-header {
      display: flex; align-items: center; gap: 8px;
      padding: 14px 20px 12px; flex-shrink: 0;
      border-bottom: 1px solid var(--border);
    }
    .ctx-chip {
      display: inline-flex; align-items: center; gap: 5px;
      padding: 4px 10px; border-radius: var(--radius-md); cursor: pointer;
      background: var(--accent-bg); border: 1px solid var(--accent-border);
      font-size: 12px; color: var(--accent); font-weight: 500; transition: border-color var(--t-fast);
    }
    .ctx-chip:hover { border-color: var(--accent); }
    .ctx-chip svg { width: 11px; height: 11px; flex-shrink: 0; }
    .ctx-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
    .no-ctx-chip {
      display: inline-flex; align-items: center; gap: 5px;
      padding: 4px 10px; border-radius: var(--radius-md); cursor: pointer;
      background: transparent; border: 1px dashed var(--border);
      font-size: 12px; color: var(--muted); transition: border-color var(--t-fast), color var(--t-fast);
    }
    .no-ctx-chip:hover { border-color: var(--muted); color: var(--text); }
    .no-ctx-chip svg { width: 11px; height: 11px; }
    .status-pill {
      display: none; align-items: center; gap: 5px;
      padding: 4px 10px; border-radius: var(--radius-md); font-size: 12px; font-weight: 500;
    }
    .status-pill.listening { display: flex; color: var(--accent); background: var(--accent-bg); border: 1px solid var(--accent-border); }
    .status-pill.processing { display: flex; color: var(--accent); background: var(--accent-bg); border: 1px solid var(--accent-border); }
    .status-dot { width: 6px; height: 6px; border-radius: 50%; animation: dotPulse .8s ease-in-out infinite alternate; }
    @keyframes dotPulse { from { opacity:.4; } to { opacity:1; } }
    .rec-timer { font-family: var(--font-mono); font-size: 11px; margin-left: 6px; color: var(--accent); font-variant-numeric: tabular-nums; }
    .header-spacer { flex: 1; }
    .hdr-btn {
      width: 36px; height: 36px; border: none; background: none;
      color: var(--muted); cursor: pointer; display: flex; align-items: center;
      justify-content: center; border-radius: var(--radius-lg); flex-shrink: 0;
      transition: background var(--t-fast), color var(--t-fast);
    }
    .hdr-btn:hover { background: var(--surface2); color: var(--text); }
    .hdr-btn svg { width: 18px; height: 18px; }
    .icon-sun, .icon-moon { width: 18px; height: 18px; }

    /* ── BODY SCROLL ─────────────────────────────────────── */
    .main-body { flex: 1; overflow-y: auto; padding: 28px 32px 16px; }

    /* ── EMPTY STATE ─────────────────────────────────────── */
    .empty-state {
      display: flex; flex-direction: column; align-items: center; justify-content: center;
      height: 100%;
    }
    .empty-mic {
      width: 80px; height: 80px; border-radius: 50%; cursor: pointer;
      background: var(--accent);
      display: flex; align-items: center; justify-content: center;
      box-shadow: var(--shadow-md); transition: transform var(--t-med), box-shadow var(--t-med);
    }
    .empty-mic:hover { transform: scale(1.06); box-shadow: var(--shadow-lg); }
    .empty-mic svg { width: 32px; height: 32px; color: var(--bg); }
    .empty-title { margin-top: 22px; font-size: 20px; font-weight: 600; text-align: center; }
    .empty-sub { margin-top: 8px; font-size: 14px; color: var(--muted); text-align: center; line-height: 1.6; }
    .ctx-hint {
      margin-top: 28px; width: 360px; max-width: 100%;
      padding: 14px 16px; border-radius: var(--radius-xl);
      background: var(--surface); border: 1px solid var(--border);
      display: flex; align-items: center; justify-content: space-between; cursor: pointer;
      transition: border-color var(--t-fast);
    }
    .ctx-hint:hover { border-color: var(--accent-border); }
    .ctx-hint-left { display: flex; align-items: center; gap: 10px; }
    .ctx-hint-icon { width: 32px; height: 32px; border-radius: var(--radius-lg); background: var(--accent-bg); display: flex; align-items: center; justify-content: center; }
    .ctx-hint-icon svg { width: 16px; height: 16px; color: var(--accent); }
    .ctx-hint-text { font-size: 14px; font-weight: 600; }
    .ctx-hint-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
    .ctx-hint-arrow { color: var(--muted); }
    .ctx-hint-arrow svg { width: 16px; height: 16px; }

    /* ── TRANSCRIPT CARD ─────────────────────────────────── */
    .transcript-card {
      padding: 16px; border-radius: var(--radius-xl); background: var(--surface);
      border: 1px solid var(--border); margin-bottom: 24px; transition: border-color .3s;
    }
    .transcript-card.active { border-color: var(--accent-border); }
    .transcript-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
    .transcript-label { font-size: 10px; font-weight: 600; color: var(--muted); letter-spacing: 1.2px; text-transform: uppercase; font-family: var(--font-mono); }
    .char-count { font-size: 11px; font-family: var(--font-mono); }
    .char-count.ready { color: var(--accent); } .char-count.waiting { color: var(--muted); }
    #transcript-input {
      width: 100%; border: none; background: none; outline: none;
      color: var(--text); font-size: 14px; line-height: 1.65; font-family: inherit;
      resize: vertical; min-height: 200px;
    }
    #transcript-input::placeholder { color: var(--muted); }
    .interim { color: var(--muted); font-style: italic; font-size: 14px; line-height: 1.65; margin-top: 4px; }

    /* ── NOTE BLOCKS ─────────────────────────────────────── */
    .notes-label { font-size: 10px; font-weight: 600; color: var(--muted); letter-spacing: 1.5px; margin-bottom: 14px; text-transform: uppercase; font-family: var(--font-mono); }
    .note-block {
      background: var(--surface); border-radius: 12px; border: 1px solid var(--border);
      padding: 22px 26px; margin-bottom: 18px; animation: slideUp .3s ease-out;
    }
    .block-header { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
    .block-id { font-size: 11px; font-weight: 600; color: var(--muted); font-family: var(--font-mono); letter-spacing: .5px; }
    .block-time { font-size: 11px; color: var(--muted); font-family: var(--font-mono); }
    .note-content { font-size: 15px; line-height: 1.75; color: var(--text); }
    .note-content .md-h1 { font-size: 22px; font-weight: 700; color: var(--text); margin: 20px 0 6px; letter-spacing: -.3px; line-height: 1.3; }
    .note-content .md-h2 { font-size: 17px; font-weight: 700; color: var(--text); margin: 16px 0 4px; padding-bottom: 4px; border-bottom: 1px solid var(--border); line-height: 1.35; }
    .note-content .md-h3 { font-size: 15px; font-weight: 600; color: var(--text); margin: 12px 0 2px; }
    .note-content .md-p { margin: 5px 0; }
    .note-content .md-bullet { display: flex; gap: 8px; margin: 3px 0 3px 4px; align-items: baseline; }
    .note-content .md-bullet.sub { margin-left: 28px; }
    .note-content .md-dot { color: var(--muted); flex-shrink: 0; min-width: 14px; font-size: 13px; }
    .note-content .md-num { color: var(--muted); flex-shrink: 0; min-width: 22px; font-size: 13px; font-variant-numeric: tabular-nums; }
    .note-content .md-hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; display: block; }
    .note-content .md-code { font-family: var(--font-mono); font-size: 13px; background: var(--surface2); border-radius: 4px; padding: 1px 5px; border: 1px solid var(--border); }
    .note-content strong { font-weight: 700; }
    .note-content em { font-style: italic; color: var(--muted); }
    .block-error { display: flex; align-items: center; gap: 8px; color: var(--danger); font-size: 14px; }
    .tab-bar { display: flex; justify-content: center; gap: 4px; margin-bottom: 18px; padding: 4px; background: var(--surface2); border-radius: 10px; border: 1px solid var(--border); }
    .tab-btn { border: none; background: none; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--muted); border-radius: 7px; padding: 7px 18px; transition: all var(--t-fast); font-family: inherit; white-space: nowrap; letter-spacing: .1px; }
    .tab-btn:hover:not(.active) { color: var(--text); background: rgba(0,0,0,.04); }
    .tab-btn.active { background: var(--bg); color: var(--text); font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,.10), 0 0 0 1px var(--border); }

    /* ── ACTION BAR ──────────────────────────────────────── */
    .action-bar {
      display: flex; align-items: center; gap: 12px;
      padding: 14px 24px 18px;
      border-top: 1px solid var(--border);
      background: var(--bg); flex-shrink: 0;
    }
    .mic-area { display: flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0; }
    .space-hint { font-family: var(--font-mono); font-size: 10px; color: var(--muted); white-space: nowrap; min-height: 14px; }
    .mic-wrap { position: relative; width: 52px; height: 52px; flex-shrink: 0; }
    .mic-wave { position: absolute; top: 50%; left: 50%; border-radius: 50%; border: 1.5px solid var(--danger); pointer-events: none; display: none; }
    .mic-wave.w1 { animation: wave 1.6s linear infinite; }
    .mic-wave.w2 { animation: wave 1.6s linear infinite .64s; }
    @keyframes wave {
      0%   { width:0; height:0; opacity:.35; transform:translate(-50%,-50%); }
      100% { width:68px; height:68px; opacity:0; transform:translate(-50%,-50%); }
    }
    .mic-fab {
      width: 52px; height: 52px; border-radius: 50%; border: none; cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      position: relative; z-index: 1; transition: transform var(--t-med), box-shadow var(--t-med);
    }
    .mic-fab.idle { background: var(--accent); box-shadow: var(--shadow-sm); }
    .mic-fab.listening { background: var(--danger); box-shadow: var(--shadow-sm); animation: micPulse .9s ease-in-out infinite alternate; }
    @keyframes micPulse { from { transform:scale(1); } to { transform:scale(1.08); } }
    .mic-fab svg { width: 20px; height: 20px; color: var(--bg); }
    .synth-btn {
      flex: 1; height: 52px; border-radius: var(--radius-lg); border: none; cursor: pointer;
      display: flex; align-items: center; justify-content: center; gap: 8px;
      font-size: 14px; font-weight: 600; font-family: inherit; transition: all var(--t-med);
    }
    .synth-btn.enabled { background: var(--text); color: var(--bg); box-shadow: var(--shadow-sm); }
    .synth-btn.disabled { background: var(--surface2); color: var(--muted); border: 1px solid var(--border); cursor: default; }
    .synth-btn:active:not(.disabled) { transform: scale(.98); }
    .synth-spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.3); border-top-color: white; border-radius: 50%; animation: spin .8s linear infinite; }
    @keyframes spin { to { transform: rotate(360deg); } }
    .save-btn {
      height: 52px; padding: 0 20px; border-radius: var(--radius-lg); border: none; cursor: pointer;
      display: flex; align-items: center; gap: 8px;
      font-family: inherit; font-size: 13px; font-weight: 600; transition: all var(--t-med);
    }
    .save-btn.active { background: var(--accent-bg); border: 1px solid var(--accent-border); color: var(--accent); }
    .save-btn.idle-save { background: var(--surface2); border: 1px solid var(--border); color: var(--muted); }
    .save-btn svg { width: 16px; height: 16px; }
    .continuation-banner-inner { display: flex; align-items: center; gap: 10px; background: var(--accent-bg); border: 1px solid var(--accent-border); border-radius: var(--radius-md); padding: 10px 16px; margin: 8px 20px; font-size: 13px; }
    .continuation-banner-text { flex: 1; color: var(--accent); font-weight: 500; }
    .continuation-banner-exit { background: none; border: none; cursor: pointer; padding: 4px 8px; color: var(--muted); font-size: 12px; font-weight: 600; border-radius: var(--radius-sm); }
    .continuation-banner-exit:hover { color: var(--text); }

    /* ── DETAIL HEADER ───────────────────────────────────── */
    .detail-header { display: flex; align-items: center; gap: 8px; padding: 14px 20px 12px; flex-shrink: 0; border-bottom: 1px solid var(--border); }
    .detail-info { flex: 1; min-width: 0; }
    .detail-title { font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .detail-sub { font-size: 12px; color: var(--muted); margin-top: 2px; font-family: var(--font-mono); }

    /* ── SETUP MODAL ─────────────────────────────────────── */
    .sheet-overlay {
      position: fixed; inset: 0; background: rgba(0,0,0,.65);
      z-index: 200; display: none; align-items: center; justify-content: center;
    }
    .sheet-overlay.open { display: flex; }
    .sheet {
      width: 480px; max-width: calc(100vw - 40px);
      background: var(--surface); border: 1px solid var(--border);
      border-radius: var(--radius-xl); padding: 28px 28px 24px; max-height: 90vh; overflow-y: auto;
      animation: modalIn .2s cubic-bezier(.32,1,.4,1);
    }
    @keyframes modalIn { from { opacity:0; transform: scale(.96) translateY(8px); } to { opacity:1; transform: scale(1) translateY(0); } }
    .sheet-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 4px; }
    .sheet h2 { font-size: 20px; font-weight: 600; }
    .sheet-close {
      width: 32px; height: 32px; border: none; background: var(--surface2);
      border-radius: var(--radius-lg); cursor: pointer; display: flex; align-items: center;
      justify-content: center; color: var(--muted); flex-shrink: 0; transition: background var(--t-fast), color var(--t-fast);
    }
    .sheet-close:hover { background: var(--surface3); color: var(--text); }

    /* ── SETTINGS PANEL ─────────────────────────────────── */
    .settings-overlay {
      position: fixed; inset: 0; z-index: 200;
      background: rgba(0,0,0,0.45);
      display: none; opacity: 0; transition: opacity 0.2s ease-out;
    }
    .settings-overlay.open { display: block; opacity: 1; }
    .settings-panel {
      position: absolute; top: 0; right: 0; bottom: 0;
      width: 340px; max-width: 100vw;
      background: var(--surface); border-left: 1px solid var(--border);
      display: flex; flex-direction: column;
      transform: translateX(100%);
      transition: transform 0.25s cubic-bezier(.32,1,.4,1);
      overflow-y: auto; padding: 24px 20px;
      gap: 0;
    }
    .settings-overlay.open .settings-panel { transform: translateX(0); }
    .settings-hdr {
      display: flex; align-items: center; justify-content: space-between;
      margin-bottom: 20px; flex-shrink: 0;
    }
    .settings-hdr h2 { font-size: 17px; font-weight: 600; }
    .settings-tabs {
      display: flex; gap: 0; margin-bottom: 20px; flex-shrink: 0;
      border-bottom: 1px solid var(--border);
    }
    .stab {
      flex: 1; padding: 8px; border: none; background: none;
      color: var(--muted); font-size: 13px; font-weight: 500;
      cursor: pointer; border-bottom: 2px solid transparent;
      margin-bottom: -1px; transition: color var(--t-fast), border-color var(--t-fast);
      font-family: var(--font-sans);
    }
    .stab.active { color: var(--text); border-bottom-color: var(--accent); }
    .stab-content { display: none; flex-direction: column; gap: 0; }
    .stab-content.active { display: flex; }
    .settings-row {
      display: flex; align-items: center; justify-content: space-between;
      padding: 14px 0; border-bottom: 1px solid var(--border);
    }
    .settings-row-label { font-size: 14px; }
    .tog {
      position: relative; width: 44px; height: 24px; display: inline-block;
      flex-shrink: 0;
    }
    .tog input { opacity: 0; width: 0; height: 0; position: absolute; }
    .tog-track {
      position: absolute; inset: 0; background: var(--surface3);
      border-radius: 12px; cursor: pointer;
      transition: background 0.2s;
    }
    .tog-track::before {
      content: ''; position: absolute;
      width: 18px; height: 18px; left: 3px; top: 3px;
      background: white; border-radius: 50%;
      transition: transform 0.2s;
    }
    .tog input:checked + .tog-track { background: var(--accent); }
    .tog input:checked + .tog-track::before { transform: translateX(20px); }
    .settings-email {
      font-size: 13px; color: var(--muted);
      padding: 8px 0 14px; border-bottom: 1px solid var(--border);
      margin-bottom: 4px; word-break: break-all;
    }
    .settings-section-lbl {
      font-size: 11px; font-weight: 600; color: var(--muted);
      text-transform: uppercase; letter-spacing: 0.06em;
      margin: 16px 0 8px;
    }
    .settings-input {
      width: 100%; padding: 9px 12px; background: var(--surface2);
      border: 1px solid var(--border); border-radius: var(--radius-md);
      color: var(--text); font-size: 14px; margin-bottom: 8px;
      font-family: var(--font-sans); outline: none;
      transition: border-color var(--t-fast);
    }
    .settings-input:focus { border-color: var(--accent); }
    .settings-btn-primary {
      width: 100%; padding: 9px; background: var(--accent); color: #0A0A0A;
      border: none; border-radius: var(--radius-md); font-size: 14px;
      font-weight: 600; cursor: pointer; margin-top: 2px;
      font-family: var(--font-sans);
    }
    .settings-btn-primary:hover { opacity: 0.88; }
    .settings-action {
      width: 100%; padding: 10px 12px; background: var(--surface2);
      color: var(--text); border: 1px solid var(--border);
      border-radius: var(--radius-md); font-size: 14px;
      cursor: pointer; text-align: left; margin-bottom: 8px;
      font-family: var(--font-sans);
      transition: background var(--t-fast);
    }
    .settings-action:hover { background: var(--surface3); }
    .settings-action.danger { color: var(--danger); border-color: var(--danger-bg); }
    .settings-divider { height: 1px; background: var(--border); margin: 6px 0 14px; }
    @media (max-width: 480px) {
      .settings-panel { width: 100%; border-left: none; border-top: 1px solid var(--border); top: auto; height: 90vh; border-radius: 14px 14px 0 0; }
    }
    .sheet-close svg { width: 16px; height: 16px; }
    .sheet-sub { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
    .field-label { font-size: 13px; font-weight: 600; color: var(--text); margin: 16px 0 8px; display: flex; align-items: center; gap: 8px; }
    .field-label .opt { font-size: 10px; font-weight: 400; color: var(--muted); background: var(--surface2); padding: 2px 6px; border-radius: var(--radius-sm); }
    .field-select {
      width: 100%; padding: 11px 14px; border-radius: var(--radius-md);
      background: var(--surface2); border: 1px solid var(--border);
      color: var(--text); font-size: 14px; font-family: inherit;
      -webkit-appearance: none; appearance: none; outline: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='%2371716E' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
      background-repeat: no-repeat; background-position: right 12px center;
      transition: border-color var(--t-fast);
    }
    .field-select:focus { border-color: var(--accent); }
    .field-select option { background: var(--surface2); }
    .level-picker { display: flex; gap: 8px; }
    .level-btn { flex: 1; padding: 10px 0; border-radius: var(--radius-md); text-align: center; font-size: 13px; cursor: pointer; transition: all var(--t-fast); background: var(--surface2); border: 1px solid var(--border); color: var(--muted); font-family: inherit; }
    .level-btn.active { background: var(--accent-bg); border: 1.5px solid var(--accent); color: var(--accent); font-weight: 600; }
    .field-input { width: 100%; padding: 11px 14px; border-radius: var(--radius-md); background: var(--surface2); border: 1px solid var(--border); color: var(--text); font-size: 14px; font-family: inherit; outline: none; resize: none; transition: border-color var(--t-fast); }
    .field-input:focus { border-color: var(--accent); }
    .field-input::placeholder { color: var(--muted); font-size: 13px; }
    .modal-actions { display: flex; gap: 10px; margin-top: 24px; align-items: center; }
    .start-btn {
      flex: 1; height: 48px; border-radius: var(--radius-lg); border: none;
      background: var(--text);
      color: var(--bg); font-size: 14px; font-weight: 600; cursor: pointer;
      display: flex; align-items: center; justify-content: center; gap: 8px; font-family: inherit;
      transition: opacity var(--t-fast);
    }
    .start-btn:hover { opacity: .85; }
    .skip-btn { background: none; border: none; color: var(--muted); font-size: 13px; cursor: pointer; font-family: inherit; padding: 8px 14px; border-radius: var(--radius-md); transition: background var(--t-fast), color var(--t-fast); }
    .skip-btn:hover { background: var(--surface2); color: var(--text); }

    /* ── PAYWALL ───────────────────────────────────────── */
    .paywall-sheet {
      width: 340px; max-width: calc(100vw - 32px);
      background: var(--surface); border: 1px solid var(--border);
      border-radius: 16px; padding: 28px 24px 22px;
      animation: modalIn .2s cubic-bezier(.32,1,.4,1);
      position: relative;
    }
    .paywall-close-btn {
      position: absolute; top: 14px; right: 14px;
      width: 28px; height: 28px; border: none;
      background: var(--surface2); border-radius: 50%;
      cursor: pointer; display: flex; align-items: center;
      justify-content: center; color: var(--muted);
      transition: background var(--t-fast), color var(--t-fast);
    }
    .paywall-close-btn:hover { background: var(--surface3); color: var(--text); }
    .paywall-close-btn svg { width: 14px; height: 14px; }
    .paywall-heading { font-size: 20px; font-weight: 700; margin-bottom: 5px; line-height: 1.2; }
    .paywall-desc { font-size: 13px; color: var(--muted); margin-bottom: 16px; line-height: 1.5; }
    .paywall-perks {
      list-style: none;
      background: var(--surface2); border-radius: var(--radius-md);
      padding: 11px 14px; margin-bottom: 18px;
      display: flex; flex-direction: column; gap: 8px;
    }
    .paywall-perks li {
      font-size: 13px; font-weight: 500; color: var(--text);
      display: flex; align-items: center; gap: 9px;
    }
    .paywall-perks li::before {
      content: '✓'; color: var(--accent); font-weight: 700;
      font-size: 11px; flex-shrink: 0;
    }
    .paywall-cta-btn {
      width: 100%; height: 46px;
      background: var(--accent); color: #fff;
      border: none; border-radius: var(--radius-lg);
      font-size: 15px; font-weight: 700;
      cursor: pointer; font-family: inherit;
      transition: opacity var(--t-fast); margin-bottom: 10px;
      display: block;
    }
    .paywall-cta-btn:hover { opacity: .88; }
    .paywall-footer {
      display: flex; gap: 4px; align-items: center; justify-content: center;
    }
    .paywall-footer button {
      background: none; border: none; color: var(--muted);
      font-size: 13px; cursor: pointer; font-family: inherit;
      padding: 6px 10px; border-radius: var(--radius-md);
      transition: background var(--t-fast), color var(--t-fast);
    }
    .paywall-footer button:hover { background: var(--surface2); color: var(--text); }

    /* ── AUTH ───────────────────────────────────────────── */
    #auth-screen {
      position: fixed; inset: 0; background: var(--bg); z-index: 500;
      display: none; align-items: center; justify-content: center;
    }
    .auth-box {
      width: 380px; max-width: calc(100vw - 32px);
      background: var(--surface); border: 1px solid var(--border);
      border-radius: var(--radius-xl); padding: 32px 28px;
    }
    .auth-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
    .auth-logo .logo { width: 32px; height: 32px; border-radius: var(--radius-md); font-size: 15px; }
    .auth-logo span { font-size: 18px; font-weight: 700; }
    .auth-tabs { display: flex; background: var(--surface2); border-radius: var(--radius-md); padding: 3px; margin-bottom: 24px; }
    .auth-tab {
      flex: 1; padding: 8px; border: none; background: none; border-radius: var(--radius-md);
      font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; font-family: inherit; transition: all var(--t-fast);
    }
    .auth-tab.active { background: var(--bg); color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm); }
    .auth-field { margin-bottom: 14px; }
    .auth-field label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
    .auth-input {
      width: 100%; padding: 11px 14px; border-radius: var(--radius-md);
      background: var(--surface2); border: 1px solid var(--border);
      color: var(--text); font-size: 14px; font-family: inherit; outline: none;
      transition: border-color var(--t-fast);
    }
    .auth-input:focus { border-color: var(--accent); }
    .auth-submit {
      width: 100%; height: 46px; margin-top: 8px; border-radius: var(--radius-lg); border: none;
      background: var(--text);
      color: var(--bg); font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit;
      display: flex; align-items: center; justify-content: center; gap: 8px;
      transition: opacity var(--t-fast);
    }
    .auth-submit:hover { opacity: .85; }
    .auth-submit:disabled { opacity: .5; cursor: default; }
    .auth-error { font-size: 12px; color: var(--danger); margin-top: 10px; text-align: center; min-height: 16px; }
    .user-badge {
      display: flex; align-items: center; gap: 6px; padding: 4px 10px;
      border-radius: var(--radius-md); background: var(--accent-bg); border: 1px solid var(--accent-border);
      font-size: 12px; color: var(--muted); cursor: pointer; transition: border-color var(--t-fast);
    }
    .user-badge:hover { border-color: var(--accent); }
    .user-badge svg { width: 13px; height: 13px; color: var(--accent); }
    .trial-chip { font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 3px; letter-spacing: .3px; white-space: nowrap; }
    .trial-chip.d4-7 { background: var(--accent-bg); color: var(--accent); }
    .trial-chip.d2-3 { background: rgba(234,179,8,.15); color: #92400e; }
    .trial-chip.d0-1 { background: rgba(239,68,68,.15); color: #991b1b; }
    /* -- QUOTA COUNTER + PRICING ---------------------------------- */
    .quota-counter { padding: 6px 12px 10px; }
    .quota-counter-text { font-size: 11px; color: var(--muted); margin-bottom: 4px; display: flex; justify-content: space-between; align-items: center; }
    .quota-counter-link { font-size: 10px; color: var(--accent); cursor: pointer; font-weight: 600; }
    .quota-counter-link:hover { text-decoration: underline; }
    .quota-bar { height: 3px; border-radius: 2px; background: var(--border); overflow: hidden; }
    .quota-bar-fill { height: 100%; border-radius: 2px; background: var(--accent); transition: width .3s; }
    .quota-bar-fill.warn { background: #f59e0b; }
    .quota-bar-fill.danger { background: var(--danger); }
.pricing-header { padding: 14px 20px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
    .pricing-header h2 { flex: 1; font-size: 17px; font-weight: 700; margin: 0; }
    .pricing-scroll { flex: 1; overflow-y: auto; padding: 28px 20px 48px; }
    .pricing-inner { max-width: 600px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }
    .pricing-trial-banner { background: rgba(27,77,62,.12); border: 1px solid rgba(27,77,62,.35); border-radius: 10px; padding: 12px 16px; font-size: 13px; color: #4ade80; font-weight: 500; display: flex; align-items: center; gap: 8px; }
    .plan-toggle-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; }
    .plan-toggle { display: inline-flex; position: relative; background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 4px; min-width: 260px; }
    .plan-toggle-pill { position: absolute; top: 4px; left: 4px; height: calc(100% - 8px); width: calc(50% - 4px); background: #1B4D3E; border-radius: 7px; transition: transform 250ms ease; pointer-events: none; box-shadow: 0 1px 8px rgba(27,77,62,.45); }
    .plan-toggle-pill.annual { transform: translateX(calc(100% + 0px)); }
    .plan-toggle button { position: relative; z-index: 1; background: none; border: none; padding: 8px 0; border-radius: 7px; font-size: 13px; font-weight: 500; cursor: pointer; color: var(--muted); transition: color 200ms; font-family: inherit; display: flex; align-items: center; justify-content: center; gap: 7px; flex: 1; white-space: nowrap; }
    .plan-toggle button.active { color: var(--text); }
    .plan-toggle button.active .plan-economy-badge { background: rgba(255,255,255,.15); color: rgba(255,255,255,.92); }
    .plan-economy-badge { background: rgba(74,222,128,.15); color: #4ade80; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 20px; letter-spacing: .03em; }
    .plan-toggle-hint { font-size: 11px; color: var(--muted); text-align: center; }
    .plan-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
    @keyframes cardIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
    @keyframes badgePulse { 0%, 100% { box-shadow: none; } 50% { box-shadow: 0 2px 14px rgba(45,107,82,.55); } }
    .plan-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; position: relative; overflow: hidden; transition: box-shadow 200ms, border-color 200ms; animation: cardIn 360ms cubic-bezier(.4,0,.2,1) both; }
    .plan-card:nth-child(1) { animation-delay: 40ms; }
    .plan-card:nth-child(2) { animation-delay: 130ms; }
    .plan-card:hover { box-shadow: 0 4px 24px rgba(0,0,0,.35); }
    .plan-card.current { border-color: #2D6B52; }
    .plan-card.featured { border-color: rgba(45,107,82,.6); }
    [data-theme="dark"] .plan-card.featured { background: #0d1a12; }
    [data-theme="light"] .plan-card.featured { background: #f0faf4; }
    .plan-card.featured::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 90% 55% at 50% -5%, rgba(27,77,62,.15) 0%, transparent 65%); pointer-events: none; }
    .plan-card.featured:hover { box-shadow: 0 4px 32px rgba(27,77,62,.18); }
    .plan-top-badge { position: absolute; top: 0; left: 50%; transform: translateX(-50%); background: linear-gradient(90deg, #1B4D3E, #2D6B52); color: #fff; font-size: 10px; font-weight: 700; padding: 4px 16px; border-radius: 0 0 10px 10px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; animation: badgePulse 3s ease-in-out infinite; }
    .plan-header { margin-bottom: 16px; padding-top: 4px; }
    .plan-card.featured .plan-header { padding-top: 24px; }
    .plan-current-badge { display: inline-flex; align-items: center; gap: 4px; background: rgba(74,222,128,.1); color: #4ade80; border: 1px solid rgba(74,222,128,.25); font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 20px; width: fit-content; margin-bottom: 8px; }
    .plan-name { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
    .plan-tagline { font-size: 12px; color: var(--muted); }
    .plan-price-block { margin-bottom: 16px; }
    .plan-price { font-family: var(--font-mono); font-size: 38px; font-weight: 700; line-height: 1; letter-spacing: -0.03em; color: var(--text); display: flex; align-items: baseline; gap: 1px; }
    .plan-price .currency { font-size: 20px; font-weight: 600; align-self: flex-start; margin-top: 6px; }
    .plan-price .period { font-size: 14px; font-weight: 400; color: var(--muted); margin-left: 4px; font-family: var(--font-sans); }
    .plan-price-sub { font-size: 11px; color: var(--muted); margin-top: 5px; }
    .plan-price-savings { font-size: 11px; color: #4ade80; font-weight: 600; margin-top: 3px; }
    .plan-divider { height: 1px; background: var(--border); margin-bottom: 16px; }
    .plan-features { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
    .plan-features li { display: flex; align-items: flex-start; gap: 10px; }
    .plan-feat-icon { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }
    .plan-feat-icon.check { color: #4ade80; }
    .plan-feat-icon.cross { color: var(--surface3); }
    .plan-feat-dash { color: var(--muted); font-size: 14px; flex-shrink: 0; width: 16px; text-align: center; margin-top: 1px; line-height: 1.4; }
    .plan-feat-text { display: flex; flex-direction: column; gap: 1px; }
    .plan-feat-label { font-size: 13px; color: var(--text); line-height: 1.4; }
    .plan-feat-desc { font-size: 11px; color: var(--muted); line-height: 1.4; }
    .plan-features li.no .plan-feat-label { color: var(--muted); }
    .plan-cta { margin-top: auto; padding-top: 20px; }
    .plan-cta button { width: 100%; padding: 12px 16px; font-size: 14px; font-weight: 600; border-radius: 10px; border: none; cursor: pointer; font-family: inherit; transition: opacity 150ms, transform 100ms, box-shadow 200ms; position: relative; overflow: hidden; }
    .plan-cta button.primary { background: linear-gradient(135deg, #1B4D3E 0%, #2D6B52 100%); color: #fff; }
    .plan-cta button.primary::after { content: ''; position: absolute; top: 0; left: -100%; width: 60%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.13), transparent); transition: left 500ms ease; }
    .plan-cta button.primary:hover::after { left: 140%; }
    .plan-cta button.primary:hover:not(:disabled) { box-shadow: 0 4px 22px rgba(27,77,62,.5); }
    .plan-cta button.primary:active:not(:disabled) { transform: scale(0.98); }
    .plan-cta button.secondary { background: transparent; color: var(--muted); border: 1px solid var(--border); }
    .plan-cta button.secondary:hover:not(:disabled) { border-color: var(--border-hover); color: var(--text); }
    .plan-cta button:disabled { opacity: .4; cursor: not-allowed; }
    .plan-cta-sub { font-size: 11px; color: var(--muted); text-align: center; margin-top: 8px; opacity: .7; }
    .pricing-trust { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 12px; font-size: 11px; color: var(--muted); text-align: center; }
    .pricing-trust-item { display: flex; align-items: center; gap: 4px; }
    .pricing-trust-dot { opacity: .4; }
    .pricing-legal { font-size: 10px; color: var(--muted); text-align: center; line-height: 1.5; opacity: .55; }
    .waitlist-wrap { margin-top: 4px; }
    .waitlist-form { display: flex; gap: 6px; }
    .waitlist-form input { flex: 1; border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; font-size: 12px; background: var(--bg); color: var(--text); min-width: 0; outline: none; font-family: inherit; transition: border-color 150ms; }
    .waitlist-form input:focus { border-color: #2D6B52; }
    .waitlist-form input::placeholder { color: var(--muted); }
    .waitlist-form button { padding: 8px 12px; font-size: 12px; font-weight: 600; border-radius: 6px; border: none; background: #1B4D3E; color: #fff; cursor: pointer; white-space: nowrap; font-family: inherit; }
    .waitlist-form button:hover { background: #2D6B52; }
    .waitlist-sent { font-size: 11px; color: #4ade80; font-weight: 600; text-align: center; padding: 8px 0; }    .mobile-quota-inner { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
    .mobile-quota-text { font-size: 12px; color: var(--muted); white-space: nowrap; }
    .mobile-quota-bar { flex: 1; height: 3px; border-radius: 2px; background: var(--border); overflow: hidden; }
    .mobile-quota-link { font-size: 11px; color: var(--accent); font-weight: 600; cursor: pointer; white-space: nowrap; }


    /* ── MENU ────────────────────────────────────────────── */
    .menu-overlay { position: fixed; inset: 0; z-index: 100; display: none; }
    .menu-overlay.open { display: block; }
    .menu-popup { position: absolute; top: 52px; right: 16px; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 4px 0; min-width: 180px; z-index: 101; box-shadow: var(--shadow-lg); }
    .menu-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; cursor: pointer; font-size: 13px; color: var(--text); transition: background var(--t-fast); }
    .menu-item:hover { background: var(--surface3); }
    .menu-item svg { width: 16px; height: 16px; color: var(--muted); }
    .menu-item.danger { color: var(--danger); }
    .menu-item.danger svg { color: var(--danger); }

    /* ── TOAST ───────────────────────────────────────────── */
    .toast {
      position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(16px);
      max-width: 480px; z-index: 300; padding: 12px 18px; border-radius: var(--radius-lg);
      background: var(--surface2); display: flex; align-items: center; gap: 10px;
      font-size: 13px; box-shadow: var(--shadow-lg);
      opacity: 0; transition: all .25s ease-out; pointer-events: none; white-space: nowrap;
    }
    .toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
    .toast.error { border: 1px solid var(--danger-bg); }
    .toast.success { border: 1px solid var(--accent-border); }
    .toast svg { width: 16px; height: 16px; flex-shrink: 0; }

    /* ── ONBOARDING ──────────────────────────────────────── */
    .onboarding-mic-wrap {
      position: relative; display: flex; justify-content: center; align-items: center;
    }
    .onboarding-mic {
      width: 120px; height: 120px; border-radius: 50%; cursor: pointer;
      background: var(--accent);
      display: flex; align-items: center; justify-content: center;
      animation: onboardingPulse 2.4s ease-out infinite;
      transition: transform var(--t-med);
    }
    .onboarding-mic:hover { transform: scale(1.04); }
    .onboarding-mic svg { width: 48px; height: 48px; color: var(--bg); }
    @keyframes onboardingPulse {
      0%   { box-shadow: 0 0 0 0 var(--accent-border); }
      70%  { box-shadow: 0 0 0 28px transparent; }
      100% { box-shadow: 0 0 0 0 transparent; }
    }
    @media (prefers-reduced-motion: reduce) { .onboarding-mic { animation: none; } }
    .onboarding-title { margin-top: 52px; font-size: 22px; font-weight: 600; text-align: center; }
    .onboarding-sub { margin-top: 10px; font-size: 14px; color: var(--muted); text-align: center; line-height: 1.75; }

    /* ── TOOLTIP MIC ─────────────────────────────────────── */
    .mic-tooltip {
      position: absolute;
      top: calc(100% + 14px);
      left: 50%; transform: translateX(-50%);
      background: var(--surface2); border: 1px solid var(--border);
      border-radius: var(--radius-lg); padding: 10px 16px;
      font-size: 12px; color: var(--text-soft); line-height: 1.5;
      white-space: nowrap; pointer-events: none;
      opacity: 0; transition: opacity var(--t-med); z-index: 10;
    }
    .mic-tooltip::before {
      content: ''; position: absolute; bottom: 100%; left: 50%;
      transform: translateX(-50%);
      border: 6px solid transparent; border-bottom-color: var(--border);
    }
    .mic-tooltip::after {
      content: ''; position: absolute; bottom: calc(100% - 1px); left: 50%;
      transform: translateX(-50%);
      border: 6px solid transparent; border-bottom-color: var(--surface2);
    }
    .mic-tooltip.visible { opacity: 1; }

    /* ── MATIÈRE CHIPS ───────────────────────────────────── */
    .matiere-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; min-height: 0; }
    .matiere-chip {
      padding: 6px 14px; border-radius: var(--radius-md);
      border: 1px solid var(--border); background: var(--surface2);
      cursor: pointer; font-size: 13px; color: var(--text-soft);
      transition: all var(--t-fast); font-family: inherit;
    }
    .matiere-chip:hover { border-color: var(--border-hover); color: var(--text); }
    .matiere-chip.selected { background: var(--accent-bg); border-color: var(--accent-border); color: var(--accent); font-weight: 500; }
    .matiere-error { font-size: 12px; color: var(--danger); margin-top: 8px; min-height: 16px; }

    /* ── SCROLLBAR ───────────────────────────────────────── */
    ::-webkit-scrollbar { width: 4px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: var(--border); border-radius: var(--radius-sm); }

    /* ── RESPONSIVE ──────────────────────────────────────── */
    /* ── MOBILE NAV (desktop: hidden) ───────────────────── */
    .mobile-nav { display: none; }

    @media (max-width: 768px) {
      #app { grid-template-columns: 1fr; }
      #sidebar { display: none !important; }
      #main { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }

      .mobile-nav {
        display: flex; position: fixed;
        bottom: 0; left: 0; right: 0;
        height: 56px;
        background: var(--surface); border-top: 1px solid var(--border);
        z-index: 100; padding-bottom: env(safe-area-inset-bottom, 0px);
      }
      .mobile-nav-btn {
        flex: 1; display: flex; flex-direction: column;
        align-items: center; justify-content: center; gap: 2px;
        background: none; border: none; color: var(--muted);
        font-size: 11px; cursor: pointer; transition: color 0.15s;
      }
      .mobile-nav-btn.active { color: var(--accent); }
      .mobile-nav-btn svg { width: 22px; height: 22px; }

      #view-mobile-courses { overflow-y: auto; }
      .mc-header {
        display: flex; align-items: center;
        padding: 14px 16px; border-bottom: 1px solid var(--border);
      }
      .mc-header h2 { flex: 1; font-size: 18px; font-weight: 700; margin: 0; }
      .mc-account {
        margin: 12px 16px 0; padding: 14px 16px;
        background: var(--surface); border: 1px solid var(--border);
        border-radius: var(--radius-md); display: flex; align-items: center; gap: 12px; cursor: pointer;
      }
      .mc-account:active { opacity: 0.7; }
      .mc-account-info { flex: 1; min-width: 0; }
      .mc-account-email { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
      .mc-account-action { font-size: 12px; color: var(--danger); margin-top: 2px; }
      .mc-list { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
      .mc-card {
        background: var(--surface); border: 1px solid var(--border);
        border-radius: var(--radius-md); padding: 14px 16px; cursor: pointer; transition: background 0.15s;
      }
      .mc-card:active { background: var(--border); }
      .mc-card-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
      .mc-card-sub { font-size: 12px; color: var(--muted); }
      .mc-empty { padding: 40px 16px; text-align: center; color: var(--muted); font-size: 14px; line-height: 1.6; }

      .main-header { padding: 10px 12px 8px; gap: 6px; }
      .ctx-chip span { max-width: 120px; }
      .main-body { padding: 16px 16px 12px; }
      .action-bar { padding: 10px 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
      .sheet-overlay { align-items: flex-end; }
      .plan-cards { grid-template-columns: 1fr; flex: none; }
      .sheet {
        width: 100%; max-width: 100%; max-height: 88vh;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
      }
      .onboarding-title { font-size: 20px; }
      .onboarding-sub { font-size: 13px; padding: 0 16px; }
    }
  
    /* ─── Triggers de conversion ───────────────────────────────────────────────── */
    .triggers-container {
      display: flex;
      flex-direction: column;
      gap: 8px;
      padding: 8px 16px 0;
    }
    .trigger-banner {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 14px;
      border-radius: 8px;
      font-size: 13.5px;
      line-height: 1.4;
    }
    .trigger-banner.urgent { background: #fee2e2; color: #991b1b; }
    .trigger-banner.high   { background: #fef3c7; color: #92400e; }
    .trigger-banner.medium { background: #dbeafe; color: #1e40af; }
    .trigger-banner.low    { background: #f3f4f6; color: #374151; }
    .trigger-icon { flex-shrink: 0; font-size: 16px; }
    .trigger-msg  { flex: 1; }
    .trigger-cta  {
      white-space: nowrap;
      padding: 5px 11px;
      border-radius: 5px;
      border: 1px solid currentColor;
      background: transparent;
      color: inherit;
      cursor: pointer;
      font-size: 12.5px;
      font-weight: 600;
    }
    .trigger-dismiss {
      background: none;
      border: none;
      cursor: pointer;
      color: inherit;
      opacity: 0.45;
      font-size: 18px;
      padding: 0 2px;
      line-height: 1;
      flex-shrink: 0;
    }
    .trigger-dismiss:hover { opacity: 0.8; }
