/* =========================================================
   aiwy — чёрный минимализм
   ========================================================= */
:root {
  --bg: #000;
  --raised: #0b0b0c;
  --surface: #111113;
  --surface-2: #18181b;
  --surface-3: #232327;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --line-3: rgba(255, 255, 255, .2);
  --text: #f5f5f7;
  --text-2: rgba(245, 245, 247, .74);
  --muted: #8a8a90;
  --faint: #5c5c62;
  --accent: #ff3d6e;
  --accent-hover: #ff5a85;
  --accent-ink: #ff9db5;
  --accent-soft: rgba(255, 61, 110, .14);
  --online: #3ddc84;
  --danger: #ff5a6e;
  --r: 22px;
  --dock-h: 66px;
  --ease: cubic-bezier(.2, .85, .25, 1);
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 500 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
input, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
.i { flex: none; display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
::selection { background: var(--accent); color: #fff; }
.tap { transition: transform .15s var(--ease); }
.tap:active { transform: scale(.96); }

.app { display: flex; height: 100dvh; overflow: hidden; }
main { flex: 1; min-width: 0; position: relative; display: flex; flex-direction: column; overflow: hidden; }
.page { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 0 14px calc(var(--dock-h) + 44px); overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #26262a transparent; }
.enter { animation: enter .38s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

/* ---------- logo ---------- */
.logo { font-weight: 800; font-size: 24px; letter-spacing: -.8px; display: inline-flex; align-items: baseline; color: #fff; }
.logo .heart { position: relative; display: inline-block; }
.logo .heart::before { content: ""; position: absolute; left: 50%; top: -1px; width: 9px; height: 8px; transform: translateX(-50%); background: var(--accent);
  clip-path: path("M4.5 8C4.5 8 0 5.2 0 2.4 0 1 1 0 2.2 0 3.3 0 4 .7 4.5 1.5 5 .7 5.7 0 6.8 0 8 0 9 1 9 2.4 9 5.2 4.5 8 4.5 8Z"); animation: beat 2.4s ease-in-out infinite; }
@keyframes beat { 0%, 70%, 100% { transform: translateX(-50%) scale(1); } 78% { transform: translateX(-50%) scale(1.25); } 86% { transform: translateX(-50%) scale(1); } 92% { transform: translateX(-50%) scale(1.15); } }

/* ---------- balance ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 13px 0 10px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line-2); font-weight: 700; font-size: 14px; transition: background .15s; }
.pill:hover { background: var(--surface-2); }
.coin { color: #f5b942; }

/* ---------- hero carousel ---------- */
.hero { position: relative; margin: 0 -14px 6px; }
.hero-track { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 14px; scrollbar-width: none; }
.hero-track::-webkit-scrollbar { display: none; }
.hero-card { position: relative; flex: none; width: calc(100% - 4px); aspect-ratio: 16 / 12.5; max-height: 440px; border-radius: 26px; overflow: hidden; scroll-snap-align: center; isolation: isolate; border: 1px solid var(--line-2); text-align: left; }
.hero-card .art img { animation: kenburns 16s ease-in-out infinite alternate; object-position: 50% 18%; }
.hero-card::after { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .35) 0, rgba(0, 0, 0, 0) 28%, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .92) 100%); }
.hero-card .tagline { position: absolute; top: 14px; left: 14px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 99px; background: rgba(0, 0, 0, .55); backdrop-filter: blur(10px); border: 1px solid var(--line-2); font-size: 12px; font-weight: 800; letter-spacing: .2px; }
.hero-card .tagline .i { color: var(--accent-ink); }
.hero-body { position: absolute; inset: auto 0 0; z-index: 2; padding: 0 16px 16px; }
.hero-body h2 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.7px; line-height: 1.1; }
.hero-body p { margin: 5px 0 12px; color: var(--text-2); font-size: 14px; max-width: 420px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-actions { display: flex; gap: 8px; align-items: center; }
.btn-white { height: 42px; padding: 0 18px; border-radius: 99px; background: #fff; color: #000; font-weight: 800; font-size: 14.5px; display: inline-flex; align-items: center; gap: 7px; transition: transform .15s, background .15s; }
.btn-white:hover { background: #e9e9ee; }
.btn-glass { height: 42px; padding: 0 16px; border-radius: 99px; background: rgba(255, 255, 255, .12); backdrop-filter: blur(10px); border: 1px solid var(--line-2); font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.hero-actions .stat { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.dots { display: flex; justify-content: center; gap: 6px; padding: 10px 0 4px; }
.dots i { width: 6px; height: 6px; border-radius: 99px; background: var(--line-3); transition: width .3s var(--ease), background .3s; }
.dots i.on { width: 20px; background: #fff; }
@keyframes kenburns { from { transform: scale(1.02) translate3d(0, 0, 0); } to { transform: scale(1.12) translate3d(-1.5%, -2%, 0); } }

/* ---------- toolbar ---------- */
.section-h { display: flex; align-items: baseline; justify-content: space-between; margin: 18px 2px 10px; }
.section-h h3 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.4px; }
.section-h span { color: var(--muted); font-size: 13px; font-weight: 600; }
.toolbar { display: flex; gap: 8px; align-items: center; }
.seg { display: flex; gap: 6px; }
.seg button { height: 40px; padding: 0 15px; border-radius: 99px; color: var(--text-2); font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 7px; background: var(--surface); border: 1px solid var(--line-2); transition: background .2s, color .2s, border-color .2s; }
.seg button.icon { width: 40px; padding: 0; justify-content: center; }
.seg button:hover { background: var(--surface-2); }
.seg button.on { background: #fff; color: #000; border-color: #fff; }
.seg.wide { width: 100%; }
.seg.wide button { flex: 1; justify-content: center; height: 46px; border-radius: 15px; }
.search { flex: 1; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line-2); color: var(--muted); min-width: 0; transition: border-color .2s, background .2s; }
.search:focus-within { border-color: var(--line-3); background: var(--surface-2); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); }
.search input::placeholder { color: var(--muted); }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line-2); flex: none; transition: background .15s, transform .15s; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(.94); }
.chips { display: flex; gap: 6px; overflow-x: auto; margin: 0 -14px; padding: 10px 14px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 34px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--text-2); font-size: 13.5px; font-weight: 700; white-space: nowrap; transition: background .15s, color .15s, border-color .15s; display: inline-flex; align-items: center; gap: 6px; }
.chip:hover { background: var(--surface); }
.chip.on { background: var(--accent-soft); color: var(--accent-ink); border-color: rgba(255, 61, 110, .5); }

/* ---------- grid & cards ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 780px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { position: relative; aspect-ratio: 3 / 4.3; border-radius: var(--r); overflow: hidden; text-align: left; background: var(--surface); isolation: isolate; border: 1px solid var(--line); animation: rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); transition: transform .25s var(--ease), border-color .25s; }
.card:hover { border-color: var(--line-3); transform: translateY(-3px); }
.card:hover .art img.ok { transform: scale(1.06); }
.card:active { transform: scale(.975); }
.card-top { position: absolute; top: 9px; left: 9px; right: 9px; z-index: 2; display: flex; justify-content: space-between; gap: 6px; }
.badge-s { white-space: nowrap; flex: none; height: 24px; padding: 0 9px; border-radius: 99px; display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; background: rgba(0, 0, 0, .5); backdrop-filter: blur(10px); border: 1px solid var(--line-2); color: #fff; }
.badge-s.new { background: var(--accent); border-color: var(--accent); }
.badge-s .od { width: 6px; height: 6px; border-radius: 50%; background: var(--online); box-shadow: 0 0 0 3px rgba(61, 220, 132, .2); }
.card-info { position: absolute; inset: auto 0 0; z-index: 1; padding: 56px 12px 12px; background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, .72) 40%, rgba(0, 0, 0, .95)); }
.card-info b { display: block; font-size: 16.5px; font-weight: 800; letter-spacing: -.3px; }
.card-info .d { display: block; font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.card-info small { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; color: rgba(255, 255, 255, .55); font-size: 12px; font-weight: 700; }
.card-info small span { display: inline-flex; align-items: center; gap: 4px; }
.card.create { border-color: rgba(255, 61, 110, .4); background: radial-gradient(140% 90% at 50% 0, rgba(255, 61, 110, .26), rgba(0, 0, 0, 0) 62%), #050507; }
.card.create .stars { position: absolute; inset: 0; z-index: 0;
  background-image: radial-gradient(1.2px 1.2px at 12% 18%, #fff 50%, transparent 52%), radial-gradient(1px 1px at 78% 12%, #fff 50%, transparent 52%), radial-gradient(1.5px 1.5px at 40% 34%, #fff 50%, transparent 52%),
    radial-gradient(1px 1px at 64% 56%, #fff 50%, transparent 52%), radial-gradient(1px 1px at 22% 66%, #fff 50%, transparent 52%), radial-gradient(1.4px 1.4px at 86% 40%, #fff 50%, transparent 52%),
    radial-gradient(1px 1px at 50% 8%, #fff 50%, transparent 52%), radial-gradient(1px 1px at 92% 72%, #fff 50%, transparent 52%), radial-gradient(1px 1px at 8% 44%, #fff 50%, transparent 52%);
  animation: twinkle 3.2s ease-in-out infinite alternate; }
.card.create .stars.b { background-image: radial-gradient(1px 1px at 30% 12%, #fff 50%, transparent 52%), radial-gradient(1.3px 1.3px at 58% 24%, #fff 50%, transparent 52%), radial-gradient(1px 1px at 16% 82%, #fff 50%, transparent 52%), radial-gradient(1px 1px at 70% 80%, #fff 50%, transparent 52%), radial-gradient(1.2px 1.2px at 94% 22%, #fff 50%, transparent 52%), radial-gradient(1px 1px at 4% 6%, #fff 50%, transparent 52%);
  animation-delay: -1.6s; }
@keyframes twinkle { from { opacity: .25; } to { opacity: .95; } }
.card.create .orb { position: absolute; top: 33%; left: 50%; transform: translate(-50%, -50%); z-index: 1; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #ff9db5, #e0305d 55%, #9c1a3c); box-shadow: 0 0 0 8px rgba(255, 61, 110, .12), 0 0 40px rgba(255, 61, 110, .55); animation: float 4s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translate(-50%, -50%); } 50% { transform: translate(-50%, calc(-50% - 5px)); } }
.card.create .sale { position: absolute; top: 12px; right: 12px; z-index: 2; height: 24px; padding: 0 9px; border-radius: 99px; display: inline-flex; align-items: center; background: rgba(255, 61, 110, .22); color: var(--accent-ink); border: 1px solid rgba(255, 61, 110, .5); font-weight: 800; font-size: 12px; }
.card.create .card-info { background: none; }

/* images */
.art { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(120% 80% at 50% 10%, var(--a), #0a0a0c 75%); }
.art::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .05) 50%, transparent 70%); background-size: 220% 100%; animation: shimmer 1.5s linear infinite; }
.art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; opacity: 0; transition: opacity .6s ease, transform .7s var(--ease); }
.art img.ok { opacity: 1; }
.art:has(img.ok)::before { display: none; }
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.ava { width: 40px; height: 40px; border-radius: 50%; flex: none; position: relative; overflow: hidden; display: grid; place-items: center; font-weight: 800; font-size: 15px; background: linear-gradient(140deg, var(--a, #333), var(--b, #111)); color: rgba(255, 255, 255, .85); }
.ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 14%; opacity: 0; transition: opacity .3s; }
.ava img.ok { opacity: 1; }
.ava.sm { width: 32px; height: 32px; font-size: 12px; }
.ava.lg { width: 76px; height: 76px; font-size: 28px; background: var(--surface-3); }
.ava-wrap { position: relative; flex: none; display: inline-grid; }
.ava-wrap .dot { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; background: var(--online); border: 2.5px solid #000; }

.empty { text-align: center; color: var(--muted); padding: 56px 16px; }
.empty .ic-big { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 20px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line-2); color: var(--text-2); }
.empty b { display: block; color: var(--text); font-size: 17px; margin-bottom: 4px; }
.empty .btn { margin-top: 18px; max-width: 260px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 54px; padding: 0 20px; border-radius: 18px; font-weight: 800; font-size: 16px; width: 100%; transition: background .15s, transform .12s, box-shadow .2s; }
.btn:active { transform: scale(.985); }
.btn.primary { background: var(--accent); color: #fff; box-shadow: 0 10px 30px -10px rgba(255, 61, 110, .7); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.ghost { background: var(--surface-2); border: 1px solid var(--line-2); }
.btn.ghost:hover { background: var(--surface-3); }
.btn:disabled { opacity: .45; cursor: default; box-shadow: none; }
.btn .price { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 99px; background: rgba(0, 0, 0, .22); font-size: 14px; }
.btn s { opacity: .55; font-weight: 600; }
.link { color: var(--muted); display: inline-flex; gap: 6px; align-items: center; font-size: 14px; font-weight: 700; transition: color .15s; }
.link:hover { color: #fff; }

/* ---------- dock ---------- */
.dock { position: fixed; left: 50%; bottom: calc(10px + max(env(safe-area-inset-bottom), var(--tg-safe-area-inset-bottom, 0px))); transform: translateX(-50%); z-index: 20;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; width: min(288px, calc(100% - 24px)); padding: 5px; border-radius: 24px;
  background: rgba(22, 22, 25, .88); border: 1px solid var(--line-2); box-shadow: 0 6px 24px rgba(0, 0, 0, .38);
  -webkit-backdrop-filter: blur(18px) saturate(1.35); backdrop-filter: blur(18px) saturate(1.35); }
.dock a, .dock button { position: relative; height: 44px; border-radius: 17px; display: grid; place-items: center; color: #a1a1a8; transition: color .2s, background .2s; }
.dock a:hover, .dock button:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.dock .on { color: var(--accent-ink); background: rgba(255, 255, 255, .09); }
.dock .badge-dot { position: absolute; top: 9px; right: calc(50% - 14px); width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px #161619; }
.dock-create-icon { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.account-avatar { position: relative; display: grid; place-items: center; overflow: hidden; border-radius: 50%; }
.nav-avatar { width: 24px; height: 24px; }
.account-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: 0; }
.account-avatar img.ok { opacity: 1; }
body.no-dock .dock { display: none; }

/* ---------- layer: sheet & modal ---------- */
.layer { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; pointer-events: none; }
.layer.open { pointer-events: auto; }
.scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .74); opacity: 0; transition: opacity .3s; backdrop-filter: blur(4px); }
.layer.open .scrim { opacity: 1; }
.sheet { position: relative; width: 100%; max-width: 520px; max-height: 95dvh; overflow-y: auto; overscroll-behavior: contain; background: #000; border-radius: 30px 30px 0 0; border: 1px solid var(--line-2); border-bottom: 0;
  transform: translateY(100%); transition: transform .42s var(--ease); scrollbar-width: none; }
.sheet::-webkit-scrollbar { display: none; }
.layer.open .sheet { transform: none; }
.grab { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 40px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .6); z-index: 3; }
.sheet-hero { position: relative; aspect-ratio: 3 / 3.5; max-height: 64dvh; width: 100%; isolation: isolate; overflow: hidden; }
.sheet-hero .art img { animation: kenburns 18s ease-in-out infinite alternate; object-position: 50% 15%; }
.sheet-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .35), rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 52%, #000 99%); }
.sheet-hero .card-top { top: 16px; left: 16px; right: 64px; justify-content: flex-start; }
.sheet-close { position: absolute; top: 12px; right: 12px; z-index: 3; background: rgba(0, 0, 0, .5); backdrop-filter: blur(10px); }
.sheet-body { padding: 0 18px 0; margin-top: -70px; position: relative; z-index: 2; }
.sheet-body h2 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -.8px; line-height: 1.1; }
.status-line { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; color: var(--text-2); font-size: 14px; }
.status-line .on { color: var(--online); display: inline-flex; align-items: center; gap: 5px; font-weight: 700; }
.status-line .on::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--online); }
.traits { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; }
.traits span { height: 30px; padding: 0 12px; border-radius: 99px; display: inline-flex; align-items: center; font-size: 13px; font-weight: 700; background: var(--surface); border: 1px solid var(--line-2); color: var(--text-2); }
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); margin: 16px 0; border: 1px solid var(--line-2); border-radius: 18px; background: var(--raised); }
.stats3 div { padding: 12px 6px; text-align: center; }
.stats3 div + div { border-left: 1px solid var(--line); }
.stats3 b { display: block; font-size: 17px; font-weight: 800; letter-spacing: -.3px; }
.stats3 span { font-size: 12px; color: var(--muted); font-weight: 600; }
.about { color: var(--text-2); margin: 0; font-size: 14.5px; line-height: 1.55; }
.about.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.more-btn { margin-top: 6px; font-size: 14px; font-weight: 800; color: #fff; display: inline-flex; align-items: center; gap: 3px; }
.plus-hint { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 10px; padding: 11px; border-radius: 14px; background: linear-gradient(90deg, rgba(255, 61, 110, .16), rgba(255, 61, 110, .06)); border: 1px solid rgba(255, 61, 110, .3); color: #ffc4d2; font-size: 13px; font-weight: 700; text-decoration: none; }
.sheet-hero[data-act] { cursor: zoom-in; }
.viewer { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; opacity: 0; pointer-events: none; transition: opacity .25s; }
.viewer.open { opacity: 1; pointer-events: auto; }
.v-bg { position: absolute; inset: 0; background: #000; }
.v-img { position: relative; max-width: min(100vw, 640px); max-height: 100dvh; width: auto; height: auto; object-fit: contain; animation: pop .3s both; user-select: none; -webkit-user-drag: none; }
.v-top { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: calc(env(safe-area-inset-top) + 12px) 16px 24px; background: linear-gradient(rgba(0, 0, 0, .7), transparent); font-size: 14px; color: var(--muted); }
.v-top b { color: #fff; font-weight: 800; }
.sheet-cta { position: sticky; bottom: 0; z-index: 4; display: flex; gap: 8px; padding: 16px 18px max(16px, env(safe-area-inset-bottom)); margin-top: 18px; background: linear-gradient(rgba(0, 0, 0, 0), #000 34%); }
.sheet-cta .btn { flex: 1; }
.sheet-cta .fav { width: 54px; height: 54px; flex: none; border-radius: 18px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line-2); transition: color .2s, background .2s; }
.sheet-cta .fav.on { color: #f5b942; background: rgba(245, 185, 66, .1); border-color: rgba(245, 185, 66, .4); }
.sheet-cta .fav.on .i { fill: currentColor; }
.rate-row { display: flex; gap: 8px; margin-top: 16px; }
.rate { flex: 1; height: 42px; border-radius: 14px; border: 1px solid var(--line-2); display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 14px; font-weight: 800; transition: background .15s, border-color .15s, color .15s; }
.rate:hover { background: var(--surface); }
.rate.on { border-color: rgba(255, 61, 110, .6); color: var(--accent-ink); background: var(--accent-soft); }
.note { color: var(--faint); font-size: 12px; margin: 14px 0 0; display: flex; gap: 6px; align-items: center; }

.modal { position: relative; margin: 0 14px calc(var(--dock-h) + 30px); width: 100%; max-width: 420px; background: #0b0b0c; border: 1px solid var(--line-2); border-radius: 28px; padding: 20px;
  transform: translateY(16px) scale(.96); opacity: 0; transition: transform .32s var(--ease), opacity .22s; box-shadow: 0 30px 90px rgba(0, 0, 0, .85); }
.layer.open .modal { transform: none; opacity: 1; }
.layer.center { align-items: center; }
.layer.center .modal { margin-bottom: 0; }
.modal h3 { margin: 0 0 16px; text-align: center; font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.create-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.create-grid button { height: 104px; border-radius: 20px; background: var(--surface); border: 1.5px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; font-weight: 800; transition: border-color .2s, background .2s, transform .15s; animation: rise .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); }
.create-grid button:hover { border-color: rgba(255, 255, 255, .9); background: var(--surface-2); }
.create-grid button:active { transform: scale(.97); }
.create-grid button:last-child { grid-column: span 2; }
.create-grid .soon { font-size: 11px; color: var(--muted); font-weight: 700; margin-top: -5px; }
.age-ic { width: 56px; height: 56px; border-radius: 18px; margin: 0 auto 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.age p { color: var(--text-2); text-align: center; margin: 0 0 18px; }
.age .btn + .btn { margin-top: 8px; }

/* ---------- chat ---------- */
.chat { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; background-color: #000; animation: enter .3s var(--ease) both; }
.chat::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .9;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150' fill='none' stroke='%23ffffff' stroke-opacity='.045' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 30s-8-5-10-10a5.5 5.5 0 0 1 10-3.4A5.5 5.5 0 0 1 32 20c-2 5-10 10-10 10z'/%3E%3Cpath d='M100 16l2 6 6 2-6 2-2 6-2-6-6-2 6-2z'/%3E%3Crect x='92' y='80' width='24' height='17' rx='4'/%3E%3Cpath d='M92 86h24'/%3E%3Cpath d='M30 96l10 6-10 6z'/%3E%3Cpath d='M58 60c4-6 12-6 16 0'/%3E%3Ccircle cx='66' cy='54' r='2'/%3E%3Cpath d='M74 132s-5-3-6-6a3.3 3.3 0 0 1 6-2 3.3 3.3 0 0 1 6 2c-1 3-6 6-6 6z'/%3E%3Cpath d='M128 126l8-8M132 126h4v-4'/%3E%3Ccircle cx='136' cy='54' r='5'/%3E%3C/svg%3E"); }
.chat::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 60% at 50% 0, rgba(255, 61, 110, .07), transparent 60%); }
.chat > * { position: relative; z-index: 1; }
.chat-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 8px; flex: none; z-index: 3; }
.chat-peer { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 12px 0 8px; border-radius: 99px; text-align: left;
  background: rgba(17, 17, 19, .82); backdrop-filter: blur(18px) saturate(1.4); border: 1px solid var(--line-2); transition: background .15s; }
.chat-peer:hover { background: rgba(26, 26, 29, .9); }
.chat-peer > span.mid { flex: 1; min-width: 0; }
.chat-peer b { display: block; font-weight: 800; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-peer small { color: var(--muted); font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.chat-peer small.online { color: var(--online); }
.chat-peer small.typing { color: var(--accent-ink); }
.chat-peer .chev-r { color: var(--muted); }
.chat-head .icon-btn { width: 48px; height: 48px; background: rgba(17, 17, 19, .82); backdrop-filter: blur(18px); border-color: var(--line-2); }
.msgs { flex: 1; overflow-y: auto; padding: 4px 12px 16px; display: flex; flex-direction: column; gap: 4px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #26262a transparent; }
.day { align-self: center; margin: 8px 0 10px; height: 26px; padding: 0 12px; border-radius: 99px; display: inline-flex; align-items: center; background: rgba(17, 17, 19, .8); border: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--text-2); backdrop-filter: blur(10px); }
.sys { align-self: center; max-width: 86%; text-align: center; font-size: 12.5px; color: var(--muted); padding: 6px 12px; margin: 4px 0; }
.mrow { display: flex; gap: 8px; align-items: flex-end; animation: pop .32s var(--ease) both; }
.mrow.out { justify-content: flex-end; margin-top: 8px; }
.mrow.in { margin-top: 10px; }
.mrow.in .ava { margin-bottom: 2px; }
.bubble { position: relative; max-width: min(80%, 560px); padding: 9px 13px 8px; border-radius: 20px; overflow-wrap: anywhere; line-height: 1.5; font-size: 15px; }
.mrow.out .bubble { background: var(--accent); border-bottom-right-radius: 6px; font-weight: 600; color: #fff; }
.mrow.in .bubble { max-width: min(84%, 600px); background: rgba(19, 19, 22, .96); border: 1px solid var(--line-2); border-bottom-left-radius: 6px; }
.bubble .who { display: block; font-size: 13px; color: var(--accent-ink); font-weight: 800; margin-bottom: 3px; }
.meta { float: right; margin: 6px 0 -3px 10px; display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; color: rgba(255, 255, 255, .45); line-height: 1; position: relative; top: 4px; }
.mrow.out .meta { color: rgba(255, 255, 255, .78); }
.narr { align-self: stretch; margin: 10px 0 2px; padding: 13px 15px; border-radius: 18px; background: rgba(255, 61, 110, .07); border: 1px solid rgba(255, 61, 110, .28); font-size: 14px; color: var(--text-2); line-height: 1.5; animation: pop .32s var(--ease) both; }
.narr b { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--accent-ink); margin-bottom: 4px; letter-spacing: .6px; text-transform: uppercase; font-weight: 800; }
.act { font-style: italic; color: rgba(255, 255, 255, .55); font-weight: 500; }
.thought { margin: 2px 0 9px; padding: 0 0 9px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.thought summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; color: var(--muted); min-width: 0; }
.thought summary::-webkit-details-marker { display: none; }
.thought summary .lbl { font-weight: 800; color: rgba(255, 255, 255, .6); flex: none; display: inline-flex; align-items: center; gap: 5px; }
.thought summary i { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: rgba(255, 255, 255, .42); }
.thought[open] summary i { visibility: hidden; }
.thought summary .chev { transition: transform .25s var(--ease); transform: rotate(90deg); }
.thought[open] summary .chev { transform: rotate(-90deg); }
.thought p { margin: 6px 0 0; color: rgba(255, 255, 255, .55); font-style: italic; animation: enter .25s ease both; }
.msg-bar { display: flex; align-items: center; gap: 4px; margin: 6px 0 2px 40px; animation: enter .3s .1s var(--ease) both; }
.msg-bar .stats { display: flex; gap: 2px; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.msg-bar .stats button { height: 32px; padding: 0 9px; border-radius: 99px; display: inline-flex; align-items: center; gap: 5px; transition: color .15s, background .15s; }
.msg-bar .stats button:hover { background: var(--surface); }
.msg-bar .stats .on { color: var(--accent-ink); }
.msg-bar .stats .on .i { fill: currentColor; }
.msg-bar .tools-r { margin-left: auto; display: flex; gap: 6px; }
.msg-bar .tools-r button { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--text-2); background: rgba(17, 17, 19, .9); border: 1px solid var(--line-2); transition: background .15s, transform .15s; }
.msg-bar .tools-r button:hover { background: var(--surface-3); }
.msg-bar .tools-r button:active { transform: scale(.92); }
.typing-dots { display: inline-flex; gap: 4px; padding: 6px 4px; }
.typing-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .55); animation: blink 1.2s infinite; }
.typing-dots i:nth-child(2) { animation-delay: .15s; }
.typing-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

.intro { align-self: center; text-align: center; margin: 14px 0 6px; animation: enter .4s var(--ease) both; }
.intro .ava { width: 84px; height: 84px; margin: 0 auto 10px; font-size: 30px; box-shadow: 0 0 0 4px #000, 0 0 0 5.5px var(--line-3); }
.intro b { display: block; font-size: 19px; font-weight: 800; }
.intro span { color: var(--muted); font-size: 13px; }
.start { margin: auto 0 8px; align-self: center; width: min(100%, 360px); padding: 22px 20px 16px; border-radius: 28px; background: rgba(11, 11, 12, .96); border: 1px solid var(--line-2); text-align: center; animation: rise .45s .05s var(--ease) both; box-shadow: 0 24px 70px rgba(0, 0, 0, .7); }
.start .ic-wrap { width: 50px; height: 50px; border-radius: 16px; margin: 0 auto 12px; display: grid; place-items: center; background: var(--surface-3); }
.start h3 { margin: 0 0 6px; font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.start p { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.start .btn { height: 50px; font-size: 15px; }
.start .btn + .btn { margin-top: 8px; }
.start .link { margin-top: 14px; }
.story-list { display: grid; gap: 8px; text-align: left; margin-bottom: 6px; }
.story-list button { padding: 13px 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line-2); text-align: left; transition: border-color .15s, background .15s; animation: rise .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms); }
.story-list button:hover { border-color: rgba(255, 255, 255, .8); background: var(--surface-2); }
.story-list b { display: block; margin-bottom: 2px; font-weight: 800; }
.story-list span { color: var(--muted); font-size: 13px; }
.start textarea { width: 100%; min-height: 100px; resize: vertical; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface); outline: 0; margin-bottom: 10px; }
.start textarea:focus { border-color: var(--line-3); }

.cool { display: flex; align-items: center; gap: 6px; margin: 0 12px 8px; padding: 0 4px 0 12px; height: 44px; border-radius: 99px; background: rgba(17, 17, 19, .92); backdrop-filter: blur(16px); border: 1px solid var(--line-2); font-size: 13.5px; color: var(--text-2); white-space: nowrap; font-weight: 700; animation: enter .3s var(--ease) both; overflow: hidden; position: relative; }
.cool [data-left] { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cool > .i { flex: none; }
.cool a { flex: none; }
.cool .bar { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--accent); transition: width .25s linear; }
.cool a { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; font-weight: 800; color: #fff; padding: 0 2px 0 10px; font-size: 13px; border-left: 1px solid var(--line-2); }
.cool button { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.composer { flex: none; padding: 0 12px max(10px, env(safe-area-inset-bottom)); }
.input-wrap { display: flex; align-items: flex-end; gap: 8px; padding: 6px 6px 6px 18px; border-radius: 28px; background: rgba(17, 17, 19, .94); backdrop-filter: blur(16px); border: 1px solid var(--line-2); transition: border-color .2s, box-shadow .2s; }
.input-wrap:focus-within { border-color: var(--line-3); box-shadow: 0 0 0 4px rgba(255, 255, 255, .03); }
.input-wrap textarea { flex: 1; resize: none; border: 0; outline: 0; background: none; max-height: 140px; padding: 10px 0; line-height: 1.4; }
.input-wrap textarea::placeholder { color: var(--muted); }
.send { min-width: 44px; height: 44px; padding: 0 10px; border-radius: 99px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; background: var(--accent); color: #fff; flex: none; transition: background .2s, transform .2s var(--ease); font-size: 13.5px; font-weight: 800; }
.send:not(:disabled):not(.idle):active { transform: scale(.9); }
.send:disabled { background: var(--surface-3); color: var(--text-2); cursor: default; }
.send.idle { background: var(--surface-3); color: var(--muted); }
.tools { margin: 0 -12px; padding: 8px 12px 2px; }
.tool { flex: none; height: 36px; padding: 0 13px; border-radius: 99px; background: rgba(17, 17, 19, .9); border: 1px solid var(--line-2); display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; white-space: nowrap; color: var(--text-2); transition: background .15s; }
.tool:hover { background: var(--surface-3); }
.tool.hot { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- forms ---------- */
.page-head { position: sticky; top: 0; z-index: 6; display: flex; align-items: center; gap: 12px; height: 62px; margin: 0 -14px; padding: 0 14px; background: rgba(0, 0, 0, .82); backdrop-filter: blur(18px); }
.page-head h1 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.page-head .grow { flex: 1; }
.big-title { margin: 6px 2px 16px; font-size: 32px; font-weight: 800; letter-spacing: -1px; }
.steps { display: flex; gap: 6px; padding: 0; margin: 4px -14px 8px; padding: 0 14px; list-style: none; overflow-x: auto; scrollbar-width: none; }
.steps li { flex: none; height: 36px; padding: 0 13px 0 6px; border-radius: 99px; display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 700; color: var(--muted); background: var(--surface); border: 1px solid var(--line-2); }
.steps li.on { background: #fff; color: #000; border-color: #fff; }
.steps .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 800; background: var(--surface-3); }
.steps li.on .n { background: #000; color: #fff; }
.hint { color: var(--muted); font-size: 12.5px; margin: 0 0 16px; }
.field { margin-bottom: 18px; }
.field > label, .label { display: flex; justify-content: space-between; font-weight: 800; margin-bottom: 8px; font-size: 14.5px; }
.box { position: relative; }
.box input, .box textarea, .age-box input { width: 100%; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface); outline: 0; transition: border-color .2s, background .2s, box-shadow .2s; }
.box textarea { min-height: 100px; resize: vertical; padding-right: 74px; line-height: 1.5; }
.box input { padding-right: 74px; height: 52px; }
.box input:focus, .box textarea:focus, .age-box input:focus { border-color: rgba(255, 255, 255, .32); background: var(--surface-2); box-shadow: 0 0 0 4px rgba(255, 255, 255, .03); }
.box ::placeholder, .age-box ::placeholder { color: var(--faint); }
.count { position: absolute; right: 14px; top: 16px; font-size: 12px; color: var(--faint); pointer-events: none; font-weight: 700; font-variant-numeric: tabular-nums; }
.count.warn { color: #f5b942; }
.field small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 7px; }
.row2 { display: grid; grid-template-columns: 1fr 108px; gap: 10px; align-items: end; }
.age-box { position: relative; }
.age-box input { height: 46px; padding: 0 34px 0 16px; font-weight: 800; -moz-appearance: textfield; }
.age-box input::-webkit-inner-spin-button { -webkit-appearance: none; }
.age-box button { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.ai-fill { margin: 0 0 18px; border-radius: 20px; background: radial-gradient(120% 140% at 100% 0, rgba(255, 61, 110, .14), transparent 55%), var(--surface); border: 1px solid rgba(255, 61, 110, .35); overflow: hidden; }
.ai-fill summary { display: flex; align-items: center; gap: 10px; padding: 16px; font-weight: 800; cursor: pointer; list-style: none; }
.ai-fill summary .ai-ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.ai-fill summary small { display: block; font-weight: 600; color: var(--muted); font-size: 12.5px; }
.ai-fill summary::-webkit-details-marker { display: none; }
.ai-fill summary .chev { margin-left: auto; transition: transform .25s var(--ease); transform: rotate(90deg); color: var(--muted); }
.ai-fill[open] summary .chev { transform: rotate(-90deg); }
.ai-fill .in { padding: 0 16px 16px; animation: enter .25s ease both; }
.ai-fill textarea { width: 100%; min-height: 80px; resize: vertical; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface-2); outline: 0; margin-bottom: 10px; }
.toggle-card { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line-2); margin-bottom: 14px; }
.toggle-card b { font-weight: 800; }
.toggle-card p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.switch { width: 50px; height: 30px; border-radius: 99px; background: var(--surface-3); position: relative; flex: none; transition: background .25s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .3s var(--ease), background .25s; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(20px); }
.preview-wrap { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 22px; background: var(--raised); border: 1px solid var(--line-2); margin-bottom: 16px; }
.preview-wrap .card { width: 116px; flex: none; animation: none; }
.preview-wrap .card:hover { transform: none; }
.preview-wrap b { font-weight: 800; }
.preview-wrap p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.err { padding: 12px 14px; border-radius: 16px; background: rgba(255, 90, 110, .1); border: 1px solid rgba(255, 90, 110, .35); color: #ffb8c2; font-size: 14px; margin-bottom: 12px; animation: shake .4s ease both; }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-5px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }
.sticky-cta { position: sticky; bottom: 0; z-index: 5; margin: 0 -14px; padding: 14px 14px max(14px, env(safe-area-inset-bottom)); background: rgba(0, 0, 0, .86); backdrop-filter: blur(18px); border-top: 1px solid var(--line); text-align: center; }
.sticky-cta .sum { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 13px; color: var(--muted); font-weight: 700; }
.sticky-cta .sum b { color: var(--accent-ink); }
.form-page { padding-bottom: 0 !important; }

/* ---------- lists ---------- */
.list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 18px; transition: background .15s; animation: rise .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 35ms); }
.row:hover { background: var(--surface); }
.row .ava { width: 56px; height: 56px; font-size: 20px; }
.row .mid { flex: 1; min-width: 0; }
.row .mid b { display: block; font-weight: 800; font-size: 15.5px; }
.row .mid span { display: block; color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .mid span em { font-style: normal; color: var(--text-2); }
.row .right { align-self: stretch; display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; padding: 4px 0; }
.row time { color: var(--muted); font-size: 12px; font-weight: 700; }
.row .cnt { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; background: var(--accent); font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.row .ticks { color: var(--accent-ink); }

/* ---------- panels / profile / bonus ---------- */
.panel { padding: 18px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line-2); margin-bottom: 12px; animation: rise .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms); }
.panel h3 { margin: 0 0 6px; font-weight: 800; display: flex; gap: 8px; align-items: center; font-size: 17px; }
.panel p { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.plus-card { position: relative; overflow: hidden; border-color: rgba(255, 61, 110, .45); background: radial-gradient(120% 110% at 100% 0, rgba(255, 61, 110, .28), transparent 55%), radial-gradient(80% 80% at 0 100%, rgba(255, 61, 110, .1), transparent 60%), #0c0c0e; }
.plus-card .crown { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; background: linear-gradient(140deg, #ff7898, #d62b58); box-shadow: 0 10px 30px -8px rgba(255, 61, 110, .8); margin-bottom: 12px; }
.plus-card h3 { font-size: 21px; letter-spacing: -.4px; }
.plus-card ul { margin: 12px 0 16px; padding: 0; list-style: none; display: grid; gap: 10px; color: var(--text); font-size: 14.5px; font-weight: 600; }
.plus-card li { display: flex; gap: 10px; align-items: center; }
.plus-card li .i { color: var(--accent-ink); }
.plus-card .price-l { display: flex; align-items: baseline; gap: 6px; margin-bottom: 14px; }
.plus-card .price-l b { font-size: 28px; font-weight: 800; letter-spacing: -.8px; }
.plus-card .price-l span { color: var(--muted); font-weight: 600; }
.prof-head { display: flex; align-items: center; gap: 14px; padding: 4px 2px 18px; }
.prof-head b { font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.prof-head small { color: var(--muted); font-size: 13px; }
.balance-card { display: flex; align-items: center; gap: 12px; }
.balance-card .label { margin: 0; color: var(--muted); font-size: 13px; font-weight: 700; }
.balance { font-size: 30px; font-weight: 800; display: flex; align-items: center; gap: 8px; letter-spacing: -.8px; line-height: 1.1; }
.balance-card .pill { margin-left: auto; }
.group-t { font-size: 12.5px; color: var(--muted); font-weight: 800; margin: 20px 6px 8px; text-transform: uppercase; letter-spacing: .8px; }
.group { border-radius: 22px; background: var(--surface); border: 1px solid var(--line-2); overflow: hidden; }
.set { display: flex; align-items: center; gap: 12px; padding: 12px 14px; width: 100%; text-align: left; transition: background .15s; }
.set + .set { border-top: 1px solid var(--line); }
button.set:hover, a.set:hover { background: var(--surface-2); }
.set .sq { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; color: #fff; }
.set .tx { flex: 1; min-width: 0; }
.set .tx b { display: block; font-weight: 700; font-size: 15px; }
.set .tx small { display: block; color: var(--muted); font-size: 12.5px; }
.set .val { color: var(--muted); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.streak { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; margin: 14px 0 16px; }
.streak div { min-width: 0; white-space: nowrap; aspect-ratio: 1 / 1.3; font-size: 10px !important; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 700; color: var(--muted); }
.streak div b { font-size: 12.5px; letter-spacing: -.3px; color: var(--text); font-weight: 800; }
.streak div.done { background: var(--accent-soft); border-color: rgba(255, 61, 110, .45); color: var(--accent-ink); }
.streak div.today { border-color: #fff; color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .08); }
.streak div.big { background: linear-gradient(160deg, rgba(245, 185, 66, .18), rgba(245, 185, 66, .04)); border-color: rgba(245, 185, 66, .45); }

.toast { position: fixed; left: 50%; bottom: calc(var(--dock-h) + 38px); transform: translate(-50%, 16px) scale(.96); z-index: 90; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 18px; background: rgba(28, 28, 31, .94); backdrop-filter: blur(16px); border: 1px solid var(--line-2); color: #fff; font-size: 14px; font-weight: 700;
  box-shadow: 0 16px 50px rgba(0, 0, 0, .8); opacity: 0; transition: opacity .25s, transform .3s var(--ease); pointer-events: none; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
body.no-dock .toast { bottom: 150px; }

/* ---------- desktop ---------- */
.side { display: none; }
@media (min-width: 960px) {
  .side { display: flex; flex-direction: column; width: 340px; flex: none; border-right: 1px solid var(--line); background: #000; }
  .side-top { height: 66px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; }
  .side-nav { display: flex; gap: 4px; margin: 0 14px 12px; padding: 5px; border-radius: 22px; background: var(--raised); border: 1px solid var(--line-2); }
  .side-nav a, .side-nav button { position: relative; flex: 1; height: 44px; border-radius: 16px; display: grid; place-items: center; color: var(--muted); border: 1.5px solid transparent; transition: color .15s, background .15s, border-color .15s; }
  .side-nav a:hover { color: #fff; }
  .side-nav { position: relative; }
  .side-nav .on { color: #fff; }
  .side-nav .badge-dot { position: absolute; top: 9px; right: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
  .side-nav .dock-plus span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; }
  .side-search { flex: none; margin: 0 14px 10px; }
  .side-label { padding: 6px 22px; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; }
  .side-list { flex: 1; overflow-y: auto; padding: 0 10px 12px; scrollbar-width: thin; scrollbar-color: #26262a transparent; }
  .side-list .row.on { background: var(--surface-2); }
  .dock { display: none; }
  .page { padding: 0 36px 48px; }
  .page-head, .hero, .chips, .steps, .sticky-cta { margin-left: -36px; margin-right: -36px; padding-left: 36px; padding-right: 36px; }
  .hero-track { padding: 0 36px; }
  .hero-card { width: min(720px, 72%); aspect-ratio: 16 / 9; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
  .home-wrap { max-width: 1120px; margin: 0 auto; }
  .layer { align-items: center; }
  .sheet { border-radius: 30px; border-bottom: 1px solid var(--line-2); max-height: 92dvh; max-width: 460px; transform: translateY(26px) scale(.96); opacity: 0; transition: transform .35s var(--ease), opacity .22s; }
  .layer.open .sheet { opacity: 1; }
  .grab { display: none; }
  .modal { margin-bottom: 0; }
  .form-page, .narrow { max-width: 660px; margin: 0 auto; width: 100%; }
  .chat-head, .msgs > *, .composer, .cool { width: 100%; max-width: 820px; margin-left: auto; margin-right: auto; }
  .msgs > .day, .msgs > .sys, .msgs > .intro { width: auto; }
  .msgs > .start { width: 380px; margin: auto auto 8px; }
  .cool { width: calc(100% - 24px); max-width: 796px; }
  .toast, body.no-dock .toast { bottom: 30px; }
}

/* ---------- chats: suggestions ---------- */
.head-sub { color: var(--muted); font-size: 14px; font-weight: 600; margin-left: -4px; padding-top: 4px; }
.empty.slim { padding: 28px 16px 8px; }
.sec-h { display: flex; justify-content: space-between; align-items: baseline; margin: 26px 2px 12px; }
.sec-h b { font-size: 17px; font-weight: 800; letter-spacing: -.3px; }
.sec-h a { color: var(--muted); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 2px; }
.sec-h a:hover { color: #fff; }
.suggest { display: grid; grid-auto-flow: column; grid-auto-columns: 132px; gap: 10px; overflow-x: auto; margin: 0 -14px; padding: 0 14px 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.suggest::-webkit-scrollbar { display: none; }
.sg { position: relative; aspect-ratio: 3 / 4.2; border-radius: 20px; overflow: hidden; isolation: isolate; border: 1px solid var(--line); scroll-snap-align: start; animation: rise .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); transition: transform .25s var(--ease), border-color .25s; }
.sg:hover { transform: translateY(-3px); border-color: var(--line-3); }
.sg .art img { object-position: 50% 15%; }
.sg::after { content: ''; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, rgba(0, 0, 0, .92)); z-index: 1; }
.sg-b { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 2; display: grid; gap: 2px; }
.sg-b b { font-size: 14px; font-weight: 800; }
.sg-b small { color: rgba(255, 255, 255, .62); font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-b b { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sg-on { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--online); }

/* ---------- bonus ---------- */
.spend { display: grid; gap: 2px; margin: 10px 0 14px; border-radius: 16px; overflow: hidden; }
.spend div { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 12px; background: var(--surface-2); font-size: 14px; font-weight: 600; }
.spend span { display: inline-flex; align-items: center; gap: 9px; color: var(--text-2, #d6d6da); }
.spend b { font-weight: 800; white-space: nowrap; }
.spend s { color: var(--muted); font-weight: 600; margin-right: 4px; }
.daily .btn .i { margin-left: 2px; }

/* ---------- profile ---------- */
.plus-badge { display: inline-block; vertical-align: 2px; margin-left: 6px; padding: 2px 7px; border-radius: 6px; background: linear-gradient(140deg, #ff7898, #d62b58); font-size: 10.5px; font-weight: 800; letter-spacing: .6px; }
.prof-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 12px; }
.prof-stats div { padding: 12px 8px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line-2); text-align: center; animation: rise .45s var(--ease) both; }
.prof-stats b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.4px; }
.prof-stats span { color: var(--muted); font-size: 12px; font-weight: 600; }
.plus-card li span { flex: 1; }
.soon-t { font-style: normal; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: rgba(255, 255, 255, .08); color: var(--muted); }

/* ---------- top-up ---------- */
.topup h3 { margin: 2px 0 4px; }
.topup-sub { margin: 0 0 14px; color: var(--muted); font-size: 13.5px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.topup-sub b { color: #fff; }
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pack { position: relative; display: grid; justify-items: center; gap: 4px; padding: 18px 6px 12px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line-2); transition: transform .2s var(--ease), border-color .2s, background .2s; animation: rise .4s var(--ease) both; animation-delay: calc(var(--i) * 50ms); }
.pack:hover { transform: translateY(-2px); border-color: var(--line-3); }
.pack.hot { border-color: rgba(255, 61, 110, .7); background: radial-gradient(120% 90% at 50% 0, rgba(255, 61, 110, .25), transparent 70%), var(--surface); }
.pk-tag { position: absolute; top: -9px; padding: 2px 9px; border-radius: 99px; background: var(--accent); font-size: 11px; font-weight: 800; }
.pack:not(.hot) .pk-tag { background: #2a2a30; color: var(--accent-ink); }
.pk-coins { display: inline-flex; align-items: center; gap: 5px; font-size: 19px; font-weight: 800; letter-spacing: -.4px; }
.pk-price { font-size: 14px; font-weight: 700; }
.pack small { color: var(--muted); font-size: 11.5px; font-weight: 600; }
.pack.hot small { color: var(--accent-ink); }
.topup-plus { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 12px; padding: 11px; border-radius: 14px; background: rgba(255, 61, 110, .1); border: 1px solid rgba(255, 61, 110, .28); color: #ffc4d2; font-size: 13px; font-weight: 700; text-align: center; }

/* ---------- sidebar promo ---------- */
.side-foot { display: none; }
@media (min-width: 960px) {
  .side-foot { display: block; padding: 10px 12px 14px; border-top: 1px solid var(--line); }
  .side-plus { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 18px; background: radial-gradient(120% 160% at 0 100%, rgba(255, 61, 110, .28), transparent 60%), #0c0c0e; border: 1px solid rgba(255, 61, 110, .32); transition: border-color .2s, transform .2s var(--ease); }
  .side-plus:hover { border-color: rgba(255, 61, 110, .7); transform: translateY(-1px); }
  .sp-stack { display: flex; flex: none; }
  .sp-stack img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; object-position: 50% 15%; border: 2px solid #0c0c0e; }
  .sp-stack img + img { margin-left: -11px; }
  .side-plus .tx { flex: 1; min-width: 0; display: grid; gap: 1px; }
  .side-plus b { font-size: 14px; font-weight: 800; }
  .side-plus b i { font-style: normal; background: linear-gradient(90deg, #ffc4d2, #ff3d6e); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .side-plus small { color: var(--muted); font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sp-price { flex: none; height: 28px; padding: 0 10px; border-radius: 99px; display: inline-flex; align-items: center; background: #fff; color: #000; font-size: 12.5px; font-weight: 800; }
  .suggest { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); overflow: visible; margin: 0; padding: 0; }
  .narrow.wide { max-width: 1040px; }
  .bonus-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
  .bonus-grid .panel { margin: 0; }
  .bonus-grid .daily { grid-column: 1 / -1; }
  .prof-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
  .prof-grid .group-t:first-child { margin-top: 4px; }
  .pc-fan { width: 170px; height: 150px; right: 14px; }
  .pc-fan img { width: 82px; height: 110px; right: calc(var(--k) * 40px); }
  .pc-head { min-height: 140px; padding-right: 170px; }
  .pc h3 { font-size: 24px; }
  .bonus-grid .streak div { aspect-ratio: auto; height: 74px; font-size: 12px !important; }
  .bonus-grid .streak div b { font-size: 16px; }
  .page-head .pill { display: none; }
}

/* ---------- create card ---------- */
.card.create { border-color: rgba(255, 61, 110, .45); background: #08080a; }
.cc-mosaic { position: absolute; inset: 0; z-index: 0; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; overflow: hidden; }
.cc-mosaic img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; filter: blur(5px) brightness(.38) saturate(1.25); transform: scale(1.18); transition: transform .6s var(--ease), filter .4s; }
.card.create:hover .cc-mosaic img { transform: scale(1.26); filter: blur(4px) brightness(.48) saturate(1.3); }
.card.create::before { content: ''; position: absolute; inset: 0; z-index: 0; background: radial-gradient(85% 55% at 50% 40%, rgba(255, 61, 110, .5), transparent 70%), linear-gradient(transparent 50%, rgba(0, 0, 0, .92)); }
.cc-center { position: absolute; top: 42%; left: 50%; transform: translate(-50%, -50%); z-index: 1; display: grid; justify-items: center; gap: 12px; }
.cc-plus { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .14); backdrop-filter: blur(14px); border: 1px solid rgba(255, 255, 255, .4); animation: ccpulse 2.6s ease-out infinite; }
@keyframes ccpulse { 0% { box-shadow: 0 0 0 0 rgba(185, 140, 255, .6); } 70% { box-shadow: 0 0 0 18px rgba(185, 140, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(185, 140, 255, 0); } }
.cc-sale { height: 24px; padding: 0 10px; border-radius: 99px; display: inline-flex; align-items: center; background: var(--accent); font-size: 12px; font-weight: 800; box-shadow: 0 6px 18px -4px rgba(255, 61, 110, .8); }

/* ---------- plus card ---------- */
.pc { position: relative; overflow: hidden; padding: 20px; border: 1px solid rgba(255, 61, 110, .38); background: radial-gradient(110% 80% at 100% 0, rgba(255, 61, 110, .34), transparent 60%), radial-gradient(70% 60% at 0 100%, rgba(255, 61, 110, .12), transparent 70%), #0c0c0e; }
.pc-fan { position: absolute; top: 22px; right: 10px; width: 130px; height: 120px; pointer-events: none; }
.pc-fan img { position: absolute; top: 4px; right: calc(var(--k) * 30px); width: 66px; height: 90px; object-fit: cover; object-position: 50% 15%; border-radius: 16px; border: 2px solid #0c0c0e; transform: rotate(var(--r)); box-shadow: 0 14px 30px rgba(0, 0, 0, .65); }
.pc-head { position: relative; z-index: 1; min-height: 118px; padding-right: 132px; }
.pc-badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 99px; background: linear-gradient(140deg, #ff7898, #d62b58); font-size: 11.5px; font-weight: 800; letter-spacing: .6px; }
.pc h3 { margin: 12px 0 6px; font-size: 21px; font-weight: 800; letter-spacing: -.6px; line-height: 1.1; }
.pc p { margin: 0; color: var(--text-2); font-size: 13.5px; line-height: 1.45; }
.pc-feats { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 16px; }
.pc-feats span { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 10px 11px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); font-size: 13px; font-weight: 700; line-height: 1.25; }
.pc-feats i { font-style: normal; flex: 1; min-width: 0; }
.pc-feats .i { color: var(--accent-ink); flex: none; }
.pc-feats .soon { color: var(--muted); }
.pc-feats .soon .i { color: var(--muted); }
.pc-feats i small { display: block; margin-top: 2px; font-size: 11px; font-weight: 700; color: rgba(255, 255, 255, .35); text-transform: uppercase; letter-spacing: .5px; }
.pc-btn { position: relative; z-index: 1; width: 100%; height: 58px; border-radius: 18px; display: flex; align-items: center; justify-content: space-between; padding: 0 8px 0 20px; background: #fff; color: #000; font-weight: 800; font-size: 16px; transition: transform .15s, background .15s; }
.pc-btn:hover { background: #ececf1; }
.pc-btn:active { transform: scale(.985); }
.pc-btn b { height: 42px; padding: 0 14px; border-radius: 13px; display: inline-flex; align-items: center; gap: 2px; background: #000; color: #fff; font-size: 15px; }
.pc-btn small { color: var(--muted); font-weight: 700; font-size: 12px; }
.pc.active .pc-btn { justify-content: center; background: var(--surface-2); color: #fff; border: 1px solid var(--line-2); }

/* ---------- welcome ---------- */
body.locked { overflow: hidden; }
.welcome { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: #000; transition: opacity .4s; }
.welcome.out { opacity: 0; pointer-events: none; }
.w-card { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; overflow: hidden; background: #000; }
.w-art { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.w-tiles { position: absolute; top: -18%; left: -38%; right: -38%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; transform: rotate(-16deg); animation: wdrift 28s ease-in-out infinite alternate; }
.w-tiles span { aspect-ratio: 3 / 4; border-radius: 28px; overflow: hidden; background: var(--surface); animation: wtile .8s var(--ease) both; animation-delay: calc(var(--i) * 60ms); }
.w-tiles img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; filter: brightness(.62) saturate(1.1); }
@keyframes wdrift { to { transform: rotate(-16deg) translateY(-8%); } }
@keyframes wtile { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
.w-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .35) 0, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, .55) 65%, #000 100%); }
.w-body { position: relative; z-index: 1; margin-top: -60px; padding: 0 22px calc(env(safe-area-inset-bottom) + 22px); text-align: center; animation: rise .7s .25s var(--ease) both; }
.w-body h1 { margin: 0 0 10px; font-size: 27px; font-weight: 800; letter-spacing: -.8px; line-height: 1.15; }
.w-body h1 .logo { font-size: inherit; vertical-align: baseline; }
.w-body p { margin: 0 auto 22px; max-width: 380px; color: var(--text-2); font-size: 15px; line-height: 1.5; }
.w-go { max-width: 440px; }
.w-body small { display: block; max-width: 380px; margin: 14px auto 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.w-body small a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }
@media (min-width: 960px) {
  .welcome { background: rgba(0, 0, 0, .86); backdrop-filter: blur(10px); }
  .w-card { width: 460px; height: min(840px, 94dvh); border-radius: 32px; border: 1px solid var(--line-2); box-shadow: 0 40px 120px -20px rgba(255, 61, 110, .35); }
}

/* ---------- motion ---------- */
a, button { -webkit-tap-highlight-color: transparent; }
.nav-ind { position: absolute; left: 0; top: 0; z-index: 0; border-radius: 18px; border: 1.5px solid rgba(255, 255, 255, .9); background: rgba(255, 255, 255, .05); pointer-events: none; opacity: 0; transition: transform .5s cubic-bezier(.3, 1.35, .45, 1), width .4s var(--ease), height .4s var(--ease), opacity .2s; }
.side-nav .nav-ind { border-radius: 16px; }
.dock > a, .dock > button, .side-nav > a, .side-nav > button { z-index: 1; }
.dock .on .i, .side-nav .on .i { animation: navpop .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes navpop { 0% { transform: scale(.8); } 60% { transform: scale(1.12); } 100% { transform: none; } }
.dock { animation: dockin .5s var(--ease) backwards; }
@keyframes dockin { from { transform: translate(-50%, 130%); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }
.dock .dock-plus span { transition: transform .45s cubic-bezier(.3, 1.4, .5, 1); }
body.menu-open .dock .dock-plus span, body.menu-open .side-nav .dock-plus span { transform: rotate(135deg); }

/* page transitions (View Transitions API) */
#view { view-transition-name: page; }
#dock { view-transition-name: dock; }
#side { view-transition-name: side; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
::view-transition-old(dock), ::view-transition-old(side) { display: none; }
::view-transition-new(dock), ::view-transition-new(side) { animation: none; }
::view-transition-group(page) { animation-duration: .45s; }
::view-transition-old(page) { animation: .24s cubic-bezier(.4, 0, 1, 1) both vt-out-f; }
::view-transition-new(page) { animation: .45s cubic-bezier(.2, .85, .25, 1) both vt-in-f; }
html[data-nav="back"]::view-transition-old(page) { animation-name: vt-out-b; }
html[data-nav="back"]::view-transition-new(page) { animation-name: vt-in-b; }
@keyframes vt-out-f { to { opacity: 0; transform: translateX(-5%) scale(.97); filter: blur(2px); } }
@keyframes vt-in-f { from { opacity: 0; transform: translateX(7%); } }
@keyframes vt-out-b { to { opacity: 0; transform: translateX(5%) scale(.97); filter: blur(2px); } }
@keyframes vt-in-b { from { opacity: 0; transform: translateX(-7%); } }

/* filters, tabs, search */
.grid { transition: opacity .15s, transform .15s var(--ease); }
.grid.swap { opacity: 0; transform: translateY(8px) scale(.99); }
.grid.quick .card { animation-duration: .3s; animation-delay: calc(var(--i, 0) * 18ms); }
.chip, .seg button, .pill, .btn-white, .btn-glass { transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease); }
.chip:active, .seg button:active, .pill:active { transform: scale(.94); }
.chip.on { animation: chippop .4s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes chippop { 0% { transform: scale(.9); } 60% { transform: scale(1.06); } 100% { transform: none; } }
.seg button.on { animation: chippop .4s cubic-bezier(.3, 1.6, .5, 1); }
.toolbar .seg { max-width: 220px; overflow: hidden; transition: max-width .4s var(--ease), opacity .25s, margin .4s var(--ease); }
.toolbar:focus-within .seg { max-width: 0; opacity: 0; margin-right: -8px; }
.search { transition: border-color .25s, background .25s, box-shadow .25s; }
.search:focus-within { border-color: rgba(255, 61, 110, .65); box-shadow: 0 0 0 4px rgba(255, 61, 110, .16); }
.search .i { transition: color .25s, transform .3s var(--ease); }
.search:focus-within .i { color: var(--accent-ink); transform: scale(1.1); }

/* create menu */
.layer.open .create-grid button { animation: popin .45s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: calc(var(--i, 0) * 45ms + 60ms); }
@keyframes popin { from { opacity: 0; transform: translateY(12px) scale(.9); } to { opacity: 1; transform: none; } }

/* ---------- character sheet ---------- */
.character-page { padding: 0 0 max(24px, env(safe-area-inset-bottom)); background: #0b0b0d; }
.character-top { position: sticky; top: 0; z-index: 5; height: 58px; max-width: 760px; margin: 0 auto -58px; padding: 10px 14px; pointer-events: none; }
.character-top .icon-btn { width: 44px; height: 44px; pointer-events: auto; background: rgba(19, 16, 23, .77); color: #fff; border-color: rgba(255, 255, 255, .28);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.character-layout { width: 100%; max-width: 760px; margin: 0 auto; }
.cs-hero { position: relative; min-height: 290px; height: clamp(320px, 58dvh, 540px); isolation: isolate; }
.cs-hero .art img { animation: none; object-position: 50% 10%; }
.cs-hero::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, .18), transparent 26%, transparent 42%, rgba(11, 11, 13, .72) 79%, #0b0b0d); }
.character-portrait { position: absolute; inset: 0; border-radius: 0; cursor: zoom-in; }
.character-portrait:focus-visible { outline-offset: -4px; }
.cs-title { position: absolute; left: 18px; right: 18px; bottom: 10px; z-index: 2; pointer-events: none; }
.cs-title h1 { margin: 0; font-size: clamp(27px, 6.5vw, 39px); font-weight: 800; letter-spacing: -.035em; line-height: 1.12; overflow-wrap: anywhere; }
.cs-title p { margin: 7px 0 0; display: flex; flex-wrap: wrap; gap: 3px 9px; color: var(--text-2); font-size: 14px; }
.cs-title .on { display: inline-flex; align-items: center; gap: 5px; color: var(--online); font-weight: 700; }
.cs-title .on::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--online); }
.cs-title .character-message-count { margin-top: 7px; color: var(--muted); }
.cs-body { padding: 10px 16px 0; }
.character-actions { display: flex; gap: 9px; margin-bottom: 16px; }
.character-actions .cs-start { flex: 1; min-height: 48px; border-radius: 16px; font-size: 15px; }
.character-fav { flex: 0 0 48px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); color: var(--text-2); }
.character-fav:hover { background: var(--surface-2); }
.character-fav.on { color: #f5c46a; border-color: rgba(245, 185, 66, .4); }
.character-panel { margin: 12px 0; padding: 15px; border: 1px solid var(--line-2); border-radius: 19px; background: var(--surface); }
.character-panel h2 { margin: 0 0 10px; font-size: 16px; }
.character-panel .about { margin: 0; color: var(--text-2); font-size: 15px; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.character-panel .traits { margin-top: 10px; }
.cs-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.layer.character-preview-layer .scrim { background: rgba(5, 3, 8, .48); -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px); }
.sheet.character-preview { position: relative; display: flex; flex-direction: column; width: 100%; max-width: 560px;
  height: calc(100% - clamp(44px, 8.5dvh, 68px)); max-height: none; overflow: hidden; border-radius: 24px 24px 0 0; background: #171319;
  border: 1px solid var(--line-2); border-bottom: 0; }
.character-preview-grip { position: absolute; z-index: 4; top: 5px; left: 50%; transform: translateX(-50%);
  width: 39px; height: 4px; border-radius: 99px; background: rgba(255, 255, 255, .62); box-shadow: 0 1px 5px rgba(0, 0, 0, .48); pointer-events: none; }
.character-preview-close { position: absolute; right: 10px; top: 11px; z-index: 5; width: 36px; height: 36px;
  background: rgba(19, 15, 23, .58); color: #fff; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.character-preview-content { flex: 1; min-height: 0; overflow: clip; }
.character-preview .character-layout { display: flex; flex-direction: column; height: 100%; }
.character-preview .cs-hero { flex: none; min-height: 0; height: clamp(300px, calc(100dvh - 303px), 575px); max-height: max(0px, calc(100% - 154px)); }
.character-preview .cs-hero .art img { object-position: 50% 12%; }
.character-preview .cs-hero::after { background: linear-gradient(transparent 38%, rgba(14, 11, 16, .13) 60%, rgba(16, 12, 17, .72) 92%, #18141a); }
.character-preview .cs-title { bottom: 11px; left: 16px; right: 16px; }
.character-preview .cs-title h1 { font-size: clamp(24px, 5.4vw, 29px); }
.character-preview .cs-title p { margin-top: 5px; }
.character-preview .cs-body { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; isolation: isolate; padding: 0; background: #18141a; }
.character-preview .character-details { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 2px 16px 14px; scrollbar-width: none; }
.character-preview .character-details::-webkit-scrollbar { display: none; }
.character-backdrop { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.character-backdrop img { position: absolute; inset: -20px; width: calc(100% + 40px); height: calc(100% + 40px); object-fit: cover;
  object-position: 50% 62%; opacity: .86; filter: blur(25px) saturate(.83); }
.character-backdrop::after { content: ''; position: absolute; inset: 0; background: linear-gradient(#18141a, rgba(17, 13, 19, .28) 34%, rgba(19, 15, 21, .49) 78%, #18141a); }
.character-preview .character-description { margin: 0 0 6px; padding: 2px 0; border: 0; background: none; }
.character-preview .about.short { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.character-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 3px; min-height: 32px; color: var(--text-2); font-size: 13px; }
.character-more .i { transform: rotate(90deg); }
.character-more[aria-expanded="true"] .i { transform: rotate(-90deg); }
.character-preview .rating-note { margin: 0 0 8px; color: var(--text-2); }
.character-preview .cs-acts { column-gap: 8px; justify-content: space-between; }
.character-preview .rate, .character-preview .character-fav { border-radius: 99px; min-height: 38px; height: 38px; background: rgba(255, 255, 255, .075); }
.character-preview .character-fav { flex: 0 1 auto; padding: 0 11px; display: inline-flex; gap: 5px; align-items: center; font-size: 13px; }
.character-preview .rate.on { background: var(--accent-soft); }
.character-preview-cta { padding: 9px 16px max(11px, env(safe-area-inset-bottom), var(--tg-safe-area-inset-bottom, 0px)); background: #18141a; }
.character-preview-cta .cs-start { height: 46px; border-radius: 15px; background: #9d56c8; }
.character-preview-cta .cs-start:hover { background: #ae67d7; }
@media (max-width: 360px) {
  .character-preview .character-details { padding-inline: 12px; }
  .character-preview .cs-acts { column-gap: 5px; }
  .character-preview .rating-actions { gap: 4px; }
  .character-preview .rate, .character-preview .character-fav { padding-inline: 7px; font-size: 12px; }
}
@media (min-width: 960px) {
  .sheet.character-preview { height: min(845px, calc(100% - 50px)); border-radius: 24px; border-bottom: 1px solid var(--line-2); }
  .character-preview .character-layout { padding-top: 0; }
  .character-preview .cs-hero { border-radius: 0; }
}
@media (min-width: 960px) {
  .page.character-page { padding: 0 22px 30px; }
  .character-layout { padding-top: 12px; }
  .character-top { padding-left: 18px; }
  .cs-hero { border-radius: 24px 24px 0 0; overflow: hidden; }
  .cs-hero .art img { object-position: 50% 14%; }
  .cs-body { padding: 10px 22px 0; }
  .cs-title { left: 24px; right: 24px; }
}
.rating-actions { display: flex; gap: 6px; }
.cs-acts .rate { flex: none; min-width: 44px; height: 44px; padding: 0 11px; border-radius: 12px; font-size: 13px; font-variant-numeric: tabular-nums; gap: 6px; }
.rating-note { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.cs-compose { display: flex; align-items: center; gap: 8px; height: 56px; padding: 6px 6px 6px 18px; border-radius: 28px; background: #17171a; border: 1px solid var(--line-2); transition: border-color .2s, box-shadow .2s; }
.cs-compose:focus-within { border-color: var(--line-3); box-shadow: 0 0 0 4px rgba(255, 255, 255, .03); }
.cs-in { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-size: 15px; }
.cs-in::placeholder { color: var(--muted); }
.cs-compose .send { width: 44px; padding: 0; }
.cs-compose .send .i { transform: translateX(-1px); }
.cs-compose .send:hover { background: #e0305d; }
.cs-compose .send:active { transform: scale(.92); }
/* =========================================================
   Редизайн v24: иконки, монета, навигация, Plus, без свечений
   ========================================================= */
:root { --dock-h: 60px; }
i.i { width: 1em; height: 1em; line-height: 1; font-style: normal; display: block; }
svg.coin { flex: none; display: block; }
.coin { color: inherit; }
.pill { gap: 7px; padding: 0 14px 0 9px; }

/* без неоновых свечений: акцент — только цвет */
.btn.primary { box-shadow: none; }
.btn.primary:hover { background: var(--accent-hover); }
.cc-sale { box-shadow: none; background: var(--accent); }
.cc-plus { animation: none; width: 54px; height: 54px; background: #fff; color: #000; border: 0; backdrop-filter: none; }
.send { box-shadow: none; }

.side-nav .dock-plus span { width: auto; height: auto; border-radius: 0; display: inline; background: none; color: inherit; transform: none !important; }
.side-nav .dock-plus .i { color: var(--accent); }
.nav-ind { display: none; }

@media (min-width: 960px) {
  .side-nav { flex-direction: column; gap: 2px; margin: 2px 10px 14px; padding: 0; border: 0; border-radius: 0; background: none; }
  .side-nav a, .side-nav button { flex: none; height: 42px; padding: 0 12px; border: 0; border-radius: 12px; display: flex; align-items: center; justify-content: flex-start; gap: 13px;
    color: var(--text-2); font-size: 14.5px; font-weight: 700; text-align: left; }
  .side-nav a:hover, .side-nav button:hover { background: var(--surface); color: #fff; }
  .side-nav .on { background: var(--surface-2); color: #fff; }
  .side-nav .badge-dot { position: static; margin-left: auto; width: 7px; height: 7px; }
  .side-label { padding-top: 10px; border-top: 1px solid var(--line); margin: 0 10px; padding-left: 12px; }

  .side-plus { gap: 12px; padding: 10px 12px 10px 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-2); }
  .side-plus:hover { border-color: var(--line-3); transform: none; }
  .side-plus img { width: 40px; height: 40px; flex: none; border-radius: 10px; object-fit: cover; object-position: 50% 14%; }
  .side-plus b { font-size: 14px; }
  .side-plus small { font-size: 12px; }
  .sp-price { background: none; color: #fff; padding: 0; height: auto; font-size: 13.5px; }
}

/* Plus в профиле: фото справа, список, одна кнопка */
.p2 { position: relative; overflow: hidden; padding: 0; background: #0d0d0f; border: 1px solid var(--line-2); }
.p2-img { position: absolute; top: 0; right: 0; width: 46%; height: 100%; object-fit: cover; object-position: 50% 12%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 55%); mask-image: linear-gradient(90deg, transparent, #000 55%); opacity: .9; }
.p2-body { position: relative; padding: 20px 18px 18px; }
.p2-k { display: block; color: var(--accent); font-size: 12.5px; font-weight: 800; letter-spacing: .3px; }
.p2 h3 { margin: 6px 0 14px; max-width: 62%; font-size: 21px; line-height: 1.15; letter-spacing: -.5px; font-weight: 800; }
.p2 ul { margin: 0 0 18px; padding: 0; list-style: none; display: grid; gap: 9px; max-width: 70%; }
.p2 li { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 600; color: var(--text); }
.p2 li .i { color: var(--accent); }
.p2 li.soon { color: var(--muted); }
.p2 li.soon .i { color: var(--muted); }
.p2 .btn { position: relative; height: 52px; font-size: 15px; border-radius: 16px; }
.p2.on .p2-k { font-size: 15px; color: #fff; }
.p2.on p { margin: 6px 0 14px; color: var(--muted); font-size: 14px; }

/* бонусы */
.daily { background: var(--surface); border: 1px solid var(--line-2); }
.dl-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.dl-head h3 { margin: 0; font-size: 18px; }
.dl-head span { color: var(--muted); font-size: 13px; font-weight: 700; white-space: nowrap; }
.daily p { margin: 6px 0 0; }
.streak div.done { background: rgba(255, 61, 110, .1); border-color: rgba(255, 61, 110, .35); color: var(--accent); }
.streak div.big { background: rgba(245, 185, 66, .08); border-color: rgba(245, 185, 66, .4); }
.bonus-grid .group-t:first-child { margin-top: 4px; }
.set .val { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; color: #fff; white-space: nowrap; }
.set .val s { color: var(--muted); font-weight: 600; margin-right: 2px; }
.mini-btn { flex: none; height: 32px; padding: 0 14px; border-radius: 99px; display: inline-flex; align-items: center; background: #fff; color: #000; font-size: 13px; font-weight: 800; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
/* превью «Так её увидят в каталоге»: как карточка каталога, без плашек */
.preview-wrap .card.pv { width: 128px; }
.card.pv .art::before { animation: none; }
.pv-ph { position: absolute; inset: 0 0 34% 0; display: grid; place-items: center; color: rgba(255, 255, 255, .28); z-index: 1; }
.card.pv .card-info { padding: 10px; }
.card.pv .card-info b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.pv .card-info .d { font-size: 12px; }

/* ---------- своя аватарка ---------- */
.ava-pick { display: flex; gap: 16px; align-items: center; padding: 14px; margin: 4px 0 18px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line-2); }
.ap-tile { flex: none; width: 96px; aspect-ratio: 3 / 4; border-radius: 16px; display: grid; place-items: center; overflow: hidden; color: var(--muted); background: var(--surface-3); border: 1.5px dashed var(--line-3); transition: border-color .2s, color .2s; }
.ap-tile:hover { color: #fff; border-color: rgba(255, 255, 255, .5); }
.ava-pick.has .ap-tile { border: 0; }
.ap-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ap-tx { min-width: 0; display: grid; gap: 6px; justify-items: start; }
.ap-tx b { font-weight: 800; font-size: 15.5px; }
.ap-tx p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.ap-tx .mini-btn { margin-top: 4px; }
.card.pv .art img.ok { width: 100%; height: 100%; object-fit: cover; }
.cs-own { display: flex; gap: 8px; margin-top: 14px; }
.own-btn { flex: 1; height: 42px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 13.5px; font-weight: 800; background: var(--surface); border: 1px solid var(--line-2); transition: background .2s, color .2s, border-color .2s; }
.own-btn:hover { background: var(--surface-3); }
.own-btn.del { flex: none; padding: 0 16px; color: var(--danger); }
.own-btn.del.armed { background: var(--danger); border-color: var(--danger); color: #fff; }
.own-btn.star { flex: none; width: 42px; padding: 0; }
.own-btn.star.on { color: #ffcf4a; }

/* ---------- необязательный блок 18+ в форме ---------- */
details.opt { margin: 0 0 16px; }
details.opt summary { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 12px; font-size: 13.5px; font-weight: 800; cursor: pointer; list-style: none; background: var(--surface); border: 1px solid var(--line-2); }
details.opt summary::-webkit-details-marker { display: none; }
details.opt summary small { color: var(--muted); font-weight: 600; }
details.opt[open] summary { display: none; }
.btn.busy { opacity: .7; pointer-events: none; }
.btn.busy .i { animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================================
   v39: прежний вид чата, рабочие дополнения
   ========================================================= */
.retry-btn { align-self: center; height: 38px; padding: 0 16px; margin: 2px 0 6px; border-radius: 99px; display: inline-flex; align-items: center; gap: 7px; background: rgba(17, 17, 19, .9); border: 1px solid var(--line-2); font-weight: 800; font-size: 14px; transition: background .15s; animation: enter .3s var(--ease) both; }
.retry-btn:hover { background: var(--surface-3); }
.sys.err { color: #ff9db0; }
.msgs > .retry-btn { width: auto; }

/* меню чата (три точки) */
.layer.pop-l { align-items: flex-start; justify-content: flex-end; }
.layer.pop-l .scrim { background: transparent; backdrop-filter: none; }
.pop { position: relative; margin: calc(env(safe-area-inset-top) + 64px) 10px 0 0; width: 280px; max-width: calc(100vw - 16px); padding: 6px 0; border-radius: 14px; background: #1c1c1f; border: 1px solid var(--line-2); box-shadow: 0 18px 50px rgba(0, 0, 0, .6); transform-origin: top right; transform: scale(.9); opacity: 0; transition: transform .22s var(--ease), opacity .16s; }
.layer.open .pop { transform: none; opacity: 1; }
.pop > button { width: 100%; height: 46px; padding: 0 16px; display: flex; align-items: center; gap: 14px; font-size: 15px; font-weight: 600; text-align: left; color: #f2f2f4; }
.pop > button .i { color: var(--text-2); }
.pop > button:hover { background: rgba(255, 255, 255, .06); }
.pop > button.danger, .pop > button.danger .i { color: #ff6b81; }
.pop .switch { margin-left: auto; width: 40px; height: 24px; pointer-events: none; }
.pop .switch::after { width: 18px; height: 18px; }
.pop .switch.on::after { transform: translateX(16px); }
.pop-sub { padding: 8px 16px 10px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 4px 0; }
.pop-sub > span { display: flex; align-items: center; gap: 14px; font-size: 15px; font-weight: 600; margin-bottom: 9px; }
.pop-sub > span .i { color: var(--text-2); }
.pop .len-seg button { height: 34px; font-size: 13px; border-radius: 10px; padding: 0 6px; }
.pop-sub:last-child { border-bottom: 0; margin-bottom: 0; }

/* профиль, документы, поддержка */
.len-seg { margin-bottom: 4px; }
.create-grid button:last-child { grid-column: auto; }
.doc { padding: 4px 2px 40px; }
.doc h3 { margin: 22px 0 6px; font-size: 17px; font-weight: 800; letter-spacing: -.2px; }
.doc h3:first-child { margin-top: 8px; }
.doc p { margin: 0; color: var(--text-2); font-size: 15px; line-height: 1.6; }
.doc-links { margin-top: 30px; display: grid; gap: 8px; }
.doc-links a { display: flex; align-items: center; justify-content: space-between; height: 50px; padding: 0 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-2); font-weight: 700; }
.doc-links a:hover { background: var(--surface-2); }
.support textarea, .support input { width: 100%; display: block; border: 1px solid var(--line-2); background: var(--surface); border-radius: 16px; padding: 12px 14px; outline: 0; font-size: 16px; margin-bottom: 10px; color: inherit; }
.support textarea { min-height: 120px; resize: vertical; }
.support textarea:focus, .support input:focus { border-color: var(--line-3); }

/* вход через Google */
.google-btn { background: #fff; color: #1f1f1f; margin: 4px 0 0; height: 52px; font-size: 15.5px; gap: 12px; }
.google-btn:hover { background: #ececef; }
.login { text-align: center; }
.login p { margin: 0 0 18px; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.login small { display: block; margin-top: 16px; color: var(--faint, var(--muted)); font-size: 12px; line-height: 1.5; }
.login small a { color: var(--text-2); text-decoration: underline; }
.gbtn { min-height: 44px; display: flex; justify-content: center; align-items: center; }
.gbtn-wait { color: var(--muted); font-size: 13.5px; }

/* ---------- вход: Google, Telegram, почта; лимит сообщений гостя ---------- */
.gate { padding: 28px 22px 20px; overflow: hidden; max-height: calc(100dvh - 24px); overflow-y: auto; }
.gate::before { content: ""; position: absolute; left: 50%; top: -150px; width: 380px; height: 300px; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 61, 110, .26), rgba(255, 61, 110, 0)); }
.gate > * { position: relative; }
.gate h3 { margin-bottom: 8px; font-size: 22px; }
.gate .gate-sub { margin: 0 auto 18px; max-width: 330px; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.gate-hero { position: relative; width: 84px; height: 84px; margin: 0 auto 16px; }
.gate-hero .ava { width: 84px; height: 84px; font-size: 30px; box-shadow: 0 0 0 3px #0b0b0c, 0 0 0 5px var(--accent), 0 14px 40px -6px rgba(255, 61, 110, .6); }
.gate-lock { position: absolute; right: -4px; bottom: -2px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: #fff; box-shadow: 0 0 0 3px #0b0b0c; }
.perks { list-style: none; margin: 0 0 18px; padding: 12px 14px; display: grid; gap: 9px; text-align: left; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.perks li { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; color: var(--text-2); }
.perks .i { color: var(--online); flex: none; }
.auth { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; animation: enter .3s var(--ease) both; }
.auth .gbtn { min-height: 40px; min-width: 0; color-scheme: light; } /* иначе тёмная тема рисует белый прямоугольник под кнопкой Google */
.tg-btn { height: 40px; border-radius: 99px; background: #2aabee; color: #fff; font-size: 15px; gap: 10px; }
.tg-btn:hover { background: #3db5f2; }
.or { display: flex; align-items: center; gap: 12px; margin: 6px 0 2px; color: var(--faint); font-size: 12.5px; font-weight: 700; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.email-form { display: flex; gap: 8px; }
.email-form input, .code-in { flex: 1; min-width: 0; height: 48px; padding: 0 16px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface); color: inherit; font-size: 16px; outline: 0; transition: border-color .15s, background .15s; }
.email-form input:focus, .code-in:focus { border-color: rgba(255, 61, 110, .55); background: var(--surface-2); }
.email-form .btn { flex: none; width: auto; height: 48px; padding: 0 16px; border-radius: 16px; font-size: 14.5px; box-shadow: none; }
.code-form { display: grid; gap: 10px; }
.code-form p { margin: 0 0 4px; font-size: 14px; }
.code-form p b { color: var(--text); }
.code-ic, .tg-orb { width: 52px; height: 52px; margin: 0 auto 2px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.code-in { width: 100%; height: 60px; text-align: center; font-size: 28px; font-weight: 800; letter-spacing: 12px; padding-left: 28px; font-variant-numeric: tabular-nums; }
.code-in::placeholder { color: var(--surface-3); }
.code-form .btn { height: 50px; }
.code-form.shake .code-in { animation: shake .35s; border-color: var(--danger); }
.code-links { display: flex; justify-content: center; align-items: center; gap: 8px; color: var(--faint); font-size: 13px; }
.link-btn { color: var(--text-2); font-size: 13px; font-weight: 700; padding: 6px 2px; }
.link-btn:hover { color: var(--text); }
.link-btn:disabled { color: var(--faint); cursor: default; }
.tg-wait { display: grid; gap: 10px; justify-items: center; }
.tg-orb { width: 64px; height: 64px; border-radius: 50%; background: #2aabee; color: #fff; animation: tgpulse 1.8s infinite; }
@keyframes tgpulse { 0% { box-shadow: 0 0 0 0 rgba(42, 171, 238, .55); } 70% { box-shadow: 0 0 0 18px rgba(42, 171, 238, 0); } 100% { box-shadow: 0 0 0 0 rgba(42, 171, 238, 0); } }
.tg-wait b { font-size: 16px; margin-top: 4px; }
.tg-wait p { margin: 0; font-size: 14px; max-width: 320px; }
.tg-wait p span { color: #6cc8f5; font-weight: 700; }
.tg-status { display: inline-flex; align-items: center; gap: 8px; margin: 2px 0 6px; padding: 7px 14px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-size: 13px; font-weight: 700; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-3); border-top-color: #2aabee; animation: spin .8s linear infinite; }
.tg-wait .btn { height: 46px; font-size: 14.5px; }

/* в чате: сколько осталось и карточка, когда бесплатные кончились */
.quota { align-self: center; display: inline-flex; align-items: center; gap: 8px; margin: 6px 0 4px; padding: 6px 6px 6px 12px; border-radius: 99px;
  background: var(--surface); border: 1px solid var(--line-2); color: var(--muted); font-size: 12.5px; font-weight: 700; animation: enter .3s var(--ease) both; }
.quota .i { color: var(--accent-ink); }
.quota button { height: 26px; padding: 0 12px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-ink); font-size: 12.5px; font-weight: 800; }
.quota button:hover { background: rgba(255, 61, 110, .24); }
.msgs > .quota { width: auto; }
.gate-card { align-self: center; width: 100%; max-width: 420px; margin: 10px 0 6px; padding: 16px; border-radius: 22px; display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center;
  background: linear-gradient(160deg, rgba(255, 61, 110, .16), rgba(255, 61, 110, .03) 60%), var(--raised); border: 1px solid rgba(255, 61, 110, .3); animation: pop .35s var(--ease) both; }
.gate-card b { display: block; font-size: 14.5px; line-height: 1.35; }
.gate-card span { display: block; margin-top: 3px; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.gate-card .btn { grid-column: 1 / -1; height: 46px; font-size: 15px; }
.msgs > .gate-card { margin-left: auto; margin-right: auto; }

/* ---------- анимация печати ответа ---------- */
.caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -2px; border-radius: 1px; background: var(--accent); animation: caret 1s steps(2) infinite; }
@keyframes caret { 50% { opacity: 0; } }

/* ---------- мини-приложение Telegram ---------- */
/* Без пружинящей прокрутки: иначе при рывке вверх окно уезжает и сверху видна пустота */
.in-tg, .in-tg body { overscroll-behavior: none; }
/* Полноэкранный режим Telegram: контент ниже системной строки и кнопок Telegram (в обычном режиме отступы равны 0) */
.in-tg { --tg-top: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)); }
.in-tg body { padding-top: var(--tg-top); }
.in-tg .app { height: calc(100dvh - var(--tg-top)); }
.in-tg .layer, .in-tg .viewer { top: var(--tg-top); }

/* =========================================================
   Чат v2: фон из фото персонажа, имя над сообщением, ремарки плашками
   ========================================================= */
.chat::before, .chat::after { z-index: 0; }
.chat > .chat-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: radial-gradient(90% 55% at 50% 0, var(--a, #2a1020), transparent 75%); opacity: .8; }
.chat-bg img { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); object-fit: cover; object-position: 50% 15%; filter: blur(38px) saturate(1.25); transform: scale(1.1); opacity: 0; transition: opacity .6s; }
.chat-bg img.ok { opacity: .6; }
.chat-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(0, 0, 0, .35), rgba(0, 0, 0, .78) 45%, #000 92%); }
.chat::before { opacity: .55; }

/* шапка: стеклянная капсула */
.chat-head { padding: 10px 12px 6px; }
.chat-peer { background: rgba(14, 14, 16, .62); border-color: rgba(255, 255, 255, .1); box-shadow: 0 8px 28px rgba(0, 0, 0, .35); }
.chat-head .icon-btn { width: 46px; height: 46px; background: rgba(14, 14, 16, .62); border-color: rgba(255, 255, 255, .1); }

/* знакомство вверху ленты */
.intro { margin: 22px 0 10px; }
.intro .ava { width: 96px; height: 96px; box-shadow: 0 0 0 3px #000, 0 0 0 5px var(--accent), 0 14px 40px rgba(255, 61, 110, .28); }
.intro b { font-size: 21px; letter-spacing: -.3px; }

/* сообщения */
.msgs { padding: 4px 14px 18px; gap: 2px; }
.mrow { animation: none; }
/* появление получают только новые сообщения (класс new ставит renderMsgs) */
.msgs > .new { animation: msgin .42s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes msgin { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
.mrow.in { align-items: flex-start; margin-top: 14px; }
.mrow.in > .ava { width: 34px; height: 34px; margin: 20px 0 0; box-shadow: 0 0 0 2px rgba(255, 255, 255, .08); }
.mcol { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; max-width: min(calc(100% - 52px), 620px); }
.mcol .who { margin: 0 0 4px 12px; font-size: 12.5px; font-weight: 800; color: var(--accent-ink); letter-spacing: .1px; }
.mrow.in .mcol .bubble { max-width: 100%; }
.mrow.in .bubble { background: rgba(20, 20, 24, .82); backdrop-filter: blur(14px) saturate(1.2); border: 1px solid rgba(255, 255, 255, .09); border-radius: 6px 22px 22px 22px; padding: 11px 15px 9px; font-size: 15.5px; line-height: 1.55; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.mrow.out { margin-top: 12px; }
.mrow.out .bubble { background: linear-gradient(135deg, #ff4d7a, #e0256a 70%, #c41d63); border-radius: 22px 22px 6px 22px; padding: 10px 15px 9px; font-weight: 600; box-shadow: 0 8px 26px rgba(255, 61, 110, .3); }
.bubble .gap { display: block; height: 8px; }

/* ремарки персонажа: серые плашки внутри текста */
.act { font-style: normal; font-weight: 600; font-size: .93em; color: rgba(255, 255, 255, .62); background: rgba(255, 255, 255, .075); border: 1px solid rgba(255, 255, 255, .06); padding: 1px 8px; margin: 0 2px; border-radius: 8px; line-height: 1.9; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.mrow.out .act { color: rgba(255, 255, 255, .85); background: rgba(0, 0, 0, .16); border-color: transparent; }
.bubble > .act:first-child { margin-left: 0; }

/* монолог */
.thought { margin: 0 0 9px; padding: 0 0 9px; border-bottom-color: rgba(255, 255, 255, .08); }

/* метка дня и служебные строки */
.day { background: rgba(14, 14, 16, .6); border-color: rgba(255, 255, 255, .08); color: var(--muted); }
.sys { color: rgba(255, 255, 255, .5); }

/* кнопки под последним ответом */
.msg-bar { margin: 8px 0 4px 44px; }
.msg-bar .tools-r { margin-left: 0; }
.msg-bar .tools-r button { width: 38px; height: 38px; background: rgba(14, 14, 16, .62); backdrop-filter: blur(12px); border-color: rgba(255, 255, 255, .1); }

/* «печатает»: пузырь с точками */
.mrow.in .bubble:has(.typing-dots) { padding: 9px 14px; }
.typing-dots i { background: var(--accent-ink); }

/* поле ввода */
.composer { position: relative; padding-top: 8px; }
.composer::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 26px; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); pointer-events: none; }
.input-wrap { background: rgba(14, 14, 16, .72); border-color: rgba(255, 255, 255, .1); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.input-wrap:focus-within { border-color: rgba(255, 61, 110, .45); box-shadow: 0 0 0 4px rgba(255, 61, 110, .08); }
.send:not(.idle):not(:disabled) { background: linear-gradient(135deg, #ff4d7a, #d92166); box-shadow: 0 6px 18px rgba(255, 61, 110, .35); }
.tool { background: rgba(14, 14, 16, .62); border-color: rgba(255, 255, 255, .1); }
.tool.hot { background: linear-gradient(135deg, #ff4d7a, #d92166); border-color: transparent; }
.cool { background: rgba(14, 14, 16, .72); border-color: rgba(255, 255, 255, .1); }
.start { background: rgba(12, 12, 14, .86); backdrop-filter: blur(18px); }
@media (prefers-reduced-motion: reduce) { .msgs > .new { animation: none; } }

/* =========================================================
   v48. Шапка чата как в Telegram: островки висят поверх ленты,
   сообщения проезжают под ними и размываются в самих островках
   ========================================================= */
.chat > .chat-head { position: absolute; top: 0; left: 0; right: 0; z-index: 4; padding: 10px 12px 6px; pointer-events: none; }
.chat-head > * { pointer-events: auto; }
.chat-peer, .chat-head .icon-btn {
  background: rgba(16, 16, 19, .52);
  -webkit-backdrop-filter: blur(22px) saturate(1.7);
  backdrop-filter: blur(22px) saturate(1.7);
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.chat-peer:hover, .chat-head .icon-btn:hover { background: rgba(28, 28, 32, .6); }
/* лента начинается от самого верха, первый элемент — под шапкой */
.chat > .msgs { padding-top: 72px; scroll-padding-top: 72px; }

/* =========================================================
   v48. Печать ответа
   ========================================================= */
.tw { position: relative; display: flow-root; transition: height .34s cubic-bezier(.2, .8, .2, 1); }
.tw > .act:first-child { margin-left: 0; }
.bubble.tw-live { overflow: hidden; }
.bubble.tw-morph { transition: width .46s cubic-bezier(.2, .8, .2, 1); }

/* слово проявляется: прозрачность, подъём, размытие и короткая подсветка */
.tw .w {
  display: inline-block; max-width: 100%;
  opacity: 0; transform: translate3d(0, .42em, 0) scale(.985); filter: blur(5px);
  text-shadow: 0 0 14px rgba(255, 110, 150, .85);
  transition: opacity .5s cubic-bezier(.2, .8, .2, 1), transform .62s cubic-bezier(.16, .9, .25, 1), filter .45s ease-out, text-shadow 1.1s ease-out;
}
.tw .w.on { opacity: 1; transform: none; filter: none; text-shadow: 0 0 0 transparent; }

/* плашка ремарки проявляется вместе с первым своим словом */
.tw .act { transition: background-color .55s ease, border-color .55s ease; }
.tw .act:not(.on) { background-color: transparent; border-color: transparent; }

/* курсор едет за последним словом и мягко пульсирует */
.tw-caret {
  position: absolute; left: 0; top: 0; width: 2px; border-radius: 2px; pointer-events: none;
  background: var(--accent-ink); box-shadow: 0 0 8px var(--accent), 0 0 2px var(--accent);
  opacity: 0; transition: opacity .25s ease;
}
.tw-caret.ready { opacity: 1; transition: transform .18s cubic-bezier(.2, .8, .2, 1), height .18s ease, opacity .3s ease; animation: twpulse 1.05s ease-in-out infinite; }
.tw-done .tw-caret { opacity: 0; animation: none; }
@keyframes twpulse { 50% { opacity: .35; } }

/* время под ответом появляется, когда текст допечатан */
.tw-live .tw > .meta { opacity: 0; transition: opacity .4s ease .1s; }
.tw-live.tw-done .tw > .meta { opacity: 1; }

/* «три точки» перед ответом: волна с подсветкой */
.typing-row .bubble { position: relative; overflow: hidden; }
.typing-row .bubble::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 110, 150, .1) 50%, transparent 80%);
  transform: translateX(-100%); animation: twshine 1.6s ease-in-out infinite;
}
.typing-row .typing-dots i { animation: twdot 1.25s cubic-bezier(.45, 0, .2, 1) infinite; }
.typing-row .typing-dots i:nth-child(2) { animation-delay: .16s; }
.typing-row .typing-dots i:nth-child(3) { animation-delay: .32s; }
@keyframes twdot { 0%, 64%, 100% { opacity: .3; transform: translateY(0) scale(.85); } 32% { opacity: 1; transform: translateY(-4px) scale(1.08); box-shadow: 0 0 8px var(--accent); } }
@keyframes twshine { to { transform: translateX(100%); } }

/* «печатает» в шапке */
.tdots { display: inline-flex; gap: 2px; margin-left: 2px; align-items: flex-end; height: 1em; }
.tdots i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; animation: twdot 1.25s cubic-bezier(.45, 0, .2, 1) infinite; }
.tdots i:nth-child(2) { animation-delay: .16s; }
.tdots i:nth-child(3) { animation-delay: .32s; }

/* своё сообщение вылетает из-под поля ввода, ответ персонажа — сверху-слева */
.msgs > .mrow.out.new { transform-origin: 100% 100%; animation: msgout .44s cubic-bezier(.2, .9, .25, 1.05) both; }
@keyframes msgout { from { opacity: 0; transform: translate3d(14px, 18px, 0) scale(.92); } to { opacity: 1; transform: none; } }
.msgs > .mrow.in.new { transform-origin: 0 0; }
.msgs > .msg-bar.new { animation: barin .4s cubic-bezier(.2, .8, .2, 1) .08s both; }
@keyframes barin { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .tw .w { transition: none; opacity: 1; transform: none; filter: none; text-shadow: none; }
  .typing-row .bubble::after, .typing-row .typing-dots i, .tdots i { animation: none; }
  .msgs > .new { animation: none; }
}

/* v49. Размытие всей полосы под шапкой, как в Telegram: сильное сверху и плавно сходит на нет вниз.
   Два слоя с разной силой размытия и масками дают «прогрессивное» размытие без резкой границы. */
.chat > .chat-head::before, .chat > .chat-head::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; z-index: -1; pointer-events: none;
}
.chat > .chat-head::before {
  bottom: -6px;
  -webkit-backdrop-filter: blur(16px) saturate(1.5); backdrop-filter: blur(16px) saturate(1.5);
  background: linear-gradient(rgba(0, 0, 0, .55), rgba(0, 0, 0, .25));
  -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent);
}
.chat > .chat-head::after {
  bottom: -30px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  -webkit-mask-image: linear-gradient(#000 40%, transparent); mask-image: linear-gradient(#000 40%, transparent);
}
@media (min-width: 960px) {
  /* на широком экране шапка центрирована, а размытие тянем на всю ширину ленты; .chat обрезает лишнее */
  .chat { overflow: hidden; }
  .chat > .chat-head::before, .chat > .chat-head::after { left: -50vw; right: -50vw; }
}

/* =========================================================
   Каталог: поиск, фильтры и карточки
   ========================================================= */
.catalog-tools { position: sticky; top: 0; z-index: 7; display: flex; gap: 8px; padding: 10px 0 6px; }
.catalog-tools::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none; top: 0; bottom: -20px;
  left: 50%; width: 100vw; transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(0, 0, 0, .62), rgba(0, 0, 0, .28));
  -webkit-backdrop-filter: blur(16px) saturate(1.25); backdrop-filter: blur(16px) saturate(1.25);
  -webkit-mask-image: linear-gradient(#000 57%, transparent); mask-image: linear-gradient(#000 57%, transparent); }
.catalog-search, .catalog-filter {
  border: 1px solid var(--line-2); background: rgba(20, 20, 23, .72);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .22); }
.catalog-search { height: 44px; color: var(--text-2); }
.catalog-search input { font-size: 16px; }
.catalog-search input::placeholder { color: var(--text-2); }
.catalog-filter { flex: 0 0 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--text); }
.catalog-filter:hover, .catalog-filter.on, .catalog-filter[aria-expanded="true"] { color: var(--accent-ink); border-color: rgba(255, 157, 181, .38); }
.layer.catalog-filter-layer { justify-content: flex-end; align-items: stretch; }
.catalog-filter-layer .scrim { background: rgba(6, 4, 9, .63); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.filter-drawer { width: min(440px, calc(100% - 24px)); margin: 0; min-height: 0; position: relative; display: flex; flex-direction: column;
  background: #141318; border: 1px solid var(--line-2); border-right: 0; border-radius: 22px 0 0 22px;
  box-shadow: -12px 0 32px rgba(0, 0, 0, .38); transform: translateX(100%); transition: transform .28s var(--ease); }
.layer.open .filter-drawer { transform: none; }
.filter-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 6px; }
.filter-head h2 { margin: 0; font-size: 20px; letter-spacing: -.03em; }
.filter-head .icon-btn { width: 38px; height: 38px; background: var(--surface-3); border: 0; }
.filter-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 14px 12px; }
.filter-body fieldset { margin: 0 0 17px; padding: 0; min-inline-size: 0; border: 0; }
.filter-body legend { padding: 0; margin-bottom: 6px; color: var(--text-2); font-size: 13px; font-weight: 750; }
.filter-body .filter-categories { border: 1px solid var(--line-2); border-radius: 16px; padding: 2px 8px 8px; }
.filter-categories legend { padding: 0 4px; color: var(--text); }
.filter-option { display: flex; flex-direction: row-reverse; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 5px; min-height: 44px; color: var(--text-2); cursor: pointer; font-size: 14px; }
.filter-option + .filter-option { border-top: 1px solid var(--line); }
.filter-option input { margin: 0; flex: none; width: 18px; height: 18px; accent-color: #bd87f1; cursor: pointer; }
.filter-option:has(input:checked) { color: var(--text); }
.filter-option small { display: block; color: var(--muted); margin-top: 2px; font-size: 12px; }
.filter-categories .filter-option { position: relative; display: inline-flex; padding: 2px; min-height: 0; border: 0; }
.filter-categories .filter-option input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
.filter-categories .filter-option > span { padding: 7px 10px; border-radius: 99px; white-space: nowrap; }
.filter-categories input:checked + span { background: #eee7f4; color: #201827; }
.filter-categories input:focus-visible + span { outline: 2px solid #cdaaee; }
.filter-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px;
  padding: 10px 12px max(10px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.filter-actions .btn { min-width: 0; height: 46px; padding: 0 5px; font-size: 13px; border-radius: 13px; }
.filter-actions .filter-count { background: #9d56c8; }
.filter-actions .filter-count:hover { background: #ae67d7; }

/* сетка и карточки */
.grid.k2 { gap: 12px 10px; margin-top: 6px; }
.card.k2 { aspect-ratio: 3 / 4; border: 0; border-radius: 18px; background: #0c0c0e; }
.card.k2:hover { transform: none; }
.card.k2:hover .art img.ok { transform: scale(1.04); }
.card.k2 .card-info { padding: 44px 12px 11px; background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, .55) 45%, rgba(0, 0, 0, .85)); }
.card.k2 .card-info b { display: flex; align-items: center; gap: 6px; font-size: 16px; }
.card.k2 .card-info b em { font-style: normal; font-weight: 600; color: rgba(255, 255, 255, .55); }
.card.k2 .on-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--online); flex: none; }
.card.k2 .card-info .d { color: rgba(255, 255, 255, .6); font-size: 12.5px; margin-top: 2px; }
.card-ratings { display: flex; flex-wrap: wrap; gap: 2px 9px; margin-top: 5px; color: var(--text-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.card-reaction { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.card-reaction.on { color: var(--accent-ink); }

/* «Свой персонаж» */
.card.k2.create {
  background: radial-gradient(ellipse at center, transparent 44%, rgba(102, 40, 152, .23)),
    url('img/create-stars.webp') center / cover, #09060f;
  border: 1px solid #8050af;
  box-shadow: inset 0 0 18px rgba(134, 69, 195, .22); }
.card.k2.create::before { content: none; }
.card.k2.create:hover, .card.k2.create:focus-visible { border-color: #c693fa; }
.create-discount { position: absolute; z-index: 2; top: 31%; left: 50%; transform: translate(-50%, -50%); white-space: nowrap;
  padding: 4px 13px; border: 1px solid rgba(177, 117, 242, .28); border-radius: 99px; background: rgba(22, 17, 30, .94);
  color: #d1a4ff; font-size: 15px; font-weight: 750; }
.card.k2.create .card-info { padding: 30px 12px 12px; background: linear-gradient(transparent, rgba(7, 5, 10, .93) 58%); }
.card.k2.create .card-info .d { white-space: normal; color: var(--text-2); line-height: 1.24; }

/* Тарифы и баланс */
.plan-wrap { max-width: 1080px; margin: 0 auto; }
.plan-page .page-head { gap: 10px; }
.plan-profile-link, .plan-wallet { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.plan-profile-link { color: var(--text); }
.plan-profile-link > div, .plan-wallet > div { display: flex; align-items: center; gap: 11px; }
.plan-profile-link > div > .i { color: #e0b0ff; }
.plan-profile-link b, .plan-profile-link small { display: block; }
.plan-profile-link small { margin-top: 2px; color: var(--text-2); font-size: 13px; }
.plan-status { display: grid; gap: 5px; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 18px; background: var(--surface); }
.plan-status span, .plan-note { color: var(--text-2); font-size: 13px; line-height: 1.45; }
.plan-status progress { width: 100%; margin-top: 5px; height: 6px; accent-color: #b67bd9; }
.plan-note { margin: 10px 2px 15px; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 252px), 1fr)); gap: 12px; }
.plan-card { --plan-tone: #e3a7e6; --plan-border: #6d416a; --plan-bg: #301e30; position: relative; display: flex; flex-direction: column;
  gap: 10px; padding: 16px; border: 1px solid var(--plan-border); border-radius: 22px;
  background: radial-gradient(ellipse at 0 0, var(--plan-bg), transparent 72%), #131217; }
.plan-orbit { --plan-tone: #b3b4ff; --plan-border: #50538e; --plan-bg: #222547; }
.plan-spectrum { --plan-tone: #a6e6d9; --plan-border: #3c786c; --plan-bg: #173832; }
.plan-card header { display: flex; align-items: center; gap: 10px; }
.plan-card h2 { margin: 0; font-size: 23px; letter-spacing: -.03em; }
.plan-emoji { width: 43px; height: 43px; display: grid; place-items: center; flex: none; border-radius: 15px;
  background: rgba(255, 255, 255, .075); border: 1px solid var(--line-2); }
.plan-emoji img { display: block; width: 36px; height: 36px; object-fit: contain; }
.plan-emoji-credit { margin: 12px 2px 0; color: var(--muted); font-size: 12px; }
.plan-emoji-credit a { text-decoration: underline; }
.plan-price { margin: 0; font-size: 30px; font-weight: 850; letter-spacing: -.025em; }
.plan-price span { color: var(--text-2); font-size: 14px; font-weight: 600; letter-spacing: 0; white-space: nowrap; }
.plan-card p { margin: 0; color: var(--text-2); font-size: 14px; }
.plan-quota { display: flex; flex-wrap: wrap; gap: 4px 7px; align-items: center; padding: 10px;
  border-radius: 13px; color: var(--plan-tone); background: var(--plan-bg); font-size: 14px; }
.plan-quota span { margin-left: auto; font-size: 12px; }
.plan-card ul { display: grid; gap: 9px; margin: 2px 0 6px; padding: 0; list-style: none; }
.plan-card li { display: flex; align-items: flex-start; gap: 8px; color: var(--text-2); font-size: 14px; }
.plan-card li .i { color: var(--plan-tone); }
.plan-select { margin-top: auto; min-height: 45px; border: 1px solid var(--plan-border); color: var(--plan-tone); background: var(--plan-bg); font-size: 14px; }
.plan-select:hover { border-color: var(--plan-tone); }
.plan-wallet { margin-top: 14px; padding: 12px; border: 1px solid var(--line-2); border-radius: 17px; background: var(--surface); }
.plan-wallet .btn { width: auto; padding: 0 14px; min-height: 42px; font-size: 14px; }
.plan-checkout, .billing-topup { max-height: 85dvh; overflow: auto; }
.billing-close { position: absolute; top: 12px; right: 12px; }
.billing-topup h3, .plan-checkout h3 { padding-right: 42px; }
.billing-note { color: var(--text-2); font-size: 13px; line-height: 1.45; }
.wallet-balance { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 13px;
  border: 1px solid #6a4b74; border-radius: 15px; background: #271d31; color: var(--text-2); }
.wallet-balance b { display: flex; align-items: center; gap: 6px; color: var(--text); font-size: 21px; }
.wallet-packs { display: grid; gap: 7px; margin: 14px 0; padding: 0; border: 0; min-width: 0; }
.wallet-packs legend { font-size: 13px; margin-bottom: 7px; color: var(--text-2); }
.wallet-pack { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 8px; min-height: 54px; padding: 8px 10px;
  border: 1px solid var(--line-2); border-radius: 13px; background: var(--surface); cursor: pointer; }
.wallet-pack:has(input:checked) { background: #281d32; border-color: #a16cbe; }
.wallet-pack input { margin: 0; accent-color: #c492ed; }
.wallet-pack > span { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; font-size: 14px; }
.wallet-pack small { color: #dbb1f0; font-size: 12px; white-space: nowrap; }
.wallet-pack strong { color: var(--text-2); font-size: 14px; white-space: nowrap; }
.wallet-confirm { min-height: 45px; font-size: 14px; }
.quota a { flex: none; color: var(--accent-ink); padding: 4px 8px; border-radius: 99px; background: var(--accent-soft); }
