:root {
  --bg: #0f0e0c;
  --paper: #fcfbf7;
  --paper-soft: rgba(252, 251, 247, 0.96);
  --ink: #121212;
  --muted: rgba(255, 255, 255, 0.84);
  --green: #25f462;
  --telegram: #27a7e7;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Avenir Next", "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: white;
  background:
    radial-gradient(circle at 18% 22%, rgba(178, 139, 92, 0.4), transparent 32%),
    radial-gradient(circle at 82% 42%, rgba(255, 126, 77, 0.24), transparent 34%),
    linear-gradient(180deg, #1b1712 0%, #070706 100%);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Local Preview Variant Switcher Bar */
.preview-switcher {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 14px;
  background: rgba(14, 14, 16, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(14px);
  max-width: calc(100vw - 16px);
}

.preview-switcher[hidden] {
  display: none;
}

.preview-group {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: center;
}

.pv-btn,
.pv-lang {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.88);
  padding: 6px 10px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 140ms ease;
}

.pv-btn:hover,
.pv-lang:hover {
  background: rgba(255, 255, 255, 0.18);
}

.pv-btn.is-active {
  background: var(--green);
  color: #041d0c;
  border-color: var(--green);
}

.pv-lang.is-active {
  background: var(--telegram);
  color: #fff;
  border-color: var(--telegram);
}

.shell {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 0 20px;
  isolation: isolate;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -2;
  filter: blur(26px);
  opacity: 0.5;
  transform: scale(1.06);
  transition: background-image 350ms ease;
}

.ambient-left {
  background: url("./hero-v2-420.jpg") center / cover no-repeat;
}

.ambient-right {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.74));
}

.shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.8), transparent 30%, transparent 70%, rgba(0, 0, 0, 0.8)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.65));
}

.phone-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: min(100vw, 420px);
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #1e1915;
}

.backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 16%;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 380ms ease, transform 3800ms ease-out;
  pointer-events: none;
}

.backdrop.is-active {
  opacity: 1;
  transform: scale(1);
}

/* Veil keeps top 58% crystal-clear so face & outfit are 100% unobstructed! */
.veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.52) 0%,
      rgba(0, 0, 0, 0.0) 14%,
      rgba(0, 0, 0, 0.0) 54%,
      rgba(10, 9, 8, 0.82) 74%,
      rgba(8, 8, 7, 0.96) 100%
    );
}

/* Top Instagram Story Header */
.story-top {
  position: relative;
  z-index: 3;
  padding: max(12px, env(safe-area-inset-top) + 10px) 14px 0;
}

body.has-preview-bar .story-top {
  padding-top: 66px;
}

.story-bars {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 5px;
  margin-bottom: 10px;
}

.story-seg {
  display: block;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  overflow: hidden;
  cursor: pointer;
}

.story-seg i {
  display: block;
  width: 0%;
  height: 100%;
  background: #fff;
  border-radius: 999px;
}

.story-seg.is-active i {
  width: 100%;
}

.story-user-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mini-avatar-wrap {
  position: relative;
  flex: 0 0 38px;
}

.mini-avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  object-fit: cover;
  object-position: 50% 18%;
  border: 2px solid var(--green);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

.mini-dot {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
  border: 2px solid #111;
}

.story-user-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
}

.story-name-line {
  display: flex;
  align-items: center;
  gap: 5px;
}

.story-name-line strong {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.verified-badge {
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border-radius: 999px;
  background: var(--telegram);
  color: #fff;
  font-size: 9.5px;
  font-weight: 900;
}

.story-status-line {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.88);
}

.online-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 10px rgba(37, 244, 98, 0.95);
}

.sep {
  opacity: 0.55;
}

.top-tg-pill {
  margin-left: auto;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(18, 18, 20, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none;
}

/* Variant Panels (anchored at bottom so face & chest are 100% clear) */
.variant-panel {
  display: none;
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding: 0 16px;
  width: 100%;
  flex-direction: column;
  align-items: center;
}

.variant-panel.is-active {
  display: flex;
  animation: fadeUp 240ms ease-out;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   VARIANT 1 STYLES: Incoming DM Bubble + Voice + CTA + Chips
   ========================================================= */
.chat-bubble-wrap {
  width: 100%;
  max-width: 382px;
}

.typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  margin-bottom: 6px;
  border-radius: 999px;
  background: rgba(20, 19, 18, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(8px);
}

.typing-dots {
  display: inline-flex;
  gap: 3px;
}

.typing-dots i {
  width: 4.5px;
  height: 4.5px;
  border-radius: 999px;
  background: var(--green);
  animation: typingBounce 1.2s infinite ease-in-out;
}

.typing-dots i:nth-child(2) { animation-delay: 0.18s; }
.typing-dots i:nth-child(3) { animation-delay: 0.36s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
  40% { transform: translateY(-3px); opacity: 1; }
}

.incoming-card {
  width: 100%;
  padding: 12px 14px;
  border-radius: 18px 18px 18px 6px;
  background: rgba(18, 17, 16, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(14px);
}

.incoming-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  font-size: 11px;
}

.incoming-label {
  color: var(--green);
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.incoming-time {
  color: rgba(255, 255, 255, 0.52);
}

.incoming-text {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.32;
  color: rgba(255, 255, 255, 0.96);
}

.media-teasers {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 7px;
  margin-top: 9px;
}

.voice-teaser,
.private-photo-teaser {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  text-decoration: none;
  font-size: 11.5px;
  font-weight: 600;
}

.voice-play {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border-radius: 999px;
  background: var(--telegram);
  color: #fff;
  font-size: 9px;
}

.voice-bars {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  height: 14px;
}

.voice-bars i {
  display: block;
  width: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.82);
  animation: waveBar 1.3s infinite ease-in-out;
}

.voice-bars i:nth-child(odd) { height: 7px; }
.voice-bars i:nth-child(even) { height: 13px; animation-delay: 0.25s; }

@keyframes waveBar {
  0%, 100% { transform: scaleY(0.65); opacity: 0.65; }
  50% { transform: scaleY(1.15); opacity: 1; }
}

.voice-duration {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.78);
}

.private-photo-teaser {
  background: linear-gradient(135deg, rgba(255, 94, 126, 0.25), rgba(39, 167, 231, 0.25));
  border-color: rgba(255, 255, 255, 0.24);
  justify-content: center;
}

.dm-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 382px;
  margin: 11px auto 0;
  padding: 14px 17px;
  color: var(--ink);
  text-decoration: none;
  background: var(--paper-soft);
  border: 2px solid rgba(37, 244, 98, 0.72);
  border-radius: 999px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5), 0 0 22px rgba(37, 244, 98, 0.26);
}

.dm-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  color: #001808;
  background: var(--green);
  border-radius: 999px;
  font-size: 16px;
  font-weight: 900;
}

.dm-copy {
  display: grid;
  gap: 2px;
  flex: 1;
  text-align: left;
}

.dm-copy strong {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.1;
}

.dm-copy small {
  color: rgba(0, 0, 0, 0.72);
  font-size: 12px;
}

.dm-arrow {
  font-size: 17px;
  font-weight: 800;
  color: #111;
}

.quick-replies {
  width: 100%;
  max-width: 382px;
  margin-top: 8px;
}

.quick-chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.quick-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.96);
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  backdrop-filter: blur(8px);
}

/* =========================================================
   VARIANT 2 STYLES: Evening Date POV + 3 Interactive Choices
   ========================================================= */
.v2-card {
  width: 100%;
  max-width: 382px;
  padding: 15px;
  border-radius: 22px;
  background: rgba(16, 15, 14, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(16px);
}

.v2-badge-row {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.v2-live-tag {
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(255, 102, 133, 0.22);
  border: 1px solid rgba(255, 120, 148, 0.48);
  color: #ffd6df;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.v2-question {
  margin: 0 0 12px;
  text-align: center;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
}

.v2-choices {
  display: grid;
  gap: 8px;
}

.v2-choice {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  text-decoration: none;
  transition: transform 140ms ease, background 140ms ease;
}

.v2-choice-primary {
  background: var(--paper-soft);
  color: #111;
  border: 2px solid var(--green);
  box-shadow: 0 8px 24px rgba(37, 244, 98, 0.24);
}

.v2-emoji {
  font-size: 19px;
}

.v2-choice-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  text-align: left;
}

.v2-choice-text strong {
  font-size: 14px;
  font-weight: 800;
}

.v2-choice-text small {
  font-size: 11.5px;
  opacity: 0.72;
}

.v2-go {
  font-weight: 900;
  font-size: 15px;
}

/* =========================================================
   VARIANT 3 STYLES: Locked Private Photo + Unread Telegram
   ========================================================= */
.v3-stack {
  width: 100%;
  max-width: 382px;
  display: grid;
  gap: 11px;
}

.v3-unlock-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(17, 18, 22, 0.86);
  border: 1px solid rgba(39, 167, 231, 0.45);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(14px);
  color: #fff;
  text-decoration: none;
}

.v3-circle-wrap {
  position: relative;
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  border-radius: 999px;
  padding: 2px;
  background: linear-gradient(135deg, #25f462, #27a7e7);
  box-shadow: 0 0 18px rgba(39, 167, 231, 0.45);
}

.v3-circle-thumb {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
  object-position: 50% 20%;
  display: block;
}

.v3-play-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--telegram);
  border: 2px solid #111;
  color: #fff;
  font-size: 9px;
  display: grid;
  place-items: center;
}

.v3-unlock-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
}

.v3-unread-pill {
  display: inline-block;
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(37, 244, 98, 0.2);
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.v3-unlock-copy strong {
  font-size: 14.5px;
  line-height: 1.22;
}

.v3-unlock-copy span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.76);
}

.v3-main-btn {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #27a7e7 0%, #1684c7 100%);
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 14px 36px rgba(22, 132, 199, 0.48);
  color: #fff;
  text-decoration: none;
}

.v3-tg-circle {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 999px;
  background: #fff;
  color: #1684c7;
  font-size: 17px;
  font-weight: 900;
}

.v3-btn-copy {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.v3-btn-copy strong {
  font-size: 16.5px;
  font-weight: 800;
}

.v3-btn-copy small {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.88);
}

/* Footer & Bottom Bar */
.fineprint {
  position: relative;
  z-index: 2;
  padding: 12px 0 max(82px, env(safe-area-inset-bottom) + 74px);
  display: flex;
  justify-content: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
}

.fineprint a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bottom-bar {
  position: fixed;
  z-index: 5;
  right: max(16px, calc((100vw - 420px) / 2 + 16px));
  bottom: max(12px, env(safe-area-inset-bottom) + 8px);
  left: max(16px, calc((100vw - 420px) / 2 + 16px));
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  max-width: 392px;
  margin: 0 auto;
  padding: 10px 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 13px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(14px);
}

.brand-mark {
  position: relative;
  width: 24px;
  height: 24px;
}

.brand-mark span {
  position: absolute;
  width: 12px;
  height: 12px;
}

.mark-a {
  top: 0;
  left: 0;
  background: #1c1c22;
}

.mark-b {
  right: 0;
  bottom: 0;
  background: #27a7e7;
}

.bottom-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.bottom-copy strong {
  font-size: 16px;
  letter-spacing: -0.4px;
}

.bottom-copy small {
  font-size: 10.5px;
  font-weight: 700;
  color: #138a36;
}

.bottom-bar a {
  padding: 10px 18px;
  color: white;
  text-decoration: none;
  background: #0f0f10;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 800;
}

.legal-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}

.legal-modal[hidden] {
  display: none;
}

.legal-dialog {
  width: min(100%, 360px);
  padding: 18px;
  border-radius: 16px;
  background: #1c1b19;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  line-height: 1.45;
}

.legal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.legal-head button {
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  cursor: pointer;
}

@media (max-width: 460px) {
  .shell {
    padding: 0;
  }

  .phone-card {
    width: 100vw;
    box-shadow: none;
  }

  .bottom-bar {
    right: 12px;
    left: 12px;
  }
}
