@font-face {
  font-family: "Kohana Sans JP";
  src: url("/assets/fonts/kohana-sans-jp.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Preserve icon-font elements while giving Japanese copy a consistent face. */
html[lang="ja"] body.replica-mode,
html[lang="ja"] body.replica-mode :is(p, a, span, strong, b, em, small, h1, h2, h3, h4, h5, h6, li, label, input, textarea, button, select, option, th, td, legend),
html[lang="ja"] #modal-root,
html[lang="ja"] #modal-root :is(p, a, span, strong, b, small, h1, h2, h3, label, input, textarea, button, select, option),
html[lang="ja"] #toast {
  font-family: "Kohana Sans JP", "Hiragino Kaku Gothic ProN", "Meiryo", "Yu Gothic", sans-serif !important;
}

@media (max-width: 768px) {
  html[lang="ja"] body.replica-mode :is(#myModal .modal-content, .room-watch-error-dialog, .auth-modal-content, .register-modal-content, .flex-popup-con, .export-popup-con) {
    box-sizing: border-box;
    min-width: 0;
    max-width: calc(100vw - 24px);
    overflow-x: hidden;
  }

  html[lang="ja"] body.replica-mode :is(#myModal .modal-body, .room-watch-error-dialog p, .auth-modal-content, .register-modal-content, .flex-popup-con, .export-popup-con, #toast) {
    min-width: 0;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    white-space: normal;
  }

  html[lang="ja"] body.replica-mode #contents[data-replica-page="shop"] .flex-popup :is(.modal-info-item, .modal-bank-row, .modal-purchase-row) > * {
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  html[lang="ja"] body.replica-mode #contents[data-replica-page="shop"] #levelConfirmModal .modal-info-value-wrapper {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}
