.wielm-nwp-viewer {
  --wielm-bg: #07111d;
  --wielm-panel: #101d2b;
  --wielm-panel-2: #142337;
  --wielm-line: #294057;
  --wielm-text: #e8eef7;
  --wielm-muted: #9fb0c4;
  --wielm-accent: #38bdf8;
  --wielm-left-width: 330px;
  position: fixed;
  inset: 0;
  left: 0;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  min-height: 0;
  margin: 0;
  display: grid;
  grid-template-columns: var(--wielm-left-width) minmax(520px, 1fr) var(--wielm-sidebar-width);
  grid-template-rows: 44px minmax(0, 1fr) 136px 24px;
  background: var(--wielm-bg);
  color: var(--wielm-text);
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  overflow: hidden;
  z-index: 99999;
}

body.admin-bar .wielm-nwp-viewer {
  top: 32px;
  height: calc(100dvh - 32px);
}

@media screen and (max-width: 782px) {
  body.admin-bar .wielm-nwp-viewer {
    top: 46px;
    height: calc(100dvh - 46px);
  }
}

.wielm-nwp-viewer * { box-sizing: border-box; }

.wielm-nwp-topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px;
  border-bottom: 1px solid var(--wielm-line);
  background: #08111b;
  font-size: 13px;
}

.wielm-nwp-title,
.wielm-nwp-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.wielm-nwp-title strong {
  color: #ffffff;
  letter-spacing: 0;
}

.wielm-beta-label {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 2px 6px;
  border: 1px solid rgba(56, 189, 248, 0.55);
  background: rgba(56, 189, 248, 0.12);
  color: #bae6fd;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
}

.wielm-home-link {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border: 1px solid #294057;
  border-radius: 5px;
  background: #0d1a28;
  color: #d7ecff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.wielm-home-link:hover,
.wielm-home-link:focus {
  border-color: #ffffff !important;
  background: #ffffff !important;
  color: #07111d !important;
  text-decoration: none !important;
}

.wielm-nwp-title span,
.wielm-nwp-actions span {
  color: #b7d7ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wielm-nwp-actions button,
.wielm-time-controls button,
.wielm-time-grid button,
.wielm-param-list button {
  border: 1px solid var(--wielm-line);
  border-radius: 5px;
  background: var(--wielm-panel-2);
  color: var(--wielm-text);
  cursor: pointer;
}

.wielm-nwp-actions button {
  min-height: 28px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
}

.wielm-meteogram-panel,
.wielm-nwp-sidebar {
  grid-row: 2 / 4;
  background: var(--wielm-panel);
  overflow: auto;
}

.wielm-meteogram-panel {
  grid-column: 1;
  border-right: 1px solid var(--wielm-line);
  display: grid;
  grid-template-rows: 38px auto minmax(0, 1fr);
  overflow: hidden;
}

.wielm-nwp-sidebar {
  grid-column: 3;
  padding: 14px;
  border-left: 1px solid var(--wielm-line);
}

.wielm-nwp-sidebar section {
  margin-bottom: 15px;
}

.wielm-nwp-sidebar label {
  display: block;
  margin-bottom: 7px;
  color: var(--wielm-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.wielm-nwp-sidebar select,
.wielm-point-readout {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--wielm-line);
  border-radius: 5px;
  background: #08111b;
  color: var(--wielm-text);
  padding: 7px 9px;
  font-size: 13px;
}

.wielm-nwp-sidebar select option:disabled {
  color: #64748b;
}

.wielm-model-state {
  margin-top: 6px;
  color: #93c5fd;
  font-size: 10px;
  line-height: 1.3;
}

.wielm-model-state.is-stale {
  color: #fbbf24;
  font-weight: 700;
}

.wielm-param-list {
  display: grid;
  gap: 6px;
}

.wielm-data-alert {
  padding: 10px;
  border: 1px solid #7f1d1d;
  border-radius: 5px;
  background: rgba(127, 29, 29, 0.22);
  color: #fecaca;
  font-size: 12px;
  line-height: 1.4;
}

.wielm-param-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 5px;
  min-width: 0;
}

.wielm-param-select {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 32px;
  padding: 6px 8px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
}

.wielm-param-select span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wielm-param-select b {
  color: #dbeafe;
  font-family: Consolas, monospace;
}

.wielm-param-select.is-active,
.wielm-time-grid button.is-active {
  border-color: var(--wielm-accent);
  background: #0b3145;
  color: #ffffff;
}

.wielm-param-help {
  display: inline-grid;
  place-items: center;
  width: 34px;
  min-width: 34px;
  min-height: 32px;
  padding: 0;
  border-radius: 50% !important;
  background: #0a1724 !important;
  color: #7dd3fc !important;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.wielm-param-help:hover,
.wielm-param-help:focus-visible {
  border-color: #ffffff !important;
  background: #ffffff !important;
  color: #07111d !important;
  outline: none;
}

.wielm-param-dialog[hidden] {
  display: none !important;
}

.wielm-param-dialog {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 8, 16, 0.78);
  backdrop-filter: blur(4px);
}

.wielm-param-dialog__card {
  position: relative;
  width: min(460px, 100%);
  max-height: min(560px, calc(100dvh - 40px));
  overflow: auto;
  padding: 24px;
  border: 1px solid #3a536d;
  border-radius: 10px;
  background: #0e1c2b;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  color: #e8eef7;
}

.wielm-param-dialog__close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #3a536d;
  border-radius: 50%;
  background: #142337;
  color: #ffffff;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.wielm-param-dialog__close:hover,
.wielm-param-dialog__close:focus-visible {
  border-color: #ffffff;
  background: #ffffff;
  color: #07111d;
  outline: none;
}

.wielm-param-dialog__eyebrow {
  display: block;
  margin-right: 48px;
  color: #7dd3fc;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.wielm-param-dialog h2 {
  margin: 7px 48px 12px 0;
  color: #ffffff;
  font-size: 22px;
  line-height: 1.2;
}

.wielm-param-dialog p {
  margin: 0;
  color: #d8e5f3;
  font-size: 14px;
  line-height: 1.55;
}

.wielm-param-dialog dl {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid #2b4258;
}

.wielm-param-dialog dt {
  color: #8fa9c2;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.wielm-param-dialog dd {
  margin: 0;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.wielm-layer-switches label:not(:first-child) {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 7px;
  color: var(--wielm-text);
  text-transform: none;
  font-size: 12px;
  font-weight: 500;
}

.wielm-layer-switches [data-wielm-lightning-count] {
  color: #fde047;
  font-size: 10px;
  font-weight: 800;
}

.wielm-nwp-mapwrap {
  position: relative;
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  min-height: 0;
  background: #dbe4ee;
}

.wielm-nwp-map {
  position: absolute;
  inset: 0;
  background: #dbe4ee;
}

.wielm-nwp-map .wielm-model-raster {
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

.wielm-lightning-marker {
  border: 0;
  background: transparent;
}

.wielm-lightning-marker span {
  display: grid;
  width: 18px;
  height: 22px;
  place-items: center;
  color: #fde047;
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 0 2px #0f172a, 0 0 7px #f59e0b, 0 0 12px rgba(253, 224, 71, 0.92);
  transform: rotate(-8deg);
  animation: wielm-lightning-flash 0.42s ease-out 2;
}

.wielm-lightning-marker.is-strong span {
  color: #ffffff;
  font-size: 28px;
  text-shadow: 0 0 2px #0f172a, 0 0 8px #fde047, 0 0 16px #f97316;
}

.wielm-grid-value-label {
  background: transparent !important;
  border: 0 !important;
  pointer-events: none !important;
}

.wielm-grid-value-label span {
  display: inline-flex;
  min-width: 31px;
  height: 20px;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 4px;
  background: rgba(8, 17, 30, 0.82);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.58);
  color: #fff;
  font: 800 11px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  text-shadow: 0 1px 2px #000;
}

@keyframes wielm-lightning-flash {
  0%, 100% { opacity: 0.72; transform: rotate(-8deg) scale(0.88); }
  45% { opacity: 1; transform: rotate(-8deg) scale(1.2); }
}

.wielm-nwp-map .leaflet-control-attribution {
  display: block;
  max-width: min(70vw, 560px);
  font-size: 9px;
}

.wielm-location-control {
  position: relative;
  margin-top: 8px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.wielm-location-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.35);
  color: #0f172a;
  cursor: pointer;
}

.wielm-location-button:hover,
.wielm-location-button:focus-visible {
  background: #eaf6ff;
  color: #0369a1;
  outline: 2px solid #38bdf8;
  outline-offset: 1px;
}

.wielm-location-button:disabled {
  cursor: progress;
}

.wielm-location-button svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.wielm-location-button.is-locating svg {
  animation: wielm-location-spin 1s linear infinite;
}

.wielm-location-button.is-success {
  background: #e8fff4;
  color: #047857;
}

.wielm-location-button.is-error {
  background: #fff1f2;
  color: #be123c;
}

.wielm-location-status[hidden] {
  display: none !important;
}

.wielm-location-status {
  position: absolute;
  left: 42px;
  top: 0;
  display: flex;
  width: max-content;
  max-width: min(250px, calc(100vw - 104px));
  min-height: 34px;
  align-items: center;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 5px;
  background: rgba(8, 17, 27, 0.92);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
  color: #ffffff;
  font: 700 11px/1.25 "Segoe UI", Arial, sans-serif;
  pointer-events: none;
}

.wielm-location-status.is-success {
  border-color: rgba(52, 211, 153, 0.7);
}

.wielm-location-status.is-error {
  border-color: rgba(251, 113, 133, 0.8);
}

.wielm-user-location-marker {
  display: grid !important;
  place-items: center;
  border: 0 !important;
  background: transparent !important;
  filter: drop-shadow(0 1px 5px rgba(0, 0, 0, 0.72));
  pointer-events: none;
}

.wielm-user-location-marker span {
  display: block;
  width: 18px;
  height: 18px;
  border: 4px solid #ffffff;
  border-radius: 50%;
  background: #0284c7;
  box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.58);
  animation: wielm-location-pulse 1.8s ease-out infinite;
}

@keyframes wielm-location-spin {
  to { transform: rotate(360deg); }
}

@keyframes wielm-location-pulse {
  70%, 100% { box-shadow: 0 0 0 14px rgba(14, 165, 233, 0); }
}

.wielm-map-headline {
  position: absolute;
  z-index: 700;
  right: 14px;
  top: 12px;
  max-width: calc(100% - 88px);
  padding: 8px 11px;
  border: 1px solid rgba(15, 23, 42, 0.35);
  border-radius: 5px;
  background: rgba(8, 17, 27, 0.84);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wielm-colorbar {
  position: absolute;
  z-index: 710;
  left: 12px;
  bottom: 10px;
  width: min(520px, calc(100% - 24px));
  padding: 8px;
  border: 1px solid rgba(15, 23, 42, 0.35);
  border-radius: 5px;
  background: rgba(8, 17, 27, 0.84);
}

.wielm-colorbar-gradient {
  height: 14px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 2px;
}

.wielm-colorbar-labels {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin-top: 5px;
  color: #e2e8f0;
  font-size: 10px;
}

.wielm-colorbar-labels span {
  position: relative;
  cursor: help;
}

.wielm-colorbar-labels span:hover {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.wielm-colorbar-labels span:hover::after,
.wielm-colorbar-labels span:focus::after {
  content: attr(data-scale-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  z-index: 900;
  min-width: 150px;
  padding: 6px 8px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 3px;
  background: rgba(8, 17, 27, 0.94);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}

.wielm-frame-loader {
  position: absolute;
  z-index: 760;
  inset: 0;
  display: none;
  place-items: center;
  pointer-events: none;
  background: rgba(7, 17, 29, 0.12);
}

.wielm-frame-loader.is-visible {
  display: grid;
}

.wielm-nwp-viewer.is-exporting .wielm-frame-loader {
  display: none !important;
}

.wielm-frame-loader span {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(255, 255, 255, 0.58);
  border-top-color: var(--wielm-accent);
  border-radius: 50%;
  animation: wielm-spin 0.8s linear infinite;
}

@keyframes wielm-spin {
  to { transform: rotate(360deg); }
}

.wielm-timeline {
  grid-column: 2;
  grid-row: 3;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  grid-template-rows: 66px 42px;
  gap: 8px 10px;
  align-items: center;
  padding: 10px 12px;
  border-top: 1px solid var(--wielm-line);
  background: #08111b;
}

.wielm-time-controls {
  display: flex;
  gap: 7px;
  grid-row: 1 / 3;
  grid-column: 1;
  align-items: center;
  width: 132px;
  min-width: 132px;
  height: 100%;
  padding: 9px;
  border: 1px solid #294057;
  border-radius: 7px;
  background: #0d1a28;
  overflow: hidden;
}

.wielm-time-controls button {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  height: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 900;
}

.wielm-time-controls button:hover,
.wielm-time-controls button:focus {
  border-color: #38bdf8;
  background: #0b3145;
}

.wielm-time-controls svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.wielm-time-controls [data-wielm-play-icon] {
  display: block;
  line-height: 1;
}

.wielm-time-grid {
  grid-column: 2;
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  align-content: start;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: #294057 transparent;
}

.wielm-time-grid button {
  flex: 0 0 66px;
  min-width: 66px;
  min-height: 28px;
  padding: 3px 6px;
  font-family: Consolas, monospace;
  font-size: 11px;
}

.wielm-time-grid button small {
  display: block;
  color: var(--wielm-muted);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 9px;
  font-weight: 600;
}

.wielm-time-slider-wrap {
  grid-column: 2;
  position: relative;
  padding-right: 8px;
}

.wielm-time-slider-wrap input[type="range"] {
  width: 100%;
  accent-color: #38bdf8;
}

.wielm-time-scale {
  display: flex;
  justify-content: space-between;
  color: var(--wielm-muted);
  font-size: 10px;
}

.wielm-meteogram-tabs {
  display: grid;
  grid-template-columns: 1fr;
  border-bottom: 1px solid var(--wielm-line);
  background: #f8fafc;
}

.wielm-meteogram-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: #f8fafc;
  color: #334155;
  min-height: 30px;
  font-size: 12px;
  font-weight: 800;
}

.wielm-meteogram-tabs button:hover,
.wielm-meteogram-tabs button:focus {
  border-radius: 0;
  background: #eef6ff;
  color: #0284c7;
}

.wielm-meteogram-tabs button.is-active {
  border-radius: 0;
  background: #ffffff;
  border-bottom-color: #0284c7;
  color: #0284c7;
}

.wielm-point-card {
  padding: 10px 12px;
  border-bottom: 1px solid #dbe4ee;
  background: #eef6ff;
  color: #0f172a;
}

.wielm-point-card label {
  display: block;
  margin-bottom: 5px;
  color: #0369a1;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.wielm-point-card strong {
  display: block;
  margin-bottom: 2px;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.25;
}

.wielm-point-coordinates {
  display: block;
  margin-bottom: 7px;
  color: #64748b;
  font: 700 10px/1.3 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.wielm-point-card div {
  color: #334155;
  font-size: 12px;
  line-height: 1.35;
}

.wielm-left-panel {
  display: none;
  min-height: 0;
  overflow: auto;
}

.wielm-left-panel.is-active {
  display: grid;
}

.wielm-left-panel[data-wielm-left-panel="meteograms"] {
  grid-template-rows: auto minmax(0, 1fr);
}

.wielm-chart-stack {
  min-height: 0;
  display: grid;
  grid-template-rows: repeat(4, minmax(120px, 1fr));
}

.wielm-meteogram-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px 6px;
  background: #ffffff;
  color: #0f172a;
  font-size: 12px;
}

.wielm-meteogram-location {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.wielm-meteogram-location strong,
.wielm-meteogram-location small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wielm-meteogram-location small {
  color: #64748b;
  font: 700 9px/1.25 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.wielm-mini-chart {
  min-height: 0;
  height: auto;
  padding: 8px 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
}

.wielm-info-panel {
  padding: 14px;
  background: #0b1725;
  color: #e8eef7;
}

.wielm-info-panel h3 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 14px;
}

.wielm-info-panel dl {
  margin: 0;
  display: grid;
  gap: 10px;
}

.wielm-info-panel dt {
  color: #93c5fd;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.wielm-info-panel dd {
  margin: -6px 0 2px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
  color: #e8eef7;
  font-size: 12px;
  line-height: 1.35;
}

.wielm-info-panel a {
  color: #7dd3fc;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.wielm-info-panel a[aria-disabled="true"] {
  color: #cbd5e1;
  text-decoration: none;
}

.wielm-shortcode-disclaimer {
  grid-column: 1 / -1;
  grid-row: 4;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-top: 1px solid var(--wielm-line);
  background: #050b13;
  color: #7f91a8;
  font-size: 10px;
  line-height: 1.25;
}

.wielm-shortcode-disclaimer a {
  color: #bae6fd;
  font-weight: 800;
  text-decoration: none;
}

.wielm-shortcode-disclaimer a:hover,
.wielm-shortcode-disclaimer a:focus {
  color: #ffffff;
  text-decoration: underline;
}

.wielm-static-map img {
  display: block;
  width: 100%;
  height: auto;
  background: #dbe4ee;
}

.wielm-model-status {
  padding: 10px 12px;
  border: 1px solid #2b3f55;
  background: #111c29;
  color: #e8eef7;
  font-family: "Segoe UI", Arial, sans-serif;
}

.wielm-standalone-meteogram {
  padding: 14px;
  border: 1px solid #2b3f55;
  background: #0a1320;
  color: #e8eef7;
}

.wielm-standalone-meteogram .wielm-mini-chart {
  height: 180px;
}

@media (max-width: 1100px) {
  .wielm-nwp-viewer {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 48px 260px minmax(420px, 1fr) auto 124px 28px;
  }

  .wielm-meteogram-panel {
    grid-column: 1;
    grid-row: 2;
    border-right: 0;
    border-bottom: 1px solid var(--wielm-line);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: auto;
  }

  .wielm-meteogram-tabs,
  .wielm-meteogram-meta { grid-column: 1 / -1; }
  .wielm-mini-chart { height: 120px; }

  .wielm-nwp-mapwrap {
    grid-column: 1;
    grid-row: 3;
    min-height: 420px;
  }

  .wielm-nwp-sidebar {
    grid-column: 1;
    grid-row: 4;
    border-left: 0;
    border-top: 1px solid var(--wielm-line);
    max-height: 300px;
  }

  .wielm-timeline {
    grid-column: 1;
    grid-row: 5;
  }

  .wielm-shortcode-disclaimer {
    grid-row: 6;
  }
}

@media (max-width: 760px),
       (max-width: 1000px) and (max-height: 600px) and (orientation: landscape) {
  .wielm-nwp-viewer {
    --wielm-left-width: 100%;
    --wielm-sidebar-width: 100%;
    position: fixed;
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }

  .wielm-nwp-viewer > * {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  body.admin-bar .wielm-nwp-viewer {
    height: calc(100dvh - 46px);
  }

  .wielm-nwp-topbar {
    order: 1;
    flex: 0 0 auto;
    position: sticky;
    top: 0;
    z-index: 1200;
    min-height: 72px;
    align-items: stretch;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 6px 8px;
    border-bottom-color: #38526b;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.34);
    font-size: 10px;
  }

  .wielm-nwp-title,
  .wielm-nwp-actions {
    width: 100%;
    gap: 7px;
  }

  .wielm-nwp-title {
    justify-content: flex-start;
  }

  .wielm-nwp-actions {
    justify-content: space-between;
  }

  .wielm-nwp-title strong {
    flex: 0 0 auto;
    font-size: 11px;
    line-height: 1;
  }

  .wielm-beta-label {
    min-height: 30px;
    padding: 5px 7px;
    font-size: 9px;
  }

  .wielm-nwp-title span {
    display: none;
  }

  .wielm-home-link,
  .wielm-nwp-actions button {
    min-height: 36px;
    padding: 7px 10px;
    border-radius: 5px;
    font-size: 0;
    line-height: 1;
    white-space: nowrap;
  }

  .wielm-home-link {
    margin-left: auto;
  }

  .wielm-home-link::after {
    content: "STRONA GŁÓWNA";
    font-size: 9px;
  }

  .wielm-nwp-actions button::after {
    content: "EKSPORT PNG";
    font-size: 9px;
  }

  .wielm-nwp-actions span {
    flex: 1;
    min-width: 0;
    font-size: 8.5px;
    line-height: 1.2;
    text-align: right;
  }

  .wielm-nwp-mapwrap {
    order: 2;
    flex: 0 0 clamp(380px, 58svh, 600px);
    min-height: 380px;
    height: clamp(380px, 58svh, 600px);
    scroll-margin-top: 78px;
  }

  .wielm-map-headline {
    right: 6px;
    top: 6px;
    max-width: min(280px, calc(100% - 64px));
    padding: 5px 7px;
    border-radius: 4px;
    font-size: 8.5px;
    line-height: 1.25;
  }

  .wielm-location-button {
    width: 44px;
    height: 44px;
  }

  .wielm-location-button svg {
    width: 24px;
    height: 24px;
  }

  .wielm-location-status {
    left: 50px;
    min-height: 44px;
    max-width: min(210px, calc(100vw - 112px));
    font-size: 10.5px;
  }

  .wielm-colorbar {
    left: 6px;
    right: auto;
    bottom: 22px;
    width: 220px;
    max-width: calc(100% - 12px);
    padding: 4px 5px;
    border-radius: 4px;
  }

  .wielm-colorbar-gradient {
    height: 8px;
  }

  .wielm-colorbar-labels {
    gap: 2px;
    overflow-x: auto;
    margin-top: 2px;
    padding-bottom: 1px;
    font-size: 7px;
    line-height: 1.1;
  }

  .wielm-colorbar-labels span {
    flex: 0 0 auto;
    min-width: 16px;
    text-align: center;
  }

  .wielm-colorbar-labels span:hover::after,
  .wielm-colorbar-labels span:focus::after {
    position: fixed;
    left: 50%;
    bottom: 62px;
    max-width: calc(100vw - 24px);
  }

  .wielm-timeline {
    order: 3;
    flex: 0 0 auto;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    padding: 9px 10px 10px;
    scroll-margin-top: 78px;
  }

  .wielm-time-controls {
    grid-column: 1;
    grid-row: 1;
    justify-content: center;
    width: 100%;
    min-width: 0;
    height: 56px;
    padding: 6px;
  }

  .wielm-time-controls button {
    flex: 0 0 54px;
    max-width: 54px;
    min-width: 44px;
    height: 44px;
  }

  .wielm-time-grid {
    grid-column: 1;
    grid-row: 2;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 3px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .wielm-time-grid::-webkit-scrollbar,
  .wielm-param-list::-webkit-scrollbar,
  .wielm-colorbar-labels::-webkit-scrollbar {
    display: none;
  }

  .wielm-time-grid button {
    flex: 0 0 72px;
    min-height: 44px;
    scroll-snap-align: start;
    font-size: 10.5px;
  }

  .wielm-time-grid button small {
    font-size: 8.5px;
  }

  .wielm-time-slider-wrap {
    grid-column: 1;
    grid-row: 3;
    padding: 0 2px;
  }

  .wielm-time-slider-wrap input[type="range"] {
    min-height: 40px;
  }

  .wielm-time-scale {
    font-size: 7.5px;
  }

  .wielm-nwp-sidebar {
    order: 4;
    flex: 0 0 auto;
    max-height: none;
    padding: 12px;
    overflow: visible;
    scroll-margin-top: 78px;
  }

  .wielm-nwp-sidebar section {
    margin-bottom: 12px;
  }

  .wielm-nwp-sidebar select {
    min-height: 44px;
    font-size: 14px;
  }

  .wielm-param-list {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .wielm-param-item {
    flex: 0 0 218px;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 6px;
  }

  .wielm-param-select {
    min-height: 44px;
    padding: 9px 10px;
    font-size: 11.5px;
  }

  .wielm-param-help {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    font-size: 17px;
  }

  .wielm-layer-switches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    align-items: center;
  }

  .wielm-layer-switches label:first-child {
    width: 100%;
  }

  .wielm-layer-switches input {
    transform: scale(1.2);
    margin-right: 5px;
  }

  .wielm-meteogram-panel {
    order: 5;
    flex: 0 0 auto;
    min-height: 0;
    border-right: 0;
    border-top: 1px solid var(--wielm-line);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 44px auto auto;
    overflow: visible;
    scroll-margin-top: 78px;
  }

  .wielm-meteogram-tabs {
    grid-column: 1;
  }

  .wielm-meteogram-tabs button {
    min-height: 44px;
    font-size: 13px;
    border-radius: 0;
  }

  .wielm-point-card {
    padding: 12px;
  }

  .wielm-point-card strong {
    font-size: 16px;
    line-height: 1.25;
  }

  .wielm-left-panel {
    overflow: visible;
  }

  .wielm-left-panel.is-active {
    display: block;
  }

  .wielm-chart-stack {
    display: grid;
    grid-template-rows: repeat(4, minmax(175px, 24dvh));
  }

  .wielm-mini-chart {
    min-height: 185px;
    padding: 8px 8px 10px;
  }

  .wielm-param-dialog {
    padding: 14px;
  }

  .wielm-param-dialog__card {
    max-height: calc(100dvh - 28px);
    padding: 22px 18px 20px;
  }

  .wielm-param-dialog__close {
    width: 44px;
    height: 44px;
  }

  .wielm-info-panel {
    min-height: 340px;
  }

  .wielm-shortcode-disclaimer {
    order: 6;
    flex: 0 0 auto;
    min-height: 44px;
    align-items: flex-start;
    padding: 10px 12px 12px;
    font-size: 9.5px;
    line-height: 1.4;
  }
}

@media (max-width: 1000px) and (max-height: 600px) and (orientation: landscape) {
  .wielm-nwp-topbar {
    min-height: 66px;
    padding-block: 4px;
  }

  .wielm-nwp-mapwrap {
    flex-basis: 72svh;
    min-height: 290px;
    height: 72svh;
  }

  .wielm-nwp-sidebar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 14px;
  }

  .wielm-nwp-sidebar section:nth-child(n + 3) {
    grid-column: 1 / -1;
  }

  .wielm-chart-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(175px, 46svh));
  }
}

@media (max-width: 360px) {
  .wielm-nwp-topbar {
    padding-inline: 6px;
  }

  .wielm-nwp-title,
  .wielm-nwp-actions {
    gap: 5px;
  }

  .wielm-nwp-title strong {
    font-size: 10px;
  }

  .wielm-beta-label {
    padding-inline: 5px;
    font-size: 8px;
  }

  .wielm-home-link {
    padding-inline: 7px;
  }

  .wielm-home-link::after {
    content: "WRÓĆ";
  }

  .wielm-nwp-mapwrap {
    flex-basis: max(360px, 58svh);
    min-height: 360px;
    height: max(360px, 58svh);
  }

  .wielm-colorbar {
    width: 194px;
  }
}
