/* Document-only styling: screen preview and native A4 print share these rules. */
#sheet {
  width: 794px; min-height: 1123px; background: #fff;
  box-shadow: var(--shadow-lg); position: absolute; top: 0; left: 0;
  transform: scale(var(--sheet-scale, .5)); transform-origin: top left;
  overflow-wrap: anywhere;
}
.bd { width: 100%; min-height: 1123px; padding: 56px 60px; position: relative; }
.bd * { box-sizing: border-box; }
.bd-om { text-align: center; font-size: 26px; margin: 0 0 6px; }
.bd-title { text-align: center; margin: 0 0 4px; }
.bd-name-head { text-align: center; margin: 0; line-height: 1.3; }
.bd-photo-wrap { display: flex; justify-content: center; margin: 22px 0 8px; break-inside: avoid; }
.bd-photo { width: 150px; height: 180px; object-fit: cover; border-radius: 8px; }
.bd-section-title { margin: 26px 0 10px; break-after: avoid; page-break-after: avoid; break-inside: avoid; }
table.bd-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
table.bd-table td { padding: 7px 4px; font-size: 14px; vertical-align: top; line-height: 1.4; }
table.bd-table td.k { width: 42%; color: #444; }
table.bd-table td.v { font-weight: 600; white-space: pre-wrap; }
table.bd-table tr + tr td { border-top: 1px solid #eee; }
table.bd-table tr { break-inside: avoid; page-break-inside: avoid; }
.bd-about { font-size: 14px; line-height: 1.55; margin: 6px 0 0; white-space: pre-wrap; }
.bd-footer { margin-top: 34px; text-align: center; font-size: 11.5px; padding-bottom: 12px; }

/* Traditional: warm gold and maroon, familiar serif typography. */
.t-traditional { font-family: "Times New Roman", Georgia, serif; }
.t-traditional .bd { border: 3px double var(--gold); margin: 14px; width: calc(100% - 28px); min-height: 1095px; padding: 44px 52px; }
.t-traditional .bd-om { color: var(--maroon); }
.t-traditional .bd-title { font-size: 15px; letter-spacing: .28em; text-transform: uppercase; color: #947123; font-weight: 700; }
.t-traditional .bd-name-head { font-size: 30px; font-weight: 700; color: var(--maroon); letter-spacing: normal; }
.t-traditional .bd-photo { border: 3px solid var(--gold); }
.t-traditional .bd-section-title { font-size: 16px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--maroon); border-bottom: 2px solid var(--gold); padding-bottom: 5px; }
.t-traditional table.bd-table td.v { color: #2a2a2a; }
.t-traditional .bd-footer { color: var(--maroon); border-top: 1px solid var(--gold); padding-top: 8px; }

/* Modern: the app's violet-to-coral accent. Photo stays clear of the name. */
.t-modern { font-family: "DM Sans", sans-serif; }
.t-modern .bd { padding: 0; }
.t-modern .bd-band { background: linear-gradient(135deg, var(--violet) 0%, var(--coral) 120%); color: #fff; padding: 40px 56px 30px; }
.t-modern .bd-inner { padding: 26px 56px; }
.t-modern .bd-om { color: #fff; font-size: 20px; margin-bottom: 2px; }
.t-modern .bd-title { color: #fff; font-size: 12.5px; letter-spacing: .22em; text-transform: uppercase; font-weight: 700; }
.t-modern .bd-name-head { color: #fff; font-size: 32px; font-weight: 700; letter-spacing: -.01em; }
.t-modern .bd-photo-wrap { margin: 0 0 18px; }
.t-modern .bd-photo { width: 140px; height: 168px; border: 5px solid #fff; box-shadow: var(--shadow-md); }
.t-modern .bd-section-title { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--violet-600); }
.t-modern .bd-section-title::after { content: ""; display: block; width: 46px; height: 3px; background: var(--coral); border-radius: 3px; margin-top: 6px; }
.t-modern table.bd-table td.k { color: var(--ink-3); }
.t-modern .bd-footer { color: var(--ink-3); margin-inline: 56px; }

/* Minimal: quiet rules and editorial serif headings. */
.t-minimal { font-family: "DM Sans", sans-serif; color: #1a1a1a; }
.t-minimal .bd-title { font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: #64748B; }
.t-minimal .bd-name-head { font-family: Georgia, "Times New Roman", serif; font-size: 34px; font-weight: 700; letter-spacing: -.5px; }
.t-minimal .bd-om { color: #333; }
.t-minimal .bd-photo { border: 1px solid #e5e5e5; }
.t-minimal .bd-section-title { font-family: Georgia, "Times New Roman", serif; font-size: 20px; font-weight: 600; border-bottom: 1px solid #e5e5e5; padding-bottom: 6px; }
.t-minimal table.bd-table td.k { color: #64748B; }
.t-minimal .bd-footer { color: #64748B; border-top: 1px solid #eee; padding-top: 8px; }

#printFrame { display: none; }
@media print {
  @page { size: A4; margin: 15mm; }
  body { background: #fff !important; }
  .skip-link, .svg-defs, .site-header, .page-head, .workflow, noscript,
  .editor, .preview-bar, .preview-empty, .download-card, .app-banner, .site-footer { display: none !important; }
  .workspace { display: block !important; width: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important; }
  .preview-wrap { position: static !important; margin: 0 !important; }
  .preview-canvas { display: block !important; overflow: visible !important; max-height: none !important; background: #fff !important; border: none !important; border-radius: 0 !important; padding: 0 !important; }
  .sheet-stage { height: auto !important; aspect-ratio: auto !important; overflow: visible !important; }
  #sheet { position: static !important; transform: none !important; margin: 0 !important; box-shadow: none !important; width: 100% !important; min-height: 0 !important; }
  #sheet, #sheet * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  #sheet .bd { min-height: 0 !important; width: 100% !important; margin: 0 !important; border: none !important; }

  /* Fixed side rails repeat per page. In-flow top/bottom bars appear once. */
  #printFrame { display: block !important; position: fixed; inset: 0; z-index: 9999; pointer-events: none; }
  .print-t-traditional #printFrame { border-left: 3px double var(--gold); border-right: 3px double var(--gold); }
  .print-t-traditional #sheet .bd { padding: 16px 20px !important; border-top: 3px double var(--gold) !important; border-bottom: 3px double var(--gold) !important; }
  .print-t-modern #printFrame { border-top: 6px solid var(--violet); }
  .print-t-modern #sheet .bd { padding-top: 10px !important; }
  .t-modern .bd-band { break-inside: avoid; }
  .print-t-minimal #printFrame { border-top: 2px solid #e5e5e5; }
  .print-t-minimal #sheet .bd { padding-top: 10px !important; }
}
