@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/inter-latin-var.3100e775e8.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

* {
  box-sizing: border-box;
}

body {
  color: #203038;
  font-family:
    "Aptos", "Avenir Next", Inter, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background:
    linear-gradient(rgba(246, 245, 238, 0.82), rgba(246, 245, 238, 0.94)),
    url("../assets/travel-map-backdrop-900.e687a09382.webp") center / cover fixed,
    #f6f5ee;
}

@supports (background-image: image-set(url("../assets/travel-map-backdrop-900.35a57ce7c7.avif") type("image/avif") 1x)) {
  body {
    background:
      linear-gradient(rgba(246, 245, 238, 0.82), rgba(246, 245, 238, 0.94)),
      image-set(
        url("../assets/travel-map-backdrop-900.35a57ce7c7.avif") type("image/avif") 1x,
        url("../assets/travel-map-backdrop-900.e687a09382.webp") type("image/webp") 1x
      ) center / cover fixed,
      #f6f5ee;
  }
}

a {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.status-shell {
  width: min(1180px, 100%);
  min-height: 100svh;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) clamp(14px, 4vw, 32px)
    max(28px, env(safe-area-inset-bottom));
}

.status-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(12px, 3vw, 22px);
  margin-bottom: clamp(18px, 4vw, 34px);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 9px 12px 9px 9px;
  color: #fff7dc;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
  background: #203038;
  border: 2px solid rgba(248, 214, 132, 0.86);
  border-radius: 999px;
  box-shadow: 0 10px 18px rgba(28, 36, 38, 0.2);
}

.back-link svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.status-kicker,
.metric-label,
.readout-label {
  margin: 0;
  color: rgba(32, 48, 56, 0.72);
  font-size: clamp(12px, 2.9vw, 14px);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-header h1 {
  margin: 0;
  font-size: clamp(42px, 10vw, 104px);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 0.9;
  text-shadow: 0 8px 18px rgba(28, 36, 38, 0.16);
}

.sample-chip {
  margin: 0;
  padding: 8px 11px;
  color: #fff7dc;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #9a4534;
  border-radius: 999px;
  box-shadow: 0 8px 16px rgba(154, 69, 52, 0.24);
}

.status-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  align-items: stretch;
  gap: clamp(16px, 3vw, 28px);
}

.gauge-panel {
  position: relative;
  min-width: 0;
  min-height: clamp(420px, 58vw, 690px);
  overflow: hidden;
  border: 2px solid rgba(32, 48, 56, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 250, 226, 0.94), rgba(232, 249, 248, 0.85)),
    url("../assets/store/store-tile-status-720.e7ba70c38c.webp") center / cover;
  box-shadow:
    0 24px 42px rgba(28, 36, 38, 0.2),
    0 8px 16px rgba(28, 36, 38, 0.11);
  isolation: isolate;
}

.gauge-panel::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(rgba(246, 245, 238, 0.12), rgba(246, 245, 238, 0.34)),
    radial-gradient(circle at 50% 43%, rgba(255, 252, 231, 0.72), rgba(255, 252, 231, 0) 42%);
  backdrop-filter: blur(2px) saturate(1.08);
}

#status-gauge {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.gauge-readout {
  position: absolute;
  right: clamp(16px, 4vw, 42px);
  bottom: clamp(18px, 4vw, 42px);
  left: clamp(16px, 4vw, 42px);
  display: grid;
  justify-items: center;
  padding: clamp(14px, 3vw, 22px);
  color: #203038;
  text-align: center;
  background: rgba(255, 251, 231, 0.88);
  border: 1px solid rgba(32, 48, 56, 0.16);
  border-radius: 16px;
  box-shadow: 0 12px 24px rgba(28, 36, 38, 0.14);
}

.readout-value {
  margin: 0;
  font-size: clamp(58px, 15vw, 128px);
  font-weight: 950;
  line-height: 0.86;
}

.unit {
  margin-left: 4px;
  font-size: 0.28em;
  vertical-align: 1.55em;
}

.metrics-grid {
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 3vw, 22px);
}

.metric-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: clamp(18px, 4vw, 28px);
  border: 2px solid rgba(32, 48, 56, 0.16);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 253, 238, 0.96), rgba(235, 250, 246, 0.9)),
    #fff7dc;
  box-shadow:
    0 18px 30px rgba(28, 36, 38, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.metric-card::after {
  position: absolute;
  right: -10px;
  bottom: -20px;
  width: 138px;
  height: 138px;
  content: "";
  border: 2px solid rgba(199, 139, 43, 0.34);
  border-radius: 50%;
  transform: rotate(-12deg);
}

.metric-value {
  margin: 10px 0 12px;
  font-size: clamp(44px, 10vw, 76px);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 0.9;
}

.metric-unit {
  margin-left: 3px;
  font-size: 0.34em;
  vertical-align: 1.2em;
}

.metric-sub,
.metric-time,
.metric-age {
  margin: 0;
  color: rgba(32, 48, 56, 0.74);
  font-size: clamp(15px, 3.5vw, 19px);
  font-weight: 800;
  line-height: 1.2;
}

.metric-time {
  margin-top: 12px;
  color: #203038;
  font-size: clamp(22px, 5.4vw, 38px);
  font-weight: 920;
}

.metric-age {
  margin-top: 4px;
  color: #8c3f2f;
  font-size: 17px;
  font-weight: 920;
}

.metric-track {
  position: relative;
  width: min(100%, 260px);
  height: 15px;
  overflow: hidden;
  background: rgba(32, 48, 56, 0.16);
  border: 1px solid rgba(32, 48, 56, 0.16);
  border-radius: 999px;
}

.metric-track span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #40b6bd, #f2c45b);
  border-radius: inherit;
  transition: width 360ms ease;
}

.battery-stack {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 42px));
  gap: 7px;
  margin-top: 16px;
}

.battery-stack span {
  height: 18px;
  background: #40b6bd;
  border: 1px solid rgba(32, 48, 56, 0.18);
  border-radius: 5px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.34);
}

.metric-battery[data-level="3"] .battery-stack span:nth-child(n + 4),
.metric-battery[data-level="2"] .battery-stack span:nth-child(n + 3),
.metric-battery[data-level="1"] .battery-stack span:nth-child(n + 2),
.metric-battery[data-level="0"] .battery-stack span {
  background: rgba(32, 48, 56, 0.18);
}

.is-stale .sample-chip,
.is-stale .metric-sample {
  border-color: rgba(154, 69, 52, 0.38);
}

.chart-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.36fr) minmax(0, 0.64fr);
  align-items: stretch;
  gap: clamp(14px, 3vw, 24px);
  margin-top: clamp(16px, 3vw, 28px);
  padding: clamp(16px, 4vw, 28px);
  overflow: hidden;
  border: 2px solid rgba(32, 48, 56, 0.16);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 253, 238, 0.96), rgba(229, 248, 249, 0.9)),
    #fff7dc;
  box-shadow:
    0 22px 38px rgba(28, 36, 38, 0.17),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.chart-copy {
  display: grid;
  align-content: center;
  min-width: 0;
}

.chart-copy h2 {
  margin: 4px 0 10px;
  font-size: clamp(28px, 6vw, 58px);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 0.95;
}

.chart-copy p:last-child {
  margin: 0;
  color: rgba(32, 48, 56, 0.72);
  font-size: clamp(15px, 3.4vw, 19px);
  font-weight: 800;
  line-height: 1.28;
}

#temperature-chart {
  display: block;
  width: 100%;
  min-width: 0;
  height: clamp(220px, 34vw, 360px);
  border: 1px solid rgba(32, 48, 56, 0.14);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 251, 232, 0.82), rgba(232, 250, 252, 0.78)),
    repeating-linear-gradient(
      90deg,
      rgba(32, 48, 56, 0.04) 0,
      rgba(32, 48, 56, 0.04) 1px,
      transparent 1px,
      transparent 72px
    );
}

@media (max-width: 900px) {
  .status-stage {
    grid-template-columns: minmax(0, 1fr);
  }

  .gauge-panel {
    min-height: min(112vw, 680px);
  }

  .metrics-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: none;
  }

  .chart-panel {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 680px) {
  .status-shell {
    padding-right: 10px;
    padding-left: 10px;
  }

  .status-header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .sample-chip {
    grid-column: 2;
    justify-self: start;
  }

  .metrics-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .metric-card {
    min-height: 164px;
  }
}
