:root {
  color-scheme: light;
  --pink: #fe2c55;
  --ink: #161823;
  font-family: Arial, Helvetica, sans-serif;
  background: #0d0e10;
  color: white;
}
* { box-sizing: border-box; }
body { margin: 0; }
body:has(dialog[open]) { overflow: hidden; }
button, a { font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button { border: 0; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid #1599d3; outline-offset: 3px; }
.feed {
  max-width: 34rem;
  margin: auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: black;
}
header { display: flex; align-items: center; gap: 10px; min-height: 84px; padding: 12px 16px; }
.avatar { display: grid; place-items: center; background: black; border-radius: 50%; }
.avatar span {
  font: bold 12px/1 Arial, sans-serif;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  background: linear-gradient(#329dcb, #1875a9);
  color: white;
  border: 1px solid #b6b6b6;
  box-shadow: inset 0 0 0 1px white;
}
.small, .profile-pic { width: 48px; height: 48px; flex: none; }
.identity { display: grid; gap: 6px; font-size: .95rem; }
.identity span { font-size: .875rem; }
.open-app, .watch-profile, .watch { color: white; background: var(--pink); font-weight: 600; }
.open-app { margin-left: auto; padding: 10px 16px; border-radius: 24px; }
.video {
  flex: 1;
  min-height: 270px;
  position: relative;
  background: linear-gradient(0deg, #000 0%, transparent 58%), url("city.jpg") center 47% / cover;
}
.play { position: absolute; inset: 0; width: 100%; color: white; background: transparent; font-size: 2.5rem; }
.play span { filter: drop-shadow(0 1px 8px #0008); }
.rail { position: absolute; bottom: 17px; right: 10px; display: grid; gap: 14px; justify-items: center; pointer-events: none; }
.rail > div { display: grid; justify-items: center; gap: 4px; font-weight: 600; font-size: .875rem; }
.creator { position: relative; background: #180b10; border: 1px solid white; border-radius: 50%; width: 44px; height: 44px; align-items: center; font: bold 22px Georgia, serif !important; margin-bottom: 5px; }
.creator span { position: absolute; bottom: -7px; background: var(--pink); border-radius: 50%; font: bold 15px/17px Arial; width: 17px; text-align: center; }
.heart, .share { font: bold 35px/1 Arial; }
.bubble { border-radius: 50%; background: white; color: #292929; font: bold 14px/23px Arial; letter-spacing: 1px; width: 28px; text-align: center; }
.caption { position: absolute; bottom: 15px; left: 13px; pointer-events: none; }
.caption strong { font-size: 1.1rem; }
.caption p { margin: 10px 0; }
.profile { color: var(--ink); background: white; padding: 18px 16px 12px; display: grid; grid-template-columns: 20% 1fr; gap: 0 10px; border-radius: 18px 18px 0 0; }
.profile-pic { background: #f7f7f7; border-radius: 4px; }
.details { min-width: 0; }
.details p { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #54565d; margin: 7px 0; font-size: .875rem; }
dl { display: flex; justify-content: space-between; margin: 9px 0 0; }
dl div { display: flex; flex-direction: column-reverse; }
dt { font-size: .8125rem; color: #666; }
dd { margin: 0; font-weight: 600; }
.watch-profile, .watch { height: 48px; border-radius: 8px; }
.watch-profile { grid-column: 1 / -1; }
dialog { border: 0; background: transparent; padding: 48px 0 0; width: min(79.5%, 390px); max-width: none; max-height: 100dvh; color: var(--ink); margin: auto; transform: translateY(-24px); }
dialog::backdrop { background: rgb(0 0 0 / 90%); }
.card { position: relative; text-align: center; padding: 60px 20px 12px; background: white; border-radius: 9px; }
.badge { position: absolute; left: 50%; top: 0; transform: translate(-50%, -50%); width: 96px; height: 96px; border: 4px solid white; }
h1 { margin: 0; font-size: clamp(1.05rem, 5.1vw, 1.375rem); line-height: 1.25; font-weight: 700; }
.card p { color: #101010; margin: 17px 0 23px; font-size: clamp(.875rem, 3.6vw, 1rem); line-height: 1.3; }
.watch, .dismiss { width: 100%; display: grid; place-items: center; }
.watch { font-size: 1rem; }
.watch:hover, .open-app:hover, .watch-profile:hover { background: #ed2049; }
.dismiss { margin-top: 7px; height: 40px; background: transparent; color: #111; border-radius: 8px; }
.dismiss:hover { background: #f6f6f7; }
.watch:focus-visible { outline-offset: -4px; outline-color: white; }
@media (max-width: 350px) { dialog { width: 88%; } .card { padding-inline: 14px; } }
@media (max-height: 420px) { dialog { transform: none; } .card { padding-top: 47px; } .badge { width: 78px; height: 78px; } }

.watch[hidden] { display: none; }
.app-invite { display: block; }
.card:has(#sharing:not([hidden])) .app-invite { display: none; }
.card:has(#sharing:not([hidden])) #watch-description { margin: 13px 0 4px; }
.card #sharing-note {
  margin: 8px auto 16px;
  color: #3c3c43;
  font-size: .875rem;
  line-height: 1.3;
  text-wrap: pretty;
}
@media (max-height: 420px) {
  dialog { overscroll-behavior: contain; }
}
.watch[aria-busy="true"] { opacity: .75; cursor: wait; }
#sharing-status:not(:empty) { display: block; font-size: .875rem; line-height: 1.4; margin-top: 12px; }
#continue-video:not([hidden]) { display: block; margin-top: 12px; font-size: .875rem; line-height: 1.4; color: #175dab; text-decoration: underline; }
