/* ============================================================
 * 鬼灭の刃全息图鉴库 · print.css（T05 定稿）
 * 打印 / 导出预览专用。
 * 目标：交互壳退场、纸面可读、主题色保留、卡片不断页。
 * ============================================================ */

@media print {
  body {
    background: #ffffff;
    background-image: none;
    color: var(--ink);
    font-size: 12px;
  }

  /* 交互壳与操作区一律退场 */
  .km-banner,
  .km-nav,
  .km-footer,
  .km-frames__controls,
  .km-detail__actions,
  .km-export__opts,
  .km-search__input,
  .km-quiz .km-btn,
  .km-quiz__choices .km-choice:disabled {
    display: none !important;
  }

  .km-main {
    max-width: none;
    width: 100%;
    padding: 0;
  }

  /* 保留主题色与纸底（打印配色修正） */
  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* 不断页 */
  .km-card,
  .km-detail__hero,
  .km-detail__section,
  .km-field,
  .km-status__row,
  .km-notfound,
  .km-quiz__question,
  .km-quiz__explain {
    break-inside: avoid;
  }

  .km-card-wall {
    grid-template-columns: repeat(3, 1fr);
  }

  .km-detail__hero {
    grid-template-columns: 240px 1fr;
  }

  .km-detail__fields {
    grid-template-columns: 1fr 1fr;
  }

  .km-detail__gallery {
    grid-template-columns: repeat(4, 1fr);
  }

  a {
    color: var(--ink);
    text-decoration: none;
  }

  .km-chip {
    border-color: var(--ink-faint);
  }

  .km-export {
    border: none;
    padding: 0;
  }

  .km-export__preview {
    max-width: 480px;
  }

  /* 对照卡分隔线打印时居中固定 */
  .km-frames__divider {
    left: 50% !important;
  }

  .km-frames__pane-label {
    border: 1px solid var(--ink-faint);
  }

  @page {
    margin: 14mm;
  }
}
