/* TECH-DOC-PAGE-BOUNDARY-01 - visible A4 page breaks for pdf2htmlEX HTML.
 * Large bottom whitespace (e.g. before 그림 2) must read as a page break, not a layout hole.
 */
@media screen {
  #page-container {
    counter-reset: nmti-pdf-page;
    padding-bottom: 20px !important;
    background: #dbe4ec !important;
  }

  .pf {
    counter-increment: nmti-pdf-page;
    position: relative;
    box-shadow: 0 0 0 1px #94a3b8 !important;
    background-color: #fff;
  }

  /* Gap + explicit page-break marker between pages */
  .pf + .pf {
    margin-top: 28px !important;
  }

  .pf + .pf::before {
    content: "페이지 나눔 · " counter(nmti-pdf-page);
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    top: -22px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #475569;
    background: #dbe4ec;
    border-top: 1px dashed #94a3b8;
    border-bottom: 1px dashed #94a3b8;
    z-index: 5;
    pointer-events: none;
  }

  /* First page label (optional clarity) */
  .pf:first-child::after {
    content: "페이지 1";
    display: block;
    position: absolute;
    left: 8px;
    top: 6px;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    background: rgba(248, 250, 252, 0.92);
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    z-index: 5;
    pointer-events: none;
  }
}

@media screen and (max-width: 768px) {
  #page-container {
    padding-bottom: 12px !important;
  }

  .pf + .pf {
    margin-top: 18px !important;
  }

  .pf + .pf::before {
    top: -16px;
    height: 16px;
    line-height: 16px;
    font-size: 10px;
  }
}

@media print {
  .pf + .pf::before,
  .pf:first-child::after {
    display: none !important;
  }

  .pf + .pf {
    margin-top: 0 !important;
  }
}
