.nh-orientation-notice { display: none; }
.nh-course-list > summary { display: none; }

@media (max-width: 767px) {
  body.nh-responsive > #app.freePageBlock {
    min-width: 0; width: 100%; height: auto; max-height: none !important;
    overflow: visible !important; padding: 0 !important;
  }
  body.nh-responsive #app::before, body.nh-responsive #app::after,
  body.nh-responsive .freel-main::before, body.nh-responsive .freel-main::after { display: none; }
  .nh-responsive header.freePage { position: relative; margin-bottom: 10px; }
  .nh-responsive #headerInner { min-width: 0; width: 100%; padding: 8px 12px; }
  .nh-responsive .freePage h1 { width: 150px; max-width: 55%; margin: 0; }
  .nh-responsive .freePage .navbar-brand { width: 100%; height: 65px; padding: 0; background-size: contain; }
  .nh-responsive .freePage #headerInner > p { display: none; }
  .nh-responsive .navBtn { position: absolute; top: 19px; right: 15px; }
  .nh-responsive .navOpen .navBtn { position: fixed; }
  .nh-responsive main.py-4 { padding-top: 0 !important; }
  .nh-responsive .container { min-width: 0; width: 100%; padding: 0 10px 10px; }
  .nh-responsive .mainBlock.freeTop { display: block; padding: 10px; }
  .nh-responsive .menuSpaces { padding: 0; }
  .nh-responsive .infoBoxText p { font-size: 13px; line-height: 1.7; }
  .nh-responsive ul.bookImages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 12px 0; padding: 0; }
  .nh-responsive ul.bookImages li { width: auto; min-width: 0; max-width: none; margin: 0; }
  .nh-responsive ul.bookImages img { width: 100%; height: auto; }
  .nh-responsive .nav.nav-fill { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
  .nh-responsive .nav-fill .nav-item { width: auto; min-width: 0; max-width: none; margin: 0; }
  .nh-responsive .nav.nav-fill .nav-link { padding: 8px 2px; font-size: 12px; line-height: 20px; white-space: nowrap; }
  .nh-responsive .freeTop .table { width: 100%; table-layout: fixed; }
  .nh-responsive .freeTop .table th, .nh-responsive .freeTop .table td { padding: 7px 3px; font-size: 12px; overflow-wrap: anywhere; }
  .nh-responsive .freeTop .table th:first-child, .nh-responsive .freeTop .table td:first-child { width: 34px; }
  .nh-responsive .nh-mobile-columns col:first-child { width: 34px; }
  .nh-responsive .nh-mobile-columns col:nth-child(2) { width: 54px; }
  .nh-responsive .nh-mobile-columns col:nth-child(3) { width: 90px; }
  .nh-responsive .nh-mobile-columns col:last-child { width: auto; }
  .nh-responsive .freeTop .table input[type=submit] { max-width: 100%; width: 100%; white-space: normal; overflow-wrap: anywhere; font-size: 12px; line-height: 1.6; }
  .nh-responsive .schoollogo { max-width: 35%; margin-left: auto; }
  .nh-responsive .schoollogo img { max-width: 100%; height: auto; }
  .nh-responsive .typingbc { display: flex; flex-direction: column; gap: 8px; padding: 0 10px; margin: 8px 0; }
  .nh-responsive .typingbc .breadcrumb-item { min-width: 0; max-width: 100%; margin: 0; }
  .nh-responsive .typingbc .breadcrumb-item.active { width: 100%; font-size: 18px; text-align: center; overflow-wrap: anywhere; animation: none; opacity: 1; transform: none; }
  .nh-responsive .typingbc #BackToTopmenuBtn { position: static; }
  .nh-responsive .l-main { width: 100%; }
  .nh-responsive .l-main__container.freel-main {
    position: relative; top: auto; display: flex; flex-direction: column; gap: 10px;
    min-width: 0; width: 100%; max-height: none; overflow: visible;
    padding: 0 10px 14px !important; margin: 0 !important;
  }
  .nh-responsive .freel-main .order-1 { order: 0; display: block; width: 100%; min-width: 0; min-height: 0; margin: 0; }
  .nh-responsive .nh-course-list > summary { display: list-item; padding: 12px; border: 1px solid #666; background: #111a3f; cursor: pointer; }
  .nh-responsive .nh-course-list .c-table { max-height: 260px; overflow-y: auto; }
  .nh-responsive .nh-course-list .c-table__container, .nh-responsive .nh-course-list .c-table__container__space { max-height: none; min-width: 0; padding: 0; }
  .nh-responsive .freel-main .order-0 { order: 1; width: 100%; max-width: none; flex: none; }
  .nh-responsive .typingOrderMap { padding: 10px; min-height: 0; max-height: none; }
  .nh-responsive #p-typingscreen__startscreen { height: auto; min-height: 0; margin: 0 0 10px; padding: 0; }
  .nh-responsive #p-typingscreen__startscreen > .p-typingscreen__mana,
  .nh-responsive #p-typingscreen__startscreen > .p-typingscreen__romaji { display: none; }
  .nh-responsive #p-typingscreen__startscreen__option__container { position: relative; display: flex; justify-content: center; gap: 6px; padding: 0 0 8px; top: 0; left: 0; width: 100%; }
  .nh-responsive #p-typingscreen__startscreen__option__container > div { margin: 0; }
  .nh-responsive #p-typingscreen__startscreen__option__container label { font-size: 12px; padding: 0 6px; margin: 0; }
  .nh-responsive #p-typingscreen__startscreen__sound__container label { width: 38px; font-size: 0; }
  .nh-responsive #p-typingscreen__start {
    position: static; transform: none; max-width: 100%; margin: 0 auto;
    padding: 12px 20px 12px 40px !important; font-size: 24px !important;
    background-position: left 14px center !important; background-size: 15px auto !important;
    transition: none; letter-spacing: 0;
  }
  .nh-responsive #p-typingscreen__start.p-typingscreen__start__important { font-size: 16px !important; white-space: nowrap; }
  .nh-responsive #p-typingscreen__count { position: static; transform: none; margin: 0 auto; line-height: 6rem; }
  .nh-responsive #p-typingscreen { padding: 32px 8px 8px; margin: 0 0 10px; }
  .nh-responsive #p-mana { max-width: 100%; font-size: 18px; }
  .nh-responsive .p-typingscreen__romaji { font-size: 24px; letter-spacing: 0; }
  .nh-responsive .p-typingscreen__romaji__show { column-gap: 0.2em; }
  .nh-responsive .p-typingscreen__successtype, .nh-responsive .p-typingscreen__misstype { position: absolute; top: 6px; margin: 0; padding: 4px 6px; font-size: 12px; }
  .nh-responsive .p-typingscreen__successtype { left: 6px; }
  .nh-responsive .p-typingscreen__misstype { right: 6px; }
  .nh-responsive #map { width: 100%; height: auto; aspect-ratio: 4 / 3; }
  .nh-responsive #map_img, .nh-responsive #map_top { inset: 0; padding: 6px; }
  .nh-responsive .typingOrder .underBtn { position: static; display: flex; margin: 12px 0 0; }
  .nh-responsive .typingOrderMap:not([data-typing-phase="ready"]) .underBtn { display: none; }
  .nh-responsive .typingOrder .underBtn button {
    width: auto; min-width: 104px; height: 36px; margin: 0; padding: 0 10px;
    background-image: none; color: #fff; font-size: 13px;
  }
  .nh-responsive .english-remaining { position: static; float: left; display: inline-block; margin-top: 10px; }
  .nh-responsive .btn.stopBtn { position: static; float: right; margin: 10px 0 0; padding: 8px 12px; font-size: 14px; }
  .nh-responsive .typingOrderMap::after { content: ''; display: block; clear: both; }
  .nh-responsive .p-typingresult__card { width: calc(100% - 24px); min-width: 0; max-width: 380px; max-height: calc(100svh - 24px); overflow-y: auto; padding: 16px 12px; }
  .nh-responsive .p-typingresult__card h3 { display: block; width: auto; height: auto; line-height: 1.5; font-size: 22px; padding: 4px; }
  .nh-responsive .p-typingresult__card li { font-size: 16px; margin: 6px 0; padding: 6px; }
  .nh-responsive .p-typingresult__card li div { font-size: 24px; }
  .nh-responsive .p-typingresult__card h4 { font-size: 12px; line-height: 1.6; }
  .nh-typing-page > footer, .nh-typing-page > .pagetop { display: none; }
}

@media (max-width: 1024px) and (max-height: 600px) and (orientation: landscape) and (any-pointer: coarse) {
  body.nh-responsive > #app, body.nh-responsive > footer, body.nh-responsive > .pagetop { display: none; }
  .nh-responsive .nh-orientation-notice {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 20px; min-height: 100svh; padding: 24px; text-align: center;
  }
  .nh-orientation-notice img { max-width: 80%; height: auto; }
  .nh-orientation-notice p { font-size: 18px; line-height: 1.7; margin: 0; }
}
