/* Engei Secret Base unified typography rules (2026-08-19 v3). */
:root {
  --ui-font-gothic: "Yu Gothic UI", "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  --ui-body-size: 16px;
  --ui-body-weight: 500;
  --ui-label-weight: 600;
  --ui-body-line-height: 1.8;
}

html { -webkit-text-size-adjust:100%; text-size-adjust:100%; }
body { font-family:var(--ui-font-gothic) !important; font-size:var(--ui-body-size); font-weight:var(--ui-body-weight); }
body :where(p,li,dt,dd) { font-family:var(--ui-font-gothic) !important; font-size:var(--ui-body-size) !important; font-weight:var(--ui-body-weight) !important; line-height:var(--ui-body-line-height); }
body :where(a,label,legend,button,input,select,textarea) { font-family:var(--ui-font-gothic) !important; font-size:var(--ui-body-size) !important; }
body :where(input,select,textarea) { font-weight:var(--ui-body-weight) !important; }
body :where(button,label,legend) { font-weight:var(--ui-label-weight) !important; }
body :where(h1,h2,h3,h4,h5,h6,strong,b) { font-family:var(--ui-font-gothic) !important; font-weight:var(--ui-label-weight) !important; }
body textarea { line-height:1.65; }
body :where(small,figcaption) { font-family:var(--ui-font-gothic) !important; font-size:14px; font-weight:var(--ui-body-weight); line-height:1.6; }

/* Reading text is larger than controls. Public articles, CMS previews and editors share it. */
body :where(.detail>article,.methodArticle,.previewPaper,.contentBlock,.blockEditor) :where(p:not(.meta),li,textarea),
body :where(.contentNotice,.previewNotice) :where(p,li,textarea) {
  font-size:18px !important;
  font-weight:var(--ui-body-weight) !important;
  line-height:1.9 !important;
}
body :where(.contentNotice,.previewNotice,.previewPaper,.contentBlock,.blockEditor) :where(h2,h3,h4,strong) { font-family:var(--ui-font-gothic) !important; font-weight:var(--ui-label-weight) !important; }
body :where(.contentNotice,.previewNotice)>strong { font-size:16px !important; }
.previewPaper h1,.previewPaper h2,.previewCatalogGroup>strong { font-family:var(--ui-font-gothic) !important; font-weight:var(--ui-label-weight) !important; }

/* Preserve the established home-page geometry. */
body[data-page="home"] .dateRow { grid-template-columns:repeat(2,minmax(0,1fr)); }
body[data-page="home"] .dateRow input,body[data-page="home"] .dateRow button { grid-column:auto; grid-row:1; width:100%; min-width:0; }
body[data-page="home"] .seasonButtons button { min-height:64px; }
body[data-page="home"] .consoleHint { display:grid; gap:2px; }
body[data-page="home"] .consoleHint > span { display:block; }

/* Intentional exceptions: decorative logo and compact operational metadata. */
.brandText small { font-size:8px !important; }
body[data-page="home"] :where(.consoleHint,.referenceNotice,.viewerSummary,.loadingMessage,.graphFoot,.compareTitle p,.compareCard h3),body :where(.internalMeta,.adminMeta,.qualityMeta) { font-size:14px !important; }

@media (max-width:720px) {
  body { font-size:var(--ui-body-size); }
  body :where(.detail>article,.methodArticle,.previewPaper,.contentBlock,.blockEditor) :where(p:not(.meta),li,textarea),
  body :where(.contentNotice,.previewNotice) :where(p,li,textarea) { font-size:17px !important; }
  body[data-page="home"] .seasonButtons { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
