.apc-forecast {
  --forecast-navy: #07324a;
  --forecast-navy-2: #0b425f;
  --forecast-cyan: #3bb7c5;
  --forecast-orange: #ef7b45;
  --forecast-ink: #17394a;
  --forecast-muted: #607986;
  --forecast-line: #d6e2e8;
  --forecast-soft: #edf4f7;
  position: relative;
  width: 100%;
  color: var(--forecast-ink);
  font: inherit;
  background: #fff;
  border: 1px solid var(--forecast-line);
  border-radius: 24px;
  box-shadow: 0 22px 60px rgba(7, 50, 74, .12);
  overflow: hidden;
}

.apc-forecast *, .apc-forecast *::before, .apc-forecast *::after { box-sizing: border-box; }
.apc-forecast [hidden] { display: none !important; }
.apc-forecast button, .apc-forecast input, .apc-forecast select { font: inherit; }
.apc-forecast button { cursor: pointer; }

.apc-forecast__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  padding: 27px 30px 25px;
  color: #fff;
  background:
    radial-gradient(circle at 75% -30%, rgba(59,183,197,.34), transparent 45%),
    linear-gradient(130deg, #052b40, #0a405c 68%, #10536c);
}

.apc-forecast__head p, .apc-forecast__head h2, .apc-forecast__head em { margin: 0; }
.apc-forecast__head p { display: flex; align-items: center; gap: 9px; color: #b8e5eb; font-size: .72rem; font-style: normal; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.apc-forecast__head p span { width: 8px; height: 8px; border-radius: 50%; background: #65e0ce; box-shadow: 0 0 0 5px rgba(101,224,206,.14); }
.apc-forecast__head h2 { margin-top: 7px; color: #fff; font-size: clamp(1.65rem, 3vw, 2.35rem); line-height: 1.05; letter-spacing: -.035em; }
.apc-forecast__head em { display: block; max-width: 760px; margin-top: 9px; color: #c9dce5; font-size: .94rem; font-style: normal; line-height: 1.5; }
.apc-forecast__run { min-width: 185px; padding-left: 22px; border-left: 1px solid rgba(255,255,255,.18); text-align: right; }
.apc-forecast__run small, .apc-forecast__run span { display: block; color: #9dc1cf; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
.apc-forecast__run strong { display: block; margin: 3px 0; color: #fff; font-size: .94rem; }
.apc-forecast__run span { letter-spacing: 0; text-transform: none; }

.apc-forecast__workspace { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: 700px; }
.apc-forecast__layers { min-width: 0; background: #f7fafb; border-right: 1px solid var(--forecast-line); }
.apc-forecast__layers-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 19px 14px; }
.apc-forecast__layers-head small { display: block; color: var(--forecast-muted); font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.apc-forecast__layers-head strong { display: block; margin-top: 2px; color: var(--forecast-navy); font-size: .84rem; }
.apc-forecast__layers-head button { display: none; width: 38px; height: 38px; color: var(--forecast-navy); background: #fff; border: 1px solid var(--forecast-line); border-radius: 10px; font-size: 1.35rem; }
.apc-forecast__groups { display: flex; gap: 5px; padding: 0 14px 13px; overflow-x: auto; scrollbar-width: thin; }
.apc-forecast__groups button { flex: 0 0 auto; padding: 7px 10px; color: #476573; background: #e7eff3; border: 0; border-radius: 999px; font-size: .69rem; font-weight: 750; white-space: nowrap; }
.apc-forecast__groups button[aria-pressed="true"] { color: #fff; background: var(--forecast-navy); }
.apc-forecast__layer-list { max-height: 610px; padding: 0 12px 18px; overflow-y: auto; scrollbar-color: #a7bdc7 transparent; scrollbar-width: thin; }
.apc-forecast__layer-list > button { display: grid; grid-template-columns: minmax(0, 1fr) auto; width: 100%; gap: 12px; align-items: start; padding: 13px 12px; color: var(--forecast-ink); text-align: left; background: transparent; border: 1px solid transparent; border-radius: 13px; }
.apc-forecast__layer-list > button + button { margin-top: 4px; }
.apc-forecast__layer-list > button:hover { background: #fff; border-color: #deeaee; }
.apc-forecast__layer-list > button[aria-selected="true"] { color: #fff; background: linear-gradient(135deg, var(--forecast-navy), #0e5871); box-shadow: 0 8px 22px rgba(7,50,74,.18); }
.apc-forecast__layer-list span, .apc-forecast__layer-list strong, .apc-forecast__layer-list small, .apc-forecast__layer-list em { display: block; }
.apc-forecast__layer-list strong { font-size: .87rem; line-height: 1.25; }
.apc-forecast__layer-list small { margin-top: 4px; color: var(--forecast-muted); font-size: .69rem; line-height: 1.35; }
.apc-forecast__layer-list em { padding: 3px 6px; color: #6f8996; background: #e7f0f3; border-radius: 6px; font-size: .63rem; font-style: normal; font-weight: 800; white-space: nowrap; }
.apc-forecast__layer-list > button[aria-selected="true"] small { color: #bfd9e2; }
.apc-forecast__layer-list > button[aria-selected="true"] em { color: #d8f7f4; background: rgba(255,255,255,.12); }

.apc-forecast__map-column { min-width: 0; background: #fff; }
.apc-forecast__toolbar { min-height: 64px; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--forecast-line); }
.apc-forecast__layer-trigger { display: none; align-items: center; gap: 9px; min-width: 0; padding: 9px 12px; color: var(--forecast-navy); background: var(--forecast-soft); border: 0; border-radius: 10px; }
.apc-forecast__layer-trigger strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apc-forecast__level { display: flex; align-items: center; gap: 8px; color: var(--forecast-muted); font-size: .74rem; font-weight: 750; }
.apc-forecast__level select { min-width: 105px; height: 40px; padding: 0 32px 0 11px; color: var(--forecast-navy); background: #f4f8fa; border: 1px solid var(--forecast-line); border-radius: 9px; font-weight: 800; }
.apc-forecast__toolbar-actions { display: flex; gap: 6px; margin-left: auto; }
.apc-forecast__toolbar-actions button { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; color: var(--forecast-navy); background: #f3f7f9; border: 1px solid var(--forecast-line); border-radius: 9px; font-size: 1.1rem; font-weight: 800; }
.apc-forecast__toolbar-actions button:hover, .apc-forecast__toolbar-actions button:focus-visible { color: #fff; background: var(--forecast-navy); border-color: var(--forecast-navy); }
.apc-forecast__toolbar-actions .apc-forecast__wind-toggle { color: #0b7180; background: #e1f5f6; border-color: #b5dde1; }
.apc-forecast__toolbar-actions .apc-forecast__wind-toggle[aria-pressed="true"] { color: #fff; background: #0c7583; border-color: #0c7583; box-shadow: 0 0 0 3px rgba(59,183,197,.17); }
.apc-forecast__toolbar-actions .apc-forecast__wind-toggle span { display: inline-block; font-size: 1.35rem; line-height: 1; transform: rotate(-8deg); }

.apc-forecast__map { position: relative; width: 100%; height: clamp(500px, 56vw, 650px); min-height: 500px; isolation: isolate; overflow: hidden; color: #fff; background: #dbe7eb; outline: 0; touch-action: none; user-select: none; cursor: grab; }
.apc-forecast__map:focus-visible { box-shadow: inset 0 0 0 4px var(--forecast-orange); }
.apc-forecast__map.is-dragging { cursor: grabbing; }
.apc-forecast__basemap, .apc-forecast__weather, .apc-forecast__grid, .apc-forecast__wind { position: absolute; inset: 0; }
.apc-forecast__basemap { z-index: 1; background: #e1eaed; }
.apc-forecast__basemap img { position: absolute; width: 256px; height: 256px; max-width: none; filter: saturate(.6) brightness(1.04) contrast(.92); }
.apc-forecast__grid { z-index: 2; pointer-events: none; opacity: .16; background-image: linear-gradient(rgba(7,50,74,.65) 1px, transparent 1px), linear-gradient(90deg, rgba(7,50,74,.65) 1px, transparent 1px); background-size: 64px 64px; }
.apc-forecast__weather { z-index: 3; pointer-events: none; }
.apc-forecast__weather img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: fill; transition: opacity .2s ease; will-change: transform; }
.apc-forecast__weather img.is-next { opacity: 0; }
.apc-forecast__wind { z-index: 4; width: 100%; height: 100%; pointer-events: none; }
.apc-forecast__wind-status { position: absolute; z-index: 9; left: 50%; bottom: 35px; max-width: calc(100% - 150px); padding: 7px 11px; transform: translateX(-50%); color: #fff; background: rgba(5,43,64,.82); border: 1px solid rgba(255,255,255,.2); border-radius: 999px; box-shadow: 0 5px 18px rgba(5,43,64,.22); font-size: .68rem; font-weight: 750; line-height: 1.25; text-align: center; pointer-events: none; backdrop-filter: blur(6px); }

.apc-forecast__loading, .apc-forecast__error { position: absolute; z-index: 10; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 11px; max-width: min(90%, 420px); padding: 13px 17px; color: #fff; background: rgba(5,43,64,.9); border: 1px solid rgba(255,255,255,.18); border-radius: 13px; box-shadow: 0 15px 35px rgba(0,0,0,.25); backdrop-filter: blur(7px); }
.apc-forecast__loading span { width: 19px; height: 19px; border: 2px solid rgba(255,255,255,.32); border-top-color: #fff; border-radius: 50%; animation: apc-forecast-spin .8s linear infinite; }
.apc-forecast__loading strong, .apc-forecast__error strong { font-size: .82rem; }
.apc-forecast__error { flex-wrap: wrap; justify-content: center; text-align: center; background: rgba(104,35,27,.94); }
.apc-forecast__error button { padding: 7px 11px; color: #71372d; background: #fff; border: 0; border-radius: 8px; font-size: .73rem; font-weight: 800; }
@keyframes apc-forecast-spin { to { transform: rotate(360deg); } }

.apc-forecast__zoom { position: absolute; z-index: 8; left: 14px; top: 14px; display: grid; overflow: hidden; border: 1px solid rgba(7,50,74,.2); border-radius: 10px; box-shadow: 0 6px 18px rgba(7,50,74,.18); }
.apc-forecast__zoom button { width: 40px; height: 38px; color: var(--forecast-navy); background: rgba(255,255,255,.94); border: 0; font-size: 1.2rem; font-weight: 700; }
.apc-forecast__zoom button + button { border-top: 1px solid var(--forecast-line); }
.apc-forecast__zoom button:hover, .apc-forecast__zoom button:focus-visible { color: #fff; background: var(--forecast-navy); }
.apc-forecast__coordinates { position: absolute; z-index: 7; left: 14px; bottom: 33px; padding: 6px 9px; color: #fff; background: rgba(5,43,64,.78); border-radius: 7px; font-size: .65rem; font-variant-numeric: tabular-nums; pointer-events: none; }
.apc-forecast__attribution { position: absolute; z-index: 7; right: 0; bottom: 0; padding: 3px 7px; color: #334e5a; background: rgba(255,255,255,.86); font-size: .58rem; pointer-events: auto; }
.apc-forecast__attribution a { color: inherit; text-decoration: underline; }

.apc-forecast__legend { position: absolute; z-index: 7; right: 13px; top: 13px; min-width: 55px; max-height: calc(100% - 70px); padding: 8px; color: var(--forecast-navy); background: rgba(255,255,255,.92); border: 1px solid rgba(7,50,74,.18); border-radius: 10px; box-shadow: 0 7px 22px rgba(7,50,74,.18); pointer-events: none; }
.apc-forecast__legend img { display: block; max-width: 120px; max-height: 250px; }
.apc-forecast__legend [data-legend-fallback] { display: flex; align-items: stretch; gap: 7px; height: 190px; }
.apc-forecast__legend [data-legend-fallback] span { width: 19px; border-radius: 6px; background: linear-gradient(to top, #392f83, #2c7bb6, #00a6ca, #00ccbc, #90eb9d, #ffff8c, #f9d057, #f29e2e, #e76818, #d7191c); }
.apc-forecast[data-palette="humidity"] .apc-forecast__legend [data-legend-fallback] span { background: linear-gradient(to top, #8b4513, #efc46b, #f8f4c7, #8bd2c5, #277da1, #443a83); }
.apc-forecast[data-palette="clouds"] .apc-forecast__legend [data-legend-fallback] span { background: linear-gradient(to top, #fff, #cbd6dc, #778b97, #263842); }
.apc-forecast[data-palette="precipitation"] .apc-forecast__legend [data-legend-fallback] span { background: linear-gradient(to top, #e8f8ff, #5fd5e6, #1f78d1, #6352aa, #ed4c78, #8f102e); }
.apc-forecast[data-palette="snow"] .apc-forecast__legend [data-legend-fallback] span { background: linear-gradient(to top, #fff, #bce9ff, #54b9ed, #8172c7, #d651a2); }
.apc-forecast[data-palette="wind"] .apc-forecast__legend [data-legend-fallback] span { background: linear-gradient(to top, #edf8e9, #a1d99b, #41ab5d, #2c7fb8, #253494, #7a0177); }
.apc-forecast[data-palette="pressure"] .apc-forecast__legend [data-legend-fallback] span { background: linear-gradient(to top, #542788, #998ec3, #f7f7f7, #f1a340, #b35806); }
.apc-forecast[data-palette="cape"] .apc-forecast__legend [data-legend-fallback] span { background: linear-gradient(to top, #fff7bc, #fec44f, #fe9929, #d95f0e, #993404, #5a0028); }
.apc-forecast[data-palette="height"] .apc-forecast__legend [data-legend-fallback] span, .apc-forecast[data-palette="thetae"] .apc-forecast__legend [data-legend-fallback] span { background: linear-gradient(to top, #313695, #74add1, #e0f3f8, #ffffbf, #fdae61, #a50026); }
.apc-forecast__legend [data-legend-fallback] small { align-self: flex-end; color: var(--forecast-navy); font-size: .62rem; font-weight: 800; writing-mode: vertical-rl; transform: rotate(180deg); }

.apc-forecast__point { position: absolute; z-index: 12; width: min(290px, calc(100% - 24px)); padding: 12px 34px 12px 13px; transform: translate(-50%, calc(-100% - 14px)); color: var(--forecast-ink); background: rgba(255,255,255,.97); border: 1px solid rgba(7,50,74,.2); border-radius: 12px; box-shadow: 0 13px 35px rgba(7,50,74,.28); user-select: text; }
.apc-forecast__point::after { content: ""; position: absolute; left: 50%; top: 100%; border: 8px solid transparent; border-top-color: #fff; transform: translateX(-50%); }
.apc-forecast__point button { position: absolute; right: 6px; top: 6px; width: 25px; height: 25px; color: var(--forecast-navy); background: #edf3f5; border: 0; border-radius: 6px; font-size: 1rem; }
.apc-forecast__point small { display: block; color: var(--forecast-muted); font-size: .65rem; }
.apc-forecast__point strong { display: block; margin-top: 4px; max-height: 100px; overflow: auto; font-size: .73rem; line-height: 1.35; }

.apc-forecast__timeline { padding: 16px 20px 18px; background: #f7fafb; border-top: 1px solid var(--forecast-line); }
.apc-forecast__valid { display: flex; align-items: baseline; gap: 10px; margin-bottom: 11px; }
.apc-forecast__valid small { color: var(--forecast-muted); font-size: .67rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.apc-forecast__valid strong { color: var(--forecast-navy); font-size: .94rem; }
.apc-forecast__valid span { padding: 3px 7px; color: #155b63; background: #dff3f3; border-radius: 999px; font-size: .65rem; font-weight: 800; }
.apc-forecast__timeline-controls { display: grid; grid-template-columns: 38px 42px minmax(0, 1fr) 38px; align-items: center; gap: 8px; }
.apc-forecast__timeline-controls button { width: 38px; height: 36px; color: var(--forecast-navy); background: #fff; border: 1px solid var(--forecast-line); border-radius: 8px; font-weight: 800; }
.apc-forecast__timeline-controls button:disabled { cursor: default; opacity: .42; }
.apc-forecast__timeline-controls .apc-forecast__play { width: 42px; color: #fff; background: var(--forecast-orange); border-color: var(--forecast-orange); }
.apc-forecast__timeline-controls input { width: 100%; accent-color: var(--forecast-orange); cursor: pointer; }
.apc-forecast__ticks { position: relative; height: 22px; margin: 4px 47px 0 96px; }
.apc-forecast__ticks span { position: absolute; top: 3px; color: #69828d; font-size: .56rem; white-space: nowrap; transform: translateX(-50%); }

.apc-forecast__foot { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.25fr); align-items: center; gap: 22px; padding: 16px 22px; color: var(--forecast-muted); background: #fff; border-top: 1px solid var(--forecast-line); font-size: .68rem; line-height: 1.45; }
.apc-forecast__foot p { margin: 0; }
.apc-forecast__foot label { display: flex; align-items: center; gap: 7px; color: var(--forecast-ink); white-space: nowrap; }
.apc-forecast__foot input { width: 90px; accent-color: var(--forecast-cyan); }
.apc-forecast__foot output { min-width: 38px; color: var(--forecast-navy); font-weight: 800; }
.apc-forecast__noscript { margin: 0; padding: 14px 20px; color: #7c3025; background: #fff0ec; }

.apc-forecast:fullscreen, .apc-forecast.is-fullscreen, .apc-forecast.is-fullscreen-fallback { width: 100vw; height: 100vh; max-width: none; border: 0; border-radius: 0; background: #fff; }
.apc-forecast:fullscreen .apc-forecast__workspace, .apc-forecast.is-fullscreen .apc-forecast__workspace, .apc-forecast.is-fullscreen-fallback .apc-forecast__workspace { min-height: 0; height: calc(100vh - 119px); }
.apc-forecast:fullscreen .apc-forecast__map, .apc-forecast.is-fullscreen .apc-forecast__map, .apc-forecast.is-fullscreen-fallback .apc-forecast__map { height: calc(100vh - 310px); max-height: none; }
.apc-forecast:fullscreen .apc-forecast__foot, .apc-forecast.is-fullscreen .apc-forecast__foot, .apc-forecast.is-fullscreen-fallback .apc-forecast__foot { display: none; }
.apc-forecast.is-fullscreen-fallback { position: fixed; z-index: 999999; inset: 0; }

@media (max-width: 980px) {
  .apc-forecast__workspace { display: block; min-height: 0; }
  .apc-forecast__layers { position: absolute; z-index: 30; left: 0; top: 0; bottom: 0; width: min(340px, 88vw); border-right: 0; box-shadow: 18px 0 45px rgba(7,50,74,.24); transform: translateX(-105%); transition: transform .22s ease; }
  .apc-forecast.is-layer-panel-open .apc-forecast__layers { transform: translateX(0); }
  .apc-forecast.is-layer-panel-open::after { content: ""; position: absolute; z-index: 25; inset: 0; background: rgba(2,25,37,.52); }
  .apc-forecast__layers-head button, .apc-forecast__layer-trigger { display: flex; }
  .apc-forecast__layer-list { max-height: calc(100vh - 260px); }
  .apc-forecast__toolbar { padding-left: 10px; }
  .apc-forecast__layer-trigger { max-width: min(55vw, 360px); }
  .apc-forecast__map { height: clamp(460px, 70vw, 620px); }
  .apc-forecast__foot { grid-template-columns: 1fr auto; }
  .apc-forecast__foot p:last-child { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .apc-forecast { border-radius: 16px; }
  .apc-forecast__head { align-items: flex-start; padding: 22px 18px; }
  .apc-forecast__head em { font-size: .82rem; }
  .apc-forecast__run { display: none; }
  .apc-forecast__toolbar { flex-wrap: wrap; gap: 7px; }
  .apc-forecast__layer-trigger { flex: 1 1 190px; max-width: none; }
  .apc-forecast__level { order: 3; width: 100%; justify-content: flex-end; }
  .apc-forecast__level select { height: 36px; }
  .apc-forecast__toolbar-actions button { width: 36px; height: 36px; }
  .apc-forecast__map { height: 62vh; min-height: 410px; max-height: 590px; }
  .apc-forecast__legend { right: 8px; top: 8px; transform: scale(.82); transform-origin: top right; }
  .apc-forecast__zoom { left: 8px; top: 8px; }
  .apc-forecast__coordinates { left: 8px; bottom: 31px; }
	.apc-forecast__wind-status { bottom: 33px; max-width: calc(100% - 95px); font-size: .63rem; }
  .apc-forecast__timeline { padding: 14px 12px 16px; }
  .apc-forecast__valid { flex-wrap: wrap; gap: 5px 9px; }
  .apc-forecast__timeline-controls { grid-template-columns: 34px 38px minmax(0, 1fr) 34px; gap: 5px; }
  .apc-forecast__timeline-controls button { width: 34px; }
  .apc-forecast__timeline-controls .apc-forecast__play { width: 38px; }
  .apc-forecast__ticks { margin-left: 78px; margin-right: 40px; }
  .apc-forecast__ticks span:nth-child(even) { display: none; }
  .apc-forecast__foot { grid-template-columns: 1fr; gap: 10px; padding: 14px 16px; }
  .apc-forecast__foot label { justify-content: space-between; }
  .apc-forecast__foot input { flex: 1; }
  .apc-forecast__foot p:last-child { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .apc-forecast__layers, .apc-forecast__weather img { transition: none; }
  .apc-forecast__loading span { animation-duration: 1.6s; }
}
