:root {
  color-scheme: dark;
  --page: #0a1426;
  --blue-900: #102c74;
  --blue-700: #1746b8;
  --blue-500: #2e7af2;
  --cyan: #37d0ff;
  --green: #34e0a1;
  --amber: #ffbf3d;
  --red: #ff5a5a;
  --white: #ffffff;
  --text: rgba(255, 255, 255, 0.94);
  --muted: rgba(255, 255, 255, 0.62);
  --faint: rgba(255, 255, 255, 0.42);
  --line: rgba(255, 255, 255, 0.14);
  --glass: rgba(255, 255, 255, 0.12);
  --glass-strong: rgba(255, 255, 255, 0.18);
  --shadow: 0 18px 48px rgba(0, 18, 78, 0.34);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --app-height: var(--tg-viewport-stable-height, 100dvh);
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  background: var(--page);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
  touch-action: manipulation;
}

body {
  display: flex;
  justify-content: center;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  color: inherit;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  position: relative;
  width: min(100%, 430px);
  min-height: var(--app-height);
  height: var(--app-height);
  overflow: hidden;
  background:
    radial-gradient(110% 72% at 50% -10%, rgba(106, 190, 255, 0.58), transparent 54%),
    linear-gradient(180deg, #1c64e6 0%, #317ff3 48%, #1746b8 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 40px 120px rgba(0, 0, 0, 0.38);
}

.ambient {
  position: absolute;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(2px);
}

.ambient-top {
  top: -92px;
  left: 50%;
  width: 360px;
  height: 360px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.26), transparent);
}

.ambient-bottom {
  right: -170px;
  bottom: 40px;
  width: 300px;
  height: 300px;
  background: radial-gradient(closest-side, rgba(55, 208, 255, 0.24), transparent);
}

.app-header {
  position: absolute;
  z-index: 30;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 10px;
  padding: calc(10px + var(--safe-top)) 18px 8px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  gap: 8px;
  color: #fff;
  text-align: center;
  letter-spacing: 0.065em;
}

.brand-lockup svg {
  width: 14px;
  height: 14px;
}

.brand-lockup strong {
  overflow: hidden;
  font-size: 15px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(16px) saturate(170%);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.18);
}

.icon-button svg {
  width: 22px;
  height: 22px;
}

.icon-button.is-spinning svg {
  animation: spin 0.8s ease both;
}

.screen {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: calc(68px + var(--safe-top)) 18px calc(106px + var(--safe-bottom));
  scrollbar-width: none;
}

.screen::-webkit-scrollbar {
  display: none;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 2px 12px;
}

.section-title h1,
.section-title h2 {
  margin: 0;
  color: #fff;
  font-size: 25px;
  font-weight: 800;
  line-height: 1.05;
}

.section-title small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: right;
}

.glass {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--glass);
  box-shadow: var(--shadow), inset 1px 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px) saturate(165%);
  -webkit-backdrop-filter: blur(16px) saturate(165%);
}

.station-picker {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  margin: 16px 0 6px;
}

.station-button {
  display: inline-grid;
  grid-template-columns: 18px minmax(0, 1fr) 18px;
  align-items: center;
  width: min(240px, 100%);
  min-height: 42px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  text-align: center;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.station-button strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.station-badge {
  grid-template-columns: 18px minmax(0, 1fr);
  pointer-events: none;
}

.station-subline {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11.5px;
  font-weight: 600;
  text-align: center;
}

.station-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 6px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.38);
}

.dot.active {
  width: 24px;
  background: var(--cyan);
}

.gauge-wrap {
  display: grid;
  justify-items: center;
  margin-top: 8px;
}

.gauge {
  position: relative;
  width: min(290px, 82vw);
  aspect-ratio: 1;
}

.gauge[data-swipe-stations] {
  cursor: grab;
  touch-action: pan-y;
}

.gauge[data-swipe-stations]:active {
  cursor: grabbing;
}

.gauge-orb {
  position: absolute;
  inset: 26px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 50%;
  background:
    radial-gradient(55% 42% at 35% 25%, rgba(255, 255, 255, 0.82), transparent 68%),
    radial-gradient(90% 90% at 64% 72%, rgba(31, 97, 219, 0.32), rgba(255, 255, 255, 0.1));
  box-shadow:
    inset 0 2px 12px rgba(255, 255, 255, 0.45),
    inset 0 -24px 48px rgba(10, 51, 150, 0.42),
    0 20px 48px rgba(0, 37, 118, 0.36);
}

.gauge svg {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

.gauge-readout {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  pointer-events: none;
}

.gauge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 3px 12px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: var(--status-color);
  background: var(--status-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.gauge-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 9px currentColor;
}

.gauge-value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  margin-top: 11px;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 30, 90, 0.46);
}

.gauge-value strong {
  font-size: clamp(48px, 16vw, 66px);
  font-weight: 800;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
}

.gauge-value span {
  font-size: 18px;
  font-weight: 800;
}

.gauge-meta {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 11px;
  font-weight: 700;
}

.scale-label {
  position: absolute;
  bottom: 33px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  font-weight: 800;
}

.scale-label.left {
  left: 36px;
}

.scale-label.right {
  right: 36px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.metric-card {
  min-height: 74px;
  padding: 13px 8px;
  text-align: center;
}

.metric-card strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--metric-color, #fff);
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.metric-card span {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  font-weight: 700;
}

.notice-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-top: 12px;
  padding: 14px;
  border-color: rgba(255, 255, 255, 0.18);
}

.notice-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: var(--status-color);
  background: var(--status-soft);
}

.notice-icon svg,
.card-head svg,
.drawer-item svg,
.primary-action svg,
.ghost-action svg {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
}

.notice-card strong {
  display: block;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.notice-card p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.45;
}

.weather-card {
  margin-top: 14px;
  padding: 16px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.card-head strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.card-head small {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  text-align: right;
}

.hour-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.hour-strip::-webkit-scrollbar {
  display: none;
}

.hour-card {
  flex: 0 0 72px;
  min-height: 104px;
  padding: 11px 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
  text-align: center;
}

.hour-card:first-child {
  background: rgba(255, 255, 255, 0.16);
}

.hour-card time {
  display: block;
  color: rgba(255, 255, 255, 0.66);
  font-size: 10.5px;
  font-weight: 800;
}

.hour-card svg {
  width: 24px;
  height: 24px;
  margin: 8px auto 5px;
}

.hour-card strong {
  display: block;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
}

.hour-card span {
  display: block;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 10px;
  font-weight: 700;
}

.station-list {
  display: grid;
  gap: 9px;
}

.station-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  text-align: left;
}

.station-row.active {
  border-color: rgba(55, 208, 255, 0.68);
  background: rgba(55, 208, 255, 0.15);
}

.station-row strong {
  display: block;
  overflow: hidden;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.station-row small {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11.5px;
  font-weight: 700;
}

.station-level {
  color: #fff;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.station-level b {
  display: block;
  font-size: 21px;
  font-weight: 800;
}

.station-level em {
  display: block;
  color: var(--status-color);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.history-card {
  padding: 16px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  padding: 4px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.11);
}

.segmented button {
  min-height: 36px;
  border-radius: 12px;
  background: transparent;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  font-weight: 800;
}

.segmented button.active {
  background: #fff;
  color: #1763e0;
}

.chart-wrap {
  margin-top: 14px;
}

.chart-wrap svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.summary-card {
  min-height: 76px;
  padding: 14px;
}

.summary-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.summary-card strong {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.bridge-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.bridge-stat {
  min-height: 82px;
  padding: 13px 8px;
  text-align: center;
}

.bridge-stat strong {
  display: block;
  color: #fff;
  font-size: 26px;
  font-weight: 800;
}

.bridge-stat span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
}

.bridge-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.bridge-card {
  padding: 14px;
}

.bridge-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.bridge-card strong {
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.bridge-card small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.bridge-times {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.bridge-time {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px 11px;
  border-radius: 14px;
  background: rgba(0, 16, 50, 0.16);
}

.bridge-time span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  font-weight: 700;
}

.bridge-time b {
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.settings-card {
  padding: 4px 18px 18px;
}

.setting-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  gap: 12px;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.setting-row:last-child {
  border-bottom: 0;
}

.setting-row strong {
  display: block;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.setting-row span {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.35;
}

.toggle {
  position: relative;
  width: 50px;
  height: 30px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.toggle::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.24);
  content: "";
  transition: transform 0.18s ease;
}

.toggle.on {
  background: var(--green);
}

.toggle.on::after {
  transform: translateX(20px);
}

.range-block {
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.range-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.range-label b {
  color: #fff;
  font-size: 13px;
}

input[type="range"] {
  width: 100%;
  height: 6px;
  margin: 12px 0 5px;
  border-radius: 999px;
  accent-color: var(--cyan);
  background: rgba(255, 255, 255, 0.24);
}

.range-scale {
  display: flex;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.45);
  font-size: 10px;
  font-weight: 700;
}

.profile-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 18px;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.avatar svg {
  width: 30px;
  height: 30px;
}

.profile-card strong {
  display: block;
  overflow: hidden;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-card span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.info-list {
  display: grid;
  margin-top: 12px;
  padding: 3px 16px;
}

.info-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 50px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-row:last-child {
  border-bottom: 0;
}

.info-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.info-row strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 9px var(--green);
}

.empty-state,
.error-state {
  padding: 18px;
  text-align: center;
}

.empty-state strong,
.error-state strong {
  display: block;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.empty-state p,
.error-state p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.primary-action,
.ghost-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  margin-top: 12px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 800;
}

.primary-action {
  background: #fff;
  color: #1763e0;
}

.ghost-action {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.bottom-nav {
  position: absolute;
  z-index: 35;
  right: 14px;
  bottom: calc(14px + var(--safe-bottom));
  left: 14px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  min-height: 68px;
  padding: 7px 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 25px;
  background: rgba(6, 17, 38, 0.91);
  box-shadow: 0 18px 42px rgba(0, 20, 68, 0.45);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

.bottom-nav button {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 0;
  padding: 4px 2px;
  border-radius: 17px;
  background: transparent;
  color: rgba(255, 255, 255, 0.46);
}

.bottom-nav button.active {
  color: var(--green);
}

.bottom-nav svg {
  width: 22px;
  height: 22px;
}

.bottom-nav span {
  overflow: hidden;
  max-width: 100%;
  font-size: 9.5px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer {
  position: absolute;
  z-index: 60;
  inset: 0;
  pointer-events: none;
  visibility: hidden;
}

.drawer.open {
  pointer-events: auto;
  visibility: visible;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 7, 22, 0.44);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.drawer.open .drawer-backdrop {
  opacity: 1;
}

.drawer-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(315px, 86vw);
  padding: calc(24px + var(--safe-top)) 16px calc(22px + var(--safe-bottom));
  background: rgba(7, 17, 34, 0.96);
  box-shadow: 22px 0 50px rgba(0, 0, 0, 0.35);
  transform: translateX(-105%);
  transition: transform 0.22s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.drawer.open .drawer-panel {
  transform: translateX(0);
}

.drawer-brand {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.drawer-brand > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: var(--cyan);
}

.drawer-brand strong {
  display: block;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.drawer-brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
}

.drawer-items {
  display: grid;
  gap: 8px;
}

.drawer-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border-radius: 15px;
  background: transparent;
  color: rgba(255, 255, 255, 0.68);
  text-align: left;
}

.drawer-item.active {
  background: rgba(55, 208, 255, 0.15);
  color: #fff;
}

.drawer-item span:last-child {
  font-size: 13px;
  font-weight: 800;
}

.drawer-footer {
  position: absolute;
  right: 16px;
  bottom: calc(18px + var(--safe-bottom));
  left: 16px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 11px;
  font-weight: 700;
}

.toast {
  position: absolute;
  z-index: 90;
  right: 18px;
  bottom: calc(96px + var(--safe-bottom));
  left: 18px;
  min-height: 44px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(7, 17, 34, 0.94);
  color: #fff;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.32);
  font-size: 12px;
  font-weight: 750;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.offline-page {
  align-items: center;
  min-height: 100dvh;
  padding: 24px;
  background:
    radial-gradient(110% 72% at 50% -10%, rgba(106, 190, 255, 0.58), transparent 54%),
    linear-gradient(180deg, #1c64e6 0%, #317ff3 48%, #1746b8 100%);
}

.offline-shell {
  width: min(100%, 360px);
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  background: rgba(6, 17, 38, 0.82);
  box-shadow: var(--shadow), inset 1px 1px 0 rgba(255, 255, 255, 0.1);
  text-align: center;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

.offline-shell img {
  display: block;
  margin: 0 auto 16px;
}

.offline-shell h1 {
  margin: 0;
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.offline-shell p {
  margin: 10px 0 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
}

.skeleton {
  position: relative;
  overflow: hidden;
  min-height: 18px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
}

.skeleton::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  animation: shimmer 1.2s infinite;
  content: "";
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

@media (max-width: 360px) {
  .screen {
    padding-right: 14px;
    padding-left: 14px;
  }

  .metrics-grid,
  .bridge-grid {
    gap: 8px;
  }

  .bottom-nav span {
    font-size: 8.8px;
  }
}

@media (min-width: 700px) {
  body {
    align-items: center;
    min-height: 100dvh;
  }

  .app-shell {
    min-height: min(100dvh, 900px);
    height: min(100dvh, 900px);
    border-radius: 32px;
  }
}
