/* Phone reading and touch rhythm. Keep animation assets and controllers unchanged. */
@media (max-width: 768px), (pointer: coarse) and (max-width: 1024px) {
  body { --mobile-reading-gutter: max(20px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px)); }

  /* Home reading sections share a clear type scale and consistent edges. */
  .home-page :is(.intro-section, .capabilities, .team-section, .home-route, .about-teaser, .home-insights),
  .site-footer { padding-inline: var(--mobile-reading-gutter); }
  .home-page .intro-section { grid-template-columns: 1fr; padding-top: 52px; padding-bottom: 64px; gap: 30px; }
  .home-page .intro-text .statement { font-size: clamp(30px, 8.3vw, 38px); line-height: 1.5; }
  .home-page .intro-text .body-copy { font-size: 18px; line-height: 1.85; margin-top: 24px; }
  .home-page .intro-text .small-copy { font-size: 16px; line-height: 1.85; margin-top: 20px; }
  .home-page .intro-text .text-link { margin-top: 24px; }
  .home-page .capabilities { padding-top: 64px; padding-bottom: 64px; }
  .home-page .capabilities-heading { display: block; }
  .home-page .capabilities-heading > p:last-child { font-size: 17px; line-height: 1.85; max-width: 28em; margin-top: 28px; }
  .home-page .capability > p:last-child { font-size: 16px; line-height: 1.85; margin-top: 12px; }
  .home-page .capability-title h3 { font-size: 32px; }
  .home-page .capabilities > .text-link { margin-top: 40px; }
  .home-page .team-section { padding-block: 64px; }
  .home-page .team-grid { grid-template-columns: 1fr; gap: 26px; }
  .home-page .team-grid .statement { font-size: clamp(30px, 8.3vw, 38px); line-height: 1.5; }
  .home-page .team-grid .body-copy { font-size: 18px; line-height: 1.85; }
  .home-page .team-grid .small-copy { font-size: 16px; line-height: 1.85; margin-top: 20px; }
  .home-page .team-grid .pill { margin-top: 24px; }
  .home-page .support-list { margin-top: 36px; }
  .home-page .support-list > a { grid-template-columns: minmax(0, 1fr) 24px; gap: 16px; padding-block: 24px; }
  .home-page .support-list h3 { font-size: clamp(21px, 5.5vw, 26px); line-height: 1.6; }
  .home-page .price-note { display: block; margin-top: 24px; }
  .home-page .price-note > span { font-size: 20px; line-height: 1.7; }
  .home-page .price-note :is(small, p) { font-size: 14px; line-height: 1.85; }
  .home-page .price-note p { margin-top: 10px; }
  .home-page .home-route { padding-top: 0; padding-bottom: 64px; }
  .home-page .home-route-top { grid-template-columns: 1fr; gap: 20px; padding-top: 28px; }
  .home-page .home-route h2 { font-size: clamp(27px, 7.3vw, 34px); line-height: 1.6; }
  .home-page .home-route-top > p { font-size: 17px; line-height: 1.85; }
  .home-page .home-route-list { margin-top: 28px; }
  .home-page .home-route-list > a { grid-template-columns: minmax(0, 1fr) 24px; gap: 10px 16px; padding-block: 28px; }
  .home-page .home-route-list .route-label { grid-column: 1; font-size: 12px; }
  .home-page .home-route-list strong { grid-column: 1; font-size: 21px; line-height: 1.6; }
  .home-page .home-route-list .route-description { grid-column: 1; font-size: 16px; line-height: 1.85; }
  .home-page .home-route-list .route-arrow { grid-column: 2; grid-row: 1 / 4; align-self: center; }
  .home-page .home-route-foot { display: grid; gap: 4px; margin-top: 20px; }
  .home-page .home-route-foot a { display: flex; align-items: center; min-height: 48px; padding-block: 10px; font-size: 15px; line-height: 1.7; }
  .home-page .about-teaser { grid-template-columns: 1fr; gap: 30px; padding-top: 0; padding-bottom: 64px; }
  .home-page .about-teaser > div .statement { font-size: clamp(30px, 8.3vw, 38px); line-height: 1.5; }
  .home-page .about-teaser .body-copy { font-size: 18px; line-height: 1.85; margin-top: 20px; }
  .home-page .about-teaser .text-link { margin-top: 24px; }
  .home-page .home-insights { padding-block: 48px 64px; }
  .home-page .section-heading { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 24px; }
  .home-page .section-heading h2 { font-size: 28px; line-height: 1.6; }
  .home-page .home-insights .article-item { gap: 16px; padding-block: 24px; }
  .home-page .home-insights .article-item h3 { font-size: 19px; line-height: 1.75; }
  .home-page .diagnosis-teaser { display: block; margin-top: 28px; }
  .home-page .diagnosis-teaser p { font-size: 16px; line-height: 1.85; }
  .home-page .diagnosis-teaser .text-link { margin-top: 12px; }

  /* The inner page measure stays compact, with comfortable Japanese body copy. */
  .inner-page .body-copy,
  .inner-page .page-intro .body-copy,
  .inner-page .has-assembly .intro-copy > .body-copy,
  .inner-page .split-section .body-copy,
  .inner-page .rich-list,
  .inner-page .details-list dd,
  .inner-page .service-item p:not(.image-caption),
  .inner-page .service-diagram p,
  .inner-page .faq-list .faq-item p,
  .inner-page .next-section .body-copy,
  .inner-page .article-body p,
  .inner-page .article-body li,
  .inner-page [data-diagnosis-form] .body-copy,
  .inner-page [data-diagnosis-result] :is(p, li) { font-size: 17px; line-height: 1.9; letter-spacing: 0; }
  .inner-page .page-intro h1.statement,
  .inner-page .has-assembly .intro-copy h1.statement { font-size: clamp(25px, 6.8vw, 30px); line-height: 1.6; }
  .inner-page .rich-list h3,
  .inner-page .service-item h3,
  .inner-page .split-section > h3 { font-size: 20px; line-height: 1.6; margin-bottom: 10px; }
  .inner-page .article-body h3 { font-size: 21px; line-height: 1.65; }
  .inner-page .article-list .article-item > div h2 { font-size: 22px; line-height: 1.6; }
  .inner-page .article-list .article-item > div p:not(.text-link) { font-size: 16px; line-height: 1.85; }
  .inner-page .article-list .article-item > span.article-meta,
  .inner-page .article-meta { font-size: 13px; line-height: 1.7; }
  .inner-page .details-list dt,
  .inner-page .image-caption,
  .inner-page .service-item .image-caption { font-size: 14px; line-height: 1.8; }
  .inner-page .scope-note { font-size: 15px; line-height: 1.85; }
  .inner-page .breadcrumbs { font-size: 12px; line-height: 1.8; }
  .inner-page .page-toc > p { font-size: 14px; }
  .inner-page .page-toc :is(ol, ul),
  .inner-page .article-body .page-toc li { font-size: 15px; }
  .inner-page .page-toc a { min-height: 48px; }
  .inner-page .faq-list .faq-item summary { font-size: 17px; min-height: 52px; line-height: 1.75; }
  .inner-page .sitemap-group a { font-size: 16px; min-height: 56px; }
  .inner-page .service-route > span:first-child { font-size: 12px; }
  .inner-page .related-pages a span:not([aria-hidden]) { font-size: 15px; }
  .inner-page p.statement small { font-size: .5em; font-weight: 500; letter-spacing: 0; white-space: nowrap; }

  /* Natural flow prevents the two diagram controls colliding on narrow screens. */
  .inner-page .assembly-figure { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 10px; padding-bottom: 0; }
  .inner-page .assembly-stage,
  .inner-page .assembly-figure figcaption { grid-column: 1 / -1; }
  .inner-page .assembly-caption,
  .inner-page .assembly-figure--context .assembly-caption,
  .inner-page .context-photo figcaption { font-size: 15px; line-height: 1.85; }
  .inner-page .assembly-legend { font-size: 14px; line-height: 1.8; gap: 8px 14px; margin-top: 10px; }
  .inner-page .assembly-replay { position: static; justify-self: start; min-height: 48px; font-size: 14px; margin-top: 12px; gap: 8px; }
  .inner-page.inner-motion-enabled .assembly-hint { position: static; align-self: center; justify-self: end; margin-top: 12px; font-size: 13px; line-height: 1.6; }
  .inner-page .assembly-figure--context .context-label { font-size: 32px; }

  /* Shared primary actions and standalone links; inline prose links stay inline. */
  .inner-page .pill,
  .home-page :is(.intro-section, .team-section) .pill,
  .site-footer .pill { width: 100%; min-height: 56px; padding: 16px 20px; gap: 16px; font-size: 16px; line-height: 1.5; }
  .inner-page a.text-link,
  .inner-page button.text-link,
  .inner-page .article-list .article-item > div .text-link,
  .home-page :is(.intro-section, .capabilities, .about-teaser, .home-insights) .text-link { min-height: 48px; font-size: 15px; line-height: 1.7; gap: 20px; padding-block: 10px; }
  .film-control { font-size: 12px; min-height: 44px; padding: 10px 14px; }

  /* Comfortable controls without changing validation or submission behaviour. */
  .inner-page .consultation-section > :is(.contact-panel, .contact-details) { grid-column:auto; grid-row:auto; }
  .inner-page .contact-panel { padding:22px 18px; scroll-margin-top:92px; }
  .inner-page .split-section .contact-panel > h2 { font-size:clamp(22px,6vw,26px); line-height:1.5; }
  .inner-page .contact-panel-intro { font-size:16px; line-height:1.8; margin:12px 0 26px; }
  .contact-panel [data-contact-form] .field-row { grid-template-columns:minmax(0,1fr); gap:0; }
  .contact-panel [data-contact-form] .field { margin-bottom:24px; }
  .contact-panel [data-contact-form] .field textarea { min-height:200px; }
  .contact-panel [data-contact-form] .field :is(input:not([type=checkbox]):not([type=radio]),select,textarea) { padding-inline:12px; }
  .inner-page .contact-panel .form-confirm h2 { font-size:22px; }
  .inner-page .contact-panel .form-confirm .pill { white-space:normal; text-align:left; }
  .inner-page .field > label,
  .inner-page .contact-form fieldset label { font-size: 16px; line-height: 1.8; }
  .inner-page .field label small { font-size: 13px; }
  .inner-page .field input:not([type=checkbox]):not([type=radio]),
  .inner-page .field select { font-size: 17px; min-height: 56px; padding-block: 14px; }
  .inner-page .field textarea { font-size: 17px; min-height: 180px; line-height: 1.8; }
  .inner-page .field label:has(input[type=checkbox]) { font-size: 15px; min-height: 52px; }
  .inner-page [data-diagnosis-form] .field label { font-size: 16px; min-height: 56px; }
  .inner-page [data-diagnosis-result] h3 { font-size: 21px; line-height: 1.65; margin-bottom: 10px; }
  .inner-page [data-diagnosis-result] > .pill { display: flex; margin-top: 24px; }
  .inner-page [data-diagnosis-result] > .text-link { display: flex; margin-top: 16px; }

  /* Consistent navigation on home and inner pages. */
  .site-header .menu-toggle { font-size: 13px; min-width: 64px; min-height: 44px; }
  .site-menu,
  .inner-page .site-menu { width: calc(100vw - 2 * var(--mobile-reading-gutter)); max-width: 520px; padding: 20px; }
  .site-menu .menu-group { grid-template-columns: 1fr; margin-bottom: 16px; }
  .site-menu a,
  .inner-page .site-menu a { font-size: 16px; min-height: 52px; line-height: 1.7; padding-block: 12px; }
  .site-footer,
  .inner-page .site-footer { padding-top: 48px; }
  .site-footer .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .site-footer .footer-top h2 { font-size: clamp(29px, 8vw, 36px); line-height: 1.55; }
  .site-footer .footer-top .footer-signoff h2 { font-size: 30px; line-height: 1.5; }
  .site-footer .footer-top .pill { margin-top: 24px; min-width: 0; }
  .site-footer .footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; padding-top: 0; }
  .site-footer .footer-nav a { display: block; font-size: 14px; min-height: 52px; line-height: 1.7; padding-block: 14px; }
  .site-footer .footer-nav .footer-link-phrase { white-space: nowrap; }
  .site-footer .footer-word { font-size: calc((100vw - 2 * var(--mobile-reading-gutter)) * .215); margin: 40px 0 28px; }
  .site-footer .footer-bottom { flex-wrap: wrap; gap: 8px 12px; padding-top: 12px; font-size: 10px; }
  .site-footer .footer-bottom > a { display: inline-flex; align-items: center; min-height: 44px; margin-left: auto; font-size: 12px; }
}

/* Keep the larger touch hint below replay when both no longer fit on one row. */
@media (max-width: 360px) {
  .inner-page .assembly-replay,
  .inner-page.inner-motion-enabled .assembly-hint { grid-column: 1 / -1; }
  .inner-page.inner-motion-enabled .assembly-hint { justify-self: start; margin-top: 0; }
}

/* At phone widths, images need a full reading column rather than miniature pairs. */
@media (max-width: 600px) {
  .home-page .capabilities-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; margin-top: 36px; }
  .home-page .capability { margin-top: 0; }
  .home-page .capability-make { width: calc(100% - 24px); margin: 0 0 0 auto; }
  .home-page .capability-move { width: 100%; max-width: none; grid-column: auto; margin-top: 0; }
}

/* Enlarge only the hero's small UI. Leave the word, stage and scroll distances intact. */
@media (max-width: 767px), (pointer: coarse) and (max-width: 1024px) {
  .mobile-hero-controls { grid-template-columns: minmax(112px, .85fr) minmax(0, 1.4fr); gap: 12px; }
  .mobile-material-button { min-height: 52px; font-size: 14px; gap: 6px; }
  .mobile-material-button > span { font-size: 18px; }
  .mobile-hero-consultation { min-height: 52px; padding-inline: 12px; gap: 8px; font-size: 14px; }
  .mobile-hero-journey .hero[data-hero-mode="nano"] .nano-finish { font-size: 12px; }
  .mobile-hero-hint { font-size: 12px; line-height: 1.6; }
  .mobile-hero-meta > a { font-size: 11px; }
}
@media (max-width: 767px) and (max-height: 520px) and (orientation: landscape),
       (pointer: coarse) and (max-width: 1024px) and (max-height: 520px) and (orientation: landscape) {
  .mobile-hero-controls { grid-template-columns: minmax(112px, 160px) minmax(160px, 210px); gap: 20px; }
}

/* Keep both header actions readable and distinct at phone widths. */
@media (max-width: 768px), (pointer: coarse) and (max-width: 1024px) {
  body .site-header .header-tools,
  body.home-page:has(.hero:is([data-hero-mode="laser"],[data-hero-mode="nano"])):not(.is-past-hero) .header-tools,
  body.home-page.ui-polish-enabled.is-reading:has(.hero[data-hero-mode="nano"]) .header-tools { gap: 6px; }
  .site-header .header-tools :is(.motion-toggle, .menu-toggle) { min-height: 44px; padding: 9px 9px; gap: 5px; font-size: 12px; }
  .site-header .header-tools .menu-toggle { min-width: 86px; }
  .site-header .header-tools .motion-label,
  body.home-page:has(.mobile-hero-journey > .hero[data-hero-mode="nano"]) .site-header .motion-label { display: inline; font: inherit; }
  .site-header .header-tools .motion-toggle > span:first-child { width: 10px; font-size: 12px; }
  .site-header .header-tools .menu-icon,
  .site-header .header-tools .menu-icon::before,
  .site-header .header-tools .menu-icon::after { width: 12px; }
  .home-page .home-insights .diagnosis-teaser { grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 32px; padding: 26px 20px; }
  .home-page .diagnosis-teaser .diagnosis-kicker { font-size: 14px; }
  .home-page .diagnosis-teaser h3 { font-size: 24px; line-height: 1.55; }
  .home-page .diagnosis-teaser-copy > p:last-child { font-size: 16px; line-height: 1.85; }
  .home-page .diagnosis-teaser .diagnosis-start { display: flex; width: 100%; min-width: 0; min-height: 58px; padding: 16px 18px; gap: 12px; font-size: 15px; }
  .home-page .diagnosis-teaser .diagnosis-teaser-note { font-size: 12px; margin-top: 12px; }
}
@media (max-width: 380px) {
  body.inner-page .site-header .site-brand.site-brand--official,
  body .site-header .site-brand.site-brand--official,
  body.home-page:has(.mobile-hero-journey > .hero[data-hero-mode="nano"]) .site-brand.site-brand--official { --brand-width: 108px; }
}
@media (max-width: 340px) {
  body.inner-page .site-header .site-brand.site-brand--official,
  body .site-header .site-brand.site-brand--official,
  body.home-page:has(.mobile-hero-journey > .hero[data-hero-mode="nano"]) .site-brand.site-brand--official { --brand-width: 88px; }
  .site-header .header-tools :is(.motion-toggle, .menu-toggle) { font-size: 11px; padding-inline: 8px; }
  .site-header .header-tools .menu-toggle { min-width: 80px; }
}
