/* Screen reading only. The original guide styles remain the print source. */
@media screen {
  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body {
    font-size: 16px;
    line-height: 1.6;
  }

  .page {
    width: min(100%, 816px);
    height: auto;
    min-height: 0;
    overflow: visible;
    margin: 24px auto;
    padding: clamp(24px, 7vw, 72px) clamp(20px, 7vw, 80px);
    break-after: auto;
    page-break-after: auto;
  }

  .page *, .page *::before, .page *::after {
    box-sizing: border-box;
    min-width: 0;
  }

  .page p, .page li, .page.chapter .practice p {
    font-size: 16px !important;
    line-height: 1.6 !important;
  }

  .page h1 { font-size: clamp(36px, 7vw, 64px); line-height: 1.08; }
  .page h2 { font-size: clamp(28px, 5vw, 40px); line-height: 1.15; }
  .page h3 { font-size: 23px !important; line-height: 1.25; }
  .page h4 { font-size: 19px; line-height: 1.3; }
  .page p.lede { font-size: 21px !important; line-height: 1.45 !important; }

  .page :is(.desc, .reader-row .t, .reader-row .w, .score-row .q,
      .derive .a, .derive .b, .band .d, .day-grid .t, .day-grid .n,
      .vol-title, .path-row, .compare .col, .face-card .fix) {
    font-size: 16px;
    line-height: 1.5;
  }

  .page :is(.meta, .eyebrow, .running, .label, .tag, .toc-num,
      .toc-page, .part-tag, .vol-num, .vol-form, .vol-status,
      .series-mark, .day-grid .d, .beat-row .b, .derive-head) {
    font-size: 11px;
    line-height: 1.6;
    letter-spacing: 0.08em;
  }

  .page :is(.toc-title, .part-name) { font-size: 18px; line-height: 1.4; }
  .page :is(.toc-title .sub, .vol-title .sub) {
    font-size: 14px;
    line-height: 1.5;
    margin-top: 5px;
  }

  .page :is(.code-box, .prompt .body, .script-box .body, pre, code) {
    font-size: 14px !important;
    line-height: 1.65;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .page :is(p, li, h1, h2, h3, h4, .cover-title, .toc-title,
      .running, .vol-title, .vol-status, .day-grid, .beat-row) {
    overflow-wrap: anywhere;
  }

  .page :is(.two-col, .three-col, .face-grid, .compare) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
  }

  .page .three-col { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .page .ref-card { height: auto; }
  .page .diagram { max-height: none !important; }
  .page img, .page svg { max-width: 100%; }
  .page .diagram svg { height: auto; }
  .page .running {
    position: static;
    flex-wrap: wrap;
    gap: 6px 16px;
  }
  .page .running.top { margin-bottom: 24px; }
  .page:not(.cover) .running.bot { margin-top: 28px; }
  .page:not(.cover) .practice { margin-top: 24px; }
  .page .ch-opener { grid-template-columns: 80px minmax(0, 1fr); gap: 18px; }
  .page .ch-big { font-size: 80px; line-height: 1; }
  .page .toc-row { grid-template-columns: 24px minmax(0, 1fr) auto; padding: 12px 0; }
  .page .day-grid { grid-template-columns: 58px minmax(0, 1fr) minmax(0, 1fr); padding: 12px 0; }
  .page .beat-row { grid-template-columns: 76px minmax(0, 1fr); padding: 12px 0; }

  .page.cover { padding: 0; }
  .page .cover-inner {
    height: auto;
    padding: clamp(28px, 7vw, 80px) clamp(20px, 7vw, 80px);
    gap: 40px;
  }
  .page .cover-title {
    font-size: clamp(42px, 9vw, 88px) !important;
    line-height: 1.02;
  }
  .page .cover-art { overflow: hidden; }
  .page .cover-inner > :last-child { flex-wrap: wrap; gap: 20px; }
  .page footer { flex-wrap: wrap; gap: 20px; }
  .page :is(.series-mark, .twinmark) { flex-wrap: wrap; }
  .page [style*="width: 2in"] { max-width: 100%; }

  .page table {
    width: 100%;
    table-layout: fixed;
    font-size: 14px !important;
    overflow-wrap: anywhere;
  }
  .page :is(td, th) { padding: 10px 6px; line-height: 1.5; }
  .page td, .page .tool-table .price { font-size: 14px !important; }
  .page th { font-size: 12px !important; letter-spacing: 0.04em; }

  @media (max-width: 700px) {
    .page { margin: 0 auto 16px; box-shadow: none; }
    .page :is(.two-col, .three-col, .face-grid, .compare, .stat-row,
        .write-row, .derive, .derive-head),
    .page [style*="grid-template-columns"] {
      grid-template-columns: minmax(0, 1fr) !important;
    }
    .page .ch-opener { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .page .ch-big { font-size: 64px; }
    .page .day-grid { grid-template-columns: 58px minmax(0, 1fr); gap: 6px 12px; }
    .page .day-grid .n { grid-column: 2; }
    .page .vol-row { grid-template-columns: 48px minmax(0, 1fr); padding: 14px 0; }
    .page .vol-form, .page .vol-status { grid-column: 2; }
    .page .vol-title { font-size: 19px; }
    .page .part-divider, .page .track-head { flex-wrap: wrap; gap: 6px 12px; }
    .page .ref-card { padding: 18px; }
    .page .cover-inner { gap: 32px; }
    .page .cover-inner > footer { flex-direction: column; align-items: flex-start !important; }
    .page .cover-inner > footer > div { text-align: left !important; }
    .page [style*="display: flex"] { flex-wrap: wrap; }
  }
}
