/* Mobile-only overrides. The shared report stylesheet is linked directly by each page. */
@media (max-width: 760px) {
  html, body { max-width: 100%; overflow-x: clip; }
  #app, .report-screen, .report-shell,
  .report-shell > *, .report-section, .summary-grid, .pathway-grid,
  .report-hero, .tree-layout, .tree-section, .soul-section,
  .leadership-tree, .tree-legend, .rhythm-results, .context-areas {
    min-width: 0 !important;
    max-width: 100% !important;
  }
  .report-screen {
    width: 100% !important;
    padding-top: 20px;
    padding-bottom: 40px;
    overflow-x: clip;
  }
  .report-shell {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    margin: 0 auto !important;
    gap: 16px;
  }
  .report-shell > * {
    width: 100% !important;
    grid-column: 1 / -1 !important;
  }
  .report-hero,
  .summary-grid,
  .pathway-grid,
  .rhythm-results,
  .tree-layout,
  .soul-section .summary-grid,
  .context-areas {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .report-hero {
    gap: 24px;
    padding: 28px 20px;
    border-radius: var(--radius-lg);
  }
  .report-hero > div,
  .section-intro,
  .summary-card,
  .rhythm-card,
  .context-row,
  .pathway-step > * { min-width: 0; }
  
  .report-hero h1 {
    margin-top: 10px;
    font-size: clamp(34px, 10vw, 48px);
    line-height: 1;
    overflow-wrap: anywhere;
  }
  .report-hero p { font-size: 15px; line-height: 1.58; }
  .score-block { width: 104px; height: 104px; justify-self: start; }
  .score-block strong { font-size: 36px; }
  .summary-grid, .pathway-grid { gap: 14px; }
  .summary-card, .report-section { padding: 22px 18px; border-radius: var(--radius-lg); }
  .summary-card h2, .report-section h2 {
    margin-top: 8px;
    font-size: clamp(26px, 8vw, 34px);
    overflow-wrap: anywhere;
  }
  .summary-heading, .context-heading { gap: 10px; }
  .summary-heading span { align-self: flex-start; }
  .section-intro { margin-bottom: 20px; }
  .section-intro p:last-child, .summary-card p, .report-section > p,
  .rhythm-card p, .pathway-step p, .insight-item p { font-size: 14px; line-height: 1.58; }
  .leadership-tree {
    width: 100% !important;
    min-height: 420px;
    padding-left: 0;
    padding-right: 0;
    overflow: hidden;
  }
  .tree-canopy, .tree-branches, .tree-roots { max-width: calc(100vw - 72px); }
  .tree-soil { max-width: 100%; }
  .tree-legend-row { grid-template-columns: minmax(72px, 90px) minmax(0, 1fr) !important; }
  .tree-legend-row em { grid-column: 2; white-space: normal; overflow-wrap: anywhere; }
  .work-tree-conditions { grid-template-columns: minmax(0, 1fr) !important; }
  .rhythm-results { gap: 12px; }
  .rhythm-card { padding: 18px 16px; border-radius: var(--radius-md); }
  .rhythm-card-head { gap: 12px; }
  .rhythm-card h3 { font-size: 23px; line-height: 1.08; overflow-wrap: anywhere; }
  .rhythm-score { flex-shrink: 0; font-size: 27px; }
  .rhythm-bar { margin: 14px 0; }
  .layer-scores { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-bottom: 14px; }
  .layer-scores span { min-width: 0; padding: 9px 6px; font-size: 10px; }
  .layer-scores strong { font-size: 15px; }
  .pathway-step { grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 14px 0; }
  .pathway-step > span { width: 28px; height: 28px; }
  .pathway-step strong { display: block; font-size: 18px; line-height: 1.2; overflow-wrap: anywhere; }
  .insight-list { gap: 10px; }
  .insight-item { padding: 15px 14px; }
  .context-heading > strong { font-size: 24px; }
  .context-areas { gap: 8px; margin-top: 16px; }
  .context-row { align-items: center; padding: 13px 12px; }
  .report-actions { margin-top: 8px; padding-bottom: env(safe-area-inset-bottom); }
  .report-actions > * { min-height: 50px; }
  #reportMessage { margin-top: 10px; text-align: center; }
}
@media (max-width: 390px) {
  .report-screen { padding-left: 14px; padding-right: 14px; }
  .report-hero, .summary-card, .report-section { padding-left: 16px; padding-right: 16px; }
  .tree-canopy, .tree-branches, .tree-roots { max-width: calc(100vw - 60px); }
}
