/* V338 — let the complete item tooltip define its own height.
   This only fixes the preview card clipping/overflow when flame rows make the
   tooltip taller; all simulation layout, controls and probability logic stay unchanged. */

@media (min-width: 1081px) {
  body[data-page="simulation"] .sim-preview-panel {
    height: auto !important;
    min-height: 1000px !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body[data-page="simulation"] .sim-item-preview {
    height: auto !important;
    min-height: 956px !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body[data-page="simulation"] .sim-item-tooltip-v328,
  body[data-page="simulation"] .sim-item-tooltip-v329,
  body[data-page="simulation"] .sim-item-tooltip-v330 {
    box-sizing: border-box !important;
    height: auto !important;
    min-height: 956px !important;
    max-height: none !important;
    overflow: visible !important;
  }
}

@media (min-width: 821px) and (max-width: 1080px) {
  body[data-page="simulation"] .sim-preview-panel {
    height: auto !important;
    min-height: 900px !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body[data-page="simulation"] .sim-item-preview {
    height: auto !important;
    min-height: 856px !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body[data-page="simulation"] .sim-item-tooltip-v328,
  body[data-page="simulation"] .sim-item-tooltip-v329,
  body[data-page="simulation"] .sim-item-tooltip-v330 {
    box-sizing: border-box !important;
    height: auto !important;
    min-height: 856px !important;
    max-height: none !important;
    overflow: visible !important;
  }
}

@media (max-width: 820px) {
  body[data-page="simulation"] .sim-preview-panel,
  body[data-page="simulation"] .sim-item-preview,
  body[data-page="simulation"] .sim-item-tooltip-v328,
  body[data-page="simulation"] .sim-item-tooltip-v329,
  body[data-page="simulation"] .sim-item-tooltip-v330 {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
}
