@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../../files/fonts/map/ibm-plex-mono-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../../files/fonts/map/ibm-plex-mono-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(../../files/fonts/map/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(../../files/fonts/map/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

.scientific-map {
    --sm-bg: #f7f9fc;
    --sm-surface: #fff;
    --sm-ink: #0f172a;
    --sm-secondary: #475569;
    --sm-border: #dce5ef;
    --sm-primary: #0066ff;
    --sm-primary-text: #0047b3;
    --sm-selected: #e8f2ff;
    --sm-radius: 14px;
    --sm-header: 64px;
    --sm-catalog-width: 320px;
    --sm-inspector-width: 388px;
    --sm-shadow: 0 3px 10px rgb(15 23 42 / 12%);
    min-width: 0;
    min-height: 0;
    margin: 0;
    color: var(--sm-ink);
    background: var(--sm-bg);
    font: 14px/1.45 'Inter', system-ui, sans-serif;
    scrollbar-color: #9aacbf var(--sm-bg);
}

.scientific-map > .block-ui-container > .block-ui-overlay {
    background: #0f172a;
    opacity: .28;
}
.scientific-map > .block-ui-container > .block-ui-message-container {
    inset: 0;
    display: grid;
    box-sizing: border-box;
    height: 100%;
    padding: 16px;
    place-items: center;
}
.scientific-map > .block-ui-container .block-ui-message {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px 14px;
    box-sizing: border-box;
    width: min(100%, 300px);
    height: auto;
    padding: 18px;
    border: 1px solid var(--sm-border);
    border-radius: var(--sm-radius);
    background: var(--sm-surface);
    color: var(--sm-ink);
    box-shadow: var(--sm-shadow);
    text-align: start;
    font: 650 15px/1.4 'Inter', system-ui, sans-serif;
}
.scientific-map > .block-ui-container .block-ui-message::before {
    content: '';
    box-sizing: border-box;
    width: 34px;
    height: 34px;
    border: 3px solid var(--sm-selected);
    border-top-color: var(--sm-primary);
    border-radius: 50%;
    animation: sm-chart-spin .8s linear infinite;
}
.scientific-map > .block-ui-container .block-ui-message p { margin: 0; }
.scientific-map > .block-ui-container .block-ui-message .cancelTimechart {
    position: static;
    grid-column: 2;
    justify-self: start;
    width: auto;
    min-height: 36px;
    margin: 0;
    padding: 4px 10px;
    border: 1px solid var(--sm-border);
    border-radius: 8px;
    color: var(--sm-primary-text);
    background: var(--sm-surface);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}
.scientific-map > .block-ui-container .block-ui-message .cancelTimechart:hover {
    background: var(--sm-selected);
}
.scientific-map > .block-ui-container .block-ui-message .cancelTimechart:focus-visible {
    outline: 2px solid var(--sm-primary);
    outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
    .scientific-map > .block-ui-container .block-ui-message::before { animation: none; }
    .scientific-map.block-ui-anim-fade > .block-ui-container { transition: none; }
}

.scientific-map [hidden] { display: none !important; }
.sm-shell, .sm-shell * { box-sizing: border-box; }
.sm-shell {
    display: grid;
    grid-template:
        "top top top" var(--sm-header)
        "catalog map inspector" minmax(0, 1fr)
        "timeline timeline timeline" auto /
        auto minmax(0, 1fr) auto;
    gap: 12px 8px;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    padding-inline: 8px;
    overflow: hidden;
}

.sm-shell button, .sm-shell input, .sm-shell select { font: inherit; color: inherit; }
.sm-shell button { cursor: pointer; }
.sm-shell button:disabled { cursor: default; opacity: .5; }
.sm-shell :is(button, a, input, select, summary, #map):focus-visible {
    outline: 2px solid var(--sm-primary);
    outline-offset: -2px;
}
.sm-shell a { color: inherit; }
.sm-shell .sb-icon { flex: none; width: 20px; height: 20px; vertical-align: middle; }
.sm-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.sm-top {
    grid-area: top;
    display: flex;
    align-items: center;
    gap: clamp(14px, 4vw, 116px);
    margin-inline: -8px;
    padding-inline: clamp(14px, 2.8vw, 46px);
    background: var(--sm-surface);
    border-bottom: 1px solid var(--sm-border);
}
.sm-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    color: var(--sm-ink);
    font: 750 25px/1.1 'Inter', system-ui, sans-serif;
    letter-spacing: -.035em;
    text-decoration: none;
}
.sm-brand img { object-fit: contain; }
.scientific-map .sm-top-nav, .scientific-map .sm-mobile-nav {
    position: static;
    display: flex;
    align-items: center;
    gap: clamp(2px, 1vw, 14px);
    float: none;
}
.sm-top-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 5px; }
.sm-top-nav :is(button, a), .sm-top-actions :is(button, a), .sm-mobile-nav button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    min-width: 44px;
    padding: 0 10px;
    background: transparent;
    border: 0;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
    font-weight: 600;
}
.sm-shell :is(.sm-top-nav, .sm-top-actions, .sm-mobile-nav) :is(button, a):hover,
.sm-shell :is(.sm-top-nav, .sm-mobile-nav) [aria-current="true"] {
    background: var(--sm-selected);
    color: var(--sm-primary-text);
}

.scientific-map #sidebar-col.sm-catalog,
.scientific-map #map-container.sm-map, .sm-inspector, .sm-timeline {
    position: relative;
    inset: auto;
    min-width: 0;
    min-height: 0;
    background: var(--sm-surface);
    border: 1px solid var(--sm-border);
    border-radius: var(--sm-radius);
    transition: none;
}
.scientific-map #sidebar-col.sm-catalog {
    grid-area: catalog;
    width: var(--sm-catalog-width);
    overflow: auto;
    padding: 12px;
    z-index: 3;
}
.sm-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 44px;
}
.sm-sheet-grip { display: none; }
.sm-panel-heading :is(h1, h2), .sm-inspector h2, .sm-inspector h3 { margin: 0; font-size: 16px; }
.sm-panel-heading h1 { display: flex; align-items: center; gap: 8px; }
.sm-panel-heading button, .sm-inspector-tabs button {
    border: 0;
    background: transparent;
    min-width: 44px;
    min-height: 44px;
    border-radius: 8px;
    font-size: 20px;
}
.sm-shell :is(.sm-panel-heading, .sm-inspector-tabs) button:hover { background: var(--sm-selected); }
.scientific-map .sm-catalog nav,
.scientific-map .sm-catalog .ddNavWraper,
.scientific-map .sm-catalog .ddMenu {
    position: static;
    float: none;
    width: auto;
    min-height: 0;
    height: auto !important;
    max-height: none;
    overflow: visible;
    background: transparent;
    padding: 0;
    margin: 0;
    border: 0;
    box-shadow: none;
}
.sm-catalog .tab { display: none !important; }
.sm-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 14px;
    padding-left: 10px;
    border: 1px solid #bbc9dc;
    border-radius: 8px;
}
.sm-search input { width: 100%; min-width: 0; height: 42px; padding: 4px 6px; border: 0; background: transparent; }
.sm-search input::-webkit-search-cancel-button { display: none; }
.sm-search button { border: 0; background: none; min-width: 44px; min-height: 44px; font-size: 19px; }
.sm-catalog-tabs { display: flex; border-bottom: 1px solid var(--sm-border); margin-bottom: 12px; }
.sm-catalog-tabs button {
    flex: 1;
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 8px 8px 0 0;
    min-height: 44px;
    white-space: nowrap;
}
.sm-catalog-tabs button:hover, .sm-catalog-tabs [aria-pressed="true"] {
    background: var(--sm-selected);
    color: var(--sm-primary-text);
    border-bottom-color: var(--sm-primary);
}
.sm-product-group { border-bottom: 1px solid var(--sm-border); }
.sm-product-group summary {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 6px 8px;
    list-style: none;
    cursor: pointer;
    font-weight: 600;
}
.sm-product-group summary::-webkit-details-marker { display: none; }
.sm-product-group summary:hover { background: var(--sm-selected); }
.sm-product-group summary svg:last-child { margin-left: auto; width: 15px; }
.sm-product-group[open] > summary svg:last-child { transform: rotate(180deg); }
.sm-group-products { padding: 2px 0 8px 8px; }
.sm-product { display: flex; align-items: stretch; border-radius: 8px; }
.sm-product:has(.sm-product-choice[aria-pressed="true"]) { background: var(--sm-selected); }
.sm-product-choice, .sm-star {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 5px 7px;
    border: 0;
    border-radius: 8px;
    background: transparent;
}
.sm-product-choice { flex: 1; min-width: 0; text-align: left; }
.sm-product-choice:hover:not(:disabled), .sm-star:hover { background: var(--sm-selected); }
/* Product names are lighter than group headings; only the chosen product stands out. */
.sm-product-choice strong { display: block; font-size: 13px; font-weight: 450; overflow-wrap: anywhere; }
.sm-product-choice[aria-pressed="true"] strong { font-weight: 600; }
.sm-product-choice small { color: var(--sm-secondary); line-height: 1.3; }
.sm-product-indicator {
    flex: 0 0 16px;
    height: 16px;
    border: 1px solid #879bb4;
    border-radius: 50%;
}
.sm-product-choice[aria-pressed="true"] .sm-product-indicator {
    border-color: var(--sm-primary);
    background: var(--sm-primary);
    box-shadow: inset 0 0 0 2px #fff;
}
.sm-star { min-width: 44px; justify-content: center; }
.sm-shell .sm-star .sb-icon { width: 17px; height: 17px; }
.sm-star[aria-pressed="true"] { color: var(--sm-primary-text); }
.sm-star[aria-pressed="true"] svg { fill: #bfd9ff; }
.sm-empty { margin: 12px 2px; color: var(--sm-secondary); }

.scientific-map #map-container.sm-map {
    grid-area: map;
    background: #eaf0f7;
    isolation: isolate;
}
.sm-map #map { border-radius: inherit; overflow: hidden; }
.scientific-map #map .ol-zoom { inset: auto auto 55px 14px; grid-auto-flow: column; }
.scientific-map #map .ol-scale-line {
    inset: auto auto 12px 14px;
    padding: 8px 10px;
    background: var(--sm-surface);
    border-radius: 8px;
    box-shadow: var(--sm-shadow);
}
.scientific-map #map .ol-zoom, .sm-map-actions {
    display: grid;
    position: absolute;
    z-index: 8;
    padding: 0;
    border-radius: 9px;
    background: var(--sm-surface);
    box-shadow: var(--sm-shadow);
    overflow: hidden;
}
.sm-map-actions { top: 46px; right: 14px; }
.scientific-map #map .ol-zoom button, .sm-map-actions button {
    display: grid;
    place-items: center;
    margin: 0;
    width: 44px;
    height: 44px;
    background: var(--sm-surface);
    border: 0;
    border-radius: 0;
    color: var(--sm-ink);
}
.scientific-map #map .ol-zoom button + button { border-inline-start: 1px solid var(--sm-border); }
.sm-map-actions button + button { border-top: 1px solid var(--sm-border); }
.scientific-map #map .ol-zoom button:hover, .sm-map-actions button:hover { background: var(--sm-selected); }
.sm-map-tools {
    position: absolute;
    z-index: 10;
    top: 46px;
    right: 64px;
    padding: 8px;
    border-radius: 8px;
    background: var(--sm-surface);
    box-shadow: var(--sm-shadow);
}
.scientific-map .sm-map-tools #map-controllers { position: static; height: auto; width: auto; margin: 0; }
.scientific-map .sm-map-tools #map-controllers .controllersPanel { margin: 0; }
.sm-marker {
    width: 23px;
    height: 23px;
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgb(15 23 42 / 50%);
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.sm-marker::after { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: white; }
.scientific-map #legend {
    inset: 12px auto auto 12px;
    display: flex;
    flex-direction: column;
    width: min(345px, calc(100% - 84px));
    max-height: calc(100% - 104px);
    overflow: auto;
    padding: 0;
    background: var(--sm-surface);
    color: var(--sm-ink);
    border-radius: 9px;
    box-shadow: var(--sm-shadow);
}
.scientific-map #legend #mapLabel, .scientific-map #legend .dataInfo { color: inherit; }
.scientific-map #legend .sm-legend-scale {
    display: grid;
    container-type: inline-size;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 3px 8px;
    width: 100%;
    margin: 0;
    padding: 8px 10px;
}
.scientific-map #map-container .sm-legend-scale img {
    display: block;
    width: 100%;
    height: 13px;
    border-radius: 3px;
}
.scientific-map #legend .sm-legend-button {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--sm-border);
    border-radius: 8px;
    color: var(--sm-primary-text);
    background: var(--sm-surface);
}
.scientific-map #legend .sm-legend-button:hover,
.scientific-map #legend .sm-legend-button[aria-expanded="true"] { background: var(--sm-selected); }
.sm-legend-values {
    position: relative;
    min-width: 0;
    min-height: 15px;
    color: var(--sm-secondary);
    font: 11px/1.3 'IBM Plex Mono', ui-monospace, monospace;
}
.sm-legend-values [data-legend-value] {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    white-space: nowrap;
}
.sm-legend-values [data-legend-value]:first-of-type { transform: none; }
.sm-legend-values [data-legend-value]:last-of-type:not(:first-of-type) { transform: translateX(-100%); }
.sm-legend-values-compact { display: none; }
@container (max-width: 270px) {
    .sm-legend-values-dense { display: none; }
    .sm-legend-values-compact { display: block; }
}
@container (max-width: 180px) {
    .sm-legend-values-long { min-height: 29px; }
    .sm-legend-values-long [data-legend-value]:nth-of-type(even) { top: 14px; }
}

.scientific-map #legend #mapUnit {
    float: none;
    justify-self: start;
    max-width: 52px;
    color: var(--sm-ink);
    font: 700 11px/1.3 'IBM Plex Mono', ui-monospace, monospace;
    overflow-wrap: anywhere;
}
.scientific-map #legend #mapUnit:empty { display: none; }
.scientific-map #legend .dataInfo {
    display: grid;
    gap: 1px;
    padding: 0 46px 3px 10px;
    line-height: 1.25;
}
.scientific-map #legend #mapSource, .scientific-map #legend #mapSource * { color: var(--sm-secondary) !important; }
.scientific-map #legend .dataInfo br { display: none; }
.scientific-map #legend #mapTime { margin: 0; }
.sm-legend-heading { padding: 7px 46px 2px 10px; }
.sm-legend-heading:has(#mapLabel.ng-hide) { min-height: 40px; }
.scientific-map #legend .sm-legend-heading #mapLabel {
    margin: 0;
    padding: 0;
    letter-spacing: normal;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.sm-legend-collapse, .sm-legend-restore {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 40px;
    min-height: 40px;
    border: 1px solid var(--sm-border);
    border-radius: 8px;
    background: var(--sm-surface);
    color: var(--sm-primary-text);
}
.scientific-map .sm-legend-collapse {
    position: absolute;
    inset: 5px 6px auto auto;
    min-width: 34px;
    min-height: 34px;
    padding: 0;
}
.sm-legend-collapse .sb-icon { transform: rotate(180deg); }
.scientific-map .sm-legend-restore {
    position: absolute;
    inset: 12px auto auto 12px;
    z-index: 2;
    padding: 0 10px;
    color: var(--sm-primary-text);
    border-color: #9abcff;
    background: var(--sm-selected);
    box-shadow: var(--sm-shadow);
    font-weight: 650;
}
.sm-legend-collapse:hover, .sm-legend-restore:hover { background: var(--sm-selected); }
.sm-map-logos {
    position: absolute;
    inset: auto 12px 12px auto;
    z-index: 2;
    display: flex;
    align-items: end;
    gap: 8px;
    max-width: min(calc(100% - 124px), calc(62% - 34px));
    pointer-events: none;
}
.scientific-map .sm-map-logos :is(#sb-logo, #partner-logo) {
    position: static;
    min-width: 0;
}
.scientific-map .sm-map-logos :is(#sb-logo, #partner-logo) > img {
    display: block;
    width: auto;
    height: 76px;
    max-width: min(100%, 200px);
    object-fit: contain;
}

.sm-inspector {
    grid-area: inspector;
    width: var(--sm-inspector-width);
    overflow: auto;
    padding: 12px;
}
.sm-inspector-tabs, .sm-point-heading, .sm-value, .sm-inspector-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.sm-inspector-tabs { justify-content: space-between; border-bottom: 1px solid var(--sm-border); }
.sm-inspector-tabs h2 { align-self: stretch; display: flex; align-items: center; gap: 8px; color: var(--sm-primary-text); border-bottom: 2px solid var(--sm-primary); }
.scientific-map .sm-inspector #map-click-popup {
    position: static;
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: inherit;
}
.scientific-map .sm-inspector #map-click-popup::before,
.scientific-map .sm-inspector #map-click-popup::after { display: none; }
.sm-point-heading { padding: 12px 2px; }
.sm-point-heading button { background: transparent; border: 0; min-height: 44px; min-width: 44px; margin-left: auto; }
.sm-symbol { color: var(--sm-primary-text); }
.sm-value { align-items: start; padding: 16px; background: #edf5ff; border-radius: 9px; overflow-wrap: anywhere; }
.sm-value #map-click-popup-value { font: 700 32px/1.35 'Inter', system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.sm-value #map-click-popup-value.loading { min-height: 43px; }
.sm-point-direction { margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.sm-point-direction strong { margin-inline-start: 6px; }
.sm-coordinates { font-family: 'IBM Plex Mono', ui-monospace, monospace; }
.sm-coordinates, .sm-value small, .sm-timeline { font-variant-numeric: tabular-nums; }
.sm-inspector-section { padding: 12px 0; border-bottom: 1px solid var(--sm-border); }
.sm-inspector-section h3 { margin-bottom: 8px; }
.sm-inspector-section dl { margin: 0; }
.sm-inspector-section dl div { display: grid; grid-template-columns: 32% minmax(0, 1fr); gap: 8px; padding: 3px 0; }
.sm-inspector-section dt, .sm-coordinates { color: var(--sm-secondary); }
.sm-inspector-section dd { margin: 0; overflow-wrap: anywhere; }
.sm-coordinates-form { padding: 10px 0; }
.sm-coordinates-form summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 44px;
    padding: 8px 2px;
    color: var(--sm-primary-text);
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}
.sm-coordinates-form summary::-webkit-details-marker { display: none; }
.sm-coordinates-form[open] summary .sb-icon { transform: rotate(180deg); }
.sm-coordinate-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.sm-coordinate-fields input { width: 100%; }
.sm-inspector-actions { flex-wrap: wrap; }
.sm-shell .sm-outline, .sm-timeline select, .sm-history-heading select, .sm-coordinate-fields input, .sm-menu input {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid #bbc9dc;
    background: var(--sm-surface);
    border-radius: 8px;
    min-height: 44px;
    padding: 4px 10px;
    color: var(--sm-ink);
}
.sm-shell .sm-outline:hover:not(:disabled) { background: var(--sm-selected); }

.sm-timeline {
    grid-area: timeline;
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto auto auto;
    align-items: center;
    gap: 8px 14px;
    padding: 10px 12px;
    margin-bottom: 6px;
}
/* The control bar stands apart from the white panels: a light blue tint, a stronger edge and a
   shadow, so it reads as the place to steer the map. Its own --sm-border keeps the slider track,
   selects and step buttons visible on the tint. */
.scientific-map .sm-timeline {
    --sm-border: #bcd3f6;
    background: #eaf2ff;
    border-color: var(--sm-border);
    box-shadow: var(--sm-shadow);
}
.sm-timeline .sm-step button { background: var(--sm-surface); box-shadow: inset 0 0 0 1px var(--sm-border); }
.sm-playback, .sm-step { display: flex; align-items: center; gap: 6px; }
.sm-shell .sm-play, .sm-step button {
    display: grid;
    place-items: center;
    min-width: 44px;
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    background: var(--sm-selected);
}
.sm-shell .sm-play { position: relative; background: var(--sm-primary); color: white; }
.sm-shell .sm-play svg { fill: currentColor; }
/* While playback gets ready, a ring around the pause icon fills with the loaded frames. */
.sm-shell .sm-play .sm-play-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
    opacity: 0;
    transform: rotate(-90deg);
    pointer-events: none;
}
.sm-play-ring circle { stroke-opacity: .3; }
.sm-play-ring .sm-play-ring-value {
    stroke-opacity: 1;
    stroke-linecap: round;
    stroke-dasharray: var(--sm-load, 0) 100;
    transition: stroke-dasharray .3s ease-out;
}
.sm-shell .sm-play[data-loading] .sm-play-ring { opacity: 1; }
.sm-shell .sm-play[data-loading="unknown"] .sm-play-ring { animation: sm-spin 1s linear infinite; }
.sm-play[data-loading="unknown"] .sm-play-ring-value { stroke-dasharray: 28 100; }
@keyframes sm-spin { from { transform: rotate(-90deg); } to { transform: rotate(270deg); } }
.sm-track { --sm-thumb-size: 16px; min-width: 0; }
.sm-track input {
    appearance: none;
    display: block;
    width: 100%;
    height: 22px;
    margin: 0;
    padding: 0;
    border: 0;
    /* Played part, then frames already loaded ahead (like the buffer of a video), then the rest. */
    background: linear-gradient(to right, var(--sm-primary) var(--sm-range-progress, 0%),
        #9cc2ff 0 var(--sm-range-buffer, 0%), var(--sm-border) 0)
        center / calc(100% - var(--sm-thumb-size)) 6px no-repeat;
    border-radius: 5px;
    cursor: pointer;
}
.sm-track input:disabled { cursor: default; opacity: .5; }
.sm-track input::-webkit-slider-thumb {
    appearance: none;
    width: var(--sm-thumb-size);
    height: var(--sm-thumb-size);
    border: 0;
    border-radius: 50%;
    background: var(--sm-primary);
}
.sm-track input::-moz-range-thumb {
    width: var(--sm-thumb-size);
    height: var(--sm-thumb-size);
    border: 0;
    border-radius: 50%;
    background: var(--sm-primary);
}
.sm-ticks {
    position: relative;
    margin-inline: calc(var(--sm-thumb-size) / 2);
    height: 22px;
    color: var(--sm-secondary);
    font-size: 11px;
    white-space: nowrap;
    pointer-events: none;
}
.sm-ticks:empty { height: 0; }
.sm-tick { position: absolute; top: 0; }
.sm-tick::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -.5px;
    width: 1px;
    height: 7px;
    background: currentColor;
}
.sm-tick > span { position: absolute; top: 3px; visibility: hidden; }
@media (forced-colors: active) {
    .sm-track { --sm-primary: Highlight; --sm-border: GrayText; }
    .sm-track input, .sm-tick::before { forced-color-adjust: none; }
    .sm-tick::before { background: CanvasText; }
}
.sm-toggles { display: flex; flex-wrap: wrap; gap: 0 14px; }
.sm-toggle[hidden] { display: none; }
.sm-toggle:not([hidden]) { display: flex; align-items: center; gap: 6px; min-height: 44px; white-space: nowrap; cursor: pointer; }
.sm-toggle input { width: 18px; height: 18px; margin: 0; accent-color: var(--sm-primary); }
.sm-time-status { display: inline; color: var(--sm-secondary); }
/* Note on the map while playback gets ready; it appears only when the wait gets noticeable. */
.sm-map-loading {
    position: absolute;
    left: 50%;
    bottom: 22px;
    z-index: 9;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    transform: translateX(-50%);
    border-radius: 999px;
    color: var(--sm-ink, #0f172a);
    background: var(--sm-surface);
    box-shadow: var(--sm-shadow);
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
}
.sm-map-loading-bar {
    position: relative;
    width: 120px;
    height: 6px;
    overflow: hidden;
    border-radius: 3px;
    background: var(--sm-border);
}
.sm-map-loading-bar > span {
    position: absolute;
    inset: 0 auto 0 0;
    border-radius: inherit;
    background: var(--sm-primary);
    transition: width .3s ease-out;
}
.sm-map-loading[data-loading="unknown"] .sm-map-loading-bar > span {
    width: 35% !important;
    animation: sm-slide 1.2s ease-in-out infinite;
}
@keyframes sm-slide { from { left: -35%; } to { left: 100%; } }
.sm-map-loading-count { min-width: 3.5em; color: var(--sm-secondary); font-variant-numeric: tabular-nums; }
.sm-map-loading-count:empty { display: none; }
@media (max-width: 430px) {
    .sm-map-loading { gap: 8px; padding: 8px 12px; font-size: 14px; }
    .sm-map-loading-bar { width: 64px; }
}
@media (forced-colors: active) {
    .sm-map-loading { border: 1px solid CanvasText; }
    .sm-map-loading-bar > span { background: Highlight; }
}
.sm-time-status:empty { display: none; }
.sm-retry { padding: 0 6px; color: var(--sm-primary-text); border: 0; background: none; text-decoration: underline; }
.sm-time-warning { grid-column: 1 / -1; margin: 0; padding: 4px 10px; border-radius: 8px; color: #854d0e; background: #fef3c7; font-size: 13px; }
.scientific-map .sm-calendar-anchor .time-cal {
    position: fixed !important;
    inset: auto auto 82px clamp(8px, 10vw, 180px) !important;
    z-index: 1100;
    max-block-size: 78dvh;
    overflow: auto;
}
.scientific-map .sm-calendar-anchor { position: absolute; }
.sm-menu {
    border: 1px solid var(--sm-border);
    border-radius: var(--sm-radius);
    box-shadow: var(--sm-shadow);
    color: var(--sm-ink);
    background: var(--sm-surface);
    padding: 16px;
    width: min(384px, calc(100% - 24px));
}
.sm-menu::backdrop { background: rgb(15 23 42 / 30%); }
.sm-menu .sm-panel-heading { margin-bottom: 8px; }
.sm-menu > :is(a, button) {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 10px;
    min-height: 44px;
    padding: 5px 8px;
    background: transparent;
    border: 0;
    border-radius: 8px;
    text-align: left;
}
.sm-menu > :is(a, button):hover { background: var(--sm-selected); }
.sm-menu input { display: block; width: 100%; margin-block: 4px; }
.sm-current, .sm-mobile-time, .scientific-map .sm-mobile-nav { display: none; }
.sm-shell[data-map-expanded] {
    grid-template: "map" minmax(0, 1fr) / minmax(0, 1fr);
    padding: 0;
}
.sm-shell[data-map-expanded] > :not(.sm-map, dialog) { display: none; }
.sm-shell[data-map-expanded] .sm-map { border-radius: 0 !important; }

/* Handle on the left edge of the map that brings back the hidden catalogue (desktop). */
.sm-catalog-open {
    display: none;
    position: absolute;
    z-index: 5;
    left: 0;
    top: 12px;
    align-items: center;
    gap: 4px;
    min-height: 48px;
    padding: 0 10px 0 8px;
    background: #fff;
    color: var(--sm-primary-text);
    border: 1px solid var(--sm-border, #d6dde8);
    border-left: 0;
    border-radius: 0 10px 10px 0;
    box-shadow: 0 2px 8px rgb(15 23 42 / .14);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
}
.sm-catalog-open:hover { background: var(--sm-selected); }
.sm-catalog-open:focus-visible { outline: 3px solid var(--sm-primary); outline-offset: 2px; }
.sm-shell:not([data-map-expanded]):has(#sidebar-col[hidden]) .sm-catalog-open { display: inline-flex; }
/* The handle sits at the top of the map, so the legend moves aside while it is shown. */
@media (min-width: 901px) {
    .sm-shell:not([data-map-expanded]):has(#sidebar-col[hidden]) #legend { left: 70px; }
}
.sm-map-actions [data-catalog-toggle][aria-pressed="true"] { background: var(--sm-selected); color: var(--sm-primary-text); }

@media (max-width: 1450px) {
    .scientific-map { --sm-catalog-width: 290px; --sm-inspector-width: 340px; }
    .sm-top { gap: 28px; }
}
@media (max-width: 1080px) {
    .scientific-map { --sm-catalog-width: 258px; --sm-inspector-width: 280px; }
    .sm-top { gap: 12px; }
    .sm-top-nav :is(button, a) { padding-inline: 7px; }
}
@media (max-width: 900px) {
    .scientific-map {
        --sm-header: 59px;
        --sm-current-height: 48px;
        --sm-mobile-time-height: 44px;
        --sm-mobile-gap: 8px;
        --sm-radius: 12px;
    }
    .sm-shell {
        grid-template:
            "top" var(--sm-header)
            "current" var(--sm-current-height)
            "map" minmax(0, 1fr)
            "mobile-time" var(--sm-mobile-time-height)
            "inspector" auto
            "timeline" auto
            "mobile-nav" auto / minmax(0, 1fr);
        height: auto;
        min-height: 100dvh;
        gap: var(--sm-mobile-gap);
        padding-bottom: env(safe-area-inset-bottom);
        overflow: visible;
    }
    .sm-shell:not([data-map-expanded]) #map-container.sm-map {
        min-height: calc(100dvh - var(--sm-header) - var(--sm-current-height)
            - var(--sm-mobile-time-height) - 3 * var(--sm-mobile-gap) - env(safe-area-inset-bottom));
        margin-inline: -8px;
        border-radius: 0;
    }
    .sm-top { padding-inline: 12px; }
    .sm-brand { font-size: 22px; gap: 8px; }
    .sm-brand img { width: 38px; height: 38px; }
    .scientific-map .sm-top-nav, .sm-top-actions .sm-language { display: none; }
    .sm-shell .sm-catalog-open { display: none !important; }
    .sm-current { grid-area: current; display: flex; align-items: stretch; gap: 8px; }
    .sm-current-product, .sm-current-star {
        display: flex;
        align-items: center;
        text-align: left;
        gap: 12px;
        background: var(--sm-surface);
        border: 1px solid #bbc9dc;
        border-radius: var(--sm-radius);
        min-height: 48px;
        padding: 5px 10px;
    }
    .sm-current-product { flex: 1; min-width: 0; }
    .sm-current-product span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
    .sm-current-product small, .sm-current-product strong {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        line-height: 1.2;
    }
    .sm-current-product small { color: var(--sm-secondary); }
    .scientific-map #sidebar-col.sm-catalog {
        position: fixed;
        inset: auto 8px calc(66px + env(safe-area-inset-bottom));
        width: auto;
        max-height: 50dvh;
        box-shadow: var(--sm-shadow);
        z-index: 21;
    }
    .scientific-map #sidebar-col.sm-catalog[data-sheet-size="compact"] { max-height: 108px; }
    .scientific-map #sidebar-col.sm-catalog[data-sheet-size="expanded"] { max-height: calc(90dvh - 66px); }
    .sm-sheet-grip {
        display: grid;
        place-items: center;
        width: 60px;
        height: 44px;
        margin: -10px auto -4px;
        padding: 0;
        border: 0;
        border-radius: 8px;
        background: transparent;
        touch-action: none;
    }
    .sm-sheet-grip::after { content: ''; width: 36px; height: 4px; border-radius: 2px; background: #9aacbf; }
    .sm-inspector { width: 100%; padding: 8px 12px; }
    .sm-inspector-tabs { border: 0; }
    .sm-value { padding: 10px; }
    .sm-value #map-click-popup-value { color: var(--sm-primary-text); }
    .sm-inspector[data-has-reading]:not([data-details-open]) :is(.sm-inspector-section:not(.sm-point-history), .sm-coordinates-form, .sm-inspector-actions) { display: none; }
    .sm-inspector[data-has-reading]:not([data-details-open]) .sm-inspector-tabs h2 { border-bottom: 0; }
    .sm-timeline { grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px; margin-bottom: 0; padding: 7px; }
    .sm-timeline .sm-track { grid-column: 2; grid-row: 1; }
    .sm-timeline .sm-speed { grid-column: 3; grid-row: 1; }
    .sm-timeline .sm-period { grid-column: 3; grid-row: 2; }
    .sm-timeline .sm-date { grid-column: 1; grid-row: 2; justify-content: start; }
    .sm-timeline .sm-toggles { grid-column: 2; grid-row: 2; justify-self: end; }
    .sm-timeline .sm-step { display: none; }
    .scientific-map .sm-mobile-nav {
        grid-area: mobile-nav;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        height: auto;
        min-height: 60px;
        gap: 3px;
        margin-inline: -8px;
        padding: 5px 8px env(safe-area-inset-bottom);
        background: var(--sm-surface);
        border-top: 1px solid var(--sm-border);
    }
    .sm-mobile-nav button { flex-direction: column; gap: 3px; padding: 5px 4px; font-size: 12px; }
    .sm-map-actions { top: 12px; grid-auto-flow: column; }
    .sm-map-actions button + button { border-top: 0; border-inline-start: 1px solid var(--sm-border); }
    .sm-map-actions :is([data-area-select], [data-workspace-view="analysis"], [data-workspace-view="export"]) {
        display: none;
    }
    .scientific-map #legend { top: 64px; max-height: calc(100% - 76px); }
    .scientific-map .sm-legend-restore { min-height: 44px; }
    .scientific-map .sm-map-logos :is(#sb-logo, #partner-logo) > img { height: 44px; }
    .scientific-map .sm-calendar-anchor .time-cal { inset: auto auto 75px 8px !important; }
    .sm-shell[data-map-expanded] { height: 100dvh; }
}
@media (max-width: 400px) {
    .sm-top-actions { gap: 0; }
    .sm-top-actions button { padding: 0; }
    .sm-track .sm-ticks { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    .scientific-map *, .scientific-map *::before, .scientific-map *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.scientific-map .sm-product-choice.active {
    color: var(--sm-ink);
    background: transparent;
}
.scientific-map #map-container #legend:has(.sm-legend-scale.ng-hide) .dataInfo.ng-hide,
.scientific-map #legend .ng-hide,
.scientific-map #legend:has(> .sm-legend-scale.ng-hide):has(> #mapLabel.ng-hide) {
    display: none !important;
}

.scientific-map #map .ol-zoom button:focus-visible { outline: 2px solid var(--sm-primary); }
.scientific-map #map .ol-zoom button { font-size: 23px; }
.scientific-map #map canvas { background: transparent; }
.sm-search:focus-within { border-color: var(--sm-primary); }

@media (min-width: 901px) {
    .sm-shell { grid-template-rows: var(--sm-header) minmax(0, 1fr) minmax(74px, auto); }
}
@media (max-width: 900px) {
    .sm-current { align-self: start; }
    .sm-mobile-time { grid-area: mobile-time; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
    .sm-mobile-time .sm-date { justify-content: start; min-width: 0; padding-inline: 7px; gap: 6px; }
    .sm-mobile-time .sm-date span { overflow-wrap: anywhere; }
    .sm-mobile-time .sm-date .sb-icon { width: 16px; }
    .sm-mobile-time .sm-step button { background: var(--sm-surface); border: 1px solid var(--sm-border); }
    .sm-timeline { grid-template-columns: auto minmax(0, 1fr) auto auto; }
    .sm-timeline .sm-step, .sm-timeline .sm-date { display: none; }
    .sm-timeline .sm-period { grid-row: 1; grid-column: 4; }
    .sm-timeline .sm-toggles { grid-row: 2; grid-column: 2 / -1; }
    .scientific-map #map .ol-scale-line { padding: 6px; max-width: 38%; }
    .scientific-map #map .ol-scale-line-inner { max-width: 100%; }
    .scientific-map #legend .sm-legend-scale { padding: 5px 8px 7px; }
    .scientific-map #legend .dataInfo { padding-inline: 10px 44px; }
}
@media (max-width: 430px) {
    .sm-mobile-time .sm-playback, .sm-mobile-time .sm-step { gap: 3px; }
    .sm-mobile-time .sm-step button { padding-inline: 2px; }
    .sm-mobile-time .sm-date { font-size: 12px; }
    .sm-timeline select { padding-inline: 4px; font-size: 12px; }
}

.scientific-map {
    --sm-message-accent: var(--sm-primary-text);
    --sm-message-tint: var(--sm-selected);
}
.scientific-map [data-message-type="success"] { --sm-message-accent: #166534; --sm-message-tint: #e6f6eb; }
.scientific-map [data-message-type="empty"] { --sm-message-accent: #475569; --sm-message-tint: #eef2f7; }
.scientific-map :is([data-message-type="permission"], [data-message-type="problem"]) { --sm-message-accent: #92400e; --sm-message-tint: #fef3c7; }
.scientific-map :is([data-message-type="offline"], [data-message-type="error"]) { --sm-message-accent: #b91c1c; --sm-message-tint: #fee2e2; }
.scientific-map .sm-message-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: var(--sm-message-accent);
    background: var(--sm-message-tint);
}
.sm-map-offline {
    position: absolute;
    z-index: 5;
    inset: 30% 16px auto;
    display: flex;
    gap: 14px;
    margin: 0 auto;
    width: min(420px, calc(100% - 32px));
    padding: 20px;
    background: var(--sm-surface);
    border: 1px solid var(--sm-border);
    border-radius: var(--sm-radius);
    box-shadow: var(--sm-shadow);
}
.sm-map-offline strong { font-size: 16px; }
.sm-map-offline p { margin: 4px 0 14px; color: var(--sm-secondary); }
.sm-map-offline .sm-outline { text-decoration: none; }

.sm-message {
    width: min(440px, calc(100% - 24px));
    max-height: calc(100dvh - 24px);
    padding: 20px;
    overflow: auto;
    color: var(--sm-ink);
    background: var(--sm-surface);
    border: 1px solid var(--sm-border);
    border-radius: var(--sm-radius);
    box-shadow: 0 18px 48px rgb(15 23 42 / 22%);
}
.sm-message::backdrop { background: rgb(15 23 42 / 30%); }
.sm-message-head { display: flex; align-items: center; gap: 12px; }
.sm-message-head h2 { flex: 1; min-width: 0; margin: 0; font: 700 18px/1.3 'Inter', system-ui, sans-serif; }
.sm-message-head > button {
    align-self: start;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    font-size: 22px;
}
.sm-message-head > button:hover { background: var(--sm-selected); }
.sm-message-body { margin-top: 12px; color: var(--sm-ink); overflow-wrap: anywhere; white-space: pre-line; }
.sm-message-body p { margin: 0; }
.sm-message-body p + p { margin-top: 8px; }
.sm-message[data-message-type="partners"] .sm-message-body { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.sm-message-body a img { margin: 0 !important; }
.sm-message-actions a { text-decoration: none; }
.sm-message-hint { margin: 8px 0 0; color: var(--sm-secondary); }
.sm-message-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 8px; margin-top: 20px; }
.sm-shell .sm-message-primary {
    min-height: 44px;
    padding: 4px 18px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: var(--sm-primary);
    font-weight: 650;
}
.sm-shell .sm-message-primary:hover { background: var(--sm-primary-text); }
.sm-shell .sm-message :focus-visible { outline-offset: 2px; }

@media (max-width: 480px) {
    .sm-message-actions > button { flex: 1 1 auto; }
}
.scientific-map #TimechartController {
    inset: 5dvh 4vw auto;
    min-height: 0;
    width: auto;
    height: 90dvh;
    background: var(--sm-surface);
    border: 1px solid var(--sm-border);
    border-radius: var(--sm-radius);
    box-shadow: var(--sm-shadow);
}
.scientific-map #TimechartController h2,
.scientific-map #scale-settings h2 {
    background: var(--sm-surface);
    color: var(--sm-ink);
    padding: 12px 36px 12px 14px;
}
.scientific-map #TimechartController .timechartForm {
    position: relative;
    opacity: 1;
    pointer-events: auto;
    margin: 0;
    padding: 0 12px 12px;
}
.scientific-map #scale-settings {
    position: fixed;
    top: 50%;
    left: 50%;
    width: min(440px, calc(100% - 24px));
    max-height: 86dvh;
    overflow: auto;
    transform: translate(-50%, -50%);
    margin: 0;
    padding: 10px;
    background: var(--sm-surface);
    border: 1px solid var(--sm-border);
    border-radius: var(--sm-radius);
    box-shadow: var(--sm-shadow);
}
.scientific-map #scale-settings .scaleForm { width: auto; margin: 0; }
.scientific-map #scale-settings .flash-message {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
}
.scientific-map #scale-settings .flash-message::before,
.scientific-map #scale-settings .flash-message::after,
.scientific-map #scale-settings .flash-message > br { display: none; }
.scientific-map #scale-settings .flash-message > :is(p, div) {
    min-width: 0; margin: 0; padding: 0; text-align: start;
}
.scientific-map #scale-settings .flash-message > :is(.color-error, div, p:has(input[type="checkbox"])) {
    grid-column: 1 / -1;
}
.scientific-map #scale-settings label {
    display: block; width: auto; margin-bottom: 4px; color: var(--sm-secondary);
}
.scientific-map #scale-settings :is(input:not([type="checkbox"]), select) {
    box-sizing: border-box; width: 100%; min-height: 40px; padding: 5px 9px;
    border: 1px solid #bbc9dc; border-radius: 8px; text-align: start; font: inherit;
}
.scientific-map #scale-settings input[type="checkbox"] {
    margin-inline-start: 6px; accent-color: var(--sm-primary);
}
.scientific-map #scale-settings .button_change_legend_image_config {
    min-height: 40px; border: 1px solid var(--sm-border); border-radius: 8px;
    color: var(--sm-primary-text); background: var(--sm-selected); font-weight: 600;
}
.scientific-map #scale-settings .sm-scale-close {
    position: absolute; top: 10px; right: 10px; width: 40px; height: 40px;
    border: 0; border-radius: 8px; background: var(--sm-surface); font-size: 20px;
}
.scientific-map #scale-settings .sm-scale-close:hover { background: var(--sm-selected); }
.scientific-map #map-container:has(#scale-settings:not(.ng-hide)) { isolation: auto; }
.scientific-map .sm-shell[data-map-expanded] > :is(#TimechartController, #SatbaltykMessagePopup) { display: block; }
.scientific-map .sm-shell[data-map-expanded] > .ng-hide { display: none !important; }

.sm-calendar {
    width: min(420px, calc(100vw - 20px));
    max-height: calc(100dvh - 20px);
    padding: 16px;
    border: 1px solid var(--sm-border);
    border-radius: var(--sm-radius);
    background: var(--sm-surface);
    color: var(--sm-ink);
    box-shadow: var(--sm-shadow);
}
.sm-calendar::backdrop { background: rgb(15 23 42 / 38%); }
.sm-calendar h2 { display: flex; align-items: center; gap: 9px; }
.sm-calendar-month, .sm-calendar-observations, .sm-calendar-actions {
    display: flex; align-items: end; gap: 6px; margin-block: 10px;
}
.sm-calendar-month select { flex: 1; min-width: 0; }
.sm-calendar button:not(.sm-outline), .sm-calendar select {
    background: var(--sm-surface); border: 1px solid var(--sm-border); border-radius: 8px;
    min-height: 44px; min-width: 38px;
}
.sm-calendar button:not(:disabled):hover { background: var(--sm-selected); }
.sm-calendar-week, .sm-calendar-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.sm-calendar-week { text-align: center; color: var(--sm-secondary); padding: 6px 0; }
/* Always room for six weeks: months with fewer would make the dialog shorter and move the month arrows. */
.sm-calendar-days { grid-template-rows: repeat(6, 44px); }
.sm-calendar-days button { min-width: 0 !important; touch-action: manipulation; }
.sm-calendar-days button:disabled {
    color: var(--sm-secondary);
    background: var(--sm-bg);
    border-color: transparent;
}
.sm-calendar-days button[aria-pressed="true"]:enabled, .sm-calendar-actions button[data-calendar-apply] {
    background: var(--sm-primary); color: white; border-color: transparent;
}
.sm-calendar-status { margin: 8px 0 0; min-height: 1.5em; color: var(--sm-secondary); }
.sm-calendar-observations label { flex: 1; }
.sm-calendar-observations select { display: block; width: 100%; margin-top: 3px; }
.sm-calendar .sm-calendar-actions {
    position: static;
    width: auto;
    justify-content: space-between;
    margin-bottom: 0;
}
.sm-calendar-actions button { padding-inline: 10px; }

.sm-favorites-count {
    display: inline-grid;
    place-items: center;
    min-width: 1.4em;
    padding: 0 .25em;
    border-radius: 1em;
    color: var(--sm-primary-text);
    background: var(--sm-selected);
    font-size: .85em;
    font-variant-numeric: tabular-nums;
}

.scientific-map #sidebar-col.sm-catalog nav,
.scientific-map .sm-catalog nav > .container,
.scientific-map .sm-catalog tabgroup,
.scientific-map .sm-catalog .ddNavWraper,
.scientific-map .sm-catalog .ddNavWraper ng-transclude,
.scientific-map .sm-catalog .ddMenu,
.scientific-map #scientific-catalog {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}
.scientific-map .sm-catalog .ddMenu.ng-hide { display: none; }
.sm-search { width: 100%; min-width: 0; }
.sm-search input { flex: 1 1 0; width: auto; }
.sm-search button, .sm-product .sm-star { flex: 0 0 44px; }
.sm-product-choice > span:last-child { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.sm-catalog-tabs button { min-width: 0; white-space: normal; }

.sm-display-options { display: grid; gap: 8px; margin-top: 7px; padding: 8px 8px 0; border-top: 1px solid var(--sm-border); }
.sm-display-field { display: grid; gap: 5px; min-width: 0; }
.sm-display-field label { display: flex; align-items: center; gap: 8px; color: var(--sm-secondary); font-size: 13px; font-weight: 650; }
.sm-display-select { position: relative; min-width: 0; }
.sm-display-select select {
    appearance: none;
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 7px 34px 7px 11px;
    border: 1px solid var(--sm-border);
    border-radius: 8px;
    color: var(--sm-ink);
    background: var(--sm-surface);
    font: inherit;
    cursor: pointer;
}
.sm-display-select select:hover:not(:disabled) { border-color: var(--sm-primary); }
.sm-display-select select:focus-visible { outline: 2px solid var(--sm-primary); outline-offset: 2px; }
.sm-display-select select:disabled { color: var(--sm-secondary); cursor: default; }
.sm-display-select::after {
    content: '';
    position: absolute;
    inset-inline-end: 14px;
    top: 50%;
    width: 8px;
    height: 8px;
    border: solid var(--sm-secondary);
    border-width: 0 1.5px 1.5px 0;
    transform: translateY(-75%) rotate(45deg);
    pointer-events: none;
}
.sm-display-hint { display: grid; gap: 3px; margin: 0; color: var(--sm-secondary); font-size: 12px; }
@media (max-width: 900px) {
    .sm-display-select select { font-size: 16px; }
}

.sm-point-history .sm-history-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.sm-point-history h3 { margin: 0; margin-inline-end: auto; }
.sm-point-history #map-click-popup-show-chart { margin: 0; padding: 6px; min-width: 42px; }
.sm-chart-surface { position: relative; min-width: 0; }
.sm-chart-mini { height: 118px; margin-top: 6px; }
.sm-point-history[data-directional] .sm-chart-mini { height: 146px; }
.sm-chart-surface canvas { background: transparent; }
.sm-chart-state { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--sm-secondary); }
.sm-chart-state:empty { display: none; }
.sm-chart-mini[aria-busy="true"] { opacity: .8; }
.sm-chart-dialog {
    width: min(1150px, calc(100vw - 24px));
    max-height: calc(100dvh - 24px);
    overflow: auto;
    padding: 16px;
    color: var(--sm-ink);
    background: var(--sm-surface);
    border: 1px solid var(--sm-border);
    border-radius: var(--sm-radius);
    box-shadow: var(--sm-shadow);
}
.sm-chart-dialog::backdrop { background: rgb(15 23 42 / 38%); }
.sm-chart-dialog > .sm-panel-heading { border-bottom: 1px solid var(--sm-border); margin-bottom: 6px; }
.sm-chart-dialog > .sm-panel-heading h2 { display: flex; align-items: center; gap: 9px; }
.scientific-map .sm-chart-dialog #TimechartController {
    position: static;
    width: 100%;
    height: auto;
    max-height: none;
    border: 0;
    box-shadow: none;
    overflow: visible;
}
.scientific-map .sm-chart-dialog #TimechartController > h2 {
    padding: 6px 0;
    font-size: 13px;
    letter-spacing: normal;
    color: var(--sm-secondary);
}
.scientific-map .sm-chart-dialog #TimechartController > .timechartHide { display: none; }
.scientific-map .sm-chart-dialog #TimechartController .timechartForm { padding: 0; }
.scientific-map .sm-chart-dialog #TimechartController .timechartImage {
    position: relative;
    min-height: min(320px, 50dvh);
    height: auto;
    width: 100%;
    background: #f8fbff;
    border: 1px solid var(--sm-border);
    border-radius: 9px;
}
.sm-chart-large { position: relative; height: clamp(240px, 43dvh, 460px); padding: 8px; }
.sm-chart-zoom-controls {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 5px 12px; padding: 4px 8px; color: var(--sm-secondary);
}
.sm-chart-zoom-controls p { margin: 0; }
.sm-chart-zoom-controls[hidden], .sm-chart-zoom-selection[hidden] { display: none; }
.sm-chart-zoom-selection {
    position: absolute; z-index: 1; border: 1px solid var(--sm-primary); border-radius: 3px;
    background: rgb(0 102 255 / 13%); pointer-events: none;
}
.sm-chart-surface:has(.sm-chart-zoom-controls:not([hidden])) canvas { cursor: crosshair; }
@media (any-pointer: coarse) and (not (any-pointer: fine)) {
    .sm-chart-zoom-controls { display: none; }
}
.sm-chart-dialog #timechart-image { max-width: 100%; max-height: 55dvh; object-fit: contain; }
.sm-chart-opening { min-height: min(320px, 50dvh); display: grid; place-items: center; }
.sm-chart-dialog #timechart-progress {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 10px;
    transform: none;
    margin: 0;
    width: auto;
}
.sm-chart-dialog #timechart-progress-indicator {
    display: grid; place-items: center; width: 64px; height: 64px; margin: 0;
    border: 2px solid #ccd9eb; border-top-color: var(--sm-primary);
    border-radius: 50%; background: var(--sm-surface); color: var(--sm-primary-text);
}
.sm-chart-dialog #timechart-progress-value { position: static; padding: 0; font-weight: 700; }
.sm-chart-dialog .cancelTimechart {
    min-height: 40px; padding: 4px 12px; border: 1px solid var(--sm-border);
    border-radius: 8px; color: var(--sm-ink); background: var(--sm-surface);
}
@media (max-width: 640px) {
    .sm-chart-dialog { padding: 10px; }
    .sm-inspector[data-has-reading]:not([data-details-open]) .sm-point-history { display: block; }
}

.scientific-map #map-feature-popup.sm-station-popup {
    width: min(310px, calc(100vw - 36px));
    min-width: 0;
    box-sizing: border-box;
    padding: 13px;
    color: var(--sm-ink);
    background: var(--sm-surface);
    border: 1px solid var(--sm-border);
    border-radius: 12px;
    box-shadow: var(--sm-shadow);
    font: 13px/1.45 Inter, system-ui, sans-serif;
}
.scientific-map #map-feature-popup.sm-station-popup::after { border-top-color: var(--sm-surface); }
.scientific-map #map-feature-popup.sm-station-popup::before { border-top-color: var(--sm-border); }
.scientific-map .sm-station-popup #map-feature-popup-content {
    min-width: 0;
    margin: 0;
    padding: 0;
    font: inherit;
}
.sm-station-popup .sm-station-body {
    max-block-size: min(345px, calc(46dvh - 48px));
    overflow-y: auto;
    overscroll-behavior: contain;
    overflow-wrap: anywhere;
}
.scientific-map .sm-station-popup #map-feature-popup-name {
    display: block; margin: 0 36px 7px 0; color: var(--sm-primary-text); font-size: 15px; font-weight: 700;
    letter-spacing: normal;
}
.scientific-map .sm-station-popup #map-feature-popup-photo {
    display: block; width: 100%; max-width: 100%; height: auto; max-height: 145px;
    object-fit: contain; margin: 0 0 10px; border-radius: 8px; background: #f4f7fb;
}
.scientific-map .sm-station-popup #map-feature-popup-description {
    margin-top: 8px; padding: 8px; border-radius: 8px; background: #edf5ff;
}
.sm-station-popup label {
    display: block; width: auto; margin: 0 0 4px; color: var(--sm-secondary);
}
.sm-shell :is(.sm-station-popup, .sm-chart-controls) select {
    display: block; width: 100%; min-width: 0; max-width: 100%; min-height: 42px;
    box-sizing: border-box; padding: 6px 10px; margin: 0; border: 1px solid #bbc9dc;
    border-radius: 8px; background: var(--sm-surface); color: var(--sm-ink); font: inherit;
    text-overflow: ellipsis;
}
.scientific-map .sm-station-popup #map-feature-popup-value { font-weight: 700; }
.scientific-map .sm-station-popup #map-feature-popup-timestamp { color: var(--sm-secondary); }
.scientific-map .sm-station-popup #map-feature-popup-closer {
    z-index: 1; width: 38px; height: 38px; border: 0; border-radius: 8px;
    background: var(--sm-surface); color: var(--sm-ink);
}
.scientific-map .sm-station-popup #map-feature-popup-show-chart {
    display: inline-flex; align-items: center; gap: 6px; min-height: 40px; border-radius: 8px;
    margin-top: 7px; border: 1px solid var(--sm-border); color: var(--sm-primary-text); background: var(--sm-surface);
}
@media (max-width: 900px) {
    .scientific-map .ol-overlaycontainer-stopevent > div:has(> .sm-station-popup) {
        inset: 8px 8px auto !important;
        z-index: 12;
    }
    .scientific-map #map-feature-popup.sm-station-popup {
        position: relative;
        inset: auto;
        width: min(360px, 100%);
        margin-inline: auto;
    }
    .scientific-map #map-feature-popup.sm-station-popup::before,
    .scientific-map #map-feature-popup.sm-station-popup::after { display: none; }
    .sm-station-popup .sm-station-body {
        max-block-size: min(345px, calc(46dvh - 48px), calc(max(270px, 41dvh) - 102px));
    }
    .scientific-map .sm-station-popup #map-feature-popup-photo { max-height: min(96px, 20dvh); }
}

@media (max-width: 900px) {
    .scientific-map .ol-overlaycontainer-stopevent > .sb-station-overlay {
        inset: 8px 8px auto !important;
        transform: none !important;
        z-index: 12;
    }
    .scientific-map #map-feature-popup.sm-station-popup {
        position: relative;
        inset: auto;
        width: min(360px, 100%);
        max-height: calc(max(270px, 41dvh) - 16px);
        box-sizing: border-box;
        margin-inline: auto;
        overflow-y: auto;
    }
    .scientific-map #map-feature-popup.sm-station-popup::before,
    .scientific-map #map-feature-popup.sm-station-popup::after { display: none; }
}

.sm-chart-dialog #timechart-bottom {
    position: relative;
    inset: auto;
    text-align: left;
    margin-top: 4px;
}
.sm-chart-controls {
    display: grid;
    gap: 12px;
    padding-top: 8px;
    font: 13px/1.4 Inter, system-ui, sans-serif;
}
.sm-chart-series {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.sm-chart-series fieldset {
    min-width: 0;
    margin: 0;
    padding: 8px 10px 10px;
    border: 1px solid var(--sm-border);
    border-radius: 9px;
    background: #f8fbff;
}
.sm-chart-series legend {
    padding: 0 5px;
    color: var(--sm-ink);
    font-weight: 700;
}
.sm-chart-series legend::before {
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-inline-end: 6px;
    border-radius: 50%;
    background: #0066ff;
    content: '';
}
.sm-chart-series fieldset:nth-child(2) legend::before { background: #ad3871; }
.sm-chart-series-fields, .sm-chart-axis-settings, .sm-chart-filters, .sm-chart-export {
    display: grid;
    gap: 8px;
    align-items: end;
}
.sm-chart-series-fields { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; }
.sm-chart-controls :is(label, #timechart_product1, #timechart_product2) {
    display: block;
    min-width: 0;
    width: auto;
    padding: 0;
    margin: 0;
    color: var(--sm-secondary);
}
.sm-chart-controls label :is(select, input) {
    margin-top: 4px;
}
.sm-chart-controls input {
    box-sizing: border-box;
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 6px 10px;
    border: 1px solid #bbc9dc;
    border-radius: 8px;
    background: var(--sm-surface);
    color: var(--sm-ink);
    font: inherit;
}
.sm-chart-controls input.error { border-color: #b91c1c; }
.sm-chart-controls .sm-outline { min-height: 42px; }
.sm-chart-controls .sm-chart-axis { padding-inline: 8px; }
.sm-chart-axis-settings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-top: 8px;
}
.sm-chart-axis-error { grid-column: 1 / -1; }
.sm-chart-axis-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.sm-chart-filters { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.5fr); }
.sm-chart-export { grid-template-columns: minmax(0, 1fr) auto; }
.sm-chart-export-note { margin: 0 0 3px; color: var(--sm-secondary); }
.sm-chart-export-note a { color: var(--sm-primary-text); text-underline-offset: 2px; }

.sm-chart-date-error { margin: 0; color: #b91c1c; }
@media (max-width: 900px) {
    .sm-chart-series-fields { grid-template-columns: minmax(0, 1fr) auto; }
    .sm-chart-series-fields > label:first-child { grid-column: 1 / -1; }
    .sm-chart-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .sm-chart-series { grid-template-columns: minmax(0, 1fr); }
    .sm-chart-export, .sm-chart-export-note { grid-column: 1 / -1; }
}
@media (max-width: 430px) {
    .sm-chart-filters { grid-template-columns: minmax(0, 1fr); }
}
.sm-point-history[aria-busy="true"] .sm-chart-state,
.sm-chart-dialog .sm-chart-opening:not([hidden]) {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.sm-point-history[aria-busy="true"] .sm-chart-state::before,
.sm-chart-dialog .sm-chart-opening:not([hidden])::before {
    content: '';
    width: 17px;
    height: 17px;
    border: 2px solid #ccd9eb;
    border-top-color: var(--sm-primary);
    border-radius: 50%;
    animation: sm-chart-spin .75s linear infinite;
}
@keyframes sm-chart-spin { to { transform: rotate(360deg); } }

.sm-setting-toggles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.sm-setting-toggles label {
    display: flex; align-items: center; gap: 6px; min-height: 38px; padding: 4px;
    cursor: pointer; border-radius: 6px;
}
.sm-setting-toggles label:hover { background: var(--sm-selected); }
.scientific-map #scientific-map-settings .sm-setting-toggles input[type="checkbox"] {
    display: block; appearance: auto; accent-color: var(--sm-primary);
    width: 17px; height: 17px; flex: 0 0 17px; margin: 0; cursor: pointer;
}

.scientific-map :is(#login-box.sm-public-form, #export-box.sm-public-form) {
    width: 100%;
    padding: 12px 0 0;
    height: auto !important;
    max-height: none;
    overflow: visible;
    color: var(--sm-ink);
    background: var(--sm-surface);
}
.scientific-map #export-box.sm-public-form > .wrapper { width: 100%; padding: 0; margin: 0; height: auto; }
.scientific-map .sm-public-form :is(form, #ExportForm) { display: grid; gap: 9px; margin: 0; width: 100%; }
.scientific-map .sm-public-form form > div { margin: 0; min-width: 0; }
.scientific-map .sm-public-form label {
    display: block; width: auto; color: var(--sm-secondary); font-size: 13px; margin: 0 0 4px;
}
.scientific-map .sm-public-form :is(input:not([type="hidden"], [type="submit"]), select, .select),
.scientific-map #login-box.sm-account-form input:not([type="hidden"]) {
    width: 100%; min-width: 0; max-width: 100%; min-height: 42px;
    padding: 6px 9px; margin: 0; border: 1px solid #bbc9dc; border-radius: 8px;
    background: var(--sm-surface); color: var(--sm-ink); font: inherit;
}
.scientific-map #ExportForm { padding: 0; gap: 14px; }
.scientific-map #ExportForm > div,
.scientific-map #ExportForm .input { float: none; width: 100%; min-width: 0; margin: 0; padding: 0; }
.scientific-map #ExportForm label { padding: 0; text-align: start; font-weight: 600; }
.scientific-map #ExportForm :is(select, input[type="text"], input[type="email"]) {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: auto;
    min-height: 44px;
    padding: 8px 12px;
    margin: 0;
    border: 1px solid #bbc9dc;
    border-radius: 8px;
    background: var(--sm-surface);
    color: var(--sm-ink);
    line-height: 1.4;
    text-indent: 0;
}
.scientific-map #ExportForm .sm-export-products { display: grid; }
.scientific-map #ExportForm .sm-export-add { margin-top: 8px; }
.scientific-map #ExportForm :is(#AddedExportsList, #ExportSubmit) { width: 100%; }
@media (max-width: 900px) {
    .scientific-map #ExportForm :is(select, input[type="text"], input[type="email"]) { font-size: 16px; }
}
.scientific-map .sm-public-form .select { padding: 0; }
.scientific-map .sm-public-form .select .selected { padding: 8px; }
.scientific-map .sm-public-form .selectOptions {
    z-index: 5;
    max-width: 100%;
    max-height: 18rem;
    overflow: auto;
    background: var(--sm-surface);
    border-color: var(--sm-border);
}
.sm-export-sign-in { display: grid; gap: 12px; padding-block: 6px 10px; }
.sm-export-sign-in p { margin: 0; color: var(--sm-secondary); }
.scientific-map #login-box.sm-account-form form { gap: 14px; padding: 0; }
.scientific-map #login-box.sm-account-form h2 { margin: 0; font-size: 16px; line-height: 1.35; }
.scientific-map #login-box.sm-account-form label {
    padding: 0; line-height: 1.35; text-align: start; font-weight: 600;
}
.scientific-map #login-box.sm-account-form input:not([type="hidden"]) {
    display: block; box-sizing: border-box; width: 100%; height: auto; min-height: 44px; text-indent: 0;
}
.scientific-map .sm-account-form .sm-account-links { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.scientific-map .sm-account-links button {
    min-height: 44px; border: 0; padding: 4px 2px; background: transparent;
    color: var(--sm-primary-text); text-decoration: underline; text-underline-offset: 3px;
}
.scientific-map .sm-account-form .message {
    margin: 0 0 14px; padding: 10px; border: 1px solid var(--sm-border);
    border-radius: 8px; background: var(--sm-bg); color: var(--sm-ink); overflow-wrap: anywhere;
}
.scientific-map .sm-account-form .message.error {
    border-color: #fecaca; background: #fff1f2; color: #9f1239;
}
.scientific-map .sm-primary-button,
.scientific-map #export-box #ExportSubmit {
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    padding-inline: 12px;
    background: var(--sm-primary);
    color: #fff;
    font-weight: 650;
    cursor: pointer;
}
.scientific-map .sm-primary-button:hover,
.scientific-map #export-box #ExportSubmit:hover:not(:disabled) { background: var(--sm-primary-text); }
.scientific-map .sm-catalog:has(.sm-export-form:not(.ng-hide)) .absoluteBottom { display: none; }
/* Export: what happens with the request, and the products chosen for it as cards like in the product list. */
.scientific-map #ExportForm :is(.sm-export-intro, .sm-export-selection, .sm-export-selection p) { text-align: start; }
.scientific-map #ExportForm .sm-export-intro { margin: 0; color: var(--sm-secondary); line-height: 1.45; }
.scientific-map #ExportForm #AddedExportsDiv.sm-export-selection { display: grid; gap: 8px; margin: 0; }
.scientific-map #ExportForm .sm-export-list-title {
    display: flex; justify-content: space-between; align-items: baseline; margin: 4px 0 0; font-weight: 600;
}
.scientific-map #ExportForm [data-export-count] { color: var(--sm-secondary); font-weight: 400; font-variant-numeric: tabular-nums; }
.scientific-map #ExportForm .sm-export-empty {
    margin: 0; padding: 12px; border: 1px dashed #bbc9dc; border-radius: 8px;
    color: var(--sm-secondary); line-height: 1.45;
}
.scientific-map #ExportForm #AddedExportsList { display: grid; gap: 6px; margin: 0; }
.scientific-map #ExportForm #AddedExportsList > .ExportRow:not(.sm-export-item) { display: none; }
.scientific-map #ExportForm .sm-export-item {
    display: flex; align-items: center; gap: 8px; width: 100%; min-height: 52px; margin: 0;
    padding: 6px 6px 6px 12px; border: 1px solid var(--sm-border); border-left: 3px solid var(--sm-primary);
    border-radius: 8px; background: var(--sm-surface);
}
.scientific-map #ExportForm .sm-export-item .ExportLayerName {
    display: grid; flex: 1; gap: 2px; width: auto; min-width: 0; padding: 0; overflow-wrap: anywhere;
}
.scientific-map #ExportForm .sm-export-item strong { font-size: 13px; font-weight: 450; color: var(--sm-ink); }
.scientific-map #ExportForm .sm-export-item small { color: var(--sm-secondary); font-size: 12px; line-height: 1.3; }
.scientific-map #ExportForm .sm-export-item .ExportLayerDelete {
    position: static; display: flex; flex: none; width: auto; padding: 0;
}
.scientific-map #ExportForm .sm-export-item { position: static; line-height: 1.35; font-size: 13px; }
.scientific-map #ExportForm .sm-export-remove {
    display: grid; place-items: center; width: 36px; height: 36px; padding: 0;
    border: 0; border-radius: 8px; background: transparent; color: var(--sm-secondary); cursor: pointer;
}
.scientific-map #ExportForm .sm-export-remove svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.scientific-map #ExportForm .sm-export-remove:hover { color: #b91c1c; background: #fee2e2; }
.scientific-map #ExportForm .sm-export-remove:focus-visible { outline: 2px solid var(--sm-primary); outline-offset: 1px; }
.scientific-map #ExportForm .sm-export-note {
    display: flex; gap: 10px; margin: 4px 0 2px; padding: 10px 12px; border-radius: 8px;
    color: var(--sm-ink); background: var(--sm-selected); line-height: 1.45;
}
.scientific-map #ExportForm .sm-export-note svg { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--sm-primary-text); }
.scientific-map #ExportForm .sm-export-note p { margin: 0; font-size: 13px; }
.scientific-map #export-box #ExportSubmit:disabled { opacity: .45; cursor: not-allowed; }
@media (forced-colors: active) {
    .scientific-map #ExportForm .sm-export-item { border-left-color: Highlight; }
}
.scientific-map #time-cal-exp {
    position: fixed !important; z-index: 30; inset: 50% auto auto 50% !important;
    transform: translate(-50%, -50%); max-width: calc(100vw - 16px);
    max-height: 85dvh; overflow: auto;
}

.scientific-map .sm-map-tools { width: min(244px, calc(100% - 72px)); max-height: calc(100% - 58px); overflow: auto; }
.sm-tool-list { display: grid; gap: 3px; }
.sm-tool-list :is(button, label) {
    display: flex; align-items: center; gap: 9px; width: 100%;
    min-height: 42px; padding: 5px 8px; border: 0; border-radius: 7px;
    text-align: left; background: var(--sm-surface); color: var(--sm-ink); cursor: pointer;
}
.sm-tool-list :is(button, label):hover, .sm-tool-list button[aria-pressed="true"],
.sm-tool-list label:has(input:checked),
.sm-map-actions button:is([aria-pressed="true"], [aria-expanded="true"], [aria-current="true"]),
.sm-top-actions [data-more-toggle][aria-expanded="true"] {
    background: var(--sm-selected); color: var(--sm-primary-text);
}
.scientific-map .sm-tool-list input[type="checkbox"] {
    display: block; appearance: auto; margin-left: auto; width: 18px; height: 18px; accent-color: var(--sm-primary);
}

.sm-area-brush { position: absolute; inset: 0; z-index: 7; cursor: crosshair; touch-action: none; }
.sm-area-rectangle {
    position: absolute; pointer-events: none;
    border: 2px dashed var(--sm-primary); background: rgb(0 102 255 / 15%);
}
.sm-area-panel {
    position: absolute; z-index: 8; top: 8px; left: 50%; transform: translateX(-50%);
    display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
    width: max-content; max-width: calc(100% - 130px); padding: 6px 8px;
    background: var(--sm-surface); border: 1px solid var(--sm-border); border-radius: 8px;
    box-shadow: var(--sm-shadow);
}
.sm-area-panel .sm-outline { min-height: 34px; font-size: 12px; }
@media (max-width: 900px) {
    .scientific-map .sm-map-tools { inset: 64px 14px auto auto; max-height: calc(100% - 76px); }
    .sm-area-panel { top: 64px; }
    .sm-area-panel { max-width: calc(100% - 124px); }
    .sm-area-panel span { width: 100%; font-size: 12px; }
}

.scientific-map .sm-export-form #ExportAddButton.sm-export-add {
    position: static;
    display: inline-flex;
    width: auto;
    height: auto;
    margin: 7px 0 0;
    background-image: none;
}

.sm-projection-login { margin: 8px 0 0; color: var(--sm-secondary); font-size: 13px; }
.sm-projection-login a { color: var(--sm-primary-text); text-underline-offset: 3px; }
.sm-project-dialog { width: min(480px, calc(100% - 24px)); }
.sm-project-dialog p { margin: 12px 0; }
.sm-project-dialog > a { color: var(--sm-primary-text); background: var(--sm-selected); font-weight: 650; }
.sm-project-page { padding: 20px clamp(14px, 5vw, 48px); }
.sm-project-page main { margin: 22px auto; max-width: 760px; }
.sm-project-page article {
    padding: clamp(18px, 5vw, 40px);
    border: 1px solid var(--sm-border);
    border-radius: var(--sm-radius);
    background: var(--sm-surface);
}
.sm-project-page h1 { margin-top: 0; font-size: clamp(24px, 5vw, 38px); line-height: 1.2; }
.sm-project-page h2 { font-size: 19px; }
.sm-project-page a { color: var(--sm-primary-text); text-underline-offset: 3px; }

.scientific-map #scale-settings { box-sizing: border-box; padding: 16px; }
.scientific-map #scale-settings h2 { margin: 0 36px 12px 0; padding: 0; letter-spacing: normal; font-size: 17px; }
.scientific-map #scale-settings .scaleForm { display: grid; gap: 10px; }
.scientific-map #scale-settings .sm-scale-mode {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}
.scientific-map #scale-settings .sm-scale-mode legend {
    margin-bottom: 6px; padding: 0; color: var(--sm-secondary); font-size: 13px; font-weight: 650;
}
.scientific-map #scale-settings .sm-scale-mode label {
    display: flex; align-items: center; gap: 5px; min-height: 40px; margin: 0; padding: 5px 6px;
    border: 1px solid var(--sm-border); border-radius: 8px; font-size: 13px; cursor: pointer;
}
.scientific-map #scale-settings .sm-scale-mode label:has(:checked) {
    border-color: #9abcff; background: var(--sm-selected); color: var(--sm-primary-text);
}
.scientific-map #scale-settings .sm-scale-mode input[type="radio"] {
    appearance: auto; flex: 0 0 16px; width: 16px; height: 16px;
    min-height: 0; margin: 0; padding: 0; accent-color: var(--sm-primary);
}
.scientific-map #scale-settings .sm-scale-fields {
    display: grid; gap: 8px 12px; grid-template-columns: repeat(2, minmax(0, 1fr));
}
.scientific-map #scale-settings .sm-scale-fields > :last-child { grid-column: 1 / -1; }
.scientific-map #scale-settings .sm-scale-field { min-width: 0; }
.scientific-map #scale-settings .sm-scale-field label {
    display: block; margin: 0 0 4px; padding: 0; color: var(--sm-secondary); font-size: 13px; font-weight: 650;
}
.scientific-map #scale-settings .sm-scale-field :is(input, select) {
    box-sizing: border-box; width: 100%; min-height: 40px; margin: 0; padding: 5px 9px;
    border: 1px solid #bbc9dc; border-radius: 8px; text-align: start; font: inherit;
}
.scientific-map #scale-settings [role="status"]:not(:has(p)) { position: absolute; }
.scientific-map #scale-settings .button_change_legend_image_config {
    float: none; width: 100%; min-height: 40px; border: 1px solid var(--sm-primary);
    border-radius: 8px; color: white; background: var(--sm-primary); font-weight: 650;
}
.scientific-map #scale-settings .button_change_legend_image_config:hover { background: var(--sm-primary-text); }

.scientific-map #scale-settings button.legendHide {
    position: absolute; inset: 10px 10px auto auto; width: 40px; height: 40px;
    border: 0; border-radius: 8px; background: var(--sm-surface); color: var(--sm-ink);
    font-size: 20px; cursor: pointer;
}
.scientific-map #scale-settings button.legendHide:hover { background: var(--sm-selected); }
.scientific-map #scale-settings button.legendHide::before { content: '×'; }

.sm-more { position: relative; }
.scientific-map .sm-more-menu {
    position: absolute;
    z-index: 45;
    inset: calc(100% + 7px) 0 auto auto;
    width: min(280px, calc(100vw - 24px));
    height: auto;
    margin: 0;
    max-height: min(calc(100dvh - 88px), 520px);
    overflow: auto;
    overscroll-behavior: contain;
    padding: 5px;
    border: 1px solid var(--sm-border);
    border-radius: 10px;
    background: var(--sm-surface);
    box-shadow: var(--sm-shadow);
}
.sm-more-menu .sm-more-group + .sm-more-group {
    margin-top: 3px; padding-top: 3px; border-top: 1px solid var(--sm-border);
}
.scientific-map .sm-more-menu .sm-more-group :is(a, button) {
    display: flex; justify-content: start; gap: 8px; width: 100%;
    min-height: 40px; padding: 6px 9px; text-align: start; font-weight: 550;
}
