.cheat-hero {
  padding-bottom: 18px;
}

.cheat-page-wrap {
  padding: 8px 0 42px;
}

.sheet-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.cheat-sheet-card {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  border-radius: 24px;
  padding: 22px;
}

.sheet-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 16px;
}

.sheet-header h2 {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.15;
}

.sheet-header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  max-width: 64ch;
}

.sheet-mini-note {
  flex-shrink: 0;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.sheet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.sheet-grid:last-child {
  margin-bottom: 0;
}

.sheet-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: color-mix(in srgb, var(--panel-solid) 96%, transparent);
}

.sheet-panel h3 {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.25;
}

.morse-table {
  display: grid;
  gap: 8px;
}

.morse-table div,
.phrase-list div {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--surface-2);
  align-items: center;
}

.morse-table.compact div {
  grid-template-columns: 42px 1fr;
}

.morse-table strong,
.phrase-list strong {
  font-size: 15px;
}

.morse-table span,
.phrase-list span,
.timing-list li,
.study-note-list li,
.print-tip-copy {
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.phrase-list {
  display: grid;
  gap: 8px;
}

.timing-list,
.study-note-list {
  margin: 0;
  padding-left: 18px;
}

.print-tip-copy {
  margin: 0 0 14px;
}

.bottom-grid .sheet-panel:last-child {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

@media (max-width: 900px) {
  .sheet-grid {
    grid-template-columns: 1fr;
  }

  .sheet-header,
  .sheet-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .sheet-mini-note {
    width: fit-content;
  }

  .sheet-toolbar .btn {
    width: 100%;
  }
}

@media print {
  body {
    background: #fff !important;
  }

  .site-header,
  .site-footer,
  .hero,
  .no-print,
  .menu-toggle,
  .site-menu {
    display: none !important;
  }

  .cheat-page-wrap {
    padding: 0 !important;
  }

  .container {
    width: 100% !important;
    max-width: none !important;
  }

  .cheat-sheet-card {
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
  }

  .sheet-panel,
  .morse-table div,
  .phrase-list div,
  .sheet-mini-note {
    background: #fff !important;
  }

  .sheet-header {
    margin-bottom: 12px;
  }

  .sheet-header h2 {
    font-size: 22px;
  }

  .sheet-panel h3 {
    font-size: 15px;
    margin-bottom: 8px;
  }

  .morse-table span,
  .phrase-list span,
  .timing-list li,
  .study-note-list li,
  .print-tip-copy,
  .sheet-header p {
    font-size: 12px;
    line-height: 1.45;
    color: #222 !important;
  }

  .morse-table strong,
  .phrase-list strong {
    font-size: 12px;
    color: #000 !important;
  }

  .sheet-grid {
    gap: 10px;
    margin-bottom: 10px;
    break-inside: avoid;
  }

  .sheet-panel {
    padding: 10px;
    break-inside: avoid;
  }

  @page {
    size: A4 portrait;
    margin: 10mm;
  }
}