/* === Mobile default (< 1024px) === */
/* Hamburger visible, sidebar is drawer */
.menu-toggle { display: flex; }

/* === Desktop (≥ 1024px) === */
@media (min-width: 1024px) {
  /* Hamburger hidden — sidebar is permanent column */
  .menu-toggle { display: none; }

  .brand { margin-right: 8px; }

  .sidebar {
    position: static;
    transform: none;
    width: 220px;
    max-width: none;
    border-right: 1px solid var(--border);
    flex-shrink: 0;
    transition: none;
    z-index: 5;
    padding-top: 20px;
  }

  /* Even on desktop, quiz mode hides sidebar entirely */
  .sidebar.hidden { display: none; }
  .sidebar.open { transform: none; }

  /* Overlay never needed on desktop */
  .overlay { display: none !important; }

  main {
    padding-top: 32px;
    padding-bottom: 32px;
  }

  .option {
    padding: 16px 20px;
  }

  .option:hover:not(.correct):not(.wrong):not(.disabled) {
    background: var(--bg-tertiary);
    border-color: var(--border);
  }

  .category-list .cat-item:hover {
    background: var(--bg-secondary);
  }

  .mode-tabs button:hover:not(.active) {
    color: var(--text-secondary);
  }

  .study-nav button:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
  }
}

/* === Tablet (768-1023px) === */
@media (min-width: 768px) and (max-width: 1023px) {
  main { padding-top: 24px; }
  .sidebar { width: 240px; }
}

/* === Mobile (< 768px) === */
@media (max-width: 767px) {
  .brand { display: none; }

  .mode-tabs button {
    padding: 7px 14px;
  }

  .user-bar .user-name { display: none; }
  .user-bar { gap: 6px; padding-left: 8px; }

  .option:active:not(.correct):not(.wrong):not(.disabled) {
    background: var(--bg-tertiary);
    transform: scale(0.99);
  }

  .category-list .cat-item:active {
    background: var(--bg-tertiary);
  }

  .sidebar { width: 260px; }

  /* Keep study nav on one line on mobile */
  .study-nav {
    gap: 8px;
    padding: 16px 0;
    flex-wrap: nowrap;
  }
  .study-nav > button {
    padding: 9px 12px;
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .study-jump {
    gap: 4px;
    flex-shrink: 1;
    min-width: 0;
  }
  .study-jump input[type="number"] {
    width: 44px;
    padding: 7px 6px;
    font-size: 13px;
  }
  .study-jump button {
    padding: 7px 10px;
    font-size: 13px;
    flex-shrink: 0;
  }
  .study-jump .jump-sep,
  .study-jump .jump-total {
    font-size: 12px;
    white-space: nowrap;
  }

  /* Listen jump compacts on mobile too */
  .listen-jump input[type="number"] {
    width: 44px;
    padding: 7px 6px;
    font-size: 13px;
  }
  .listen-jump button {
    padding: 7px 10px;
    font-size: 13px;
  }
  .listen-jump .jump-total {
    font-size: 12px;
    white-space: nowrap;
  }
}
