
.sheet-paper { border: 1px solid currentColor; padding: 1rem; }
.sheet-paper h3 { margin-block: .9rem .35rem; }
.sheet-row { display: grid; gap: .55rem; margin-block: .6rem; grid-template-columns: 1fr; }
.sheet-row:not(.sheet-layout-full,.sheet-layout-map,.sheet-layout-gallery,.sheet-layout-narrative) { grid-template-columns: repeat(auto-fit,minmax(min(100%,12rem),1fr)); }
.sheet-layout-timeline,.sheet-layout-ledger { border-block-end: 1px solid; padding-block-end: .4rem; }
.sheet-layout-cut { outline: 1px dashed; outline-offset: .15rem; margin-block: 1rem; padding: .5rem; }
.sheet-row.sheet-layout-cut { grid-template-columns: repeat(auto-fit,minmax(min(100%,15rem),1fr)); }
.sheet-layout-branches .sheet-field { border-block-start: 2px solid; }
.sheet-field { display: flex; flex-direction: column; gap: .2rem; min-width: 0; margin: 0; }
.sheet-field > span:first-child { font-weight: 600; }
.sheet-field textarea { font: inherit; padding: .35rem; max-width: 100%; min-width: 0; width: 100%; box-sizing: border-box; resize: vertical; }
.sheet-field input:not([type=checkbox]) { width: 100%; box-sizing: border-box; }
.sheet-check input { align-self: flex-start; min-height: 24px; }
.sheet-layout-gallery textarea { min-height: 11rem; }
.sheet-map-grid { display: grid; grid-template-columns: repeat(11,minmax(0,1fr)); border-inline-start: 1px solid; border-block-start: 1px solid; }
.sheet-map-grid i { aspect-ratio: 1; border-inline-end: 1px solid; border-block-end: 1px solid; }
.sheet-layout-narrative textarea { min-height: 7rem; }
.sheet-controls { margin-block-start: 1rem; }
.sheet-controls button { margin-inline-end: .35rem; }
.sheet-value { display: none; }
@page { margin: 13mm; }
@media print {
  body { color: #000; background: #fff; font-size: 10pt; }
  body > :not(main), #main > :not(.worksheet-wrap), .worksheet-wrap noscript, .sheet-controls { display: none !important; }
  .worksheet-wrap, #main { padding: 0; margin: 0; width: 100%; max-width: none; }
  .sheet-paper { padding: 0 .6mm; border: 0; }
  .sheet-paper h2 { font-size: 16pt; }
  .sheet-paper h3 { font-size: 11pt; break-after: avoid; }
  .sheet-row,.sheet-field { break-inside: avoid; }
  .sheet-row:not(.sheet-layout-full,.sheet-layout-map,.sheet-layout-gallery,.sheet-layout-narrative) { grid-template-columns: repeat(auto-fit,minmax(39mm,1fr)); }
  .sheet-row.sheet-layout-cut { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .sheet-field input,.sheet-field textarea { display: none !important; }
  .sheet-value { display: block; white-space: pre-wrap; overflow-wrap: anywhere; border: 1px solid #444; min-height: 7mm; padding: 1mm 2mm; }
  .sheet-text .sheet-value { min-height: 15mm; }
  .sheet-sketch .sheet-value { min-height: 30mm; }
  .sheet-layout-strip .sheet-sketch .sheet-value { min-height: 56mm; }
  .sheet-layout-gallery .sheet-value { min-height: 94mm; }
  .sheet-layout-map .sheet-value { min-height: 7mm; }
  .sheet-layout-narrative .sheet-value { min-height: 52mm; }
  .sheet-check .sheet-value { border: 0; min-height: 0; }
}
