:root {
  color-scheme: dark;
  --bg: #0c1519;
  --panel: #132227;
  --surface: #192b31;
  --line: #2b4147;
  --ink: #e9f2f0;
  --muted: #a4bbba;
  --accent: #a5e5ce;
  --warning: #fad79e;
  font:
    15px/1.45 system-ui,
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}
a {
  color: var(--accent);
  text-underline-offset: 0.22em;
}
[hidden] {
  display: none !important;
}
button,
select,
input {
  font: inherit;
  color: inherit;
  accent-color: var(--accent);
}
button,
select,
input[type="date"] {
  min-height: 39px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}
button,
select,
input[type="range"],
input[type="date"],
summary {
  cursor: pointer;
}
button:hover,
select:hover {
  border-color: var(--accent);
}
button[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
}
button:disabled {
  opacity: 0.46;
  cursor: default;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px max(20px, calc((100% - 1430px) / 2));
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  gap: 16px;
  align-items: baseline;
}
.brand b {
  color: var(--accent);
  font-size: 1.15rem;
}
.brand span,
.note {
  color: var(--muted);
}
main {
  width: min(1430px, calc(100% - 40px));
  margin: 25px auto 36px;
}
.title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  margin-bottom: 17px;
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font-size: clamp(1.7rem, 3.2vw, 2.85rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}
h2 {
  font-size: 1.08rem;
  line-height: 1.3;
}
#snapshot-status {
  color: var(--muted);
  text-align: right;
  font-size: 0.86rem;
}
#snapshot-status[data-level="warning"],
#source-errors {
  color: var(--warning);
}
.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(262px, 310px);
  gap: 14px;
  align-items: start;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  min-width: 0;
}
.map-panel {
  overflow: hidden;
}
.map-header {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  padding: 12px;
}
.map-header label {
  display: grid;
  gap: 4px;
  flex: 1 1 185px;
  min-width: 0;
}
.map-header label span,
.time-labels {
  color: var(--muted);
  font-size: 0.78rem;
}
.area-control {
  display: flex;
  gap: 5px;
}
.map-body {
  position: relative;
  background: #102127;
  border-block: 1px solid var(--line);
}
#map {
  width: 100%;
  height: clamp(380px, 52vh, 650px);
  display: block;
  touch-action: none;
  cursor: crosshair;
}
.map-buttons {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  gap: 4px;
}
.map-buttons button,
.timeline button {
  min-width: 40px;
}
.map-readout,
.map-error,
.legend {
  position: absolute;
  border: 1px solid #6b8a88;
  border-radius: 7px;
  background: #102024f5;
  padding: 8px 10px;
}
.map-readout,
.map-error {
  top: 12px;
  left: 12px;
  max-width: calc(100% - 78px);
}
.map-readout {
  pointer-events: none;
}
.map-error {
  color: var(--warning);
}
.legend {
  left: 12px;
  bottom: 12px;
  width: min(280px, calc(100% - 24px));
  pointer-events: none;
  font-size: 0.79rem;
}
.legend-colors,
.legend-values {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
}
.legend-colors {
  height: 7px;
  margin: 5px 0 2px;
  overflow: hidden;
  border-radius: 4px;
}
.legend-values span:last-child {
  text-align: right;
}
.legend-values span:not(:first-child, :last-child) {
  text-align: center;
}
.legend small {
  display: block;
  line-height: 1.25;
  color: var(--muted);
}
.timeline {
  padding: 11px 12px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}
.time-controls {
  min-width: 110px;
  flex: 1;
}
input[type="range"] {
  margin: 0;
  width: 100%;
  display: block;
}
.time-labels {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
#date {
  max-width: 146px;
}
.right-column {
  display: grid;
  gap: 14px;
}
.point-panel,
.outlook,
.history,
.sources {
  padding: 15px;
}
.point-head {
  display: grid;
  gap: 10px;
}
.point-head select {
  width: 100%;
}
.reading {
  display: grid;
  margin: 14px 0 10px;
  color: var(--muted);
}
.reading strong {
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}
#position {
  margin-top: 6px;
  font-size: 0.8rem;
}
.meta {
  display: grid;
  gap: 5px;
  margin: 0;
}
.meta div {
  display: grid;
  grid-template-columns: 35% minmax(0, 1fr);
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
}
.meta dt {
  color: var(--muted);
}
.meta dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.note {
  margin-top: 10px;
  font-size: 0.83rem;
}
.outlook-values {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.outlook-values div {
  display: grid;
  color: var(--muted);
}
.outlook-values strong {
  color: var(--accent);
  font-size: 1.48rem;
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
}
.section-head p {
  color: var(--muted);
  font-size: 0.83rem;
}
#chart {
  display: block;
  width: 100%;
  min-height: 120px;
}
details {
  margin-top: 5px;
}
summary {
  color: var(--accent);
}
table {
  width: 100%;
  margin-top: 8px;
  text-align: left;
  border-collapse: collapse;
}
td,
th {
  border-top: 1px solid var(--line);
  padding: 4px;
}
.sources {
  grid-column: 1 / -1;
}
.sources ul {
  padding-inline-start: 20px;
  margin: 10px 0 0;
}
.sources li + li {
  margin-top: 7px;
}
#retry {
  margin-top: 12px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
@media (max-width: 900px) {
  .dashboard {
    grid-template-columns: 1fr;
  }
  .right-column {
    grid-row: 2;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}
@media (max-width: 570px) {
  main {
    width: calc(100% - 20px);
    margin-top: 17px;
  }
  .masthead {
    padding: 12px 10px;
    font-size: 0.82rem;
  }
  .brand {
    gap: 8px;
  }
  .title-row {
    display: grid;
  }
  #snapshot-status {
    text-align: left;
  }
  #map {
    height: 400px;
  }
  .timeline .time-controls {
    order: 2;
    flex-basis: 100%;
  }
}
/* Панель управления сохраняет карту первой на узких экранах. */
:root {
  --bg: #0a161c;
  --panel: #11242c;
  --surface: #172f39;
  --line: #2a4550;
  --ink: #edf5f5;
  --muted: #9ebcc4;
  --accent: #9ce8d7;
}
body {
  background: radial-gradient(ellipse at 30% 0, #122d38, var(--bg) 67%);
}
.masthead {
  min-height: 60px;
  padding-block: 0;
  background: #0a181f;
}
.brand {
  color: var(--accent);
  text-decoration: none;
  font-weight: 720;
  font-size: 1.15rem;
}
.brand span {
  padding-inline-start: 13px;
  border-inline-start: 1px solid var(--line);
  font-size: 0.87rem;
  font-weight: 500;
}
.report-link {
  font-size: 0.88rem;
}
main {
  margin-top: 21px;
}
.title-row {
  align-items: end;
  gap: 20px;
  margin-bottom: 15px;
}
h1 {
  font-size: clamp(1.75rem, 3.2vw, 2.85rem);
}
#snapshot-status {
  margin-top: 6px;
  text-align: left;
}
.location-control {
  display: grid;
  gap: 4px;
  min-width: 260px;
  color: var(--muted);
  font-size: 0.78rem;
}
.location-control select {
  color: var(--ink);
  font-size: 0.94rem;
  max-width: 310px;
}
.dashboard {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 342px);
  column-gap: 14px;
}
.modes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  grid-column: 1 / -1;
  margin-block: 0 1px;
}
.mode {
  background: #102731;
  min-height: 43px;
  padding-inline: 16px;
}
.mode[aria-pressed="true"] {
  background: #a3ead9;
  border-color: #a3ead9;
  color: #0e2c32;
  font-weight: 700;
}
.map-header {
  flex-wrap: nowrap;
  padding: 10px 12px 12px;
}
.map-header label {
  flex-basis: 50%;
}
.map-header select {
  width: 100%;
}
#map {
  height: clamp(410px, 55vh, 650px);
}
.map-views {
  position: absolute;
  inset: 12px auto auto 12px;
  max-width: calc(100% - 72px);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.map-views button {
  min-height: 34px;
  background: #0d212bf2;
  padding: 5px 8px;
  font-size: 0.8rem;
  white-space: nowrap;
}
.map-views button[aria-pressed="true"] {
  background: #214750;
}
.map-readout,
.map-error {
  top: auto;
  bottom: 86px;
}
.legend {
  width: min(295px, calc(100% - 105px));
}
.legend small {
  margin-top: 5px;
}
.scale {
  position: absolute;
  right: 12px;
  bottom: 13px;
  padding-top: 4px;
  border-top: 2px solid #d5efef;
  text-shadow:
    0 1px 5px #0a1420,
    0 1px 4px #0a1420;
  color: #ebffff;
  text-align: center;
  font-size: 0.76rem;
  pointer-events: none;
}
.timeline {
  display: grid;
  gap: 8px;
  padding: 8px 12px 10px;
}
.timeline-top,
.timeline-bottom {
  display: flex;
  align-items: center;
  gap: 7px;
}
.timeline-top {
  justify-content: space-between;
}
#time-caption {
  color: #cfe9e8;
  font-variant-numeric: tabular-nums;
}
.date-control {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.8rem;
}
.date-control input {
  min-height: 34px;
}
.terrain-credit {
  border-top: 1px solid var(--line);
  padding: 7px 12px;
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.3;
}
.terrain-credit:empty {
  display: none;
}
.point-head {
  gap: 3px;
}
.point-head p {
  color: var(--muted);
}
.reading {
  margin-top: 9px;
}
.reading time {
  color: var(--muted);
  font-size: 0.82rem;
}
.reading strong {
  line-height: 1.22;
  font-size: clamp(2.2rem, 4vw, 3.05rem);
}
.outlook table {
  font-size: 0.83rem;
}
.outlook th:first-child {
  width: 50%;
}
.outlook td:first-child {
  color: var(--muted);
}
.outlook td,
.outlook th {
  padding-block: 6px;
}
.outlook td button {
  min-height: 37px;
  width: 100%;
  padding-inline: 5px;
  white-space: nowrap;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.case-panel,
.station {
  padding: 15px;
}
.case-panel button {
  margin-top: 8px;
  width: 100%;
  text-align: left;
}
.station-reading {
  font-size: 0.84rem;
  color: var(--muted);
  margin-top: 8px;
}
#cyclone-list {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.83rem;
}
#cyclone-list p + p {
  margin-top: 6px;
}
@media (max-width: 900px) {
  .dashboard {
    grid-template-columns: 1fr;
  }
  .right-column {
    grid-row: 3;
  }
}
@media (max-width: 570px) {
  .masthead {
    min-height: 50px;
  }
  .brand {
    font-size: 1rem;
  }
  .brand span {
    padding-inline-start: 8px;
    font-size: 0.74rem;
  }
  .report-link {
    font-size: 0.75rem;
  }
  .title-row {
    gap: 9px;
  }
  .location-control select {
    width: 100%;
    max-width: none;
  }
  .mode {
    min-height: 37px;
    font-size: 0.82rem;
    padding-inline: 9px;
  }
  .map-views {
    max-width: calc(100% - 60px);
  }
  .map-views button {
    min-height: 31px;
    font-size: 0.72rem;
  }
  #map {
    height: 410px;
  }
  .timeline .time-controls {
    order: inherit;
    flex-basis: 100px;
  }
  .timeline-bottom button {
    min-width: 32px;
    padding-inline: 6px;
  }
  .date-control span {
    display: none;
  }
}
.layer-shortcuts {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding: 0 12px 10px;
}
.layer-shortcuts:empty {
  display: none;
}
.layer-shortcuts button {
  min-height: 31px;
  white-space: nowrap;
  font-size: 0.79rem;
  padding-inline: 8px;
  background: #102731;
}
.reading strong.categorical {
  font-size: 1.65rem;
}
.verification {
  grid-column: 1 / -1;
  padding: 15px;
}
.verification-table {
  overflow-x: auto;
}
.verification-table table {
  min-width: 650px;
}
.verification-table td,
.verification-table th {
  padding: 8px 7px;
}
#snow-station {
  margin-top: 8px;
  width: 100%;
}
#legend-image {
  display: block;
  width: 100%;
  margin-top: 5px;
  background: #e7f2f3;
  border-radius: 2px;
}
.archive-gap {
  padding: 6px 12px 9px;
  color: var(--warning);
  font-size: 0.84rem;
}
.route-key {
  padding: 8px 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.76rem;
}
.route-key span::before {
  content: "";
  display: inline-block;
  vertical-align: middle;
  width: 14px;
  margin-right: 5px;
  border-top: 2px solid currentColor;
}
.route-key .piste-key {
  color: #e3fbfd;
}
.route-key .lift-key {
  color: #ffd7a3;
}
.route-key .lift-key::before {
  border-style: dashed;
}
.route-key .road-key {
  color: #eac39b;
}
.route-key .river-key {
  color: #75bbda;
}
.feature-label {
  position: absolute;
  top: 50px;
  left: 12px;
  max-width: calc(100% - 72px);
  padding: 5px 8px;
  border-radius: 6px;
  background: #102024f5;
  color: var(--accent);
  font-size: 0.84rem;
  pointer-events: none;
}

.morning-panel {
  grid-column: 1 / -1;
  padding: 16px;
}
.morning-panel .section-head {
  align-items: baseline;
}
.morning-filters,
.morning-windows {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.morning-filters {
  margin: 12px 0 8px;
}
.morning-filters label {
  display: grid;
  gap: 4px;
  font-size: 0.83rem;
}
.morning-windows {
  margin: 12px 0;
}
.morning-window {
  flex: 1 1 260px;
  min-width: 0;
  padding: 12px 14px;
  border-inline-start: 3px solid #6aa991;
  background: #192d31;
}
.morning-window h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}
.morning-window p,
#morning-check-data p,
#wind-examples p {
  margin: 5px 0;
}
.morning-window small {
  color: var(--muted);
}
#morning-windows:empty,
.morning-filters label:has(select:empty) {
  display: none;
}
#wind-example-list button {
  white-space: normal;
}
@media (max-width: 900px) {
  .dashboard:has(#morning-panel:not([hidden])) .right-column {
    grid-row: auto;
  }
}
#resort-reports label {
  display: grid;
  gap: 4px;
  font-size: 0.83rem;
  margin: 8px 0;
}
#resort-reports select {
  width: 100%;
}
.report-article {
  max-width: 850px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.report-article h2 {
  margin-top: 2rem;
  font-size: 1.35rem;
}
.report-article p {
  margin: 1rem 0;
}
.report-article td,
.report-article th {
  padding: 0.45rem;
}
.report-article table {
  display: block;
  overflow-x: auto;
}
.morning-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  gap: 0.5rem 1rem;
  margin: 0.45rem 0;
}
.morning-metrics dt {
  color: var(--muted);
  font-size: 0.8rem;
}
.morning-metrics dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.morning-window > strong {
  display: block;
  margin-top: 0.75rem;
  color: var(--accent);
}
#map-to-day {
  margin: 0.3rem 0 0.55rem;
}

.map-views {
  position: static;
  max-width: 100%;
  gap: 5px;
  padding: 3px 12px 9px;
  overflow-x: auto;
  flex-wrap: nowrap;
}
.map-views button {
  border: 0;
  background: transparent;
  min-height: 29px;
}
.layer-shortcuts {
  padding: 12px 12px 5px;
}
.layer-shortcuts button {
  border-radius: 20px;
  padding: 5px 13px;
  min-height: 33px;
}
.layer-shortcuts button[aria-pressed="true"] {
  background: #d3ecef;
  border-color: #d3ecef;
  color: #12323a;
}
.map-settings {
  padding: 8px 13px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
}
.map-settings .map-header {
  padding: 10px 0;
}
.atlas-toggles {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.atlas-toggles label {
  display: flex;
  align-items: center;
  gap: 6px;
}
.atlas-toggles input[type="range"] {
  width: 90px;
}
#frame-counter {
  margin-inline-start: 0.5rem;
  color: var(--muted);
}
#time-caption {
  font-size: 1rem;
}
#fit-layer {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.74rem;
  min-height: 28px;
  background: #102024ed;
}
.legend {
  max-width: 310px;
}
.legend small {
  max-height: 3.9em;
  overflow: auto;
  pointer-events: auto;
}
.panel.sources > summary {
  font-weight: 600;
}
@media (max-width: 570px) {
  .modes {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-block: 2px 6px;
  }
  .mode {
    white-space: nowrap;
  }
  .map-views {
    max-width: 100%;
  }
  .map-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "map"
      "legend";
  }
  .map-body > :not(.legend) {
    grid-area: map;
  }
  .map-body > .legend {
    grid-area: legend;
    position: static;
    width: auto;
    max-width: none;
    border-width: 1px 0 0;
    border-color: var(--line);
    border-radius: 0;
    background: var(--panel);
    padding-inline: 12px;
    pointer-events: auto;
  }
  .legend small {
    max-height: none;
    overflow: visible;
  }
  .legend small:empty {
    display: none;
  }
  .map-header {
    flex-wrap: wrap;
  }
  #frame-counter {
    display: block;
    margin-left: 0;
  }
}
#optical-compare {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 13px;
  background: #1a303a;
  font-size: 0.81rem;
}
#optical-compare span {
  flex-shrink: 0;
}
#optical-compare input {
  width: min(230px, 40%);
}
#experiment-result table {
  width: 100%;
  margin-top: 0.7rem;
  font-variant-numeric: tabular-nums;
}
#experiment-result th,
#experiment-result td {
  padding: 0.25rem;
  text-align: right;
}
#experiment-result button {
  margin-top: 0.5rem;
}
#legend-classes {
  margin: 5px 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 8px;
  line-height: 1.24;
}
#legend-classes span {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 0.73rem;
}
#legend-classes i {
  min-width: 9px;
  height: 9px;
  border: 1px solid #aebcc1;
  border-radius: 2px;
}
#run-picker {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 13px;
  color: var(--muted);
  font-size: 0.83rem;
}
