/* Mobile PWA app shell (/app/*) ------------------------------------ */
.app-body {
  min-height: 100dvh;
  background:
    radial-gradient(ellipse 80% 40% at 50% -10%, rgba(255, 31, 143, .16), transparent 60%),
    radial-gradient(ellipse 60% 30% at 100% 20%, rgba(43, 182, 255, .10), transparent 55%),
    var(--ink);
  color: var(--mist);
  padding-bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .55rem 1rem;
  padding-top: max(.55rem, env(safe-area-inset-top, 0px));
  background: rgba(6, 7, 10, .88);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.app-topbar__brand { display: flex; align-items: center; flex-shrink: 0; }
.app-topbar__logo {
  height: 42px;
  width: auto;
  display: block;
  filter: drop-shadow(0 6px 14px rgba(43, 182, 255, .35));
}

.app-live-pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  max-width: 55%;
  padding: .35rem .7rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--pop-soft);
  background: rgba(255, 31, 143, .12);
  border: 1px solid rgba(255, 31, 143, .4);
}
.app-live-pill--off {
  color: var(--mist-3);
  background: rgba(255, 255, 255, .04);
  border-color: var(--line);
}
.app-live-pill__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--pop);
  box-shadow: 0 0 0 0 rgba(255, 31, 143, .55);
  animation: app-pulse 1.8s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes app-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 31, 143, .55); }
  70%  { box-shadow: 0 0 0 8px rgba(255, 31, 143, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 31, 143, 0); }
}

.app-main {
  padding: 1.25rem 1rem 1.5rem;
  max-width: 560px;
  margin-inline: auto;
}

.app-flash { margin-bottom: .75rem; display: grid; gap: .4rem; }

/* Home ------------------------------------------------------------- */
.app-home__hero { margin-bottom: 1.5rem; }
.app-kicker {
  font-size: .75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mist-3);
  margin-bottom: .5rem;
}
.app-home h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 14vw, 4rem);
  line-height: .9;
  letter-spacing: .02em;
  margin: 0 0 .75rem;
}
.app-home__lede {
  color: var(--mist-2);
  font-size: 1.05rem;
  line-height: 1.45;
  max-width: 34ch;
}
.app-actions {
  display: grid;
  gap: .75rem;
  margin: 1.5rem 0;
}
.app-action {
  display: grid;
  gap: .2rem;
  padding: 1.15rem 1.2rem;
  border-radius: var(--radius-lg);
  background: var(--ink-2);
  border: 1px solid var(--line-2);
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, transform .15s ease;
}
.app-action:hover { border-color: rgba(43, 182, 255, .45); transform: translateY(-1px); }
.app-action--pop {
  background: linear-gradient(135deg, rgba(255, 31, 143, .22), rgba(43, 182, 255, .14));
  border-color: rgba(255, 31, 143, .45);
}
.app-action__label {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--mist);
}
.app-action__hint { color: var(--mist-3); font-size: .88rem; }
.app-home__user,
.app-home__fullsite {
  color: var(--mist-3);
  font-size: .9rem;
  margin-top: 1rem;
}
.app-home__user a,
.app-home__fullsite a { color: var(--brand-soft); }

/* Shared page chrome ---------------------------------------------- */
.app-page__head { margin-bottom: 1.1rem; }
.app-page__head h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 9vw, 2.8rem);
  line-height: .95;
  margin: 0 0 .4rem;
}
.app-page__head p { color: var(--mist-2); margin: 0; font-size: .98rem; }
.app-hint { font-size: .85rem !important; margin-top: .65rem !important; }
.app-search { margin-bottom: .25rem; }
.app-request-form {
  margin-top: 1.25rem !important;
  max-width: none !important;
}
.app-submit { width: 100%; justify-content: center; }

/* Bottom tab bar --------------------------------------------------- */
.app-tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .25rem;
  padding: .45rem .5rem;
  padding-bottom: max(.45rem, env(safe-area-inset-bottom, 0px));
  background: rgba(6, 7, 10, .94);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-top: 1px solid var(--line);
}
.app-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .15rem;
  padding: .45rem .25rem;
  border-radius: 12px;
  text-decoration: none;
  color: var(--mist-3);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
}
.app-tab.is-active {
  color: var(--mist);
  background: rgba(255, 31, 143, .12);
}
.app-tab__icon { display: flex; line-height: 0; }

/* Install banner --------------------------------------------------- */
.app-install {
  position: fixed;
  left: 50%;
  bottom: calc(4.9rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 45;
  width: min(420px, calc(100% - 2rem));
  padding: .85rem 1rem;
  border: 1px solid rgba(43, 182, 255, .45);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(43, 182, 255, .2), rgba(255, 31, 143, .18));
  color: var(--mist);
  font: inherit;
  font-weight: 700;
  font-size: .92rem;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}
.app-install[hidden] { display: none !important; }

/* Desktop: keep the app usable but still phone-first -------------- */
@media (min-width: 720px) {
  .app-topbar__logo { height: 52px; }
  .app-main { padding-top: 1.75rem; }
}
