/* Shared mobile corrections for every standalone and embedded material slide.
   All desktop slide layouts remain unchanged. */
@media (min-width: 768px) {
  #full-page-wrapper > header > div:first-child {
    height: 45px !important;
    min-height: 45px !important;
  }

  #full-page-wrapper > header > div:first-child img {
    width: auto !important;
    height: 29.44px !important;
  }

  #full-page-wrapper > header nav {
    gap: 20.8px !important;
  }

  #full-page-wrapper > header nav > a,
  #full-page-wrapper > header nav button {
    font-size: 10.4px !important;
    line-height: 16px;
  }

  #koushukai-menu,
  #karute-menu {
    display: flex;
    align-items: center;
  }

  #koushukai-btn,
  #karute-btn {
    display: block;
  }

  #koushukai-menu:hover #koushukai-dropdown,
  #koushukai-menu:focus-within #koushukai-dropdown,
  #karute-menu:hover #karute-dropdown,
  #karute-menu:focus-within #karute-dropdown {
    display: block;
  }
}

@media (max-width: 767px) {
  html,
  body {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  body {
    display: block !important;
    padding: 0 !important;
    overflow-x: hidden !important;
  }

  #full-page-wrapper,
  #full-page-wrapper > *,
  #full-page-wrapper header,
  #full-page-wrapper main,
  #full-page-wrapper footer {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box;
  }

  #full-page-wrapper header > div,
  #full-page-wrapper main > *,
  #full-page-wrapper footer > div {
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
  }

  #full-page-wrapper div:has(> a[style*="min-width:180px"]),
  #full-page-wrapper div:has(> a[style*="min-width: 180px"]) {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  #full-page-wrapper a[style*="min-width:180px"],
  #full-page-wrapper a[style*="min-width: 180px"] {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    text-align: left !important;
  }

  .slide-standalone,
  #embed-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 8px !important;
    box-sizing: border-box;
    align-items: stretch !important;
    justify-content: flex-start !important;
  }

  .slide-unit {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
    box-sizing: border-box;
  }

  .slide-unit *,
  .slide-unit *::before,
  .slide-unit *::after {
    box-sizing: border-box;
  }

  .slide-unit .slide {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 20px 16px !important;
    box-sizing: border-box;
  }

  .slide-unit .four-col,
  .slide-unit .three-col,
  .slide-unit .two-col,
  .slide-unit .intro-grid,
  .slide-unit .kw-tags,
  .slide-unit .comparison-grid,
  .slide-unit [style*="grid-template-columns"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .slide-unit .four-col,
  .slide-unit .three-col,
  .slide-unit .two-col {
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
  }

  .slide-unit .col-box {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .slide-unit .formula-row {
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
  }

  .slide-unit .f-box {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .slide-unit [style*="display:flex"],
  .slide-unit [style*="display: flex"] {
    flex-wrap: wrap !important;
  }

  .slide-unit [style*="min-width"] {
    min-width: 0 !important;
  }

  .slide-unit img,
  .slide-unit svg,
  .slide-unit canvas {
    max-width: 100% !important;
    height: auto;
  }

  .slide-unit table {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto;
    border-collapse: collapse;
  }

  .slide-unit .slide-title {
    font-size: clamp(20px, 6vw, 24px) !important;
    line-height: 1.45 !important;
    overflow-wrap: anywhere;
  }

  .slide-unit .col-box .col-main,
  .slide-unit [style*="white-space:nowrap"],
  .slide-unit [style*="white-space: nowrap"] {
    min-height: 0 !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: anywhere;
  }
}
