/* Adobe Playpen Sans for Latin; Adobe Zen Maru Gothic for Japanese. */
:root { --bee-en-font-family: "playpen-sans"; --bee-jp-font-family: "zen-maru-gothic"; }
html.bee-jp-fonts-fallback {
  --bee-en-font-family: "Arial Rounded MT Bold", Arial;
  --bee-jp-font-family: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Noto Sans JP", sans-serif;
}
body, body h1, body h2, body h3, body h4, body h5, body h6,
body button, body input, body select, body textarea {
  font-family: var(--bee-en-font-family,"playpen-sans"),var(--bee-jp-font-family,"zen-maru-gothic"), sans-serif;
}
body {
  --br-font-en: var(--bee-en-font-family,"playpen-sans"), Arial, sans-serif;
  --br-font-ui: var(--bee-en-font-family,"playpen-sans"), var(--bee-jp-font-family,"zen-maru-gothic"), sans-serif;
  --br-font-jp: var(--bee-en-font-family,"playpen-sans"),var(--bee-jp-font-family,"zen-maru-gothic"), "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", sans-serif;
}
/* Native course pages and Elementor use separate font variables. */
body[class] {
  --e-global-typography-primary-font-family: var(--br-font-ui);
  --e-global-typography-secondary-font-family: var(--br-font-ui);
  --e-global-typography-text-font-family: var(--br-font-ui);
  --e-global-typography-accent-font-family: var(--br-font-ui);
  --ld-typography-font-family: var(--br-font-ui);
  --wp--preset--font-family--body: var(--br-font-ui);
  --wp--preset--font-family--heading: var(--br-font-ui);
}
/* These third-party text rules declare their own families. Their icon fonts
   remain independently specified on icon elements and pseudo-elements. */
body .elementor .elementor-nav-menu a.elementor-item,
body .elementor .elementor-nav-menu a.elementor-sub-item,
body .elementor .elementor-heading-title,
body .assigment-inner .duration-pnl,
body .site .skip-link,
body .ld-tooltip [role="tooltip"],
body #learndash-tooltips,
body .learndash-wrapper .ld-login-modal ::placeholder,
body pre {
  font-family: var(--br-font-ui) !important;
}
/* Scale the header dropdown's 13px font base and 20px/10px/20px item
   line-height/vertical padding/horizontal padding by 1.15. Existing em-based
   phone/tablet/desktop text rules retain their responsive proportions. */
header[data-elementor-type="header"] .elementor-nav-menu--dropdown.elementor-nav-menu__container {
  font-size: 14.95px !important;
  /* Grow left from the hamburger column to fit the longest complete label. */
  width: max-content !important;
  min-width: 100%;
  max-width: calc(100vw - 32px) !important;
  left: auto !important;
  right: 0 !important;
  box-sizing: border-box;
}
header[data-elementor-type="header"] .elementor-nav-menu--dropdown
a:is(.elementor-item, .elementor-sub-item) {
  line-height: 23px !important;
  padding: 11.5px 23px !important;
  white-space: nowrap;
  min-width: max-content;
  box-sizing: border-box;
}
/* At enlarged text sizes, keep complete labels reachable within the viewport.
   Scope scrolling to the open panel so Elementor still hides the closed menu. */
header[data-elementor-type="header"] .elementor-menu-toggle.elementor-active +
.elementor-nav-menu--dropdown.elementor-nav-menu__container {
  overflow-x: auto;
}
/* One stronger Japanese weight in the header's hamburger menu. */
header[data-elementor-type="header"] .elementor-nav-menu--dropdown
.bee-header-menu-japanese > a:is(.elementor-item, .elementor-sub-item) {
  font-weight: 700 !important;
}
/* The orientation prompt must also remain readable while fonts are loading. */
html.bee-jp-fonts-pending body > :not(#bee-jp-font-loader):not(.bee-phone-portrait),
html.bee-jp-fonts-pending body > :not(#bee-jp-font-loader):not(.bee-phone-portrait) * {
  visibility: hidden !important;
}
#bee-jp-font-loader {
  position: fixed; inset: 0; z-index: 2147483647;
  display: grid; align-content: center; justify-items: center; gap: 18px;
  padding: 24px; background: #fffdf7; color: #1f2a44;
  font: 600 16px/1.6 var(--bee-en-font-family,"playpen-sans"),"zen-maru-gothic", "Hiragino Maru Gothic ProN", sans-serif;
  text-align: center;
}
#bee-jp-font-loader .bee-jp-font-spinner {
  width: 40px; height: 40px; border: 5px solid #52d9c7;
  border-top-color: #f7e232; border-radius: 50%;
  animation: bee-jp-font-spin .8s linear infinite;
}
#bee-jp-font-loader button {
  min-height: 48px; padding: 10px 18px; border: 2px solid #1f2a44;
  border-radius: 14px; background: #f7e232; color: #1f2a44; font: inherit;
  cursor: pointer;
}
#bee-jp-font-loader button + button { background: white; }
@keyframes bee-jp-font-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #bee-jp-font-loader .bee-jp-font-spinner { animation: none; } }
