/* Review candidate: common storefront typeface and role-based text scale.
 * Logo images/SVGs, icon fonts and glyph-only navigation are excluded.
 * No geometry, colors, price values, events or payment logic are changed. */
body[id^="page_"] {
  --ep-font-text: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  --ep-type-page: 29px;
  --ep-type-section: 18px;
  --ep-type-body: 14px;
  --ep-type-note: 12px;
  --ep-type-action: 14px;
  font-family: var(--ep-font-text) !important;
}

/* Existing component stacks are explicit, so body inheritance alone is insufficient.
 * Only the typeface needs priority over their individual inline/legacy stacks. */
body[id^="page_"] :is(
  .ec-layoutRole__main, .ec-layoutRole__mainWithColumn, .ec-productRole__profile,
  .ec-layoutRole__footer, .ep-nav-header, .ep-nav-dialog,
  #ep-home-category-content, #ep-home-consultation, .etc-surface,
  .tooltip, .popover, .irs,
  h1, h2, h3, h4, h5, h6, p, a, span, button, input, select, textarea,
  label, legend, summary, dt, dd, li, th, td, small, strong, em, blockquote, figcaption
):not(:where(
  .fa, .fas, .far, .fab, .fal, .fad, .material-icons, .material-symbols-outlined,
  .ep-nav-logo, .ep-nav-logo *, .ec-headerTitle, .ec-headerTitle *,
  .ep-ready-gallery-arrow, .ep-ready-option-nav__button, .etc-arrow,
  .slick-arrow, .slick-dots button, .swiper-button-next, .swiper-button-prev,
  .text-monospace, code, code *, pre, pre *, kbd, samp
)) {
  font-family: var(--ep-font-text) !important;
}

/* Role values override legacy page specificity and important weights.
 * Page titles share a scale; product names in listing cards remain a smaller role. */
body[id^="page_"] :is(.ec-pageHeader h1, .ep-ready-catalog-heading h1),
body#page_product_detail .ec-productRole__title .ec-headingTitle {
  font-size: var(--ep-type-page) !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  overflow-wrap: anywhere;
}
body#page_homepage.ep-ready-site :is(.eph-order-route > h2, .eph-help-copy h2),
body#page_help_guide .ep-ready-legal-document h2,
body[id^="page_"] .ep-ready-form-heading {
  font-size: var(--ep-type-section) !important;
  font-weight: 700 !important;
  line-height: 1.5 !important;
}
body#page_homepage .etc-scene-heading {
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.5 !important;
}
body#page_homepage.ep-ready-site .eph-order-route h3,
body#page_help_guide .ep-ready-legal-document h3 {
  font-size: var(--ep-type-body) !important;
  font-weight: 700 !important;
  line-height: 1.5 !important;
}

/* Ordinary copy and supporting copy are distinct roles. */
body#page_help_guide .ep-ready-legal-document p,
body#page_homepage .eph-help-copy p,
body[id^="page_entry"] .ec-registerRole__agreementNote,
body[id^="page_entry"] .ep-entry-email-notice p {
  font-size: var(--ep-type-body) !important;
  line-height: 1.8 !important;
}
body[id^="page_"] :is(.ec-layoutRole__main, .ec-layoutRole__mainWithColumn) {
  font-size: var(--ep-type-body) !important;
}
body#page_product_detail :is(.ep-ready-section-lead, .sc-column-image-note, .ep-breakdown-note),
body#page_homepage .etc-image-note {
  font-size: var(--ep-type-note) !important;
  font-weight: 400 !important;
  line-height: 1.7 !important;
}

/* Main actions keep their hierarchy; compact catalog actions have their own size. */
body[id^="page_"] :is(.ec-blockBtn--action, .ec-blockBtn--cancel, .ec-blockBtn--primary) {
  font-size: var(--ep-type-action) !important;
  font-weight: 700 !important;
  line-height: 1.5 !important;
}
body#page_product_list :is(.ec-blockBtn--action, .ec-blockBtn--cancel) {
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.5 !important;
}
body#page_homepage .item_name,
body#page_product_list :is(.ec-seriesCardHeading h5, .ec-seriesCardHeading h5 strong) {
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.5 !important;
}

/* Price scale follows presentation role, without touching any amount or calculation. */
body#page_homepage .item_price,
body#page_product_list .price02-default {
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  font-variant-numeric: tabular-nums;
}
body#page_product_detail #price02-display {
  font-size: 28px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  font-variant-numeric: tabular-nums;
}
body#page_product_detail #sp-mitsumori-price {
  font-size: 24px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  font-variant-numeric: tabular-nums;
}
body#page_product_detail :is(#mitsumori_goukei, #mitsumori_goukei_02) {
  font-weight: 700 !important;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 767px) {
  body[id^="page_"] { --ep-type-page: 23px; }
  body#page_product_list :is(.ec-blockBtn--action, .ec-blockBtn--cancel) { font-size: 12px !important; }
  body#page_product_detail #price02-display { font-size: 24px !important; }
  body#page_product_detail #sp-mitsumori-price { font-size: 18px !important; }
  body[id^="page_"] :is(.ec-borderedDefs, .ec-login__input, .ec-orderConfirm, .ec-orderInput)
  :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), select, textarea) {
    font-size: 16px !important;
  }
}
