/* =============================================================
   만나는 날 한 장 (가이드 B14)
   화면에서는 A4 모양으로 보여 주고, 인쇄하면 A4 한 장에 들어간다.
   종이 크기는 mm·pt로 잡는다. 화면의 종이 안쪽 폭(190mm)과 인쇄 폭이 같다.
   공개 페이지라 styles.css를 쓰지 않고 혼자 선다. 색과 글꼴 값은 styles.css의 토큰과 같게 둔다.
   ============================================================= */
@page { size: A4; margin: 9mm 10mm; }

:root {
  --bg: #f6f7f9; --line: #e4e7ec; --text: #1d2433; --muted: #667085; --accent: #1f4e8c;
  --shadow: 0 1px 2px rgb(16 24 40 / 5%);
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  font-size: 15px; line-height: 1.55;
}
.hint { color: var(--muted); font-size: 12.5px; }
.btn {
  font: inherit; font-weight: 600; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--accent); background: var(--accent); color: #fff; padding: 9px 14px;
}
.btn:hover { filter: brightness(1.08); }

.sheet-toolbar {
  max-width: 210mm; margin: 14px auto 10px; padding: 0 12px;
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
}
.sheet-toolbar strong { color: var(--accent); }
.sheet-toolbar .hint { flex: 1; min-width: 200px; }

.sheet {
  width: 210mm; max-width: calc(100% - 24px); margin: 0 auto 28px; padding: 9mm 10mm;
  background: #fff; color: #111; border: 1px solid var(--line); box-shadow: var(--shadow);
  font-size: 8.6pt; line-height: 1.36; word-break: keep-all; overflow-wrap: anywhere;
  display: flex; flex-direction: column; min-height: 297mm;
}
.sheet p { margin: 0; }

.sheet-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8mm;
  border-bottom: 1.5pt solid #111; padding-bottom: 1.2mm;
}
.sheet-head h1 { font-size: 15pt; line-height: 1.2; margin: 0; }
.sheet-brand { font-size: 7.6pt; color: #444; white-space: nowrap; }
.sheet-lead { padding-top: 1.4mm; font-size: 9pt; }

/* 위에 적는 칸: 이름표는 작게, 아래 줄 위에 손으로 적는다 */
.sheet-fields {
  display: grid; grid-template-columns: 0.8fr 1.7fr 0.9fr 1.5fr; column-gap: 5mm;
  margin-top: 1.6mm;
}
.sheet-fields div { height: 8.5mm; border-bottom: 0.6pt solid #111; }
.sheet-fields span { font-size: 7.4pt; color: #444; }
.sheet-bring { padding: 1.8mm 0; font-size: 8.8pt; }

.sheet-items {
  list-style: none; margin: 0; padding: 0; counter-reset: sheet-item;
  border-top: 0.8pt solid #111;
}
.sheet-items li {
  counter-increment: sheet-item;
  display: grid; grid-template-columns: 5mm 1fr 52mm; column-gap: 2mm;
  padding: 1.1mm 0; border-bottom: 0.5pt solid #888; break-inside: avoid;
}
.sheet-items li::before { content: counter(sheet-item); font-size: 10.5pt; font-weight: 700; line-height: 1.25; }
.sheet-ask strong { display: block; font-size: 9.8pt; line-height: 1.3; }
.sheet-ask p { padding-top: 0.5mm; color: #222; }

/* 적는 칸: 표시 두 줄 + 남는 높이는 메모 */
.sheet-record {
  display: flex; flex-direction: column; gap: 0.9mm; min-height: 17mm;
  border-left: 0.5pt solid #888; padding-left: 2mm; font-size: 8pt;
}
.sheet-marks { display: flex; align-items: center; gap: 2.5mm; white-space: nowrap; }
.sheet-mark { display: inline-flex; align-items: center; gap: 1.2mm; }
.sheet-mark i { flex: none; width: 2.8mm; height: 2.8mm; border: 0.6pt solid #111; }
.sheet-date i { display: inline-block; width: 5mm; height: 3mm; border-bottom: 0.5pt solid #111; }
.sheet-memo { flex: 1; color: #555; }

/* 남는 높이를 모두 차지하는 빈칸. 글꼴이 달라 내용이 길어지면 이 칸이 줄어 한 장을 지킨다. */
.sheet-notes { flex: 1; min-height: 10mm; padding-top: 1.2mm; border-bottom: 0.8pt solid #111; font-size: 7.6pt; color: #444; }

.sheet-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 6mm; padding-top: 1.6mm; font-size: 7.4pt; color: #222; }
.sheet-foot small { font-size: 7.2pt; color: #444; white-space: nowrap; }

/* 좁은 화면: 적는 칸을 항목 아래로 내린다 */
@media screen and (max-width: 640px) {
  .sheet { padding: 16px 14px; font-size: 13px; min-height: 0; }
  .sheet-head h1 { font-size: 20px; }
  .sheet-brand { display: none; }
  .sheet-lead, .sheet-bring { font-size: 13px; }
  .sheet-fields { grid-template-columns: 1fr 1fr; row-gap: 6px; }
  .sheet-fields div { height: auto; min-height: 34px; padding-bottom: 14px; }
  .sheet-fields span, .sheet-foot, .sheet-foot small, .sheet-notes { font-size: 11.5px; }
  .sheet-notes { min-height: 80px; }
  .sheet-items li { grid-template-columns: 20px 1fr; padding: 10px 0; }
  .sheet-items li::before { font-size: 15px; }
  .sheet-ask strong { font-size: 14.5px; }
  .sheet-record { grid-column: 2; border-left: 0; padding-left: 0; margin-top: 8px; min-height: 0; font-size: 12.5px; gap: 6px; }
  .sheet-mark i { width: 13px; height: 13px; }
  .sheet-date i { width: 28px; height: 14px; }
  .sheet-memo { min-height: 30px; border: 1px dashed var(--line); border-radius: 6px; padding: 2px 6px; }
  .sheet-foot { flex-direction: column; align-items: flex-start; }
}

@media print {
  html, body { background: #fff; }
  .sheet-toolbar { display: none; }
  /* 인쇄 영역 높이는 279mm다. 그보다 조금 낮게 잡아 다음 장으로 넘어가지 않게 한다. */
  .sheet { width: auto; max-width: none; min-height: 272mm; margin: 0; padding: 0; border: 0; box-shadow: none; }
}
