/* Keep printed教材 visually identical to the on-screen A4 preview. */
.sheet {
  min-height: 0;
  overflow: hidden;
  padding-bottom: 58px;
}

.sheet > *,
.card-picture img {
  min-width: 0;
  min-height: 0;
}

.sheet,
.list-sheet,
.illustration-sheet {
  position: relative;
}

.list-sheet,
.position-list-sheet,
.illustration-sheet {
  padding-bottom: 58px;
}

.sheet::after,
.list-sheet::after,
.illustration-sheet::after {
  content: "";
  position: absolute;
  z-index: 3;
  right: 32px;
  bottom: 8px;
  width: 210px;
  height: 41px;
  transform: none;
  background: url("assets/peace-kyozai-mark.png") center / contain no-repeat;
  pointer-events: none;
}

@media print {
  html,
  body,
  .sheet,
  .list-sheet,
  .illustration-sheet {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  #preview,
  #selectedListPreview,
  #illustrationListPreview {
    gap: 0;
  }

  /* 絵カード */
  .sheet {
    width: 210mm;
    height: 297mm;
    margin: 0;
    padding: 24px 24px 58px;
    gap: 9px;
    box-shadow: none;
  }

  .card-label { font-size: 29px; }
  .layout-9 .card-label,
  .layout-12 .card-label { font-size: 26px; }

  /* 折って作る表裏カード */
  .sheet.fold-sheet { gap: 12px; }
  .fold-face { padding: 12px; }
  .fold-word strong { font-size: 55px; }
  .face-tag,
  .fold-line span { display: block !important; }
  .fold-line span { font-size: 9px; }
  .face-tag { top: 7px; left: 8px; font-size: 9px; }

  /* 選択語彙リスト */
  .list-sheet {
    width: 210mm;
    min-height: 297mm;
    margin: 0;
    padding: 48px 52px 58px;
    box-shadow: none;
  }

  .selected-list-table th,
  .selected-list-table td { padding: 8px 10px; }

  .position-list-sheet { padding: 34px 38px 58px; }
  .position-list-table { font-size: 10px; }
  .position-list-table th { padding: 6px; font-size: 11px; }
  .position-list-table td { height: 58px; padding: 6px 7px; }
  .mora-group b { font-size: 9px; }

  .target-sound {
    padding: 0 1px;
    border-bottom: 1.5px solid currentColor;
    background: #ffec9e;
    color: #342c10;
  }

  .sound-section-row th {
    padding: 7px 9px;
    background: #dfeee7 !important;
    color: #255d49;
    font-size: 11px;
  }

  .density-relaxed .position-list-table td { height: 72px; font-size: 10.5px; }
  .density-compact .position-list-table td { height: 45px; padding: 4px 5px; font-size: 8.5px; }
  .density-relaxed .selected-list-table td { height: 43px; }
  .density-compact .selected-list-table th,
  .density-compact .selected-list-table td { padding: 5px 7px; }
  .density-compact .selected-list-table td { height: 28px; }

  /* イラストリスト */
  .illustration-sheet {
    width: 210mm;
    height: 297mm;
    margin: 0;
    padding: 32px 32px 58px;
    box-shadow: none;
  }

  .illustration-sheet > header { height: 42px; margin-bottom: 12px; }
  .illustration-grid { height: calc(100% - 54px); gap: 7px; }
  .size-compact .illustration-grid { gap: 5px; }
  .illustration-item { padding: 5px; border-radius: 5px; }
  .illustration-label { font-size: 13px; }
  .size-large .illustration-label { font-size: 16px; }
  .size-compact .illustration-label { font-size: 10px; }
  .illustration-sound-info { font-size: 8px; }
  .sound-detail b { font-size: 9px; }
  .size-large .illustration-sound-info { font-size: 10px; }
  .size-large .sound-detail b { font-size: 11px; }
  .size-compact .illustration-sound-info { font-size: 7px; }
  .size-compact .sound-detail b { font-size: 8px; }
}
