/* Screen-only reading sizes. rem follows the reader's browser font preference.
   Main text: 16 -> 19px; small labels have a 16px floor at the default root.
   The existing page-specific !important rules require scoped overrides here. */
@media screen {
  body[data-design="cool"] { font-size:1.1875rem; }
  body[data-design="cool"] :is(main,.oh-bar,.oh-menu,.oh-header-tools,.cool-closing,.fgo-managed-footer) { min-width:0; }
  body[data-design="cool"] :is(p,li,dd,a,button,summary,label,small) { overflow-wrap:anywhere; }
  body[data-design="cool"] :is(.oh-menu,.oh-menu a,.oh-menu-more summary,.oh-menu-drawer a,.oh-search__input,.oh-search__button,.oh-motion-toggle,.oh-site-description,.cool-page-intro small,.cool-page-intro p) {
    font-size:1rem!important; line-height:1.7;
  }
  body[data-design="cool"] .oh-bar { grid-template-columns:minmax(0,auto) minmax(0,1fr); }
  body[data-design="cool"] .oh-menu { flex-wrap:wrap!important; gap:8px 18px!important; }
  body[data-design="cool"] .oh-menu a,
  body[data-design="cool"] .oh-menu-more summary { min-height:44px; white-space:normal; }
  body[data-design="cool"] .oh-menu-more { position:static; }
  body[data-design="cool"] .oh-menu-drawer { right:16px; left:auto; width:min(560px,calc(100% - 32px)); top:auto; margin-top:8px; grid-template-columns:repeat(2,minmax(0,1fr)); }
  body[data-design="cool"] .oh-header-tools { flex-wrap:wrap; }
  body[data-design="cool"] .oh-brand-name small { font-size:.875rem; letter-spacing:.12em; }
  body[data-design="cool"] :is(.hero-search,.oh-search) { flex-wrap:wrap; min-width:0; }
  body[data-design="cool"] :is(.hero-search__input,.hero-search__button,.oh-search__input,.oh-search__button) { font-size:1.0625rem!important; min-height:48px; height:auto!important; }
  body[data-design="cool"] .hero-search__label { font-size:1rem!important; white-space:normal; }
  body[data-design="cool"] .hero-search__input { min-width:0!important; }
  body[data-design="cool"] :is(.hero-theme-grid a,.hero-guide-links a,.hero-search__hubs,.yj-services a,.yj-services__note,.home-hub__def,.home-hub__lede,.yj-person p,.yj-person li,.yj-consult-list,.yj-consult-list a,.yj-consult-tel small,.yj-popular-list,.yj-popular-list a,.yj-popular-note,.hub-post__meta,.hub-post__summary,.hub-filter__btn,.hub-updated,.hub-project p,.hub-project dl,.a-date,.a-tag,.meta,.crumb,.tag,.src-box,.author-box,.article-share,.article-discovery,.cool-closing p,.cool-closing-actions a,.fgo-managed-footer__label,.fgo-managed-footer__desc,.fgo-managed-footer__bottom,.fgo-managed-footer__note) {
    font-size:1rem!important; line-height:1.8;
  }
  body[data-design="cool"] :is(.article-body,.article-body p,.article-body li,.article-content,.prose,.a-title,.hub-post__title) { font-size:1.1875rem; }
  body[data-design="cool"] :is(.join-card dl,.join-card dt,.join-card dd,.join-card details,.join-card summary,.join-note,.join-kicker,.join-card__state,.join-button) { font-size:1rem!important; line-height:1.75!important; }
  body[data-design="cool"] .join-card h3 { font-size:1.1875rem!important; line-height:1.7!important; }
  body[data-design="cool"] .join-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,18rem),1fr))!important; }
  body[data-design="cool"] .join-card { min-width:0; height:auto!important; padding:20px!important; }
  body[data-design="cool"] #join-discovery .join-card dl>div { display:grid!important; grid-template-columns:minmax(0,1fr)!important; gap:0!important; margin-bottom:8px!important; }
  body[data-design="cool"] #join-discovery .join-card dd { line-height:1.75!important; min-width:0; }
  body[data-design="cool"] #join-discovery .join-card summary { font-size:1rem!important; min-height:44px!important; padding:8px 0!important; }
  body[data-design="cool"] #join-discovery>.join-kicker,
  body[data-design="cool"] #join-discovery>.join-button { font-size:1rem!important; }
  body[data-design="cool"] #join-discovery>h2 { font-size:1.625rem!important; line-height:1.6!important; }
  body[data-design="cool"] .join-card__links a { min-height:44px!important; font-size:1.0625rem!important; }

  /* Keep the familiar home sections, allowing cards and controls to grow. */
  body[data-design="cool"].home-page #home-hero-visual { display:grid!important; grid-template-columns:minmax(0,1fr) auto; overflow:hidden; }
  body[data-design="cool"].home-page #home-hero-visual .hero-message { min-width:0; }
  body[data-design="cool"].home-page #home-hero-visual .hero-message h2 { font-size:2rem; }
  body[data-design="cool"].home-page #home-hero-visual .hero-person { position:relative; top:auto; right:auto; margin:20px; }
  body[data-design="cool"].home-page #home-hero-visual :is(.hero-eyebrow,.hero-message>a,.hero-person small) { font-size:1rem; max-width:none; }
  body[data-design="cool"].home-page #home-hero-visual .hero-person>span { font-size:1.25rem; }
  body[data-design="cool"].home-page #home-hero-visual .hero-town { max-width:65%; pointer-events:none; }
  body[data-design="cool"].home-page .fgo-reading-title { flex-wrap:wrap; gap:8px 20px; }
  body[data-design="cool"].home-page .fgo-reading-title h2 { font-size:1.625rem!important; }
  body[data-design="cool"].home-page .fgo-reading-title a { font-size:1rem!important; }
  body[data-design="cool"].home-page .fgo-news-grid .sec-title { font-size:1.4375rem!important; }
  body[data-design="cool"].home-page .fgo-news-grid :is(.yj-topic__title,.hub-post__title) { font-size:1.1875rem!important; line-height:1.8!important; }
  body[data-design="cool"].home-page .fgo-news-grid :is(time,.yj-topic__tag,.hub-post__meta,.hub-post__cat,.yj-more,.hub-cta,.play-news-heading label,.play-news-heading select),
  body[data-design="cool"].home-page :is([data-news-count],[data-blog-count],.play-news-controls button,.play-blog-controls button) { font-size:1rem!important; line-height:1.7!important; }
  body[data-design="cool"].home-page .fgo-news-grid .play-news-heading label { flex-wrap:wrap; justify-content:flex-start!important; }
  body[data-design="cool"].home-page .fgo-news-grid .play-news-heading select { max-width:100%; min-height:44px; }
  body[data-design="cool"].home-page :is(.play-news-controls,.play-blog-controls) { flex-wrap:wrap; gap:12px; }
  body[data-design="cool"].home-page .fgo-theme-section .hero-theme-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,8rem),1fr))!important; }
  body[data-design="cool"].home-page .fgo-theme-section .hero-theme-grid a { font-size:1rem!important; padding:14px 10px!important; }
  body[data-design="cool"].home-page .fgo-theme-section .hero-guide-links a { font-size:1rem!important; }
  body[data-design="cool"] :is(.yj-services,.yj-services a,.yj-services__hot,.yj-consult-list li,.cool-closing-actions) { flex-wrap:wrap; white-space:normal; }
  body[data-design="cool"] :is(.yj-topic__title,.hub-post__title a,.yj-popular-list a,.home-projects .blog-banner h3) { white-space:normal!important; -webkit-line-clamp:unset!important; max-height:none; }
  body[data-design="cool"] .home-projects .blog-banner h3 { font-size:1.1875rem; }
  body[data-design="cool"] .home-projects .blog-banner p { font-size:1rem; }
  body[data-design="cool"] :is(.article-meta,.tag-row,.sources,.notice,figcaption,.yj-person__note,.yj-consult li,.yj-consult li>span,.yj-consult__tel,.yj-consult__more,.yj-book p,.yj-tour-banner__copy,.yj-ranking li,.yj-ranking__note,.home-projects .blog-banner .btn-secondary,.play-learning p,.play-learning b) { font-size:1rem; line-height:1.8; }
  body[data-design="cool"] .yj-consult li { min-width:0; }
  body[data-design="cool"] :is(.article-archive-link a,.play-learning small,.play-learning span,.infaer-sidebar-banner__brand span,.infaer-sidebar-banner__headline span,.infaer-sidebar-banner__cta,.hoikuen-sidebar-banner small,.gakkou-sidebar-banner small,.gakkou-sidebar-banner em,.yj-person a,.yj-book__cover strong,.yj-book__cover small,.yj-more,.yj-tour-banner__copy span,.yj-tour-banner__copy b,.yj-ranking .yj-topic__tag,.cool-ketsui-art small,.fgo-managed-footer__heading) { font-size:1rem!important; line-height:1.8; }
  body[data-design="cool"] .yj-book__cover strong { white-space:normal; }
  body[data-design="cool"] .yj-ranking a { font-size:1.1875rem; }
  body[data-design="cool"].home-page .fgo-theme-section .hero-search__label { font-size:1rem!important; }
  body[data-design="cool"].home-page .fgo-theme-section :is(.hero-search__input,.hero-search__button) { font-size:1.0625rem!important; min-height:48px; height:auto!important; }
  body[data-design="cool"] .fgo-managed-footer__groups { grid-template-columns:repeat(auto-fit,minmax(min(100%,16rem),1fr)); }
  @media(max-width:960px) {
    body[data-design="cool"].home-page .fgo-news-grid { grid-template-columns:minmax(0,1fr)!important; }
    body[data-design="cool"] .oh-bar { grid-template-columns:minmax(0,1fr); }
    body[data-design="cool"] .oh-menu { justify-content:flex-start; }
  }
  @media(max-width:600px) {
    body[data-design="cool"].home-page .oh-bar>.oh-brand { display:inline-grid!important; flex-direction:row; grid-template-columns:24px minmax(0,1fr); }
    body[data-design="cool"] .oh-menu-drawer { grid-template-columns:minmax(0,1fr); max-height:65vh; overflow-y:auto; }
    body[data-design="cool"].home-page #home-hero-visual { grid-template-columns:minmax(0,1fr); }
    body[data-design="cool"].home-page #home-hero-visual .hero-message h2 { font-size:1.6875rem; }
    body[data-design="cool"].home-page #home-hero-visual .hero-person { justify-self:start; margin:0 16px 16px; flex-direction:row; gap:12px; text-align:left; }
    body[data-design="cool"].home-page #home-hero-visual .hero-person>img { width:72px; height:72px; flex-shrink:0; }
    body[data-design="cool"] .hero-search__input { flex:1 1 100%!important; width:100%; }
    body[data-design="cool"] .hero-search__button { flex:1 1 100%!important; white-space:normal; }
    body[data-design="cool"] .oh-header-tools .oh-search { flex:1 1 100%; width:100%; }
    body[data-design="cool"] .oh-search__input { flex:1 1 0; width:0; }
    body[data-design="cool"] .yj-services a { min-width:0; max-width:100%; }
    body[data-design="cool"] .cool-closing-actions { display:flex; flex-direction:column; }
  }
}
