/* Screen typography is scoped to Astro Beast; printed sheets keep their layout. */
@media screen {
  :root { --astro-prose:16px; --astro-small:14px; --astro-heading:20px; --astro-chart:650px; }
  :root[data-astro-text="large"] { --astro-prose:18px; --astro-small:16px; --astro-heading:22px; --astro-chart:740px; }
  :root[data-astro-text="largest"] { --astro-prose:20px; --astro-small:18px; --astro-heading:24px; --astro-chart:830px; }
  .astro-container { min-width:0; font-size:var(--astro-prose) !important; }
  .astro-container :is(p,li,label,td,th,.split-desc,.card-role,.jargon-body) { font-size:var(--astro-prose) !important; line-height:1.65 !important; overflow-wrap:anywhere; }
  .astro-container :is(div,span,strong,small)[style*="font-size"], .astro-container :is(.badge,.tag,.card-kicker) { font-size:var(--astro-small) !important; line-height:1.55 !important; overflow-wrap:anywhere; }
  .astro-container :is(h2,h3,h4,.card-title) { font-size:var(--astro-heading) !important; line-height:1.4 !important; overflow-wrap:anywhere; }
  .astro-container :is(button,input,select,.mode-tab,.family-pill) { font-size:var(--astro-small) !important; min-height:44px; }
  .astro-container :is(input,select) { max-width:100%; box-sizing:border-box; }
  .astro-container :is(.synthesis-grid,.cheat-grid,.split-grid,.form-grid) > * { min-width:0; }
  .astro-text-controls { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:12px; margin:0 0 16px; border:1px solid #b7cfc5; border-radius:12px; background:#f5faf6; }
  .astro-text-controls button { padding:8px 16px; border:1px solid #164b39; border-radius:8px; color:#164b39; background:white; cursor:pointer; }
  .astro-text-controls button[aria-pressed="true"] { background:#164b39; color:white; }
  .astro-evidence { margin:10px 0 4px; padding:5px 10px; background:rgba(238,245,241,0.55); color:#3e5d51; border-left:2px solid #82bba4; border-radius:4px; overflow-wrap:anywhere; font-size:11px !important; line-height:1.45 !important; }
  .guidance-badge { display:inline-block; font-size:11px !important; font-weight:700; color:#173c30; margin-right:6px; }
  .rule-input { display:inline; font-size:11px !important; color:#496559; line-height:1.45; }
  #kundli-container { max-width:100%; overflow-x:auto; overscroll-behavior-inline:contain; }
  #kundli-container .kundli-svg { width:var(--astro-chart) !important; min-width:var(--astro-chart); max-width:none !important; display:block; }
  .chart-text-table { width:100%; border-collapse:collapse; margin-top:12px; }
  .chart-text-table th,.chart-text-table td { padding:9px 6px; text-align:left; border-bottom:1px solid #bdd0c5; }
  .chart-scroll-note { color:#173c30; }
  .astro-table-scroll { overflow-x:auto; max-width:100%; }
  .dasha-table { min-width:600px; }
  .family-pill { gap:8px; }
  .family-pill-del { display:inline-flex; min-width:44px; min-height:44px; align-items:center; justify-content:center; }
  #deeksha-habits-legend, #deeksha-habits-legend strong, #deeksha-habits-legend span { font-size:var(--astro-prose) !important; }
  .astro-container .deeksha-bubble { min-width:44px; width:44px !important; height:44px !important; min-height:44px; font-size:var(--astro-small) !important; padding:0; flex-shrink:0; cursor:pointer; }
  .deeksha-row { flex-wrap:wrap; gap:6px; }
  .deeksha-bubbles-group { flex-wrap:wrap; }
  .chart-text-table button { border:1px solid #164b39; color:#164b39; background:white; border-radius:5px; padding:6px; }
  @media (max-width:640px) {
    .astro-container { padding:16px 12px 60px !important; }
    .astro-container :is(.split-body,.synthesis-grid,.cheat-grid,.form-grid) { grid-template-columns:minmax(0,1fr) !important; }
    .astro-container .chart-section-box { padding:14px; }
    .astro-container .split-card-header > div { flex-wrap:wrap; gap:8px; }
    .astro-container .deeksha-col { min-width:0; }
    .astro-container .deeksha-omr-grid-wrap, #deeksha-habits-legend > div { grid-template-columns:minmax(0,1fr) !important; }
    #group-coords input,#group-coords select { height:46px !important; font-size:var(--astro-prose) !important; }
  }
}
@media print { .astro-text-controls { display:none !important; } .chart-text-table { width:100%; font-size:9pt; } }
