.pwa-status {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 1600;
  color: #f8fafc;
  font-family: system-ui, -apple-system, "Segoe UI", "Noto Sans TC", sans-serif;
  font-size: 12px;
}

body:not([data-map-mode]) .pwa-status { top: 18px; right: 160px; }
body[data-map-mode] .pwa-status { top: 12px; right: 335px; }

.pwa-status-summary {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 7px;
  padding: 7px 10px;
  color: inherit;
  background: rgba(5,8,17,.88);
  backdrop-filter: blur(14px);
  cursor: pointer;
}

.pwa-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 9px rgba(245,158,11,.7);
}

.pwa-status[data-state="ready"] .pwa-status-dot {
  background: #22c55e;
  box-shadow: 0 0 9px rgba(34,197,94,.7);
}

.pwa-status-menu {
  width: min(292px, calc(100vw - 24px));
  margin-top: 6px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 7px;
  padding: 10px;
  background: rgba(5,8,17,.96);
  box-shadow: 0 16px 36px rgba(0,0,0,.45);
}

.pwa-status-menu > div:not(.pwa-status-actions) {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
}

.pwa-status-menu strong { color: #94a3b8; }
.pwa-status-menu span { text-align: right; }

.pwa-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.pwa-status-actions button {
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 6px;
  padding: 7px 9px;
  color: #f8fafc;
  background: #172033;
  cursor: pointer;
}

.pwa-status-warning { margin-top: 8px; color: #fbbf24; line-height: 1.45; }

@media (max-width: 600px) {
  .pwa-status { top: 8px; right: 8px; }
  body[data-map-mode] .pwa-status { top: 86px; right: 60px; }
  body:not([data-map-mode]) .pwa-status { top: 78px; right: 8px; }
  body:not([data-map-mode]) .control-panel { padding-top: 76px; }
  .pwa-status-summary { padding: 6px 8px; }
}

.pwa-recent-list {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(255,255,255,.1);
  display: grid;
  gap: 5px;
}

.pwa-recent-list strong { color: #94a3b8; }
.pwa-recent-list button {
  width: 100%;
  border: 0;
  border-radius: 5px;
  padding: 7px 8px;
  color: #e2e8f0;
  background: #111827;
  text-align: left;
  cursor: pointer;
}