﻿:root {
  --bg: #08111d;
  --bg2: #0d1b31;
  --card: rgba(8, 14, 27, 0.78);
  --card-2: rgba(12, 22, 40, 0.86);
  --text: #ecf3ff;
  --muted: #b8c8e6;
  --stroke: rgba(255, 255, 255, 0.11);
  --accent: #7dd3fc;
  --accent-2: #38bdf8;
  --shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
  --hi: #ef4444;
  --lo: #60a5fa;
}

.bary-wrap {
  padding: 14px;
}

.bary-topbar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--stroke);
  background:
    radial-gradient(560px 180px at 8% 0%, rgba(56, 189, 248, 0.12), transparent 72%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(7, 12, 24, 0.58)),
    var(--card);
  box-shadow: var(--shadow);
}

.tb-left {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(125, 211, 252, 0.38);
  background: rgba(125, 211, 252, 0.14);
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.tb-head h1 {
  margin: 0;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.1;
}

.tb-head p {
  margin: 8px 0 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.tb-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 360px;
}

.live,
.controls,
.bary-select-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #64748b;
  box-shadow: 0 0 0 5px rgba(100, 116, 139, 0.16);
}

.dot.live {
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.16);
}

.dot.stale {
  background: #f59e0b;
  box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.16);
}

.dot.err {
  background: #ef4444;
  box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.16);
}

.meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.meta #timeLabel {
  font-size: 12.5px;
  font-weight: 800;
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  min-width: 42px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease;
  text-decoration: none;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(125, 211, 252, 0.24);
}

.btn:active {
  transform: scale(0.98);
}

.btn--tool {
  min-height: 34px;
  font-size: 13px;
  font-weight: 800;
}

.btn--link {
  white-space: nowrap;
}

.tg {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 700;
}

.modelSelect {
  min-width: 230px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(4, 9, 18, 0.72);
  color: var(--text);
  outline: none;
}

.bary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 12px;
  margin-top: 12px;
  align-items: start;
}

.mapCard,
.side-card {
  border-radius: 20px;
  border: 1px solid var(--stroke);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(7, 12, 24, 0.62)),
    var(--card);
  box-shadow: var(--shadow);
}

.viewer-card {
  overflow: hidden;
}

.chartTools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.03);
}

.chartTools__left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.chartZoom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.chartViewport {
  position: relative;
  overflow: auto;
  min-height: 560px;
  max-height: calc(100vh - 250px);
  background:
    radial-gradient(900px 340px at 50% 0%, rgba(59, 130, 246, 0.1), transparent 70%),
    linear-gradient(180deg, #06101b, #0a1626 46%, #07111d 100%);
}

.chartCanvas {
  min-width: 100%;
  min-height: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 14px;
}

.chartImage {
  display: block;
  width: auto;
  max-width: none;
  height: auto;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.42);
  background: #061120;
}

.chartCaption {
  padding: 12px 14px;
  border-top: 1px solid var(--stroke);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.side-card {
  padding: 14px;
}

.side-card h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

.statusList {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.statusList > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
}

.statusList .k {
  color: var(--muted);
}

.statusList .v {
  color: var(--text);
  font-weight: 800;
  text-align: right;
}

.chiplist {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(125, 211, 252, 0.18);
  background: rgba(125, 211, 252, 0.08);
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
}

.leg {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.leg-item,
.leg-front {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.legend-extra-top {
  margin-top: 14px;
}

.leg-txt {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.leg-txt b,
.dwd-block__title {
  font-size: 13px;
  font-weight: 800;
}

.leg-note,
.legalNote {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.legalNote {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(125, 211, 252, 0.14);
  background: rgba(125, 211, 252, 0.07);
}

.hlDot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  font-weight: 900;
  color: #08111d;
  flex: 0 0 auto;
}

.hlDot.hi {
  background: var(--hi);
}

.hlDot.lo {
  background: var(--lo);
}

.swatch {
  display: inline-flex;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.swatch.iso {
  background: transparent;
  border-width: 2px;
  border-color: rgba(255, 255, 255, 0.62);
}

.swatch.front {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.66), rgba(239, 68, 68, 0.74));
}

.swatch.panel-left {
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.3), rgba(250, 204, 21, 0.28));
}

.swatch.panel-right {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(96, 165, 250, 0.24));
}

.leg-fronts,
.dwd-block {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--stroke);
}

.medium-legend-grid {
  grid-template-columns: 1fr;
}

.front {
  position: relative;
  width: 44px;
  height: 14px;
  border-radius: 999px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
}

.front.cold::before,
.front.warm::before,
.front.occ::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 0;
  transform: translateY(-50%);
}

.front.cold::before {
  border-top: 2px solid rgba(96, 165, 250, 0.96);
}

.front.cold::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 50%;
  width: 0;
  height: 0;
  transform: translateY(-50%);
  border-left: 6px solid rgba(96, 165, 250, 0.96);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  box-shadow: 14px 0 0 rgba(96, 165, 250, 0.96), 28px 0 0 rgba(96, 165, 250, 0.96);
}

.front.warm::before {
  border-top: 2px solid rgba(239, 68, 68, 0.96);
}

.front.warm::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 50%;
  width: 7px;
  height: 7px;
  transform: translateY(-50%) rotate(45deg);
  border-top: 2px solid rgba(239, 68, 68, 0.96);
  border-right: 2px solid rgba(239, 68, 68, 0.96);
  border-radius: 50%;
  box-shadow: 14px 0 0 rgba(239, 68, 68, 0.96), 28px 0 0 rgba(239, 68, 68, 0.96);
}

.front.occ::before {
  border-top: 2px solid rgba(192, 132, 252, 0.96);
}

.front.occ::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10px 7px, rgba(192, 132, 252, 0.96) 0 3px, transparent 3.5px),
    linear-gradient(90deg, transparent 0 16px, rgba(192, 132, 252, 0.96) 16px 18px, transparent 18px 30px, rgba(192, 132, 252, 0.96) 30px 32px, transparent 32px);
  opacity: 0.9;
}

.tempScale {
  display: grid;
  gap: 8px;
}

.tempScale__bar {
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(90deg,
    #8f3fb9 0%,
    #7856d9 12%,
    #6482ff 24%,
    #41a8ff 36%,
    #7fdfc2 48%,
    #a6ec77 58%,
    #efd86d 70%,
    #f5ae5a 82%,
    #ec6a52 92%,
    #d24b64 100%);
}

.tempScale__ticks {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}

.tempScale__ticks span:last-child {
  text-align: right;
}

.wxGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
}

.wxItem {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--text);
  font-size: 12px;
}

.wxIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  position: relative;
  flex: 0 0 auto;
}

.wxIcon::before,
.wxIcon::after {
  content: "";
  position: absolute;
}

.wxIcon--fog::before,
.wxIcon--freezing-fog::before {
  inset: 4px 3px auto 3px;
  height: 2px;
  background: rgba(255, 222, 89, 0.96);
  box-shadow: 0 4px 0 rgba(255, 222, 89, 0.96), 0 8px 0 rgba(255, 222, 89, 0.96);
}

.wxIcon--freezing-fog::after {
  width: 6px;
  height: 6px;
  right: 2px;
  top: 2px;
  border-radius: 999px;
  background: rgba(147, 197, 253, 0.96);
}

.wxIcon--drizzle::before,
.wxIcon--rain::before,
.wxIcon--snow::before,
.wxIcon--freezing-rain::before,
.wxIcon--rain-shower::before,
.wxIcon--snow-shower::before,
.wxIcon--hail::before,
.wxIcon--storm::before {
  width: 8px;
  height: 8px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
}

.wxIcon--drizzle::before {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #45d36f;
  transform: translate(-50%, -50%);
}

.wxIcon--rain::before {
  background: #36c65f;
}

.wxIcon--snow::before {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #bf72ff;
  transform: translate(-50%, -50%);
}

.wxIcon--freezing-rain::before {
  background: #4aa3ff;
}

.wxIcon--rain-shower::before {
  background: #00d5c8;
}

.wxIcon--snow-shower::before {
  background: #8c63ff;
}

.wxIcon--hail::before {
  background: #f754c7;
}

.wxIcon--storm::before {
  width: 10px;
  height: 12px;
  background: transparent;
  border-left: 2px solid #f45555;
  border-bottom: 2px solid #f45555;
  border-radius: 0;
  transform: translate(-50%, -50%) skew(-10deg);
}

.hlLoading {
  position: absolute;
  inset: 18px 18px auto 18px;
  z-index: 5;
  display: none;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: calc(100% - 36px);
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 14, 27, 0.88);
  color: var(--text);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.4);
  font-weight: 800;
}

.hlLoading.show {
  display: inline-flex;
}

.hlLoading.show::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(125, 211, 252, 0.18);
  animation: pulse 1.2s infinite;
}

[hidden] {
  display: none !important;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.72; }
  50% { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.72; }
}

@media (max-width: 1120px) {
  .bary-topbar {
    flex-direction: column;
  }

  .tb-right {
    min-width: 0;
  }

  .live,
  .controls,
  .bary-select-row {
    justify-content: flex-start;
  }

  .meta {
    align-items: flex-start;
  }

  .bary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .bary-wrap {
    padding: 10px;
  }

  .bary-topbar,
  .side-card {
    border-radius: 18px;
  }

  .chartViewport {
    min-height: 420px;
    max-height: calc(100vh - 220px);
  }

  .chartTools {
    flex-direction: column;
    align-items: stretch;
  }

  .chartTools__left {
    justify-content: space-between;
  }

  .btn--link {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .tb-head h1 {
    font-size: 1.1rem;
  }

  .tb-head p {
    font-size: 12px;
  }

  .modelSelect {
    min-width: 0;
    width: 100%;
  }

  .tg {
    width: 100%;
    justify-content: space-between;
  }

  .chartViewport {
    min-height: 300px;
    max-height: none;
  }

  .chartCanvas {
    padding: 10px;
  }

  .chartImage {
    border-radius: 14px;
  }

  .wxGrid {
    grid-template-columns: 1fr;
  }

  .hlLoading {
    inset: 12px 12px auto 12px;
    max-width: calc(100% - 24px);
    padding: 10px 12px;
    font-size: 12px;
  }
}

/* 2026-03-17 Stage 2 polish */
.bary-maintenance{
  min-height:420px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.bary-maintenance__box{
  max-width:640px;
  padding:20px;
  text-align:center;
}

.bary-maintenance__title{
  margin:0 0 10px;
}

.bary-maintenance__text{
  margin:0;
  color:var(--muted);
  line-height:1.6;
}

@media (max-width: 820px){
  .chartViewport{
    max-height: calc(100dvh - 220px);
  }
}

@media (max-width: 620px){
  .bary-maintenance{
    min-height:320px;
  }

  .bary-maintenance__box{
    padding:16px;
  }
}
