/* === 打印样式（导出PDF时生效） === */

.print-header,
.print-footer {
  display: none;
}

@media print {
  @page {
    size: A4;
    margin: 8mm;
  }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .toolbar {
    display: none !important;
  }

  .side-tabs,
  .side-tab {
    display: none !important;
  }

  .sidebar,
  .sidebar-overlay {
    display: none !important;
  }

  .recording-bar {
    display: none !important;
  }

  .countin-overlay {
    display: none !important;
  }

  .results-panel {
    display: none !important;
  }

  body {
    background: #fff;
  }

  body::before {
    display: none;
  }

  .sheet {
    padding: 0;
    max-width: none;
    width: 1128px;
    margin: 0;
    zoom: 0.65;
  }

  .sheet-title {
    display: none;
  }

  .sheet-table {
    page-break-inside: avoid;
  }

  .sep {
    color: #282727 !important;
  }

  .chord-cell {
    color: #a36f07 !important;
  }

  .simple-chord {
    color: #926203 !important;
  }

  .sl-placeholder {
    color: #313030 !important;
  }

  /* 简洁模式打印优化：取消屏幕上的固定窄宽，让两半铺满 A4 可打印宽度，
     并放大字号，避免导出 PDF 后谱面在纸上过小、过度集中。
     （width 由 render.js 内联写死为 halfBeats*50px，这里用 !important 覆盖） */
  .simple-row {
    justify-content: space-between !important;
    gap: 2em !important;
    margin-bottom: 16px !important;
  }

  .simple-half {
    flex: 1 1 0 !important;
    min-width: 0;
  }

  .simple-half .simple-chord-line,
  .simple-half .simple-lyric-line {
    width: auto !important;
    max-width: none !important;
  }

  .simple-chord {
    font-size: 26px !important;
  }

  .simple-lyric {
    font-size: 28px !important;
  }

  .editor-add-measure {
    display: none;
  }

  .print-header {
    display: block;
    text-align: center;
    padding-bottom: 8px;
    border-bottom: 1px solid #ccc;
    margin-bottom: 12px;
  }

  .print-title {
    font-size: 18px;
    font-weight: bold;
    color: #1a1a1a;
    margin-bottom: 3px;
  }

  .print-meta {
    font-size: 10px;
    color: #555;
    display: flex;
    justify-content: center;
    gap: 8px;
  }

  .print-footer {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 9px;
    color: #555;
    padding: 4px 0;
    border-top: 1px solid #eee;
  }

  .sheet::after {
    opacity: 0.14;
  }

  .sheet-watermark {
    display: none !important;
  }
}

/* 打印时隐藏备案号页脚 */
@media print {
  .icp-footer { display: none !important; }
}
