/* ==========================================================================
   MILEPOST DEMO (try.html)
   A live Milepost wall screen inside an illustrated trailer.
   The screen itself is a fixed 1024x600 canvas scaled to fit, so pixel
   values inside .mp-screen match the device, not the page.
   ========================================================================== */

.mp-demo {
  color: var(--color-white);
  scroll-margin-top: 120px;
}

.mp-stage {
  position: relative;
  width: 100%;
}

/* Page header around the demo */
.try-demo__header {
  max-width: 760px;
  margin: 0 auto var(--space-6);
  text-align: center;
}

.try-demo__eyebrow {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-primary-light);
  margin-bottom: var(--space-2);
}

.try-demo__title {
  color: var(--color-white);
  margin-bottom: var(--space-3);
}

.try-demo__lead {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0;
}

.try-demo__note,
.try-demo__noscript {
  max-width: 760px;
  margin: var(--space-6) auto 0;
  text-align: center;
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.6);
}

/* --------------------------------------------------------------------------
   Scene
   -------------------------------------------------------------------------- */

.mp-scene {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
  border: 1px solid #333333;
  background: #1a1a1a;
}

.mp-layer,
.mp-tilt,
.mp-fx {
  position: absolute;
  inset: 0;
}

.mp-layer[hidden],
.mp-fx[hidden] {
  display: none;
}

.mp-fx {
  pointer-events: none;
}

.mp-tilt {
  transform-origin: 45% 76%;
  transition: transform 0.6s ease;
}

.mp-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.mp-night {
  position: absolute;
  inset: 0;
  background: #0a0f1e;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.mp-wash {
  position: absolute;
  inset: 0;
  background: rgba(255, 190, 110, 0.18);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.mp-lamp {
  position: absolute;
  filter: blur(4px);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.mp-lamp > div {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 214, 140, 0.85), rgba(255, 214, 140, 0.15));
}

.mp-caption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 4px 10px;
  border-radius: var(--border-radius-lg);
  background: rgba(0, 0, 0, 0.6);
  font-size: 12px;
  color: #cacaca;
}

/* Kitchen faucet */
.mp-stream {
  position: absolute;
  width: 8px;
  height: 0;
  border-radius: 4px;
  background: repeating-linear-gradient(180deg, rgba(150, 215, 250, 0.95) 0 6px, rgba(225, 246, 255, 0.95) 6px 12px);
  background-size: 100% 24px;
  animation: mpFlow 0.3s linear infinite;
  transition: height 0.3s ease;
}

.mp-ripple {
  position: absolute;
  width: 60px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(190, 235, 255, 0.9);
  animation: mpRipple 0.9s ease-out infinite;
}

/* Living room vent fans. --mp-fs is set from the scene width. */
.mp-vent {
  position: absolute;
  width: 0;
  height: 0;
}

.mp-vent__fan {
  position: absolute;
  left: calc(var(--mp-fs) / -2);
  top: calc(var(--mp-fs) * 0.25);
  display: block;
  width: var(--mp-fs);
  font-size: var(--mp-fs);
  line-height: 1;
  text-align: center;
  color: rgba(70, 70, 70, 0.45);
  transform: scaleY(0.45);
  transform-origin: 50% 0;
}

.mp-vent__fan::before {
  display: inline-block;
}

.fan-on .mp-vent__fan::before {
  animation: mpSpin 2.8s linear infinite;
}

.mp-vent__air {
  position: absolute;
  left: calc(var(--mp-fs) * -0.8);
  top: calc(var(--mp-fs) * 0.7);
  width: calc(var(--mp-fs) * 1.6);
  height: calc(var(--mp-fs) * 0.5);
  opacity: 0;
  display: none;
}

.mp-vent__air path {
  fill: none;
  stroke: rgba(240, 248, 255, 0.85);
  stroke-width: 1.4;
  stroke-linecap: round;
}

.fan-on .mp-vent__air {
  display: block;
  animation: mpAir 2.7s ease-out infinite;
}

/* Exterior */
.mp-windows {
  opacity: 0;
  filter: drop-shadow(0 0 6px rgba(255, 196, 110, 0.8));
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.mp-marker {
  position: absolute;
  width: 1.2%;
  aspect-ratio: 1;
  border-radius: var(--border-radius-full);
  background: radial-gradient(circle, rgba(255, 236, 170, 1) 0%, rgba(255, 170, 40, 0.95) 40%, rgba(255, 150, 30, 0) 72%);
  box-shadow: 0 0 14px 5px rgba(255, 160, 40, 0.55);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.mp-block {
  position: absolute;
  left: 35.5%;
  width: 8.5%;
  height: 1.9%;
  background: #b07a46;
  border: 2px solid #7a4f28;
  border-top: 3px solid #c9925a;
  border-radius: 2px;
  transform: rotate(7deg);
  transform-origin: 50% 0;
}

.mp-porch-glow {
  position: absolute;
  left: 28.5%;
  top: 34.6%;
  width: 16%;
  height: 40%;
  background: radial-gradient(ellipse 50% 100% at 50% 0%, rgba(255, 214, 130, 0.75), rgba(255, 214, 130, 0) 100%);
  transform: skewY(7.2deg);
  transform-origin: 50% 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.mp-awning-glow {
  position: absolute;
  left: 27.2%;
  top: 35.6%;
  width: 34.6%;
  height: 40%;
  background: linear-gradient(180deg, rgba(255, 230, 170, 0.55), rgba(255, 230, 170, 0) 85%);
  transform: skewY(7.2deg);
  transform-origin: 0 0;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 15%, #000 85%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 15%, #000 85%, transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.mp-awning {
  position: absolute;
  left: 27.2%;
  top: 35.2%;
  width: 34.6%;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  transform: rotate(7.2deg);
  transform-origin: 0 50%;
  background: rgba(90, 90, 90, 0.5);
  cursor: pointer;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.mp-awning.is-on {
  background: #fff1c4;
  box-shadow: 0 0 14px rgba(255, 230, 170, 1);
}

.mp-porch {
  position: absolute;
  left: calc(36.3% - 8px);
  top: calc(34.6% - 8px);
  width: 16px;
  height: 16px;
  padding: 0;
  border-radius: var(--border-radius-full);
  border: 2px solid #333333;
  background: rgba(120, 120, 120, 0.6);
  cursor: pointer;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.mp-porch.is-on {
  background: #fff1c4;
  box-shadow: 0 0 18px rgba(255, 230, 170, 1);
}

.mp-awning:focus-visible,
.mp-porch:focus-visible {
  outline: 2px solid var(--color-success);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Device: the Milepost bezel, framed on the wall or opened
   -------------------------------------------------------------------------- */

.mp-device {
  position: absolute;
  z-index: 2;
  box-sizing: border-box;
  background: #141414;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
  transition: left 0.35s ease, top 0.35s ease, width 0.35s ease, padding 0.35s ease, box-shadow 0.6s ease;
}

.is-night .mp-device {
  box-shadow: 0 0 48px rgba(123, 201, 106, 0.22), 0 14px 34px rgba(0, 0, 0, 0.5);
}

.mp-device.is-framed {
  background: #232323;
  border: 1px solid #3a3a3a;
  box-shadow: 4px 8px 14px rgba(0, 0, 0, 0.35), inset 0 0 0 2px #2d2d2d;
  cursor: pointer;
}

.is-night .mp-device.is-framed {
  box-shadow: 0 0 48px rgba(123, 201, 106, 0.22), 4px 8px 14px rgba(0, 0, 0, 0.35), inset 0 0 0 2px #2d2d2d;
}

.mp-device.is-framed:focus-visible {
  outline: 3px solid var(--color-success);
  outline-offset: 3px;
}

.mp-device.is-inflow {
  position: relative;
  margin-top: 12px;
  transition: none;
}

.mp-viewport {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}

.mp-device.is-framed .mp-viewport {
  pointer-events: none;
  border: 3px solid #0d0d0d;
  margin: -3px 0 0 -3px;
}

.mp-hotspot {
  position: absolute;
  right: -9px;
  top: -9px;
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.mp-hotspot[hidden] {
  display: none;
}

.mp-hotspot span {
  position: absolute;
  border-radius: var(--border-radius-full);
}

.mp-hotspot span:first-child {
  inset: 0;
  background: #7bc96a;
  animation: mpPulse 2s ease-out infinite;
}

.mp-hotspot span:last-child {
  inset: 3px;
  background: #74fe00;
  box-shadow: 0 0 12px rgba(116, 254, 0, 0.9), 0 0 0 2px #0a0a0a;
}

.mp-close {
  position: absolute;
  right: -14px;
  top: -14px;
  z-index: 3;
  width: 32px;
  height: 32px;
  border-radius: var(--border-radius-full);
  background: #1a1a1a;
  border: 1px solid #333333;
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mp-close[hidden] {
  display: none;
}

.mp-close:hover {
  background: #252525;
}

.mp-device.is-inflow .mp-close {
  right: 6px;
  top: 6px;
}

/* --------------------------------------------------------------------------
   Screen: 1024x600, device pixels
   -------------------------------------------------------------------------- */

.mp-screen {
  --mp-body: #000000;
  --mp-card: #1a1a1a;
  --mp-bar: #0a0a0a;
  --mp-border: #333333;
  --mp-text: #ffffff;
  --mp-text2: #aaaaaa;
  --mp-muted: #6f6f6f;
  --mp-accent: #7bc96a;
  --mp-soft: #2e4a2a;
  --mp-track: #2e2e2e;
  --mp-tankbg: #222622;
  --mp-dial: #1f241f;
  --mp-pill: #2a2a2a;
  --mp-nav-on: #4a6a44;
  --mp-seg-on: #0a0a0a;
  --mp-tile-glow: 0 0 14px rgba(123, 201, 106, 0.35);
  --mp-black: #666666;

  position: absolute;
  left: 0;
  top: 0;
  width: 1024px;
  height: 600px;
  transform-origin: 0 0;
  overflow: hidden;
  background: var(--mp-body);
  color: var(--mp-text);
  font-family: 'Roboto', sans-serif;
  font-size: 13px;
  line-height: 1.2;
  user-select: none;
  -webkit-user-select: none;
}

.mp-screen[data-theme="light"] {
  --mp-body: #e4e4e4;
  --mp-card: #ffffff;
  --mp-bar: #ffffff;
  --mp-border: #c8c8c8;
  --mp-text: #1a1a1a;
  --mp-text2: #4a4a4a;
  --mp-muted: #696969;
  --mp-accent: #52a441;
  --mp-soft: #cbe3c6;
  --mp-track: #cfcfcf;
  --mp-tankbg: #efefef;
  --mp-dial: #efefef;
  --mp-pill: #ededed;
  --mp-nav-on: #2f5e25;
  --mp-seg-on: #ffffff;
  --mp-tile-glow: 0 0 10px rgba(82, 164, 65, 0.25);
  --mp-black: #424242;
}

.mp-screen *,
.mp-screen *::before,
.mp-screen *::after {
  box-sizing: border-box;
}

.mp-screen button {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  -webkit-tap-highlight-color: transparent;
}

.mp-screen [hidden] {
  display: none !important;
}

.mp-grow {
  flex: 1;
}

.mp-card {
  background: var(--mp-card);
  border: 1px solid var(--mp-border);
  border-radius: 10px;
  padding: 12px;
  position: relative;
}

.mp-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 1.5px;
  color: var(--mp-muted);
}

.mp-label2 {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 1.5px;
  color: var(--mp-text2);
}

.mp-label3 {
  font-size: 10px;
  font-weight: 500;
  color: var(--mp-text2);
}

.mp-sub {
  font-size: 11px;
  color: var(--mp-text2);
  margin-top: 8px;
}

.mp-sub2 {
  font-size: 13px;
  color: var(--mp-text2);
  margin-top: 4px;
}

.mp-auto {
  margin-top: auto;
}

.mp-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  padding: 6px 0;
  border-bottom: 1px solid var(--mp-border);
  color: var(--mp-text2);
}

.mp-row span:last-child {
  color: var(--mp-text);
  font-size: 12px;
}

.mp-row--roomy {
  padding: 8px 0;
}

/* Top bar */
.mp-bar {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 38px;
  background: var(--mp-bar);
  border-bottom: 1px solid var(--mp-border);
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 10px;
  font-size: 14px;
}

.mp-bar__logo {
  font-size: 15px;
  color: var(--mp-accent);
}

.mp-bar__brand {
  font-weight: 500;
  letter-spacing: 1px;
  color: var(--mp-accent);
}

.mp-bar__greet {
  font-size: 12px;
  margin-left: 6px;
}

.mp-bar__rssi {
  font-size: 11px;
  font-weight: 500;
}

.mp-bar__sep {
  width: 1px;
  height: 16px;
  background: var(--mp-border);
  margin: 0 8px;
}

.mp-bell {
  position: relative;
  width: 20px;
  display: flex;
  justify-content: center;
}

.mp-bell__badge {
  position: absolute;
  top: -6px;
  right: -4px;
  min-width: 13px;
  height: 13px;
  border-radius: 7px;
  background: #ff5453;
  color: #ffffff;
  font-size: 9px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mp-bar__theme {
  width: 28px;
  height: 22px;
  border-radius: 11px;
  background: var(--mp-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 8px !important;
  font-size: 13px;
}

.mp-bar__time {
  font-size: 18px;
  min-width: 90px;
  text-align: right;
}

/* Body */
.mp-body {
  position: absolute;
  left: 0;
  right: 0;
  top: 38px;
  bottom: 48px;
  padding: 12px;
  background: var(--mp-body);
}

/* Bottom nav */
.mp-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 48px;
  background: var(--mp-bar);
  border-top: 1px solid var(--mp-border);
  display: flex;
  gap: 8px;
  padding: 4px 8px;
}

.mp-nav__btn {
  flex: 1;
  border-radius: 8px;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  color: var(--mp-text2) !important;
  transition: background 0.2s ease;
}

.mp-nav__btn i {
  font-size: 16px;
}

.mp-nav__btn span {
  font-size: 11px;
  font-weight: 500;
}

.mp-nav__btn.is-active {
  background: var(--mp-accent);
  color: var(--mp-nav-on) !important;
}

/* Home tiles */
.mp-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 90px;
  gap: 8px;
}

.mp-tile {
  border-radius: 10px;
  background: var(--mp-card);
  border: 1px solid var(--mp-border) !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  color: var(--mp-text2) !important;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.mp-tile i {
  font-size: 24px;
  color: var(--mp-muted);
}

.mp-tile span {
  font-size: 13px;
}

.mp-tile:active {
  transform: scale(0.98);
}

.mp-tile.is-on {
  background: var(--mp-soft);
  border-color: var(--mp-accent) !important;
  box-shadow: var(--mp-tile-glow);
}

.mp-tile.is-on i {
  color: var(--mp-text2);
}

.mp-tile:focus-visible,
.mp-nav__btn:focus-visible,
.mp-seg button:focus-visible,
.mp-bar__theme:focus-visible {
  outline: 3px solid var(--mp-accent);
  outline-offset: 2px;
}

.mp-home-row {
  display: grid;
  grid-template-columns: 190px 1fr 190px;
  gap: 10px;
  margin-top: 10px;
  height: 292px;
}

/* Power gauges */
.mp-power__ico {
  position: absolute;
  left: 12px;
  font-size: 14px;
}

.mp-gauge {
  position: relative;
  width: 130px;
  height: 120px;
  margin: 6px auto 0;
}

.mp-gauge--solar {
  margin-top: 16px;
}

.mp-gauge svg {
  position: absolute;
  top: 0;
  left: 0;
}

.mp-track,
.mp-arc {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
}

.mp-track {
  stroke: var(--mp-track);
}

.mp-arc {
  transition: stroke-dasharray 0.3s ease;
}

.mp-arc--accent {
  stroke: var(--mp-accent);
}

.mp-gauge__val {
  position: absolute;
  left: 0;
  right: 0;
  top: 46px;
  text-align: center;
}

.mp-gauge__num {
  font-size: 26px;
  font-weight: 500;
}

.mp-gauge__unit {
  font-size: 11px;
}

.mp-gauge__val div {
  font-size: 11px;
  font-weight: 500;
  color: var(--mp-text);
}

/* Clock */
.mp-clock {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.mp-clock__day {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 1px;
  color: var(--mp-accent);
}

.mp-clock__row {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin-left: 60px;
}

.mp-clock__time {
  display: flex;
  align-items: center;
  font-weight: 300;
  font-size: 104px;
  line-height: 1;
}

.mp-clock__colon {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0 8px;
}

.mp-clock__colon span {
  width: 12px;
  height: 12px;
  border-radius: 6px;
  background: var(--mp-accent);
}

.mp-clock__ampm {
  font-size: 26px;
  font-weight: 500;
  color: var(--mp-accent);
  padding-bottom: 10px;
  width: 46px;
}

.mp-clock__date {
  font-size: 15px;
  color: var(--mp-text2);
  margin-top: 20px;
}

/* Water summary */
.mp-water {
  display: flex;
  flex-direction: column;
}

.mp-water__list {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  padding-top: 10px;
}

.mp-water__head {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 500;
  margin-bottom: 6px;
}

.mp-water__head span:last-child {
  font-size: 13px;
  font-weight: 400;
}

.mp-bar-h {
  height: 6px;
  border-radius: 3px;
  background: var(--mp-tankbg);
  overflow: hidden;
}

.mp-bar-h__fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.mp-fill-fresh { background: #48e6fe; }
.mp-fill-grey { background: #9e9e9e; }
.mp-fill-black { background: var(--mp-black); }

/* Vehicle */
.mp-vehicle {
  display: grid;
  grid-template-columns: 340px 340px 1fr;
  gap: 10px;
  height: 490px;
}

.mp-level {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mp-level > .mp-label {
  align-self: flex-start;
}

.mp-level__dial {
  margin-top: 118px;
  position: relative;
  width: 150px;
  height: 150px;
  border-radius: 75px;
  background: var(--mp-dial);
  border: 2px solid var(--mp-border);
}

.mp-level__h,
.mp-level__v,
.mp-level__ring,
.mp-level__bubble {
  position: absolute;
}

.mp-level__h {
  left: 8px;
  right: 8px;
  top: 50%;
  height: 1px;
  background: var(--mp-border);
}

.mp-level__v {
  top: 8px;
  bottom: 8px;
  left: 50%;
  width: 1px;
  background: var(--mp-border);
}

.mp-level__ring {
  left: 42px;
  top: 42px;
  width: 62px;
  height: 62px;
  border-radius: 31px;
  border: 1px solid var(--mp-border);
}

/* The dial's content box is 146px; center the 16px bubble exactly. */
.mp-level__bubble {
  left: 65px;
  top: 65px;
  width: 16px;
  height: 16px;
  border-radius: 8px;
  background: #ffc107;
  transition: transform 0.4s ease;
}

.mp-level__vals {
  display: flex;
  gap: 44px;
  margin-top: 12px;
  text-align: center;
}

.mp-level__num {
  font-size: 20px;
  margin-top: 4px;
}

.mp-pill {
  margin-top: 16px;
  width: 96px;
  height: 22px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, color 0.3s ease;
}

.mp-pill--good { background: var(--mp-soft); color: var(--mp-accent); }
.mp-pill--warn { background: #3a2f00; color: #ffc107; }
.mp-pill--bad { background: #4a1f1f; color: #ff5453; }
[data-theme="light"] .mp-pill--warn { background: #fff4cc; color: #8a6500; }
[data-theme="light"] .mp-pill--bad { background: #ffdddc; color: #ff5453; }

.mp-gnss > .mp-label {
  margin-bottom: 14px;
}

/* Power page */
.mp-powerpage {
  display: grid;
  grid-template-columns: 280px 400px 1fr;
  gap: 12px;
  align-items: start;
}

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

.mp-solar,
.mp-shore,
.mp-battery,
.mp-consume {
  padding: 14px 16px;
}

.mp-solar {
  height: 160px;
}

.mp-solar__w {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #ffc107;
  font-size: 22px;
}

.mp-solar__w i {
  font-size: 26px;
}

.mp-solar .mp-label3 {
  margin-top: 6px;
}

.mp-solar__status {
  font-size: 18px;
  margin-top: 26px;
}

.mp-shore {
  height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mp-shore .mp-label3 {
  align-self: flex-start;
}

.mp-shore i {
  font-size: 22px;
  color: var(--mp-text2);
  margin-top: 16px;
}

.mp-shore div:last-child {
  font-size: 18px;
  margin-top: 16px;
}

.mp-battery,
.mp-consume {
  height: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mp-battery > .mp-label3,
.mp-consume > .mp-label3 {
  align-self: flex-start;
}

.mp-battery__soc {
  display: flex;
  align-items: flex-start;
  gap: 70px;
  margin-top: 28px;
}

.mp-battery__soc span:first-child {
  font-weight: 300;
  font-size: 104px;
  line-height: 1;
}

.mp-battery__soc span:last-child {
  font-size: 20px;
  margin-top: 26px;
}

.mp-battery__rule {
  width: 320px;
  height: 1px;
  background: var(--mp-border);
  margin-top: 26px;
}

.mp-battery__v {
  display: flex;
  align-items: flex-end;
  gap: 110px;
  margin-top: 30px;
  font-size: 22px;
  color: var(--mp-accent);
}

.mp-battery__v span:first-child {
  font-weight: 300;
}

.mp-battery__v span:last-child {
  margin-bottom: -10px;
}

.mp-ring {
  position: relative;
  width: 220px;
  height: 200px;
  margin-top: 10px;
}

.mp-ring svg {
  position: absolute;
  left: 0;
  top: 0;
}

.mp-ring .mp-track,
.mp-ring .mp-arc {
  stroke-width: 18;
}

.mp-ring__val {
  position: absolute;
  left: 0;
  right: 0;
  top: 78px;
  text-align: center;
}

.mp-ring__val div:first-child {
  font-size: 22px;
}

.mp-ring__val .mp-label3 {
  font-size: 11px;
  margin-top: 12px;
}

.mp-consume__w {
  align-self: flex-end;
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 20px;
}

.mp-consume__w span:first-child {
  font-size: 24px;
  font-weight: 300;
  color: var(--mp-accent);
}

/* Water page */
.mp-waterpage {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 241px;
  gap: 10px;
  height: 490px;
}

.mp-waterpage .mp-stack {
  gap: 10px;
}

.mp-tank {
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mp-tank__name {
  font-size: 15px;
}

.mp-tank__bar {
  margin-top: 68px;
  width: 40px;
  height: 250px;
  border-radius: 6px;
  background: var(--mp-tankbg);
  position: relative;
  overflow: hidden;
}

.mp-tank__bar div {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 4px;
  transition: height 0.3s ease;
}

.mp-grad-fresh { background: linear-gradient(to top, #0088cc, #48e6fe); }
.mp-grad-grey { background: linear-gradient(to top, #777777, #b5b5b5); }
.mp-grad-black { background: linear-gradient(to top, #333333, #666666); }

.mp-tank__pct {
  font-size: 24px;
  font-weight: 300;
  margin-top: auto;
}

.mp-tank .mp-label {
  margin-top: 8px;
}

.mp-pump {
  height: 130px;
  gap: 10px;
  flex: none;
}

.mp-pump i {
  font-size: 22px;
  color: var(--mp-text);
}

.mp-pump.is-on i {
  color: var(--mp-text);
}

.mp-pump span {
  font-size: 11px;
  font-weight: 500;
  color: var(--mp-text);
}

.mp-pump .mp-pump__state {
  font-size: 9px;
  letter-spacing: 1.5px;
  margin-top: 8px;
}

.mp-usage {
  flex: 1;
}

.mp-usage > .mp-label {
  margin-bottom: 10px;
}

.mp-usage .mp-row {
  padding: 7px 0;
}

/* Air */
.mp-air__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: -10px;
}

.mp-air__title {
  font-size: 24px;
}

.mp-air__overall {
  width: 160px;
  height: 26px;
  border-radius: 13px;
  background: var(--mp-pill);
  color: #52a441;
  font-size: 10px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
}

.mp-air__grid {
  display: grid;
  grid-template-columns: repeat(3, 328px);
  grid-auto-rows: 180px;
  gap: 20px 8px;
  margin-top: 20px;
}

.mp-aircard {
  padding: 14px 16px;
}

.mp-aircard__top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.mp-aircard__top > i {
  font-size: 20px;
  width: 24px;
  text-align: center;
  margin-top: 4px;
}

.mp-aircard__val {
  font-size: 24px;
}

.mp-aircard .mp-label3 {
  font-size: 11px;
  margin-top: 6px;
}

.mp-aircard__unit {
  font-size: 14px;
  color: var(--mp-text2);
  margin-top: 12px;
  width: 40px;
  text-align: right;
}

.mp-badge {
  width: 76px;
  height: 22px;
  border-radius: 11px;
  font-size: 10px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mp-bar-h--air {
  height: 8px;
  border-radius: 4px;
  margin-top: 28px;
}

.mp-bar-h--air .mp-bar-h__fill {
  border-radius: 4px;
  transition: width 0.4s ease;
}

.mp-aircard__scale {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--mp-text2);
  margin-top: 8px;
}

/* Settings */
.mp-settings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mp-seg-card {
  height: 122px;
}

.mp-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.mp-seg button {
  height: 34px;
  border-radius: 6px;
  background: var(--mp-pill);
  color: var(--mp-text);
  border: 1px solid var(--mp-border) !important;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
}

.mp-seg button.is-on {
  background: var(--mp-accent);
  color: var(--mp-seg-on);
}

.mp-about {
  grid-column: 2;
}

.mp-about > .mp-label {
  margin-bottom: 8px;
}

/* --------------------------------------------------------------------------
   Page controls under the stage
   -------------------------------------------------------------------------- */

.mp-controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-6);
  align-items: flex-end;
  margin-top: var(--space-4);
}

.mp-ctl[hidden] {
  display: none;
}

.mp-ctl__label {
  font-size: 11px;
  font-weight: var(--font-medium);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #aaaaaa;
  margin-bottom: 6px;
}

.mp-seg-ctl,
.mp-stepper {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: #1a1a1a;
  border: 1px solid #333333;
}

.mp-demo button {
  font-family: inherit;
}

.mp-seg-ctl button,
.mp-chip,
.mp-stepper__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 0;
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.mp-seg-ctl button {
  padding: 0 var(--space-4);
  border-radius: var(--border-radius-md);
  background: transparent;
  color: #aaaaaa;
}

.mp-seg-ctl button.is-on {
  background: var(--color-primary);
  color: var(--color-dark);
}

.mp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mp-chip {
  padding: 0 14px;
  border-radius: var(--border-radius-lg);
  border: 1px solid #333333;
  background: #1a1a1a;
  color: #aaaaaa;
}

.mp-chip.is-on {
  background: #2e4a2a;
  border-color: #7bc96a;
  color: var(--color-white);
}

.mp-steppers {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.mp-stepper {
  align-items: center;
}

.mp-stepper__label {
  font-size: var(--text-sm);
  color: #aaaaaa;
  padding: 0 8px;
  min-width: 96px;
}

.mp-stepper__btn {
  width: 44px;
  border-radius: var(--border-radius-md);
  background: #252525;
  color: var(--color-white);
}

.mp-stepper__btn--add {
  background: var(--color-primary);
  color: var(--color-dark);
}

.mp-stepper__btn:active {
  transform: scale(0.95);
}

.mp-stepper__n {
  width: 36px;
  text-align: center;
  font-size: var(--text-base);
  font-weight: var(--font-medium);
}

.mp-seg-ctl button:focus-visible,
.mp-chip:focus-visible,
.mp-stepper__btn:focus-visible {
  outline: 2px solid var(--color-success);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Motion
   -------------------------------------------------------------------------- */

@keyframes mpFlow { from { background-position: 0 0; } to { background-position: 0 24px; } }
@keyframes mpSpin { to { transform: rotate(360deg); } }
@keyframes mpAir {
  0% { transform: translateY(0); opacity: 0; }
  30% { opacity: 0.6; }
  100% { transform: translateY(160%); opacity: 0; }
}
@keyframes mpPulse { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(2.6); opacity: 0; } }
@keyframes mpRipple { 0% { transform: scale(0.4); opacity: 0.9; } 100% { transform: scale(1.6); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .mp-hotspot span:first-child,
  .fan-on .mp-vent__fan::before,
  .mp-stream,
  .mp-ripple {
    animation: none;
  }

  .fan-on .mp-vent__air {
    display: none;
  }

  .mp-device,
  .mp-tilt {
    transition: none;
  }
}
