@media print {
  /* app.js pins color-scheme to the effective theme for native widgets;
     print is always on white paper, so force it back here. */
  :root {
    color-scheme: light !important;
  }

  header,
  #chat-panel,
  #mobile-tabs,
  #save-recipe-btn,
  .servings-btn,
  button {
    display: none !important;
  }

  /* Dialog / menu content is app-owned markup the native kit moves into its
     own layer while presented. Hide it by our own hook (never by kit-internal
     class names) so Ctrl+P with a sheet open still prints just the recipe. */
  [data-un-dialog],
  [data-un-menu],
  .rb-fallback-backdrop,
  .rb-fallback-popover,
  .rb-fallback-toast {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
    font-size: 12pt;
  }

  #recipe-panel {
    border: none !important;
    width: 100% !important;
    max-width: none !important;
  }

  #recipe-content {
    padding: 0 !important;
  }

  #recipe-display {
    display: block !important;
  }

  #recipe-empty {
    display: none !important;
  }

  details {
    display: block !important;
  }

  details[open] summary {
    display: none;
  }

  details summary {
    display: none;
  }

  details > div {
    display: block !important;
  }

  .diff-removed,
  .diff-added {
    background: none !important;
  }

  .diff-removed {
    color: #999 !important;
    text-decoration: line-through;
  }

  .diff-added {
    color: black !important;
    font-weight: bold;
  }

  a {
    color: black !important;
    text-decoration: none !important;
  }

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