  /* ── Update Banner ── */
  .update-banner {
    position: fixed;
    top: 0; left: 260px; right: 0;
    background: linear-gradient(90deg, var(--concept), var(--concept-dark));
    color: var(--text-white);
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 12px;
    animation: slideDown 0.3s ease;
  }
  @keyframes slideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }
  .update-banner .refresh-link {
    background: rgba(255,255,255,0.2);
    color: var(--text-white);
    border: none;
    padding: 4px 14px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    font-family: var(--font);
    font-weight: 700;
    transition: background 0.2s;
  }
  .update-banner .refresh-link:hover { background: rgba(255,255,255,0.35); }
  .update-banner .close-banner {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 18px;
    cursor: pointer;
  }
  @media (max-width: 768px) {
    .update-banner { left: 0; }
  }

  /* ── Floating Button ── */
  .fab-wrap { position: fixed; bottom: 28px; right: 28px; z-index: 999; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
  .theme-toggle-btn {
    width: 44px; height: 44px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  }
  .theme-toggle-btn:hover { border-color: var(--concept); transform: scale(1.1); }
  .fab {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, var(--concept), var(--concept-dark));
    border: none; border-radius: 50%;
    color: var(--text-white); font-size: 22px; font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(139,92,246,0.4);
    transition: all 0.2s;
    display: flex; align-items: center; justify-content: center;
  }
  .fab:hover { transform: scale(1.1); box-shadow: 0 6px 24px rgba(139,92,246,0.5); }
  .fab-menu {
    position: absolute; bottom: 60px; right: 0;
    background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md);
    padding: 8px 0; min-width: 180px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    display: none; animation: fabIn 0.2s ease;
  }
  .fab-menu.open { display: block; }
  @keyframes fabIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
  .fab-menu a {
    display: block; padding: 12px 20px;
    color: var(--concept-text); text-decoration: none; font-size: 14px; font-weight: 500;
    transition: background 0.15s;
  }
  .fab-menu a:hover { background: rgba(139,92,246,0.1); color: var(--text-white); }
  [data-theme="light"] .fab-menu { box-shadow: 0 8px 30px rgba(0,0,0,0.15); }
  [data-theme="light"] .fab-menu a:hover { color: var(--concept); }
  [data-theme="light"] .fab { box-shadow: 0 4px 16px rgba(139,92,246,0.25); }

  /* ── Mobile Header ── */
  .mobile-header {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 56px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    z-index: 200;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
  }
  .mobile-header h1 {
    font-size: 16px;
    font-weight: 700;
    color: var(--concept);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .menu-btn {
    width: 40px; height: 40px;
    background: none; border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
    flex-shrink: 0;
  }
  .menu-btn:hover { background: rgba(139,92,246,0.1); }
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
  }
  .sidebar-overlay.open { display: block; }

  /* ── Vocabulary Study Mode ── */
  .view-vocab { overflow-x: hidden; }
  .view-vocab .concept-card { overflow-x: auto; }
  .view-vocab .compare-table { table-layout: fixed; width: 100%; }
  .view-vocab .compare-table th:nth-child(1),
  .view-vocab .compare-table td:nth-child(1) { width: 20%; }
  .view-vocab .compare-table th:nth-child(2),
  .view-vocab .compare-table td:nth-child(2) { width: 30%; }
  .view-vocab .compare-table th:nth-child(3),
  .view-vocab .compare-table td:nth-child(3) { width: 50%; word-break: break-word; }

  .vocab-controls {
    display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap;
    background: var(--bg-surface); padding: 16px; border-radius: var(--radius-lg);
    border: 1px solid var(--border);
  }
  .vocab-btn {
    padding: 10px 20px; border-radius: 10px; border: 1px solid var(--concept);
    background: transparent; color: var(--concept); font-family: var(--font);
    font-size: 14px; font-weight: 700; cursor: pointer; transition: all 0.2s;
    display: inline-flex; align-items: center; gap: 8px;
  }
  .vocab-btn:hover { background: rgba(139,92,246,0.1); transform: translateY(-1px); }
  .vocab-btn.active { background: var(--concept); color: var(--text-white); box-shadow: 0 4px 12px rgba(139,92,246,0.3); }

  .hide-word .vocab-word { color: transparent !important; background: var(--border-subtle); border-radius: 4px; transition: all 0.2s; cursor: help; }
  .hide-word .vocab-word:hover { color: var(--text-primary) !important; background: transparent; }
  
  .hide-meaning .vocab-meaning { color: transparent !important; background: var(--border-subtle); border-radius: 4px; transition: all 0.2s; cursor: help; }
  .hide-meaning .vocab-meaning:hover { color: var(--text-secondary) !important; background: transparent; }

  .hide-answers .answer-cell { color: transparent !important; background: var(--border-subtle); border-radius: 4px; transition: all 0.2s; cursor: help; user-select: none; }
  .hide-answers .answer-cell:hover { color: var(--text-primary) !important; background: transparent; }

  .toggle-btn { display: inline-block; padding: 8px 20px; border-radius: 8px; border: 1.5px solid var(--concept); background: transparent; color: var(--concept); font-weight: 600; cursor: pointer; transition: all 0.2s; margin-top: 4px; }
  .toggle-btn:hover { background: rgba(139,92,246,0.1); transform: translateY(-1px); }

  /* ── Responsive ── */
  @media (max-width: 900px) {
    .mobile-header { display: flex; }
    .sidebar {
      display: flex;
      transform: translateX(-100%);
      transition: transform 0.3s ease;
      z-index: 300;
    }
    .sidebar.open { transform: translateX(0); }
    .main { margin-left: 0; padding: 16px; padding-top: 72px; max-width: 100%; overflow-x: hidden; margin-right: auto; }
    .hero { padding: 30px 0 20px; }
    .hero h1 { font-size: 28px; }
    .lecture-header h2 { font-size: 20px; }
    .lecture-num { width: 40px; height: 40px; font-size: 18px; border-radius: 10px; }
    .concept-card { padding: 20px 24px; }
    .formula-box { padding: 16px; }
    .formula-box .formula { font-size: 16px; }
    .compare-table th, .compare-table td { padding: 10px 12px; font-size: 13px; }
    .flow-row { gap: 8px; }
    .flow-box { min-width: 80px; padding: 10px 14px; font-size: 13px; }
    .dist-grid { grid-template-columns: 1fr; }
    .cv-compare { flex-direction: column; }
    .quiz-card-body { padding: 16px 20px 20px; }
    .quiz-card-header { padding: 16px 20px 0; }
    .quiz-options li { padding: 12px 14px; font-size: 13px; }
    .compare-table { display: block; overflow-x: auto; }
    .formula-box .formula { font-size: 14px; word-break: break-all; }
    .diagram-box { overflow-x: auto; }
    .diagram-box svg { max-width: 100%; height: auto; }
    .fab-wrap { bottom: 16px; right: 16px; }
    .update-banner { left: 0; top: 56px; }
  }
