/* Тикадр — та же система, что у Тикопи: графит + электрический синий. Радиусы 28 / 18 / 12. Анимируем только transform и opacity. */
@font-face { font-family: Manrope; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/manrope-cyr.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Manrope; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/manrope-lat.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --bg: #08090b; --s1: #10131a; --s2: #171b24; --s3: #222837; --hair: rgba(255, 255, 255, .06);
  --navy: #0d1630; --text: #f1f2f4; --muted: #8d939c; --dim: #5d636c;
  --blue: #3d7bff; --blue-l: #8fb2ff; --blue-t: rgba(61, 123, 255, .13);
  --rl: 28px; --rm: 18px; --rs: 12px; --ease: cubic-bezier(.22, .8, .24, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
body { background: var(--bg); color: var(--text); font: 15px/1.45 Manrope, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-feature-settings: "tnum";
  -webkit-font-smoothing: antialiased; -webkit-user-select: none; user-select: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; background: none; border: 0; outline: 0; min-width: 0; width: 100%; -webkit-user-select: text; user-select: text; }
input::placeholder, textarea::placeholder { color: var(--dim); }
h1 { font-size: 34px; line-height: 1.05; font-weight: 800; letter-spacing: -.035em; }
h2 { font-size: 24px; line-height: 1.15; font-weight: 750; letter-spacing: -.025em; }
h3 { font-size: 14px; font-weight: 700; color: var(--muted); margin: 22px 0 10px; }
.muted { color: var(--muted); }

/* ---------- экраны ---------- */
#app { position: fixed; top: 0; right: 0; bottom: 0; left: 0; overflow: hidden; }
.screen { position: absolute; top: 0; right: 0; bottom: 0; left: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; opacity: 0; transition: opacity .3s var(--ease); }
.screen.in { opacity: 1; }
.screen.out { opacity: 0; transition-duration: .2s; pointer-events: none; }
.rise { opacity: 0; transform: translate3d(0, 18px, 0); }
.screen.in .rise { animation: rise .6s var(--ease) both; animation-delay: calc(var(--i) * 45ms); }
@keyframes rise { to { opacity: 1; transform: none; } }
.wrap { min-height: 100%; display: flex; flex-direction: column; max-width: 520px; margin: 0 auto; padding: 22px 20px calc(30px + env(safe-area-inset-bottom)); }
.tabs-on .wrap { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
.grow { flex: 1 1 auto; min-height: 24px; }
.boot { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: center; }
.boot img { width: 96px; animation: pulse 1.2s ease-in-out infinite; mix-blend-mode: lighten; }
@keyframes pulse { 50% { opacity: .4; } }

/* ---------- кнопки ---------- */
.btn { display: flex; align-items: center; justify-content: center; width: 100%; height: 56px; border-radius: var(--rm); font-size: 16px; font-weight: 700;
  background: var(--s2); color: var(--text); transition: background-color .3s var(--ease), color .3s, transform .2s var(--ease); }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn.primary { background: var(--blue); color: #fff; box-shadow: 0 8px 30px rgba(61, 123, 255, .25); }
.btn.soft { background: var(--blue-t); color: var(--blue-l); height: 48px; font-size: 15px; }
.btn.light { background: #eceef1; color: #08090b; }
.btn:disabled { background: var(--s2); color: var(--dim); box-shadow: none; cursor: default; }
.btn + .btn { margin-top: 10px; }
.quiet { display: block; margin: 14px auto 0; padding: 12px; color: var(--dim); font-size: 13px; font-weight: 600; }
.link { color: var(--blue-l); font-size: 14px; font-weight: 700; }
.pill { height: 30px; padding: 0 12px; border-radius: var(--rs); background: var(--s2); font-size: 12px; font-weight: 800; color: var(--muted);
  display: inline-flex; align-items: center; letter-spacing: .04em; }
.pill.ultra { background: linear-gradient(135deg, #3d7bff, #7a5cff); color: #fff; }

/* ---------- шапка ---------- */
.bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.wm { display: flex; align-items: center; font-weight: 800; font-size: 18px; letter-spacing: -.02em; }
.wm img { width: 34px; height: 34px; margin-right: 8px; mix-blend-mode: lighten; }

/* ---------- приветствие ---------- */
.whero { height: 250px; margin: 6px -18px 4px; display: flex; align-items: center; justify-content: center; position: relative; }
.whero:before { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(61,123,255,.28), transparent 65%); }
.whero img { position: relative; height: 100%; object-fit: contain; mix-blend-mode: lighten; animation: float 5s ease-in-out infinite; }
@keyframes float { 50% { transform: translate3d(0, -8px, 0); } }
.display { font-size: 44px; line-height: 1.02; letter-spacing: -.045em; }
.lead { color: var(--muted); font-size: 16px; margin-top: 12px; max-width: 340px; }
.wsteps { display: flex; align-items: center; gap: 8px; margin-top: 18px; }
.wsteps span { padding: 8px 12px; border-radius: 14px; background: var(--s1); font-size: 14px; font-weight: 700; white-space: nowrap; }
.wsteps i { flex: 1; height: 2px; min-width: 6px; border-radius: 2px; background: linear-gradient(90deg, var(--blue), transparent); }
@media (max-width: 350px) { .wsteps span { padding: 7px 9px; font-size: 13px; } .display { font-size: 38px; } }
.agree { display: flex; align-items: center; padding: 14px 16px; margin-bottom: 12px; border-radius: var(--rm); background: var(--s1); cursor: pointer; }
.agree input { position: absolute; opacity: 0; width: 0; height: 0; }
.sw { position: relative; flex: 0 0 48px; height: 28px; border-radius: 14px; background: var(--s3); margin-right: 14px; transition: background-color .3s var(--ease); }
.sw:after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #8d939c; transition: transform .4s var(--ease), background-color .3s; }
.agree input:checked + .sw { background: var(--blue); }
.agree input:checked + .sw:after { transform: translateX(20px); background: #fff; }
.agree-t { font-size: 13px; color: var(--muted); line-height: 1.4; }
.agree-t a { color: var(--text); text-decoration: underline; text-decoration-color: var(--dim); text-underline-offset: 2px; }

/* ---------- карточки ---------- */
.card { background: var(--s1); border-radius: var(--rl); padding: 20px; margin-bottom: 12px; position: relative; overflow: hidden; }
.card.navy { background: linear-gradient(160deg, #13204a 0%, #0d1630 55%, #0b0f1c 100%); }
.card-h { display: flex; justify-content: space-between; align-items: center; }
.big { font-size: 40px; font-weight: 800; letter-spacing: -.04em; line-height: 1; margin-top: 14px; }
.big small { font-size: 16px; color: var(--muted); font-weight: 700; letter-spacing: 0; margin-left: 4px; }
.meter { height: 8px; border-radius: 4px; background: rgba(255,255,255,.08); margin-top: 14px; overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #3d7bff, #8fb2ff); transform-origin: left; animation: grow 1s var(--ease) both .2s; }
@keyframes grow { from { transform: scaleX(0); } }
.card .sub { color: var(--muted); font-size: 13px; margin-top: 10px; }
.card .btn { margin-top: 16px; }

/* ---------- стили ---------- */
.styles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.style { text-align: left; padding: 16px 14px; border-radius: var(--rm); background: var(--s1); min-height: 112px; display: flex; flex-direction: column;
  transition: transform .2s var(--ease), background-color .25s, box-shadow .25s; position: relative; }
.style:active { transform: scale(.97); }
.style .e { font-size: 26px; line-height: 1; }
.style b { display: block; font-size: 13px; font-weight: 800; letter-spacing: .02em; margin-top: 12px; }
.style span { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; margin-top: 4px; }
.style.on { background: var(--navy); box-shadow: inset 0 0 0 1.5px var(--blue); }
.style .lock { position: absolute; top: 12px; right: 12px; font-size: 13px; }
.style.wide { grid-column: span 2; min-height: 0; flex-direction: row; align-items: center; }
.style.wide .e { margin-right: 12px; }
.style.wide b { margin-top: 0; }

/* ---------- загрузка ---------- */
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 260px; border-radius: var(--rl); background: var(--s1);
  border: 1.5px dashed var(--s3); position: relative; overflow: hidden; cursor: pointer; text-align: center; padding: 20px; }
.drop img.prev { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.drop .ic { width: 64px; height: 64px; border-radius: 22px; background: var(--blue-t); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.drop .ic svg { width: 30px; height: 30px; fill: none; stroke: var(--blue-l); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.drop b { font-size: 16px; }
.drop span { color: var(--muted); font-size: 13px; margin-top: 6px; max-width: 260px; }
.drop .chg { position: absolute; right: 12px; bottom: 12px; padding: 8px 12px; border-radius: 12px; background: rgba(8,9,11,.75); font-size: 13px; font-weight: 700; backdrop-filter: blur(8px); }
.ta { display: block; width: 100%; min-height: 120px; padding: 14px 16px; border-radius: var(--rm); background: var(--s2); resize: none; font-size: 15px; line-height: 1.45; }
.ta:focus { box-shadow: inset 0 0 0 1.5px var(--blue); }
.cnt { text-align: right; color: var(--dim); font-size: 12px; margin-top: 6px; }

/* ---------- статус генерации ---------- */
.gen { text-align: center; padding: 30px 10px 10px; }
.gen img { width: 170px; mix-blend-mode: lighten; animation: float 3s ease-in-out infinite; }
.steps { margin: 22px auto 0; max-width: 300px; text-align: left; }
.steps div { display: flex; align-items: center; padding: 10px 0; color: var(--dim); font-weight: 700; transition: color .3s; }
.steps div i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--s3); margin-right: 12px; flex: 0 0 22px; transition: all .3s; }
.steps div.done { color: var(--muted); }
.steps div.done i { background: var(--blue); border-color: var(--blue); }
.steps div.now { color: var(--text); }
.steps div.now i { border-color: var(--blue); border-top-color: transparent; animation: spin .9s linear infinite; }
.steps div.bad { color: #ff8a8a; }
.steps div.bad i { background: #ff5c5c; border-color: #ff5c5c; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- списки ---------- */
.list { display: grid; gap: 8px; }
.row { display: flex; align-items: center; width: 100%; text-align: left; padding: 14px 16px; border-radius: var(--rm); background: var(--s1); transition: transform .2s var(--ease); }
.row:active { transform: scale(.98); }
.row .e { width: 40px; height: 40px; border-radius: 13px; background: var(--s2); display: flex; align-items: center; justify-content: center; font-size: 19px; margin-right: 12px; flex: 0 0 40px; }
.row-t { flex: 1; min-width: 0; }
.row-t b { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-t span { display: block; color: var(--muted); font-size: 12.5px; }
.row-p { font-weight: 700; font-size: 14px; white-space: nowrap; margin-left: 10px; color: var(--muted); }
.row-p.ok { color: var(--blue-l); }
.kv { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--hair); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--muted); }
.kv b { font-weight: 700; text-align: right; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty img { width: 140px; mix-blend-mode: lighten; display: block; margin: 0 auto 10px; }
.stat3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.stat3 div { background: var(--s1); border-radius: var(--rm); padding: 14px 12px; }
.stat3 b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.stat3 span { color: var(--muted); font-size: 12px; }

/* ---------- ULTRA ---------- */
.ultra-card { background: radial-gradient(120% 90% at 80% 0%, rgba(61,123,255,.45), transparent 60%), linear-gradient(170deg, #111a38, #0a0d18); }
.ultra-card h1 { font-size: 40px; }
.ultra-card ul { list-style: none; margin-top: 16px; }
.ultra-card li { padding: 7px 0; font-weight: 600; display: flex; align-items: center; }
.ultra-card li:before { content: "✓"; width: 22px; height: 22px; border-radius: 8px; background: var(--blue); color: #fff; font-size: 12px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; margin-right: 12px; flex: 0 0 22px; }
.price { font-size: 30px; font-weight: 800; letter-spacing: -.03em; margin-top: 18px; }
.price small { font-size: 14px; color: var(--muted); font-weight: 700; }
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.packs button { padding: 16px 8px; border-radius: var(--rm); background: var(--s1); text-align: center; transition: transform .2s var(--ease); }
.packs button:active { transform: scale(.96); }
.packs b { display: block; font-size: 22px; font-weight: 800; }
.packs span { display: block; color: var(--muted); font-size: 12px; }
.packs i { display: block; font-style: normal; margin-top: 8px; font-weight: 800; color: var(--blue-l); font-size: 14px; }

/* ---------- лист, тост ---------- */
#veil { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0,0,0,.6); opacity: 0; pointer-events: none; transition: opacity .35s var(--ease); z-index: 10; }
#sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 11; max-height: 92%; overflow-y: auto; -webkit-overflow-scrolling: touch;
  max-width: 560px; margin: 0 auto; padding: 6px 20px calc(24px + env(safe-area-inset-bottom)); background: #12141a; border-radius: 32px 32px 0 0;
  transform: translate3d(0, 105%, 0); transition: transform .5s var(--ease); visibility: hidden; }
.sheet-open #veil { opacity: 1; pointer-events: auto; }
.sheet-open #sheet { transform: none; visibility: visible; }
.grab { height: 24px; margin: 0 -20px 6px; display: flex; justify-content: center; align-items: center; touch-action: none; cursor: grab; }
.grab:after { content: ""; width: 38px; height: 5px; border-radius: 3px; background: var(--s3); }
#sheet .btn { margin-top: 20px; }
#sheet .btn + .btn { margin-top: 10px; }
.terms { -webkit-user-select: text; user-select: text; }
.terms h4 { font-size: 14px; margin: 18px 0 6px; }
.terms p, .terms li { color: #b4b9c1; font-size: 13.5px; line-height: 1.55; }
.terms ul { padding-left: 18px; }
#toast { position: fixed; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom)); z-index: 30; max-width: 90%; padding: 13px 18px; border-radius: 16px; background: #eceef1; color: #08090b;
  font-weight: 600; font-size: 14px; text-align: center; transform: translate3d(-50%, 24px, 0); opacity: 0; pointer-events: none; transition: transform .45s var(--ease), opacity .3s; }
#toast.show { transform: translate3d(-50%, 0, 0); opacity: 1; }

/* ---------- нижнее меню ---------- */
#tabs { position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 5; display: flex; align-items: center; padding: 6px;
  border-radius: 26px; background: #14171d; box-shadow: 0 10px 30px rgba(0,0,0,.5); transform: translate3d(-50%, 130%, 0); opacity: 0;
  transition: transform .5s var(--ease), opacity .3s; pointer-events: none; }
.tabs-on #tabs { transform: translate3d(-50%, 0, 0); opacity: 1; pointer-events: auto; }
.kb #tabs { opacity: 0; pointer-events: none; }
#tabs button { display: flex; flex-direction: column; align-items: center; width: 72px; height: 52px; justify-content: center; border-radius: 20px; color: var(--dim);
  font-size: 11px; font-weight: 700; transition: color .25s, transform .2s var(--ease); }
#tabs button:active { transform: scale(.92); }
#tabs button.on { color: var(--text); }
#tabs svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 2px; }
#tabs .tab-add { width: 56px; height: 52px; margin: 0 6px; background: var(--blue); color: #fff; border-radius: 18px; }
#tabs .tab-add svg { width: 26px; height: 26px; stroke-width: 2.4; margin: 0; }
@media (max-width: 370px) { #tabs button { width: 60px; } }

/* ---------- админ ---------- */
.search { display: flex; align-items: center; height: 48px; padding: 0 16px; border-radius: var(--rm); background: var(--s2); margin-bottom: 10px; }
.inp { display: block; height: 46px; padding: 0 14px; border-radius: var(--rs); background: var(--s2); margin-top: 6px; font-weight: 700; }
.inp:focus { box-shadow: inset 0 0 0 1.5px var(--blue); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grid2 .btn { height: 46px; font-size: 14px; margin: 0 !important; }
label.f { display: block; margin-top: 12px; font-size: 12px; color: var(--muted); font-weight: 700; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--muted); word-break: break-all; }
.seg { display: flex; background: var(--s1); border-radius: 14px; padding: 4px; margin-bottom: 14px; }
.seg button { flex: 1; height: 36px; border-radius: 11px; font-size: 13px; font-weight: 700; color: var(--muted); }
.seg button.on { background: var(--s3); color: var(--text); }

/* ---------- v2: превью стилей, прогресс, игры, тарифы, профиль, чат, галерея, админ ---------- */
.small { font-size: 12.5px; }
.center { text-align: center; }
.style.has-img { padding: 0; overflow: hidden; min-height: 0; aspect-ratio: 3 / 4; justify-content: flex-end; background: #000; }
.style.has-img img { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.style.has-img .st { position: relative; padding: 40px 12px 12px; background: linear-gradient(transparent, rgba(5,7,12,.92) 60%); }
.style.has-img .st b { margin-top: 0; }
.style.has-img .st span { color: #b4b9c1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.style.has-img.on { box-shadow: inset 0 0 0 3px var(--blue); }
.style.has-img.on:after { content: "✓"; position: absolute; top: 10px; left: 10px; width: 26px; height: 26px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.style.feat { grid-column: span 2; aspect-ratio: 16 / 10; }
.style .tag { position: absolute; top: 10px; right: 10px; z-index: 1; padding: 5px 10px; border-radius: 10px; background: linear-gradient(135deg, #ff7a3d, #ff3d7f); color: #fff; font-size: 11.5px; font-weight: 800; }
.style .lock { z-index: 1; background: rgba(8,9,11,.7); border-radius: 8px; padding: 2px 6px; }
.tokens { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; width: 100%; text-align: left; padding: 14px 16px; margin-bottom: 12px; border-radius: var(--rm); background: var(--s1); box-shadow: inset 0 0 0 1px var(--hair); }
.tokens span { width: 100%; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.tokens b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.tokens em { font-style: normal; color: var(--muted); font-size: 13px; }
.tokens.low { background: rgba(255, 92, 92, .12); box-shadow: inset 0 0 0 1.5px rgba(255, 92, 92, .5); }
.tokens.low span, .tokens.low b { color: #ff8a8a; }
.bonus { display: flex; align-items: center; padding: 12px 14px; border-radius: var(--rm); background: var(--s1); margin-bottom: 12px; }
.bonus .e { width: 40px; height: 40px; border-radius: 13px; background: var(--blue-t); display: flex; align-items: center; justify-content: center; font-size: 20px; margin-right: 12px; flex: 0 0 40px; }
.bonus em { font-style: normal; color: var(--muted); font-size: 12.5px; font-weight: 700; text-align: right; max-width: 110px; }
.btn.sm { width: auto; height: 38px; padding: 0 14px; font-size: 13.5px; margin: 0 !important; white-space: nowrap; }
.row.act .row-t { display: flex; flex-direction: column; }
.mini-bar { display: block; height: 5px; border-radius: 3px; background: rgba(255,255,255,.08); margin-top: 7px; overflow: hidden; }
.mini-bar i { display: block; height: 100%; background: linear-gradient(90deg, #3d7bff, #8fb2ff); border-radius: 3px; }
.sec-h { display: flex; align-items: center; justify-content: space-between; }
.sec-h h3 { margin-bottom: 10px; }
.strip { display: flex; gap: 8px; overflow-x: auto; margin: 0 -20px; padding: 0 20px 4px; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip button, .ggrid button { position: relative; flex: 0 0 120px; height: 160px; border-radius: var(--rm); overflow: hidden; background: var(--s1); }
.strip img, .ggrid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.strip span, .ggrid span { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 7px; font-size: 11px; font-weight: 800; text-align: left; background: linear-gradient(transparent, rgba(0,0,0,.85)); }
.ggrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ggrid button { height: auto; aspect-ratio: 3 / 4; }
.gbig img { width: 100%; border-radius: var(--rm); display: block; }
.drop.loading { opacity: .5; }
.drop.loading:after { content: ""; position: absolute; width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--blue); border-top-color: transparent; animation: spin .8s linear infinite; }
.btn.sticky { position: sticky; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 2; }
/* статус */
.ring { width: 150px; height: 150px; margin: 0 auto; border-radius: 50%; display: flex; align-items: center; justify-content: center; position: relative;
  background: radial-gradient(circle, rgba(61,123,255,.25), transparent 65%); }
.ring:before { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: 50%; border: 3px solid rgba(61,123,255,.18); border-top-color: var(--blue); animation: spin 1.4s linear infinite; }
.ring.done:before { animation: none; border-color: var(--blue); }
.ring img { width: 110px; animation: float 3s ease-in-out infinite; }
.pbar { height: 12px; border-radius: 6px; background: rgba(255,255,255,.07); margin: 20px auto 0; max-width: 340px; overflow: hidden; }
.pbar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #3d7bff, #8fb2ff); transform-origin: left; transform: scaleX(0); }
.pmeta { display: flex; justify-content: space-between; max-width: 340px; margin: 8px auto 0; font-weight: 800; font-size: 14px; }
.pmeta span:last-child { color: var(--muted); }
/* игры */
.gmenu { display: grid; gap: 10px; }
.gcard { position: relative; display: flex; align-items: center; width: 100%; text-align: left; padding: 14px 16px; border-radius: var(--rl);
  background: var(--s1); box-shadow: inset 0 0 0 1px var(--hair); transition: transform .2s var(--ease), background-color .2s; }
.gcard:active { transform: scale(.97); }
.gcard:active { background: var(--s2); }
.g-catch { --gc: #3d7bff; }
.g-pairs { --gc: #3d7bff; }
.g-flash { --gc: #3d7bff; }
.gi { width: 48px; height: 48px; border-radius: 16px; background: var(--blue-t); display: flex; align-items: center; justify-content: center; margin-right: 14px; flex: 0 0 48px; }
.gi svg { width: 26px; height: 26px; fill: none; stroke: var(--blue-l); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gt { position: relative; flex: 1; min-width: 0; }
.gt b { display: block; font-size: 16px; font-weight: 800; }
.gt span { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.gb { text-align: right; font-weight: 800; font-size: 20px; color: var(--text); margin-left: 10px; }
.gb small { display: block; font-size: 10.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.game { position: relative; border-radius: var(--rl); padding: 14px; overflow: hidden; background: var(--s1); box-shadow: inset 0 0 0 1px var(--hair); }
.game.g-catch, .game.g-pairs, .game.g-flash { box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.game-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.game-h b { font-size: 16px; font-weight: 800; }
.game-h span { flex: 1; text-align: right; color: var(--muted); font-weight: 700; font-size: 13px; }
.game-h em { font-style: normal; color: #fff; font-size: 18px; font-weight: 800; }
.game-h i { font-style: normal; color: #ff5c7a; letter-spacing: 1px; margin-left: 6px; }
.game-h s { text-decoration: none; opacity: .2; }
.gx { width: 34px; height: 34px; border-radius: 11px; background: rgba(255,255,255,.08); font-size: 22px; line-height: 1; font-weight: 700; }
.cv { position: relative; max-width: 360px; margin: 0 auto; }
.cv canvas { display: block; width: 100%; aspect-ratio: 320 / 400; border-radius: var(--rm); touch-action: none; box-shadow: 0 20px 50px rgba(0,0,0,.5), inset 0 0 0 1px rgba(143,178,255,.15); }
.cv-over { position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: var(--rm); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 20px;
  background: rgba(5,7,14,.55); backdrop-filter: blur(3px); }
.cv-over b { font-size: 46px; animation: float 2.4s ease-in-out infinite; }
.cv-over span { font-size: 18px; font-weight: 800; padding: 10px 18px; border-radius: 14px; background: var(--blue); box-shadow: 0 10px 30px rgba(61,123,255,.4); }
.cv-over small { color: #b4b9c1; font-size: 12.5px; max-width: 220px; margin-top: 6px; }
.cv-over[hidden] { display: none; }
.pairs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; perspective: 800px; }
.pairs { animation: rise .4s var(--ease) both; }
.pairs button { position: relative; aspect-ratio: 3 / 4; transform-style: preserve-3d; -webkit-transform-style: preserve-3d; transition: transform .45s var(--ease); }
.pairs button.up { transform: rotateY(180deg); }
.pairs .back, .pairs .face { position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: 12px; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.pairs .back { background: radial-gradient(circle at 50% 35%, #2d2470, #120e2a); box-shadow: inset 0 0 0 1.5px rgba(195,180,255,.25); }
.pairs .back img { width: 62%; opacity: .9; }
.pairs .face { transform: rotateY(180deg); background: #000; }
.pairs .face img { width: 100%; height: 100%; object-fit: cover; }
.pairs .face em { font-style: normal; font-size: 30px; }
.pairs .face small { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 4px 4px; font-size: 8.5px; font-weight: 800; text-align: center; background: linear-gradient(transparent, rgba(0,0,0,.85)); }
.pairs button.ok .face { box-shadow: inset 0 0 0 2.5px #7be3a8, 0 0 18px rgba(123,227,168,.45); }
.pairs button.ok { transform: rotateY(180deg); }
.pairs button.no .back { animation: nope .35s; }

@keyframes nope { 25% { margin-left: -4px; } 75% { margin-left: 4px; } }
.vf { position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: var(--rm); overflow: hidden; background: radial-gradient(circle at 50% 50%, #1d1a14, #07070a); color: #fff; transition: background-color .1s; }
.vf i { position: absolute; width: 26px; height: 26px; border: 3px solid rgba(255,255,255,.7); }
.vf .c1 { top: 16px; left: 16px; border-right: 0; border-bottom: 0; } .vf .c2 { top: 16px; right: 16px; border-left: 0; border-bottom: 0; }
.vf .c3 { bottom: 16px; left: 16px; border-right: 0; border-top: 0; } .vf .c4 { bottom: 16px; right: 16px; border-left: 0; border-top: 0; }
.vf .rec { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 800; letter-spacing: .1em; color: #ff5c5c; }
.vf.wait .rec { animation: pulse 1s infinite; }
.vf .ft { position: relative; z-index: 1; font-size: 18px; font-weight: 800; }
.vf .ft b { font-size: 44px; }
.vf .burst { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: radial-gradient(circle, #fff 0%, #fff6dc 35%, rgba(255,214,120,.6) 60%, transparent 75%); opacity: 0; }
.vf.go .burst { opacity: 1; }
.vf.go { color: #08090b; }
.vf.go .ft { font-size: 40px; }
.vf.go i { border-color: #08090b; }
.vf.early { background: radial-gradient(circle, #4a1420, #120507); }
.vf.shot .ft { animation: rise .4s var(--ease) both; }
.rounds { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 10px; }
.rounds span { height: 30px; border-radius: 10px; background: rgba(255,255,255,.06); font-size: 11.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.rounds span.on { background: rgba(255,178,61,.18); color: #ffd28a; }
.game.over { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 18px 18px; }
.game.over { background: radial-gradient(120% 70% at 50% 0%, rgba(61,123,255,.22), transparent 70%), var(--s1); }
.game.over img { position: relative; width: 84px; animation: float 3s ease-in-out infinite; }
.game.over .sc { position: relative; font-size: 56px; font-weight: 800; letter-spacing: -.04em; line-height: 1.05; }
.game.over .rb { position: relative; margin: 6px 0 10px; padding: 7px 14px; border-radius: 12px; background: rgba(255,255,255,.07); font-weight: 800; font-size: 13.5px; }
.game.over .btn { position: relative; margin-top: 8px !important; }
.confetti { position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 12px; border-radius: 2px; animation: fall 1.8s ease-in forwards; }
.confetti i:nth-child(3n) { background: #3d7bff; } .confetti i:nth-child(3n+1) { background: #ffd28a; } .confetti i:nth-child(3n+2) { background: #ff6fa3; }
.confetti i:nth-child(1) { left: 37%; animation-delay: 0.12s; }
.confetti i:nth-child(2) { left: 74%; animation-delay: 0.24s; }
.confetti i:nth-child(3) { left: 11%; animation-delay: 0.36s; }
.confetti i:nth-child(4) { left: 48%; animation-delay: 0.48s; }
.confetti i:nth-child(5) { left: 85%; animation-delay: 0.60s; }
.confetti i:nth-child(6) { left: 22%; animation-delay: 0.00s; }
.confetti i:nth-child(7) { left: 59%; animation-delay: 0.12s; }
.confetti i:nth-child(8) { left: 96%; animation-delay: 0.24s; }
.confetti i:nth-child(9) { left: 33%; animation-delay: 0.36s; }
.confetti i:nth-child(10) { left: 70%; animation-delay: 0.48s; }
.confetti i:nth-child(11) { left: 7%; animation-delay: 0.60s; }
.confetti i:nth-child(12) { left: 44%; animation-delay: 0.00s; }
.confetti i:nth-child(13) { left: 81%; animation-delay: 0.12s; }
.confetti i:nth-child(14) { left: 18%; animation-delay: 0.24s; }
.confetti i:nth-child(15) { left: 55%; animation-delay: 0.36s; }
.confetti i:nth-child(16) { left: 92%; animation-delay: 0.48s; }
.confetti i:nth-child(17) { left: 29%; animation-delay: 0.60s; }
@keyframes fall { to { transform: translateY(460px) rotate(540deg); opacity: .2; } }
/* тарифы */
.plan { position: relative; background: var(--s1); border-radius: var(--rl); padding: 18px; margin-bottom: 10px; }
.plan.ultra { background: radial-gradient(120% 90% at 80% 0%, rgba(61,123,255,.45), transparent 60%), linear-gradient(170deg, #111a38, #0a0d18); box-shadow: inset 0 0 0 1.5px rgba(61,123,255,.5); }
.plan.max { background: radial-gradient(120% 90% at 80% 0%, rgba(122,92,255,.4), transparent 60%), linear-gradient(170deg, #17123a, #0a0d18); }
.plan.cur { box-shadow: inset 0 0 0 2px var(--blue); }
.plan-h { display: flex; justify-content: space-between; align-items: baseline; }
.plan-h b { font-size: 20px; font-weight: 800; letter-spacing: .02em; }
.plan-h em { font-style: normal; font-weight: 800; font-size: 18px; }
.plan-h s { color: var(--dim); font-size: 14px; }
.plan-g { font-weight: 800; font-size: 17px; margin-top: 8px; }
.plan-g small { color: var(--muted); font-size: 12.5px; font-weight: 700; }
.plan ul { list-style: none; margin-top: 10px; }
.plan li { padding: 4px 0; font-size: 14px; font-weight: 600; display: flex; align-items: center; }
.plan li:before { content: "✓"; width: 20px; height: 20px; border-radius: 7px; background: var(--blue-t); color: var(--blue-l); font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; margin-right: 10px; flex: 0 0 20px; }
.plan .btn { margin-top: 14px; }
.plan.free { padding: 14px 18px; }
.plan.free p { margin-top: 4px; font-size: 13px; }
.badge-t { position: absolute; top: -9px; right: 16px; padding: 4px 10px; border-radius: 10px; background: linear-gradient(135deg, #3d7bff, #7a5cff); color: #fff; font-size: 11.5px; font-weight: 800; }
.disc { padding: 12px 16px; border-radius: var(--rm); background: rgba(61, 220, 132, .12); color: #7be3a8; font-weight: 700; margin-bottom: 10px; }
.inp.big { height: 56px; font-size: 20px; text-align: center; letter-spacing: .08em; margin-top: 16px; }
/* профиль */
.me { display: flex; align-items: center; margin: 4px 0 16px; }
.ava { flex: 0 0 56px; height: 56px; border-radius: 19px; background: var(--blue); color: #fff; font-size: 25px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-right: 14px; }
.me h1 { font-size: 26px; }
.me p { font-size: 13.5px; margin-top: 2px; }
.subcard { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-radius: var(--rl); margin-bottom: 12px; background: linear-gradient(160deg, #13204a, #0d1630 55%, #0b0f1c); }
.subcard span { display: block; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.subcard b { font-size: 20px; font-weight: 800; }
.subcard em { font-style: normal; color: var(--blue-l); font-weight: 800; font-size: 14px; }
.pstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.pstats div { background: var(--s1); border-radius: var(--rm); padding: 14px 12px; }
.pstats b { display: block; font-size: 22px; font-weight: 800; }
.pstats span { color: var(--muted); font-size: 12px; }
.invite { display: flex; align-items: center; width: 100%; text-align: left; padding: 16px; border-radius: var(--rl); margin-bottom: 12px; background: radial-gradient(120% 120% at 100% 0%, rgba(61,123,255,.35), transparent 60%), var(--s1); }
.inv-ic { font-size: 30px; margin-right: 14px; }
.invite b { display: block; font-size: 16px; }
.invite span { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.invite em { display: block; font-style: normal; color: var(--blue-l); font-weight: 800; font-size: 13px; margin-top: 6px; }
.menu { padding: 4px 18px; }
.prow { display: flex; align-items: center; width: 100%; text-align: left; padding: 14px 0; font-weight: 600; font-size: 15px; }
.prow + .prow { border-top: 1px solid var(--hair); }
.prow > span { flex: 1; }
.prow small { display: block; margin-top: 2px; font-size: 12px; font-weight: 500; color: var(--muted); }
.prow em { font-style: normal; color: var(--muted); font-size: 14px; margin-left: auto; }
.pic { width: 34px; height: 34px; border-radius: 11px; background: var(--s2); display: inline-flex; align-items: center; justify-content: center; margin-right: 12px; font-style: normal; font-size: 17px; flex: 0 0 34px; }
.chev { width: 8px; height: 8px; border-right: 2px solid var(--dim); border-top: 2px solid var(--dim); transform: rotate(45deg); margin-left: 12px; flex: 0 0 8px; }
.badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--blue); color: #fff; font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
#tabs button.dot { position: relative; }
#tabs button.dot:after { content: ""; position: absolute; top: 8px; right: 20px; width: 8px; height: 8px; border-radius: 50%; background: #ff5c5c; }
/* история */
.row .hrow { display: flex; align-items: center; flex: 1; min-width: 0; text-align: left; }
.pub { width: 40px; height: 40px; border-radius: 13px; background: var(--s2); margin-left: 8px; filter: grayscale(1); opacity: .5; flex: 0 0 40px; }
.pub.on { filter: none; opacity: 1; background: var(--blue-t); }
/* чат */
.chat { height: 100%; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; }
.chat-h { padding: 22px 20px 12px; }
.chat-h p { font-size: 13px; margin-top: 2px; }
.msgs { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 6px 16px 16px; display: flex; flex-direction: column; }
.msg { max-width: 82%; margin-top: 6px; padding: 10px 14px 8px; border-radius: 20px 20px 20px 6px; background: var(--s2); align-self: flex-start; }
.msg.mine { align-self: flex-end; background: var(--blue); color: #fff; border-radius: 20px 20px 6px 20px; }
.msg.auto { opacity: .75; font-size: 14px; }
.msg p { white-space: pre-wrap; word-wrap: break-word; font-size: 15px; line-height: 1.4; -webkit-user-select: text; user-select: text; }
.msg time { display: block; text-align: right; font-size: 11px; margin-top: 2px; opacity: .55; }
.day { text-align: center; color: var(--dim); font-size: 12px; font-weight: 700; margin: 14px 0 4px; }
.chat-empty { margin: auto; max-width: 260px; text-align: center; color: var(--muted); }
.composer { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--hair); }
.composer textarea { flex: 1; resize: none; padding: 12px 16px; border-radius: 22px; background: var(--s2); font-size: 15px; line-height: 1.35; max-height: 120px; }
.send { width: 44px; height: 44px; border-radius: 50%; background: var(--blue); display: flex; align-items: center; justify-content: center; flex: 0 0 44px; }
.send:disabled { background: var(--s3); }
.send svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
/* админ */
.seg.scroll { overflow-x: auto; scrollbar-width: none; }
.seg.scroll::-webkit-scrollbar { display: none; }
.seg.scroll button { flex: 0 0 auto; padding: 0 12px; }
.seg.mini { margin: 0; padding: 3px; }
.seg.mini button { height: 28px; padding: 0 12px; font-size: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
select.inp { -webkit-appearance: none; appearance: none; color: var(--text); border: 0; width: 100%; font: inherit; font-weight: 700; }
.bars { margin-top: 10px; display: grid; gap: 6px; }
.bars div { display: grid; grid-template-columns: 92px 1fr 40px; align-items: center; gap: 8px; font-size: 12.5px; }
.bars span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bars i { display: block; height: 10px; border-radius: 5px; background: linear-gradient(90deg, #3d7bff, #8fb2ff); }
.bars b { text-align: right; }
.ratio { display: flex; height: 14px; border-radius: 7px; overflow: hidden; margin: 12px 0 6px; gap: 2px; }
.r-free { background: #5d636c; } .r-lite { background: #8fb2ff; } .r-ultra { background: #3d7bff; } .r-max { background: #7a5cff; }
/* карточки стилей одной высоты, даже если превью ещё нет */
.styles .style:not(.wide):not(.feat) { aspect-ratio: 3 / 4; min-height: 0; justify-content: flex-end; }
.styles .style:not(.has-img):not(.wide) .e { position: absolute; top: 16px; left: 14px; font-size: 30px; }
/* блокировка, промокод (как в Тикопи) */
.chat-h { display: flex; align-items: center; }
.chat-h .ch-t { flex: 1; min-width: 0; }
.icon-btn { flex: 0 0 40px; height: 40px; margin-left: 12px; border-radius: 14px; background: var(--s1); color: var(--text); display: flex; align-items: center; justify-content: center; }
.icon-btn:active { transform: scale(.9); background: var(--s2); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn.danger-b { background: rgba(255, 90, 80, .14); color: #ff7a6e; }
.btn.danger-b:disabled { opacity: .45; }
.link.danger { color: #ff7a6e; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chips button { padding: 9px 14px; border-radius: 14px; background: var(--s2); font-size: 14px; font-weight: 700; color: var(--muted); transition: background-color .2s, color .2s; }
.chips button.on { background: rgba(255, 90, 80, .16); color: #ff8a80; box-shadow: inset 0 0 0 1.5px rgba(255, 90, 80, .5); }
.promo-in { margin-top: 16px; }
.promo-in input { display: block; width: 100%; height: 60px; border-radius: var(--rm); background: var(--s2); text-align: center; font-size: 22px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.promo-in input:focus { box-shadow: inset 0 0 0 1.5px var(--blue); }
.pbot2 { display: block; width: 100%; margin-top: 12px; padding: 14px; border-radius: var(--rm); background: var(--s1); color: var(--muted); font-size: 14px; font-weight: 600; }
.pbot2 b { color: var(--blue-l); }
.mycode { margin-top: 14px; padding: 16px; border-radius: var(--rm); text-align: center; background: radial-gradient(120% 120% at 50% 0%, rgba(61,123,255,.3), transparent 70%), var(--s1); }
.mycode span { display: block; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.mycode b { display: block; font-size: 34px; font-weight: 800; letter-spacing: .18em; margin: 4px 0; -webkit-user-select: all; user-select: all; }
.mycode small { color: var(--muted); font-size: 12.5px; }

/* выбор языка */
.langs { display: grid; gap: 8px; margin-top: 16px; }
.langs button { display: flex; align-items: center; padding: 16px; border-radius: var(--rm); background: var(--s2); text-align: left; }
.langs span { font-size: 26px; margin-right: 14px; }
.langs b { flex: 1; font-size: 17px; }
.langs i { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--s3); }
.langs button.on { box-shadow: inset 0 0 0 2px var(--blue); background: var(--navy); }
.langs button.on i { background: var(--blue); border-color: var(--blue); box-shadow: inset 0 0 0 5px var(--navy); }
.langbtn { height: 34px; padding: 0 12px; border-radius: 12px; background: var(--s1); font-size: 13px; font-weight: 700; color: var(--muted); }

/* тарифы: горизонтальная карусель */
.pcar { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -20px; padding: 14px 20px 6px; scroll-padding: 0 20px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.pcar::-webkit-scrollbar { display: none; }
#sheet .pcar { margin: 0 -20px; }
.pc { position: relative; flex: 0 0 82%; max-width: 330px; scroll-snap-align: center; border-radius: 30px; padding: 20px 20px 18px; overflow: hidden;
  display: flex; flex-direction: column; transform: scale(.94); opacity: .6; transition: transform .45s var(--ease), opacity .35s, box-shadow .35s; }
.pc.act { transform: none; opacity: 1; }
.pc:before { content: ""; position: absolute; right: -60px; top: -70px; width: 220px; height: 220px; border-radius: 50%; background: var(--pg); opacity: .55; filter: blur(40px); }
.pc > * { position: relative; }
.pc-lite { --pg: #8fb2ff; background: linear-gradient(165deg, #1a2338 0%, #10141f 100%); box-shadow: inset 0 0 0 1px rgba(143,178,255,.18); }
.pc-ultra { --pg: #3d7bff; background: linear-gradient(165deg, #1b3a8a 0%, #11204f 45%, #0a0f22 100%); box-shadow: inset 0 0 0 1.5px rgba(61,123,255,.55), 0 20px 50px rgba(61,123,255,.18); }
.pc-max { --pg: #a07bff; background: linear-gradient(165deg, #3a237a 0%, #1d1440 50%, #0d0a1e 100%); box-shadow: inset 0 0 0 1.5px rgba(160,123,255,.45); }
.pc.cur { box-shadow: inset 0 0 0 2px #7be3a8; }
.pc-top { display: flex; align-items: center; justify-content: space-between; min-height: 30px; }
.pc-ic { width: 38px; height: 38px; border-radius: 13px; background: rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center; font-size: 18px; color: #fff; }
.pc-tag { padding: 6px 11px; border-radius: 11px; background: rgba(255,255,255,.1); font-size: 11.5px; font-weight: 800; }
.pc-tag.hot { background: linear-gradient(135deg, #ff7a3d, #ff3d7f); }
.pc-name { display: block; margin-top: 16px; font-size: 15px; font-weight: 800; letter-spacing: .16em; color: rgba(255,255,255,.75); }
.pc-price { margin-top: 4px; font-size: 48px; font-weight: 800; letter-spacing: -.04em; line-height: 1; display: flex; align-items: baseline; gap: 4px; }
.pc-price i { font-style: normal; font-size: 30px; }
.pc-price s { font-size: 20px; color: rgba(255,255,255,.4); margin-right: 4px; }
.pc-price small { font-size: 14px; font-weight: 700; color: rgba(255,255,255,.55); letter-spacing: 0; margin-left: 4px; }
.pc-gens { margin-top: 10px; font-weight: 700; font-size: 15px; }
.pc-gens b { font-size: 20px; }
.pc-gens span { color: rgba(255,255,255,.55); font-size: 13px; }
.pc ul { list-style: none; margin: 14px 0 16px; flex: 1; }
.pc li { display: flex; align-items: center; padding: 5px 0; font-size: 14px; font-weight: 600; }
.pc li:before { content: "✓"; flex: 0 0 20px; height: 20px; margin-right: 10px; border-radius: 7px; background: rgba(255,255,255,.12); font-size: 11px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; }
.pc .btn { margin: 0 !important; height: 52px; }
.pc-until { text-align: center; margin-top: 8px; font-size: 12.5px; color: rgba(255,255,255,.6); }
.pdots { display: flex; justify-content: center; gap: 6px; margin: 10px 0 16px; }
.pdots i { width: 7px; height: 7px; border-radius: 4px; background: var(--s3); transition: width .3s var(--ease), background-color .3s; cursor: pointer; }
.pdots i.on { width: 22px; background: var(--blue); }

/* свой запрос */
.style.own { background: linear-gradient(135deg, #16224a, #0e1426); box-shadow: inset 0 0 0 1.5px rgba(61,123,255,.45); padding: 16px; }
.style.own .e { font-size: 28px; }
.style.own span span { color: #b4b9c1; }
.chips.ideas button { font-size: 13px; font-weight: 600; color: var(--text); text-align: left; }

/* лента модерации */
.ggrid.feed button.bl { box-shadow: inset 0 0 0 2px #ff7a6e; }
.ggrid.feed button.bl img { opacity: .5; }

.g-snap { --gc: #3d7bff; }
.g-focus { --gc: #3d7bff; }
.snap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 340px; margin: 0 auto; touch-action: manipulation; }
.hole { position: relative; aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: radial-gradient(circle at 50% 120%, #1b2a4a, #0b0f1c);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.08); }
.hole:before, .hole:after { content: ""; position: absolute; width: 14px; height: 14px; border: 2.5px solid rgba(255,255,255,.35); z-index: 2; }
.hole:before { top: 8px; left: 8px; border-right: 0; border-bottom: 0; } .hole:after { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }
.hole span { position: absolute; top: 10%; right: 10%; bottom: 10%; left: 10%; display: flex; align-items: center; justify-content: center; transform: translateY(110%); transition: transform .16s var(--ease); }
.hole.up span { transform: none; }
.hole img { width: 100%; }
.hole .blot { width: 70%; height: 70%; border-radius: 45% 55% 50% 40%; background: radial-gradient(circle at 35% 35%, #ff7a8a, #8a1530); }
.hole.hit { background: #eef3ff; }
.hole.hit.bad { background: #4a1420; }
.tbar { height: 8px; border-radius: 4px; background: rgba(255,255,255,.08); margin-top: 12px; overflow: hidden; }
.tbar i { display: block; height: 100%; background: linear-gradient(90deg, #3d7bff, #8fb2ff); transform-origin: left; }
.focus { display: grid; gap: 14px; }
.lens { width: 170px; height: 170px; margin: 6px auto 0; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle, #1d2440, #0a0d18); box-shadow: inset 0 0 0 6px #2a3150, inset 0 0 0 12px #121626, 0 10px 30px rgba(0,0,0,.4); }
.lens img { width: 110px; }
.lens.ok { animation: lensok .4s; } .lens.no { animation: nope .35s; }
@keyframes lensok { 50% { box-shadow: inset 0 0 0 6px #7be3a8, inset 0 0 0 12px #121626, 0 0 30px rgba(123,227,168,.6); } }
.fbar { position: relative; height: 18px; border-radius: 9px; background: rgba(255,255,255,.08); }
.fbar .zone { position: absolute; top: 0; bottom: 0; border-radius: 9px; background: rgba(123,227,168,.45); box-shadow: inset 0 0 0 1.5px #7be3a8; transition: left .3s var(--ease), width .3s var(--ease); }
.fbar .knob { position: absolute; top: -5px; width: 6px; height: 28px; margin-left: -3px; border-radius: 3px; background: #fff; box-shadow: 0 0 10px rgba(255,255,255,.6); }

/* старые Android WebView не знают aspect-ratio: держим пропорции через padding-top, содержимое — поверх */
@supports not (aspect-ratio: 1 / 1) {
  .styles .style:not(.wide):not(.feat), .style.has-img { height: 0; padding: 0 0 133.33% 0 !important; min-height: 0; }
  .styles .style:not(.wide):not(.feat):not(.has-img) .st, .styles .style:not(.wide):not(.feat):not(.has-img) > b, .styles .style:not(.wide):not(.feat):not(.has-img) > span:not(.e):not(.lock) { position: relative; }
  .style.has-img .st { position: absolute; left: 0; right: 0; bottom: 0; }
  .style.feat { height: 0; padding: 0 0 62.5% 0 !important; }
  .ggrid button { height: 0; padding-top: 133.33%; }
  .ggrid button img { position: absolute; top: 0; left: 0; }
  .pairs button { height: 0; padding-top: 133.33%; }
  .hole { height: 0; padding-top: 100%; }
  .cv canvas { height: auto; }
  .vf { height: 240px; }
}
/* игры: компактный экран ожидания и плитки без прокрутки */
.gen.compact { text-align: left; padding: 6px 0 4px; }
.gen-top { display: flex; align-items: center; gap: 14px; }
.gen.compact .ring { width: 76px; height: 76px; margin: 0; flex: 0 0 76px; }
.gen.compact .ring img { width: 56px; }
.gen-t { flex: 1; min-width: 0; }
.gen-t h2 { font-size: 21px; }
.gen-t p { font-size: 13px; margin-top: 3px; }
.gen.compact .pbar, .gen.compact .pmeta { max-width: none; }
.gen.compact .pbar { margin-top: 14px; }
#gh { margin-top: 16px; }
.gmenu.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gmenu.tiles .gcard { flex-direction: column; align-items: flex-start; padding: 12px; min-height: 0; }
.gmenu.tiles .gi { width: 40px; height: 40px; border-radius: 13px; flex: 0 0 40px; margin: 0 0 8px; }
.gmenu.tiles .gi svg { width: 22px; height: 22px; }
.gmenu.tiles .gt b { font-size: 14.5px; }
.gmenu.tiles .gt span { font-size: 11.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gmenu.tiles .gb { position: absolute; top: 12px; right: 12px; font-size: 14px; margin: 0; }
.gmenu.tiles .gb small { display: none; }
.gmenu.tiles .gcard:last-child:nth-child(odd) { grid-column: span 2; flex-direction: row; align-items: center; }
.gmenu.tiles .gcard:last-child:nth-child(odd) .gi { margin: 0 12px 0 0; }
.gameslink { display: flex; align-items: center; width: 100%; text-align: left; padding: 12px 14px; border-radius: var(--rm); background: var(--s1); margin-bottom: 12px; }
.gameslink .gi { width: 40px; height: 40px; margin-right: 12px; flex: 0 0 40px; border-radius: 13px; background: var(--blue-t); display: flex; align-items: center; justify-content: center; }
.gameslink .gi svg { width: 24px; height: 24px; fill: none; stroke: var(--blue-l); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* свой запрос: референс и подсказка */
.ps-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tipbtn { flex: 0 0 auto; height: 36px; padding: 0 12px; border-radius: 12px; background: var(--blue-t); color: var(--blue-l); font-size: 13.5px; font-weight: 800; }
.refbox { position: relative; display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px; border-radius: var(--rm); border: 1.5px dashed rgba(143,178,255,.45);
  background: rgba(61,123,255,.07); cursor: pointer; }
.refbox.has { border-style: solid; border-color: var(--blue); }
.refbox.loading { opacity: .5; }
.refbox .ri { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 14px; background: var(--blue-t); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.refbox img { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 12px; object-fit: cover; }
.refbox .rt { flex: 1; min-width: 0; }
.refbox .rt b { display: block; font-size: 14.5px; }
.refbox .rt em { font-style: normal; font-weight: 700; color: var(--muted); font-size: 12px; margin-left: 4px; }
.refbox .rt small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.refbox .rx { width: 32px; height: 32px; border-radius: 50%; background: var(--s3); font-size: 14px; }
.tips { display: grid; gap: 8px; margin-top: 14px; }
.tips div { display: flex; gap: 12px; padding: 12px; border-radius: var(--rm); background: var(--s2); }
.tips span { font-size: 22px; }
.tips b { display: block; font-size: 14px; }
.tips p { color: var(--muted); font-size: 13.5px; }

/* во время игры: без нижнего меню и шапки ожидания, поле подстраивается под высоту экрана */
body.gaming #tabs { opacity: 0; pointer-events: none; }
body.gaming .tabs-on .wrap, body.gaming .wrap { padding-top: 12px; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
body.gaming .gen-top, body.gaming #many, body.gaming #gh, body.gaming #act, body.gaming .wrap > .bar, body.gaming .wrap > h1 { display: none; }
body.gaming .gen.compact { padding: 0; }
body.gaming .gen.compact .pbar { margin-top: 0; height: 8px; }
body.gaming .gen.compact .pmeta { margin-top: 4px; font-size: 12.5px; }
body.gaming #games { margin-top: 10px !important; }
body.gaming .game { padding: 12px; }
body.gaming .game-h { margin-bottom: 10px; }
body.gaming .cv { max-width: min(360px, calc((100vh - 230px) * .8)); }
body.gaming .pairs, body.gaming .snap { max-width: min(100%, calc(100vh - 250px)); margin: 0 auto; }
body.gaming .vf { max-height: calc(100vh - 300px); }
body.gaming .lens { width: min(170px, calc(100vh - 420px)); height: min(170px, calc(100vh - 420px)); }

/* скрытые элементы не показываем, даже если у них свой display (кнопка «Ещё» в пустой галерее) */
[hidden] { display: none !important; }

/* история: сетка миниатюр */
.ggrid.hist span { display: flex; flex-direction: column; }
.ggrid.hist span small { font-weight: 600; opacity: .7; font-size: 10px; margin-top: 1px; }
.ggrid .pubm { position: absolute; top: 8px; right: 8px; font-style: normal; font-size: 14px; background: rgba(8,9,11,.6); border-radius: 8px; padding: 2px 5px; }
/* подсказка «какое фото подойдёт» */
.phototip { display: block; width: 100%; margin-top: 10px; padding: 12px 14px; border-radius: var(--rm); background: var(--blue-t); color: var(--blue-l); font-weight: 700; font-size: 14px; text-align: left; }
.ptips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.ptips div { position: relative; border-radius: var(--rm); overflow: hidden; background: var(--s2); box-shadow: inset 0 0 0 2px rgba(255,90,80,.45); }
.ptips div.ok { box-shadow: inset 0 0 0 2px #7be3a8; }
.ptips img { display: block; width: 100%; height: 150px; object-fit: cover; }
.ptips span { display: block; padding: 8px 10px; font-size: 12.5px; font-weight: 700; }
/* оплата */
.pc-auto { margin-top: 6px; font-size: 12px; color: rgba(255,255,255,.55); font-weight: 600; }
.fine { text-align: center; color: var(--dim); font-size: 11.5px; margin-top: 12px; }
.autooff { display: block; margin-top: 8px; padding: 6px 10px; border-radius: 10px; background: rgba(255,255,255,.08); color: var(--muted); font-size: 12px; font-weight: 700; }

/* доступ ограничен */
.blockedw { text-align: center; }
.blk { display: flex; flex-direction: column; align-items: center; max-width: 340px; margin: 0 auto; width: 100%; }
.blk-cat { width: 190px; height: 190px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
  background: radial-gradient(circle, rgba(61,123,255,.18), transparent 68%); }
.blk-cat img { width: 170px; height: 170px; object-fit: contain; }
.blk h1 { font-size: 30px; }
.blk-r { margin-top: 10px; padding: 8px 14px; border-radius: 12px; background: rgba(255,90,80,.12); color: #ff9a90; font-weight: 700; font-size: 14px; }
.blk .muted { margin-top: 10px; font-size: 14.5px; }
.blk .btn { margin-top: 22px; }

/* иконки профиля в стиле Тикопи */
.pic img { width: 26px; height: 26px; object-fit: contain; }
.inv-ic img { width: 44px; height: 44px; object-fit: contain; display: block; }
.bonus .e img { width: 30px; height: 30px; object-fit: contain; }

/* живой блок «Готовится» на главной */
.act { padding: 12px 14px; border-radius: var(--rm); background: var(--s1); box-shadow: inset 0 0 0 1px rgba(61,123,255,.3); margin-bottom: 12px; }
.act-h b { display: block; font-size: 15px; }
.act-h span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.act-j { display: block; width: 100%; text-align: left; padding: 10px 0 2px; border-top: 1px solid var(--hair); margin-top: 10px; }
.act-t { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; }
.act-t em { font-style: normal; color: var(--blue-l); font-weight: 700; white-space: nowrap; }
.act-j .mini-bar i { transition: width .6s var(--ease); }
/* история: фото в работе */
.ggrid button.pending { background: linear-gradient(160deg, #16224a, #0b0f1c); box-shadow: inset 0 0 0 1px rgba(61,123,255,.35); display: flex; align-items: center; justify-content: center; }
.ggrid button.pending span small { color: var(--blue-l); }
.spin { display: block; width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(61,123,255,.25); border-top-color: var(--blue); animation: spin .9s linear infinite; }
@supports not (aspect-ratio: 1 / 1) { .ggrid button.pending .spin { position: absolute; top: 40%; left: 50%; margin: -17px 0 0 -17px; } }
.wait-cat { position: relative; width: 120px; height: 120px; margin: 6px auto 10px; display: flex; align-items: center; justify-content: center; }
.wait-cat img { width: 84px; }
.wait-cat .spin.big { position: absolute; top: 0; left: 0; width: 120px; height: 120px; border-width: 3px; }
.wait-eta { text-align: center; font-size: 26px; font-weight: 800; margin: 6px 0 4px; }

/* ======================================================================
   v3 — единая система компонентов. Цвета, градиенты и радиусы прежние;
   здесь только отступы, safe area, сетки и новые общие блоки.
   ====================================================================== */
:root {
  --gap: 12px;                     /* расстояние между блоками */
  --pad: 16px;                     /* внутренний отступ карточек */
  --fs-xs: 12px; --fs-s: 13px; --fs-m: 15px;
  --nav-h: 64px;                   /* высота нижнего меню */
  --sat: env(safe-area-inset-top, 0px);
  --sab: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
}
/* полноэкранный режим Telegram: сверху его кнопки и вырез — берём отступы, которые даёт Telegram */
body.fs { --sat: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)); }
.wrap { padding-top: calc(22px + var(--sat)); padding-bottom: calc(30px + var(--sab)); }
.tabs-on .wrap { padding-bottom: calc(var(--nav-h) + 40px + var(--sab)); }
.chat-h { padding-top: calc(22px + var(--sat)); }
.composer { padding-bottom: calc(12px + var(--sab)); }
#sheet { padding-bottom: calc(24px + var(--sab)); max-height: calc(100% - var(--sat) - 24px); }

/* BottomNavigation: фиксирована, не шире экрана, учитывает safe area */
#tabs { bottom: calc(12px + var(--sab)); width: min(calc(100% - 24px), 420px); justify-content: space-between; height: var(--nav-h); }
#tabs button { flex: 1 1 0; min-width: 0; width: auto; }
#tabs .tab-add { flex: 0 0 56px; }
#tabs button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#tabs button.dot:after { right: calc(50% - 18px); }
/* под меню — мягкое затемнение, чтобы контент не просвечивал вокруг плашки */
#app:after { content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + 30px + var(--sab)); z-index: 4; pointer-events: none;
  background: linear-gradient(rgba(8, 9, 11, 0), rgba(8, 9, 11, .92) 55%); opacity: 0; transition: opacity .3s; }
.tabs-on #app:after { opacity: 1; }
body.gaming #app:after, .kb #app:after { opacity: 0; }
.tabs-on #toast { bottom: calc(var(--nav-h) + 24px + var(--sab)); }
.btn.sticky { bottom: calc(var(--nav-h) + 24px + var(--sab)); }

/* AppHeader */
.bar { margin-bottom: 16px; min-height: 34px; }
h3 { margin: 22px 0 10px; }
.sec-h { margin-top: 22px; }
.sec-h h3 { margin: 0; }
.sec-h { margin-bottom: 10px; }

/* PrimaryButton на главной — главный акцент экрана */
.hero-cta { display: flex; align-items: center; width: 100%; min-height: 76px; padding: 14px 16px; margin-bottom: var(--gap); border-radius: var(--rl); text-align: left;
  background: var(--blue); color: #fff; box-shadow: 0 10px 32px rgba(61, 123, 255, .3); transition: transform .2s var(--ease); }
.hero-cta:active { transform: scale(.98); }
.hero-ic { flex: 0 0 48px; height: 48px; border-radius: 16px; background: rgba(255, 255, 255, .16); display: flex; align-items: center; justify-content: center; margin-right: 14px; }
.hero-ic svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.hero-t { flex: 1; min-width: 0; }
.hero-t b { display: block; font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.hero-t span { display: block; font-size: var(--fs-s); color: rgba(255, 255, 255, .78); margin-top: 2px; }
.hero-go { font-style: normal; font-size: 28px; font-weight: 400; opacity: .8; margin-left: 8px; }

/* SubscriptionCard: тот же navy-градиент, что был у карточки тарифа */
.subc { display: block; width: 100%; padding: var(--pad); margin-bottom: var(--gap); border-radius: var(--rl); cursor: pointer; text-align: left;
  background: linear-gradient(160deg, #13204a 0%, #0d1630 55%, #0b0f1c 100%); transition: transform .2s var(--ease); }
.subc:active { transform: scale(.985); }
.subc.free { background: var(--s1); box-shadow: inset 0 0 0 1px var(--hair); }
.subc-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.subc-h .pill { height: 26px; font-size: 11.5px; }
.subc-h em { font-style: normal; font-size: var(--fs-s); font-weight: 700; color: var(--muted); white-space: nowrap; }
.subc-h em.go { color: var(--blue-l); }
.subc-n { display: flex; align-items: baseline; gap: 6px; margin-top: 12px; }
.subc-n b { font-size: 34px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.subc-n span { color: var(--muted); font-size: 14px; font-weight: 700; }
.subc .meter { height: 6px; margin-top: 12px; }
.subc-f { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; font-size: var(--fs-xs); font-weight: 700; color: var(--muted); }
.subc-f span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subc-f span + span { color: var(--blue-l); white-space: nowrap; }
.subc-off { display: block; margin-top: 12px; padding: 0; color: var(--muted); font-size: var(--fs-xs); font-weight: 700; text-decoration: underline; text-decoration-color: var(--dim); text-underline-offset: 3px; }

/* быстрые плитки: игры и бонус дня рядом, вместо двух полноширинных карточек */
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 4px; }
.quick .qt:only-child { grid-column: span 2; }
.qt { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: 12px 14px; border-radius: var(--rm); background: var(--s1); text-align: left;
  box-shadow: inset 0 0 0 1px var(--hair); transition: transform .2s var(--ease); }
button.qt:active { transform: scale(.97); }
.qt .gi { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 12px; margin: 0 0 8px; }
.qt .gi svg { width: 22px; height: 22px; }
.qt .gi img { width: 26px; height: 26px; object-fit: contain; }
.qt b { font-size: 14.5px; font-weight: 800; }
.qt > span:last-child { max-width: 100%; color: var(--muted); font-size: var(--fs-xs); font-weight: 600; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qt.hot { box-shadow: inset 0 0 0 1.5px rgba(61, 123, 255, .55); }
.qt.hot > span:last-child { color: var(--blue-l); font-weight: 800; }
.qt:disabled { opacity: .6; }

/* StatisticsCard: одна плашка с разделителями */
.stats { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; margin-bottom: var(--gap); border-radius: var(--rm); background: var(--s1); padding: 12px 0; }
.stats div { min-width: 0; padding: 0 14px; }
.stats div + div { border-left: 1px solid var(--hair); }
.stats b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.03em; line-height: 1.2; }
.stats span { display: block; color: var(--muted); font-size: var(--fs-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* SettingsRow + группа: один список вместо отдельных карточек */
.group { background: var(--s1); border-radius: var(--rl); padding: 2px 16px; margin-bottom: var(--gap); }
.prow { min-height: 56px; padding: 10px 0; gap: 0; }
.prow > span { min-width: 0; }
.prow small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prow em { flex: 0 0 auto; margin-left: 10px; white-space: nowrap; }
.prow em .btn.sm { height: 34px; }
.me { min-width: 0; }
.me-t { min-width: 0; flex: 1; }
.me h1 { font-size: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* StyleCard: ровная сетка 3:4, текст на мягком градиенте, описание — 2 строки */
.style { background: var(--s1); }
.style.has-img { background: var(--s2); }
.style.has-img .e, .styles .style.has-img .e { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -60%); font-size: 34px; opacity: .5; margin: 0; }
.style .st { display: block; min-width: 0; }
.style .st b, .style > b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.style .st > span, .style.has-img .st span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.style.has-img .st { padding: 48px 12px 12px; background: linear-gradient(180deg, rgba(5,7,12,0) 0%, rgba(5,7,12,.55) 38%, rgba(5,7,12,.94) 100%); }
.styles .style:not(.has-img):not(.wide) .st { position: relative; }
.style.wide.own .st, .style.wide > span:last-child { min-width: 0; }
/* компактная подборка стилей на главной — лента */
.sstrip { display: flex; gap: 8px; overflow-x: auto; margin: 0 -20px; padding: 0 20px 2px; scroll-padding: 0 20px; scroll-snap-type: x proximity; scrollbar-width: none; }
.sstrip::-webkit-scrollbar { display: none; }
.sstrip .style { flex: 0 0 132px; aspect-ratio: 3 / 4; min-height: 0; justify-content: flex-end; scroll-snap-align: start; padding: 0; overflow: hidden; }
.sstrip .style .st b { font-size: 12px; }
.sstrip .style .st span { font-size: 11.5px; }
.sstrip .style.own { padding: 12px; justify-content: space-between; }
.sstrip .style.own .e { font-size: 28px; }
.sstrip .style.own .st b { white-space: normal; }
.sstrip .style.feat { aspect-ratio: 3 / 4; grid-column: auto; }
.sstrip .style .tag { top: 8px; right: 8px; padding: 4px 8px; font-size: 10.5px; }
@supports not (aspect-ratio: 1 / 1) { .sstrip .style { height: 176px; padding: 0 !important; } .sstrip .style.has-img .st { position: absolute; left: 0; right: 0; bottom: 0; } }

/* галерея и «Лучшие работы»: подпись одной строкой на градиенте, картинка не деформируется */
.strip button, .ggrid button { background: var(--s2); }
.strip span, .ggrid span { padding: 28px 10px 9px; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.55) 45%, rgba(0,0,0,.88)); }
.ggrid.hist span { white-space: normal; }
.ggrid.hist span small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ggrid { gap: 10px; }

/* тарифы: свайп без обрезанных теней и плашек, цена/список/кнопка на одной линии у всех карточек */
.pcar { padding: 14px 20px 28px; margin-bottom: -16px; align-items: stretch; overscroll-behavior-x: contain; }
.pc { flex-basis: min(82%, 330px); }
.pc-price { font-size: clamp(38px, 12vw, 48px); flex-wrap: wrap; row-gap: 0; }
.pc-price small { white-space: nowrap; }
.pc-auto { min-height: 32px; }
.pc-auto.cur { color: #7be3a8; font-weight: 700; }
.pc ul { margin: 12px 0 16px; }
.pc li { align-items: flex-start; }
.pc li:before { margin-top: 1px; }
.pdots { margin: 6px 0 16px; }

/* свой запрос: референс над полем ввода, рядом — уже приложенное фото */
.refpair { margin-top: 14px; }
.refpair .refbox { margin-top: 0; }
.refpair.two { display: grid; grid-template-columns: 76px 1fr; gap: 10px; }
.rp-me { position: relative; border-radius: var(--rm); overflow: hidden; background: var(--s2); min-height: 76px; }
.rp-me img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.rp-me span { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 4px 5px; font-size: 10.5px; font-weight: 800; text-align: center; background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,.8)); }
.refline { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 10px; padding: 10px 14px; border-radius: var(--rm); text-align: left;
  border: 1.5px dashed rgba(143,178,255,.45); background: rgba(61,123,255,.07); }
.refline.has { border-style: solid; border-color: var(--blue); }
.refline img, .refline .ri { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px; object-fit: cover; }
.refline .ri { background: var(--blue-t); display: flex; align-items: center; justify-content: center; font-size: 19px; }
.refline .rt { flex: 1; min-width: 0; }
.refline .rt b { display: block; font-size: 14px; }
.refline .rt small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* состояние загрузки списков */
.loadbox { display: flex; justify-content: center; padding: 48px 0; }

/* узкие экраны (320–360 px) */
@media (max-width: 360px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .strip, .sstrip, .pcar { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
  .hero-t b { font-size: 17px; }
  .stats div { padding: 0 10px; }
  .stats b { font-size: 18px; }
  .stats span { white-space: normal; line-height: 1.25; }
  #tabs button { font-size: 10px; }
}
