html,
body {
  overscroll-behavior: none;
}

body {
  background-color: #0b0f1a;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

* {
  scroll-behavior: smooth;
}

.pwa-install-cta {
  position: fixed;
  right: 14px;
  bottom: calc(86px + env(safe-area-inset-bottom));
  z-index: 1040;
  border: 1px solid rgba(69, 215, 255, 0.45);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(11, 22, 41, 0.96), rgba(6, 13, 26, 0.97));
  color: #e8f3ff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.48rem 0.62rem;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
}

.pwa-install-cta:hover,
.pwa-install-cta:focus {
  color: #fff;
  border-color: rgba(69, 215, 255, 0.7);
}

.pwa-install-close {
  border: 0;
  border-radius: 999px;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: #a9c8ff;
  font-size: 0.7rem;
  line-height: 1;
}

.pwa-ios-hint {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(88px + env(safe-area-inset-bottom));
  width: min(92vw, 360px);
  z-index: 1040;
  border: 1px solid rgba(255, 204, 74, 0.42);
  border-radius: 12px;
  background: linear-gradient(150deg, rgba(18, 26, 44, 0.97), rgba(10, 16, 30, 0.97));
  color: #f3f7ff;
  padding: 0.7rem 0.8rem;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.45);
}

.pwa-ios-hint-title {
  margin: 0 0 0.25rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.pwa-ios-hint-copy {
  margin: 0;
  font-size: 0.76rem;
  color: #c8d8f6;
}

.pwa-ios-hint-dismiss {
  margin-top: 0.45rem;
  border: 1px solid rgba(120, 160, 238, 0.44);
  background: rgba(8, 15, 30, 0.85);
  color: #dce9ff;
  border-radius: 8px;
  font-size: 0.72rem;
  padding: 0.3rem 0.56rem;
}

@media (max-width: 768px) {
  main {
    padding-bottom: 76px;
  }

  .pwa-install-cta {
    bottom: calc(94px + env(safe-area-inset-bottom));
    right: 10px;
    font-size: 0.74rem;
  }
}

.app-shell-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 1100;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.45rem;
  border-radius: 14px;
  border: 1px solid rgba(113, 149, 231, 0.3);
  background: linear-gradient(145deg, rgba(8, 16, 30, 0.95), rgba(4, 10, 20, 0.92));
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(10px);
}

.app-shell-nav-btn {
  border: 1px solid rgba(103, 140, 220, 0.35);
  background: rgba(9, 20, 40, 0.86);
  color: #ddecff;
  text-decoration: none;
  border-radius: 10px;
  padding: 0.38rem 0.55rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  min-height: 34px;
}

.app-shell-nav-btn:hover,
.app-shell-nav-btn:focus {
  color: #fff;
  border-color: rgba(124, 205, 255, 0.76);
}

.app-shell-nav-btn.is-active {
  border-color: rgba(124, 205, 255, 0.96);
  background: rgba(26, 74, 136, 0.72);
  color: #fff;
}

@media (display-mode: standalone) {
  body {
    padding-bottom: 76px;
  }

  .pwa-install-cta,
  .pwa-ios-hint {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .app-shell-nav {
    width: min(95vw, 500px);
    justify-content: space-between;
    gap: 0.35rem;
  }

  .app-shell-nav-btn {
    flex: 1 1 auto;
    justify-content: center;
    padding: 0.38rem 0.4rem;
    min-width: 0;
  }

  .app-shell-nav-btn span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
