html,
body {
  margin: 0;
  background: #000;
  -webkit-font-smoothing: antialiased;
}

/* The document never scrolls: #app is the only scroller, like a native view.
   This removes Safari's rubber-band and sideways drift on narrow phones. */
html,
body {
  height: 100%;
  overflow: hidden;
}

#app {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: none;
}

#app > * {
  max-width: 100vw;
}

#app > * {
  flex: none;
}

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

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
}

input {
  font: inherit;
}
input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.no-scrollbar {
  scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Motion */
@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes sheet-up {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}
@keyframes message-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes marquee {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-33.3333%, 0, 0);
  }
}

.fade-in {
  animation: fade-in 0.2s ease;
}
.pop-in {
  animation: pop-in 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.pop-in--top-right {
  transform-origin: top right;
}
.pop-in--bottom-right {
  transform-origin: bottom right;
}
.sheet-up {
  animation: sheet-up 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.message-in {
  animation: message-in 0.22s ease;
}

.marquee {
  animation: marquee 48s linear infinite;
  animation-delay: -4s;
  will-change: transform;
  backface-visibility: hidden;
}
.marquee-card {
  transform: translateZ(0);
  backface-visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .marquee {
    animation: none;
  }
}

/* Native feel: no rubber-band, no tap flashes, no accidental selection or zoom */
html,
body {
  overflow-x: hidden;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

img {
  -webkit-user-drag: none;
}

input {
  font-size: 16px !important;
  -webkit-user-select: text;
  user-select: text;
}

/* Inner scrollers keep their own axis only, so a vertical swipe over a card row still scrolls the page. */
[style*='overflow-x: auto'] {
  overscroll-behavior-x: contain;
}
[style*='overflow-y: auto'] {
  overscroll-behavior-y: contain;
}

a,
button {
  transition: opacity 0.15s ease;
}

a:active,
button:active {
  opacity: 0.7;
}

/* Screen transitions: push forward, slide back, fade between tabs */
@keyframes push-in {
  from {
    opacity: 0.4;
    transform: translate3d(36%, 0, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes slide-back {
  from {
    opacity: 0.4;
    transform: translate3d(-24%, 0, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

#app > * {
  animation: fade-in 0.18s ease;
}
#app[data-nav='push'] > * {
  animation: push-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
#app[data-nav='back'] > * {
  animation: slide-back 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Bottom tab bar */
.tabbar {
  position: fixed;
  left: 50%;
  z-index: 50;
  width: min(430px, 100vw);
  transform: translateX(-50%);
  font-family:
    'SF Pro Text',
    'SF Pro',
    -apple-system,
    BlinkMacSystemFont,
    Roboto,
    'Helvetica Neue',
    Arial,
    sans-serif;
}

.tabbar[hidden] {
  display: none;
}

.tabbar {
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  padding: 56px 24px max(24px, calc(10px + env(safe-area-inset-bottom)));
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.55) 35%,
    rgba(0, 0, 0, 0.85) 70%,
    rgba(0, 0, 0, 0.92) 100%
  );
  pointer-events: none;
}

.tabbar > * {
  pointer-events: auto;
}

.tabbar__nav {
  display: flex;
  gap: 2px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #00a89d;
  box-shadow: 0 2px 42px rgba(0, 0, 0, 0.1);
}

.tabbar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 45px;
  height: 40px;
  color: #f8fafc;
  font-size: 11px;
  line-height: 13px;
  letter-spacing: -0.43px;
  opacity: 0.56;
}

.tabbar__item svg {
  height: 27px;
}

.tabbar__item.is-active {
  opacity: 1;
}

.tabbar__avatar {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  box-shadow: 0 2px 21px rgba(0, 0, 0, 0.1);
}

.tabbar__avatar.is-active {
  box-shadow: 0 0 0 2px #fff;
}

.tabbar__avatar img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
