.print-list-page { background: var(--bg); min-height: 100vh; }

/* ── コントロール（画面のみ） ─── */
.print-list-controls {
  max-width: 860px;
  margin: 0 auto;
  padding: 1.5rem 1rem 1rem;
}
.controls-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.controls-header h1 { font-size: 1.1rem; font-weight: 700; }
.btn-secondary-dark {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.9rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.875rem;
  text-decoration: none;
  white-space: nowrap;
}
.btn-secondary-dark:hover { border-color: var(--primary); color: var(--primary); }

.controls-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
}
.sku-input-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.sku-input-wrap { margin-bottom: 0.875rem; }
.sku-input-wrap textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: monospace;
  resize: none;
  overflow: hidden;
  min-height: 80px;
}
.sku-input-wrap textarea:focus { outline: none; border-color: var(--primary); }
.controls-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.btn-preview {
  padding: 0.5rem 1.25rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.btn-preview:hover { background: var(--primary-hover); }
.btn-print-list {
  padding: 0.5rem 1.25rem;
  background: var(--success);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
}
.btn-print-list:hover { background: #15803d; }
.result-count {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.not-found-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-top: 0.75rem;
  font-size: 0.82rem;
}
.not-found-label { color: var(--danger); font-weight: 600; white-space: nowrap; }
.not-found-list { font-family: monospace; color: var(--danger); }

/* ── テーブル ─── */
.print-area {
  max-width: 1200px;
  margin: 1rem auto 2rem;
  padding: 0 1rem;
}
.no-result {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}
.print-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  background: white;
  table-layout: fixed;
}
.print-table col.col-sku      { width: 90px; }
.print-table col.col-name     { width: 112px; }
.print-table col.col-qty      { width: 42px; }
.print-table col.col-overview { width: auto; }
.print-table col.col-notes    { width: auto; }

.print-table th {
  background: #334155;
  color: white;
  padding: 0.55rem 0.75rem;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid #475569;
  white-space: nowrap;
}
.print-table th:nth-child(3),
.print-table td.col-qty { padding-left: 0.3rem; padding-right: 0.3rem; }
.print-table td {
  padding: 0.55rem 0.75rem;
  border: 1px solid #cbd5e1;
  vertical-align: top;
  word-break: break-all;
  line-height: 1.6;
}
.print-table td.col-sku      { font-family: monospace; font-weight: 700; word-break: break-all; white-space: normal; }
.print-table td.col-overview,
.print-table td.col-notes    { font-size: 0.75rem; }
.print-table td.col-qty  { text-align: center; }
.print-table tbody tr:nth-child(even) td { background: #f8fafc; }
.print-table tbody tr:hover td { background: #eff6ff; }
.row-not-found td { color: var(--text-muted); font-style: italic; }

/* ── フッター ─── */
.print-footer { display: none; }

/* ── 印刷用 ─── */
@media print {
  @page { size: A4 landscape; margin: 5mm 5mm 12mm; }
  .no-print { display: none !important; }
  .print-area { max-width: 100%; margin: 0; padding: 0; }
  .print-table { font-size: 8.5pt; line-height: 1.3; }
  .print-table th { background: #334155 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-table tbody tr:nth-child(even) td { background: #f8fafc !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-table td, .print-table th { padding: 0.3rem 0.5rem; line-height: 1.3; }
  .print-table tbody tr { page-break-inside: avoid; }
  .print-table td.col-overview,
  .print-table td.col-notes { font-size: 6.5pt; line-height: 1.25; padding: 0.25rem 0.4rem; }
  .print-table td.col-overview *,
  .print-table td.col-notes * { font-size: 6.5pt; line-height: 1.25; margin: 0; }

  .print-footer {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    justify-content: space-between;
    font-size: 7.5pt;
    color: #555;
    border-top: 0.5pt solid #ccc;
    padding: 1.5mm 3mm 0;
    background: white;
    counter-increment: page;
  }
  #footerPage::after { content: "P." counter(page); }
}
