 body {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin: 0;
    padding-top: 90px;
  }

  h2 {
    text-align: center;
    margin-bottom: 5px;
  }

  h3 {
    text-align: center;
    font-weight: normal;
    color: #666;
    margin-bottom: 30px;
  }

  h5{
    text-align: center;
    font-weight: 500;
    color: #000000;
  }


  /* ===== POEM VIEW ===== */
  .poem-frame {
    max-width: 860px;
    margin: 0 auto 60px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    overflow: hidden;
    padding: 28px 30px;
  }

  .poem-title{
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 18px;
    text-align: center;
  }

  .poem-line {
    display: block;
    margin: 14px 0;
    padding: 7px 10px;
    font-size: 17px;
    line-height: 1.55;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s;
  }
  .poem-line:hover {
    background: #f1f1f1;
  }

  .poem-line-en,
  .poem-line-ko {
    display: block;
  }

  .poem-line-en {
    color: #171717;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.04em;
    letter-spacing: 0.005em;
  }

  .poem-line-ko {
    margin-top: 3px;
    color: #777;
    font-family: "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
    font-size: 0.76em;
    font-weight: 400;
    line-height: 1.45;
  }

  @media (max-width: 720px) {
    .poem-frame {
      margin-inline: 14px;
      padding: 22px 18px;
    }

    .poem-line {
      font-size: 16px;
    }
  }
    .poem-stanza {
        height: 16px;
    }

  /* ===== MODAL ===== */
  .modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: none;              /* 기본은 숨김 */
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 18px;
  }
  .modal-overlay.open {
    display: flex;
  }

  .modal {
    width: 100%;
    max-width: 680px;
    max-height: min(82vh, 760px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 55px rgba(0,0,0,0.24);
    overflow: hidden;
  }

  .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
  }

  .modal-title {
    font-size: 14px;
    color: #555;
    margin: 0;
  }

  .modal-close {
    border: none;
    background: transparent;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    padding: 6px 10px;
    border-radius: 8px;
  }
  .modal-close:hover {
    background: #f3f3f3;
  }

  .modal-body {
    max-height: calc(82vh - 58px);
    overflow-y: auto;
    padding: 24px 28px 26px;
  }

  .clicked-line {
    position: relative;
    margin: 0 0 22px;
    padding: 20px 22px 18px;
    text-align: left;
    background: #f7f7f5;
    border: 1px solid #e9e8e3;
    border-left: 4px solid #222;
    border-radius: 10px;
  }

  .modal-line-en,
  .modal-line-ko {
    display: block;
  }

  .modal-line-en {
    color: #171717;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(19px, 2.4vw, 23px);
    font-weight: 600;
    font-style: italic;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }

  .modal-line-en::before {
    content: "“";
  }

  .modal-line-en::after {
    content: "”";
  }

  .modal-line-ko {
    margin-top: 10px;
    padding-top: 10px;
    color: #656565;
    border-top: 1px solid #deddd8;
    font-family: "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.65;
    word-break: keep-all;
  }

  .hint {
    font-size: 13px;
    color: #777;
    margin-top: 20px;
    text-align: center;
  }

  @media (max-width: 560px) {
    .modal-overlay {
      padding: 10px;
    }

    .modal-body {
      padding: 18px 16px 22px;
    }

    .clicked-line {
      padding: 16px;
    }

    .modal-line-ko {
      font-size: 13px;
    }
  }

  .heatmap{
    display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  }

/* .iframe-wrapper {
  width: 100%;
  height: 500px;
  overflow: hidden;
}
iframe {
  border: none;
  transform: translateX(-60px);
  display: block;
}

.iframe-wrapper-line {
  max-width: 80%;
  height: 500px;
  overflow: hidden;
} */

.iframe-wrapper-line {

  width: 80vw;          /* 최대 너비 */
  max-width: 1400px;    /* 너무 커지는 것 방지 */

  margin: 0 auto;       /* 화면 중앙 정렬 */

  display: flex;
  justify-content: center;

}

.iframe-wrapper iframe,
.iframe-wrapper-line iframe {

  width: 100%;

  border: none;

  border-radius: 20px;

  background: white;

  box-shadow:
    0 8px 30px rgba(0,0,0,0.08);
}

#heatmapFrame iframe {
  transform: scale(0.95);
}

.poem-list {
  max-width: 500px;
  margin: 40px auto;
}

.poem-card {
  display: block;
  text-decoration: none;
  color: inherit;
  margin-bottom: 24px;
}

.poem-card .poem-frame {

  border-radius: 20px;

  background: #fafafa;

  border: 1px solid #e5e5e5;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.poem-card .poem-frame:hover {

  transform: translateY(-4px);

  border-color: #d0d0d0;

  box-shadow:
    0 10px 30px rgba(0,0,0,0.08);
}

.poem-title {

  font-size: 20px;

  font-weight: 500;

  margin-bottom: 18px;
}

.poem-preview {

  font-size: 15px;

  line-height: 1.9;

  color: #555;
}

.home-intro {
    max-width: 800px;
    margin: 100px auto;
    padding: 0 40px;
    line-height: 1.9;
    color: #333;
}

.home-intro h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.home-intro h2 {
    font-size: 1.1rem;
    font-weight: 400;
    color: #777;
    margin-bottom: 48px;
}

.home-intro p {
    font-size: 1rem;
    margin-bottom: 28px;
    text-align: justify;
}

.home-intro p:last-child {
    margin-bottom: 0;
}


.credits {
  max-width: 800px;
  margin: 120px auto 80px;
  padding: 0 40px;
  color: #333;
  line-height: 1.7;
}

.credits h2 {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 40px;
  letter-spacing: -0.02em;
}

.credit-group {
  margin-bottom: 28px;
}

.credit-group h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #777;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.credit-group p {
  font-size: 1rem;
  margin: 0;
  text-align: center;
}

.credit-group a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid #aaa;
}

.credit-group a:hover {
  color: #000;
  border-bottom-color: #000;
}

.copyright {
  margin-top: 50px;
  font-size: 0.85rem;
  color: #888;
}
