* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  font-family: Arial, Helvetica, sans-serif;
  color: #fff;
}
.app {
  position: relative;
  width: 100%;
  height: 100dvh;
  min-height: 100vh;
  background: #000;
  overflow: hidden;
}
.offer-hit {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #111;
}
.shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.12) 0%,
    transparent 35%,
    rgba(0, 0, 0, 0.12) 58%,
    rgba(0, 0, 0, 0.78) 100%
  );
  z-index: 3;
}
.top {
  position: absolute;
  z-index: 5;
  top: max(14px, env(safe-area-inset-top));
  left: 0;
  right: 0;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  font-weight: 700;
  text-shadow: 0 1px 3px #000;
}
.top .dim {
  opacity: 0.72;
}
.search {
  position: absolute;
  right: max(18px, env(safe-area-inset-right));
  top: 8px;
  width: 26px;
  height: 26px;
}
.bottom-copy {
  position: absolute;
  z-index: 5;
  left: 14px;
  right: 84px;
  bottom: calc(126px + env(safe-area-inset-bottom));
  text-shadow: 0 1px 3px #000;
}
.author {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: 16px;
}
.verified {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}
.caption {
  font-size: 14px;
  line-height: 1.35;
  margin-top: 8px;
}
.music {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  font-size: 13px;
}
.music svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
}
.cta {
  position: absolute;
  z-index: 9;
  left: 14px;
  right: 76px;
  bottom: calc(70px + env(safe-area-inset-bottom));
  height: 46px;
  border: 0;
  border-radius: 8px;
  background: rgba(254, 44, 85, 0.98);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  text-align: center;
}
.rail {
  position: absolute;
  z-index: 7;
  right: max(12px, env(safe-area-inset-right));
  bottom: calc(92px + env(safe-area-inset-bottom));
  width: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.rail button {
  border: 0;
  background: none;
  color: #fff;
  padding: 0;
  cursor: pointer;
  text-shadow: 0 1px 3px #000;
}
.rail svg {
  width: 34px;
  height: 34px;
  display: block;
}
.profile-wrap {
  position: relative;
}
.avatar {
  width: 48px;
  height: 48px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: linear-gradient(145deg, #777, #222);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 17px;
}
.follow {
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fe2c55;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 0, 0, 0.2);
}
.follow svg {
  width: 12px;
  height: 12px;
}
.metric {
  font-size: 12px;
  font-weight: 700;
  margin-top: 5px;
}
.disc {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, #222 0 3px, #0b0b0b 4px 7px);
  border: 7px solid #222;
  display: grid;
  place-items: center;
  animation: spin 4s linear infinite;
}
.disc:after {
  content: "";
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #aaa;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.nav {
  position: absolute;
  z-index: 8;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(62px + env(safe-area-inset-bottom));
  padding: 5px 14px env(safe-area-inset-bottom);
  background: #050505;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
  align-items: start;
  text-align: center;
}
.nav-item {
  font-size: 10px;
  color: #fff;
  opacity: 0.96;
}
.nav-item svg {
  display: block;
  margin: 0 auto 3px;
  width: 25px;
  height: 25px;
}
.create {
  position: relative;
  width: 48px;
  height: 30px;
  margin: 0 auto 3px;
}
.create:before,
.create:after,
.create .core {
  content: "";
  position: absolute;
  top: 0;
  width: 39px;
  height: 28px;
  border-radius: 8px;
}
.create:before {
  left: 0;
  background: #25f4ee;
}
.create:after {
  right: 0;
  background: #fe2c55;
}
.create .core {
  left: 4.5px;
  background: #fff;
  z-index: 2;
  display: grid;
  place-items: center;
}
.create svg {
  width: 16px;
  height: 16px;
  margin: 6px auto;
}
.sheet-backdrop {
  position: absolute;
  z-index: 19;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: 0.25s;
}
.sheet {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  bottom: 0;
  height: 65%;
  background: #171717;
  border-radius: 14px 14px 0 0;
  transform: translateY(105%);
  transition: transform 0.3s ease;
  padding: 10px 16px calc(18px + env(safe-area-inset-bottom));
  color: #fff;
}
.sheet.open {
  transform: translateY(0);
}
.sheet-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.grab {
  width: 38px;
  height: 4px;
  border-radius: 4px;
  background: #555;
  margin: 0 auto 10px;
}
.sheet-head {
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  padding-bottom: 14px;
  border-bottom: 1px solid #2b2b2b;
}
.close {
  position: absolute;
  right: 15px;
  top: 11px;
  width: 28px;
  height: 28px;
  border: 0;
  background: none;
  color: #fff;
  padding: 2px;
  cursor: pointer;
}
.close svg {
  width: 24px;
  height: 24px;
  display: block;
}
.comment {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  padding: 15px 0;
  border-bottom: 1px solid #242424;
}
.c-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(145deg, #777, #292929);
  display: grid;
  place-items: center;
  font-weight: 800;
}
.c-name {
  font-size: 13px;
  color: #aaa;
  font-weight: 700;
}
.c-text {
  font-size: 14px;
  line-height: 1.35;
  margin-top: 4px;
}
.c-time {
  font-size: 12px;
  color: #777;
  margin-top: 6px;
}
.comment-thread {
  border-bottom: 1px solid #242424;
  padding: 6px 0;
}
.comment-thread > .comment {
  border-bottom: 0;
  padding-bottom: 8px;
}
.replies {
  margin-left: 48px;
  border-left: 2px solid #2d2d2d;
  padding-left: 12px;
}
.reply {
  grid-template-columns: 34px 1fr;
  padding: 8px 0;
  border-bottom: 0;
}
.reply .c-avatar {
  width: 30px;
  height: 30px;
}
.reply .c-text {
  font-size: 13px;
}
.reply .c-name {
  font-size: 12px;
}
.reply .c-time {
  font-size: 11px;
}
.reply-label {
  font-size: 11px;
  color: #777;
  margin-bottom: 2px;
}
.lead-sheet {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 78%;
  overflow: auto;
  background: #171717;
  border-radius: 16px 16px 0 0;
  transform: translateY(105%);
  transition: transform 0.3s ease;
  padding: 10px 18px calc(22px + env(safe-area-inset-bottom));
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
}
.lead-sheet.open {
  transform: translateY(0);
}
.lead-title {
  font-size: 22px;
  font-weight: 850;
  margin: 8px 36px 5px 0;
}
.lead-sub {
  font-size: 14px;
  line-height: 1.4;
  color: #aaa;
  margin-bottom: 18px;
}
.lead-row {
  margin: 12px 0;
}
.lead-label {
  display: block;
  font-size: 12px;
  color: #aaa;
  margin: 0 0 6px 2px;
}
.lead-input-wrap {
  display: flex;
  align-items: center;
  background: #272727;
  border: 1px solid #3b3b3b;
  border-radius: 10px;
  overflow: hidden;
}
.dial {
  padding: 0 10px 0 13px;
  font-size: 14px;
  font-weight: 700;
  color: #ddd;
  border-right: 1px solid #444;
}
.lead-input {
  width: 100%;
  height: 48px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  padding: 0 13px;
  font-size: 16px;
}
.lead-input::placeholder {
  color: #777;
}
.lead-submit {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 10px;
  background: #fe2c55;
  color: #fff;
  font-size: 16px;
  font-weight: 850;
  margin-top: 8px;
  cursor: pointer;
}
.lead-submit:disabled {
  opacity: 0.6;
  cursor: default;
}
.lead-error {
  min-height: 18px;
  margin: 9px 2px 0;
  color: #ff6b7f;
  font-size: 12px;
}
.lead-note {
  font-size: 11px;
  line-height: 1.35;
  color: #777;
  margin-top: 10px;
}
.geo-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #252525;
  border: 1px solid #363636;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  color: #bbb;
  margin-top: 2px;
}
.avatar {
  overflow: hidden;
  display: grid;
  place-items: center;
}
.avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}
.avatar-fallback {
  display: none;
  width: 100%;
  height: 100%;
  place-items: center;
  font-size: 16px;
  font-weight: 900;
  color: #fff;
}
@media (min-width: 600px) {
  .app {
    max-width: 430px;
    margin: auto;
  }
  .rail {
    right: 14px;
  }
}
.c-avatar {
  overflow: hidden;
}
.c-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}
.like-btn .heart {
  fill: rgba(0, 0, 0, 0.18);
  stroke: #fff;
  stroke-width: 1.8;
  transition:
    transform 0.16s ease,
    fill 0.16s ease,
    stroke 0.16s ease;
}
.like-btn.liked .heart {
  fill: #fe2c55;
  stroke: #fe2c55;
}
.like-btn.liked svg {
  transform: scale(1.08);
}
.comments-scroll {
  height: calc(100% - 42px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.comments-scroll::-webkit-scrollbar {
  display: none;
}

.legal-note {
  margin: 12px 4px 2px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}
.legal-note a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-note a:hover {
  color: #fff;
}

/* Short-video interaction controls */
.sound-toggle {
  position: absolute;
  z-index: 10;
  right: 18px;
  top: calc(max(14px, env(safe-area-inset-top)) + 50px);
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.34);
  color: #fff;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.sound-toggle svg {
  width: 22px;
  height: 22px;
}
.gesture-state {
  position: absolute;
  z-index: 18;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  transition:
    opacity 0.14s ease,
    transform 0.14s ease;
  backdrop-filter: blur(2px);
}
.gesture-state.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.gesture-state svg {
  width: 30px;
  height: 30px;
}
.tap-heart {
  position: absolute;
  z-index: 18;
  width: 92px;
  height: 92px;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.35) rotate(-12deg);
  opacity: 0;
  animation: tapHeart 0.72s ease-out forwards;
}
.tap-heart svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 3px 7px rgba(0, 0, 0, 0.28));
}
@keyframes tapHeart {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.35) rotate(-12deg);
  }
  35% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.16) rotate(7deg);
  }
  65% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.98) rotate(0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -68%) scale(1.05);
  }
}
