/* ==========================================================================
   Dil Ki Baat · design system v2
   Soft lavender canvas, white cards, pink → violet → indigo brand gradient.
   ========================================================================== */
[hidden] { display: none !important; }

:root {
  --bg: #F7F4FF;
  --surface: #FFFFFF;
  --surface-2: #FAF8FF;
  --ink: #17123A;
  --ink-2: #3D3666;
  --mute: #8A84A8;
  --mute-2: #B7B1CC;
  --line: #EEE9FB;

  --pink: #FF3E9A;
  --violet: #8B5CF6;
  --indigo: #5B3DF5;
  --green: #22C55E;
  --amber: #F59E0B;
  --red: #F43F5E;

  --grad: linear-gradient(135deg, #FF4FA3 0%, #A259FF 52%, #5B3DF5 100%);
  --grad-v: linear-gradient(135deg, #8B5CF6 0%, #5B3DF5 100%);
  --grad-p: linear-gradient(135deg, #FF7AB8 0%, #FF3E9A 100%);
  --soft-v: #F1ECFF;
  --soft-p: #FFE9F4;

  --r-sm: 14px;
  --r: 20px;
  --r-lg: 28px;

  --sh-sm: 0 1px 2px rgba(40, 20, 110, .05), 0 6px 16px -8px rgba(40, 20, 110, .14);
  --sh: 0 2px 4px rgba(40, 20, 110, .04), 0 16px 36px -18px rgba(40, 20, 110, .30);
  --sh-lg: 0 34px 70px -28px rgba(30, 14, 90, .55);
  --sh-brand: 0 16px 30px -14px rgba(124, 77, 255, .75);

  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.4, .64, 1);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); font-family: var(--font); overscroll-behavior-y: none; }
body { font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
input, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; -webkit-user-drag: none; user-select: none; }
::selection { background: #E4D8FF; }

#app { position: relative; min-height: 100vh; max-width: 520px; margin: 0 auto; background: var(--bg); }
@media (min-width: 560px) { body { background: #E9E2FB; } #app { box-shadow: 0 0 80px rgba(60, 30, 140, .25); } }

/* ---------------------------------------------------------------- splash */
#splash { position: fixed; inset: 0; z-index: 1000; background: #fff; display: flex; justify-content: center; transition: opacity .5s ease; }
#splash img { height: 100%; width: 100%; max-width: 520px; object-fit: cover; }
#splash.hide { opacity: 0; pointer-events: none; }

/* ---------------------------------------------------------------- layout */
/* Normal pages scroll the document itself (so the native ad can scroll with the page);
   .fixed screens (onboarding, searching, chat) fill the viewport and never scroll the document. */
.screen { position: relative; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); animation: fadeIn .3s ease both; overflow-x: clip; }
.screen.fixed { position: fixed; top: 0; right: 0; bottom: 0; left: 0; max-width: 520px; margin: 0 auto; min-height: 0; overflow: hidden; animation: screenIn .38s var(--ease) both; }
@keyframes screenIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.screen > *:not(.blob) { position: relative; z-index: 1; }
.blob { position: absolute; border-radius: 50%; pointer-events: none; z-index: 0; }
.blob-1 { width: 340px; height: 340px; top: -150px; left: -130px; background: radial-gradient(circle, rgba(178, 140, 255, .38), transparent 68%); }
.blob-2 { width: 360px; height: 360px; top: 30%; right: -200px; background: radial-gradient(circle, rgba(255, 110, 180, .22), transparent 68%); }
.scroll { flex: 1; padding: 6px 18px calc(var(--safe-b) + 108px); }
html { scrollbar-width: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; }

/* ---------------------------------------------------------------- type */
.h1 { font-size: 28px; font-weight: 800; letter-spacing: -.8px; line-height: 1.15; margin: 0; }
.sub { color: var(--mute); font-size: 14px; margin: 4px 0 0; }
.sect { display: flex; justify-content: space-between; align-items: center; margin: 24px 2px 12px; }
.sect b { font-size: 17px; font-weight: 800; letter-spacing: -.3px; }
.sect .link { color: var(--violet); font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; gap: 2px; }
.sect .link .ico { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- icons + buttons */
.ico { width: 22px; height: 22px; flex: none; }
.ib { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--ink-2); box-shadow: var(--sh-sm); flex: none; transition: transform .15s var(--ease); }
.ib:active { transform: scale(.9); }
.ib.glass { background: rgba(255, 255, 255, .2); color: #fff; box-shadow: none; border: 1px solid rgba(255, 255, 255, .3); }
.ib .ico { width: 20px; height: 20px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 54px; padding: 0 26px; border-radius: 18px; font-weight: 800; font-size: 16px; letter-spacing: -.1px; color: #fff; background: var(--grad-v); box-shadow: var(--sh-brand); transition: transform .15s var(--ease), opacity .2s, box-shadow .2s; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn .ico { width: 20px; height: 20px; }
.btn.block { width: 100%; }
.btn.brand { background: var(--grad); }
.btn.white { background: #fff; color: var(--indigo); box-shadow: 0 14px 28px -14px rgba(20, 0, 80, .55); }
.btn.ghost { background: var(--soft-v); color: var(--indigo); box-shadow: none; }
.btn.glass { background: rgba(255, 255, 255, .16); border: 1.5px solid rgba(255, 255, 255, .45); box-shadow: none; }
.btn.danger { background: linear-gradient(135deg, #FB7185, #F43F5E); box-shadow: 0 14px 26px -14px rgba(244, 63, 94, .7); }
.btn.sm { height: 40px; font-size: 14px; padding: 0 16px; border-radius: 13px; }
.btn[disabled] { opacity: .45; pointer-events: none; box-shadow: none; }

.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; margin-left: 6px; flex: none; }
.tag.ai { background: linear-gradient(135deg, #FFF3C4, #FFE08A); color: #8A5A00; }
.tag.live { background: #DCFCE7; color: #15803D; }
.tag.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

/* ---------------------------------------------------------------- avatars */
.av { position: relative; display: grid; place-items: center; border-radius: 50%; flex: none; color: #fff; background: var(--grad-v); box-shadow: 0 0 0 2.5px #fff, 0 6px 14px -6px rgba(60, 30, 140, .5); }
.av > img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.av > svg { width: 58%; height: 58%; }
.av.a2 { background: linear-gradient(135deg, #A78BFA, #6D28D9); } .av.a3 { background: linear-gradient(135deg, #FF8CC6, #FF3E9A); }
.av.a4 { background: linear-gradient(135deg, #5EEAD4, #0D9488); } .av.a5 { background: linear-gradient(135deg, #FCD34D, #F59E0B); }
.av.a6 { background: linear-gradient(135deg, #93C5FD, #2563EB); } .av.a7 { background: linear-gradient(135deg, #FDBA74, #EA580C); }
.av .on { position: absolute; right: 0; bottom: 0; width: 28%; height: 28%; min-width: 10px; min-height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 2.5px #fff; }

/* ---------------------------------------------------------------- onboarding */
.ob { background: radial-gradient(120% 70% at 50% 0%, #EDE4FF 0%, var(--bg) 60%); }
.ob-top { display: flex; justify-content: space-between; align-items: center; padding: calc(var(--safe-t) + 14px) 22px 0; height: 56px; }
.ob-top .step { font-size: 13px; font-weight: 800; color: var(--mute); letter-spacing: .5px; }
.ob-top .skip { font-weight: 800; color: var(--violet); font-size: 14px; padding: 8px 4px; }
.ob-art { flex: 1; min-height: 200px; display: grid; place-items: center; position: relative; }
.ob-art .halo { position: absolute; width: 270px; height: 270px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .95) 0%, rgba(237, 228, 255, .9) 45%, transparent 70%); }
.ob-art img, .ob-art svg { position: relative; max-height: 220px; max-width: 78%; width: auto; filter: drop-shadow(0 22px 26px rgba(91, 61, 245, .25)); animation: floaty 4.5s ease-in-out infinite alternate; }
@keyframes floaty { from { transform: translateY(0); } to { transform: translateY(-9px); } }
.ob-text { padding: 0 28px; text-align: center; }
.ob-text .logo { height: 50px; width: auto; margin: 0 auto 8px; }
.ob-text .tagline { display: inline-block; margin: 0 0 12px; padding: 6px 14px; border-radius: 999px; background: #fff; box-shadow: var(--sh-sm); font-weight: 800; font-size: 13px; color: var(--indigo); }
.ob-text .h1 { margin-bottom: 8px; }
.ob-text p { margin: 0 auto; color: var(--ink-2); max-width: 300px; font-size: 15.5px; }
.consent { display: flex; gap: 12px; align-items: flex-start; text-align: left; background: #fff; border-radius: var(--r); padding: 14px; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); max-width: 360px; margin: 18px auto 0; box-shadow: var(--sh-sm); cursor: pointer; }
.consent input { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--mute-2); flex: none; margin: 0; display: grid; place-items: center; transition: all .15s; }
.consent input:checked { background: var(--grad-v); border-color: transparent; }
.consent input:checked::after { content: ""; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }
.consent a { color: var(--indigo); font-weight: 800; text-decoration: none; }
.ob-foot { padding: 20px 24px calc(var(--safe-b) + 24px); display: grid; gap: 18px; justify-items: center; }
.dots { display: flex; gap: 7px; }
.dots i { width: 7px; height: 7px; border-radius: 6px; background: #D9CEF8; transition: all .3s var(--ease); }
.dots i.on { width: 26px; background: var(--grad-v); }

/* ---------------------------------------------------------------- header / nav */
.top { display: flex; align-items: center; gap: 10px; padding: calc(var(--safe-t) + 12px) 18px 4px; }
.top .logo { height: 30px; width: auto; }
.top .grow { flex: 1; }
.hello { padding: 12px 2px 0; }
.hello .h1 { font-size: 25px; }
.nav { margin: 0 12px calc(var(--safe-b) + 10px); height: 66px; background: #fff; border-radius: 24px; box-shadow: 0 12px 30px -12px rgba(40, 20, 110, .32), 0 0 0 1px rgba(40, 20, 110, .04); display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px; flex: none; }
.nav button { display: grid; place-items: center; align-content: center; gap: 3px; border-radius: 18px; font-size: 11px; font-weight: 800; color: var(--mute); transition: color .2s, background .25s; }
.nav button .ico { width: 23px; height: 23px; }
.nav button.on { color: var(--indigo); background: var(--soft-v); }

/* ---------------------------------------------------------------- home */
.hero { position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 22px 20px 20px; color: #fff; background: var(--grad); box-shadow: 0 24px 44px -22px rgba(124, 77, 255, .85); margin-top: 16px; isolation: isolate; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; z-index: -1; }
.hero::before { width: 260px; height: 260px; right: -90px; top: -110px; background: rgba(255, 255, 255, .14); }
.hero::after { width: 180px; height: 180px; left: -70px; bottom: -100px; background: rgba(255, 255, 255, .1); }
.hero .pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: rgba(255, 255, 255, .2); font-size: 11.5px; font-weight: 800; letter-spacing: .3px; }
.hero .pill i { width: 7px; height: 7px; border-radius: 50%; background: #7CFFB2; animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(124, 255, 178, .7); } 70%, 100% { box-shadow: 0 0 0 7px rgba(124, 255, 178, 0); } }
.hero h2 { margin: 12px 0 6px; font-size: 24px; font-weight: 800; letter-spacing: -.7px; line-height: 1.12; max-width: 56%; }
.hero p { margin: 0 0 18px; font-size: 14px; opacity: .92; max-width: 54%; }
.hero .btn { position: relative; z-index: 2; }
.hero .art { position: absolute; right: -4px; bottom: 62px; width: 44%; max-width: 196px; z-index: 1; filter: drop-shadow(0 14px 18px rgba(30, 0, 90, .35)); animation: floaty 4s ease-in-out infinite alternate; }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.q { background: var(--surface); border-radius: var(--r); padding: 16px 8px 14px; display: grid; justify-items: center; gap: 9px; font-weight: 800; font-size: 13px; line-height: 1.2; text-align: center; box-shadow: var(--sh-sm); transition: transform .15s var(--ease); }
.q:active { transform: scale(.96); }
.tile { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; color: #fff; flex: none; }
.tile .ico { width: 24px; height: 24px; }
.t-pink { background: linear-gradient(135deg, #FF8CC6, #FF3E9A); box-shadow: 0 10px 18px -10px rgba(255, 62, 154, .8); }
.t-violet { background: linear-gradient(135deg, #A78BFA, #6D4AFF); box-shadow: 0 10px 18px -10px rgba(109, 74, 255, .8); }
.t-green { background: linear-gradient(135deg, #4ADE80, #0EA371); box-shadow: 0 10px 18px -10px rgba(14, 163, 113, .8); }
.t-blue { background: linear-gradient(135deg, #7DB4FF, #3B6CFF); box-shadow: 0 10px 18px -10px rgba(59, 108, 255, .8); }
.t-amber { background: linear-gradient(135deg, #FCD34D, #F59E0B); box-shadow: 0 10px 18px -10px rgba(245, 158, 11, .8); }
.t-red { background: linear-gradient(135deg, #FB7185, #F43F5E); box-shadow: 0 10px 18px -10px rgba(244, 63, 94, .8); }
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -18px; padding: 2px 18px 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 9px 15px; border-radius: 999px; background: var(--surface); box-shadow: var(--sh-sm); font-weight: 700; font-size: 13.5px; color: var(--ink-2); transition: transform .15s; }
.chip:active { transform: scale(.95); }
.chip.on { background: rgba(255, 255, 255, .22); color: #fff; box-shadow: none; border: 1px solid rgba(255, 255, 255, .4); }
.tip { display: flex; gap: 12px; align-items: center; background: linear-gradient(135deg, #FFFFFF, #F6F1FF); border-radius: var(--r); padding: 14px; box-shadow: var(--sh-sm); margin-top: 18px; }
.tip b { display: block; font-size: 14px; } .tip small { color: var(--mute); font-size: 12.5px; }
.tip .tile { width: 42px; height: 42px; border-radius: 14px; }

/* ---------------------------------------------------------------- searching */
.search { background: var(--grad); color: #fff; align-items: center; text-align: center; padding: calc(var(--safe-t) + 20px) 20px calc(var(--safe-b) + 24px); }
.search::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 40% at 50% 34%, rgba(255, 255, 255, .25), transparent 70%); }
.orbit { position: relative; width: 230px; height: 230px; margin: auto auto 26px; display: grid; place-items: center; }
.orbit .ring { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .55); opacity: 0; animation: ripple 3s ease-out infinite; }
.orbit .ring:nth-child(2) { animation-delay: 1s; } .orbit .ring:nth-child(3) { animation-delay: 2s; }
@keyframes ripple { 0% { transform: scale(.35); opacity: .9; } 100% { transform: scale(1.15); opacity: 0; } }
.orbit .me { width: 104px; height: 104px; border-radius: 50%; background: rgba(255, 255, 255, .22); display: grid; place-items: center; box-shadow: 0 0 0 12px rgba(255, 255, 255, .1); }
.orbit .spin { position: absolute; inset: 6px; animation: spin 10s linear infinite; }
.orbit .sat { position: absolute; width: 42px; height: 42px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 19px; box-shadow: 0 10px 20px -8px rgba(30, 0, 90, .5); animation: spin 10s linear infinite reverse; }
.orbit .s1 { top: -8px; left: calc(50% - 21px); } .orbit .s2 { bottom: 20px; left: 0; } .orbit .s3 { bottom: 20px; right: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.search h2 { margin: 0; font-size: 25px; font-weight: 800; letter-spacing: -.6px; }
.search .tipline { margin: 8px auto 0; max-width: 290px; min-height: 42px; opacity: .92; font-size: 14.5px; transition: opacity .3s; }
.search .timer { display: inline-block; margin-top: 12px; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .18); font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums; }
.search .bottom { margin-top: auto; width: 100%; display: grid; justify-items: center; }

/* ---------------------------------------------------------------- chat */
.chathead { display: flex; align-items: center; gap: 10px; padding: calc(var(--safe-t) + 10px) 12px 10px; background: #fff; box-shadow: 0 1px 0 var(--line), 0 10px 24px -20px rgba(40, 20, 110, .5); z-index: 3; }
.chathead .back { width: 36px; height: 38px; display: grid; place-items: center; color: var(--ink); margin-right: -4px; }
.chathead .who { flex: 1; min-width: 0; line-height: 1.25; }
.chathead .who b { display: flex; align-items: center; font-size: 16.5px; font-weight: 800; }
.chathead .who b span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chathead .who small { display: block; color: var(--green); font-weight: 700; font-size: 12.5px; }
.chathead .who small.st-typing { color: var(--violet); }
.chathead .who small.st-off { color: var(--mute); }
.chathead .acts { display: flex; gap: 6px; }
.chathead .acts .ib { width: 38px; height: 38px; box-shadow: none; background: var(--soft-v); color: var(--indigo); }
.chathead .acts .ib .ico { width: 19px; height: 19px; }

.msgs { flex: 1; overflow-y: auto; padding: 10px 14px 14px; display: flex; flex-direction: column; background-color: var(--bg); background-image: radial-gradient(rgba(139, 92, 246, .08) 1.2px, transparent 1.2px); background-size: 18px 18px; scrollbar-width: none; }
.msgs::-webkit-scrollbar { display: none; }
.intro { align-self: center; text-align: center; margin: 14px 0 12px; display: grid; justify-items: center; gap: 4px; max-width: 300px; }
.intro b { font-size: 17px; font-weight: 800; margin-top: 8px; display: flex; align-items: center; }
.intro span { font-size: 13px; color: var(--mute); }
.intro .note { margin-top: 8px; background: #FFF7DB; color: #8A5A00; border: 1px solid #F8E3A3; border-radius: 14px; padding: 8px 12px; font-size: 12.5px; font-weight: 600; }
.sys { align-self: center; text-align: center; font-size: 12px; font-weight: 700; color: var(--mute); background: #fff; padding: 6px 14px; border-radius: 999px; margin: 14px 0 4px; box-shadow: var(--sh-sm); }

.b { position: relative; max-width: 80%; padding: 9px 13px 6px; border-radius: 20px; margin-top: 10px; overflow-wrap: anywhere; animation: bubbleIn .28s var(--spring) both; font-size: 15px; line-height: 1.42; }
@keyframes bubbleIn { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
.b.cont { margin-top: 3px; }
.b .meta { display: flex; justify-content: flex-end; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 600; margin-top: 1px; opacity: .72; }
.b .meta svg { width: 15px; height: 15px; }
.b.them { align-self: flex-start; background: #fff; color: var(--ink); border-bottom-left-radius: 6px; box-shadow: var(--sh-sm); }
.b.me { align-self: flex-end; color: #fff; background: var(--grad-v); border-bottom-right-radius: 6px; box-shadow: 0 10px 20px -14px rgba(91, 61, 245, .9); }
.b.them.grouped { border-bottom-left-radius: 20px; } .b.them.cont { border-top-left-radius: 8px; }
.b.me.grouped { border-bottom-right-radius: 20px; } .b.me.cont { border-top-right-radius: 8px; }
.b.pending { opacity: .65; }
.typing { align-self: flex-start; background: #fff; padding: 13px 16px; border-radius: 20px; border-bottom-left-radius: 6px; display: flex; gap: 5px; margin-top: 10px; box-shadow: var(--sh-sm); animation: bubbleIn .25s var(--spring); }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--violet); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .18s; } .typing i:nth-child(3) { animation-delay: .36s; }
@keyframes blink { 0%, 60%, 100% { transform: translateY(0); opacity: .35; } 30% { transform: translateY(-4px); opacity: 1; } }

.composer { background: #fff; padding: 10px 12px calc(var(--safe-b) + 10px); box-shadow: 0 -1px 0 var(--line), 0 -10px 24px -20px rgba(40, 20, 110, .45); }
.qr { display: flex; gap: 8px; overflow-x: auto; padding: 0 0 10px; scrollbar-width: none; }
.qr::-webkit-scrollbar { display: none; }
.qr button { flex: none; padding: 8px 14px; border-radius: 999px; background: var(--soft-v); color: var(--indigo); font-weight: 700; font-size: 13.5px; }
.qr button:active { transform: scale(.95); }
.counter { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--mute); padding: 0 0 9px; }
.counter .pips { display: inline-flex; gap: 3px; }
.counter .pips i { width: 14px; height: 5px; border-radius: 3px; background: var(--line); }
.counter .pips i.f { background: var(--grad-v); }
.counter b { color: var(--indigo); }
.field { display: flex; align-items: center; gap: 4px; background: var(--surface-2); border: 1.5px solid var(--line); border-radius: 26px; padding: 4px 4px 4px 4px; transition: border-color .2s, box-shadow .2s; }
.field:focus-within { border-color: #CDBEFF; box-shadow: 0 0 0 4px rgba(139, 92, 246, .1); }
.field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; height: 42px; font-size: 15.5px; padding: 0 4px; }
.field input::placeholder { color: var(--mute-2); }
.field .em { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--mute); flex: none; }
.field .em.on { color: var(--violet); background: var(--soft-v); }
.send { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 10px 18px -10px rgba(124, 77, 255, .9); flex: none; transition: transform .15s var(--spring); }
.send .ico { width: 20px; height: 20px; margin-left: -2px; margin-top: 1px; }
.send:active { transform: scale(.88); }
.emojis { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; padding: 0 0 10px; }
.emojis button { font-size: 25px; height: 42px; border-radius: 12px; }
.emojis button:active { background: var(--soft-v); }
.endbar { padding: 14px 14px calc(var(--safe-b) + 14px); background: #fff; box-shadow: 0 -1px 0 var(--line), 0 -10px 24px -20px rgba(40, 20, 110, .45); }
.endcard { display: grid; justify-items: center; text-align: center; gap: 2px; }
.endcard .em { font-size: 30px; line-height: 1.1; }
.endcard b { font-size: 16px; font-weight: 800; }
.endcard small { color: var(--mute); font-size: 13px; margin-bottom: 12px; }
.row2 { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; width: 100%; }

/* ---------------------------------------------------------------- page header */
.pagehead { display: flex; align-items: center; gap: 10px; padding: calc(var(--safe-t) + 14px) 18px 10px; }
.pagehead .h1 { flex: 1; }
.pagehead.center .h1 { text-align: center; font-size: 20px; padding-right: 42px; }

/* ---------------------------------------------------------------- cards + lists */
.card { background: var(--surface); border-radius: var(--r); box-shadow: var(--sh-sm); }
.list { padding: 4px 0; overflow: hidden; }
.row { display: flex; align-items: center; gap: 13px; width: 100%; padding: 12px 14px; text-align: left; position: relative; transition: background .15s; }
.row + .row::before { content: ""; position: absolute; top: 0; left: 72px; right: 14px; height: 1px; background: var(--line); }
.row:active { background: var(--surface-2); }
.row .t { flex: 1; min-width: 0; }
.row .t b { display: flex; align-items: center; font-size: 15.5px; font-weight: 800; }
.row .t b span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .t small { display: block; color: var(--mute); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.row .when { font-size: 11.5px; color: var(--mute-2); font-weight: 700; align-self: flex-start; margin-top: 3px; white-space: nowrap; }
.empty { text-align: center; padding: 18px 18px 10px; }
.empty img { width: 210px; margin: 0 auto 6px; filter: drop-shadow(0 18px 22px rgba(91, 61, 245, .2)); }
.empty b { display: block; font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.empty p { color: var(--mute); margin: 0 auto 18px; max-width: 260px; }

/* ---------------------------------------------------------------- explore */
.feature { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; border-radius: var(--r-lg); padding: 18px; color: #fff; background: var(--grad); box-shadow: 0 20px 36px -20px rgba(124, 77, 255, .85); position: relative; overflow: hidden; isolation: isolate; }
.feature::after { content: ""; position: absolute; width: 170px; height: 170px; border-radius: 50%; right: -60px; top: -70px; background: rgba(255, 255, 255, .14); z-index: -1; }
.feature .tile { background: rgba(255, 255, 255, .22); box-shadow: none; width: 54px; height: 54px; border-radius: 18px; }
.feature .tile .ico { width: 26px; height: 26px; }
.feature b { display: block; font-size: 18px; font-weight: 800; } .feature small { opacity: .9; font-size: 13px; }
.feature .go { margin-left: auto; width: 40px; height: 40px; border-radius: 50%; background: #fff; color: var(--indigo); display: grid; place-items: center; flex: none; }
.feature .go .ico { width: 18px; height: 18px; }
.topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.topic { border-radius: var(--r); padding: 16px 14px; text-align: left; display: grid; gap: 1px; transition: transform .15s var(--ease); box-shadow: var(--sh-sm); }
.topic:active { transform: scale(.97); }
.topic .e { width: 46px; height: 46px; border-radius: 15px; background: rgba(255, 255, 255, .85); display: grid; place-items: center; font-size: 24px; margin-bottom: 10px; box-shadow: 0 6px 14px -8px rgba(40, 20, 110, .35); }
.topic b { font-size: 15.5px; font-weight: 800; } .topic small { color: var(--ink-2); opacity: .7; font-size: 12.5px; font-weight: 600; }
.c1 { background: linear-gradient(145deg, #FFE7F2, #FFD3E8); } .c2 { background: linear-gradient(145deg, #EEE8FF, #DCD0FF); }
.c3 { background: linear-gradient(145deg, #E2F8EE, #C9F0DD); } .c4 { background: linear-gradient(145deg, #E3EEFF, #CFE0FF); }
.c5 { background: linear-gradient(145deg, #FFF3DC, #FFE6B8); } .c6 { background: linear-gradient(145deg, #FFE9E2, #FFD6C8); }

/* ---------------------------------------------------------------- profile */
.pf-banner { position: relative; height: calc(158px + var(--safe-t)); margin: 0 -18px; background: var(--grad); border-radius: 0 0 34px 34px; overflow: hidden; padding: calc(var(--safe-t) + 14px) 18px 0; display: flex; justify-content: space-between; align-items: flex-start; color: #fff; flex: none; isolation: isolate; }
.pf-banner::before { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; right: -80px; top: -120px; background: rgba(255, 255, 255, .14); z-index: -1; }
.pf-banner::after { content: ""; position: absolute; width: 160px; height: 160px; border-radius: 50%; left: -50px; bottom: -90px; background: rgba(255, 255, 255, .1); z-index: -1; }
.pf-banner .h1 { color: #fff; font-size: 22px; margin-top: 7px; }
.pf { text-align: center; margin-top: -60px; position: relative; z-index: 2; }
.pf .avbox { position: relative; width: 104px; margin: 0 auto; }
.pf .av { box-shadow: 0 0 0 5px #fff, 0 14px 28px -12px rgba(60, 30, 140, .6); }
.pf .edit-av { position: absolute; right: -4px; bottom: 2px; width: 34px; height: 34px; border-radius: 50%; background: var(--grad-v); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 3px #fff; }
.pf .edit-av .ico { width: 15px; height: 15px; }
.pf h2 { margin: 14px 0 4px; font-size: 23px; font-weight: 800; letter-spacing: -.5px; }
.pf .idchip { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--soft-v); color: var(--indigo); font-weight: 800; font-size: 12px; }
.pf .bio { color: var(--ink-2); margin: 10px auto 0; max-width: 290px; font-size: 14px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 18px 0 0; padding: 14px 4px; }
.stats div { text-align: center; position: relative; }
.stats div + div::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.stats b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.stats span { font-size: 12px; color: var(--mute); font-weight: 700; }

/* ---------------------------------------------------------------- menus */
.group-label { font-size: 12px; font-weight: 800; color: var(--mute); text-transform: uppercase; letter-spacing: .8px; margin: 22px 6px 8px; }
.menu { overflow: hidden; }
.mi { display: flex; align-items: center; gap: 13px; width: 100%; padding: 12px 14px; text-align: left; font-weight: 700; font-size: 15px; position: relative; transition: background .15s; }
.mi + .mi::before { content: ""; position: absolute; top: 0; left: 65px; right: 14px; height: 1px; background: var(--line); }
.mi:active { background: var(--surface-2); }
.mi .tile { width: 38px; height: 38px; border-radius: 12px; box-shadow: none; }
.mi .tile .ico { width: 19px; height: 19px; }
.mi .go { margin-left: auto; color: var(--mute-2); width: 18px; height: 18px; }
.mi.danger { color: var(--red); }
.switch { margin-left: auto; width: 48px; height: 28px; border-radius: 999px; background: #DDD6F3; position: relative; transition: background .25s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .25s var(--spring); box-shadow: 0 2px 6px rgba(30, 10, 80, .25); }
.switch.on { background: var(--grad-v); } .switch.on::after { transform: translateX(20px); }
.foot-note { text-align: center; color: var(--mute-2); font-size: 12px; margin: 22px 0 6px; }
.foot-note a { color: var(--violet); font-weight: 700; text-decoration: none; }

/* ---------------------------------------------------------------- modal / bottom sheet
   The overlay scrolls; the sheet never shrinks (Android WebView collapses an
   overflow:auto / max-height card inside a centring flex box into a thin pill). */
#modalRoot .ov { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 900; background: rgba(23, 18, 58, .55); display: flex; flex-direction: column; align-items: center; padding: 18px 10px calc(var(--safe-b) + 10px); overflow-y: auto; -webkit-overflow-scrolling: touch; animation: fadeIn .2s; }
#modalRoot .sheet { flex: 0 0 auto; margin: auto 0 0; width: 100%; max-width: 460px; min-height: min-content; background: #fff; border-radius: 30px; padding: 10px 20px 20px; text-align: center; box-shadow: var(--sh-lg); animation: sheetUp .34s var(--ease); }
@media (min-width: 560px) { #modalRoot .sheet { margin: auto; } }
@keyframes sheetUp { from { opacity: 0; transform: translateY(36px); } to { opacity: 1; transform: none; } }
#modalRoot .sheet::before { content: ""; display: block; width: 42px; height: 5px; border-radius: 5px; background: #E6E0F6; margin: 0 auto 14px; }
#modalRoot .sheet h3 { margin: 12px 0 6px; font-size: 21px; font-weight: 800; letter-spacing: -.4px; }
#modalRoot .sheet p { margin: 0 0 6px; color: var(--mute); font-size: 14.5px; }
#modalRoot .bul p { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; }
#modalRoot .btns { display: grid; gap: 10px; margin-top: 18px; }
#modalRoot .hero-ic { width: 76px; height: 76px; border-radius: 26px; margin: 4px auto 0; display: grid; place-items: center; color: #fff; font-size: 34px; }
#modalRoot .hero-ic .ico { width: 34px; height: 34px; }
#modalRoot .hero-ic.big-emoji { background: var(--soft-v); }
#modalRoot .left { text-align: left; }
#modalRoot .bul { display: grid; gap: 11px; text-align: left; margin: 14px 0 2px; }
#modalRoot .bul div { display: flex; gap: 11px; align-items: flex-start; font-size: 14px; color: var(--ink-2); line-height: 1.45; }
#modalRoot .bul div > span:first-child { flex: none; width: 28px; height: 28px; border-radius: 10px; background: var(--soft-v); display: grid; place-items: center; font-size: 14px; }
#modalRoot input[type=text], #modalRoot textarea { width: 100%; border: 1.5px solid var(--line); background: var(--surface-2); border-radius: 16px; padding: 13px 15px; outline: 0; font-size: 15px; resize: none; margin-top: 12px; }
#modalRoot input[type=text]:focus, #modalRoot textarea:focus { border-color: #CDBEFF; box-shadow: 0 0 0 4px rgba(139, 92, 246, .1); }
#modalRoot .menu { box-shadow: none; background: var(--surface-2); border-radius: 18px; text-align: left; margin-top: 8px; }
.pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; justify-items: center; margin: 14px 0 4px; }
.pick button { padding: 4px; border-radius: 50%; transition: transform .15s var(--spring); }
.pick button.sel { box-shadow: 0 0 0 3px var(--violet); }
.pick button:active { transform: scale(.92); }
.radio { display: grid; gap: 8px; text-align: left; margin-top: 12px; }
.radio label { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--surface-2); font-weight: 700; font-size: 14.5px; border: 1.5px solid transparent; }
.radio label.sel { border-color: #CDBEFF; background: var(--soft-v); }
.radio input { accent-color: var(--indigo); width: 18px; height: 18px; margin: 0; }
.adbox { position: relative; width: 100%; aspect-ratio: 16/10; border-radius: 20px; background: radial-gradient(120% 90% at 0% 0%, #3B2A8C, #120C34); color: #fff; display: grid; place-items: center; margin: 6px 0; overflow: hidden; }
.adbox .ring { width: 74px; height: 74px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .18); border-top-color: #fff; animation: spin 1s linear infinite; position: absolute; }
.adbox b { position: relative; font-size: 24px; }
.adbox small { position: absolute; bottom: 10px; left: 14px; font-size: 11px; opacity: .7; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
.listm { display: grid; gap: 8px; text-align: left; margin-top: 12px; }
.listm .it { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface-2); border-radius: 16px; font-weight: 700; }
.listm .it .btn { margin-left: auto; }

/* ---------------------------------------------------------------- toast */
#toast { position: fixed; left: 50%; bottom: calc(var(--safe-b) + 100px); transform: translate(-50%, 16px); background: rgba(23, 18, 58, .94); color: #fff; padding: 11px 18px; border-radius: 16px; font-weight: 700; font-size: 14px; opacity: 0; pointer-events: none; transition: all .3s var(--spring); z-index: 950; max-width: 86vw; text-align: center; box-shadow: 0 16px 30px -14px rgba(23, 18, 58, .7); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* ---------------------------------------------------------------- sponsored card (native banner is drawn into .adspace) */
.adcard { margin: 18px 0 0; padding: 8px 0 10px; overflow: hidden; border-radius: var(--r); background: var(--surface); box-shadow: var(--sh-sm); display: grid; justify-items: center; gap: 6px; }
.adcard .adlabel { justify-self: start; font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--mute-2); padding-left: 14px; }
.adcard .adspace { width: 320px; max-width: 100%; height: 50px; border-radius: 8px; background: var(--surface-2); }
.search .adcard { width: 100%; margin: 0 0 14px; background: rgba(255, 255, 255, .16); box-shadow: none; }
.search .adcard .adlabel { color: rgba(255, 255, 255, .75); }
.search .adcard .adspace { background: rgba(255, 255, 255, .12); }

/* ---------------------------------------------------------------- no one available */
.noone { margin: auto 0; display: grid; justify-items: center; gap: 6px; }
.noone .nb { width: 120px; height: 120px; border-radius: 50%; background: rgba(255, 255, 255, .2); box-shadow: 0 0 0 14px rgba(255, 255, 255, .08); display: grid; place-items: center; font-size: 56px; margin-bottom: 18px; }

/* ---------------------------------------------------------------- sticky header + fixed nav (document-scroll pages) */
.screen > .top, .screen > .pagehead { position: sticky; top: 0; z-index: 40; background: rgba(247, 244, 255, .9); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); }
.screen > .nav { position: fixed; z-index: 50; left: 50%; transform: translateX(-50%); bottom: calc(var(--safe-b) + 10px); width: calc(min(100vw, 520px) - 24px); margin: 0; }
