.thermal-observed,
.thermal-estimated,
.thermal-summer {
  border: 2px solid #fff;
  background: linear-gradient(135deg, #456f91, #b5bc84, #c2645b) !important;
}
.thermal-estimated {
  background: repeating-linear-gradient(
    135deg,
    #456f91 0 5px,
    #b5bc84 5px 10px,
    #c2645b 10px 15px
  ) !important;
}
.thermal-summer {
  background: linear-gradient(135deg, #4f8293, #b5bc84, #c98664) !important;
  box-shadow: inset 0 0 0 2px #fff;
}
.thermal-reliability {
  background: linear-gradient(
    135deg,
    #ce4141 0 33%,
    #f4b63f 33% 66%,
    #29965c 66%
  ) !important;
}
.thermal-reserved-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: #123f356b;
}
.thermal-reserved-overlay[hidden] {
  display: none !important;
}
.thermal-reserved-card {
  position: relative;
  width: min(100%, 460px);
  max-height: calc(100dvh - 36px);
  overflow: auto;
  padding: 34px;
  background: #faf8f1;
  border-radius: 28px;
  color: #153f35;
  box-shadow: 0 25px 80px #102d2680;
}
.thermal-reserved-close {
  position: absolute;
  right: 18px;
  top: 18px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid #c7d5d0;
  border-radius: 50%;
  background: #fff;
  color: #17483d;
  font-size: 2rem;
  line-height: 1;
}
.thermal-reserved-eyebrow {
  display: block;
  margin-right: 60px;
  color: #176f5a;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.17em;
}
.thermal-reserved-card h2 {
  margin: 12px 58px 18px 0;
  font:
    700 2.1rem/1.06 Georgia,
    serif;
}
.thermal-reserved-card label {
  display: grid;
  grid-template-columns: auto 38px 1fr;
  gap: 10px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid #dbe2df;
}
.thermal-reserved-card label input {
  appearance: none;
  width: 38px;
  height: 22px;
  border: 0;
  border-radius: 20px;
  background: #b9c5c1;
  position: relative;
}
.thermal-reserved-card label input:after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: 0.2s;
}
.thermal-reserved-card label input:checked {
  background: #146b58;
}
.thermal-reserved-card label input:checked:after {
  left: 19px;
}
.thermal-reserved-card label b,
.thermal-reserved-card label small {
  display: block;
}
.thermal-reserved-card label b {
  font-size: 14px;
}
.thermal-reserved-card label small {
  margin-top: 3px;
  color: #68817b;
  font-size: 11px;
  line-height: 1.35;
}
.thermal-info {
  width: 100%;
  margin: 8px 0 0;
  padding: 11px;
  border: 1px solid #c5d4ce;
  border-radius: 12px;
  background: #fff;
  color: #315e53;
  text-align: left;
  line-height: 1.35;
}
.thermal-legend {
  position: fixed;
  z-index: 95;
  left: 16px;
  bottom: 112px;
  width: min(360px, calc(100vw - 32px));
  padding: 16px 18px;
  border-radius: 18px;
  background: #faf8f1;
  color: #153f35;
  box-shadow: 0 12px 42px #102d2660;
}
.thermal-legend[hidden],
.thermal-sample[hidden],
[hidden].temperature-ramp,
[hidden].reliability-key {
  display: none !important;
}
.thermal-legend > button,
.thermal-sample > button {
  position: absolute;
  right: 10px;
  top: 8px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #153f35;
  font-size: 1.45rem;
  line-height: 1;
}
.thermal-legend strong {
  display: block;
  padding-right: 30px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
}
.temperature-ramp {
  position: relative;
  margin: 15px 0 27px;
}
.temperature-ramp i {
  display: block;
  height: 14px;
  border-radius: 8px;
  background: linear-gradient(
    90deg,
    #456f91,
    #66979d,
    #b5bc84,
    #daac69,
    #c2645b
  );
}
.temperature-ramp span {
  position: absolute;
  top: 18px;
  font-size: 0.72rem;
}
.temperature-ramp span:last-child {
  right: 0;
}
.reliability-key {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  font-size: 0.7rem;
}
.reliability-key span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.reliability-key i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}
.reliability-key .high {
  background: #29965c;
}
.reliability-key .medium {
  background: #f4b63f;
}
.reliability-key .low {
  background: #ce4141;
}
.reliability-key .nodata {
  border: 1px solid #777;
  background: transparent;
}
.thermal-legend p {
  margin: 12px 0 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: #627b72;
}
.thermal-sample {
  position: fixed;
  z-index: 98;
  right: 16px;
  bottom: 112px;
  width: min(330px, calc(100vw - 32px));
  padding: 18px;
  border-radius: 18px;
  background: #faf8f1;
  color: #153f35;
  box-shadow: 0 14px 46px #102d2670;
}
.thermal-sample span {
  display: block;
  padding-right: 34px;
  color: #607970;
  font-size: 0.65rem;
  font-weight: 850;
  letter-spacing: 0.13em;
}
.thermal-sample h3 {
  margin: 8px 0 1px;
  font: 700 2rem Georgia;
}
.thermal-sample b {
  font-size: 0.8rem;
}
.thermal-sample p {
  margin: 10px 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #557169;
}
.thermal-sample p strong {
  display: block;
  margin-top: 6px;
  color: #7b4a34;
}
.thermal-sample small {
  display: block;
  border-top: 1px solid #d4dfda;
  padding-top: 9px;
  color: #6b8079;
  font-size: 0.65rem;
  line-height: 1.4;
}
@media (max-width: 620px) {
  .thermal-reserved-overlay {
    align-items: end;
    padding: 0;
  }
  .thermal-reserved-card {
    width: 100%;
    max-height: 90dvh;
    padding: 30px 24px calc(24px + env(safe-area-inset-bottom));
    border-radius: 26px 26px 0 0;
  }
  .thermal-reserved-card h2 {
    font-size: 1.85rem;
  }
  .thermal-legend {
    bottom: 105px;
  }
  .thermal-sample {
    left: 10px;
    right: 10px;
    bottom: 104px;
    width: auto;
  }
}

@media (min-width: 701px) {
  .thermal-reserved-overlay {
    inset: 332px 16px auto auto;
    display: block;
    width: 205px;
    padding: 0;
    background: transparent;
    pointer-events: none;
  }
  .thermal-reserved-card {
    width: 205px;
    max-height: calc(100dvh - 520px);
    padding: 7px;
    border: 1px solid rgba(23, 91, 73, 0.18);
    border-radius: 22px;
    background: rgba(247, 245, 238, 0.92);
    box-shadow: 0 8px 28px rgba(16, 63, 52, 0.2);
    backdrop-filter: blur(12px);
    pointer-events: auto;
  }
  .thermal-reserved-close {
    right: 9px;
    top: 9px;
    width: 30px;
    height: 30px;
    font-size: 1.25rem;
  }
  .thermal-reserved-eyebrow {
    margin: 9px 38px 3px 10px;
    font-size: 0.57rem;
    letter-spacing: 0.14em;
  }
  .thermal-reserved-card h2 {
    margin: 4px 38px 9px 10px;
    font:
      700 1rem/1.05 Georgia,
      serif;
  }
  .thermal-reserved-card label {
    grid-template-columns: 30px 24px 1fr;
    gap: 7px;
    min-height: 44px;
    padding: 4px 7px;
    border: 0;
    border-radius: 15px;
  }
  .thermal-reserved-card label:has(input:checked) {
    background: #175b49;
    color: #fff;
    box-shadow: 0 3px 10px rgba(16, 63, 52, 0.2);
  }
  .thermal-reserved-card label input {
    width: 30px;
    height: 18px;
  }
  .thermal-reserved-card label input:after {
    top: 3px;
    left: 3px;
    width: 12px;
    height: 12px;
  }
  .thermal-reserved-card label input:checked:after {
    left: 15px;
  }
  .thermal-reserved-card .symbol {
    width: 24px;
    height: 24px;
  }
  .thermal-reserved-card label b {
    font-size: 11px;
    line-height: 1.15;
  }
  .thermal-reserved-card label small {
    display: none;
  }
  .thermal-info {
    margin: 5px 0 0;
    padding: 8px 9px;
    border-radius: 13px;
    font-size: 10px;
  }
  .thermal-legend {
    left: 72px;
    top: 88px;
    bottom: auto;
    width: 330px;
  }
  .thermal-sample {
    left: 16px;
    right: auto;
    bottom: 112px;
  }
}

@media (max-width: 620px) {
  .thermal-legend {
    left: 10px;
    right: auto;
    bottom: 106px;
    width: min(250px, calc(100vw - 20px));
    padding: 11px 13px;
    border-radius: 14px;
  }
  .thermal-legend > button {
    right: 7px;
    top: 6px;
    width: 28px;
    height: 28px;
    font-size: 1.2rem;
  }
  .thermal-legend strong {
    padding-right: 28px;
    font-size: 0.67rem;
    line-height: 1.25;
    letter-spacing: 0.09em;
  }
  .temperature-ramp {
    margin: 10px 0 23px;
  }
  .temperature-ramp i {
    height: 10px;
  }
  .temperature-ramp span {
    top: 14px;
    font-size: 0.65rem;
  }
  .reliability-key {
    gap: 5px 9px;
    font-size: 0.62rem;
  }
  .thermal-legend p {
    display: none;
  }
}
