.tropical-card {
  padding: 1rem;
  border-left: 4px solid var(--event-color, #f97316);
  display: grid;
  gap: 0.5rem;
}

.tropical-card h3 {
  margin: 0;
}

.tropical-card p {
  margin: 0;
}

/* ─── Tropical Diagnostics side-panel (1.32.2) ─────────────────────
 * Sibling to the existing Active Systems maproom-panel. Toggled by
 * the 🔬 toolbar button. Content harvested from spaghettimodels.com
 * (CIMSS / OSPO / FSU / NHC TAFB / NCEP EMC / NESDIS / SPC / WPC).
 * Moved from the radar UI's tropical panel during the 1.32.2 split.
 */
.maproom-panel--diag {
  /* Sit immediately to the LEFT of the existing right-side Active
     Systems panel. Same width so the layout balances visually when
     both are open. */
  right: 360px;
  width: 360px;
  max-width: 90vw;
  z-index: 401;
}
.tp-diag-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tp-diag-sub,
.maproom-panel--diag .tp-narrative {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.18);
  padding: 4px 6px;
}
.tp-diag-sub > summary,
.maproom-panel--diag .tp-narrative > summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--text);
  font-weight: 600;
  padding: 2px 0;
  user-select: none;
}
.tp-diag-sub > summary:hover,
.maproom-panel--diag .tp-narrative > summary:hover {
  color: var(--accent-strong);
}
.tp-diag-imgs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 6px;
}
.tp-diag-imgs figure {
  margin: 0;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 3px;
  overflow: hidden;
}
.tp-diag-imgs figure img {
  display: block;
  width: 100%;
  height: auto;
  cursor: zoom-in;
  background: rgba(0, 0, 0, 0.4);
}
.tp-diag-imgs figcaption {
  font: 11px/1.3 system-ui, sans-serif;
  color: var(--muted);
  padding: 4px 6px;
  background: rgba(0, 0, 0, 0.4);
}
.tp-diag-broken {
  padding: 8px;
  background: rgba(220, 38, 38, 0.18);
  color: rgba(255, 200, 200, 0.95);
  font-size: 11px;
}
.tp-diag-broken a { color: var(--accent); }
.tp-diag-links {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 11px;
}
.tp-diag-links a {
  color: var(--accent);
  text-decoration: none;
}
.tp-diag-links a:hover { text-decoration: underline; color: var(--accent-strong); }
.tp-diag-marine details {
  margin: 4px 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  padding: 4px 6px;
  background: rgba(0, 0, 0, 0.18);
}
.tp-diag-marine summary {
  cursor: pointer;
  font-size: 11.5px;
  color: var(--text);
}
.tp-narrative-body {
  max-height: 240px;
  overflow: auto;
  white-space: pre-wrap;
  font: 11px/1.4 ui-monospace, Menlo, Consolas, monospace;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 6px;
  margin-top: 4px;
  color: var(--text);
}
.tp-storm-text-block {
  margin: 6px 0;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.02);
}
.tp-storm-text-name {
  font-weight: 700;
  font-size: 12px;
  color: var(--text);
  margin-bottom: 4px;
}
.tp-storm-text-block details > summary {
  cursor: pointer;
  font-size: 11.5px;
  color: var(--text);
  padding: 2px 0;
}
.btn-icon-pill--active {
  background: var(--accent);
  color: #0a0815;
  border-color: var(--accent);
}


/* ── Storm-center cyclone icons (ported from radar tropicalLayer.js) ── */
.tropical-marker { pointer-events: auto; overflow: visible; }
.tcm { position: relative; width: 44px; height: 44px; color: var(--cat, #888); }
.tcm-symbol { width: 44px; height: 44px; filter: drop-shadow(0 0 5px var(--cat)) drop-shadow(0 1px 2px rgba(0,0,0,0.7)); }
.tcm-symbol svg { display: block; width: 100%; height: 100%; }
.tcm-spin-on .tcm-symbol { animation: tcm-swirl 8s linear infinite; transform-origin: 50% 50%; }
@keyframes tcm-swirl { to { transform: rotate(-360deg); } }
@media (prefers-reduced-motion: reduce) { .tcm-spin-on .tcm-symbol { animation: none; } }
.tcm-badge { position: absolute; top: -3px; right: -3px; min-width: 16px; height: 16px; padding: 0 3px; box-sizing: border-box; border-radius: 9px; background: var(--cat); color: #08111c; font: 800 11px/16px system-ui, sans-serif; text-align: center; box-shadow: 0 0 0 1.5px #08111c; }
.tcm-badge--ts { font-size: 9px; letter-spacing: -0.5px; }
.tcm-motion { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.tcm-motion::before { content: ''; position: absolute; left: -5px; top: -31px; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 8px solid var(--cat); filter: drop-shadow(0 0 2px rgba(0,0,0,0.85)); }
.tcm-ring { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--cat, #888); background: rgba(20,30,45,0.85); display: flex; align-items: center; justify-content: center; }
.tcm-invest .tcm-ring { position: absolute; top: 7px; left: 50%; transform: translateX(-50%); }
.tcm-invest-ring { border-style: dashed; border-width: 2.5px; animation: tcm-invest-pulse 2.6s ease-in-out infinite; }
@keyframes tcm-invest-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,213,74,0);} 50% { box-shadow: 0 0 0 4px rgba(255,213,74,0.45);} }
.tcm-glyph { font: 800 14px/1 system-ui, sans-serif; color: var(--cat, #ffd54a); }
.tcm-name { position: absolute; top: 43px; left: 50%; transform: translateX(-50%); text-align: center; white-space: nowrap; font: 700 10px/1.1 system-ui, sans-serif; color: #eaf2ff; text-shadow: 0 1px 2px rgba(0,0,0,0.95), 0 0 4px rgba(0,0,0,0.8); }
.tropical-popup .tp-head { display: flex; gap: 8px; align-items: center; border-bottom: 2px solid #888; padding-bottom: 4px; margin-bottom: 6px; }
.tropical-popup .tp-cat { display: inline-block; padding: 2px 8px; border-radius: 4px; color: #1b1300; font-weight: 700; font-size: 11px; }
.tropical-popup .tp-name { font-weight: 700; font-size: 14px; }
.tropical-popup .tp-advisory { margin-top: 6px; font-size: 11px; }


/* === Tropical diagnostics: floating windows + toolbar overflow menu === */
#tropical-diag-panel { display: none !important; } /* legacy side panel retired; kept as hidden content source */

.tp-diag-menu-wrap { position: relative; display: inline-flex; }
.tp-diag-menu { position: absolute; top: calc(100% + 4px); right: 0; z-index: 5000; min-width: 280px; max-height: 65vh; overflow: auto; background: rgba(16,24,38,0.98); border: 1px solid rgba(255,255,255,0.18); border-radius: 8px; box-shadow: 0 10px 34px rgba(0,0,0,0.55); padding: 4px; }
.tp-diag-menu-item { display: block; width: 100%; text-align: left; background: none; border: none; color: #eaf2ff; padding: 7px 10px; border-radius: 5px; font: 500 12px/1.3 system-ui, sans-serif; cursor: pointer; }
.tp-diag-menu-item:hover { background: rgba(255,255,255,0.10); }
.tp-diag-menu-item--active { background: rgba(74,163,255,0.20); }
.tp-diag-menu-item--active::after { content: ' \25CF'; color: #4aa3ff; font-size: 9px; }

.tp-win { position: absolute; width: 430px; height: 380px; min-width: 240px; min-height: 150px; display: flex; flex-direction: column; background: rgba(16,24,38,0.97); border: 1px solid rgba(255,255,255,0.18); border-radius: 9px; box-shadow: 0 10px 34px rgba(0,0,0,0.55); overflow: hidden; resize: both; }
.tp-win-head { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 6px 6px 10px; cursor: move; background: rgba(255,255,255,0.06); border-bottom: 1px solid rgba(255,255,255,0.12); }
.tp-win-title { font: 700 12px/1.2 system-ui, sans-serif; color: #eaf2ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-win-close { flex: 0 0 auto; background: none; border: none; color: #cbd5e1; font-size: 14px; line-height: 1; cursor: pointer; padding: 3px 7px; border-radius: 5px; }
.tp-win-close:hover { background: rgba(255,255,255,0.14); color: #fff; }
.tp-win-body { flex: 1 1 auto; overflow: auto; padding: 8px 10px; }
.tp-win-body > details > summary { display: none; }
.tp-win-body .tp-diag-imgs { display: flex; flex-direction: column; gap: 10px; }
.tp-win-body figure { margin: 0; }
.tp-win-body figure img { display: block; width: 100%; height: auto; border-radius: 4px; background: rgba(255,255,255,0.03); }
.tp-win-body figcaption { font: 600 11px/1.3 system-ui, sans-serif; color: rgba(234,242,255,0.75); margin-bottom: 4px; }
body.tp-win-dragging { cursor: move; }
body.tp-win-dragging .leaflet-container, body.tp-win-dragging iframe { pointer-events: none; }

/* Readable NWS tropical text (tropical.js tropicalTextHtml): map popups and
 * the expanded product rows. */
.tp-text { font-size: 0.86rem; line-height: 1.5; }
.tp-text p { margin: 0 0 0.5rem; }
.tp-text ul { margin: 0 0 0.5rem; padding-left: 1.1rem; }
.tp-text li { margin: 0 0 0.2rem; }
.tp-text-h {
  margin: 0.6rem 0 0.25rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: color-mix(in srgb, var(--accent) 75%, var(--text));
}
.tp-text-lead { font-weight: 800; }
.tp-text--pop { max-height: 260px; overflow-y: auto; margin-top: 0.4rem; padding-right: 0.3rem; }
.tp-pop-sub { font-size: 0.78rem; opacity: 0.8; }
.tp-row { cursor: pointer; }
.tp-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tp-row-text {
  grid-column: 1 / -1;
  margin-top: 0.45rem;
  padding: 0.5rem 0.6rem;
  border-radius: 0.5rem;
  background: color-mix(in srgb, var(--card) 70%, transparent);
  color: var(--text);
  cursor: text;
  user-select: text;
}
