/* ============================================================
   桌面端布局定稿 · Linear 密度
   只改画布、页头、间距、行高；不动组件外观，不加手机断点。
   正文阅读宽度单独保持宽松（Stripe Docs 的每行宽度）。
   ============================================================ */

@media (min-width:761px){
  /* ===== 1. 画布 ===== */
  .main-content{max-width:1440px;padding:24px}
  .shell-footer{max-width:1440px;padding:0 24px 24px}

  /* ===== 2. 页头统一为 64 高、24px 标题 ===== */
  .knowledge-heading,
  .practice-overview-heading,
  .practice-setup-heading,
  .practice-session-heading,
  .mistakes-heading-v2,
  .favorites-heading-v2,
  .statistics-heading-v2{
    display:flex;
    min-height:64px;
    margin-bottom:20px;
    gap:20px;
    align-items:flex-start;
    justify-content:space-between;
  }
  .knowledge-heading h1,
  .practice-overview-heading h1,
  .practice-setup-heading h1,
  .practice-session-heading h1,
  .mistakes-heading-v2 h1,
  .favorites-heading-v2 h1,
  .statistics-heading-v2 h1{
    font:600 24px/1.3 var(--serif);
    margin:0;
  }
  .knowledge-heading>div>p,
  .practice-session-heading>div>p:last-child,
  .mistakes-heading-v2>div:first-child p,
  .favorites-heading-v2>div:first-child p,
  .statistics-heading-v2>div:first-child p{
    font-size:13px;
    margin:6px 0 0;
  }

  /* ===== 3. 卡片与区块间距 ===== */
  .card,.panel,.chapter-practice-section,.custom-exam-card{padding:20px}
  .stat-card{padding:18px}
  .dashboard-fit{gap:16px}
  .summary-grid{gap:12px}
  .summary-grid .exam-card,
  .summary-grid .metric-card{height:104px}
  .summary-grid .exam-card{padding:18px 20px}
  .summary-grid .exam-count strong{font-size:34px}
  .summary-grid .metric-card{padding:16px 18px}
  .metric-card>strong{font-size:27px}
  .dashboard-body{gap:20px;min-height:380px}
  .dashboard-body .panel{padding:20px}
  .dashboard-body .chart-box{min-height:280px}

  /* 首页从顶部开始，把高度让给图表，而不是上下居中留空 */
  @media (min-height:820px){
    .dashboard-fit{min-height:calc(100dvh - 112px);justify-content:flex-start}
  }
  .dashboard-body{flex:1 1 auto}
  .dashboard-body .chart-box{flex:1;min-height:280px}
  .dashboard-body .study-trend{height:100%}
  /* 复习面板拉高后，把规则说明压到底部，空出来的地方才是“留白”而不是“没做完” */
  .dashboard-body .review-panel{display:flex;flex-direction:column}
  .dashboard-body .review-panel .review-rule{margin-top:auto}
  .grid-4{gap:14px}

  /* ===== 4. 列表与表格行高 ===== */
  .chapter-row{height:44px}
  .section-row{height:32px}
  .review-panel .review-item{min-height:52px;padding:10px 12px}
  .collection-row-v2{min-height:52px}
  .chapter-stat-row-v2{min-height:44px}
  .chapter-table-head-v2{height:30px}
  .mistake-card-v2{min-height:128px;padding:14px 0}
  .favorite-item-v2{min-height:112px;padding:14px 0}
  .chapter-practice-row{min-height:72px;padding:14px 2px}
  .practice-overview-stats>div{min-height:96px;padding:16px}
  .mistake-list-v2{padding:0 14px 2px}
  .favorite-list-v2{padding:0 14px 2px}

  /* ===== 5. 按钮与控件 ===== */
  .btn{min-height:36px;padding:0 16px}
  .btn-sm{min-height:30px;padding:0 12px}
  .primary-button,.secondary-button{height:36px;padding:0 16px}
  .learned-button,.secondary-button.compact{height:34px}
  .practice-mode-card{min-height:380px;padding:20px}

  /* ===== 6. 阅读区：行高紧凑，正文仍然限宽 ===== */
  .article-body{max-width:720px}
  .reader-grid{padding:24px 28px 32px}
  .article-title h2,.k-sec-title{font-size:24px}
  .md-body{font-size:15px;line-height:1.85}

  /* ===== 7. 侧栏导航 ===== */
  .main-nav{padding:16px 0 8px}
  .nav-group{margin-bottom:18px}
  .sidebar .nav-item{height:34px}

  /* ===== 8. 统计页 ===== */
  .stat-cards-v2{gap:14px;margin-bottom:20px}
  .stat-card-v2{min-height:100px;padding:18px}
  .statistics-grid-v2{gap:20px;margin-bottom:20px}
  .trend-card-v2,.accuracy-card-v2,.chapter-performance-v2{padding:20px}
}
