/* 아이패드 세로, 「다시 붙이기」 단추.
   css/ 의 파일은 index.html 에서 번호 순서대로 겹쳐 적용된다(뒤 파일이 앞 파일을 덮는다). 순서를 바꾸지 말 것. */
/* ───── 아이패드 세로(가로 폭 700~1024): 그림을 폭에 꽉, 스티커는 그림 밑에 가로로, 글은 그 밑에 크게 ───── */
@media (min-width: 701px) and (orientation: portrait) {
  #reader .picture-side {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  #reader .board {
    width: 100%;
  }
  #reader .item-rail {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 16px;
    border-radius: 22px;
  }
  #reader .item-rail #choice-panel {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
  }
  #reader .item-rail #choice-panel[hidden] {
    display: none;
  }
  #reader .item-rail .step-tag {
    flex: none;
    margin: 0;
    font-size: 18px;
  }
  #reader .choices {
    flex-direction: row;
    flex: 1;
    gap: 14px;
  }
  #reader .choice {
    flex: 1;
    width: auto;
    max-width: 260px;
    min-height: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
  }
  #reader .choice-art {
    flex: none;
    width: 96px;
  }
  #reader .choice img {
    height: 84px;
  }
  #reader .choice > span:last-child {
    font-size: 19px;
    text-align: left;
  }
  #reader .item-rail .tray {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    width: 100%;
  }
  #reader .item-rail .sticker {
    width: 120px;
    flex: none;
  }
  #reader .item-rail #again {
    width: auto;
    margin: 0;
    padding: 12px 20px;
  }
  /* 글은 그림 위 대신 아래에 (세로 화면은 아래가 넉넉하다) */
  .story-caption {
    display: none;
  }
  #reader .story-copy {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
    white-space: normal;
    padding: 4px 6px 20px;
  }
  #reader .story-copy #page-title {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  #reader .story-copy #story-text {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
    white-space: pre-line;
    margin: 4px 0 0;
    font:
      24px/1.7 Jua,
      sans-serif;
    color: #2f4a3c;
  }
  #reader .story-copy #intro-status {
    display: none;
  }
  #reader .story-copy .result-box {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
    white-space: normal;
    margin: 10px 0 0;
    padding: 12px 16px;
  }
  #reader .story-copy .result-box p {
    font:
      22px/1.6 Jua,
      sans-serif;
  }
  #reader .story-copy #chapter {
    display: none;
  }
  /* 세로는 폭이 좁아 질문이 잘리므로 질문을 조작 줄 두 번째 줄로 */
  .reader-bar {
    flex-wrap: wrap;
  }
  #reader .reader-bar .quiz {
    order: 3;
    flex-basis: 100%;
    padding: 8px 2px 0;
    border-left: 0;
    border-top: 1px solid #e5e8dc;
  }
  #reader .reader-bar .quiz h3 {
    white-space: normal;
    flex: 1 1 auto;
  }
}

/* 「다시 붙이기」: 아이콘과 글자를 한 줄로, 조금 작게 */
#reader .item-rail #again {
  flex-wrap: nowrap;
  white-space: nowrap;
  gap: 5px;
  padding: 10px 8px;
  min-height: 48px;
  font-size: 16px;
  line-height: 1.2;
}
#reader .item-rail #again .icon {
  width: 17px;
  height: 17px;
}
@media (max-width: 700px) {
  #reader .item-rail #again {
    font-size: 13px;
    padding: 8px 4px;
    gap: 3px;
    min-height: 44px;
  }
  #reader .item-rail #again .icon {
    width: 14px;
    height: 14px;
  }
}
