@media print {
  .no-print {
    display: none !important;
  }
  
  .print-only {
    display: block !important;
  }
  
  body {
    font-size: 10pt;
    line-height: 1.4;
    color: black;
    background: white;
    margin: 0;
    padding: 0;
  }
  
  /* コンテナの最適化 */
  .container {
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  /* レシピページ専用の印刷最適化 */
  /* 印刷時に隠す要素 */
  nav, .no-print, button, .btn,
  [data-controller="social-share"],
  [data-controller="calendar-form"],
  [data-controller="recipe-memo"],
  .border-t:last-child,
  .fixed, .sticky,
  .shadow-md, .shadow-lg, .shadow-xl,
  /* タブナビゲーション */
  nav[aria-label="タブ"],
  /* クイックアクションボタン */
  .overflow-x-auto .flex.gap-2.pb-2,
  /* 編集・削除ボタン */
  .flex.justify-center.gap-4.mt-6,
  /* クイックアクセスバー */
  #recipe-quick-actions-bar,
  /* パンくずリスト */
  nav[aria-label="breadcrumb"],
  /* レビュー投稿フォーム */
  form[data-controller="review-form"],
  /* 広告 */
  [data-advertisement],
  /* もっと見るボタン */
  a[data-turbo-frame="reviews_list"],
  /* JavaScript無効時の警告 */
  noscript {
    display: none !important;
  }
  
  /* 画像の最適化 */
  img {
    max-width: 300px !important;
    height: auto !important;
    page-break-inside: avoid;
  }
  
  /* グリッドレイアウトの最適化 */
  .grid {
    display: block !important;
  }
  
  .grid > div {
    margin-bottom: 0.5rem !important;
    break-inside: avoid;
  }
  
  /* セクション間の改ページ制御 */
  .ingredient-section {
    break-inside: avoid;
    margin-bottom: 1rem;
  }
  
  /* 大きなセクションは改ページを許可 */
  .nutritional-table,
  .recipe-list {
    break-inside: auto;
  }
  
  /* フォントサイズの調整 */
  h1 { font-size: 18pt !important; margin: 0.5rem 0 !important; }
  h2 { font-size: 14pt !important; margin: 0.4rem 0 !important; }
  h3 { font-size: 12pt !important; margin: 0.3rem 0 !important; }
  p { font-size: 10pt !important; margin: 0.2rem 0 !important; }
  
  /* 色の最適化 */
  .bg-orange-50, .bg-red-50, .bg-yellow-50, .bg-blue-50, .bg-gray-50,
  .bg-green-50, .bg-purple-50 {
    background: #f5f5f5 !important;
    border: 1px solid #ccc !important;
  }
  
  .text-orange-600, .text-red-600, .text-yellow-600, .text-blue-600,
  .text-green-600, .text-purple-600 {
    color: #333 !important;
  }
  
  /* パディングとマージンの最適化 */
  .p-6, .p-8, .p-4 {
    padding: 0.5rem !important;
  }
  
  .mb-6, .mb-8, .mb-4 {
    margin-bottom: 0.5rem !important;
  }
  
  /* テーブルの最適化 */
  table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 9pt !important;
  }
  
  td, th {
    padding: 0.2rem !important;
    border: 1px solid #ccc !important;
  }
  
  /* レシピ詳細ページ専用スタイル */
  /* レシピタイトル */
  h1 {
    font-size: 20pt !important;
    margin-bottom: 0.5rem !important;
    page-break-after: avoid;
  }
  
  /* 評価表示 */
  [data-recipe-rating] {
    margin-bottom: 0.5rem !important;
  }
  
  /* 材料セクション */
  .ingredient-section,
  [data-tab-panel="ingredients"] {
    page-break-inside: avoid;
    margin-bottom: 1rem !important;
  }
  
  /* 材料チェックボックス印刷時の表示 */
  .ingredient-checkbox {
    display: inline-block !important;
    width: 12pt !important;
    height: 12pt !important;
    border: 1px solid #000 !important;
    margin-right: 0.5rem !important;
  }
  
  .ingredient-checkbox:checked::before {
    content: "✓" !important;
    display: block !important;
    text-align: center !important;
    line-height: 12pt !important;
  }
  
  /* 手順セクション */
  .recipe-steps {
    page-break-inside: auto;
  }
  
  .recipe-step {
    page-break-inside: avoid;
    margin-bottom: 0.5rem !important;
  }
  
  /* 調理時間の視覚化 - シンプル化 */
  .bg-white.rounded-lg.shadow-sm {
    border: 1px solid #ccc !important;
    padding: 0.5rem !important;
    margin-bottom: 0.5rem !important;
  }
  
  /* プログレスバーを非表示 */
  svg.transform.-rotate-90,
  .w-full.bg-gray-200.rounded-full {
    display: none !important;
  }
  
  /* タブコンテンツを全て表示 */
  [data-recipe-tabs-target="panel"] {
    display: block !important;
    page-break-before: auto;
    margin-top: 1rem !important;
  }
  
  /* タブナビゲーションを非表示 */
  [data-recipe-tabs-target="tab"] {
    display: none !important;
  }
  
  /* QRコード用スペース（オプション） */
  .print-qr-code {
    display: block !important;
    position: fixed;
    bottom: 10mm;
    right: 10mm;
    width: 30mm;
    height: 30mm;
    border: 1px solid #ccc;
    padding: 2mm;
  }
  
  /* フッター情報 */
  .print-footer {
    display: block !important;
    position: fixed;
    bottom: 5mm;
    left: 10mm;
    right: 40mm;
    font-size: 8pt;
    color: #666;
    border-top: 1px solid #ccc;
    padding-top: 2mm;
  }
}
