.sim-stage { position: relative; width: 100%; height: calc(100vh - 64px); margin-top: 64px; min-height: 540px; background: #0a1622; }
    #sim-map { position: absolute; inset: 0; }
    .sim-panel { position: absolute; top: 1rem; left: 1rem; z-index: 5; width: 304px; max-width: calc(100% - 2rem); background: rgba(10,22,34,0.9); backdrop-filter: blur(10px); border: 1px solid rgba(0,148,191,0.3); border-radius: 12px; padding: 1rem 1.15rem; color: #fff; }
    .sim-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
    .sim-panel .brand { font-family: var(--serif); font-size: 1.2rem; line-height: 1.2; }
    .sim-panel .brand b { color: #0094BF; font-weight: 400; }
    .sim-panel .brand .brand-sub { display: block; font-style: italic; }
    .units { display: inline-flex; border: 1px solid rgba(255,255,255,0.25); border-radius: 6px; overflow: hidden; }
    .units button { background: transparent; color: rgba(255,255,255,0.7); border: none; padding: 0.2rem 0.55rem; font-size: 0.72rem; font-weight: 700; cursor: pointer; }
    .units button.on { background: var(--teal); color: #fff; }
    .sim-top-actions { display: flex; align-items: center; gap: 0.35rem; flex: 0 0 auto; }
    .units { flex: 0 0 auto; }
    .sim-collapse { background: transparent; border: none; color: rgba(255,255,255,0.72); font-size: 0.9rem; line-height: 1; cursor: pointer; padding: 0.25rem 0.4rem; border-radius: 6px; flex: 0 0 auto; }
    .sim-collapse:hover { background: rgba(255,255,255,0.14); color: #fff; }
    .sim-reopen { position: absolute; top: 1rem; left: 1rem; z-index: 6; display: none; align-items: center; gap: 0.4rem; background: rgba(10,22,34,0.9); backdrop-filter: blur(10px); border: 1px solid rgba(0,148,191,0.3); border-radius: 10px; padding: 0.5rem 0.85rem; color: #fff; font-family: var(--serif); font-size: 1rem; cursor: pointer; }
    .sim-reopen b { color: #0094BF; font-weight: 400; }
    /* Collapse/reopen carets: an inline SVG chevron (currentColor stroke) rather than a
       Unicode triangle, so it stays crisp and perfectly symmetric at any size with no
       font-fallback risk. The collapse (up) one is the same chevron flipped 180°. */
    .sim-collapse .sim-caret, .sim-reopen .sim-caret { display: inline-block; width: 1.2rem; height: 1.2rem; vertical-align: middle; color: rgba(255,255,255,0.75); }
    .sim-collapse .sim-caret { transform: rotate(180deg); }
    /* Collapsed reopen pill mirrors the panel header: SimStorm™ over the tracker name. */
    .sim-reopen .reopen-brand { display: block; line-height: 1.15; }
    .sim-reopen .brand-sub { display: block; font-style: italic; }
    .sim-reopen:hover { border-color: rgba(0,148,191,0.6); }
    .sim-stage.panel-collapsed .sim-panel { display: none; }
    .sim-stage.panel-collapsed .sim-reopen { display: inline-flex; }
    .sim-panel select { width: 100%; margin-top: 0.85rem; background: #102a47; color: #fff; border: 1px solid rgba(255,255,255,0.25); border-radius: 7px; padding: 0.5rem 0.6rem; font-family: var(--sans); font-size: 0.92rem; }
    #sim-info { font-size: 0.82rem; color: #cfe9ff; margin-top: 0.55rem; line-height: 1.5; }
    .sim-panel .hint { font-size: 0.79rem; color: rgba(255,255,255,0.72); line-height: 1.5; margin: 0.55rem 0 0; }
    .sim-panel .hint a { color: #34c3e8; }
    .sim-legend { display: flex; flex-wrap: wrap; gap: 0.45rem 0.85rem; margin-top: 0.85rem; }
    .sim-legend span { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.73rem; color: rgba(255,255,255,0.85); }
    .sim-legend i { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid #0b1d33; }
    .sim-scrub { position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; align-items: center; gap: 0.7rem; background: rgba(10,22,34,0.92); backdrop-filter: blur(10px); border: 1px solid rgba(0,148,191,0.3); border-radius: 10px; padding: 0.5rem 0.9rem; width: min(680px, calc(100% - 360px)); }
    .sim-scrub button { background: var(--teal); color: #fff; border: none; border-radius: 6px; width: 34px; height: 34px; font-size: 0.9rem; cursor: pointer; flex: 0 0 auto; }
    .sim-scrub input[type=range] { flex: 1; accent-color: var(--teal); }
    #scrub-read { font-size: 0.77rem; color: #cfe9ff; white-space: nowrap; flex: 0 0 auto; min-width: 244px; text-align: right; }
    .scrub-loop { display: flex; align-items: center; gap: 0.3rem; font-size: 0.72rem; color: #cfe9ff; white-space: nowrap; flex: 0 0 auto; cursor: pointer; user-select: none; }
    .scrub-loop input { accent-color: var(--teal); cursor: pointer; margin: 0; }
    @media (max-width: 820px) { .sim-scrub { width: calc(100% - 2rem); flex-wrap: wrap; } #scrub-read { width: 100%; text-align: left; min-width: 0; } }
.history-filter { min-width: 0; padding: 12px; margin: 17px 0 0; border: 1px solid #315265; border-radius: 8px; background: #102534; }
.history-filter legend { font-size: 14px; color: #c4e0eb; padding: 0 5px; }
.filter-heading { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #92afc1; gap: 8px; margin-bottom: 12px; }
.filter-heading button { color: #7dd3df; background: none; border: 0; font: inherit; padding: 2px 4px; cursor: pointer; }
.filter-options { display: flex; flex-wrap: wrap; gap: 10px; }
.filter-options label { display: flex; align-items: center; gap: 5px; font-size: 14px; color: #d2e6ef; cursor: pointer; }
.filter-options i { width: 8px; height: 8px; border-radius: 50%; }
.cat3 { background: #ff6f3c; } .cat4 { background: #ec3b4e; } .cat5 { background: #b5179e; }
.filter-options input { accent-color: #35c6e8; margin: 0; }
.filter-options.regions { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, auto); grid-auto-flow: column; gap: 10px 8px; }
.catalog-status { margin-top: 14px; font-size: 13px; color: #9fc8d8; line-height: 1.5; }
.catalog-about { border-top: 1px solid #294657; margin-top: 17px; padding-top: 12px; color: #9eb9c9; font-size: 12px; line-height: 1.6; }
.catalog-about summary { cursor: pointer; color: #b7d3e1; font-size: 13px; }
.catalog-about a { color: #70cddb; }
.landfall-summary { font-size: 13px; line-height: 1.6; color: #b8d6e4; }
.sim-panel { width: 348px; padding: 20px; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid #56cfe1; outline-offset: 3px; }
button:disabled, input:disabled { opacity: .4; cursor: not-allowed; }
@media(max-width: 700px) { .sim-panel { max-height: 46%; } }
