/* BeatHouse Mini App. Тёмная тема по умолчанию, светлая — если в Telegram светлая. */
:root {
  --bg: #0c0a12;
  --surface: #16131f;
  --surface-2: #201b2c;
  --line: rgba(255, 255, 255, .07);
  --text: #f4f1fb;
  --muted: #9b94ad;
  --accent: #8b5cf6;
  --accent-2: #ec4899;
  --ok: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
  --grad: linear-gradient(135deg, var(--accent), var(--accent-2));
  --radius: 18px;
  --tabbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f4f2f9;
  --surface: #ffffff;
  --surface-2: #efebf7;
  --line: rgba(20, 10, 40, .08);
  --text: #16131f;
  --muted: #6c6580;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  overscroll-behavior-y: none;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
input, textarea, select { font: inherit; color: var(--text); }
img { display: block; max-width: 100%; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- каркас ---------- */
.view {
  min-height: 100vh;
  padding: 12px 16px calc(var(--tabbar-h) + var(--safe-b) + 24px);
}
body.has-player .view { padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 118px); }

.page-head { display: flex; align-items: center; gap: 12px; margin: 6px 0 14px; }
.page-head h1 { font-size: 26px; line-height: 1.1; margin: 0; flex: 1; letter-spacing: -.02em; }
.page-head .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.section-title { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase;
  letter-spacing: .06em; margin: 22px 4px 10px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
}
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; color: var(--muted); font-weight: 500; transition: color .15s; }
.tab.active { color: var(--text); }
.tab.active .tab-ico { color: var(--accent); }
.tab-ico svg { width: 24px; height: 24px; }

/* ---------- элементы ---------- */
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); flex-shrink: 0; }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn.ghost { background: transparent; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px;
  padding: 0 18px; border-radius: 14px; font-weight: 600; background: var(--surface-2); transition: transform .1s, opacity .15s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--grad); color: #fff; box-shadow: 0 8px 24px -10px var(--accent-2); }
.btn.danger { color: var(--danger); }
.btn.block { width: 100%; }
.btn.sm { height: 34px; padding: 0 12px; border-radius: 10px; font-size: 13px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-row { display: flex; gap: 8px; }
.btn-row > * { flex: 1; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 10px; margin: 0 -16px;
  scrollbar-width: none; position: sticky; top: 0; z-index: 5; background: var(--bg); }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; height: 34px; padding: 0 14px; border-radius: 17px; background: var(--surface);
  border: 1px solid var(--line); font-size: 14px; font-weight: 500; white-space: nowrap; }
.chip.active { background: var(--text); color: var(--bg); border-color: transparent; }

.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 11px;
  background: var(--surface-2); font-size: 12px; color: var(--muted); white-space: nowrap; }
.pill.accent { background: color-mix(in srgb, var(--accent) 20%, transparent); color: #c4b5fd; }
:root[data-theme="light"] .pill.accent { color: #6d28d9; }
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 11px;
  font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); }
.badge.ok { background: rgba(34, 197, 94, .15); color: var(--ok); }
.badge.warn { background: rgba(245, 158, 11, .15); color: var(--warn); }
.badge.danger { background: rgba(239, 68, 68, .15); color: var(--danger); }
.badge.accent { background: rgba(139, 92, 246, .18); color: #c4b5fd; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.list { display: flex; flex-direction: column; gap: 10px; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .big { font-size: 44px; margin-bottom: 8px; }
.empty b { display: block; color: var(--text); font-size: 17px; margin-bottom: 6px; }

/* ---------- обложка бита ---------- */
.art { position: relative; border-radius: 14px; overflow: hidden; flex-shrink: 0; display: grid; place-items: center;
  color: rgba(255, 255, 255, .92); font-weight: 800; letter-spacing: -.02em; }
.art svg.wave { position: absolute; inset: auto 0 0 0; width: 100%; height: 55%; opacity: .35; }
.art .initials { position: relative; z-index: 1; text-shadow: 0 2px 10px rgba(0, 0, 0, .3); }
.art .play-ov { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .25);
  opacity: 0; transition: opacity .15s; z-index: 2; }
.art .play-ov svg { width: 34%; height: 34%; }
.beat.playing .art .play-ov, .beat .art:active .play-ov { opacity: 1; }
.eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; }
.eq i { width: 3px; background: var(--accent-2); border-radius: 2px; animation: eq 1s infinite ease-in-out; }
.eq i:nth-child(2) { animation-delay: .2s; } .eq i:nth-child(3) { animation-delay: .4s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 12px; } }

/* ---------- карточка бита в ленте ---------- */
.beat { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 12px;
  display: flex; flex-direction: column; gap: 10px; transition: border-color .2s, transform .1s;
  animation: rise .35s ease both; }
.beat.playing { border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: 0 10px 40px -20px var(--accent); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.beat-top { display: flex; gap: 12px; align-items: center; }
.beat-top .art { width: 76px; height: 76px; font-size: 26px; }
.beat-info { flex: 1; min-width: 0; }
.beat-title { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.beat-performer { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 13px; color: var(--muted); }
.shop-link img { width: 18px; height: 18px; border-radius: 6px; object-fit: cover; }
.fav-btn svg { width: 22px; height: 22px; transition: transform .2s; }
.fav-btn.on svg { fill: var(--accent-2); stroke: var(--accent-2); transform: scale(1.1); }
.beat-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.beat-bottom { display: flex; align-items: center; gap: 10px; }
.price { flex: 1; min-width: 0; }
.price b { font-size: 17px; }
.price .excl { font-size: 12px; color: var(--muted); }

/* ---------- плеер ---------- */
.player {
  position: fixed; left: 8px; right: 8px; z-index: 19;
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 8px);
  display: flex; flex-direction: column; gap: 2px; padding: 8px 8px 4px;
  background: color-mix(in srgb, var(--surface-2) 92%, transparent);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .6);
  animation: rise .25s ease both;
}
.player-art .art { width: 44px; height: 44px; border-radius: 11px; font-size: 15px; }
.player-meta { flex: 1; min-width: 0; }
.player-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player .icon-btn { width: 38px; height: 38px; }
#player-toggle { background: var(--text); color: var(--bg); }

/* ---------- магазины ---------- */
.search { position: relative; margin-bottom: 14px; }
.search input { width: 100%; height: 44px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface); padding: 0 14px 0 42px; outline: none; }
.search svg { position: absolute; left: 13px; top: 12px; width: 20px; height: 20px; color: var(--muted); }
.shop-card { display: block; border-radius: 20px; overflow: hidden; background: var(--surface);
  border: 1px solid var(--line); text-align: left; width: 100%; animation: rise .35s ease both; }
.shop-card img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; background: var(--surface-2); }
.shop-card .body { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; }
.shop-card b { font-size: 16px; }
.shop-hero { position: relative; margin: -12px -16px 0; }
.shop-hero img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
.shop-hero::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, var(--bg)); }
.shop-head { position: relative; z-index: 1; margin-top: -34px; }
.shop-head h1 { margin: 0; font-size: 26px; letter-spacing: -.02em; }
.stats-row { display: flex; gap: 8px; margin: 12px 0 4px; }
.stat { flex: 1; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.stat b { display: block; font-size: 20px; }
.stat span { font-size: 12px; color: var(--muted); }
.seg { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 3px; margin: 16px 0 12px; }
.seg button { flex: 1; height: 34px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--muted); }
.seg button.active { background: var(--surface-2); color: var(--text); }
.row-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line); width: 100%; text-align: left; }
.row-item .art { width: 52px; height: 52px; font-size: 18px; border-radius: 12px; }
.row-item .grow { flex: 1; min-width: 0; }
.row-item .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- профиль / кабинет ---------- */
.profile-head { display: flex; align-items: center; gap: 14px; margin: 8px 0 16px; }
.avatar { width: 60px; height: 60px; border-radius: 50%; background: var(--grad); display: grid; place-items: center;
  font-size: 24px; font-weight: 800; color: #fff; overflow: hidden; flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.cta { background: var(--grad); color: #fff; border-radius: 22px; padding: 18px; position: relative; overflow: hidden; }
.cta h3 { margin: 0 0 6px; font-size: 19px; }
.cta p { margin: 0 0 14px; opacity: .9; font-size: 14px; }
.cta .btn { background: #fff; color: #4c1d95; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px; }
.tile b { display: block; font-size: 24px; letter-spacing: -.02em; }
.tile span { font-size: 13px; color: var(--muted); }
.tile.hot { border-color: rgba(245, 158, 11, .5); }
.actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.action { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding: 14px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line); text-align: left; font-weight: 600; }
.action .ai { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-size: 18px;
  background: var(--surface-2); }
.action small { font-weight: 400; color: var(--muted); font-size: 12px; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; font-size: 14px;
  background: rgba(245, 158, 11, .12); border: 1px solid rgba(245, 158, 11, .3); margin-bottom: 10px; }
.alert.info { background: rgba(139, 92, 246, .1); border-color: rgba(139, 92, 246, .3); }
.order { display: flex; flex-direction: column; gap: 10px; }
.order-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.proof { width: 100%; max-height: 280px; object-fit: contain; border-radius: 12px; background: var(--surface-2); }

/* ---------- формы ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 13px; color: var(--muted); padding-left: 4px; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line); background: var(--surface-2);
  border-radius: 12px; padding: 11px 12px; outline: none; }
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }
.switch { position: relative; width: 48px; height: 28px; border-radius: 14px; background: var(--surface-2);
  border: 1px solid var(--line); flex-shrink: 0; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.switch.on { background: var(--ok); }
.switch.on::after { transform: translateX(20px); }
.sig-preview { background: #fff; border-radius: 12px; padding: 12px; min-height: 80px; display: grid; place-items: center; }
.sig-preview img { max-height: 90px; }
.upload { display: flex; align-items: center; justify-content: center; gap: 10px; border: 1.5px dashed var(--line);
  border-radius: 16px; padding: 18px; color: var(--muted); text-align: center; position: relative; }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload img { max-height: 160px; border-radius: 10px; }

/* ---------- нижняя шторка ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .55);
  animation: fade .2s ease both; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 92vh; overflow-y: auto;
  background: var(--surface); border-radius: 26px 26px 0 0; padding: 8px 18px calc(22px + var(--safe-b));
  animation: up .28s cubic-bezier(.2, .9, .3, 1) both; }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 14px; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(100%); } }
.sheet h2 { margin: 0 0 4px; font-size: 22px; letter-spacing: -.02em; }
.sheet-art { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.sheet-art .art { width: 96px; height: 96px; font-size: 32px; border-radius: 18px; }
.lic { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 16px; border: 1.5px solid var(--line);
  background: var(--surface-2); text-align: left; width: 100%; margin-bottom: 10px; }
.lic.selected { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface-2)); }
.lic.disabled { opacity: .5; pointer-events: none; }
.lic .radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--muted); flex-shrink: 0; margin-top: 1px; }
.lic.selected .radio { border: 7px solid var(--accent); }
.lic .lt { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; }
.lic ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; }
.requisites { background: var(--surface-2); border-radius: 14px; padding: 12px 14px; font-family: ui-monospace, Menlo, monospace;
  white-space: pre-wrap; word-break: break-word; font-size: 14px; }
.amount { font-size: 34px; font-weight: 800; letter-spacing: -.03em; }
.steps { display: flex; gap: 6px; margin: 4px 0 16px; }
.steps i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.steps i.on { background: var(--grad); }
.success { text-align: center; padding: 16px 0 6px; }
.success .check { width: 76px; height: 76px; border-radius: 50%; background: var(--grad); display: grid; place-items: center;
  margin: 0 auto 14px; animation: pop .4s cubic-bezier(.2, 1.4, .4, 1) both; }
.success .check svg { width: 38px; height: 38px; stroke: #fff; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }

.toast { position: fixed; left: 50%; top: 14px; transform: translate(-50%, -150%); z-index: 60; max-width: 90vw;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 14px; font-weight: 600; font-size: 14px;
  transition: transform .25s; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.toast.show { transform: translate(-50%, 0); }

.skeleton { border-radius: 22px; height: 150px; background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Иконки внутри кнопок — фиксированного размера */
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.shop-link svg, .alert svg { width: 16px; height: 16px; }
:root[data-theme="light"] .badge.accent { color: #6d28d9; }
.badge { white-space: nowrap; flex-shrink: 0; }

/* ---------- админка и графики ---------- */
:root { --series-1: #3987e5; --grid: rgba(255, 255, 255, .08); }
:root[data-theme="light"] { --series-1: #2a78d6; --grid: rgba(20, 10, 40, .08); }
.tabbar.six { grid-template-columns: repeat(6, 1fr); }
.tab { position: relative; }
.tab-badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--accent-2); color: #fff; font-size: 11px; font-weight: 700;
  display: grid; place-items: center; }
.tab-badge[hidden] { display: none; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.cart-total b { font-size: 24px; letter-spacing: -.02em; }
.tier-lines { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; }
.chart-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px 14px 10px; margin-bottom: 12px; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.chart-head h3 { margin: 0; font-size: 15px; }
.chart-head .total { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.chart { position: relative; touch-action: pan-y; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .axis { font-size: 10px; fill: var(--muted); }
.chart .tip { position: absolute; top: 0; pointer-events: none; background: var(--text); color: var(--bg);
  padding: 5px 9px; border-radius: 9px; font-size: 12px; font-weight: 600; white-space: nowrap;
  transform: translateX(-50%); opacity: 0; transition: opacity .1s; z-index: 2; }
.chart .tip span { display: block; font-weight: 400; opacity: .75; font-size: 11px; }
.chart .tip.show { opacity: 1; }
details.table-view { margin-top: 6px; font-size: 13px; }
details.table-view summary { color: var(--muted); cursor: pointer; padding: 4px 0; }
details.table-view table { width: 100%; border-collapse: collapse; margin-top: 4px; }
details.table-view td { padding: 4px 2px; border-top: 1px solid var(--line); }
details.table-view td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.tiles.three { grid-template-columns: 1fr 1fr 1fr; }
.tiles.three .tile b { font-size: 20px; }
.event { display: flex; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.event .ei { width: 32px; height: 32px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; flex-shrink: 0; }
.event time { display: block; font-size: 12px; color: var(--muted); }
.icon-btn .dot { position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px;
  background: var(--accent-2); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }

/* ---------- галочка, рейтинг, отзывы ---------- */
:root { --star: #f5b301; --verified: #3897f0; }
.vmark { width: 15px; height: 15px; display: inline-block; vertical-align: -2px; margin-left: 4px; flex-shrink: 0; }
.shop-head h1 .vmark { width: 22px; height: 22px; vertical-align: -3px; margin-left: 6px; }
.shop-link .vmark { width: 14px; height: 14px; margin-left: 0; }
.verified-note { display: flex; gap: 6px; align-items: center; margin-top: 8px; font-size: 13px; color: var(--verified); }
.verified-note .vmark { margin: 0; }
.stats-row .stat { min-width: 0; padding: 10px 8px; }
.stats-row .stat b { font-size: 18px; white-space: nowrap; }
.stats-row .stat span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stars { color: var(--star); letter-spacing: 1px; white-space: nowrap; font-size: 14px; }
.stars .off { color: color-mix(in srgb, var(--muted) 35%, transparent); }
.btn .stars { font-size: 12px; }
.review-text { margin-top: 8px; white-space: pre-wrap; word-break: break-word; }
.star-pick { display: flex; justify-content: center; gap: 8px; margin: 14px 0 16px; }
.star-pick button { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--surface-2);
  color: var(--muted); transition: transform .12s; }
.star-pick button svg { width: 28px; height: 28px; }
.star-pick button.on { color: var(--star); }
.star-pick button.on svg { fill: var(--star); }
.star-pick button:active { transform: scale(.9); }
.admin-verify { margin-top: 12px; }
.check-row { display: flex; gap: 8px; font-size: 13px; color: var(--muted); margin-top: 6px; }
.check-row span { width: 14px; flex-shrink: 0; text-align: center; }
.check-row.ok { color: var(--text); }
.check-row.ok span { color: var(--ok); font-weight: 700; }

/* ---------- похожие биты и «поделиться» ---------- */
.btn.icon-only { flex: 0 0 46px; padding: 0; }
.sim-row { display: flex; gap: 10px; overflow-x: auto; margin: 0 -18px; padding: 0 18px 6px; scrollbar-width: none; }
.sim-row::-webkit-scrollbar { display: none; }
.sim { flex: 0 0 112px; min-width: 0; cursor: pointer; }
.sim .art { width: 112px; height: 112px; font-size: 30px; border-radius: 16px; }
.sim .art .play-ov { opacity: 1; background: rgba(0, 0, 0, .15); }
.sim .t { font-weight: 600; font-size: 14px; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.share-card { width: 100%; aspect-ratio: 1200 / 630; border-radius: 14px; background: var(--surface-2); object-fit: cover; }

/* ---------- чек-лист запуска магазина ---------- */
.launch { margin-top: 12px; }
.progress { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin: 10px 0 6px; }
.progress i { display: block; height: 100%; background: var(--grad); border-radius: 3px; transition: width .3s; }
.launch-row { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 10px 0;
  border-top: 1px solid var(--line); }
.launch-row:first-of-type { border-top: 0; }
.launch-row .lr-check { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--muted); flex-shrink: 0;
  display: grid; place-items: center; }
.launch-row.done .lr-check { background: var(--ok); border-color: var(--ok); }
.launch-row.done .lr-check svg { width: 14px; height: 14px; stroke: #fff; }
.launch-row .lr-text { min-width: 0; }
.launch-row .lr-text b { display: block; font-size: 15px; }
.launch-row .lr-text small { display: block; color: var(--muted); font-size: 12px; }
.launch-row.done .lr-text b { color: var(--muted); text-decoration: line-through; }
.launch-row:not(.done) .lr-text b::after { content: " ›"; color: var(--accent); }
.review-reply { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 14px;
  white-space: pre-wrap; word-break: break-word; border-left: 3px solid var(--accent); }
.review-reply b { display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; }

/* ---------- выравнивание: общие правки ---------- */
/* Текст на кнопках — в одну строку; если не влезает, кнопки переносятся рядами, а не ломают слова */
.btn { white-space: nowrap; min-width: 0; }
.btn-row { flex-wrap: wrap; }
.btn-row > * { flex: 1 1 0; min-width: 0; }
.btn-row > .btn.icon-only { flex: 0 0 46px; }
.btn.sm { gap: 6px; }
.btn > span { overflow: hidden; text-overflow: ellipsis; }
/* Кнопки в карточках заказов и отзывов — по содержимому, переносятся на новую строку */
.order .btn-row, .review-actions { margin-top: 2px; }
.order .btn-row > *, .review-actions > * { flex: 1 1 auto; }
.review-actions { margin-top: 10px; align-items: center; }
.review-actions .badge { flex: 0 0 auto; height: 34px; padding: 0 12px; border-radius: 10px; }
/* Всплывашка не выглядывает из-за края, пока скрыта */
.toast { transform: translate(-50%, calc(-100% - 24px)); visibility: hidden; }
.toast.show { visibility: visible; }
/* Подсказки под полями — на одной линии с подписями */
.field > .muted.small { padding-left: 4px; }
.field label { padding-left: 4px; }
/* Чипы внутри шторки (фильтры) — без «липкой» полосы фона ленты */
.sheet .chips { position: static; background: none; margin: 0; padding: 0 0 4px; flex-wrap: wrap; overflow: visible; }
/* Нечётная последняя плитка в кабинете — на всю ширину */
.actions-grid > .action:last-child:nth-child(odd) { grid-column: 1 / -1; }
/* Похожие биты: кнопка ▶ в углу обложки, не поверх букв */
.sim .art .play-ov { inset: auto 8px 8px auto; width: 32px; height: 32px; border-radius: 50%;
  background: rgba(0, 0, 0, .45); backdrop-filter: blur(4px); }
.sim .art .play-ov svg { width: 14px; height: 14px; }
/* Цитата отзыва в шторках ответа и жалобы */
.review-quote { margin: 12px 0 16px; background: var(--surface-2); border-color: transparent; }
.sheet-note { margin: -4px 4px 14px; }
.sheet > p.muted { margin: 4px 0 14px; }
/* Плашки: текст всегда одним блоком рядом с иконкой */
.alert > span { flex: 1; min-width: 0; }
/* Чек-лист галочки у админа: кружок для невыполненного */
.check-row span { font-size: 12px; }
.btn-row > .btn:not(.sm) { padding: 0 12px; }

/* ---------- обложка бита ---------- */
.art.has-cover { background: var(--surface-2); }
.art.has-cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-edit { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 12px 14px; border-radius: 16px; background: var(--surface-2); margin-bottom: 14px; }
.cover-edit .cover-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 180px; }
.cover-edit .btn-row { flex: 0 0 auto; }
.cover-edit .btn.sm { background: var(--surface); cursor: pointer; }
.one-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- поиск битов ---------- */
.search-head { position: sticky; top: 0; z-index: 6; background: var(--bg); margin: 0 -16px; padding: 6px 16px 4px; }
.search-head .search { margin: 0; }
.chips.static { position: static; flex-wrap: wrap; margin: 0; padding: 0 0 4px; background: none; overflow: visible; }
.shop-chip { display: inline-flex; align-items: center; gap: 6px; }
.shop-chip img { width: 20px; height: 20px; border-radius: 6px; object-fit: cover; }
.shop-chip .vmark { margin-left: 0; }
.search-hint { margin: 4px 4px 12px; }
.shop-link { max-width: 100%; text-align: left; }
.shop-link img, .shop-link .vmark { flex-shrink: 0; }
.shop-link .sl-name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- документы ---------- */
.doc-link { color: var(--accent); text-decoration: none; }
.docs-card { padding: 4px 14px; }
.doc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0;
  border-top: 1px solid var(--line); }
.doc-row:first-child { border-top: 0; }
.doc-row a { color: var(--text); text-decoration: none; font-weight: 500; }
.doc-row a.muted { color: var(--muted); font-weight: 600; flex-shrink: 0; }
.terms-ico { font-size: 40px; margin: 4px 0 6px; }
:root[data-theme="light"] .doc-link { color: #6d28d9; }

/* ---------- перемотка ---------- */
:root { --seek-track: color-mix(in srgb, var(--muted) 35%, transparent); }
.player-row { display: flex; align-items: center; gap: 10px; }
.seekbox { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted);
  font-variant-numeric: tabular-nums; }
.seekbox .t-cur, .seekbox .t-dur { width: 34px; flex-shrink: 0; }
.seekbox .t-cur { text-align: right; }
.player .seekbox { padding: 0 4px; height: 22px; }
.sheet-seek { margin: 0 0 12px; font-size: 12px; }
input.seek { -webkit-appearance: none; appearance: none; flex: 1; min-width: 0; height: 22px; margin: 0;
  background: transparent; cursor: pointer; touch-action: none; --p: 0%; }
input.seek::-webkit-slider-runnable-track { height: 4px; border-radius: 2px;
  background: linear-gradient(to right, var(--accent) var(--p), var(--seek-track) var(--p)); }
input.seek::-moz-range-track { height: 4px; border-radius: 2px; background: var(--seek-track); }
input.seek::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--accent); }
input.seek::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px;
  border-radius: 50%; background: var(--text); border: 0; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); }
input.seek::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--text); border: 0; }
input.seek:active::-webkit-slider-thumb { transform: scale(1.25); }

/* ---------- модерация ---------- */
.admin-del { margin: 0 0 12px; }
.btn.danger-fill { background: var(--danger); color: #fff; box-shadow: none; }
.user-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.user-head .btn.sm { flex-shrink: 0; height: 28px; }
.admin-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.admin-actions .btn.sm { height: 38px; font-size: 14px; }
.admin-mod-title { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em;
  margin: 8px 2px 0; padding-top: 10px; border-top: 1px solid var(--line); }
/* Условия видны только у выбранного тарифа — иначе при 4–5 тарифах кнопка «Купить» уезжает на два экрана вниз */
.lic:not(.selected) ul { display: none; }

/* ----- анализ канала ----- */
.an-hint { margin: -4px 4px 12px; line-height: 1.4; }
.an-result { margin-bottom: 8px; }
.an-sum { margin: 6px 0; }
.an-sum .switch-row { padding: 6px 0; }
.an-notes { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.an-wait { display: flex; align-items: center; gap: 10px; margin-top: 12px; color: var(--muted); }
.an-colors { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.an-color { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.an-color i { width: 26px; height: 26px; border-radius: 50%; }
.an-color.active { border-color: var(--accent); color: var(--text); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent);
  animation: spin .8s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Предпросмотр поста в канале с кнопкой. Цвета — как у кнопок с style в Telegram */
.tg-post { background: #6b8fb8 linear-gradient(160deg, #7aa3c9, #5d7fa5); border-radius: 16px; padding: 12px; }
.tg-bubble { background: #fff; color: #000; border-radius: 14px 14px 4px 4px; padding: 10px 12px; }
.tg-bubble .muted { color: #8a8a8a; }
.tg-audio { display: flex; gap: 10px; align-items: center; }
.tg-play { width: 40px; height: 40px; border-radius: 50%; background: #3390ec; color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.tg-play svg { width: 16px; height: 16px; margin-left: 2px; }
.tg-cap { margin-top: 8px; font-size: 14px; }
.tg-btn { margin-top: 3px; border-radius: 4px 4px 14px 14px; padding: 10px; text-align: center; font-weight: 600; font-size: 14px;
  color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tgb-plain { background: rgba(0, 0, 0, .28); }
.tgb-primary { background: #3390ec; }
.tgb-success { background: #31b545; }
.tgb-danger { background: #e53935; }
.an-color i.tgb-plain { background: #8a96a8; }
/* Даты периода: одинаковые подписи и поля одной высоты; iOS иначе раздувает input[type=date] */
.an-dates { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: end; }
.an-dates .field { min-width: 0; margin-bottom: 8px; }
.an-dates input { -webkit-appearance: none; appearance: none; min-width: 0; width: 100%; height: 44px;
  text-align: left; color: var(--text); font: inherit; }
.an-dates input::-webkit-date-and-time-value { text-align: left; }
.an-dates input::-webkit-calendar-picker-indicator { opacity: .6; }
