
@media (max-width: 599px) {
  #body_wrap.codex-harimap-v4 .p-toc__list.is-style-index > li,
  #body_wrap.codex-harimap-v4 .p-toc__list.is-style-index .p-toc__childList > li {
    column-gap: .5em;
    display: grid;
    margin-left: 0;
    padding-left: 0;
    position: relative;
  }

  #body_wrap.codex-harimap-v4 .p-toc__list.is-style-index > li {
    grid-template-columns: 2.5ch minmax(0, 1fr);
    padding-left: .5rem;
  }

  #body_wrap.codex-harimap-v4 .p-toc__list.is-style-index .p-toc__childList > li {
    grid-template-columns: 4ch minmax(0, 1fr);
  }

  #body_wrap.codex-harimap-v4 .p-toc__list.is-style-index > li::before,
  #body_wrap.codex-harimap-v4 .p-toc__list.is-style-index .p-toc__childList > li::before {
    align-self: center;
    grid-column: 1;
    grid-row: 1;
    justify-self: end;
    position: static;
    right: auto;
    top: auto;
    transform: scale(.95);
    transform-origin: center;
  }

  #body_wrap.codex-harimap-v4 .p-toc__list.is-style-index li > .p-toc__link {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    width: 100%;
  }

  #body_wrap.codex-harimap-v4 .p-toc__list.is-style-index li > .p-toc__childList {
    grid-column: 2;
    grid-row: 2;
    margin: .1rem 0 .25rem;
    padding-left: 0;
    width: 100%;
  }
}


#body_wrap.codex-harimap-v4.single #content .p-articleHead.c-postTitle > .c-postTitle__ttl {
  box-sizing: border-box;
  width: 100%;
  max-width: min(100%, var(--hm-v5-text-measure, 46rem)) !important;
  min-width: 0;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  text-wrap: balance;
}


/* Readability floor 2026-10-07: legible small UI text and 32px minimum tap rows. */
@media (max-width: 959px) {
  body .p-breadcrumb__text, body .p-breadcrumb__text span { font-size: 12px !important; }
  body .p-articleMetas .c-categoryList__link { font-size: 12px !important; }
  body .p-pnLinks__title { font-size: 13px !important; line-height: 1.5 !important; }
  body .l-footer__nav a { font-size: 13px !important; }
}
body .reader-nav--footer li > a,
body .reader-nav--sidebar li > a,
body .l-footer__nav a { display: inline-flex !important; align-items: center; min-height: 32px; }

body .hm-hg-note, body .hm-hg-note a, body .hm-hg-lead, body .hm-hg-volume,
body .hm-footer-pr__caption, body .footer-area-map__source,
body .footer-area-map__panel h3 span { font-size: 12px !important; }


/* Top page legibility (excludes native-owned calendar and time-dependent cards). */
body .hm-hero .hm-eyebrow, body .hm-head .hm-eyebrow, body .hm-quick > span,
body .hm-guide-label { font-size: 12px !important; }
body .hm-guide-body > em, body .hm-guide-body > b,
body .hm-footer-pr__section-note, body .hm-footer-pr__intro-cta { font-size: 12.5px !important; }


/* Japanese headings: break lines between phrases (Chrome/Edge auto-phrase), not mid-word.
   Tripled #body_wrap so existing site design rules with !important do not cancel it. */
html #body_wrap#body_wrap#body_wrap :is(h1, .c-postTitle__ttl, .post_content h2, .post_content h3, .post_content h4,
  .p-postList__title, .p-pnLinks__title, .p-blogCard__title, .p-toc__list a, .c-widget__title, .l-articleBottom__title) {
  word-break: auto-phrase !important;
  overflow-wrap: break-word !important;
}
body .hm-basic-calendar-cta__sub { font-size: 12px !important; }


/* Undo phrase breaks on 2-line clamped list titles: they would hide more of the title. */
html #body_wrap#body_wrap#body_wrap#body_wrap .p-postList__title { word-break: normal !important; overflow-wrap: anywhere !important; }


/* Desktop: 12px breadcrumb/category labels; larger invisible hit area for header icon links (no layout change). */
@media (min-width: 960px) {
  body .p-breadcrumb__text, body .p-breadcrumb__text span, body .p-articleMetas .c-categoryList__link { font-size: 12px !important; }
}
body .c-iconList__link { position: relative; z-index: 2; }
body .c-iconList__link::after { content: ""; position: absolute; inset: -8px -6px; }
body .codex-preferred-source-widget p a { display: inline-block; padding: 5px 0; }


/* Sidebar PR block: stack heading above the buttons so the heading is not squeezed to ~1 char per line (seen at 800-1024px). */
body #sidebar .hm-footer-pr__head { flex-direction: column !important; align-items: stretch !important; gap: 10px; }
body #sidebar .hm-footer-pr__head > * { width: auto !important; max-width: none !important; flex: 0 0 auto !important; }


/* Reading-text floor 2026-10-09: captions, notes and mobile table text inside articles at 14px or more (raises only; body paragraphs are already 16px+). */
body .post_content figcaption, body .post_content figcaption a, body .post_content p small,
body .post_content p[style*="font-size:12px"], body .post_content p[style*="font-size:13px"],
body .post_content .codex-mobile-table-caption, body .post_content .codex-mobile-table-scroll-caption { font-size: 14px !important; line-height: 1.6; }
@media (max-width: 959px) {
  body .post_content .codex-mobile-table-cell-value, body .post_content .codex-mobile-table-wrap th, body .post_content .codex-mobile-table-wrap td { font-size: 14px !important; }
}
/* Harimap: hub body text 16px on mobile, hub notes and home lead readable. */
body .post_content .hm-hub-section > p { font-size: 16px !important; }
body .post_content .hm-hub-row-note { font-size: 14px !important; }
body .post_content p.hm-lead { font-size: 15px !important; }
body .post_content .hm-head > p.hm-sub { font-size: 14px !important; }
