:root {
  color-scheme: light;
  --ink: #1f2933;
  --muted: #64717d;
  --line: #cfd7dc;
  --line-strong: #87949d;
  --paper: #ffffff;
  --surface: #f5f8f7;
  --surface-2: #edf3f1;
  --mint: #2f8f78;
  --mint-dark: #246f5e;
  --coral: #c45f50;
  --focus: #0b6bcb;
  --shadow: 0 10px 24px rgba(31, 41, 51, 0.11);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #eaf0ee;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, #f8fbfa 0, #eef4f2 220px, #eaf0ee 100%);
  font-size: 15px;
  line-height: 1.6;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
.file-button,
summary {
  -webkit-tap-highlight-color: transparent;
}

button,
.file-button {
  border: 1px solid #aab6bc;
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  min-height: 40px;
  padding: 8px 12px;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}

button:hover,
.file-button:hover {
  border-color: var(--mint);
  background: #f2faf7;
}

button:disabled {
  cursor: default;
  opacity: 0.5;
}

button:focus-visible,
.file-button:focus-within,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(11, 107, 203, 0.3);
  outline-offset: 2px;
}

input,
select,
textarea {
  display: block;
  width: 100%;
  min-width: 0;
  border: 1px solid #b8c3c8;
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  padding: 8px 9px;
}

textarea {
  resize: vertical;
}

input[aria-invalid="true"] {
  border-color: var(--coral);
  background: #fff7f5;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.site-shell {
  width: min(1200px, calc(100% - 32px));
  margin-inline: auto;
  padding: 16px 0 40px;
}

.workspace {
  display: grid;
  grid-template-columns: 500px 520px 148px;
  grid-template-rows: auto auto;
  gap: 16px;
  align-items: start;
}

.app-header {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  padding: 2px 2px 6px;
}

.back-link {
  color: var(--mint-dark);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.back-link::before {
  content: "← ";
}

.eyebrow {
  margin: 18px 0 2px;
  color: var(--mint-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.app-header h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.25;
  letter-spacing: 0;
}

.page-lead {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.view-tabs {
  display: none;
}

.editor-pane {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
}

.preview-pane {
  grid-column: 2;
  grid-row: 1 / span 2;
  position: sticky;
  top: 16px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-width: 0;
  height: calc(100vh - 32px);
}

.action-rail {
  grid-column: 3;
  grid-row: 1 / span 2;
  position: sticky;
  top: 16px;
  min-width: 0;
  max-height: calc(100vh - 32px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.92);
  padding: 10px;
  scrollbar-width: thin;
}

.form-section {
  margin: 0;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.form-section:first-of-type {
  border-top: 0;
}

.form-section h3,
.summary-title {
  margin: 0 0 12px;
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: 0;
}

.field-grid {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.field-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field-grid label,
.field-block {
  min-width: 0;
  color: #3a4650;
  font-size: 13px;
  font-weight: 700;
}

.field-grid label > span,
.field-block > span,
.line-field > span {
  display: block;
  margin-bottom: 4px;
}

.field-grid small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.field-wide,
.field-full {
  grid-column: 1 / -1;
}

.field-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.collapsible-section {
  padding: 0;
}

.section-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  list-style: none;
  cursor: pointer;
}

.section-summary::-webkit-details-marker {
  display: none;
}

.section-summary::before {
  content: "›";
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  color: var(--mint-dark);
  font-size: 22px;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform 150ms ease;
}

details[open] > .section-summary::before {
  transform: rotate(90deg);
}

.section-summary .summary-title {
  margin: 0;
}

.summary-meta {
  min-width: 0;
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-align: right;
}

.collapsible-content {
  padding: 0 0 18px 32px;
}

.mini-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.mini-actions button {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 12px;
}

.is-disabled {
  opacity: 0.58;
}

.section-heading-row,
.line-heading-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-heading-row {
  justify-content: space-between;
  margin-bottom: 12px;
}

.line-heading-copy h3,
.line-heading-copy p {
  margin: 0;
}

.line-count {
  color: var(--muted);
  font-size: 12px;
}

.amount-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid #aab6bc;
  border-radius: 6px;
  background: #fff;
  color: #34424b;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.amount-toggle input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--mint);
}

.primary-small,
.primary-button {
  border-color: var(--mint-dark);
  background: var(--mint-dark);
  color: #fff;
  font-weight: 800;
}

.primary-small:hover,
.primary-button:hover {
  border-color: #185344;
  background: #185344;
}

.line-editor {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.line-row {
  display: grid;
  grid-template-columns: 24px minmax(92px, 1fr) 54px 46px 70px 76px 32px;
  gap: 4px;
  align-items: end;
  min-width: 0;
  padding: 8px 0;
  border-top: 1px solid #dce3e6;
}

.line-row.is-amounts-hidden {
  grid-template-columns: 24px minmax(0, 1fr) 76px 66px 32px;
}

.line-number {
  align-self: center;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.line-field {
  min-width: 0;
  color: #4d5962;
  font-size: 10px;
  font-weight: 700;
}

.line-field input,
.line-field select {
  min-height: 38px;
  padding: 7px 6px;
  font-size: 12px;
}

.line-delete {
  width: 32px;
  min-height: 38px;
  padding: 0;
  color: var(--coral);
  font-size: 20px;
  line-height: 1;
}

.line-error {
  grid-column: 2 / -1;
  margin: 0;
  color: #a43d31;
  font-size: 11px;
}

.validation-summary,
.print-validation {
  padding: 10px;
  border-left: 3px solid var(--coral);
  background: #fff3f1;
  color: #8a342b;
  font-size: 12px;
}

.validation-summary {
  margin: 10px 0 0;
}

.action-rail-primary,
.action-rail-group {
  display: grid;
  gap: 7px;
}

.action-rail-primary {
  margin-bottom: 10px;
}

.action-rail button,
.action-rail .file-button {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 7px 6px;
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
  word-break: keep-all;
  overflow-wrap: normal;
}

.file-button {
  display: grid;
  place-items: center;
}

.file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.text-danger,
.danger-button {
  color: #a23d32;
}

.action-help {
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.action-help summary {
  color: var(--mint-dark);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.action-help-content {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.action-help-content p {
  margin: 7px 0 0;
}

.app-status {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.app-status.is-success {
  color: var(--mint-dark);
}

.app-status.is-error {
  color: #9b382e;
}

.print-validation {
  margin: 0 0 10px;
}

.print-validation p,
.print-validation ul {
  margin: 0;
}

.print-validation ul {
  padding-left: 18px;
}

.document-preview {
  container-type: inline-size;
  width: min(100%, calc((100vh - 32px) * 210 / 297));
  aspect-ratio: 210 / 297;
  min-height: calc(min(100%, calc((100vh - 32px) * 210 / 297)) * 297 / 210);
  padding: 5.7%;
  overflow: visible;
  color: #111;
  background: var(--paper);
  box-shadow: var(--shadow);
  font-family: "Yu Gothic", Meiryo, sans-serif;
  font-size: clamp(7.2px, 1.92cqw, 10px);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.document-preview [hidden] {
  display: none !important;
}

.document-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(118px, 34%);
  align-items: start;
  min-height: 15%;
  margin-bottom: 2.8%;
}

.document-title-row > h2 {
  grid-column: 1 / -1;
  grid-row: 1;
  margin: 0;
  font-size: 2.55em;
  line-height: 1.2;
  letter-spacing: 0.18em;
  text-align: center;
}

.document-meta {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  padding-top: 0.3em;
  font-size: 0.92em;
}

.document-meta div {
  display: grid;
  grid-template-columns: 5.5em minmax(0, 1fr);
  gap: 0.45em;
  margin-bottom: 0.35em;
}

.document-meta dt,
.document-meta dd {
  margin: 0;
}

.document-meta dd {
  text-align: right;
}

.document-top {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 5%;
  min-height: 23%;
  margin-bottom: 2.5%;
}

.recipient-block {
  align-self: start;
  border-bottom: 1px solid #222;
  padding: 0 0.4em 1em;
}

.recipient-block h3,
.recipient-block p,
.issuer-block h3,
.issuer-block p {
  margin: 0;
}

.recipient-block h3 {
  min-height: 1.6em;
  font-size: 1.55em;
  line-height: 1.4;
}

.recipient-block p {
  min-height: 1.5em;
  margin-top: 0.55em;
  font-size: 1.12em;
}

.issuer-block {
  align-self: start;
  font-size: 0.9em;
}

.issuer-block h3 {
  margin-bottom: 0.35em;
  font-size: 1.24em;
}

.issuer-block p {
  min-height: 1.25em;
}

.document-intro {
  margin: 0 0 2.1%;
  font-size: 1.05em;
}

.subject-block {
  margin-bottom: 3.1%;
}

.subject-block dl {
  margin: 0;
}

.subject-block dl > div {
  display: grid;
  grid-template-columns: 7.8em minmax(0, 1fr);
  border-bottom: 1px solid #9b9b9b;
  min-height: 2.25em;
}

.subject-block dt,
.subject-block dd {
  margin: 0;
  padding: 0.35em 0.45em;
}

.subject-block dt {
  font-weight: 700;
}

.subject-block .document-total-row dd {
  font-size: 1.35em;
  font-weight: 800;
  text-align: right;
}

.delivery-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-variant-numeric: tabular-nums;
}

.delivery-table th,
.delivery-table td {
  border: 1px solid #808080;
  padding: 0.42em 0.46em;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.delivery-table th {
  background: #d8d8d8;
  color: #111;
  font-weight: 700;
  text-align: center;
}

.delivery-table tbody tr {
  height: 2.7em;
}

.delivery-table .col-number {
  width: 6.5%;
  text-align: center;
  white-space: nowrap;
}

.delivery-table .col-quantity {
  width: 9.5%;
  text-align: right;
}

.delivery-table .col-unit {
  width: 8.5%;
  text-align: center;
}

.delivery-table .col-price {
  width: 15%;
  text-align: right;
}

.delivery-table .col-tax {
  width: 11.5%;
  text-align: center;
}

.delivery-table .col-amount {
  width: 16%;
  text-align: right;
}

.delivery-table.is-amounts-hidden .col-quantity {
  width: 14%;
}

.delivery-table.is-amounts-hidden .col-unit {
  width: 12%;
}

.document-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 42%);
  gap: 4%;
  align-items: start;
  margin-top: 3.2%;
}

.document-bottom.is-without-notes {
  grid-template-columns: minmax(150px, 42%);
  justify-content: end;
}

.document-bottom.is-without-totals {
  grid-template-columns: 1fr;
}

.document-bottom.is-without-notes.is-without-totals {
  display: none;
}

.document-notes {
  border: 1px solid #8b8b8b;
  min-height: 7em;
}

.document-notes h3 {
  margin: 0;
  padding: 0.45em 0.7em;
  background: #d8d8d8;
  font-size: 1em;
}

.document-notes p {
  margin: 0;
  padding: 0.6em 0.7em;
  white-space: pre-wrap;
}

.totals-group dl {
  margin: 0;
}

.totals-group div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(5.8em, 0.75fr);
  border-bottom: 1px solid #8b8b8b;
}

.totals-group dt,
.totals-group dd {
  margin: 0;
  padding: 0.4em 0.3em;
}

.totals-group dd {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.totals-group .grand-total {
  border-top: 2px solid #222;
  border-bottom: 2px double #222;
  font-size: 1.15em;
  font-weight: 800;
}

.multiline {
  white-space: pre-wrap;
}

.ad-row,
.comment-placeholder,
.return-links,
.app-footer {
  margin-top: 26px;
}

.ad-row {
  min-height: 94px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  color: var(--muted);
  text-align: center;
}

.ad-row p {
  margin: 0;
  font-size: 10px;
  font-weight: 800;
}

.ad-placeholder {
  min-height: 54px;
}

.return-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 22px;
}

.return-links a {
  color: var(--mint-dark);
  font-weight: 700;
}

.app-footer {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.print-document {
  display: none;
}

@media (max-width: 1279px) {
  .site-shell {
    width: min(760px, calc(100% - 32px));
    padding-top: 12px;
  }

  .workspace {
    display: block;
  }

  .app-header {
    margin-bottom: 14px;
  }

  .view-tabs {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    margin: 0 0 14px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: rgba(248, 251, 250, 0.96);
    backdrop-filter: blur(8px);
  }

  .view-tab {
    min-height: 42px;
    border-color: transparent;
    background: transparent;
    font-weight: 800;
  }

  .view-tab.is-active {
    border-color: var(--mint-dark);
    background: #fff;
    color: var(--mint-dark);
  }

  .editor-pane,
  .preview-pane,
  .action-rail {
    position: static;
    width: 100%;
    max-height: none;
    height: auto;
    overflow: visible;
    scroll-margin-top: 72px;
  }

  .workspace[data-active-view="input"] .preview-pane,
  .workspace[data-active-view="input"] .action-rail,
  .workspace[data-active-view="preview"] .editor-pane,
  .workspace[data-active-view="preview"] .action-rail,
  .workspace[data-active-view="actions"] .editor-pane,
  .workspace[data-active-view="actions"] .preview-pane {
    display: none;
  }

  .preview-pane {
    display: flex;
    justify-content: center;
  }

  .document-preview {
    width: min(100%, 650px);
    min-height: calc(min(100%, 650px) * 297 / 210);
    aspect-ratio: auto;
  }

  .action-rail {
    border-radius: 7px;
    padding: 14px;
  }

  .action-rail-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .action-rail-primary .primary-button {
    min-height: 48px;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 14px;
  }

  .site-shell {
    width: min(100% - 24px, 760px);
  }

  .app-header h1 {
    font-size: 27px;
  }

  .page-lead {
    font-size: 13px;
  }

  .field-grid-2,
  .field-grid-3 {
    grid-template-columns: 1fr;
  }

  .collapsible-content {
    padding-left: 0;
  }

  .section-summary {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .summary-meta {
    width: calc(100% - 32px);
    margin: -8px 0 0 32px;
    text-align: left;
  }

  .section-heading-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .line-heading-actions {
    width: 100%;
    justify-content: space-between;
  }

  .line-row,
  .line-row.is-amounts-hidden {
    grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1fr) 38px;
    gap: 8px;
    padding: 12px 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.72);
  }

  .line-number {
    grid-column: 1;
    grid-row: 1;
  }

  .line-field-description {
    grid-column: 2 / 4;
    grid-row: 1;
  }

  .line-delete {
    grid-column: 4;
    grid-row: 1;
  }

  .line-field-quantity {
    grid-column: 1 / 3;
  }

  .line-field-unit {
    grid-column: 3 / 5;
  }

  .line-field-price {
    grid-column: 1 / 3;
  }

  .line-field-tax {
    grid-column: 3 / 5;
  }

  .line-error {
    grid-column: 1 / -1;
  }

  .document-preview {
    font-size: clamp(6.8px, 2.7cqw, 9px);
  }
}

@media (max-width: 480px) {
  .site-shell {
    width: calc(100% - 24px);
  }

  .app-header h1 {
    font-size: 25px;
  }

  .view-tabs {
    margin-inline: -2px;
  }

  .line-heading-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .amount-toggle {
    min-width: 0;
    padding-inline: 7px;
  }

  .primary-small {
    min-width: 0;
    padding-inline: 8px;
  }

  .action-rail {
    padding: 12px;
  }

  .action-rail-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .action-rail button,
  .action-rail .file-button {
    min-height: 42px;
  }

  .document-preview {
    width: 100%;
    min-height: calc((100vw - 24px) * 297 / 210);
  }
}

@media (max-width: 360px) {
  .site-shell {
    width: calc(100% - 20px);
  }

  .app-header h1 {
    font-size: 23px;
  }

  .view-tab {
    padding-inline: 5px;
  }

  .amount-toggle,
  .primary-small {
    font-size: 11px;
  }

  .document-preview {
    min-height: calc((100vw - 20px) * 297 / 210);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

.print-document.is-measuring {
  display: block;
  position: fixed;
  left: -10000px;
  top: 0;
  width: 210mm;
  visibility: hidden;
  pointer-events: none;
}

.print-page {
  position: relative;
  width: 210mm;
  height: 297mm;
  padding: 12mm 15mm;
  overflow: hidden;
  color: #111;
  background: #fff;
  font-family: "Yu Gothic", Meiryo, sans-serif;
  font-size: 9.3pt;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.print-page-content {
  height: 267mm;
  overflow: hidden;
}

.print-page-number {
  position: absolute;
  right: 15mm;
  bottom: 5mm;
  font-size: 8pt;
  font-variant-numeric: tabular-nums;
}

.print-page .document-title-row {
  min-height: 28mm;
  margin-bottom: 4mm;
}

.print-page .document-title-row > h2 {
  font-size: 20pt;
}

.print-page .document-meta {
  font-size: 8.5pt;
}

.print-page .document-top {
  min-height: 38mm;
  margin-bottom: 4mm;
}

.print-page .recipient-block h3 {
  font-size: 13pt;
}

.print-page .issuer-block {
  font-size: 8.2pt;
}

.print-page .issuer-block h3 {
  font-size: 10.5pt;
}

.print-page .document-intro {
  margin-bottom: 3mm;
}

.print-page .subject-block {
  margin-bottom: 5mm;
}

.print-page .subject-block dl > div {
  min-height: 6mm;
}

.print-page .delivery-table th,
.print-page .delivery-table td {
  padding: 1.3mm 1.4mm;
}

.print-page .delivery-table tbody tr {
  height: 7.2mm;
  break-inside: avoid;
  page-break-inside: avoid;
}

.print-page .document-bottom {
  margin-top: 5mm;
  break-inside: avoid;
  page-break-inside: avoid;
}

.print-page .document-notes {
  min-height: 25mm;
}

.print-page.is-condensed .delivery-table th,
.print-page.is-condensed .delivery-table td {
  padding-top: 0.9mm;
  padding-bottom: 0.9mm;
}

.print-page.is-condensed .delivery-table tbody tr {
  height: 6.1mm;
}

.print-page.is-condensed .document-notes {
  min-height: 18mm;
}

.print-continuation-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(70mm, 0.9fr);
  gap: 8mm;
  align-items: start;
  margin-bottom: 6mm;
  border-bottom: 1px solid #555;
  padding-bottom: 3mm;
}

.print-continuation-header h2 {
  margin: 0;
  font-size: 15pt;
  letter-spacing: 0;
}

.print-continuation-header dl,
.print-continuation-header dt,
.print-continuation-header dd {
  margin: 0;
}

.print-continuation-header dl > div {
  display: grid;
  grid-template-columns: 25mm minmax(0, 1fr);
  gap: 2mm;
}

.print-continuation-header dd {
  text-align: right;
}

@page {
  size: A4 portrait;
  margin: 0;
}

@media print {
  html,
  body {
    width: 210mm;
    min-width: 210mm;
    margin: 0;
    padding: 0;
    background: #fff;
  }

  body > *:not(.print-document),
  .no-print {
    display: none !important;
  }

  .print-document {
    display: block !important;
  }

  .print-page {
    break-after: page;
    page-break-after: always;
  }

  .print-page:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  .print-page-content,
  .print-page {
    overflow: hidden;
  }

  .delivery-table thead {
    display: table-header-group;
  }
}
