/* Backstage — тёмный «закулисный» стиль. Акцент задаёт автор (--accent), всё остальное от него. */

:root {
  --accent: #e0245e;
  --accent-rgb: 224, 36, 94;
  --bg: #09080c;
  --bg-2: #0f0d13;
  --surface: #15131b;
  --surface-2: #1d1a25;
  --surface-3: #262230;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --text: #f5f2f7;
  --muted: #9b94a8;
  --faint: #6c6578;
  --gold: #f7c65a;
  --ok: #3ddc97;
  --warn: #ffb547;
  --danger: #ff4d6d;
  --radius: 20px;
  --radius-sm: 14px;
  --emoji: 'Apple Color Emoji', 'Noto Color Emoji', 'Segoe UI Emoji';
  --display: 'Unbounded', 'Inter', var(--emoji), system-ui, sans-serif;
  --font: 'Inter', -apple-system, 'SF Pro Text', var(--emoji), 'Segoe UI', Roboto, system-ui, sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tabbar-h: 68px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  min-height: 100vh;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; }

#root { max-width: 560px; margin: 0 auto; min-height: 100vh; position: relative; }
.page { padding: 0 16px calc(var(--tabbar-h) + var(--safe-bottom) + 28px); animation: fade-in 0.28s ease; }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Заставка ---------- */
.splash { min-height: 100vh; display: grid; place-items: center; }
.splash-logo {
  width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center;
  font: 700 28px var(--display); background: linear-gradient(135deg, var(--accent), #7a1236);
  box-shadow: 0 0 60px rgba(var(--accent-rgb), 0.5); animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 50% { transform: scale(0.92); opacity: 0.7; } }
.logo-img { display: block; width: 72px; height: 72px; border-radius: 18px; box-shadow: 0 10px 40px rgba(var(--accent-rgb), 0.45); }
.logo-img.pulse { animation: pulse 1.4s ease-in-out infinite; }

/* ---------- Обложка ---------- */
.hero { position: relative; margin: 0 -16px; padding-bottom: 8px; }
.cover {
  height: 196px; position: relative; overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(var(--accent-rgb), 0.55), transparent 60%),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.35) 0 14px, rgba(255, 255, 255, 0.025) 14px 30px, rgba(0, 0, 0, 0.3) 30px 44px),
    linear-gradient(180deg, rgba(var(--accent-rgb), 0.42), #12070c);
}
.cover::before { /* луч прожектора */
  content: ''; position: absolute; inset: -40% 20% 0; background: radial-gradient(50% 60% at 50% 0%, rgba(255, 240, 220, 0.22), transparent 70%);
  filter: blur(6px); animation: spotlight 7s ease-in-out infinite alternate;
}
@keyframes spotlight { from { transform: translateX(-12%) rotate(-4deg); } to { transform: translateX(12%) rotate(4deg); } }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, var(--bg) 100%); }

.hero-body { position: relative; margin-top: -56px; padding: 0 16px; text-align: center; z-index: 2; }
.avatar {
  width: 92px; height: 92px; margin: 0 auto 12px; border-radius: 50%; overflow: hidden; position: relative;
  background: linear-gradient(135deg, var(--accent), #5b0f2a); display: grid; place-items: center;
  font: 700 34px var(--display); box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px rgba(var(--accent-rgb), 0.55), 0 12px 40px rgba(var(--accent-rgb), 0.45);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.brand-title { font: 700 24px/1.15 var(--display); letter-spacing: -0.01em; margin: 0; }
.brand-tagline { color: var(--muted); margin: 6px 0 0; font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--muted);
}
.chip b { color: var(--text); font-weight: 600; }
.chip.live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }

/* ---------- Блоки ---------- */
.section { margin-top: 22px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 10px; font: 600 13px var(--font); letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.section-title .link { text-transform: none; letter-spacing: 0; color: var(--accent); font-weight: 600; font-size: 14px; }
.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  position: relative; overflow: hidden;
}
.card + .card { margin-top: 10px; }
.card.glow { border-color: rgba(var(--accent-rgb), 0.35); box-shadow: 0 10px 40px -12px rgba(var(--accent-rgb), 0.45); }
.card.glow::before { content: ''; position: absolute; inset: -1px; background: radial-gradient(80% 60% at 100% 0%, rgba(var(--accent-rgb), 0.18), transparent 60%); pointer-events: none; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 10px; }
.gap-top { margin-top: 14px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.desc { white-space: pre-line; color: var(--muted); font-size: 14px; }

/* ---------- Статус доступа ---------- */
.status-head { display: flex; align-items: center; gap: 12px; }
.status-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; flex: none; }
.status-icon.on { background: rgba(61, 220, 151, 0.12); box-shadow: inset 0 0 0 1px rgba(61, 220, 151, 0.3); }
.status-icon.off { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.status-title { font-weight: 700; font-size: 16px; }
.big-days { font: 700 32px/1 var(--display); }
.progress { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-top: 12px; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--gold)); box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.6); transition: width 0.6s ease; }
.progress.ok > i { background: linear-gradient(90deg, #22b07d, var(--ok)); box-shadow: 0 0 14px rgba(61, 220, 151, 0.5); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  padding: 14px 18px; border-radius: 14px; font-weight: 600; font-size: 15px;
  background: var(--surface-2); border: 1px solid var(--line-2); transition: transform 0.12s ease, opacity 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn.primary { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #2a0a18)); border-color: transparent; box-shadow: 0 8px 28px -8px rgba(var(--accent-rgb), 0.8); color: #fff; }
.btn.gold { background: linear-gradient(135deg, #ffd978, #e9a83a); color: #2a1a00; border-color: transparent; box-shadow: 0 8px 26px -8px rgba(247, 198, 90, 0.7); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); background: rgba(255, 77, 109, 0.08); border-color: rgba(255, 77, 109, 0.25); }
.btn.sm { width: auto; padding: 9px 14px; font-size: 14px; border-radius: 12px; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.btn-row { display: flex; gap: 10px; }
.btn-row > * { flex: 1; }

/* ---------- Баннеры ---------- */
.banner {
  display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(var(--accent-rgb), 0.22), rgba(247, 198, 90, 0.12));
  border: 1px solid rgba(var(--accent-rgb), 0.35);
}
.banner .emoji { font-size: 30px; line-height: 1; }
.banner b { display: block; font-size: 15px; }
.banner.gold { background: linear-gradient(120deg, rgba(247, 198, 90, 0.2), rgba(247, 198, 90, 0.05)); border-color: rgba(247, 198, 90, 0.35); }

/* ---------- Тарифы ---------- */
.tariff {
  display: block; width: 100%; text-align: left; position: relative; padding: 18px; border-radius: var(--radius);
  background: var(--surface); border: 1.5px solid var(--line); transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}
.tariff + .tariff { margin-top: 10px; }
.tariff:active { transform: scale(0.985); }
.tariff.selected { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.14), 0 14px 40px -16px rgba(var(--accent-rgb), 0.7); background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.1), var(--surface)); }
.tariff.soldout { opacity: 0.5; }
.tariff-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tariff-name { font-weight: 700; font-size: 17px; }
.tariff-period { color: var(--muted); font-size: 13px; margin-top: 2px; }
.price { text-align: right; white-space: nowrap; }
.price-now { font: 700 24px/1 var(--display); }
.price-now .star { font-size: 18px; margin-left: 2px; }
.price-old { color: var(--faint); text-decoration: line-through; font-size: 13px; margin-top: 4px; }
.price-rub { color: var(--faint); font-size: 12px; margin-top: 4px; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.badge { font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 8px; background: var(--surface-3); color: var(--muted); }
.badge.hot { background: rgba(255, 77, 109, 0.14); color: #ff8aa0; }
.badge.save { background: rgba(61, 220, 151, 0.12); color: var(--ok); }
.badge.rec { background: rgba(var(--accent-rgb), 0.16); color: color-mix(in srgb, var(--accent) 55%, #fff); }
.badge.gold { background: rgba(247, 198, 90, 0.14); color: var(--gold); }
.seats { margin-top: 12px; }
.seats .progress { height: 6px; margin-top: 6px; }
.radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; display: grid; place-items: center; transition: 0.2s; }
.tariff.selected .radio { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.7); }
.tariff.selected .radio::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #fff; }

/* ---------- Плитки действий ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tile {
  text-align: left; padding: 16px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line);
  transition: transform 0.12s ease;
}
.tile:active { transform: scale(0.96); }
.tile .ico { font-size: 24px; }
.tile b { display: block; margin-top: 10px; font-size: 15px; }
.tile span { color: var(--muted); font-size: 12.5px; }

/* ---------- Списки ---------- */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.item { display: flex; align-items: center; gap: 12px; padding: 13px 16px; width: 100%; text-align: left; }
.item + .item { border-top: 1px solid var(--line); }
button.item:active { background: var(--surface-2); }
.item .ico { width: 38px; height: 38px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; font-size: 18px; flex: none; }
.item .title { font-weight: 600; }
.item .sub { color: var(--muted); font-size: 13px; }
.item .chev { color: var(--faint); font-size: 20px; }
.place { width: 30px; text-align: center; font: 700 15px var(--display); color: var(--faint); flex: none; }
.ava { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; flex: none; color: #fff; }
.me-row { background: rgba(var(--accent-rgb), 0.1); }
.amount { font: 700 15px var(--display); white-space: nowrap; }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 8px; align-items: end; margin-bottom: 12px; }
.podium > div { text-align: center; padding: 14px 6px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); }
.podium .first { background: linear-gradient(180deg, rgba(247, 198, 90, 0.18), var(--surface)); border-color: rgba(247, 198, 90, 0.35); padding-top: 22px; }
.podium .medal { font-size: 28px; }
.podium .ava { margin: 6px auto; }
.podium .name { font-weight: 600; font-size: 13px; }

/* ---------- Формы ---------- */
.field { display: block; margin-top: 12px; }
.field > span { display: block; font-size: 13px; color: var(--muted); margin: 0 4px 6px; }
.input, .textarea, .select {
  width: 100%; padding: 13px 14px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line-2); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.15); }
.textarea { min-height: 110px; resize: vertical; }
.input.code { text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600; text-align: center; font-size: 18px; }
.inline-form { display: flex; gap: 8px; }
.inline-form .input { flex: 1; }
.amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.amount-btn { padding: 14px 6px; border-radius: 14px; background: var(--surface-2); border: 1.5px solid var(--line); font: 700 15px var(--display); }
.amount-btn.selected { border-color: var(--gold); color: var(--gold); background: rgba(247, 198, 90, 0.08); }
.seg { display: flex; padding: 4px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); gap: 4px; }
.seg button { flex: 1; padding: 10px 6px; border-radius: 10px; font-weight: 600; font-size: 13.5px; color: var(--muted); }
.seg button.on { background: var(--surface-3); color: var(--text); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); }
.switch { width: 50px; height: 30px; border-radius: 99px; background: var(--surface-3); position: relative; transition: 0.2s; flex: none; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: 0.2s; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4); }
.switch.on { background: var(--ok); }
.switch.on::after { left: 23px; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 38px; height: 38px; border-radius: 50%; border: 3px solid transparent; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.25); }
.swatch.on { border-color: #fff; }
.copy-box { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--bg-2); border: 1px dashed var(--line-2); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
.copy-box span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Цель ---------- */
.goal-amount { display: flex; align-items: baseline; justify-content: space-between; margin-top: 10px; }
.goal-amount b { font: 700 22px var(--display); }

/* ---------- Нижнее меню ---------- */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 560px; z-index: 20;
  display: flex; padding: 8px 10px calc(8px + var(--safe-bottom)); gap: 4px;
  background: rgba(9, 8, 12, 0.82); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-top: 1px solid var(--line);
}
.tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; border-radius: 12px; color: var(--faint); font-size: 11px; font-weight: 600; transition: color 0.2s; }
.tabbar button .ti { font-size: 21px; filter: grayscale(1) opacity(0.6); transition: 0.2s; }
.tabbar button.on { color: var(--text); }
.tabbar button.on .ti { filter: none; transform: translateY(-1px); }

/* ---------- Нижняя шторка ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px); animation: fade 0.2s ease; }
.sheet {
  position: relative; width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; padding: 10px 18px calc(24px + var(--safe-bottom));
  background: var(--surface); border-radius: 26px 26px 0 0; border: 1px solid var(--line-2); border-bottom: 0;
  animation: slide-up 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
.sheet::before { content: ''; display: block; width: 40px; height: 5px; border-radius: 9px; background: var(--surface-3); margin: 0 auto 14px; }
.sheet h3 { margin: 0 0 4px; font: 700 19px var(--display); }
@keyframes slide-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } }

/* ---------- Тосты ---------- */
#toasts { position: fixed; top: 12px; left: 0; right: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { max-width: 520px; padding: 12px 16px; border-radius: 14px; background: rgba(32, 29, 40, 0.96); border: 1px solid var(--line-2); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5); font-weight: 500; animation: toast-in 0.3s ease; }
.toast.error { border-color: rgba(255, 77, 109, 0.45); }
.toast.ok { border-color: rgba(61, 220, 151, 0.45); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px) scale(0.96); } }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; width: 100%; height: 100%; }

/* ---------- Админка ---------- */
.admin-head { padding: 18px 4px 4px; }
.admin-head h2 { margin: 0; font: 700 22px var(--display); }
.subtabs { display: flex; gap: 6px; overflow-x: auto; margin: 14px -16px 4px; padding: 0 16px 4px; scrollbar-width: none; }
.subtabs::-webkit-scrollbar { display: none; }
.subtabs button { flex: none; padding: 9px 14px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-weight: 600; font-size: 13.5px; }
.subtabs button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.kpi { padding: 16px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); }
.kpi .label { color: var(--muted); font-size: 12.5px; }
.kpi .value { font: 700 24px/1.1 var(--display); margin-top: 6px; }
.kpi .hint { color: var(--faint); font-size: 12px; margin-top: 4px; }
.kpi.accent { background: linear-gradient(160deg, rgba(var(--accent-rgb), 0.25), var(--surface) 70%); border-color: rgba(var(--accent-rgb), 0.3); }
.chart { width: 100%; height: 150px; display: block; }
.chart text { fill: var(--faint); font-size: 10px; font-family: var(--font); }
.pill { display: inline-block; white-space: nowrap; padding: 3px 8px; border-radius: 8px; font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--muted); }
.pill.ok { background: rgba(61, 220, 151, 0.12); color: var(--ok); }
.pill.bad { background: rgba(255, 77, 109, 0.12); color: #ff8aa0; }
.pill.gold { background: rgba(247, 198, 90, 0.14); color: var(--gold); }
.icon-btn { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); flex: none; }
.empty { text-align: center; padding: 30px 10px; color: var(--muted); }
.empty .big { font-size: 40px; }
.footer-brand { text-align: center; margin-top: 30px; color: var(--faint); font-size: 12.5px; }
.footer-brand b { color: var(--muted); font-family: var(--display); font-weight: 500; }
.upload-preview { height: 110px; border-radius: 14px; background: var(--bg-2) center/cover no-repeat; border: 1px dashed var(--line-2); display: grid; place-items: center; color: var(--faint); }
.hr { height: 1px; background: var(--line); margin: 16px 0; }
.success-ico { width: 84px; height: 84px; border-radius: 50%; margin: 8px auto 14px; display: grid; place-items: center; font-size: 40px; background: radial-gradient(circle, rgba(61, 220, 151, 0.25), rgba(61, 220, 151, 0.05)); box-shadow: 0 0 0 1px rgba(61, 220, 151, 0.35), 0 0 50px rgba(61, 220, 151, 0.3); animation: pop 0.5s cubic-bezier(0.2, 1.4, 0.4, 1); }
@keyframes pop { from { transform: scale(0.3); opacity: 0; } }

/* ---------- Каталог авторов ---------- */
button.link { color: var(--accent); font-weight: 600; font-size: 14px; }
button.link.faint { color: var(--faint); font-weight: 500; }
.verified { color: var(--gold); font-size: 0.8em; }
.acard {
  display: block; width: 100%; text-align: left; border-radius: var(--radius); overflow: hidden; position: relative;
  background: var(--surface); border: 1px solid var(--line); transition: transform 0.12s ease;
}
.acard + .acard { margin-top: 12px; }
.acard:active { transform: scale(0.985); }
.acard-cover {
  height: 86px; position: relative;
  background:
    radial-gradient(90% 120% at 50% -20%, color-mix(in srgb, var(--a) 70%, transparent), transparent 65%),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.3) 0 10px, rgba(255, 255, 255, 0.02) 10px 22px),
    linear-gradient(180deg, color-mix(in srgb, var(--a) 45%, #000), #120a10);
}
.acard-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.acard-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, var(--surface)); }
.acard-body { display: flex; gap: 12px; align-items: flex-end; padding: 0 14px 14px; margin-top: -26px; position: relative; }
.acard-body .ava { box-shadow: 0 0 0 3px var(--surface), 0 6px 20px color-mix(in srgb, var(--a) 50%, transparent); flex: none; }
.acard-title { font-weight: 700; font-size: 16px; }
.acard-sub { color: var(--muted); font-size: 13px; }
.acard-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.hscroll { display: flex; gap: 12px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.mini-club { flex: none; width: 74px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; }
.mini-club span { width: 100%; text-align: center; font-weight: 600; }
.mini-club i { font-style: normal; color: var(--ok); font-size: 11px; margin-top: -4px; }
.mini-club .ava { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px rgba(61, 220, 151, 0.6); }
.sub-card + .sub-card { margin-top: 10px; }
.product + .product { margin-top: 10px; }

/* ---------- Студия ---------- */
.steps { display: flex; gap: 6px; margin: 14px 0 4px; }
.steps i { flex: 1; height: 5px; border-radius: 9px; background: var(--surface-3); }
.steps i.on { background: linear-gradient(90deg, var(--accent), var(--gold)); }
.howto { margin: 10px 0 0; padding-left: 20px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.howto b, .howto code { color: var(--text); }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.92em; background: var(--surface-3); padding: 1px 5px; border-radius: 6px; }
.tile.on-tile { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15); }
.ico.wait { animation: pulse 1.4s ease-in-out infinite; }

/* горизонтальные ленты: затухание по краю — видно, что можно листать */
.subtabs { cursor: grab; }
.subtabs.fade-r { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
.subtabs.fade-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%); mask-image: linear-gradient(90deg, transparent, #000 15%); }
.subtabs.fade-l.fade-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); }

/* шаги мастера — кликабельные вкладки */
.wsteps { margin-top: 10px; }
.wsteps button.done:not(.on) { color: var(--text); border-color: rgba(61, 220, 151, 0.35); }
.icon-btn[disabled] { opacity: 0.35; pointer-events: none; }

/* ---------- Студия: задачи, подсказки, переписка, предпросмотр, отмена ---------- */
.todo { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; margin-bottom: 10px; cursor: pointer; }
.todo .emoji { font-size: 22px; }
.todo b { display: inline; }
.todo .muted { display: block; margin-top: 2px; }
.qhint { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 700; vertical-align: middle; margin-left: 4px; background: transparent; cursor: pointer; padding: 0; }
.dot { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 11px; margin-left: 4px; }
.chat { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow-y: auto; }
.bubble { align-self: flex-start; max-width: 85%; padding: 9px 12px; border-radius: 16px 16px 16px 4px; background: var(--surface-3); font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.bubble.me { align-self: flex-end; border-radius: 16px 16px 4px 16px; background: rgba(var(--accent-rgb), 0.22); }
.bubble span { display: block; margin-top: 4px; font-size: 11px; color: var(--faint); }
.pv-phone { border: 1px solid var(--line); border-radius: 22px; overflow: hidden; background: var(--bg); }
.pv-chat { padding: 14px; display: flex; flex-direction: column; gap: 8px; background: linear-gradient(180deg, var(--surface), var(--bg)); }
.pv-btn { align-self: stretch; text-align: center; padding: 10px; border-radius: 12px; background: rgba(var(--accent-rgb), 0.18); color: var(--text); font-weight: 600; font-size: 14px; }
.pv-store { border-top: 1px dashed var(--line); padding-bottom: 12px; text-align: center; }
.pv-cover { height: 90px; background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.6), rgba(var(--accent-rgb), 0.1)); background-size: cover; background-position: center; }
.pv-ava { width: 60px; height: 60px; margin: -30px auto 0; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font: 700 24px var(--display); overflow: hidden; border: 3px solid var(--bg); }
.pv-ava img { width: 100%; height: 100%; object-fit: cover; }
.pv-title { font: 700 18px var(--display); margin-top: 8px; padding: 0 12px; }
.pv-tag { color: var(--muted); font-size: 13px; padding: 0 12px; }
.pv-desc { color: var(--muted); font-size: 13px; margin: 8px 14px 6px; white-space: pre-wrap; }
.pv-tariff { display: flex; justify-content: space-between; align-items: center; margin: 8px 12px 0; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); text-align: left; font-size: 14px; }
.pv-tariff small { display: block; color: var(--faint); font-size: 11px; }
.undo-bar { position: fixed; left: 12px; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 120; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface-3); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.4); transform: translateY(150%); transition: transform .25s; font-size: 14px; }
.undo-bar.show { transform: none; }
.undo-bar button { background: none; border: 0; color: var(--accent); font-weight: 700; font-size: 14px; cursor: pointer; }
.seg { overflow-x: auto; scrollbar-width: none; }
.seg button { white-space: nowrap; }

/* ---------- Светлая тема (переключатель ☀️/🌙, выбор хранится на устройстве) ---------- */
.theme-btn { font-size: 17px; }
.hero > .theme-btn { position: absolute; top: 12px; right: 12px; z-index: 3; background: rgba(0, 0, 0, 0.32); border-color: rgba(255, 255, 255, 0.18); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

:root[data-theme='light'] {
  color-scheme: light;
  --bg: #f5f3f7;
  --bg-2: #efecf3;
  --surface: #ffffff;
  --surface-2: #f2eff6;
  --surface-3: #e7e3ed;
  --line: rgba(28, 16, 40, 0.08);
  --line-2: rgba(28, 16, 40, 0.15);
  --text: #18141e;
  --muted: #625b6e;
  --faint: #8e879a;
  --gold: #b07a12;
  --ok: #13a56b;
  --warn: #c47800;
  --danger: #dc2347;
}
:root[data-theme='light'] .cover {
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(var(--accent-rgb), 0.45), transparent 60%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.35) 0 14px, rgba(0, 0, 0, 0.02) 14px 30px, rgba(255, 255, 255, 0.25) 30px 44px),
    linear-gradient(180deg, rgba(var(--accent-rgb), 0.35), #f3e6ec);
}
:root[data-theme='light'] .cover::before { background: radial-gradient(50% 60% at 50% 0%, rgba(255, 255, 255, 0.55), transparent 70%); }
:root[data-theme='light'] .acard-cover {
  background:
    radial-gradient(90% 120% at 50% -20%, color-mix(in srgb, var(--a) 55%, transparent), transparent 65%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.3) 0 10px, rgba(0, 0, 0, 0.02) 10px 22px),
    linear-gradient(180deg, color-mix(in srgb, var(--a) 35%, #fff), #f5eef2);
}
:root[data-theme='light'] .card,
:root[data-theme='light'] .tariff,
:root[data-theme='light'] .tile,
:root[data-theme='light'] .kpi,
:root[data-theme='light'] .list,
:root[data-theme='light'] .acard { box-shadow: 0 1px 3px rgba(28, 16, 40, 0.05), 0 6px 20px -12px rgba(28, 16, 40, 0.12); }
:root[data-theme='light'] .card.glow { box-shadow: 0 10px 34px -14px rgba(var(--accent-rgb), 0.35); }
:root[data-theme='light'] .tabbar { background: rgba(255, 255, 255, 0.86); }
:root[data-theme='light'] .toast { background: rgba(255, 255, 255, 0.97); box-shadow: 0 12px 30px rgba(28, 16, 40, 0.14); }
:root[data-theme='light'] .sheet-backdrop { background: rgba(20, 12, 28, 0.35); }
:root[data-theme='light'] .seg button.on { background: var(--surface); box-shadow: 0 2px 8px rgba(28, 16, 40, 0.1); }
:root[data-theme='light'] .switch::after { box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18); }
:root[data-theme='light'] .swatch.on { border-color: var(--text); }
:root[data-theme='light'] .badge.hot,
:root[data-theme='light'] .pill.bad { color: #c81e43; }
:root[data-theme='light'] .badge.rec { color: color-mix(in srgb, var(--accent) 80%, #000); }
:root[data-theme='light'] .undo-bar { box-shadow: 0 10px 30px rgba(28, 16, 40, 0.15); }
:root[data-theme='light'] .chip.live::before { box-shadow: none; }
