html:has(#phone.fullscreen) { background: #141017 }
#phone.fullscreen {
  width: min(100vw, max(480px, 58dvh), 600px);
  height: 100dvh;
  aspect-ratio: auto;
  background: #18121a;
  color: #fff;
  box-shadow: none;
  --menu-height: calc(67px + env(safe-area-inset-bottom, 0px));
}
#phone.fullscreen #screen { display: none }
.fullscreen #controls { display: grid; grid-template-rows: minmax(0, 1fr) var(--menu-height) }
.feed-scroller {
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  outline-offset: -3px;
}
.feed-scroller::-webkit-scrollbar { display: none }
.feed-slide { position: relative; height: 100%; isolation: isolate; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; background: #211b25 }
.feed-slide video { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; max-height: none; border-radius: 0 }
.feed-slide::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  background: linear-gradient(0deg, #160f1b9c, #160f1b40 56%, transparent);
  pointer-events: none;
}
.feed-details {
  position: absolute;
  z-index: 1;
  left: max(17px, env(safe-area-inset-left));
  right: 72px;
  bottom: 39px;
  display: grid;
  gap: 5px;
  text-shadow: 0 1px 8px #140d19d4;
}
.feed-mood {
  margin: 0 0 2px;
  font-size: clamp(16.2px, 4.32vw, 19.44px);
  line-height: 1.48;
  font-weight: 600;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.feed-author {
  border: 0;
  padding: 0;
  background: transparent;
  color: #f4dfff;
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}
.feed-author:focus-visible { outline: 2px solid #bc89ff; outline-offset: 2px }
.feed-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 4px clamp(4px, 1.4vw, 10px);
  color: #fffd;
  font-size: clamp(10.8px, 3.24vw, 12.96px);
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}
.feed-metric { white-space: nowrap }
.feed-metric strong { color: #fff; font-weight: 750 }
.feed-profile { display: flex; align-items: center; gap: 14px; padding: 8px 3px 4px }
.feed-profile img { width: 54px; aspect-ratio: 1; border-radius: 50%; object-fit: cover; object-position: center 22% }
.feed-profile p { margin: 0; color: #55465f; font-size: 14px; line-height: 1.5 }

.feed-actions {
  position: absolute;
  z-index: 1;
  bottom: 4%;
  height: clamp(183px, 40%, 366px);
  right: max(10px, env(safe-area-inset-right));
  display: grid;
  grid-template-rows: repeat(4, minmax(0, 1fr));
  justify-items: center;
  color: #fff;
}
.feed-action, .feed-shoot {
  display: grid;
  place-items: center;
  width: 56px;
  min-height: 44px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  filter: drop-shadow(0 1px 4px #170e1c99);
  -webkit-tap-highlight-color: transparent;
}
.feed-action svg { width: 29px; height: 29px }
.feed-shoot { grid-template-columns: minmax(0, 1fr); align-content: center; gap: 5px; font-size: clamp(10px, 2.8vw, 11px); font-weight: 750; white-space: nowrap }
.feed-shoot img { width: clamp(30px, 5.2dvh, 46px); aspect-ratio: 1; object-fit: cover; object-position: center 20%; border: 2px solid white; border-radius: 10px; transform: rotate(-8deg) }
.feed-like[aria-pressed="true"] svg { color: #ff648b; fill: currentColor }
.feed-start {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid #fff6;
  border-radius: 999px;
  padding: 11px 18px;
  background: #211728cc;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.feed-start:focus-visible { outline: 2px solid #bc89ff; outline-offset: 2px }
.feed-shoot:active, .feed-action:active { transform: scale(.94) }
.feed-menu { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: #fcfcfc; padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); z-index: 2 }
.feed-menu-item { position: relative; display: grid; justify-items: center; align-content: center; gap: 2px; min-width: 0; border: 0; padding: 1px 0 0; background: none; color: #99979b; font-size: 11px; font-weight: 600; white-space: nowrap }
.feed-menu-item img { display: block; width: 32px; height: 32px; object-fit: contain }
.feed-menu-home { color: #302b36; align-content: end; padding-bottom: 7px }
.feed-menu-home img { width: 55px; height: 55px; margin-top: -16px }
.feed-menu-inbox img { width: 47px; height: 47px }
.feed-menu-item:focus-visible, .feed-shoot:focus-visible, .feed-action:focus-visible, .feed-scroller:focus-visible { outline: 2px solid #bc89ff }
#feed-panel-title { font-size: 17px; margin: 0 }
#feed-panel { border-radius: 19px; padding: 16px }
.feed-panel-note { margin: 18px 3px; color: #6a6073; font-size: 14px; line-height: 1.5 }
.feed-thread { display: grid; gap: 8px; align-content: end; min-height: 78px; max-height: min(46dvh, 320px); overflow: auto; margin-bottom: 12px }
.feed-bubble { margin: 0 0 0 auto; width: fit-content; max-width: 82%; padding: 8px 12px; background: #eee1fd; border-radius: 12px 12px 3px 12px; font-size: 14px; overflow-wrap: anywhere }
.feed-compose { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px }
.feed-compose input, .feed-compose button, .feed-thread-row { border: 0; border-radius: 12px; padding: 10px 12px; font: inherit; min-width: 0 }
.feed-compose input, .feed-thread-row { background: #efeaf8; color: #282333 }
.feed-compose button { background: #6d42ac; color: white }
.feed-thread-row { display: block; width: 100%; margin-top: 6px; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer }
@media (prefers-reduced-motion: reduce) { .feed-shoot:active, .feed-action:active { transform: none } }

.feed-tabs-overlay {
  --channel-width: min(100vw, calc(100dvh * 6 / 13), 600px);
  --channel-height: calc(var(--channel-width) * 13 / 6);
  position: absolute;
  z-index: 3;
  top: calc((100dvh - var(--channel-height)) / 2 + var(--channel-height) * .053);
  inset-inline: 0;
  margin-inline: auto;
  width: var(--channel-width);
  height: calc(var(--channel-height) * .062);
  display: grid;
  grid-template-columns: calc(var(--channel-width) * .138) calc(var(--channel-width) * .161) auto;
  align-items: center;
  justify-items: start;
  padding-inline: calc(var(--channel-width) * .044);
  white-space: nowrap;
}
.feed-tabs-overlay button {
  height: 100%;
  border: 0;
  padding: 0;
  background: none;
  color: inherit;
  font-size: calc(var(--channel-width) * .052);
  font-weight: 750;
  line-height: 1;
  touch-action: manipulation;
}
.feed-tabs-overlay button[aria-current] { font-size: calc(var(--channel-width) * .0635); font-weight: 850 }
.feed-tabs-overlay button:focus-visible { outline: 2px solid #bb8bff; outline-offset: 2px }
.feed-tabs-video { color: #fffd; text-shadow: 0 1px 7px #211728cc }
.feed-tabs-video button[aria-current] { color: #fff }
.feed-tabs-video .feed-sound {
  position: absolute;
  inset-inline-end: max(0px, calc(var(--channel-width) * .044 - 5px));
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: white;
  filter: drop-shadow(0 1px 4px #160f1b99);
}
.feed-sound svg { width: 22px; height: 22px }
.feed-sound .sound-waves, .feed-sound[data-audible="true"] .sound-off { display: none }
.feed-sound[data-audible="true"] .sound-waves { display: initial }
.feed-tabs-legacy {
  top: 5.3%;
  background: linear-gradient(108deg, #dbd1f3, #e4d6ee 58%, #e8ddeb);
  color: #786d89;
}
.feed-tabs-legacy button[aria-current] { color: #282333 }
.nearby-profiles { display: block; background: #eeeefa }
.nearby-profiles img { height: auto }
.feed-share-url { width: 100%; margin-top: 8px; padding: 10px; border: 1px solid #d8c8e9; border-radius: 8px; font: inherit }
