@page {
  size: portrait;
  margin: 0.45in;
}

@page :first {
  size: landscape;
  margin: 0.25in;
}

@media print {
  * {
    box-shadow: none !important;
    text-shadow: none !important;
  }

  html,
  body {
    width: auto;
    min-height: 0;
    margin: 0;
    background: #fff !important;
    color: #000;
    font-size: 9pt;
    overflow: visible !important;
    user-select: text;
    -webkit-user-select: text;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .app-shell {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .app-header,
  .panel-header,
  .list-controls,
  .list-head,
  .map-panel-header,
  .map-toolbar,
  .detail-overlay {
    display: none !important;
  }

  .app-main {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
  }

  .map-panel {
    display: block;
    order: 1;
    min-height: 0;
    height: 100vh;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: visible;
    page-break-after: always;
    break-after: page;
  }

  .map-viewport {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
    cursor: default;
    touch-action: auto;
  }

  .map-stage {
    position: relative;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 720 / 388.8;
    transform: none !important;
    translate: none;
  }

  .map-stage svg {
    display: block;
    width: 100% !important;
    height: auto !important;
    max-width: none;
    max-height: 100%;
  }

  .print-map-brand {
    position: absolute;
    left: 0.1in;
    top: 0.1in;
    z-index: 5;
    display: grid;
    grid-template-columns: auto auto;
    gap: 0.12in;
    align-items: center;
    padding: 0.08in 0.12in;
    border: 0.5pt solid rgba(0, 0, 0, 0.35);
    background: #fff;
    color: #00f;
    font-weight: 700;
    line-height: 1.05;
  }

  .print-map-brand img {
    width: 0.86in;
    height: auto;
  }

  .print-map-brand strong,
  .print-map-brand span {
    display: block;
    white-space: nowrap;
  }

  .print-map-brand strong {
    font-size: 16pt;
  }

  .print-map-brand span {
    font-size: 12pt;
  }

  .list-panel {
    display: block;
    order: 2;
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin: 0 auto 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: visible;
    break-before: auto;
    page-break-before: auto;
  }

  html.is-directory-suppressed .list-panel {
    display: none;
  }

  html.is-directory-suppressed .map-panel {
    page-break-after: auto;
    break-after: auto;
  }

  .print-directory-header {
    display: flex;
    gap: 0.16in;
    align-items: center;
    margin: 0 0 0.18in;
    padding-bottom: 0.12in;
    border-bottom: 2pt groove rgba(128, 128, 128, 0.75);
    color: #00f;
    font-weight: 700;
    page-break-after: avoid;
    break-after: avoid;
  }

  .print-directory-header img {
    width: 0.9in;
    height: auto;
  }

  .print-directory-header h2 {
    margin: 0;
    font-size: 18pt;
    line-height: 1.1;
  }

  .print-directory-header p {
    margin: 0.04in 0 0;
    font-size: 11pt;
    line-height: 1.18;
  }

  .print-directory-title {
    display: block;
    margin: 0 0 0.12in;
    color: #000;
    font-size: 13pt;
    line-height: 1.1;
  }

  .list-body {
    display: none;
    height: auto;
    overflow: visible;
  }

  .print-directory-list {
    display: block;
    width: 100%;
  }

  .print-exhibitor-row {
    display: block !important;
    width: 100%;
    padding: 0.035in 0;
    border-bottom: 0.4pt solid #ccc;
    color: #000;
    font: inherit;
    line-height: 1.15;
    overflow: visible;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .print-company-column {
    display: block !important;
    padding-right: 1in;
    line-height: 1.15;
  }

  .print-booth-column {
    display: block !important;
    float: right;
    width: 0.85in;
    border-bottom: 0.4pt solid #ccc;
    color: #000;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
  }

  .exhibitor-row {
    appearance: none;
    -webkit-appearance: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 0.85in;
    gap: 0.12in;
    padding: 0.035in 0;
    border: 0;
    border-bottom: 0.4pt solid #ccc;
    background: transparent !important;
    color: #000;
    cursor: default;
    font: inherit;
    line-height: 1.15;
    overflow: visible;
    page-break-inside: avoid;
    text-align: left;
    width: 100%;
    break-inside: avoid;
  }

  .exhibitor-row::after {
    content: attr(data-print-booths);
    display: block;
    grid-column: 2;
    grid-row: 1;
    color: #000;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
  }

  .exhibitor-row .company-column {
    grid-column: 1;
    grid-row: 1;
    line-height: 1.15;
  }

  .exhibitor-row .booth-column {
    display: none;
    grid-column: 2;
    grid-row: 1;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
  }

  body.print-debug-grid .list-panel {
    background-color: #fff !important;
    outline: 1pt solid rgba(255, 0, 0, 0.85);
  }

  body.print-debug-grid .app-shell {
    outline: 1pt solid rgba(0, 0, 255, 0.85);
    outline-offset: -1pt;
  }

  body.print-debug-grid .app-main {
    outline: 1pt dashed rgba(0, 128, 0, 0.85);
    outline-offset: -2pt;
  }

  body.print-debug-grid .print-directory-list {
    outline: 1pt dashed rgba(255, 128, 0, 0.85);
    outline-offset: -1pt;
  }

  body.print-debug-grid .print-exhibitor-row {
    outline: 0.5pt solid rgba(128, 128, 128, 0.65);
    outline-offset: -0.5pt;
  }
}
