@media (max-width: 650px) {
  .auth-screen { grid-template-columns: 1fr; }
  .auth-story { min-height: auto; padding: 18px 22px 0; }
  .auth-story-copy { padding: 25px 0 20px; }
  .auth-story-copy h1 { font-size: 38px; }
  .auth-story-copy p { font-size: 16px; }
  .auth-story-foot { display: none; }
  .auth-main { padding: 24px 22px 36px; }
  .auth-form h2 { font-size: 32px; }
  .auth-description { font-size: 15px; }
  .auth-field { font-size: 14px; }
  .auth-field input { height: 48px; font-size: 16px; }
  .auth-submit { min-height: 48px; font-size: 15px; }
  .auth-switch { min-height: 44px; font-size: 14px; }
  .app-shell { height: 100dvh; min-height: 100dvh; padding-bottom: env(safe-area-inset-bottom); }
  .sidebar {
    position: fixed;
    inset: auto 0 0;
    z-index: 6;
    display: block;
    width: 100%;
    padding: 0 0 env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    border-right: 0;
    background: var(--surface);
  }
  .brand-row, .workspace-switcher, .side-section, .sidebar-bottom { display: none; }
  .primary-nav {
    display: flex;
    justify-content: flex-start;
    gap: 0;
    margin: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .primary-nav::-webkit-scrollbar { display: none; }
  .nav-item {
    display: flex;
    flex: 1 0 76px;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    width: auto;
    min-width: 68px;
    min-height: 58px;
    height: auto;
    padding: 6px 4px;
    border-radius: 0;
    font-size: 11px;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
  }
  .nav-item.active { box-shadow: inset 0 2px var(--accent); }
  .nav-icon { width: auto; font-size: 19px; }
  .nav-count { display: none; }
  .main-area { padding-bottom: 64px; }
  .topbar { height: 56px; padding: 0 14px; }
  .breadcrumbs { font-size: 13px; }
  .topbar-actions { gap: 4px; }
  .topbar-actions > .help-button { display: none; }
  .breadcrumbs .crumb-workspace, .breadcrumbs .crumb-slash { display: none; }
  .search-trigger { width: 40px; height: 40px; }
  .theme-toggle, .help-button { min-width: 40px; min-height: 40px; }
  .dashboard, .notes-view { padding: 26px 17px 28px; }
  .welcome-row h1, .notes-heading h1 { font-size: 29px; }
  .welcome-subtitle, .notes-heading p { font-size: 14px; line-height: 1.5; }
  .primary-button { min-height: 42px; font-size: 13px; }
  .daily-date strong, .recent-copy strong { font-size: 14px; }
  .daily-date small, .recent-copy small, .section-title-row p { font-size: 12px; }
  .text-link, .plain-link, .insight-link { min-height: 40px; font-size: 12px; }
  .recent-item { min-height: 68px; }
  .note-card-title { font-size: 19px; }
  .note-card-desc { font-size: 13px; height: 40px; }
  .editor-view { padding: 0 16px 25px; }
  .editor-toolbar { min-height: 58px; }
  .back-link { min-height: 44px; font-size: 14px; }
  .editor-actions .icon-button { width: 42px; height: 42px; }
  .note-title-input { font-size: 34px; }
  .editor-formatbar { height: 46px; }
  .editor-formatbar button { min-width: 38px; min-height: 38px; font-size: 14px; }
  .note-content { font-size: 18px; line-height: 1.75; }
  .quick-capture { bottom: calc(76px + env(safe-area-inset-bottom)); right: 15px; width: 48px; height: 48px; }
  .theme-menu { right: -48px; width: min(300px, calc(100vw - 24px)); max-height: 70dvh; }
  .appearance-field { font-size: 12px; }
  .appearance-field select, .appearance-field input[type="text"] { min-height: 42px; font-size: 14px; }
  .appearance-secondary, .appearance-reset { min-height: 40px; font-size: 12px; }
  .calendar-day { min-height: 42px; }
  .event-entry input, .todo-entry input { min-height: 44px; font-size: 16px; }
  .todo-add-button, .event-add-button { min-height: 44px; font-size: 14px; }
  .command-input-row { height: 58px; }
  .command-input-row input { min-width: 0; font-size: 16px; }
  .filter-chip { min-height: 34px; font-size: 12px; }
  .search-results { max-height: 50dvh; }
}

@media (max-width: 380px) {
  .dashboard, .notes-view { padding-right: 13px; padding-left: 13px; }
  .welcome-row { flex-wrap: wrap; }
  .welcome-row h1 { font-size: 26px; }
  .welcome-row .primary-button { margin-left: auto; }
  .dash-aside { display: flex; flex-direction: column; }
  .notes-grid { grid-template-columns: 1fr; }
  .favorite-strip { grid-template-columns: 1fr; }
  .filter-pills { overflow-x: auto; }
  .filter-pill { white-space: nowrap; font-size: 11px; }
}

.mobile-sign-out { display: none; }
@media (max-width: 650px) {
  .mobile-sign-out { display: grid; }
}