@page {
  margin: 1.5cm;
}

@media print {
  .app-header,
  .app-footer,
  .tabs,
  .link-bar,
  .btn-primary,
  .btn-secondary,
  .icon-btn,
  .stepper button,
  .remove-btn,
  #add-meal,
  #print-btn,
  #copy-link,
  .item-inputs,
  .modal,
  .toast,
  .hint,
  .empty-state,
  details.advanced,
  .field,
  #effective-readout {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .card {
    box-shadow: none;
    border: none;
    padding: 0;
    margin: 0;
  }

  .tab-panel {
    display: block !important;
  }

  #tab-setup, #tab-menu {
    display: none !important;
  }

  .shopping-summary {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
    margin-bottom: 16px;
  }

  .summary-card {
    background: #fff;
    border: 1px solid #000;
    text-align: center;
    flex: 1;
  }

  .dietary-summary {
    border: 1px solid #000;
    background: #fff;
    page-break-inside: avoid;
  }

  .aisle-group {
    page-break-inside: avoid;
    margin-bottom: 16px;
  }

  .aisle-group h4 {
    border-bottom: 2px solid #000;
    color: #000;
  }

  .aisle-group li {
    border-bottom: 1px solid #ccc;
    grid-template-columns: 1fr auto;
  }

  .item-cost, .item-detail {
    color: #000;
  }

  .print-footer {
    margin-top: 24px;
    border-top: 2px solid #000;
    padding-top: 8px;
    font-weight: 700;
    text-align: right;
  }
}

@media screen {
  .print-only { display: none; }
}
