/* Mini app "AI Girls": viola notte con sfumature rosa-viola (stile app AI companion), foto a tutta altezza,
   Outfit per titoli e nomi, Plus Jakarta Sans per il testo. Un unico tema scuro, con Telegram chiaro o scuro. */
:root {
  --night: #120a22;      /* fondo: viola notte */
  --velvet: #1f1338;     /* superfici */
  --seam: #352355;       /* linee e bordi */
  --pearl: #f8f2ff;      /* testo principale */
  --mist: #b9a8d8;       /* testo secondario */
  --pink: #ff4fa3;       /* rosa */
  --violet: #8b5cf6;     /* viola */
  --champagne: #ff8fcf;  /* accento chiaro (pillole, dettagli) */
  --glow: linear-gradient(135deg, #ff4fa3 0%, #c04df0 52%, #7c5cff 100%);
  --bubble: #2a1a4a;     /* bolla di lei */
  --display: "Outfit", "Plus Jakarta Sans", system-ui, sans-serif;
  --text: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--night); }
body {
  margin: 0; min-height: 100vh;
  background: radial-gradient(120% 60% at 100% 0%, rgba(192, 77, 240, .22), transparent 60%),
              radial-gradient(90% 50% at 0% 100%, rgba(255, 79, 163, .14), transparent 60%), var(--night);
  background-attachment: fixed; color: var(--pearl);
  font: 400 16px/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
h1 { font: 700 30px/1.1 var(--display); margin: 0 0 10px; letter-spacing: -0.02em; }
p { margin: 0 0 12px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--champagne); outline-offset: 3px; }

.view { max-width: 520px; margin: 0 auto; padding: 18px 20px 104px; }
.view.center {
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
  text-align: center; padding-bottom: 40px;
}
.logo { border-radius: 20px; margin: 0 auto 18px; }
.soft { color: var(--mist); }

.spinner {
  width: 30px; height: 30px; margin: 0 auto; border-radius: 50%;
  border: 2px solid var(--seam); border-top-color: var(--champagne); animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Pulsante principale: pieno color perla, come un'etichetta */
.cta {
  display: flex; align-items: center; justify-content: center; width: 100%;
  min-height: 54px; padding: 14px 22px; margin-top: 14px;
  border: 0; border-radius: 999px; background: var(--glow); color: #fff;
  font: 700 16.5px/1.2 var(--text); text-decoration: none; cursor: pointer;
  box-shadow: 0 10px 28px -10px rgba(255, 79, 163, .65);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.cta:active { transform: scale(0.97); box-shadow: 0 4px 14px -8px rgba(255, 79, 163, .7); }

.ai-pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  background: rgba(255, 79, 163, .12); border: 1px solid rgba(255, 143, 207, .45); color: var(--champagne);
  font-size: 12.5px; font-weight: 600;
}

/* ---------- Galleria ---------- */
.gallery { padding-left: 0; padding-right: 0; }
.mast { display: flex; align-items: center; justify-content: space-between; padding: 0 20px; }
.mark { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15px; }
.mark img { border-radius: 8px; }
.lead { font-size: 30px; margin: 20px 20px 16px; max-width: 14ch; }
.banner {
  margin: 0 20px 14px; padding: 10px 14px; border-radius: 14px;
  background: var(--velvet); border: 1px solid var(--seam); color: var(--mist); font-size: 14px;
}

/* Le ragazze scorrono di lato, una alla volta, con la successiva che si intravede */
.deck {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 0 20px 4px; scroll-padding: 0 20px; scrollbar-width: none;
}
.deck::-webkit-scrollbar { display: none; }
/* Scheda: foto pulita in alto (sopra solo nome e città), sotto su fondo suo la bolla e i pulsanti */
.portrait {
  position: relative; flex: 0 0 84%; display: flex; flex-direction: column; scroll-snap-align: start;
  border-radius: 26px; overflow: hidden; background: var(--velvet); border: 1px solid var(--seam);
  cursor: pointer; padding: 0; text-align: left; color: var(--pearl);
}
.portrait .ph { position: relative; flex: none; height: clamp(220px, calc(100vh - 500px), 440px); }
.portrait .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.portrait .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18, 10, 34, 0) 55%, rgba(18, 10, 34, .88) 100%); }
.portrait .cap { position: absolute; left: 16px; right: 16px; bottom: 12px; }
.portrait h2 { font: 700 34px/1 var(--display); margin: 0 0 3px; letter-spacing: -0.02em; }
.portrait .where { color: rgba(248, 242, 255, .85); font-size: 13.5px; margin: 0; }
.portrait .meta { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 14px; }
.portrait .bubble { font-size: 14px; max-width: 100%; background: var(--bubble); }
.portrait .bubble span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.portrait .cta { margin-top: 2px; min-height: 46px; font-size: 15.5px; }
.portrait .cta2 { margin-top: 0; min-height: 40px; font-size: 13.5px; }

/* Ancora non disponibile: niente foto finta, solo il nome */
.portrait.soon {
  display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: default;
  background: var(--velvet); border: 1px solid var(--seam); text-align: center;
}
.portrait.soon h2 { color: var(--mist); }
.portrait.soon span { color: var(--mist); font-size: 14.5px; }

.pager { display: flex; justify-content: center; gap: 6px; margin: 14px 0 0; }
.pager i { width: 6px; height: 6px; border-radius: 99px; background: var(--seam); transition: width 0.25s var(--ease), background 0.25s; }
.pager i.on { width: 22px; background: var(--glow); }

.note { margin: 22px 20px 0; font-size: 13px; color: var(--mist); max-width: 46ch; }

/* Bolla: il vero primo messaggio di lei, come in chat */
.bubble {
  position: relative; display: inline-block; margin: 0;
  padding: 10px 14px; border-radius: 18px 18px 18px 6px;
  background: var(--bubble); color: var(--pearl); line-height: 1.45;
  box-shadow: inset 0 0 0 1px rgba(248, 242, 255, 0.07);
}

/* ---------- Profilo ---------- */
.profile { padding: 0 0 150px; }
.hero { position: relative; height: 58vh; min-height: 360px; background: var(--velvet); }
.slides {
  display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.slides::-webkit-scrollbar { display: none; }
.slides img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; scroll-snap-align: start; }
.hero::after {  /* sfuma la foto nel foglio sotto */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30%; pointer-events: none;
  background: linear-gradient(180deg, rgba(18, 10, 34, 0), var(--night));
}
/* Segmenti in alto, come nelle storie: quante foto e quale stai guardando */
.bars { position: absolute; z-index: 2; top: 12px; left: 14px; right: 14px; display: flex; gap: 5px; }
.bars i { flex: 1; height: 3px; border-radius: 3px; background: rgba(248, 242, 255, 0.3); transition: background 0.25s; }
.bars i.on { background: var(--pearl); }
.back {
  position: absolute; z-index: 2; top: 26px; left: 14px; padding: 7px 14px; border: 0; border-radius: 999px;
  background: rgba(18, 10, 34, 0.55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--pearl); font-size: 14px; cursor: pointer;
}
.tg .back { display: none; }  /* dentro Telegram c'è il suo pulsante Indietro */

.sheet { position: relative; z-index: 1; margin-top: -64px; padding: 0 22px; }
.name { font-size: 46px; line-height: 1; margin: 0 0 6px; letter-spacing: -0.025em; }
.sheet .where { color: var(--mist); margin: 0 0 12px; }
.about { margin: 16px 0 22px; font-size: 16.5px; max-width: 40ch; }
.msg { margin: 0 0 22px; }
.msg-head { color: var(--mist); font-size: 13.5px; margin: 0 0 8px; }
.perks { list-style: none; padding: 0; margin: 0; }
.perks li { display: flex; gap: 12px; padding: 13px 0; border-top: 1px solid var(--seam); font-size: 15.5px; }

.dock {
  position: fixed; z-index: 5; left: 0; right: 0; bottom: 0;
  padding: 22px 20px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(18, 10, 34, 0) 0, var(--night) 20px);
}
.dock .cta { max-width: 480px; margin: 0 auto; }

/* ---------- Más +18 ---------- */
.disclosure {
  padding: 12px 14px; border-radius: 16px; background: var(--velvet); border: 1px solid var(--seam);
  color: var(--mist); font-size: 14px;
}
.offer {
  margin: 14px 0; padding: 16px; border-radius: 22px; background: var(--velvet); border: 1px solid var(--seam);
}
.offer img { display: block; width: 100%; max-width: 320px; margin: 0 auto 14px; border-radius: 14px; }
.offer h2 { font: 700 21px/1.2 var(--display); margin: 0 0 6px; }
.offer p { color: var(--mist); font-size: 14.5px; margin: 0 0 4px; }
.offer .paid { color: var(--champagne); font-size: 13px; }
.offer .cta { min-height: 48px; font-size: 16px; }

/* ---------- Privacidad ---------- */
.prose p { color: var(--mist); font-size: 15px; max-width: 46ch; }

/* ---------- Barra in basso ---------- */
.tabs {
  position: fixed; z-index: 5; left: 50%; transform: translateX(-50%);
  bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex; gap: 4px; padding: 5px; border-radius: 999px;
  background: rgba(31, 19, 56, 0.85); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--seam);
}
.tabs button {
  min-width: 92px; min-height: 40px; padding: 8px 14px; border: 0; border-radius: 999px;
  background: none; color: var(--mist); font-size: 14.5px; font-weight: 500; cursor: pointer;
}
.tabs button.on { background: var(--glow); color: #fff; }

/* ---------- Fluidità ---------- */
/* solo dissolvenza: un transform sulla schermata sposterebbe i pulsanti fissati in basso */
.enter { animation: enter .3s var(--ease) both; }
@keyframes enter { from { opacity: 0; } to { opacity: 1; } }
.portrait .ph img, .slides img, .shot { opacity: 0; transition: opacity .4s var(--ease); }
.portrait .ph img.ok, .slides img.ok, .shot.ok { opacity: 1; }
.portrait { transition: transform .2s var(--ease); }
.portrait:active { transform: scale(.985); }
.row { animation: pop .26s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
#v-offers .note { margin-left: 0; margin-right: 0; }

/* ---------- 18+ prima della chat ---------- */
.consent {
  text-align: left; font-size: 14px; color: var(--mist); background: var(--velvet);
  border: 1px solid var(--seam); border-radius: 16px; padding: 12px 14px; margin: 14px 0 4px;
}
.ghost, .link {
  display: block; width: 100%; margin-top: 10px; padding: 12px; border: 0; background: none;
  color: var(--mist); font-size: 15px; cursor: pointer;
}
.ghost { border: 1px solid var(--seam); border-radius: 999px; }
.dock .link { max-width: 480px; margin: 4px auto 0; padding: 8px; font-size: 14px; }

/* ---------- Chat ---------- */
.chat {
  display: flex; flex-direction: column; max-width: 560px; margin: 0 auto;
  height: var(--tg-viewport-stable-height, 100vh); height: var(--tg-viewport-height, 100dvh);
}
.chat-top {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-bottom: 1px solid var(--seam); background: rgba(18, 10, 34, .9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.chat-back { border: 0; background: none; color: var(--pearl); font-size: 30px; line-height: 1; padding: 0 6px 4px 0; cursor: pointer; }
.tg .chat-back { display: none; }
.avatar { border-radius: 50%; object-fit: cover; object-position: 50% 15%; }
.who { display: flex; flex-direction: column; align-items: flex-start; flex: 1; min-width: 0;
  border: 0; background: none; padding: 0; text-align: left; cursor: pointer; }
.who b { font: 700 18px/1.15 var(--display); }
.who span { color: var(--champagne); font-size: 12px; }
.meter { display: block; width: 92px; height: 4px; margin-top: 4px; border-radius: 4px; background: var(--seam); overflow: hidden; }
.meter > i { display: block; height: 100%; width: 0; background: var(--glow); border-radius: 4px; transition: width .6s var(--ease); }
.meter.big { width: 100%; height: 8px; margin: 10px 0 8px; }
.chat-icon { border: 0; background: none; font-size: 20px; padding: 4px; cursor: pointer; }
.chat-tg {
  border: 1px solid var(--seam); border-radius: 999px; background: none; color: var(--mist);
  font-size: 12.5px; padding: 6px 11px; cursor: pointer; white-space: nowrap;
}
.thread { flex: 1; overflow-y: auto; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; }
.row.me { justify-content: flex-end; }
.row .bubble { max-width: 82%; white-space: pre-wrap; overflow-wrap: anywhere; }
.row.me .bubble { background: var(--glow); color: #fff; border-radius: 18px 18px 6px 18px; box-shadow: none; }
.row.sys .bubble { background: none; border: 1px solid var(--seam); color: var(--mist); border-radius: 14px; max-width: 100%; }
.shot { display: block; max-width: 72%; border-radius: 18px; }
.typing .bubble { display: inline-flex; gap: 4px; padding: 13px 14px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--mist); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.offer-card {
  align-self: stretch; margin: 6px 0; padding: 14px; border-radius: 18px;
  background: var(--velvet); border: 1px solid rgba(255, 143, 207, .4); font-size: 14px; color: var(--mist); white-space: pre-wrap;
}
.offer-card .cta { min-height: 44px; font-size: 15px; margin-top: 10px; }
.composer {
  display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--seam); background: rgba(18, 10, 34, .92);
}
.composer textarea {
  flex: 1; resize: none; max-height: 120px; padding: 11px 16px; border-radius: 22px;
  border: 1px solid var(--seam); background: var(--velvet); color: var(--pearl); font: 400 16px/1.35 var(--text);
}
.composer textarea:focus { outline: none; border-color: var(--pink); }
.send {
  flex: 0 0 44px; height: 44px; border: 0; border-radius: 50%; background: var(--glow); color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.send[disabled] { opacity: .45; }

/* Risposte pronte sopra la casella: scenari per iniziare e "mandami una foto" */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 6px 12px 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button {
  flex: 0 0 auto; padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(255, 143, 207, .4);
  background: rgba(255, 79, 163, .1); color: var(--pearl); font-size: 14px; cursor: pointer;
  transition: transform .15s var(--ease), background .15s;
}
.chips button:active { transform: scale(.96); background: rgba(255, 79, 163, .22); }

/* Cosa lei ricorda di te */
.level-card { padding: 16px; border-radius: 20px; background: var(--velvet); border: 1px solid var(--seam); margin: 6px 0 18px; }
.level-card b { font: 700 20px/1.2 var(--display); }
.level-card span { color: var(--mist); font-size: 14px; }
.facts { list-style: none; padding: 0; margin: 0 0 10px; }
.facts li { padding: 12px 0; border-top: 1px solid var(--seam); font-size: 15.5px; }
.facts li::before { content: "💭"; margin-right: 10px; }
.view:not(.gallery) .note { margin-left: 0; margin-right: 0; }

/* 👍/👎 sotto la risposta di lei */
.votes { display: flex; gap: 6px; margin: -2px 0 2px 6px; }
.votes button {
  border: 1px solid var(--seam); background: none; border-radius: 999px; padding: 3px 10px;
  font-size: 13px; cursor: pointer; opacity: .75; transition: opacity .15s, background .15s, transform .15s;
}
.votes button:active { transform: scale(.92); }
.votes button.on { opacity: 1; background: rgba(255, 79, 163, .18); border-color: rgba(255, 143, 207, .5); }
.votes.done button:not(.on) { display: none; }

/* Album delle foto ricevute */
.sub { font: 700 19px/1.2 var(--display); margin: 26px 0 10px; }
.album { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.album button { padding: 0; border: 0; border-radius: 12px; overflow: hidden; aspect-ratio: 3 / 4; background: var(--velvet); cursor: pointer; }
.album img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; display: block; }
.viewer {
  position: fixed; z-index: 20; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(10, 5, 20, .94); animation: enter .2s var(--ease) both;
}
.viewer img { max-width: 100%; max-height: 100%; object-fit: contain; }
#m-album-note { margin-top: 10px; }

/* Vocale di lei */
.voice { display: flex; align-items: center; gap: 10px; min-width: 210px; }
.voice .play {
  flex: 0 0 38px; height: 38px; border: 0; border-radius: 50%; background: var(--glow); color: #fff;
  font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.voice .track { flex: 1; height: 4px; border-radius: 4px; background: var(--seam); overflow: hidden; }
.voice .track i { display: block; height: 100%; width: 0; background: var(--glow); }
.voice .dur { color: var(--mist); font-size: 12.5px; min-width: 34px; text-align: right; }
.vtext { display: block; margin-top: 6px; border: 0; background: none; color: var(--champagne); font-size: 12.5px; padding: 0; cursor: pointer; }
.vtext + p { margin: 6px 0 0; color: var(--mist); font-size: 14px; }

/* Menu della chat */
.sheet-bg { position: fixed; z-index: 15; inset: 0; background: rgba(10, 5, 20, .6); display: flex; align-items: flex-end; animation: enter .2s var(--ease) both; }
.sheet-box {
  width: 100%; max-width: 560px; margin: 0 auto; padding: 10px 12px calc(14px + env(safe-area-inset-bottom));
  background: var(--velvet); border-radius: 24px 24px 0 0; border-top: 1px solid var(--seam);
  animation: up .26s var(--ease) both;
}
@keyframes up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-box button {
  display: block; width: 100%; padding: 14px 12px; border: 0; border-bottom: 1px solid var(--seam);
  background: none; color: var(--pearl); font-size: 16px; text-align: left; cursor: pointer;
}
.sheet-box button.cancel { border: 0; color: var(--mist); text-align: center; }

/* Schede delle piattaforme partner */
.offer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.offer-head h2 { margin: 0; font: 700 24px/1.15 var(--display); letter-spacing: -0.01em; }
.feats { list-style: none; padding: 0; margin: 0 0 4px; }
.feats li { position: relative; padding: 5px 0 5px 24px; color: var(--pearl); font-size: 15px; }
.feats li::before { content: "✓"; position: absolute; left: 2px; color: var(--pink); font-weight: 700; }
.offer .aff { margin: 8px 0 0; font-size: 12px; color: var(--mist); text-align: center; }
.meta .aff, .dock .aff { margin: 6px 0 0; font-size: 11px; line-height: 1.35; color: var(--mist); text-align: center; }
.legal { display: flex; gap: 18px; margin-top: 18px; }
.legal a { color: var(--pearl); font-size: 14px; }
.shot-fig { margin: 0 0 12px; }
.shot-fig img { display: block; width: 100%; border-radius: 14px; }
.shot-fig figcaption { margin-top: 6px; font-size: 12px; color: var(--mist); }

/* Pulsante verso il sito partner (solo 18+ confermati): secondario, sotto "Chat with" */
.cta2 {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; margin-top: 8px;
  padding: 10px 16px; border-radius: 999px; border: 1px solid rgba(255, 143, 207, .55);
  background: rgba(18, 10, 34, .55); color: var(--pearl); font: 600 14.5px/1.2 var(--text); cursor: pointer;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.cta2:active { transform: scale(.97); }
.dock .cta2 { max-width: 480px; margin: 8px auto 0; min-height: 40px; font-size: 14px; }
.sheet .link { padding: 18px 0 0; text-align: left; font-size: 14px; }

/* Proposta in chat: banner + pulsanti diretti */
.offer-card .offer-banner { display: block; width: 100%; max-width: 320px; margin: 0 auto 10px; border-radius: 14px; }
.offer-card .offer-text { margin: 0 0 6px; font-size: 13.5px; color: var(--mist); white-space: pre-wrap; }
.offer-card .cta { margin-top: 8px; min-height: 46px; font-size: 15px; }
.offer-card .cta2 { margin-top: 8px; min-height: 42px; font-size: 14px; }
