/* moundAI — Responsive & desktop adaptive layout */
  /* ===== RESPONSIVE TWEAKS ===== */
  @media (max-width: 400px) {
    .grade-btn { width: 44px; height: 44px; font-size: 18px; }
    .pitch-num-value { font-size: 48px; }
  }

  /* ===== BASE DESKTOP CLASSES (mobile: passthrough) ===== */
  .desktop-layout { display: block; }
  .desktop-sidebar { display: none; }
  .desktop-main { padding: 0; }
  .workout-desktop-grid { display: block; }
  .charts-desktop-grid { display: block; }
  .desktop-hide { display: flex; } /* hamburger visible on mobile */

  /* ===== DESKTOP ADAPTIVE LAYOUT (768px+) ===== */
  @media (min-width: 768px) {

    /* Body becomes scrollable on desktop */
    html, body { overflow: auto; height: auto; }

    /* App becomes a centered card */
    #app {
      min-height: 100vh;
      height: auto;
      max-width: 1100px;
      margin: 0 auto;
      box-shadow: 0 0 60px rgba(0,0,0,0.5);
      border-left: 1px solid var(--border);
      border-right: 1px solid var(--border);
    }

    /* Pages scroll naturally */
    .page { height: auto; min-height: 100vh; overflow: visible; }
    .page-content { overflow: visible; height: auto; padding: 24px 32px; }

    /* Title bar bigger on desktop */
    .title-bar { height: 60px; padding: 0 24px; }
    .title-bar-title { font-size: 15px; }

    /* Side menu: always visible on desktop */
    .desktop-layout {
      display: flex;
      flex-direction: row;
      min-height: calc(100vh - 60px);
    }
    .desktop-sidebar {
      display: flex;
      width: 220px;
      flex-shrink: 0;
      background: var(--bg2);
      border-right: 1px solid var(--border);
      flex-direction: column;
      padding-top: 8px;
      position: sticky;
      top: 0;
      height: 100vh;
    }
    .desktop-main {
      flex: 1;
      min-width: 0;
      overflow: visible;
      padding: 24px 32px;
      background: var(--bg);
    }

    /* page-content on non-home pages gets extra padding */
    .page-content { overflow: visible; height: auto; padding: 24px 32px; }

    /* Hide hamburger on desktop since sidebar is always visible */
    .desktop-hide { display: none !important; }

    /* Tiles grid: more columns on desktop */
    .tiles-grid {
      grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
      gap: 16px;
    }

    /* Workout page: side-by-side layout */
    .workout-desktop-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 32px;
      align-items: start;
    }

    /* Strike zone bigger on desktop */
    .strike-zone-wrap { max-width: 440px; }

    /* Grade buttons bigger */
    .grade-btn { width: 60px; height: 60px; font-size: 26px; }

    /* Charts side by side on pitcher page */
    .charts-desktop-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 20px;
    }
    .charts-desktop-grid > div:only-child {
      grid-column: 1 / -1;
    }

    /* Heatmap zones bigger */
    #heatmap-wrap .strike-zone-wrap { max-width: none; }

    /* Dialogs bigger on desktop */
    .dialog-box { max-width: 420px; padding: 32px; }

    /* Forms wider */
    .form-row { grid-template-columns: 1fr 1fr; gap: 16px; }

    /* Pitch number larger */
    .pitch-num-value { font-size: 80px; }

    /* Workouts table shows more rows */
    .workouts-table-wrap { max-height: 320px; }

    /* Summary grid 4 columns on desktop */
    .summary-grid { grid-template-columns: 1fr 1fr 1fr 1fr; }

  }

  @media (min-width: 1024px) {
    #app { max-width: 1200px; }
    .desktop-sidebar { width: 240px; }
    .tiles-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  }
  .scanlines {
    pointer-events: none;
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(
      to bottom,
      transparent 0px,
      transparent 3px,
      rgba(0,0,0,0.03) 3px,
      rgba(0,0,0,0.03) 4px
    );
    z-index: 9999; opacity: 0.5;
  }
  .light-mode .scanlines { display: none; }

