@media print {
  @page {
    margin: 1.5cm;
    size: letter;
  }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body {
    font-size: 11pt;
    line-height: 1.4;
    color: #000;
    background: #fff;
  }

  /* Hide non-essential elements */
  header,
  footer,
  nav,
  .no-print,
  .print-hide,
  [data-print-hide],
  button,
  .sticky {
    display: none !important;
  }

  /* Ensure main content is visible */
  main {
    width: 100%;
    margin: 0;
    padding: 0;
  }

  /* Recipe-specific styles */
  .recipe-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1pt solid #ccc;
  }

  .recipe-title {
    font-size: 18pt;
    font-weight: bold;
    margin-bottom: 0.25rem;
  }

  .recipe-summary {
    font-size: 10pt;
    color: #444;
    font-style: italic;
  }

  .recipe-meta {
    display: flex;
    gap: 1rem;
    font-size: 9pt;
    color: #666;
    margin: 0.5rem 0;
    padding: 0.5rem 0;
    border-top: 0.5pt solid #eee;
    border-bottom: 0.5pt solid #eee;
  }

  .recipe-meta-item {
    display: flex;
    gap: 0.25rem;
  }

  /* Ingredient list */
  .ingredient-list {
    margin: 1rem 0;
    padding: 0.75rem;
    background: #f9f9f9;
    border: 0.5pt solid #ddd;
  }

  .ingredient-list h2 {
    font-size: 11pt;
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .ingredient-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .ingredient-list li {
    padding: 0.2rem 0;
    font-size: 10pt;
    border-bottom: 0.25pt dotted #ddd;
  }

  .ingredient-list li:last-child {
    border-bottom: none;
  }

  .ingredient-amount {
    font-weight: 600;
  }

  .ingredient-notes {
    font-size: 9pt;
    color: #666;
    font-style: italic;
  }

  /* Steps */
  .step-list {
    margin: 1rem 0;
  }

  .step-list h2 {
    font-size: 11pt;
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .step-item {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    page-break-inside: avoid;
  }

  .step-number {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #333;
    color: #fff;
    font-size: 9pt;
    font-weight: bold;
    border-radius: 50%;
  }

  .step-description {
    font-size: 10pt;
    line-height: 1.5;
  }

  .step-note {
    font-size: 9pt;
    color: #666;
    font-style: italic;
    margin-top: 0.25rem;
    padding-left: 0.5rem;
    border-left: 2pt solid #ddd;
  }

  /* Hide step images in print */
  .step-image {
    display: none;
  }

  /* Equipment list */
  .equipment-list {
    font-size: 9pt;
    color: #666;
    margin: 0.5rem 0;
  }

  /* Recipe variables — show text fallback instead of visual scale */
  .recipe-variables .linear-scale svg {
    display: none;
  }

  .recipe-variables {
    font-size: 9pt;
    margin: 0.5rem 0;
    padding: 0.5rem;
    border: 0.5pt solid #ddd;
    background: #f9f9f9;
  }

  /* Notes and tips */
  .recipe-notes {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #fffbe6;
    border: 0.5pt solid #e6d98c;
    font-size: 9pt;
  }

  .recipe-notes h3 {
    font-size: 10pt;
    font-weight: bold;
    margin-bottom: 0.25rem;
  }

  /* Links */
  a {
    color: inherit;
    text-decoration: none;
  }

  /* Images */
  img {
    max-width: 100%;
    height: auto;
  }

  .hero-image {
    display: none;
  }

  /* Page breaks */
  h1, h2, h3 {
    page-break-after: avoid;
  }

  .ingredient-list,
  .step-list {
    page-break-inside: avoid;
  }

  /* Footer attribution */
  .print-footer {
    display: block !important;
    margin-top: 2rem;
    padding-top: 0.5rem;
    border-top: 0.5pt solid #ccc;
    font-size: 8pt;
    color: #999;
    text-align: center;
  }

  .print-footer::before {
    content: "Recipe from Let's Tamago! — letstamago.com";
  }
}
