@view-transition { navigation: auto; }


  :root {
    --ui-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    --ui-font-display: 'Plus Jakarta Sans', 'Inter', -apple-system, sans-serif;
    --ui-bg: #F4F6FB;
    --ui-surface: #FFFFFF;
    --ui-surface-2: #F8FAFC;
    --ui-text: #0F172A;
    --ui-text-2: #334155;
    --ui-muted: #64748B;
    --ui-border: #E2E8F0;
    --ui-border-strong: #CBD5E1;
    --ui-primary: #4F46E5;
    --ui-primary-hover: #4338CA;
    --ui-primary-soft: #EEF2FF;
    --ui-green: #10B981;
    --ui-green-soft: #DCFCE7;
    --ui-amber: #F59E0B;
    --ui-amber-soft: #FEF3C7;
    --ui-red: #EF4444;
    --ui-red-soft: #FEE2E2;
    --ui-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.03);
    --ui-shadow-md: 0 8px 24px -6px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
    --ui-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --ui-radius: 12px;
  }

  [data-theme="dark"] {
    --ui-bg: #0B1120;
    --ui-surface: #111827;
    --ui-surface-2: #1E293B;
    --ui-text: #F1F5F9;
    --ui-text-2: #CBD5E1;
    --ui-muted: #94A3B8;
    --ui-border: #1F2937;
    --ui-border-strong: #334155;
    --ui-primary: #6366F1;
    --ui-primary-hover: #818CF8;
    --ui-primary-soft: rgba(99, 102, 241, 0.18);
    --ui-green: #10B981;
    --ui-green-soft: rgba(16, 185, 129, 0.18);
    --ui-amber: #F59E0B;
    --ui-amber-soft: rgba(245, 158, 11, 0.18);
    --ui-red: #F87171;
    --ui-red-soft: rgba(239, 68, 68, 0.18);
    --ui-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
    --ui-shadow-md: 0 10px 28px -6px rgba(0, 0, 0, 0.55);
  }

  * {
    font-family: var(--ui-font-body);
    -webkit-font-smoothing: antialiased;
  }

  html, body {
    background: var(--ui-bg) !important;
    color: var(--ui-text) !important;
    transition: background-color 0.25s var(--ui-ease), color 0.25s var(--ui-ease);
  }

  /* Custom Slim Scrollbars */
  ::-webkit-scrollbar { width: 7px; height: 7px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.45); border-radius: 999px; }
  ::-webkit-scrollbar-thumb:hover { background: rgba(100, 116, 139, 0.7); }

  /* Tactile Press & Smooth Interactive Elements */
  button {
    transition: transform 0.14s var(--ui-ease), background-color 0.18s var(--ui-ease), border-color 0.18s var(--ui-ease), box-shadow 0.18s var(--ui-ease), opacity 0.18s !important;
  }
  button:active:not(:disabled) {
    transform: scale(0.965);
  }

  /* Theme Toggle Button */
  .ui-theme-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 4px;
    padding: 4px 9px; border-radius: 999px;
    background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.24);
    color: #FFFFFF; font-size: 11.5px; font-weight: 700; cursor: pointer;
    backdrop-filter: blur(8px);
  }
  .ui-theme-btn:hover { background: rgba(255, 255, 255, 0.24); }
  .ui-theme-btn svg { width: 13px; height: 13px; }

  /* Universal Dark Mode Overrides for Legacy Surfaces */
  [data-theme="dark"] .card,
  [data-theme="dark"] .studio-card,
  [data-theme="dark"] .act-card,
  [data-theme="dark"] .kpi-card,
  [data-theme="dark"] .eval-card,
  [data-theme="dark"] .group-box,
  [data-theme="dark"] .mode-bar,
  [data-theme="dark"] .ps-footer,
  [data-theme="dark"] .cc-tabs,
  [data-theme="dark"] .cc-footer,
  [data-theme="dark"] .tab-grid,
  [data-theme="dark"] .top-bar,
  [data-theme="dark"] .studio-top,
  [data-theme="dark"] .footer,
  [data-theme="dark"] .bottom-nav,
  [data-theme="dark"] .flashcard {
    background: var(--ui-surface) !important;
    border-color: var(--ui-border-strong) !important;
    color: var(--ui-text) !important;
  }

  [data-theme="dark"] .audio-panel,
  [data-theme="dark"] .prompt-box,
  [data-theme="dark"] .crit-box,
  [data-theme="dark"] .alt-box,
  [data-theme="dark"] .chip-zone,
  [data-theme="dark"] .ex-box,
  [data-theme="dark"] .diff-box,
  [data-theme="dark"] .m-diff-box,
  [data-theme="dark"] .rel-item,
  [data-theme="dark"] .dlg-line.role-A,
  [data-theme="dark"] .filter-bar,
  [data-theme="dark"] .filter-strip,
  [data-theme="dark"] .sys-kpi,
  [data-theme="dark"] .text-box,
  [data-theme="dark"] .seg-control {
    background: var(--ui-surface-2) !important;
    border-color: var(--ui-border-strong) !important;
    color: var(--ui-text) !important;
  }

  [data-theme="dark"] input[type="text"],
  [data-theme="dark"] input[type="password"],
  [data-theme="dark"] input[type="number"],
  [data-theme="dark"] textarea,
  [data-theme="dark"] select,
  [data-theme="dark"] .sel,
  [data-theme="dark"] .inp,
  [data-theme="dark"] .txt-input,
  [data-theme="dark"] .search-box,
  [data-theme="dark"] .search-input,
  [data-theme="dark"] .voice-select {
    background: #0F172A !important;
    border-color: #334155 !important;
    color: #F8FAFC !important;
  }

  [data-theme="dark"] .m-tab:not(.active),
  [data-theme="dark"] .t-btn:not(.active),
  [data-theme="dark"] .s-btn:not(.active),
  [data-theme="dark"] .btn-soft,
  [data-theme="dark"] .btn-audio,
  [data-theme="dark"] .w-chip:not(.ans),
  [data-theme="dark"] .m-chip:not(.ans),
  [data-theme="dark"] .mc-opt:not(.ok):not(.bad),
  [data-theme="dark"] .quiz-opt:not(.correct):not(.wrong),
  [data-theme="dark"] .f-pill:not(.active),
  [data-theme="dark"] .s-pill:not(.active),
  [data-theme="dark"] .root-chip,
  [data-theme="dark"] .mode-btn:not(.active),
  [data-theme="dark"] .btn-close,
  [data-theme="dark"] .btn-cancel,
  [data-theme="dark"] .btn-step,
  [data-theme="dark"] .btn-mini,
  [data-theme="dark"] .btn-more,
  [data-theme="dark"] .btn-load-more {
    background: #1E293B !important;
    border-color: #334155 !important;
    color: #E2E8F0 !important;
  }

  [data-theme="dark"] .seg-btn.active {
    background: #334155 !important;
    color: #FFFFFF !important;
  }

  [data-theme="dark"] .card-heading,
  [data-theme="dark"] .act-head,
  [data-theme="dark"] .kpi-val,
  [data-theme="dark"] .crit-val,
  [data-theme="dark"] .word-head,
  [data-theme="dark"] .word-name,
  [data-theme="dark"] .fc-front-text,
  [data-theme="dark"] .vi-main,
  [data-theme="dark"] .vi-meaning,
  [data-theme="dark"] .meaning,
  [data-theme="dark"] .fc-vi,
  [data-theme="dark"] .title {
    color: #F8FAFC !important;
  }

  [data-theme="dark"] .act-desc,
  [data-theme="dark"] .err-list,
  [data-theme="dark"] .err-summary,
  [data-theme="dark"] .de-example,
  [data-theme="dark"] .example,
  [data-theme="dark"] .fc-sub,
  [data-theme="dark"] .foot-note,
  [data-theme="dark"] .summary-status,
  [data-theme="dark"] .footer-status-label {
    color: #CBD5E1 !important;
  }

  [data-theme="dark"] .code-tok {
    background: #334155 !important;
    color: #FDE68A !important;
  }

  [data-theme="dark"] .hint-banner {
    background: rgba(245, 158, 11, 0.14) !important;
    border-color: rgba(245, 158, 11, 0.45) !important;
    color: #FDE68A !important;
  }

  /* =========================================================================
     KEYFRAME ANIMATIONS & MICRO-INTERACTIONS
  ========================================================================= */
  @keyframes uiFadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
  @keyframes uiSlideIn {
    from { opacity: 0; transform: translateX(16px); }
    to { opacity: 1; transform: translateX(0); }
  }
  @keyframes uiPopIn {
    0% { opacity: 0; transform: scale(0.92); }
    70% { transform: scale(1.02); }
    100% { opacity: 1; transform: scale(1); }
  }
  @keyframes uiShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
  }
  @keyframes uiShimmer {
    0% { background-position: -220% 0; }
    100% { background-position: 220% 0; }
  }
  @keyframes uiPulseRing {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
    70% { box-shadow: 0 0 0 12px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
  }
  @keyframes uiWaveBar {
    0%, 100% { transform: scaleY(0.28); }
    50% { transform: scaleY(1); }
  }

  .ui-anim-fade { animation: uiFadeUp 0.24s var(--ui-ease) both; }
  .ui-anim-slide { animation: uiSlideIn 0.24s var(--ui-ease) both; }
  .ui-anim-pop { animation: uiPopIn 0.28s var(--ui-ease) both; }
  .ui-anim-shake { animation: uiShake 0.36s ease-in-out; }
  .ui-pulse-playing { animation: uiPulseRing 1.3s infinite; }

  /* Skeleton Shimmer Loader */
  .ui-skel-wrap { display: flex; flex-direction: column; gap: 11px; padding: 12px 4px; }
  .ui-skel-line {
    height: 14px; border-radius: 8px;
    background: linear-gradient(90deg, rgba(148,163,184,0.16) 25%, rgba(148,163,184,0.34) 50%, rgba(148,163,184,0.16) 75%);
    background-size: 220% 100%;
    animation: uiShimmer 1.35s infinite linear;
  }
  .ui-skel-line.lg { height: 42px; border-radius: 10px; }
  .ui-skel-line.w-40 { width: 40%; }
  .ui-skel-line.w-70 { width: 70%; }
  .ui-skel-line.w-100 { width: 100%; }

  /* Animated 7-Bar Audio Waveform Equalizer */
  .ui-waveform {
    display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 4px;
  }
  .ui-waveform span {
    width: 3px; height: 100%; border-radius: 99px; background: var(--ui-green);
    transform: scaleY(0.28); opacity: 0.45;
    transition: opacity 0.2s;
  }
  .ui-waveform.active span {
    opacity: 1;
    animation: uiWaveBar 0.75s ease-in-out infinite;
  }
  .ui-waveform.active span:nth-child(2) { animation-delay: 0.12s; }
  .ui-waveform.active span:nth-child(3) { animation-delay: 0.24s; }
  .ui-waveform.active span:nth-child(4) { animation-delay: 0.08s; }
  .ui-waveform.active span:nth-child(5) { animation-delay: 0.30s; }
  .ui-waveform.active span:nth-child(6) { animation-delay: 0.18s; }
  .ui-waveform.active span:nth-child(7) { animation-delay: 0.26s; }

  /* SVG Circular Score Ring */
  .ui-score-ring-wrap {
    position: relative; width: 58px; height: 58px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  }
  .ui-score-ring-wrap svg { transform: rotate(-90deg); width: 58px; height: 58px; }
  .ui-score-ring-bg { fill: none; stroke: var(--ui-border-strong); stroke-width: 5.5; }
  .ui-score-ring-fg { fill: none; stroke-width: 5.5; stroke-linecap: round; transition: stroke-dashoffset 0.75s var(--ui-ease); }
  .ui-score-ring-txt {
    position: absolute; font-size: 14px; font-weight: 800; color: var(--ui-text); font-family: var(--ui-font-display);
  }

  /* Staggered Criteria Progress Bars */
  .ui-crit-bar-track {
    width: 100%; height: 5px; background: var(--ui-border); border-radius: 99px; overflow: hidden; margin-top: 5px;
  }
  .ui-crit-bar-fill {
    height: 100%; border-radius: 99px; width: 0%; transition: width 0.65s var(--ui-ease);
  }

  /* Toast Glassmorphism */
  .toast, .toast-bar {
    backdrop-filter: blur(10px);
    background: rgba(15, 23, 42, 0.90) !important;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25) !important;
    animation: uiPopIn 0.22s var(--ui-ease);
  }

  /* Lucide Inline Icon Alignment */
  svg.lucide { width: 14px; height: 14px; vertical-align: -2px; stroke-width: 2; }

  /* =========================================================================
     FLOATING WINDOW MANAGER v11.0 (MINIMIZE, RESIZE GRIP, ZOOM, MODERN LIFT)
  ========================================================================= */
  html, body {
    height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important;
  }

  .card, .act-card, .kpi-card {
    transition: transform 0.2s var(--ui-ease), box-shadow 0.2s var(--ui-ease), border-color 0.2s var(--ui-ease) !important;
  }
  .act-card:hover, .kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--ui-shadow-md);
    border-color: rgba(99, 102, 241, 0.35);
  }

  /* Window Controls Cluster (macOS / Linear Style) */
  .ui-win-controls {
    display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0;
  }
  .ui-win-btn {
    display: inline-flex; align-items: center; justify-content: center;
    height: 24px; min-width: 24px; padding: 0 6px; border-radius: 7px;
    background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.22);
    color: #FFFFFF; font-size: 11px; font-weight: 800; cursor: pointer;
    backdrop-filter: blur(8px); line-height: 1;
  }
  .ui-win-btn:hover { background: rgba(255, 255, 255, 0.26); }
  .ui-win-btn.light-surface {
    background: var(--ui-surface-2); border-color: var(--ui-border-strong); color: var(--ui-text-2);
  }
  .ui-win-btn.light-surface:hover { background: var(--ui-primary-soft); color: var(--ui-primary); border-color: var(--ui-primary); }

  /* Minimized Floating Mini Pill Bar */
  #uiMiniBar {
    display: none; position: fixed; inset: 0; z-index: 9999;
    background: linear-gradient(135deg, #0F172A 0%, #1E3A8A 100%);
    color: #FFFFFF; padding: 0 12px;
    align-items: center; justify-content: space-between; gap: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.35);
    animation: uiPopIn 0.2s var(--ui-ease);
  }
  body.ui-minimized > *:not(#uiMiniBar) { display: none !important; }
  body.ui-minimized #uiMiniBar { display: flex !important; }
  .ui-mini-title {
    font-size: 12.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    font-family: var(--ui-font-display);
  }
  .ui-mini-sub { font-size: 10px; color: #93C5FD; font-weight: 600; }

  /* Interactive Bottom-Right Corner Resize Grip */
  #uiResizeGrip {
    position: fixed; right: 2px; bottom: 2px; width: 16px; height: 16px; z-index: 9990;
    cursor: nwse-resize; opacity: 0.45; transition: opacity 0.15s, transform 0.15s;
    background: radial-gradient(circle at 100% 100%, var(--ui-primary) 2px, transparent 2.5px),
                linear-gradient(135deg, transparent 42%, var(--ui-muted) 45%, transparent 52%, transparent 66%, var(--ui-muted) 69%, transparent 76%);
    border-radius: 0 0 6px 0;
  }
  #uiResizeGrip:hover { opacity: 1; transform: scale(1.15); }
  body.ui-minimized #uiResizeGrip { display: none !important; }

  /* Floating Bottom Nav Glass Pill on Mobile */
  .bottom-nav {
    backdrop-filter: blur(12px);
    box-shadow: 0 -4px 18px rgba(15, 23, 42, 0.06);
  }
  .nav-item.active .nav-icon {
    transform: translateY(-2px) scale(1.1);
    transition: transform 0.2s var(--ui-ease);
  }


  /* =========================================================================
     v12.0 APEX PRO: SKELETON SHIMMER, SHAKE, HEATMAP 90D, COMMAND PALETTE
  ========================================================================= */
  @keyframes uiShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
  }
  .ui-skeleton {
    background: linear-gradient(90deg, var(--ui-surface-2) 25%, rgba(99,102,241,0.12) 50%, var(--ui-surface-2) 75%);
    background-size: 200% 100%;
    animation: uiShimmer 1.35s infinite linear;
    border-radius: 8px;
  }
  .ui-skel-line { height: 12px; margin-bottom: 8px; width: 100%; }
  .ui-skel-card { height: 74px; width: 100%; border-radius: 12px; }

  @keyframes uiShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
  }
  .ui-anim-shake { animation: uiShake 0.36s var(--ui-ease); }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
  }

  /* 90-Day Activity Heatmap (GitHub Style) */
  .ui-hm-wrap { display: flex; flex-direction: column; gap: 6px; }
  .ui-hm-grid {
    display: grid;
    grid-template-columns: repeat(18, 1fr);
    gap: 3px;
  }
  .ui-hm-cell {
    aspect-ratio: 1 / 1;
    border-radius: 3px;
    background: var(--ui-surface-2);
    border: 1px solid rgba(148, 163, 184, 0.22);
    transition: transform 0.14s ease;
  }
  .ui-hm-cell:hover { transform: scale(1.28); z-index: 2; }
  .ui-hm-l1 { background: #BBF7D0; border-color: #86EFAC; }
  .ui-hm-l2 { background: #4ADE80; border-color: #22C55E; }
  .ui-hm-l3 { background: #16A34A; border-color: #15803D; }
  .ui-hm-l4 { background: #166534; border-color: #14532D; }
  [data-theme="dark"] .ui-hm-l1 { background: #064E3B; border-color: #065F46; }
  [data-theme="dark"] .ui-hm-l2 { background: #047857; border-color: #059669; }
  [data-theme="dark"] .ui-hm-l3 { background: #10B981; border-color: #34D399; }
  [data-theme="dark"] .ui-hm-l4 { background: #34D399; border-color: #6EE7B7; }
  .ui-hm-meta { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--ui-muted); flex-wrap: wrap; gap: 6px; }

  /* Command Palette (Ctrl + K) */
  #uiCmdOverlay {
    display: none; position: fixed; inset: 0; z-index: 10000;
    background: rgba(15, 23, 42, 0.48); backdrop-filter: blur(5px);
    align-items: flex-start; justify-content: center; padding-top: 12vh;
  }
  #uiCmdOverlay.open { display: flex; animation: uiFadeIn 0.16s ease; }
  .ui-cmd-box {
    width: min(460px, 92vw); background: var(--ui-surface); color: var(--ui-text);
    border: 1px solid var(--ui-border-strong); border-radius: 14px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.35); overflow: hidden;
  }
  .ui-cmd-input {
    width: 100%; border: none; border-bottom: 1px solid var(--ui-border);
    background: transparent; color: var(--ui-text);
    padding: 13px 16px; font-size: 13.5px; font-weight: 600; outline: none;
    font-family: var(--ui-font-sans);
  }
  .ui-cmd-list { max-height: 270px; overflow-y: auto; padding: 6px; }
  .ui-cmd-item {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 9px 12px; border-radius: 9px; cursor: pointer;
    font-size: 12.5px; font-weight: 600; color: var(--ui-text-2);
  }
  .ui-cmd-item:hover, .ui-cmd-item.active { background: var(--ui-primary-soft); color: var(--ui-primary); }
  .ui-cmd-kbd {
    font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 5px;
    background: var(--ui-surface-2); color: var(--ui-muted); border: 1px solid var(--ui-border);
  }


  /* =========================================================================
     v17.0 HYPER-UX: SPRING PHYSICS, WAVEFORM, LIQUID SHIMMER, SLIDING PILL
  ========================================================================= */
  :root {
    --ui-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  /* Live Audio Waveform Visualizer (0KB CSS GPU-Accelerated) */
  .ui-wave {
    display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; padding: 0 3px;
  }
  .ui-wave span {
    width: 3px; height: 4px; border-radius: 99px; background: currentColor;
    transition: height 0.15s ease;
  }
  .ui-wave.playing span {
    animation: uiWaveBar 0.85s ease-in-out infinite alternate;
  }
  .ui-wave.playing span:nth-child(1) { animation-delay: 0.00s; }
  .ui-wave.playing span:nth-child(2) { animation-delay: 0.18s; }
  .ui-wave.playing span:nth-child(3) { animation-delay: 0.34s; }
  .ui-wave.playing span:nth-child(4) { animation-delay: 0.12s; }
  .ui-wave.playing span:nth-child(5) { animation-delay: 0.28s; }
  @keyframes uiWaveBar {
    0% { height: 3px; opacity: 0.55; }
    100% { height: 14px; opacity: 1; }
  }

  /* Liquid Shimmer Progress Bar */
  .ui-liquid-bar {
    position: relative; overflow: hidden;
  }
  .ui-liquid-bar::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.42) 50%, transparent 100%);
    transform: translateX(-100%);
    animation: uiLiquidFlow 2.1s infinite linear;
  }
  @keyframes uiLiquidFlow {
    100% { transform: translateX(100%); }
  }

  /* Sliding Glass Pill Tab Indicator */
  .ui-pill-track { position: relative !important; }
  .ui-pill-slider {
    position: absolute; top: 3px; bottom: 3px; left: 0; border-radius: 999px;
    background: rgba(255, 255, 255, 0.2); pointer-events: none; z-index: 0;
    transition: transform 0.28s var(--ui-spring), width 0.28s var(--ui-spring);
  }
  .ui-pill-track > button { position: relative; z-index: 1; }

  /* Dropzone Highlight */
  .ui-drop-active {
    outline: 2.5px dashed var(--ui-primary) !important;
    outline-offset: -4px;
    background: var(--ui-primary-soft) !important;
  }


  /* =========================================================================
     v18.2 PRO UX/UI: GLASSMORPHISM CONFIRM/ALERT MODAL + TACTILE POLISH
  ========================================================================= */
  ::-webkit-scrollbar { width: 7px; height: 7px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.35); border-radius: 99px; }
  ::-webkit-scrollbar-thumb:hover { background: rgba(100, 116, 139, 0.6); }

  button:active:not(:disabled) { transform: scale(0.97) !important; }

  .ui-dialog-overlay {
    position: fixed; inset: 0; z-index: 99999;
    background: rgba(9, 13, 22, 0.56);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center; padding: 16px;
    opacity: 0; transition: opacity 0.18s ease;
  }
  .ui-dialog-overlay.show { opacity: 1; }
  .ui-dialog-card {
    width: min(410px, 92vw);
    background: var(--ui-surface, #FFFFFF);
    color: var(--ui-text, #0F172A);
    border: 1px solid var(--ui-border-strong, rgba(148,163,184,0.35));
    border-radius: 18px;
    padding: 22px 22px 18px;
    box-shadow: 0 24px 60px rgba(9, 13, 22, 0.36);
    transform: scale(0.92) translateY(8px);
    transition: transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: var(--ui-font-sans, system-ui, sans-serif);
  }
  .ui-dialog-overlay.show .ui-dialog-card { transform: scale(1) translateY(0); }
  .ui-dialog-head { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 16px; }
  .ui-dialog-icon {
    width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 20px;
    background: rgba(79, 70, 229, 0.12); color: #4F46E5;
  }
  .ui-dialog-icon.danger { background: rgba(239, 68, 68, 0.14); color: #DC2626; }
  .ui-dialog-title { font-size: 15.5px; font-weight: 800; line-height: 1.3; margin-bottom: 4px; }
  .ui-dialog-msg { font-size: 13px; color: var(--ui-muted, #64748B); line-height: 1.5; word-break: break-word; }
  .ui-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
  .ui-dlg-btn {
    padding: 8px 16px; border-radius: 10px; font-size: 12.5px; font-weight: 700; cursor: pointer;
    border: 1px solid var(--ui-border-strong, #CBD5E1);
    background: var(--ui-surface-2, #F8FAFC); color: var(--ui-text, #0F172A);
    transition: all 0.15s ease;
  }
  .ui-dlg-btn:hover { border-color: var(--ui-primary, #4F46E5); }
  .ui-dlg-btn.primary { background: var(--ui-primary, #4F46E5); border-color: transparent; color: #FFFFFF; }
  .ui-dlg-btn.primary:hover { opacity: 0.92; }
  .ui-dlg-btn.danger { background: #DC2626; border-color: transparent; color: #FFFFFF; box-shadow: 0 4px 12px rgba(220,38,38,0.3); }
  .ui-dlg-btn.danger:hover { background: #B91C1C; }


  /* v19.1 GLOBAL ERROR BOUNDARY BANNER */
  .ui-err-banner {
    position: fixed; left: 14px; bottom: 14px; z-index: 100000;
    max-width: min(460px, 92vw);
    background: #FEF2F2; color: #991B1B;
    border: 1.5px solid #FCA5A5; border-radius: 12px;
    padding: 10px 12px; font-size: 12px; line-height: 1.45;
    box-shadow: 0 12px 30px rgba(185, 28, 28, 0.22);
    display: flex; align-items: flex-start; gap: 8px;
  }
  .ui-err-banner button {
    border: none; background: transparent; color: #991B1B; font-weight: 800; cursor: pointer; font-size: 13px;
  }




  * { box-sizing: border-box; font-family: 'Segoe UI', Roboto, -apple-system, Arial, sans-serif; }
  html, body { margin: 0; padding: 0; height: 100%; max-width: 100vw; overflow-x: hidden; background: var(--ui-bg, #F1F5F9); color: var(--ui-text, #0F172A); }
  @keyframes wpFadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes wpPopIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
  @keyframes wpShimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
  .wp-anim-fade { animation: wpFadeUp 0.24s cubic-bezier(0.16, 1, 0.3, 1); }
  .wp-anim-pop { animation: wpPopIn 0.2s cubic-bezier(0.16, 1, 0.3, 1); }
  .wp-skeleton { border-radius: 12px; background: linear-gradient(90deg, rgba(148,163,184,0.14) 25%, rgba(148,163,184,0.28) 50%, rgba(148,163,184,0.14) 75%); background-size: 800px 100%; animation: wpShimmer 1.35s infinite linear; }
  .wp-auth-gate { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #0F172A, #1E293B); overflow: hidden; padding: 16px; }
  .wp-blur-bg { position: absolute; inset: 0; padding: 40px; display: flex; flex-direction: column; gap: 18px; filter: blur(14px); opacity: 0.28; pointer-events: none; }
  .wp-fake-row { height: 74px; border-radius: 14px; background: linear-gradient(90deg, rgba(255,255,255,0.22), rgba(56,189,248,0.28)); }
  .wp-auth-card { position: relative; z-index: 2; width: min(410px, 100%); background: rgba(255,255,255,0.96); backdrop-filter: blur(16px); color: #0F172A; border-radius: 20px; padding: 26px 24px; box-shadow: 0 24px 60px rgba(0,0,0,0.45); border: 1px solid rgba(255,255,255,0.4); }
  .wp-watermark { position: fixed; inset: 0; z-index: 90; pointer-events: none; overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 900; color: #0F172A; opacity: 0.036; transform: rotate(-24deg); user-select: none; white-space: nowrap; }
  .wp-shell { display: flex; height: 100vh; height: 100dvh; width: 100%; max-width: 100vw; overflow: hidden; }
  .wp-sidebar { width: 254px; flex-shrink: 0; height: 100vh; height: 100dvh; background: #0F172A; color: #F8FAFC; display: flex; flex-direction: column; justify-content: space-between; padding: 12px 10px; transition: width 0.22s ease, transform 0.22s ease; z-index: 60; overflow: hidden; }
  .wp-sidebar > div:first-child { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
  .wp-sidebar.collapsed { width: 72px; }
  .wp-sidebar.collapsed .wp-brand-txt, .wp-sidebar.collapsed .wp-nav-sec, .wp-sidebar.collapsed .wp-nav-item span, .wp-sidebar.collapsed .wp-user-meta { display: none; }
  .wp-sidebar.collapsed .wp-nav-item { text-align: center; padding: 10px 6px; font-size: 16px; }
  .wp-brand { display: flex; align-items: center; gap: 8px; padding: 4px 6px 12px; border-bottom: 1px solid rgba(255,255,255,0.1); flex-shrink: 0; }
  .wp-rail-btn { margin-left: auto; border: 1px solid rgba(255,255,255,0.18); background: rgba(255,255,255,0.06); color: #E2E8F0; border-radius: 7px; padding: 3px 7px; cursor: pointer; font-size: 12px; }
  .wp-nav { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 8px 2px 12px 0; display: flex; flex-direction: column; gap: 3px; scrollbar-width: thin; }
  .wp-nav-sec { font-size: 10px; font-weight: 800; letter-spacing: 0.08em; color: #94A3B8; padding: 4px 10px; }
  .wp-nav-item { border: none; background: transparent; color: #CBD5E1; text-align: left; padding: 8px 10px; border-radius: 9px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.16s ease; flex-shrink: 0; }
  .wp-nav-item:hover { background: rgba(255,255,255,0.09); color: #FFF; transform: translateX(2px); }
  .wp-nav-item.active { background: linear-gradient(135deg, #4F46E5, #6366F1); color: #FFF; font-weight: 700; box-shadow: 0 6px 16px rgba(79,70,229,0.35); }
  .wp-user-foot { flex-shrink: 0; margin-top: 8px; padding: 9px; border-radius: 12px; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.08); }
  .wp-main { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
  .wp-topbar { height: 54px; padding: 0 14px; background: var(--ui-surface, #FFF); border-bottom: 1px solid var(--ui-border, #E2E8F0); display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-shrink: 0; overflow: hidden; }
  .wp-mob-menu-btn { display: none; padding: 5px 9px; flex-shrink: 0; }
  .wp-cmd-trigger { border: 1px solid var(--ui-border-strong, #CBD5E1); background: var(--ui-surface-2, #F8FAFC); color: var(--ui-text, #0F172A); padding: 4px 9px; border-radius: 8px; font-size: 11.5px; font-weight: 700; cursor: pointer; flex-shrink: 0; }
  .wp-quota-pill { font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgba(79,70,229,0.1); color: #4F46E5; white-space: nowrap; flex-shrink: 0; }
  .wp-content { flex: 1; min-width: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding: 16px; }
  .wp-grid-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 12px; margin-bottom: 16px; }
  .wp-kpi { background: var(--ui-surface, #FFF); border: 1px solid var(--ui-border, #E2E8F0); border-radius: 14px; padding: 14px 16px; box-shadow: 0 2px 8px rgba(15,23,42,0.04); transition: transform 0.16s ease, box-shadow 0.16s ease; }
  .wp-kpi:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15,23,42,0.08); }
  .wp-kpi-val { font-size: 24px; font-weight: 900; color: var(--ui-primary, #4F46E5); margin-top: 4px; }
  .wp-card { background: var(--ui-surface, #FFF); border: 1px solid var(--ui-border, #E2E8F0); border-radius: 14px; padding: 16px; margin-bottom: 14px; max-width: 100%; min-width: 0; box-shadow: 0 2px 10px rgba(15,23,42,0.04); }
  .wp-heatmap-grid { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; margin-top: 8px; }
  .wp-hm-cell { height: 16px; border-radius: 4px; background: rgba(148,163,184,0.18); transition: transform 0.12s ease; }
  .wp-hm-cell:hover { transform: scale(1.18); }
  .wp-hm-1 { background: #A7F3D0; }
  .wp-hm-2 { background: #34D399; }
  .wp-hm-3 { background: #059669; }
  .wp-lbl { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: #334155; }
  .wp-inp, .wp-sel { width: 100%; padding: 8px 11px; border-radius: 9px; border: 1px solid #CBD5E1; background: #F8FAFC; color: #0F172A; font-size: 13px; }
  .wp-btn { border: none; padding: 7px 12px; border-radius: 9px; font-size: 12.5px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 5px; transition: transform 0.12s ease, opacity 0.15s ease; }
  .wp-btn:active { transform: scale(0.97); }
  .wp-btn:disabled { opacity: 0.55; cursor: not-allowed; }
  .wp-btn-pri { background: #4F46E5; color: #FFF; }
  .wp-btn-green { background: #059669; color: #FFF; }
  .wp-btn-amber { background: #D97706; color: #FFF; }
  .wp-btn-danger { background: #DC2626; color: #FFF; }
  .wp-btn-cold { background: #0284C7; color: #FFF; }
  .wp-btn-soft { background: var(--ui-surface-2, #F1F5F9); color: var(--ui-text, #0F172A); border: 1px solid var(--ui-border-strong, #CBD5E1); }
  .wp-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
  .wp-table th { text-align: left; padding: 9px 10px; background: #0F172A; color: #FFF; font-size: 11.5px; }
  .wp-table td { padding: 9px 10px; border-bottom: 1px solid var(--ui-border, #E2E8F0); vertical-align: top; }
  .wp-table tr:hover td { background: rgba(79,70,229,0.035); }
  .wp-anom-tag { display: inline-block; margin-top: 3px; padding: 1px 6px; border-radius: 6px; font-size: 10px; font-weight: 700; background: #FEE2E2; color: #B91C1C; }
  .wp-blur-text { filter: blur(5px); cursor: pointer; transition: filter 0.18s; user-select: none; }
  .wp-blur-text.revealed, .wp-blur-text:hover { filter: none; }
  .wp-student-protect { user-select: none; -webkit-user-select: none; }
  .wp-drawer-backdrop { position: fixed; inset: 0; z-index: 210; background: rgba(15,23,42,0.42); backdrop-filter: blur(3px); }
  .wp-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 95vw); z-index: 220; background: var(--ui-surface, #FFF); color: var(--ui-text, #0F172A); box-shadow: -14px 0 40px rgba(15,23,42,0.28); display: flex; flex-direction: column; transform: translateX(105%); transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1); }
  .wp-drawer.open { transform: translateX(0); }
  .wp-drawer-head { padding: 14px 16px; background: linear-gradient(135deg, #1E1B4B, #312E81); color: #FFF; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
  .wp-drw-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 10px 12px; background: var(--ui-surface-2, #F8FAFC); border-bottom: 1px solid var(--ui-border, #E2E8F0); }
  .wp-drw-tab { border: 1px solid var(--ui-border-strong, #CBD5E1); background: var(--ui-surface, #FFF); color: var(--ui-text, #0F172A); padding: 6px 4px; border-radius: 9px; font-size: 11.5px; font-weight: 700; cursor: pointer; }
  .wp-drw-tab.active { background: #4F46E5; color: #FFF; border-color: #4F46E5; }
  .wp-drawer-body { flex: 1; overflow-y: auto; padding: 14px 16px; }
  .wp-tile { display: inline-block; padding: 6px 11px; margin: 4px; border-radius: 9px; background: var(--ui-surface-2, #F1F5F9); border: 1.5px solid var(--ui-border-strong, #CBD5E1); font-weight: 700; font-size: 13px; cursor: pointer; }
  .wp-tile:hover { border-color: #4F46E5; background: #EEF2FF; }
  .wp-word-tap { cursor: pointer; border-bottom: 1.5px dotted rgba(79,70,229,0.55); border-radius: 3px; padding: 0 1px; }
  .wp-word-tap:hover { background: rgba(79,70,229,0.14); }
  .wp-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
  .wp-media-card { border: 1px solid var(--ui-border, #E2E8F0); border-radius: 13px; overflow: hidden; background: var(--ui-surface, #FFF); cursor: pointer; transition: transform 0.16s ease, box-shadow 0.16s ease; }
  .wp-media-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(15,23,42,0.12); }
  .wp-chat-box { max-height: 280px; overflow-y: auto; padding: 10px; border-radius: 12px; background: var(--ui-surface-2, #F8FAFC); border: 1px solid var(--ui-border, #E2E8F0); display: flex; flex-direction: column; gap: 8px; }
  .wp-msg-ai { align-self: flex-start; max-width: 85%; padding: 9px 12px; border-radius: 12px; background: #EEF2FF; color: #1E1B4B; font-size: 13px; }
  .wp-msg-me { align-self: flex-end; max-width: 85%; padding: 9px 12px; border-radius: 12px; background: #4F46E5; color: #FFF; font-size: 13px; }
  .wp-modal-bg { position: fixed; inset: 0; z-index: 250; background: rgba(15,23,42,0.55); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 16px; }
  .wp-modal { width: min(500px, 100%); background: var(--ui-surface, #FFF); color: var(--ui-text, #0F172A); border-radius: 16px; padding: 18px; box-shadow: 0 24px 60px rgba(15,23,42,0.35); }
  .wp-cmd-item { width: 100%; text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--ui-border, #E2E8F0); background: var(--ui-surface-2, #F8FAFC); color: var(--ui-text, #0F172A); font-size: 13px; font-weight: 700; cursor: pointer; }
  .wp-cmd-item:hover { background: #4F46E5; color: #FFF; border-color: #4F46E5; }
  .wp-toast { position: fixed; top: 62px; left: 50%; transform: translateX(-50%); background: #0F172A; color: #FFF; padding: 8px 16px; border-radius: 999px; font-size: 12px; font-weight: 700; display: none; z-index: 300; pointer-events: none; }
  @media (max-width: 767px) {
    .wp-sidebar { position: fixed; top: 0; bottom: 0; left: 0; transform: translateX(-100%); width: 254px; }
    .wp-sidebar.open { transform: translateX(0); }
    .wp-rail-btn { display: none; }
    .wp-mob-menu-btn { display: inline-flex; }
  }



  :root {
    --wp-spring: cubic-bezier(0.22, 1, 0.36, 1);
    --wp-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .wp-confetti-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 9999; display: none; }

  @keyframes wpLogoFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
  @keyframes wpShakeX { 0%,100% { transform: translateX(0); } 20%,60% { transform: translateX(-6px); } 40%,80% { transform: translateX(6px); } }
  @keyframes wpPopOk { 0% { transform: scale(0.95); } 50% { transform: scale(1.03); } 100% { transform: scale(1); } }
  @keyframes wpRippleAnim { to { transform: scale(3.8); opacity: 0; } }
  @keyframes wpEqPulse { 0%,100% { transform: scaleY(0.25); } 50% { transform: scaleY(1); } }
  @keyframes wpBarGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
  @keyframes wpSheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

  .wp-logo-pulse { display: inline-block; animation: wpLogoFloat 3s ease-in-out infinite; will-change: transform; }
  .wp-shake { animation: wpShakeX 0.36s var(--wp-spring); }
  .wp-pop-ok { animation: wpPopOk 0.32s var(--wp-bounce); }

  .wp-btn { position: relative; overflow: hidden; will-change: transform; }
  .wp-ripple-wave { position: absolute; border-radius: 50%; background: rgba(255,255,255,0.42); transform: scale(0); animation: wpRippleAnim 0.52s linear; pointer-events: none; }

  .wp-reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.36s var(--wp-spring), transform 0.36s var(--wp-spring); will-change: transform, opacity; }
  .wp-reveal.in-view { opacity: 1; transform: translateY(0); }

  /* AUDIO EQUALIZER & REAL PROGRESS BAR */
  .wp-eq-badge {
    display: none; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; cursor: pointer;
    background: linear-gradient(135deg, rgba(16,185,129,0.16), rgba(79,70,229,0.16));
    color: #059669; border: 1px solid rgba(16,185,129,0.35);
  }
  .wp-eq-badge.playing { display: inline-flex; }
  .wp-eq-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
  .wp-eq-bars i { display: block; width: 2.5px; height: 14px; border-radius: 99px; background: currentColor; transform-origin: bottom; animation: wpEqPulse 0.72s ease-in-out infinite; }
  .wp-eq-bars i:nth-child(2) { animation-delay: 0.14s; }
  .wp-eq-bars i:nth-child(3) { animation-delay: 0.28s; }
  .wp-eq-bars i:nth-child(4) { animation-delay: 0.1s; }
  .wp-eq-bars i:nth-child(5) { animation-delay: 0.34s; }

  .wp-prog-track { height: 6px; border-radius: 999px; background: rgba(148,163,184,0.28); overflow: hidden; margin-top: 6px; }
  .wp-prog-fill { height: 100%; width: 0%; border-radius: 999px; background: linear-gradient(90deg, #EF4444, #F97316); transition: width 0.18s linear; }
  .wp-prog-fill.green { background: linear-gradient(90deg, #10B981, #4F46E5); }

  /* ACTIVE READING PARAGRAPH HIGHLIGHT */
  .wp-para-card {
    padding: 12px 14px; border-radius: 12px; background: var(--ui-surface-2); margin-bottom: 9px;
    border: 1.5px solid var(--ui-border); transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  }
  .wp-para-card.wp-para-active {
    border-color: #4F46E5; background: rgba(79,70,229,0.08);
    box-shadow: 0 4px 16px rgba(79,70,229,0.16);
  }

  /* SVG DAILY GOAL RING & BAR CHART */
  .wp-ring-svg { transform: rotate(-90deg); }
  .wp-ring-bg { fill: none; stroke: rgba(148,163,184,0.2); stroke-width: 8; }
  .wp-ring-fg { fill: none; stroke: url(#wpGoalGrad); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 0.9s var(--wp-spring); }
  .wp-chart-bar { transform-origin: bottom; animation: wpBarGrow 0.65s var(--wp-spring) both; }

  /* PARITY COMPONENTS */
  .wp-ps-banner {
    background: linear-gradient(135deg, #0F172A, #1E1B4B); color: #FFF;
    padding: 12px 16px; border-radius: 14px; margin-bottom: 12px;
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
  }
  .wp-ps-pill { padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.16); white-space: nowrap; }

  /* SEGMENTED CONTROL (TODAII 3 MODES - ALWAYS 1 CLEAN ROW) */
  .wp-segmented {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
    background: rgba(15,23,42,0.92); padding: 4px; border-radius: 12px; margin-bottom: 12px;
  }
  .wp-seg-btn {
    border: none; background: transparent; color: #CBD5E1; padding: 8px 6px; border-radius: 9px;
    font-size: 12.5px; font-weight: 700; cursor: pointer; transition: all 0.18s var(--wp-spring); white-space: nowrap;
  }
  .wp-seg-btn.active { background: #4F46E5; color: #FFF; box-shadow: 0 3px 10px rgba(79,70,229,0.4); }

  /* BENTO SHORTCUT GRID (DASHBOARD) */
  .wp-bento-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
  .wp-bento-tile {
    border: 1px solid var(--ui-border, #E2E8F0); border-radius: 13px; padding: 12px;
    background: var(--ui-surface-2, #F8FAFC); color: var(--ui-text, #0F172A);
    text-align: left; cursor: pointer; transition: transform 0.16s var(--wp-spring), box-shadow 0.16s ease;
    display: flex; flex-direction: column; gap: 4px;
  }
  .wp-bento-tile:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(15,23,42,0.08); border-color: #4F46E5; }

  /* MODE STRIP (PRACTICE 8 MODES) */
  .wp-mode-strip { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
  .wp-mob-filter-bar { display: none; }

  .wp-cinema-hero {
    position: relative; border-radius: 16px; overflow: hidden; padding: 22px 20px; margin-bottom: 14px;
    background-size: cover; background-position: center; color: #FFF;
    box-shadow: 0 14px 32px rgba(15,23,42,0.22);
  }
  .wp-cinema-hero::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(120deg, rgba(15,23,42,0.92) 0%, rgba(49,46,129,0.78) 55%, rgba(153,27,27,0.68) 100%);
  }
  .wp-cinema-hero > * { position: relative; z-index: 1; }

  .wp-td-player { background: #0F172A; color: #FFF; padding: 11px 15px; border-radius: 16px; display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
  .wp-td-play-btn {
    width: 40px; height: 40px; border-radius: 50%; border: none; background: #EF4444; color: #FFF;
    font-size: 15px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(239,68,68,0.45); transition: transform 0.15s var(--wp-bounce);
  }
  .wp-td-play-btn:hover { transform: scale(1.08); }
  .wp-cefr-b1 { border-bottom: 2px solid #10B981; }
  .wp-cefr-b2 { border-bottom: 2px solid #F59E0B; }

  .wp-wf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
  .wp-wf-card { padding: 12px 14px; border-radius: 13px; border: 1px solid var(--ui-border, #E2E8F0); background: var(--ui-surface, #FFF); border-left-width: 4px; transition: transform 0.18s var(--wp-spring), box-shadow 0.18s ease; }
  .wp-wf-card:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(15,23,42,0.09); }
  .wp-wf-trennbar { border-left-color: #4F46E5; }
  .wp-wf-untrennbar { border-left-color: #D97706; }
  .wp-wf-nomen { border-left-color: #059669; }
  .wp-wf-adjektiv { border-left-color: #EC4899; }

  .wp-diff-ok { background: #DCFCE7; color: #166534; padding: 1px 4px; border-radius: 4px; font-weight: 700; }
  .wp-diff-err { background: #FEE2E2; color: #B91C1C; padding: 1px 4px; border-radius: 4px; text-decoration: line-through; }

  /* SIDEBAR BACKDROP & MOBILE CLOSE BUTTON */
  .wp-sidebar-backdrop { display: none; position: fixed; inset: 0; z-index: 145; background: rgba(15,23,42,0.55); backdrop-filter: blur(3px); }
  .wp-sidebar-backdrop.open { display: block; }
  .wp-mob-close-btn { display: none; margin-left: auto; border: 1px solid rgba(255,255,255,0.22); background: rgba(255,255,255,0.1); color: #FFF; border-radius: 8px; padding: 4px 9px; font-size: 13px; cursor: pointer; }
  .wp-sheet-handle { display: none; width: 42px; height: 4.5px; border-radius: 99px; background: rgba(148,163,184,0.45); margin: 0 auto 12px; }
  .wp-bottom-nav { display: none; }

  /* TABLET BREAKPOINT */
  @media (min-width: 768px) and (max-width: 1024px) {
    .wp-sidebar { width: 74px; }
    .wp-sidebar .wp-brand-txt, .wp-sidebar .wp-nav-sec, .wp-sidebar .wp-nav-item span, .wp-sidebar .wp-user-meta { display: none; }
    .wp-sidebar .wp-nav-item { text-align: center; font-size: 17px; padding: 10px 6px; }
  }

  /* MOBILE NATIVE APP BREAKPOINT (< 768px) — FIXES ALL 5 MOBILE UX BUGS */
  @media (max-width: 767px) {
    /* Bug 1 Fix: Sidebar ALWAYS sits ABOVE Bottom Nav (z-index 160 > 80) + safe-area padding */
    .wp-sidebar {
      position: fixed; top: 0; bottom: 0; left: 0; width: min(285px, 84vw);
      z-index: 160 !important;
      padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
      transform: translateX(-105%); box-shadow: 16px 0 40px rgba(0,0,0,0.45);
    }
    .wp-sidebar.open { transform: translateX(0); }
    .wp-mob-close-btn { display: inline-flex; }
    .wp-rail-btn { display: none; }

    /* Bug 2 Fix: Clean Topbar — hide useless ⌘K on touchscreens */
    .wp-cmd-trigger { display: none !important; }
    .wp-topbar { padding: 0 10px; height: 50px; }
    .wp-quota-pill { padding: 3px 8px; font-size: 11px; }
    .wp-eq-lbl { display: none; }

    /* Bug 3 Fix: Practice Studio 1-row horizontal pill strip + Bottom Sheet Filters */
    .wp-mode-strip {
      flex-wrap: nowrap !important; overflow-x: auto; -webkit-overflow-scrolling: touch;
      scrollbar-width: none; padding-bottom: 4px; margin-bottom: 8px;
    }
    .wp-mode-strip::-webkit-scrollbar { display: none; }
    .wp-mode-strip .wp-btn { flex-shrink: 0; white-space: nowrap; padding: 6px 11px; font-size: 12px; }
    .wp-prac-filters-desktop { display: none !important; }
    .wp-mob-filter-bar { display: flex !important; gap: 6px; align-items: center; margin-bottom: 10px; }
    .wp-ps-banner { padding: 9px 12px; margin-bottom: 10px; }
    .wp-ps-banner-title { display: none; }

    /* Bug 4 Fix: Todaii Mobile Compact Horizontal Media Cards */
    .wp-media-grid { grid-template-columns: 1fr !important; gap: 8px; }
    .wp-media-card { display: flex; flex-direction: row; align-items: center; }
    .wp-media-thumb { width: 92px !important; height: 76px !important; flex-shrink: 0; }

    /* Bug 5 Fix: Dashboard 2x2 Bento Grid & Generous Bottom Padding */
    .wp-bento-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }
    .wp-grid-kpi { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; margin-bottom: 12px; }
    .wp-kpi { padding: 11px 12px; }
    .wp-kpi-val { font-size: 20px; }
    .wp-content { padding: 10px 10px calc(92px + env(safe-area-inset-bottom, 0px)) !important; }
    .wp-card { padding: 12px; margin-bottom: 10px; border-radius: 13px; }
    .wp-btn { min-height: 36px; }

    /* Native Mobile Bottom Sheets for Modals */
    .wp-modal-bg { align-items: flex-end !important; padding: 0 !important; }
    .wp-modal {
      width: 100% !important; max-width: 100% !important; max-height: 88vh; overflow-y: auto;
      border-radius: 22px 22px 0 0 !important;
      padding: 12px 16px calc(20px + env(safe-area-inset-bottom, 0px)) !important;
      animation: wpSheetUp 0.28s var(--wp-spring) !important;
    }
    .wp-sheet-handle { display: block; }

    /* Bottom Navigation Bar + Auto-Hide when Mobile Virtual Keyboard Opens */
    .wp-bottom-nav {
      display: grid; grid-template-columns: repeat(5, 1fr);
      position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
      background: rgba(15,23,42,0.96); backdrop-filter: blur(14px);
      border-top: 1px solid rgba(255,255,255,0.12);
      padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
      transition: transform 0.22s var(--wp-spring);
    }
    body.wp-kb-open .wp-bottom-nav { transform: translateY(110%); pointer-events: none; }
    .wp-bnav-btn { border: none; background: transparent; color: #94A3B8; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 2px; font-size: 18px; cursor: pointer; }
    .wp-bnav-btn small { font-size: 10px; font-weight: 700; }
    .wp-bnav-btn.active { color: #818CF8; transform: translateY(-2px); }

    /* Data Explorer Fluid Mobile Cards */
    .wp-table thead { display: none; }
    .wp-table, .wp-table tbody, .wp-table tr, .wp-table td { display: block; width: 100%; }
    .wp-table tr { margin-bottom: 10px; border: 1px solid var(--ui-border, #E2E8F0); border-radius: 13px; padding: 10px; background: var(--ui-surface, #FFF); }
    .wp-table td { border: none; padding: 4px 2px; }
  }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  }

  /* =========================================================================
     v27.0 MOTION ENGINE V2: DUAL-CONTRAST RIPPLE, SLIDING GLIDER, DIRECTIONAL
     TRANSITIONS, INTERACTIVE SCRUB RANGE, SPOTIFY PODCAST PLAYER & MINI BAR
  ========================================================================= */
  @keyframes wpSlideRight { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: translateX(0); } }
  @keyframes wpSlideLeft { from { opacity: 0; transform: translateX(-22px); } to { opacity: 1; transform: translateX(0); } }
  @keyframes wpSpinOnce { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

  .wp-anim-right { animation: wpSlideRight 0.26s var(--wp-spring); }
  .wp-anim-left { animation: wpSlideLeft 0.26s var(--wp-spring); }
  .wp-spinning { animation: wpSpinOnce 0.7s linear infinite; }

  /* Dual-Contrast Ripple: Indigo ripple on light surfaces, White ripple on dark surfaces */
  .wp-ripple-wave.dark-ink { background: rgba(79, 70, 229, 0.24); }
  .wp-btn, .wp-bnav-btn, .wp-seg-btn, .wp-bento-tile, .wp-ep-item {
    position: relative; overflow: hidden;
    transition: transform 0.16s var(--wp-spring), background-color 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  }
  .wp-btn:active, .wp-bento-tile:active, .wp-ep-item:active { transform: scale(0.955); }

  /* Segmented Control Sliding Glider (Todaii 3 Tabs) */
  .wp-segmented { position: relative; }
  .wp-seg-glider {
    position: absolute; top: 4px; bottom: 4px; left: 4px;
    width: calc((100% - 8px) / 3); border-radius: 9px;
    background: linear-gradient(135deg, #4F46E5, #6366F1);
    box-shadow: 0 4px 12px rgba(79,70,229,0.42);
    transition: transform 0.28s var(--wp-spring);
    z-index: 0; pointer-events: none;
  }
  .wp-seg-btn { position: relative; z-index: 1; }
  .wp-seg-btn.active { background: transparent !important; box-shadow: none !important; color: #FFF; }

  /* Interactive Audio Scrub Range Slider (Todaii Reading & Podcast) */
  .wp-seek-range {
    -webkit-appearance: none; appearance: none; width: 100%; height: 6px;
    border-radius: 999px; background: rgba(255,255,255,0.22); outline: none; cursor: pointer;
    margin: 7px 0 2px;
  }
  .wp-seek-range::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; width: 15px; height: 15px; border-radius: 50%;
    background: #EF4444; border: 2px solid #FFF; box-shadow: 0 2px 6px rgba(0,0,0,0.35);
    transition: transform 0.15s var(--wp-bounce);
  }
  .wp-seek-range::-webkit-slider-thumb:hover,
  .wp-seek-range::-webkit-slider-thumb:active { transform: scale(1.25); }
  .wp-seek-range.indigo::-webkit-slider-thumb { background: #6366F1; }

  /* Spotify-Style Unified Podcast Player & Episode List */
  .wp-pod-deck {
    background: linear-gradient(135deg, #0F172A, #1E1B4B); color: #FFF;
    border-radius: 16px; padding: 14px 16px; margin-bottom: 12px;
    box-shadow: 0 12px 28px rgba(15,23,42,0.22);
  }
  .wp-ep-list { display: flex; flex-direction: column; gap: 7px; }
  .wp-ep-item {
    display: flex; align-items: center; gap: 10px; padding: 11px 12px;
    border-radius: 12px; border: 1px solid var(--ui-border, #E2E8F0);
    background: var(--ui-surface-2, #F8FAFC); cursor: pointer; text-align: left; width: 100%;
    color: var(--ui-text, #0F172A);
  }
  .wp-ep-item:hover { border-color: #4F46E5; background: rgba(79,70,229,0.05); }
  .wp-ep-item.active {
    border-color: #4F46E5; background: rgba(79,70,229,0.1);
    box-shadow: 0 4px 14px rgba(79,70,229,0.14);
  }

  /* Floating Mini Audio Player */
  .wp-mini-player {
    position: fixed; right: 16px; bottom: 16px; width: min(370px, calc(100vw - 24px));
    z-index: 95; border-radius: 14px; overflow: hidden;
    background: rgba(15, 23, 42, 0.96); backdrop-filter: blur(14px); color: #FFF;
    border: 1px solid rgba(255,255,255,0.14); box-shadow: 0 14px 36px rgba(0,0,0,0.38);
    animation: wpPopIn 0.22s var(--wp-spring);
  }
  .wp-mini-prog { height: 3px; background: rgba(255,255,255,0.15); width: 100%; }
  .wp-mini-prog-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #10B981, #6366F1); transition: width 0.2s linear; }
  .wp-mini-row { display: flex; align-items: center; gap: 5px; padding: 8px 10px; }
  .wp-mini-btn {
    width: 30px; height: 30px; border-radius: 50%; border: none;
    background: rgba(255,255,255,0.1); color: #FFF; font-size: 12px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  }
  .wp-mini-btn.pri { background: #EF4444; width: 34px; height: 34px; font-size: 13px; }

  /* Card Title Clamp (No missing/overflowing Podcast/Video titles) */
  .wp-card-title-2 {
    font-weight: 800; font-size: 13px; margin-top: 3px; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .wp-featured-pill {
    position: absolute; top: 8px; left: 8px; padding: 2px 8px; border-radius: 999px;
    background: rgba(239,68,68,0.92); color: #FFF; font-size: 10px; font-weight: 800;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  }

  /* Bottom Nav Active Top Glow Bar */
  .wp-bnav-btn.active::before {
    content: ""; position: absolute; top: 0; left: 20%; right: 20%; height: 3px;
    border-radius: 0 0 6px 6px; background: linear-gradient(90deg, #6366F1, #10B981);
    animation: wpPopOk 0.26s var(--wp-bounce);
  }

  @media (max-width: 767px) {
    .wp-mini-player {
      left: 10px; right: 10px; width: auto;
      bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    }
    body.wp-kb-open .wp-mini-player { bottom: 8px; }
  }


  /* =========================================================================
     v28.0 SPOTIFY AUDIO PRO + ALL-DEVICE RESPONSIVE DESIGN (320px -> 4K)
  ========================================================================= */

  /* Centered Ultrawide Reading Container (>= 1441px) */
  @media (min-width: 1441px) {
    .wp-content > * { max-width: 1320px; margin-left: auto; margin-right: auto; }
  }

  /* Clean Tablet Rail (768px - 1024px) — ZERO collision with mobile drawer! */
  @media (min-width: 768px) and (max-width: 1024px) {
    .wp-sidebar { position: relative !important; transform: none !important; width: 74px; flex-shrink: 0; }
    .wp-sidebar.open { position: fixed !important; left: 0; top: 0; bottom: 0; width: 254px; z-index: 160; }
    .wp-mob-menu-btn { display: inline-flex !important; }
    .wp-bottom-nav { display: none !important; }
    .wp-content { padding-bottom: 104px !important; }
  }

  /* Desktop Bottom Padding for Spotify Dock */
  @media (min-width: 1025px) {
    .wp-content { padding-bottom: 98px !important; }
  }

  /* Spotify-Style Persistent Audio Dock */
  .wp-spotify-dock {
    position: fixed; left: 268px; right: 16px; bottom: 12px; z-index: 105;
    border-radius: 16px; overflow: hidden;
    background: rgba(15, 23, 42, 0.96); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    color: #F8FAFC; border: 1px solid rgba(255,255,255,0.14);
    box-shadow: 0 18px 44px rgba(2, 6, 23, 0.45);
    animation: wpPopIn 0.24s var(--wp-spring);
  }
  .wp-sidebar.collapsed ~ .wp-main .wp-spotify-dock { left: 88px; }
  @media (min-width: 768px) and (max-width: 1024px) {
    .wp-spotify-dock { left: 88px; right: 14px; }
  }

  .wp-sp-scrub-wrap { padding: 0 10px; background: rgba(255,255,255,0.04); display: flex; align-items: center; }
  .wp-sp-range {
    -webkit-appearance: none; appearance: none; width: 100%; height: 4px; margin: 4px 0;
    border-radius: 99px; background: rgba(255,255,255,0.2); outline: none; cursor: pointer;
  }
  .wp-sp-range::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; width: 13px; height: 13px; border-radius: 50%;
    background: #1DB954; border: 2px solid #FFF; box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    transition: transform 0.14s var(--wp-bounce);
  }
  .wp-sp-range::-webkit-slider-thumb:hover { transform: scale(1.25); }
  .wp-sp-range::-moz-range-thumb {
    width: 13px; height: 13px; border-radius: 50%; background: #1DB954; border: 2px solid #FFF;
  }

  .wp-sp-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px 10px; }
  .wp-sp-meta { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; cursor: pointer; }
  .wp-sp-art {
    width: 38px; height: 38px; border-radius: 9px; flex-shrink: 0; overflow: hidden;
    background: linear-gradient(135deg, #4F46E5, #1DB954);
    display: flex; align-items: center; justify-content: center; font-size: 18px;
    background-size: cover; background-position: center;
  }
  .wp-sp-title { font-size: 12.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .wp-sp-sub { font-size: 10.5px; color: #94A3B8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }

  .wp-sp-controls { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
  .wp-sp-tools { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
  .wp-sp-btn {
    min-width: 30px; height: 30px; padding: 0 6px; border-radius: 999px; border: none;
    background: rgba(255,255,255,0.09); color: #E2E8F0; font-size: 12px; font-weight: 700;
    cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
    transition: transform 0.14s var(--wp-spring), background 0.16s ease, color 0.16s ease;
  }
  .wp-sp-btn:hover { background: rgba(255,255,255,0.18); color: #FFF; }
  .wp-sp-btn:active { transform: scale(0.92); }
  .wp-sp-btn.pri {
    width: 36px; height: 36px; background: #1DB954; color: #052E16; font-size: 14px;
    box-shadow: 0 4px 14px rgba(29, 185, 84, 0.45);
  }
  .wp-sp-btn.pri:hover { background: #1ED760; transform: scale(1.06); }
  .wp-sp-btn.on { background: rgba(29,185,84,0.24); color: #4ADE80; border: 1px solid rgba(74,222,128,0.45); }

  .wp-sp-pill {
    border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.08); color: #FFF;
    border-radius: 999px; padding: 3px 8px; font-size: 11px; font-weight: 800; cursor: pointer;
  }
  .wp-sp-vol-wrap { display: flex; align-items: center; gap: 4px; }
  .wp-sp-vol { width: 64px; height: 4px; accent-color: #1DB954; cursor: pointer; }

  /* Continue Listening Shelf (Spotify Style) */
  .wp-hist-shelf {
    display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px;
    -webkit-overflow-scrolling: touch; scrollbar-width: thin;
  }
  .wp-hist-card {
    flex: 0 0 235px; border-radius: 13px; padding: 11px 12px;
    border: 1px solid var(--ui-border, #E2E8F0); background: var(--ui-surface-2, #F8FAFC);
    display: flex; flex-direction: column; gap: 7px; cursor: pointer; text-align: left;
    color: var(--ui-text, #0F172A);
    transition: transform 0.16s var(--wp-spring), border-color 0.16s ease, box-shadow 0.16s ease;
  }
  .wp-hist-card:hover { transform: translateY(-2px); border-color: #1DB954; box-shadow: 0 8px 20px rgba(15,23,42,0.09); }
  .wp-hist-prog { height: 4.5px; border-radius: 99px; background: rgba(148,163,184,0.25); overflow: hidden; }
  .wp-hist-prog > i { display: block; height: 100%; background: linear-gradient(90deg, #1DB954, #4F46E5); border-radius: 99px; }

  /* Active YouTube Video Cue & Click-to-Seek */
  .wp-yt-cue {
    padding: 9px 11px; border-bottom: 1px solid var(--ui-border); display: flex;
    justify-content: space-between; align-items: flex-start; gap: 8px; cursor: pointer;
    transition: background 0.16s ease;
  }
  .wp-yt-cue:hover { background: rgba(79,70,229,0.06); }
  .wp-yt-cue.active {
    background: rgba(29, 185, 84, 0.12); border-left: 3.5px solid #1DB954;
  }
  .wp-ts-chip {
    display: inline-block; font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 5px;
    background: rgba(79,70,229,0.12); color: #4F46E5; margin-right: 5px;
  }

  /* Spotify Deck Extra Control Row */
  .wp-sp-deck-bar {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px;
    margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.12);
  }

  /* Episode Progress Bar inside Podcast List */
  .wp-ep-prog { height: 3.5px; border-radius: 99px; background: rgba(148,163,184,0.25); overflow: hidden; margin-top: 5px; max-width: 180px; }
  .wp-ep-prog > i { display: block; height: 100%; background: #1DB954; }

  /* Responsive Dock & Touch Input Safety on Mobile (< 768px) */
  @media (max-width: 960px) {
    .wp-sp-hide-md { display: none !important; }
  }
  @media (max-width: 767px) {
    .wp-spotify-dock {
      left: 8px; right: 8px;
      bottom: calc(64px + env(safe-area-inset-bottom, 0px));
      border-radius: 14px;
    }
    body.wp-kb-open .wp-spotify-dock { bottom: 6px; }
    .wp-sp-hide-sm { display: none !important; }
    .wp-sp-row { padding: 6px 9px 8px; gap: 6px; }
    .wp-sp-art { width: 34px; height: 34px; font-size: 15px; }
    .wp-content { padding-bottom: calc(146px + env(safe-area-inset-bottom, 0px)) !important; }
    .wp-inp, .wp-sel { font-size: 16px !important; } /* Prevents iOS Safari auto-zoom on input focus */
  }
  @media (max-width: 400px) {
    .wp-sp-hide-xs { display: none !important; }
    .wp-hist-card { flex: 0 0 210px; }
  }


  .wp-today-hero {
    background: linear-gradient(135deg, #1E1B4B 0%, #4F46E5 60%, #059669 100%);
    color: #FFF; border-radius: 16px; padding: 18px; margin-bottom: 14px;
    box-shadow: 0 12px 28px rgba(79,70,229,0.28);
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  }
  .wp-fsrs-card {
    border: 1.5px solid var(--ui-border-strong, #CBD5E1); border-radius: 16px; padding: 20px 16px;
    background: var(--ui-surface-2, #F8FAFC); text-align: center; min-height: 195px;
    display: flex; flex-direction: column; justify-content: center; gap: 10px;
    transition: transform 0.25s var(--wp-spring), box-shadow 0.25s ease;
  }
  .wp-fsrs-card.flipped { background: var(--ui-surface, #FFF); border-color: #4F46E5; box-shadow: 0 8px 24px rgba(79,70,229,0.12); }
  .wp-fsrs-rate-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; }
  .wp-fsrs-rate-btn {
    border: none; border-radius: 11px; padding: 9px 4px; color: #FFF; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 2px; font-weight: 800; font-size: 12.5px;
    transition: transform 0.14s var(--wp-spring);
  }
  .wp-fsrs-rate-btn:active { transform: scale(0.95); }
  .wp-fsrs-rate-btn small { font-size: 10px; opacity: 0.9; font-weight: 600; }
  .wp-leech-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 800; background: #FEE2E2; color: #B91C1C; border: 1px solid #FECACA; }

  /* v29.1 FIX: Explicit 16:9 YouTube Wrapper so YT.Player iframe NEVER collapses to 0px height! */
  .wp-yt-wrap {
    position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 220px;
    border-radius: 14px; overflow: hidden; margin-bottom: 12px; background: #000;
  }
  .wp-yt-wrap iframe, .wp-yt-wrap #wpYtInner {
    position: absolute !important; top: 0; left: 0;
    width: 100% !important; height: 100% !important;
    border: none !important; display: block !important;
  }
  .wp-tile.used {
    opacity: 0.22; pointer-events: none; transform: scale(0.94);
    border-style: dashed; background: transparent; color: transparent; user-select: none;
  }

  /* v30.0 Word-Level Phonetic Diff & Live 60fps Waveform Visualizer */
  .wp-pron-diff {
    display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
    margin-top: 8px; padding: 10px; border-radius: 12px;
    background: var(--ui-surface, #FFFFFF); border: 1px solid var(--ui-border, #E2E8F0);
  }
  .wp-pron-word {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 9px; border-radius: 8px; font-weight: 800; font-size: 13.5px;
    cursor: pointer; transition: transform 0.14s ease, box-shadow 0.14s ease;
    border: 1px solid transparent;
  }
  .wp-pron-word:hover { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(15,23,42,0.08); }
  .wp-pron-word.exact { background: #DCFCE7; color: #166534; border-color: #86EFAC; }
  .wp-pron-word.close { background: #FEF3C7; color: #92400E; border-color: #FDE68A; }
  .wp-pron-word.missed { background: #FEE2E2; color: #991B1B; border-color: #FECACA; text-decoration: underline wavy #DC2626; }
  .wp-pron-word small { font-size: 10px; opacity: 0.85; font-weight: 700; }
  .wp-wave-canvas {
    width: 100%; max-width: 300px; height: 38px; border-radius: 10px;
    background: rgba(79,70,229,0.06); display: block; margin: 6px auto;
  }

  /* WCAG 2.1 AA Reduced Motion Support (UX1 Fix) */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }
  }



  /* =========================================================================
     v33.0 DEUTSCHLINGUA PRO — LINGUA.COM-INSPIRED DESIGN SYSTEM (WEB + MOBILE)
     ========================================================================= */
  :root {
    --lg-bg: #FAF9F6;
    --lg-card: #FFFFFF;
    --lg-card-soft: #F5F3EE;
    --lg-border: #E7E4DC;
    --lg-text: #1F2937;
    --lg-muted: #6B7280;
    --lg-accent: #E15258;
    --lg-accent-hover: #C93E44;
    --lg-accent-soft: #FEF2F2;
    --lg-green: #10B981;
    --lg-green-soft: #ECFDF5;
    --lg-blue: #3B82F6;
    --lg-amber: #F59E0B;
    --lg-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
    --lg-shadow-md: 0 6px 22px rgba(15, 23, 42, 0.08);
  }
  html[data-theme="dark"] {
    --lg-bg: #0F172A;
    --lg-card: #1E293B;
    --lg-card-soft: #172033;
    --lg-border: #334155;
    --lg-text: #F8FAFC;
    --lg-muted: #94A3B8;
    --lg-accent-soft: rgba(225, 82, 88, 0.16);
    --lg-green-soft: rgba(16, 185, 129, 0.16);
  }

  /* Lingua Top Skill Tabs inside Topbar */
  .lg-top-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 2px 0;
  }
  .lg-top-tabs::-webkit-scrollbar { display: none; }
  .lg-tab-btn {
    border: 1px solid transparent;
    background: transparent;
    color: var(--lg-muted);
    font-weight: 700;
    font-size: 13px;
    padding: 7px 13px;
    border-radius: 9px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.16s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
  }
  .lg-tab-btn:hover { color: var(--lg-text); background: var(--lg-card-soft); }
  .lg-tab-btn.active {
    color: var(--lg-text);
    background: var(--lg-card);
    border-color: var(--lg-border);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    font-weight: 800;
  }
  .lg-lang-sel {
    border: 1px solid var(--lg-border);
    background: var(--lg-card);
    color: var(--lg-text);
    font-size: 11.5px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 8px;
    cursor: pointer;
  }

  /* Page Wrapper */
  .lg-page {
    max-width: 1080px;
    margin: 0 auto;
    padding: 8px 4px 48px;
    color: var(--lg-text);
  }

  /* Hero Row (Left Intro + Right Score Ring Card) */
  .lg-hero {
    display: grid;
    grid-template-columns: 1fr 310px;
    gap: 22px;
    align-items: start;
    margin-bottom: 24px;
  }
  .lg-hero-title {
    font-size: clamp(24px, 3.2vw, 34px);
    font-weight: 900;
    letter-spacing: -0.025em;
    line-height: 1.15;
    margin: 0 0 10px;
    color: var(--lg-text);
  }
  .lg-hero-desc {
    font-size: 14.5px;
    line-height: 1.65;
    color: var(--lg-muted);
    margin: 0 0 16px;
  }
  .lg-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
  }
  .lg-pill {
    border: 1px solid var(--lg-border);
    background: var(--lg-card);
    color: var(--lg-text);
    font-size: 13px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .lg-pill:hover { border-color: var(--lg-accent); color: var(--lg-accent); }
  .lg-pill.active, .lg-pill-pri {
    background: var(--lg-accent);
    border-color: var(--lg-accent);
    color: #FFFFFF;
  }
  .lg-pill-pri:hover { background: var(--lg-accent-hover); color: #FFFFFF; }

  /* Skill Score Ring Card (Right side of Hero) */
  .lg-score-card {
    background: var(--lg-card);
    border: 1px solid var(--lg-border);
    border-radius: 18px;
    padding: 18px;
    box-shadow: var(--lg-shadow);
  }
  .lg-score-top {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
  }
  .lg-ring-wrap {
    position: relative;
    width: 68px;
    height: 68px;
    flex-shrink: 0;
  }
  .lg-ring-svg { transform: rotate(-90deg); }
  .lg-ring-bg { fill: none; stroke: var(--lg-border); stroke-width: 7; }
  .lg-ring-fg { fill: none; stroke: var(--lg-accent); stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset 0.5s ease; }
  .lg-ring-pct {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 15px;
    color: var(--lg-text);
  }
  .lg-score-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--lg-border);
    font-size: 12px;
  }
  .lg-score-stats b { display: block; font-size: 14px; margin-top: 2px; color: var(--lg-text); }

  /* Filter Bar (By Level / Category / Popular) */
  .lg-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 14px 0 18px;
    padding: 12px 14px;
    background: var(--lg-card);
    border: 1px solid var(--lg-border);
    border-radius: 14px;
  }
  .lg-lvl-chip {
    border: 1px solid var(--lg-border);
    background: var(--lg-card-soft);
    color: var(--lg-text);
    font-size: 12px;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.14s ease;
  }
  .lg-lvl-chip.active { background: var(--lg-text); color: var(--lg-card); border-color: var(--lg-text); }
  .lg-lvl-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    background: var(--lg-card-soft);
    color: var(--lg-text);
    border: 1px solid var(--lg-border);
  }
  .lg-lvl-A1 { background: #DCFCE7; color: #166534; border-color: #BBF7D0; }
  .lg-lvl-A2 { background: #DBEAFE; color: #1E40AF; border-color: #BFDBFE; }
  .lg-lvl-B1 { background: #FEF3C7; color: #92400E; border-color: #FDE68A; }
  .lg-lvl-B2 { background: #FCE7F3; color: #9D174D; border-color: #FBCFE8; }
  .lg-lvl-C1 { background: #EDE9FE; color: #5B21B6; border-color: #DDD6FE; }

  /* Lesson Grid Cards */
  .lg-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
  }
  .lg-lesson-card {
    background: var(--lg-card);
    border: 1px solid var(--lg-border);
    border-radius: 15px;
    padding: 15px 16px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    box-shadow: var(--lg-shadow);
  }
  .lg-lesson-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--lg-shadow-md);
    border-color: var(--lg-accent);
  }
  .lg-card-title { font-weight: 800; font-size: 15.5px; color: var(--lg-text); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
  .lg-pop-tag { font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: 999px; background: var(--lg-accent-soft); color: var(--lg-accent); }
  .lg-card-desc { font-size: 13px; color: var(--lg-muted); line-height: 1.45; }
  .lg-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 8px; border-top: 1px solid var(--lg-border); font-size: 12px; }
  .lg-status-pill { font-weight: 800; font-size: 11.5px; color: var(--lg-muted); }
  .lg-status-pill.done { color: var(--lg-green); }

  /* Lesson Detail Header (Back + Title + Level + Worksheet PDF) */
  .lg-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: var(--lg-card);
    border: 1px solid var(--lg-border);
    border-radius: 15px;
    margin-bottom: 16px;
    flex-wrap: wrap;
  }
  .lg-back-btn {
    border: 1px solid var(--lg-border);
    background: var(--lg-card-soft);
    color: var(--lg-text);
    font-weight: 800;
    font-size: 13px;
    padding: 7px 12px;
    border-radius: 10px;
    cursor: pointer;
  }
  .lg-worksheet-btn {
    border: 1px solid var(--lg-border);
    background: var(--lg-card);
    color: var(--lg-text);
    font-weight: 800;
    font-size: 12.5px;
    padding: 7px 13px;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
  }
  .lg-worksheet-btn:hover { border-color: var(--lg-accent); color: var(--lg-accent); }

  /* MULTI-VOICE LISTENING PLAYER (EXACT LINGUA.COM STYLE) */
  .lg-player-shell {
    background: var(--lg-card-soft);
    border: 1px solid var(--lg-border);
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 18px;
  }
  .lg-player-bar {
    background: var(--lg-card);
    border: 1px solid var(--lg-border);
    border-radius: 14px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    box-shadow: var(--lg-shadow);
    margin-bottom: 12px;
  }
  .lg-play-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: var(--lg-text);
    color: var(--lg-card);
    font-size: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .lg-play-circle.playing { background: var(--lg-accent); color: #FFFFFF; }
  .lg-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--lg-border);
    background: var(--lg-card);
    color: var(--lg-text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
  }
  .lg-seek-wrap { flex: 1; min-width: 140px; display: flex; align-items: center; gap: 10px; }
  .lg-seek-range { flex: 1; accent-color: var(--lg-accent); height: 6px; cursor: pointer; }
  .lg-speed-ctrl {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--lg-card-soft);
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid var(--lg-border);
    font-size: 12px;
    font-weight: 800;
  }
  .lg-speed-ctrl button {
    width: 24px; height: 24px; border-radius: 50%; border: none;
    background: var(--lg-card); color: var(--lg-text); font-weight: 900; cursor: pointer;
  }

  /* 4 Native German Speaker Cards */
  .lg-voices-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }
  .lg-voice-card {
    background: var(--lg-card);
    border: 1.5px solid var(--lg-border);
    border-radius: 13px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
  }
  .lg-voice-card.active {
    border-color: var(--lg-accent);
    box-shadow: 0 0 0 3px var(--lg-accent-soft);
  }
  .lg-voice-av {
    width: 38px; height: 38px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 900; flex-shrink: 0;
  }

  /* Sticky Mini-Player: Hidden on Desktop (avoids covering main player), active ONLY on Mobile (<768px) */
  .lg-sticky-mini {
    display: none;
    position: sticky;
    top: 4px;
    z-index: 40;
    background: var(--lg-card);
    border: 1.5px solid var(--lg-accent);
    border-radius: 12px;
    padding: 8px 12px;
    margin-bottom: 12px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    box-shadow: var(--lg-shadow-md);
  }

  /* Question Progress Segments + 2-Column MCQ Grid */
  .lg-q-progress {
    display: flex;
    gap: 5px;
    margin: 8px 0 18px;
  }
  .lg-q-seg {
    flex: 1;
    height: 5px;
    border-radius: 999px;
    background: var(--lg-border);
    transition: background 0.2s ease;
  }
  .lg-q-seg.ok { background: var(--lg-green); }
  .lg-q-seg.bad { background: var(--lg-accent); }
  .lg-q-seg.picked { background: var(--lg-blue); }

  .lg-mcq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
  .lg-q-card {
    background: var(--lg-card);
    border: 1.5px solid var(--lg-border);
    border-radius: 15px;
    padding: 15px;
    box-shadow: var(--lg-shadow);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
  }
  .lg-q-card.speaking-q {
    border-color: var(--lg-accent);
    box-shadow: 0 0 0 3px var(--lg-accent-soft);
  }
  .lg-q-title {
    font-weight: 800;
    font-size: 14.5px;
    margin-bottom: 11px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
  }
  .lg-q-num {
    width: 24px; height: 24px; border-radius: 50%;
    background: var(--lg-card-soft); color: var(--lg-muted);
    font-size: 12px; font-weight: 900; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .lg-opt-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .lg-opt-btn {
    border: 1.5px solid var(--lg-border);
    background: var(--lg-card);
    color: var(--lg-text);
    border-radius: 999px;
    padding: 9px 12px;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.14s ease;
    min-height: 44px;
  }
  .lg-opt-btn:hover { border-color: var(--lg-accent); }
  .lg-opt-letter {
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--lg-card-soft); color: var(--lg-muted);
    font-size: 11.5px; font-weight: 800; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .lg-opt-btn.correct { border-color: var(--lg-green); background: var(--lg-green-soft); color: #065F46; }
  .lg-opt-btn.correct .lg-opt-letter { background: var(--lg-green); color: #FFFFFF; }
  .lg-opt-btn.wrong { border-color: var(--lg-accent); background: var(--lg-accent-soft); color: #991B1B; }
  .lg-opt-btn.wrong .lg-opt-letter { background: var(--lg-accent); color: #FFFFFF; }
  .lg-q-exp {
    margin-top: 9px;
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--lg-card-soft);
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--lg-text);
  }

  /* Reading Text Box */
  .lg-reading-box {
    background: var(--lg-card);
    border: 1px solid var(--lg-border);
    border-radius: 16px;
    padding: 20px 22px;
    margin-bottom: 18px;
    font-size: 16px;
    line-height: 1.85;
    box-shadow: var(--lg-shadow);
  }
  .lg-sent-span {
    cursor: pointer;
    border-radius: 5px;
    padding: 1px 2px;
    transition: background 0.15s ease;
  }
  .lg-sent-span:hover, .lg-sent-span.speaking {
    background: rgba(225, 82, 88, 0.16);
  }

  /* Dictation Diff Highlighter */
  .lg-diff-ok { color: #059669; font-weight: 700; }
  .lg-diff-bad { color: #DC2626; background: #FEE2E2; padding: 1px 4px; border-radius: 4px; text-decoration: line-through; }
  .lg-diff-fix { color: #047857; background: #D1FAE5; padding: 1px 4px; border-radius: 4px; font-weight: 800; }

  /* Vocabulary 3-Mode Cards */
  .lg-voc-modes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 22px;
  }
  .lg-voc-mode-card {
    background: var(--lg-card);
    border: 1.5px solid var(--lg-border);
    border-radius: 16px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    box-shadow: var(--lg-shadow);
  }
  .lg-voc-6grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 14px;
  }

  /* Responsive Breakpoints (Mobile-First RWD across Phone / Tablet / Laptop / Desktop) */
  @media (max-width: 1140px) {
    .lg-tab-btn { padding: 6px 9px; font-size: 12px; }
    .wp-quota-pill { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
  }
  @media (max-width: 960px) {
    .lg-hero { grid-template-columns: 1fr; }
    .lg-voices-grid { grid-template-columns: repeat(2, 1fr); }
    .lg-mcq-grid { grid-template-columns: 1fr; }
    .lg-voc-modes { grid-template-columns: 1fr; }
  }
  @media (max-width: 767px) {
    .lg-top-tabs { display: none !important; }
    #wpViewTitle { display: block !important; }
    .wp-cmd-trigger { display: none !important; }
    .wp-quota-pill { display: none !important; }
    .lg-sticky-mini { display: flex; }
    .lg-page { padding: 4px 0 calc(92px + env(safe-area-inset-bottom)); }
    .wp-content { padding: 12px 10px calc(84px + env(safe-area-inset-bottom)) !important; }
    .lg-opt-grid { grid-template-columns: 1fr; }
    .lg-voices-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .lg-voice-card { padding: 8px 9px; }
    .lg-reading-box { padding: 14px 14px; font-size: 15px; line-height: 1.75; }
    .lg-voc-6grid { grid-template-columns: 1fr; }
    .lg-detail-head { padding: 10px 12px; }
    .lg-player-bar { padding: 10px 12px; gap: 8px; }
    .lg-pill, .lg-back-btn, .lg-worksheet-btn { min-height: 40px; }
  }

  /* A4 PDF WORKSHEET PRINT STYLESHEET (0 SERVER COST) */
  #lgPrintSheet { display: none; }
  @media print {
    body * { visibility: hidden !important; }
    #lgPrintSheet, #lgPrintSheet * { visibility: visible !important; }
    #lgPrintSheet {
      display: block !important;
      position: fixed;
      inset: 0;
      background: #FFFFFF !important;
      color: #111827 !important;
      padding: 18mm 16mm;
      font-family: Georgia, "Times New Roman", serif;
      font-size: 11.5pt;
      line-height: 1.55;
      z-index: 99999;
    }
    .lg-print-head { border-bottom: 2px solid #111827; padding-bottom: 8px; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: baseline; }
    .lg-print-q { margin-bottom: 10px; page-break-inside: avoid; }
    .lg-print-key { margin-top: 18px; padding-top: 10px; border-top: 1px dashed #6B7280; page-break-before: auto; }
  }



/* === v40.0 UNIFIED PRO CLASSROOM 2026 (/app/) — WARM EDITORIAL SYNC === */
:root { --wp-prem-gold: linear-gradient(135deg, #F59E0B 0%, #EA580C 100%); }
.wp-topbar { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgba(148,163,184,0.18); }
.wp-prem-pill { display:inline-flex; align-items:center; gap:5px; padding:5px 12px; border-radius:999px; font-size:12px; font-weight:800; text-decoration:none; background:var(--wp-prem-gold); color:#FFF; box-shadow:0 4px 14px rgba(234,88,12,0.28); transition:transform .15s ease, box-shadow .15s ease; white-space:nowrap; }
.wp-prem-pill:hover { transform:translateY(-1px); box-shadow:0 6px 18px rgba(234,88,12,0.38); }
.wp-prem-pill.is-active { background:linear-gradient(135deg,#059669,#10B981); box-shadow:0 4px 14px rgba(16,185,129,0.28); }
.wp-nav-pro-tag { margin-left:auto; font-size:10px; font-weight:800; padding:2px 6px; border-radius:999px; background:rgba(245,158,11,0.2); color:#F59E0B; border:1px solid rgba(245,158,11,0.4); }
.wp-nav-item.is-prem-locked { opacity:0.85; }
.wp-app-prem-gate { max-width:640px; margin:36px auto; padding:32px 28px; border-radius:20px; text-align:center; background:linear-gradient(180deg, rgba(245,158,11,0.09), rgba(234,88,12,0.04)); border:1.5px solid rgba(245,158,11,0.35); }
.wp-app-prem-gate h2 { margin:10px 0 8px; font-size:22px; }
.wp-app-prem-gate p { opacity:0.85; line-height:1.6; margin:0 0 18px; }
