:root {
  --orange: #FF8A3D;
  --orange-deep: #F06A18;
  --orange-soft: #FFF0E1;
  --ink: #241F1A;
  --muted: #96897B;
  --line: #F2E7D9;
  --card: #FFFDFA;
  --asphalt: #3A4351;
  --asphalt-deep: #2E3642;
  --green: #22B07D;
  --amber: #F0A321;
  --red: #EF5B5B;
  --blue: #4A86E8;
  --shadow: 0 6px 18px rgba(146, 96, 48, 0.08);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

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

body {
  background:
    radial-gradient(120% 55% at 50% 0%, #FFE4C6 0%, #FFF5E8 46%, #FFF9F3 100%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-variant-numeric: tabular-nums;
  transition: background 0.6s ease;
  overscroll-behavior-y: none;
}

body.night-mode {
  background:
    radial-gradient(120% 55% at 50% 0%, #2B3550 0%, #232C3E 46%, #1D2432 100%);
}

button { font-family: inherit; color: inherit; }

.app {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 10px calc(26px + env(safe-area-inset-bottom));
}

/* ---------- 顶部状态 ---------- */
.hud {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 -10px 8px;
  padding: calc(8px + env(safe-area-inset-top)) 12px 8px;
  background: linear-gradient(180deg, #FFF1DF 0%, #FFF1DF 72%, rgba(255, 241, 223, 0.86) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.6s ease;
}

body.night-mode .hud {
  background: linear-gradient(180deg, #232C3E 0%, #232C3E 72%, rgba(35, 44, 62, 0.88) 100%);
}

.hud-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.hud-day {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 3px 10px rgba(146, 96, 48, 0.08);
}

.hud-k {
  padding: 3px 7px;
  border-radius: 7px;
  background: #FFF0DF;
  color: #B36B2C;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

#clockText { font-size: 21px; line-height: 1; letter-spacing: -0.02em; }

.hud-cash {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, #FFA254 0%, #FF7A26 100%);
  color: #FFFFFF;
  box-shadow: 0 6px 14px rgba(255, 122, 38, 0.26);
}

.hud-cash .mp-icon { width: 20px; height: 20px; opacity: 0.92; }
.hud-cash-copy b { display: block; font-size: 17px; line-height: 1.08; }
.hud-cash-copy span { display: block; font-size: 8.5px; opacity: 0.86; line-height: 1.3; }

.hud-row-2 { margin-top: 7px; gap: 6px; min-height: 22px; }

.badge {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  background: #FFFFFF;
  color: #8C7A67;
  transition: background 0.25s, color 0.25s;
}

.badge.period.peak { background: #FFE3CB; color: #D25C10; }
.badge.period.night { background: #DDE4F7; color: #44537A; }
.badge.period.day { background: #E4F3E8; color: #3B7C55; }
.badge.holiday { background: #FFE1EA; color: #D64A72; }
.badge[hidden] { display: none; }

.hud-flow { font-size: 10px; color: #9B8B7B; font-weight: 600; }
.hud-live {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  font-size: 9px;
  color: #8E9A8E;
}
.hud-live i {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(34, 176, 125, 0.13);
}

/* ---------- 停车场 ---------- */
.lot-card {
  margin-top: 2px;
  padding: 10px;
  border-radius: 24px;
  background: #FFFFFF;
  border: 1px solid #F6E8D7;
  box-shadow: var(--shadow);
}

.lot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 1px 2px 10px;
}

.lot-title { display: flex; align-items: center; gap: 9px; min-width: 0; }

.p-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 11px;
  background: linear-gradient(145deg, #FFA45B, #FF7A26);
  color: #FFFFFF;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(255, 122, 38, 0.28);
}

.lot-title-copy { min-width: 0; }
.lot-title-copy b { display: block; font-size: 14px; line-height: 1.2; }
.lot-title-copy span { display: block; margin-top: 2px; font-size: 9.5px; color: var(--muted); }

.lot-equip { display: flex; gap: 6px; }

.eq {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: #FFF4E6;
  color: #C7833C;
  transition: box-shadow 0.4s, background 0.4s;
}
.eq .mp-icon { width: 17px; height: 17px; }
.eq b {
  position: absolute;
  right: -4px;
  bottom: -4px;
  min-width: 14px;
  height: 14px;
  padding: 0 2px;
  border-radius: 7px;
  background: #3A4351;
  color: #FFFFFF;
  font-size: 8px;
  line-height: 14px;
  text-align: center;
  border: 1px solid #FFFFFF;
}
.eq.cam { color: #5E7FBF; background: #EEF2FC; }

body.night-mode .eq.light {
  background: #FFF0C9;
  color: #E0A41D;
  box-shadow: 0 0 18px rgba(255, 208, 92, 0.85);
}
body.night-mode .eq.cam { background: #26334A; color: #9EB8F2; }

.lot {
  position: relative;
  overflow: hidden;
  padding: 10px;
  border-radius: 18px;
  background:
    radial-gradient(70% 55% at 12% 0%, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0) 60%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.018) 0 1px, rgba(255, 255, 255, 0) 1px 46px),
    var(--asphalt);
  border: 1px solid #4A5568;
  transition: background 0.6s ease, border-color 0.6s ease, box-shadow 0.6s ease;
}

.lot.night {
  background:
    radial-gradient(70% 60% at 15% 0%, rgba(255, 216, 120, 0.12) 0%, rgba(255, 216, 120, 0) 58%),
    radial-gradient(70% 55% at 88% 8%, rgba(140, 174, 255, 0.16) 0%, rgba(140, 174, 255, 0) 55%),
    #242B38;
  border-color: #3C4961;
  box-shadow: inset 0 0 46px rgba(45, 70, 130, 0.28);
}

.lot.night::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 45% at 14% 0%, rgba(255, 214, 120, 0.38), rgba(255, 214, 120, 0) 66%),
    radial-gradient(68% 48% at 88% 4%, rgba(154, 186, 255, 0.28), rgba(154, 186, 255, 0) 66%);
  opacity: calc(0.45 + var(--light-boost, 0) * 0.14);
  transition: opacity 0.4s ease;
}

/* 出入口 */
.gate-row { display: flex; align-items: center; gap: 5px; padding: 0 1px 8px; position: relative; z-index: 2; }

.gate { width: 84px; flex: 0 0 84px; }

.gate-top {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #DCE3EE;
  font-size: 9.5px;
  line-height: 1;
  height: 13px;
}
.gate-top .mp-icon { width: 11px; height: 11px; opacity: 0.6; }
.gate-top b { font-weight: 600; }

.gate-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #58D7A4;
  box-shadow: 0 0 5px rgba(88, 215, 164, 0.8);
}
.gate.out .gate-dot { background: #FFB069; box-shadow: 0 0 5px rgba(255, 176, 105, 0.8); }

.barrier {
  position: relative;
  width: 70px;
  height: 5px;
  margin-top: 4px;
  border-radius: 3px;
  background: repeating-linear-gradient(90deg, #FF7A63 0 7px, #FFF7EE 7px 14px);
  transform-origin: left center;
  transition: transform var(--gate-dur, 0.24s) ease;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.28);
}
.barrier::before {
  content: "";
  position: absolute;
  left: -3px;
  top: -4px;
  width: 5px;
  height: 12px;
  border-radius: 2px;
  background: #BAC5D4;
}
.gate.out .barrier { margin-left: auto; transform-origin: right center; }
.gate.out .barrier::before { left: auto; right: -3px; }
.gate.open .barrier { transform: rotate(-32deg); }
.gate.out.open .barrier { transform: rotate(32deg); }

.traffic-pill {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  padding: 4px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #EAF0FA;
  font-size: 9.5px;
  white-space: nowrap;
}
.traffic-pill .mp-icon { width: 12px; height: 12px; color: #FFB069; }
.traffic-pill b { font-weight: 700; }
.traffic-pill span { color: #B9C5D8; font-size: 9px; }

/* 车位 */
.slots {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  position: relative;
  z-index: 2;
}

.spot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 62px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.spot.occupied {
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.055);
}

.spot-no {
  position: absolute;
  top: 3px;
  left: 5px;
  font-size: 7.5px;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.32);
}

.p-mark {
  font-size: 15px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.12);
  transition: opacity 0.2s;
}
.spot.occupied .p-mark { opacity: 0; }

/* 2D 小车 */
.car {
  position: relative;
  width: 30px;
  height: 44px;
  border-radius: 10px 10px 8px 8px;
  background: var(--car, #FF6B6B);
  box-shadow:
    inset 0 -7px 0 rgba(0, 0, 0, 0.13),
    inset 0 2px 0 rgba(255, 255, 255, 0.32),
    0 3px 6px rgba(0, 0, 0, 0.28);
  animation: driveIn var(--park-dur, 0.55s) cubic-bezier(0.2, 0.8, 0.3, 1) both;
  z-index: 2;
}

.car .wheel {
  position: absolute;
  width: 5px;
  height: 10px;
  border-radius: 2px;
  background: #1B2029;
  z-index: -1;
}
.car .wheel.fl { left: -3px; top: 9px; }
.car .wheel.fr { right: -3px; top: 9px; }
.car .wheel.rl { left: -3px; bottom: 8px; }
.car .wheel.rr { right: -3px; bottom: 8px; }

.car .win {
  position: absolute;
  left: 15%;
  width: 70%;
  height: 9px;
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(222, 244, 255, 0.96), rgba(143, 190, 218, 0.82));
}
.car .win.front { top: 6px; }
.car .win.rear { bottom: 7px; height: 7px; opacity: 0.82; }

.car::after {
  content: "";
  position: absolute;
  left: calc(50% - 2px);
  top: 18px;
  width: 4px;
  height: 10px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.24);
}

.car .lamp {
  position: absolute;
  top: 2px;
  width: 5px;
  height: 3px;
  border-radius: 2px;
  background: #FFE08A;
  box-shadow: 0 0 4px #FFD86B;
}
.car .lamp.l { left: 4px; }
.car .lamp.r { right: 4px; }

.car .car-tag {
  position: absolute;
  top: -4px;
  right: -5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #FFC24B;
  border: 1px solid #FFFFFF;
  color: #684400;
  font-size: 8.5px;
  line-height: 13px;
  font-weight: 800;
  text-align: center;
  z-index: 3;
}

.car.ready::before {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1.5px solid rgba(255, 194, 75, 0.8);
  border-radius: 13px;
  animation: readyPulse 1s ease-in-out infinite;
}

.car.ghost {
  position: absolute;
  margin: 0;
  z-index: 6;
  animation: none;
  transition: transform 0.65s ease-in, opacity 0.65s ease-in;
  pointer-events: none;
}
.car.ghost.drive-out {
  transform: translate(125px, -135px) rotate(14deg);
  opacity: 0;
}

/* 排队 */
.queue-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  margin-top: 9px;
  padding: 7px 8px;
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.055);
  position: relative;
  z-index: 2;
}

.queue-label {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  color: #C9D3E2;
  font-size: 9.5px;
  white-space: nowrap;
}
.queue-label .mp-icon { width: 12px; height: 12px; color: #9DAABF; }
.queue-label b { color: #FFB069; font-size: 9.5px; }

.queue-cars { display: flex; align-items: center; gap: 4px; flex: 1; min-height: 24px; overflow: hidden; }
.queue-empty { font-size: 9px; color: rgba(255, 255, 255, 0.28); }

.car.mini {
  width: 15px;
  height: 23px;
  border-radius: 5px 5px 4px 4px;
  animation: none;
  flex: 0 0 15px;
  box-shadow:
    inset 0 -3px 0 rgba(0, 0, 0, 0.13),
    0 2px 4px rgba(0, 0, 0, 0.25);
}
.car.mini .win, .car.mini .lamp, .car.mini .wheel, .car.mini::after { display: none; }
.car.mini .win.front {
  display: block;
  left: 3px;
  top: 4px;
  width: 9px;
  height: 5px;
  border-radius: 2px;
  opacity: 0.9;
}
.car.mini.monthly { box-shadow: 0 0 0 1px #FFC24B, 0 0 5px rgba(255, 194, 75, 0.5); }

.float-layer { position: absolute; inset: 0; z-index: 8; pointer-events: none; }

.float-text {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  animation: floatUp 1.25s ease-out forwards;
  pointer-events: none;
}
.float-text.good { color: #7DF0AE; }
.float-text.monthly { color: #FFD166; }
.float-text.free { color: #CFE3FF; }
.float-text.bad { color: #FF8B8B; }

.lot-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 0 2px;
  font-size: 9.5px;
}

.congest {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}
.congest i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.congest.smooth { background: #E8F7EF; color: #268A63; }
.congest.slow { background: #FFF3D9; color: #B77912; }
.congest.jam { background: #FFE6E3; color: #D7433C; }

.foot-hint {
  flex: 1;
  min-width: 0;
  color: #9B8B7B;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.flow-mini { flex: 0 0 auto; color: #B08762; font-size: 9px; white-space: nowrap; }

/* ---------- 数据面板 ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.stat {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid #F6EADD;
  box-shadow: 0 4px 12px rgba(146, 96, 48, 0.05);
}

.stat-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 10px;
}
.stat-ico .mp-icon { width: 17px; height: 17px; }
.stat-ico.income { background: #FFF0DF; color: #E27A24; }
.stat-ico.parked { background: #EAF1FF; color: #4A78CC; }
.stat-ico.wait { background: #EFEAFE; color: #7B62C9; }
.stat-ico.cash { background: #E9F7F0; color: #2E9B6F; }

.stat-copy { min-width: 0; }
.stat-copy span { display: block; font-size: 9px; color: var(--muted); line-height: 1.3; }
.stat-copy b { display: block; margin-top: 1px; font-size: 15px; line-height: 1.2; white-space: nowrap; }

/* ---------- 经营面板 ---------- */
.panel {
  margin-top: 10px;
  padding: 14px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid #F4E8DA;
  box-shadow: 0 4px 14px rgba(146, 96, 48, 0.055);
}

.panel-head { display: flex; align-items: flex-start; gap: 9px; }

.panel-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 11px;
  background: var(--orange-soft);
  color: var(--orange-deep);
}
.panel-ico .mp-icon { width: 18px; height: 18px; }

.panel-title { flex: 1; min-width: 0; }
.panel-title b { display: block; font-size: 14.5px; line-height: 1.25; }
.panel-title span {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.4;
  color: var(--muted);
}

.head-pill {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #FFF3E5;
  color: #C06A1E;
  font-size: 9.5px;
  font-weight: 700;
  white-space: nowrap;
}

.rule {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #FFF7EE;
  border: 1px dashed #FFD6B2;
  color: #9A5A22;
  font-size: 11px;
  line-height: 1.4;
}

.stepper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.s-label { font-size: 12.5px; color: #5E5347; font-weight: 600; }

.stepper {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 12px;
  background: #F7F1E9;
}

.step-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: #FFFFFF;
  color: var(--orange-deep);
  font-size: 19px;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(146, 96, 48, 0.08);
  cursor: pointer;
  user-select: none;
}
.step-btn:active { transform: scale(0.94); }
.step-btn:disabled { opacity: 0.32; cursor: default; transform: none; }

.step-val { min-width: 80px; text-align: center; }
.step-val b { font-size: 15px; }
.step-val small { margin-left: 1px; font-size: 9.5px; color: var(--muted); }

.panel-tip {
  margin: 8px 0 0;
  font-size: 9.5px;
  line-height: 1.5;
  color: #A39484;
}

.progress {
  height: 6px;
  margin-top: 11px;
  border-radius: 999px;
  background: #F4ECE2;
  overflow: hidden;
}
.progress span {
  display: block;
  height: 100%;
  width: 33%;
  border-radius: 999px;
  background: linear-gradient(90deg, #FFB169, #FF8A3D);
  transition: width 0.3s ease;
}

.action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 11px;
}
.action-copy { flex: 1; min-width: 0; }
.action-copy b { display: block; font-size: 12px; line-height: 1.35; }
.action-copy span { display: block; margin-top: 2px; font-size: 9.5px; line-height: 1.4; color: var(--muted); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--orange-soft);
  color: #D9661A;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn.primary {
  background: linear-gradient(135deg, #FFA254, #FF7A26);
  color: #FFFFFF;
  box-shadow: 0 5px 12px rgba(255, 122, 38, 0.26);
}
.btn:disabled {
  background: #EEE7DE;
  color: #AFA396;
  box-shadow: none;
  cursor: default;
  transform: none;
}
.btn.small {
  min-height: 36px;
  min-width: 58px;
  padding: 7px 11px;
  border-radius: 10px;
  font-size: 11px;
}
.btn.block { width: 100%; min-height: 46px; font-size: 14px; }

.seg {
  display: flex;
  gap: 4px;
  margin-top: 11px;
  padding: 3px;
  border-radius: 12px;
  background: #F7F1E9;
}
.seg button {
  flex: 1;
  min-height: 40px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #857768;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.seg button.active {
  background: #FFFFFF;
  color: #D9661A;
  box-shadow: 0 2px 6px rgba(146, 96, 48, 0.1);
}

.dispatch-info {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #FBF7F1;
  font-size: 10px;
  color: #8B7B6A;
}
.dispatch-info b { color: #4B4137; font-size: 10.5px; }

#congestDispatch { margin-left: auto; margin-top: 2px; }

/* 设备 */
.devices { padding-bottom: 6px; }

.device {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid #F5EDE3;
}
.devices .panel-head + .device { margin-top: 6px; }

.device-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
}
.device-ico .mp-icon { width: 18px; height: 18px; }
.device-ico.gate { background: #FFF0DF; color: #DD7A27; }
.device-ico.cam { background: #EDF2FC; color: #5D7FC0; }
.device-ico.light { background: #FFF8DD; color: #C79A20; }

.device-main { flex: 1; min-width: 0; }

.device-name { display: flex; align-items: center; gap: 5px; }
.device-name b { font-size: 12.5px; }
.device-name .lv { font-size: 9px; font-weight: 700; color: #C56B23; }

.dots { display: inline-flex; gap: 2px; margin-left: auto; padding-right: 2px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: #ECE3D7; }
.dots i.on { background: var(--orange); }

.device-effect { margin-top: 3px; font-size: 9.5px; line-height: 1.35; color: var(--muted); }

.device-action { flex: 0 0 auto; text-align: right; }
.device-cost { display: block; font-size: 9.5px; color: #A3734A; line-height: 1.2; }
.device-action .btn { margin-top: 3px; }
.device-cost.soldout { visibility: hidden; }

.page-note {
  margin: 16px 0 0;
  text-align: center;
  font-size: 9.5px;
  color: #AB9C8C;
}

/* ---------- 浮层 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(26px + env(safe-area-inset-bottom));
  z-index: 70;
  max-width: 86vw;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(32, 27, 22, 0.93);
  color: #FFFFFF;
  font-size: 11.5px;
  line-height: 1.35;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 10px);
  transition: opacity 0.22s, transform 0.22s;
  pointer-events: none;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(31, 24, 17, 0.56);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}
.modal.show { opacity: 1; visibility: visible; }

.summary-card {
  width: 100%;
  max-width: 340px;
  padding: 22px 20px 18px;
  border-radius: 24px;
  background: #FFFBF5;
  text-align: center;
  box-shadow: 0 20px 50px rgba(40, 26, 12, 0.3);
  transform: scale(0.94);
  transition: transform 0.25s;
}
.modal.show .summary-card { transform: scale(1); }

.summary-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  background: #FFF0DF;
  color: #F08430;
}
.summary-ico .mp-icon { width: 28px; height: 28px; }

.summary-card h2 { margin: 9px 0 4px; font-size: 18px; letter-spacing: -0.01em; }
.summary-sub { margin: 0; font-size: 10.5px; color: var(--muted); }

.sum-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 15px 0 16px;
}
.sum-grid div { padding: 8px; border-radius: 11px; background: #FFF4E8; }
.sum-grid span { display: block; font-size: 8.5px; color: #A18F7D; }
.sum-grid b { display: block; margin-top: 2px; font-size: 13.5px; }

.summary-note { margin: 10px 0 0; font-size: 9px; color: #A99A8A; }

@keyframes driveIn {
  from { transform: translate(-64px, -70px) scale(0.72) rotate(-16deg); opacity: 0.25; }
  to { transform: none; opacity: 1; }
}

@keyframes readyPulse {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.9; }
}

@keyframes floatUp {
  0% { transform: translate(-50%, -50%) scale(0.92); opacity: 0; }
  18% { opacity: 1; transform: translate(-50%, -62%) scale(1.04); }
  100% { transform: translate(-50%, -155%) scale(1); opacity: 0; }
}

@media (max-width: 360px) {
  .app { padding-left: 8px; padding-right: 8px; }
  .hud { margin-left: -8px; margin-right: -8px; padding-left: 10px; padding-right: 10px; }
  .lot { padding: 8px; }
  .slots { gap: 5px; }
  .spot { min-height: 58px; }
  .car { width: 27px; height: 40px; }
  .gate { width: 76px; flex-basis: 76px; }
  .barrier { width: 62px; }
  .panel { padding: 12px; }
  .step-val { min-width: 68px; }
  .foot-hint { font-size: 9px; }
  .flow-mini { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .car { animation: none; }
  .car.ready::before { animation: none; opacity: 0.6; }
  .float-text { animation-duration: 0.01s; }
  .car.ghost { transition-duration: 0.01s; }
}
