/* Phone-frame shell shared by Search, Upload, Plan, and Profile. */

body.page-app {
  background: #fff;
  color: #1a1a1a;
  overflow: hidden;
  height: 100%;
  font-family: "ClashDisplay", "Avenir Next", "Segoe UI", sans-serif;
}

body.page-app * {
  font-family: inherit;
}

html:has(body.page-app) {
  height: 100%;
  overflow: hidden;
}

.site-feed {
  position: relative;
  height: 100dvh;
  max-height: 100dvh;
  background: #fff;
  color: #1a1a1a;
  overflow: hidden;
}

.site-feed[hidden] {
  display: none !important;
}

.feed-stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

.feed-topbar-actions {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top, 0px));
  left: 22px;
  right: auto;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 18px;
  pointer-events: auto;
}

.feed-top-link {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  text-shadow: none;
  background: #ff6a00;
  border-radius: 999px;
  padding: 8px 14px;
}

.feed-top-link:hover {
  text-decoration: none;
  background: #e85f00;
}

.app-screen {
  position: absolute;
  inset: 0;
  overflow: auto;
  background: #000;
  color: #fff;
  padding-bottom: 24px;
}

body.page-profile .feed-stage,
body.page-profile .app-screen {
  background: #fff;
  color: #1a1a1a;
}

.site-feed .navbar {
  position: fixed;
  top: 50%;
  left: 16px;
  bottom: auto;
  height: auto;
  transform: translateY(-50%);
  z-index: 60;
}

.feed-footer {
  display: none;
}

@media (min-width: 900px) {
  .site-feed {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
  }

  .feed-stage {
    width: 390px;
    height: 761px;
    flex: none;
    transform: scale(min((100dvh - 24px) / 761px, (100dvw - 32px) / 390px));
    transform-origin: center center;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
  }
}

html:has(body.page-profile),
body.page-profile {
  height: auto;
  min-height: 100%;
  overflow: auto;
  background: #fff;
  color: #1a1a1a;
}

body.page-profile .site-feed {
  display: block;
  height: auto;
  min-height: 100dvh;
  max-height: none;
  overflow: visible;
  background: #fff;
}

body.page-profile .feed-stage,
body.page-profile .app-screen {
  position: relative;
  inset: auto;
  width: min(720px, calc(100% - 120px));
  height: auto;
  min-height: 100dvh;
  margin: 0 auto;
  transform: none;
  overflow: visible;
  background: #fff;
  color: #1a1a1a;
  box-shadow: none;
}

body.page-profile .app-screen {
  padding: 72px 0 48px;
}
