/* Mobile layout boundary: keep the existing desktop styles intact. */
@media (max-width: 900px) {
  html body #mjCleanMobileHome {
    position: relative !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px !important;
  }
  html body #mjCleanMobileHome > .mj-clean-logo,
  html body #mjCleanMobileHome > .mj-clean-login,
  html body #mjCleanMobileHome > .mj-clean-hero,
  html body #mjCleanMobileHome > .mj-clean-rec,
  html body #mjCleanMobileHome > .mj-clean-books {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
  }
  html body #mjCleanMobileHome > .mj-clean-logo {
    display: flex !important;
    justify-content: center !important;
    padding: 0 !important;
  }
  html body #mjCleanMobileHome .mj-clean-logo a {
    height: auto !important;
  }
  html body #mjCleanMobileHome .mj-clean-logo img {
    width: 155px !important;
    max-width: 100% !important;
    height: auto !important;
    transform: none !important;
  }
  html body #mjCleanMobileHome > .mj-clean-login {
    display: flex !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 8px 16px !important;
    padding: 10px 0 !important;
  }
  html body #mjCleanMobileHome .mj-clean-hero img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    transform: none !important;
  }
  html body #mjCleanMobileHome > .mj-clean-rec {
    padding: 12px 0 8px !important;
    white-space: normal !important;
    line-height: 1.5 !important;
  }
  html body #mjCleanMobileHome > .mj-clean-books {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    padding: 0 !important;
  }
  html body #mjCleanMobileHome .mj-clean-book {
    position: static !important;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    aspect-ratio: 152 / 225;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    overflow: hidden !important;
  }
  html body #mjCleanMobileHome .mj-clean-book img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    transform: none !important;
  }

  /* The reading action stays reachable even with long titles or large text. */
  html body #mjGuideFullScreen {
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
    padding: 8px 8px calc(76px + env(safe-area-inset-bottom, 0px)) !important;
    box-sizing: border-box !important;
  }
  html body #mjGuideFullScreen > div {
    width: 100% !important;
    max-width: 680px !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 38%) minmax(0, 1fr) !important;
    margin: 0 auto !important;
  }
  html body #mjGuideFullScreen > div > div:first-child {
    min-height: 0 !important;
    height: 100% !important;
  }
  html body #mjGuideFullScreen > div > div:nth-child(2) {
    height: 100% !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    padding: 16px !important;
    justify-content: flex-start !important;
    gap: 12px !important;
  }
  html body #mjGuideFullScreen > div > div:nth-child(2) > * {
    flex-shrink: 0 !important;
  }
  html body #mjGuideFullScreen h1 {
    font-size: 22px !important;
    line-height: 1.35 !important;
    overflow-wrap: anywhere;
    margin: 0 !important;
  }
  html body #mjGuideFullScreen > div > div:nth-child(2) > div {
    font-size: 15px !important;
    line-height: 1.6 !important;
    margin: 0 !important;
  }
  html body #mjGuideFullScreen > div > div:nth-child(2) > div[style*="background"] {
    padding: 12px !important;
  }
  html body #mjGuideFullScreen br { display: initial !important; }
  html body #mjGuideFullScreen #mjGuideStartBtn {
    position: fixed !important;
    left: 16px !important;
    right: 16px !important;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    width: calc(100% - 32px) !important;
    min-height: 48px !important;
    padding: 12px 16px !important;
    margin: 0 !important;
    font-size: 18px !important;
    line-height: 1.4 !important;
    z-index: 4;
  }
  html body #mjGuideFullScreen .mjHomeBtn {
    width: auto !important;
    min-height: 44px !important;
    padding: 8px 16px !important;
    font-size: 16px !important;
  }
}
@media (min-width: 601px) and (max-width: 900px) {
  html body #mjCleanMobileHome > .mj-clean-books {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 900px) and (orientation: landscape) {
  html body #mjGuideFullScreen > div {
    max-width: none !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) !important;
    grid-template-rows: minmax(0, 1fr) !important;
  }
}


/* MJ_SINGLE_COVER_20261105 */

@media screen and (max-width:900px) {

 html body #mjCleanMobileHome > .mj-clean-books {

  display:grid!important;

  grid-template-columns:minmax(0,1fr)!important;

  width:100%!important;

  gap:24px!important;

  overflow:visible!important;

 }

 html body #mjCleanMobileHome > .mj-clean-books > * {

  width:90%!important;

  max-width:90%!important;

  min-width:0!important;

  margin-left:auto!important;

  margin-right:auto!important;

 }

 html body #mjCleanMobileHome > .mj-clean-books img {

  width:100%!important;

  height:auto!important;

  object-fit:contain!important;

 }

}



/* MJ_FREE_READING_BLINK_20261106 */

@media screen and (max-width:600px) {

  html body #mjCleanMobileHome > .mj-clean-books > a::after {

    content:"클릭하시면 책을 무료 열람 하실 수 있습니다." !important;

    display:block !important;

    position:relative !important;

    padding:12px 4px !important;

    text-align:center !important;

    white-space:normal !important;

    font-size:16px !important;

    font-weight:800 !important;

    line-height:1.5 !important;

    color:#b02720 !important;

    animation:mjFreeReadingBlink 1.8s ease-in-out infinite !important;

  }

  @keyframes mjFreeReadingBlink {

    0%,100% {opacity:1;}

    50% {opacity:.25;}

  }

}



/* MJ_FREE_READING_DOM_20261106 */

html body #mjCleanMobileHome .mj-free-reading-note {

  display:none!important;

}

@media screen and (max-width:600px) {

  html body #mjCleanMobileHome > .mj-clean-books > a::after {

    content:none!important;

  }

  html body #mjCleanMobileHome > .mj-clean-books > .mj-free-reading-note {

    display:block!important;

    grid-column:1/-1!important;

    width:90%!important;

    max-width:90%!important;

    margin:-18px auto 8px!important;

    padding:4px!important;

    text-align:center!important;

    font-size:16px!important;

    font-weight:800!important;

    line-height:1.5!important;

    color:#b02720!important;

    animation:mjFreeReadingPulse 1.8s ease-in-out infinite!important;

  }

}

@keyframes mjFreeReadingPulse {

  0%,100% {opacity:1}

  50% {opacity:.25}

}

@media (prefers-reduced-motion:reduce) {

  .mj-free-reading-note {animation:none!important}

}


/* MJ_FREE_READING_NOTE_UP_20261106 */
@media screen and (max-width:600px){
  html body #mjCleanMobileHome > .mj-clean-books > .mj-free-reading-note {
    margin:-36px auto 8px!important;
    position:relative!important;
    z-index:5!important;
  }
}
