/* ─────────── tokens ─────────── */
:root {
  --font: "Onest", -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Unbounded", var(--font);
  --gutter: 16px;
  --tabbar-h: 62px;
  --safe-top: var(--tg-content-safe-area-inset-top, 0px);
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));

  /* Серая тема (графит): панель всегда тёмная, независимо от темы Telegram */
  --bg: #1F1316;
  --surface: #2C1B1F;
  --surface-2: #392328;
  --line: rgba(255, 226, 232, .1);
  --text: #F6F2F3;
  --muted: #B49DA3;
  --faint: #846C72;
  --accent: #EDC4C9;
  --accent-strong: #E0A9B0;
  --accent-grad: linear-gradient(135deg, #5A2D3D 0%, #7B4150 52%, #9E575B 100%);
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(237, 196, 201, .10);
  --title-grad: linear-gradient(90deg, #FFFFFF 0%, #F1CFCB 45%, #B98893 100%);
  --glow: 0 8px 26px -10px rgba(0, 0, 0, .7);
  --good: #5EE3A1;
  --good-soft: rgba(94, 227, 161, .13);
  --warn: #FBC34A;
  --warn-soft: rgba(251, 195, 74, .13);
  --bad: #FF6B86;
  --bad-soft: rgba(255, 107, 134, .13);
  --backdrop: rgba(0, 0, 0, .7);
  --shadow: inset 0 0 0 1px var(--line);

  /* Карточка на главной: сверху светлое свечение, под волной — тёмная глубина с графиком */
  --ice: #311E23;
  --ice-ink: #FFFFFF;
  --ice-muted: #B9979F;
  --water-top: #211518;
  --water-bottom: #160D10;
  color-scheme: dark;
}

/* ─────────── base ─────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--accent); text-decoration: none; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

#app {
  position: relative; z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  padding: calc(var(--safe-top) + 12px) var(--gutter) calc(var(--tabbar-h) + var(--safe-bottom) + 28px);
  min-height: 100vh;
}

/* ─────────── typography ─────────── */
.screen-title {
  font: 600 24px/1.15 var(--display);
  letter-spacing: -0.01em;
  margin: 8px 0 4px;
  background: var(--title-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.screen-sub { color: var(--muted); margin: 0 0 16px; font-size: 14px; }
.section-title {
  font-weight: 600;
  font-size: 17px;
  color: var(--accent);
  margin: 26px 2px 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.section-title small { font-weight: 400; font-size: 13px; color: var(--muted); }

/* ─────────── topbar ─────────── */
.topbar { display: flex; align-items: center; gap: 12px; margin: 4px 0 18px; }
.topbar .who { flex: 1; min-width: 0; }
.topbar .hello { font-weight: 600; font-size: 17px; overflow-wrap: anywhere; }
.topbar .role { color: var(--muted); font-size: 13px; }

.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
  background: var(--accent-soft); color: var(--accent);
  font-weight: 600; font-size: 15px; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 72px; height: 72px; font-size: 26px; }

.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 12px; border-radius: 999px;
  background: var(--surface); box-shadow: var(--shadow);
  font-size: 13px; font-weight: 500; flex: none; white-space: nowrap;
}
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.status-pill.off .dot { background: var(--bad); }

/* ─────────── segmented ─────────── */
.seg {
  display: flex; gap: 2px; padding: 3px;
  background: var(--surface-2); border-radius: 12px;
  margin-bottom: 14px;
}
.seg button {
  flex: 1; height: 32px; border-radius: 9px;
  font-size: 13px; font-weight: 500; color: var(--muted);
}
.seg { background: var(--surface); box-shadow: var(--shadow); }
.seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(163, 127, 136, .35); }

/* ─────────── hero ─────────── */
.hero {
  border-radius: 24px; overflow: hidden; background: var(--water-bottom);
  box-shadow: inset 0 0 0 1px var(--line), 0 20px 50px -30px rgba(157, 119, 129, .6);
}
.hero-top {
  background: radial-gradient(120% 160% at 0% 0%, #392328 0%, var(--ice) 60%);
  color: var(--ice-ink); padding: 18px 18px 6px;
}
.hero-label { font-size: 14px; color: var(--ice-muted); }
.hero-value {
  font: 600 38px/1.1 var(--display);
  letter-spacing: -0.02em;
  margin: 6px 0 8px;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
  background: var(--title-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .delta { font-size: 13px; font-weight: 500; }
.hero .delta.up { color: var(--good); }
.hero .delta.down { color: var(--bad); }
.hero .delta.flat { color: var(--ice-muted); }
.waterline { display: block; width: 100%; height: 22px; background: var(--ice); }
.waterline path { fill: var(--water-top); }
.hero-chart {
  position: relative; height: 180px;
  background: linear-gradient(180deg, var(--water-top), var(--water-bottom));
  padding: 4px 8px 10px 4px;
}
.hero-chart canvas { width: 100% !important; height: 100% !important; }
.hero-empty {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--muted); font-size: 14px; text-align: center; padding: 0 24px;
}

.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.metric {
  text-align: left; padding: 12px; border-radius: 16px;
  background: var(--surface); box-shadow: var(--shadow);
  min-width: 0;
}
.metric .m-label { font-size: 12px; color: var(--muted); display: block; }
.metric .m-value { font-weight: 600; font-size: 16px; line-height: 1.25; display: block; margin: 2px 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.metric .m-delta { font-size: 12px; }
.up { color: var(--good); }
.down { color: var(--bad); }
.flat { color: var(--faint); }

/* ─────────── grouped lists ─────────── */
.group { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.group + .group { margin-top: 12px; }
.row {
  display: flex; align-items: center; gap: 12px;
  min-height: 54px; padding: 10px 14px; width: 100%;
  text-align: left; position: relative;
}
.row + .row::before {
  content: ""; position: absolute; top: 0; right: 0; left: 14px;
  border-top: 1px solid var(--line);
}
.row.with-thumb + .row.with-thumb::before { left: 70px; }
button.row:active, .row.tap:active { background: var(--surface-2); }
.row .main { flex: 1; min-width: 0; display: block; }
/* Заголовок и подпись — отдельными строками (в разметке это span, по умолчанию они встают в одну линию).
   Длинный текст переносится, а не обрезается. */
.row .title { display: block; font-weight: 500; overflow-wrap: anywhere; }
.row .sub { display: block; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.row .end .title { color: var(--text); }
.row .end { text-align: right; flex: none; max-width: 45%; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.row .end .sub { font-size: 12px; }
.row .chev { color: var(--faint); flex: none; }
.row .ico {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
}
.row .ico.warn { background: var(--warn-soft); color: var(--warn); }
.row .ico.bad { background: var(--bad-soft); color: var(--bad); }
.row.danger .title { color: var(--bad); }
.row .wrap { white-space: normal; word-break: break-word; }

.thumb {
  width: 44px; height: 44px; border-radius: 12px; flex: none; overflow: hidden;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-weight: 600;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }

.bar { display: block; height: 4px; border-radius: 4px; background: var(--surface-2); margin-top: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; background: var(--accent-grad); }

/* ─────────── badges ─────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 12px; font-weight: 500; white-space: nowrap;
  background: var(--surface-2); color: var(--muted);
}
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badges { display: inline-flex; gap: 4px; margin-left: 6px; vertical-align: 1px; }

/* ─────────── buttons ─────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 18px; border-radius: 14px;
  font-weight: 600; font-size: 15px;
  background: var(--accent-grad); color: var(--accent-ink);
  box-shadow: var(--glow);
  transition: opacity .15s, transform .1s;
}
.btn.soft, .btn.danger { box-shadow: none; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.block { width: 100%; }
.btn.soft { background: var(--accent-soft); color: var(--accent); }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn.sm { height: 36px; padding: 0 12px; font-size: 14px; border-radius: 11px; }
.btn-row { display: flex; gap: 8px; }
.btn-row > .btn { flex: 1; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  display: grid; place-items: center; color: var(--muted);
}
.icon-btn:active { background: var(--surface-2); }
.icon-btn.bad { color: var(--bad); }

/* ─────────── forms ─────────── */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; color: var(--muted); margin: 0 2px 6px; }
.input, .textarea {
  width: 100%; border: 1px solid transparent; outline: none;
  background: var(--surface-2); border-radius: 12px;
  padding: 0 14px; height: 48px; font-size: 16px;
}
.textarea { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; line-height: 1.45; }
.input:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.hint { font-size: 12.5px; color: var(--muted); margin: 6px 2px 0; }
.hint.warn { color: var(--warn); }
.input-row { display: flex; gap: 8px; }
.input-row .input { flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip {
  height: 32px; padding: 0 12px; border-radius: 999px;
  background: var(--surface-2); color: var(--text); font-size: 13px; font-weight: 500;
}
.chip[aria-pressed="true"] { background: var(--accent-grad); color: var(--accent-ink); }

.search { position: relative; margin-bottom: 12px; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search .input { padding-left: 42px; background: var(--surface); box-shadow: var(--shadow); }

.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i {
  position: absolute; inset: 0; border-radius: 999px; background: var(--faint); opacity: .55;
  transition: background .2s, opacity .2s;
}
.switch i::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: #FFFFFF; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s;
}
.switch input:checked + i { background: var(--accent-grad); opacity: 1; box-shadow: 0 0 14px -2px rgba(158, 120, 130, .6); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }

.photo-pick {
  display: flex; align-items: center; gap: 12px;
  padding: 10px; border-radius: 14px; background: var(--surface-2); width: 100%; text-align: left;
}
.photo-pick .thumb { width: 56px; height: 56px; }

/* ─────────── product detail ─────────── */
.cover {
  aspect-ratio: 16 / 10; border-radius: 20px; overflow: hidden;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; margin-bottom: 16px;
}
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover .empty { display: grid; justify-items: center; gap: 6px; font-size: 14px; }
.kv { display: flex; gap: 16px; margin: 4px 0 16px; }
.kv div { min-width: 0; }
.kv b { display: block; font: 600 20px/1.2 var(--display); font-variant-numeric: tabular-nums; }
.kv span { font-size: 13px; color: var(--muted); }

.profile-head { display: flex; align-items: center; gap: 14px; margin: 6px 0 16px; }
.profile-head .name { font: 600 20px/1.2 var(--display); word-break: break-word; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.stat { background: var(--surface); border-radius: 16px; padding: 12px; box-shadow: var(--shadow); min-width: 0; }
.stat b { display: block; font-weight: 600; font-size: 16px; line-height: 1.25; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--muted); }

/* ─────────── broadcast: визуальный редактор ─────────── */
.editor-box {
  background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden;
}
.editor-box:focus-within { box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-soft); }
.toolbar {
  display: flex; gap: 4px; padding: 8px; overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0;
}
.toolbar::-webkit-scrollbar { display: none; }
.toolbar button {
  min-width: 38px; height: 36px; padding: 0 10px; border-radius: 10px;
  background: var(--surface-2); font-size: 14px; flex: none;
  display: grid; place-items: center; color: var(--text);
}
.toolbar button[aria-pressed="true"] { background: var(--accent-grad); color: var(--accent-ink); box-shadow: var(--glow); }
.editor {
  min-height: 170px; padding: 14px; outline: none;
  font-size: 16px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere;
  -webkit-user-select: text; user-select: text;
}
.editor:empty::before { content: attr(data-placeholder); color: var(--faint); pointer-events: none; }
.editor code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14.5px; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.editor .spoiler { background: rgba(163, 127, 136, .22); border-radius: 4px; box-shadow: 0 0 0 2px rgba(163, 127, 136, .22); }
.editor a { color: var(--accent); text-decoration: underline; }
.temoji { display: inline-block; width: 1.3em; height: 1.3em; vertical-align: -0.28em; object-fit: contain; margin: 0 1px; }

/* ─────────── premium emoji ─────────── */
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 8px; }
.emoji-tile {
  aspect-ratio: 1; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow);
  display: grid; place-items: center; font-size: 28px;
}
.emoji-tile:active { background: var(--accent-soft); }
.emoji-tile span { display: grid; place-items: center; width: 40px; height: 40px; }
.emoji-tile img { width: 40px; height: 40px; object-fit: contain; }
.emoji-big {
  width: 120px; height: 120px; margin: 4px auto 18px; border-radius: 28px;
  display: grid; place-items: center; font-size: 64px; background: var(--surface-2);
}
.emoji-big img { width: 88px; height: 88px; object-fit: contain; }
.ico-plain {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
}
.card-text { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.preview {
  background: var(--surface); border-radius: 18px 18px 18px 6px; padding: 12px 14px;
  box-shadow: var(--shadow); white-space: pre-wrap; word-break: break-word; overflow: hidden;
}
.preview img { border-radius: 12px; margin: -4px -6px 10px; max-width: calc(100% + 12px); }
.preview code, .preview pre { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13.5px; }
.preview tg-spoiler, .preview .spoiler { background: var(--faint); color: transparent; border-radius: 4px; }
.progress { height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; margin: 10px 0 8px; }
.progress i { display: block; height: 100%; background: var(--accent-grad); border-radius: 8px; transition: width .4s; }
.card { background: var(--surface); border-radius: 18px; padding: 16px; box-shadow: var(--shadow); }
.card + .card { margin-top: 12px; }
.card-head { display: flex; align-items: center; gap: 12px; }
.card-head .main { flex: 1; min-width: 0; }
.card-head .title { display: block; font-weight: 600; }
.card-body { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.card-body .field:last-of-type { margin-bottom: 12px; }

/* ─────────── states ─────────── */
.empty-state { text-align: center; padding: 36px 20px; color: var(--muted); }
.empty-state .ico-lg {
  width: 56px; height: 56px; border-radius: 18px; margin: 0 auto 12px;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
}
.empty-state p { margin: 0 auto 16px; max-width: 30ch; }
.sk { background: var(--surface); border-radius: 18px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.more-btn { margin-top: 12px; }

/* ─────────── tabbar ─────────── */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding-bottom: var(--safe-bottom);
  background: rgba(22, 12, 15, .88);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.tabbar nav { display: flex; max-width: 560px; margin: 0 auto; height: var(--tabbar-h); }
.tabbar button {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--faint); font-size: 11px; font-weight: 500;
}
.tabbar button span.i { display: grid; place-items: center; width: 48px; height: 28px; border-radius: 999px; transition: background .2s; }
.tabbar button[aria-current="page"] { color: var(--accent); }
.tabbar button[aria-current="page"] span.i { background: var(--accent-soft); box-shadow: 0 0 18px -4px rgba(158, 120, 130, .55); }

/* ─────────── sheet ─────────── */
.backdrop {
  position: fixed; inset: 0; z-index: 40; background: var(--backdrop);
  animation: fade .2s ease-out;
}
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41;
  max-width: 560px; margin: 0 auto; max-height: 90vh; display: flex; flex-direction: column;
  background: var(--surface); border-radius: 24px 24px 0 0;
  box-shadow: inset 0 1px 0 var(--line);
  padding-bottom: var(--safe-bottom);
  animation: rise .26s cubic-bezier(.2, .8, .2, 1);
}
.sheet.closing { animation: sink .18s ease-in forwards; }
.backdrop.closing { animation: fade .18s ease-in reverse forwards; }
.sheet-handle { width: 36px; height: 4px; border-radius: 4px; background: var(--faint); opacity: .5; margin: 8px auto 0; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px 6px 20px; }
.sheet-head h2 { flex: 1; margin: 0; font-size: 18px; font-weight: 600; }
.sheet-body { overflow-y: auto; padding: 8px 20px 20px; -webkit-overflow-scrolling: touch; }
@keyframes rise { from { transform: translateY(100%); } }
@keyframes sink { to { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }

/* ─────────── toast ─────────── */
.toast {
  position: fixed; left: 50%; z-index: 60;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 12px);
  transform: translateX(-50%);
  max-width: calc(100% - 32px); width: max-content;
  padding: 12px 16px; border-radius: 14px;
  background: #2A1A1E; color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(163, 127, 136, .3), 0 10px 30px -10px rgba(0, 0, 0, .9);
  font-size: 14px; font-weight: 500;
  display: flex; align-items: center; gap: 8px;
  animation: toast-in .22s ease-out;
}
.toast.error { background: var(--bad); color: #FFFFFF; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

.gate { min-height: 80vh; display: grid; place-items: center; text-align: center; }
.gate h1 { font: 600 22px/1.2 var(--display); margin: 14px 0 6px; }
.gate p { color: var(--muted); max-width: 32ch; margin: 0 auto; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}
@media (max-width: 360px) {
  .hero-value { font-size: 32px; }
  .metric .m-value { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-logo { animation: none !important; }
}

/* ─────────── поле выбора из списка (игра, чит, версия) ─────────── */
.choice { border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; transition: box-shadow .2s; }
.choice.is-open { box-shadow: inset 0 0 0 1px rgba(163, 127, 136, .45), 0 8px 24px -14px rgba(157, 119, 129, .8); }
.choice-btn { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 50px; padding: 8px 12px 8px 14px; text-align: left; }
.choice-btn .main { flex: 1; min-width: 0; display: block; }
.choice-btn .title { display: block; font-weight: 500; overflow-wrap: anywhere; }
.choice-btn .sub { display: block; font-size: 12.5px; color: var(--muted); }
.choice-btn .sub:empty { display: none; }
.choice.is-empty .choice-btn .title { color: var(--faint); font-weight: 400; }
.choice-chev { color: var(--accent); flex: none; transform: rotate(90deg); transition: transform .2s; }
.choice.is-open .choice-chev { transform: rotate(-90deg); }
.choice-list { display: grid; max-height: 260px; overflow-y: auto; border-top: 1px solid var(--line); padding: 4px; }
.choice-list[hidden] { display: none; }
.choice-opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 10px; text-align: left; }
.choice-opt:active { background: var(--accent-soft); }
.choice-opt .main { flex: 1; min-width: 0; display: block; }
.choice-opt .title { display: block; font-size: 14.5px; overflow-wrap: anywhere; }
.choice-opt .sub { display: block; font-size: 12px; color: var(--muted); }
.choice-opt.is-on { background: var(--accent-soft); color: var(--accent); }
.choice-opt.is-on .title { font-weight: 600; }
.choice-empty { margin: 0; padding: 12px; font-size: 13px; color: var(--muted); }

/* ─────────── дерево каталога в админке ─────────── */
.cat-add { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 14px; }
.cat-add .btn { padding-left: 8px; padding-right: 8px; }
.cat-tree + .cat-tree { margin-top: 12px; }
.cat-game { background: linear-gradient(90deg, rgba(157, 119, 129, .14), transparent 70%); }
.cat-game .title { font-size: 16px; font-weight: 600; }
.row.cat-cheat { padding-left: 30px; min-height: 50px; }
.row.cat-cheat + .row::before, .row.cat-version + .row::before { left: 30px; }
.row.cat-version { padding-left: 52px; min-height: 46px; }
.row.cat-version .title { font-size: 14.5px; }
.thumb.sm { width: 34px; height: 34px; border-radius: 10px; font-size: 13px; }
.cat-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--accent); box-shadow: 0 0 8px rgba(158, 120, 130, .8); }
.row .sub.warn { color: var(--warn); }

/* ─────────── статусы покупателей в админке ─────────── */
.badge.lv-newbie, .badge.lv-regular, .badge.lv-vip, .badge.lv-elite { display: inline-flex; align-items: center; gap: 3px; }
.badge.lv-newbie, .row .ico.lv-newbie { background: rgba(196, 166, 174, .14); color: #C4A6AE; }
.badge.lv-regular, .row .ico.lv-regular { background: rgba(167, 133, 142, .16); color: #A7858E; }
.badge.lv-vip, .row .ico.lv-vip { background: rgba(184, 148, 157, .16); color: #B8949D; }
.badge.lv-elite, .row .ico.lv-elite { background: rgba(163, 127, 136, .22); color: #FFFFFF; box-shadow: 0 0 12px -2px rgba(159, 123, 132, .8); }

/* ─────────── задания в админке ─────────── */
.row .ico.muted-ico { background: var(--surface-2); color: var(--faint); }

/* ─────────── дерево каталога: сворачивание ─────────── */
.cat-chev { display: inline-flex; vertical-align: -3px; margin-left: 6px; color: var(--accent); transition: transform .2s; }
.cat-chev.is-open { transform: rotate(90deg); }
.cat-tools { display: flex; justify-content: flex-end; gap: 14px; margin: -4px 4px 10px; }
.link-btn { font-size: 13px; color: var(--accent); padding: 4px 0; }
.link-btn:active { opacity: .6; }

/* ─────────── конкурс рефералов: места ─────────── */
.medal {
  width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-weight: 700; font-size: 14px; color: var(--muted); background: var(--surface-2);
}
.medal-1 { color: #2A1A1E; background: linear-gradient(135deg, #EBE1E3, #C3A5AC); box-shadow: 0 0 14px -2px rgba(212, 190, 196, .7); }
.medal-2 { color: #321E23; background: linear-gradient(135deg, #F6F2F3, #B58F99); }
.medal-3 { color: #26181B; background: linear-gradient(135deg, #D4BEC4, #85616A); }

/* ─────────── тикеты: чат поддержки (магазин и админка) ─────────── */
.chat-log { display: flex; flex-direction: column; gap: 6px; padding: 4px 0 10px; }
.chat-day { align-self: center; margin: 10px 0 2px; padding: 3px 10px; border-radius: 999px; font-size: 12px; color: var(--muted); background: var(--surface-2); }
.msg {
  align-self: flex-start; max-width: 84%; padding: 8px 12px 6px;
  background: var(--surface-2); border-radius: 18px 18px 18px 6px; box-shadow: var(--shadow);
}
.msg.mine { align-self: flex-end; background: linear-gradient(135deg, #8F6771 0%, #976F79 100%); color: #FFFFFF; border-radius: 18px 18px 6px 18px; box-shadow: none; }
.msg-author { margin-bottom: 2px; font-size: 12px; font-weight: 600; color: var(--accent); }
.msg.mine .msg-author { color: rgba(255, 255, 255, .8); }
.msg-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.4; }
.msg-meta { margin-top: 3px; text-align: right; font-size: 11px; color: var(--muted); }
.msg.mine .msg-meta { color: rgba(255, 255, 255, .7); }
.msg-media { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin: 0 -8px 4px; border-radius: 14px; overflow: hidden; }
.msg-media.n1 { grid-template-columns: 1fr; }
.msg-media button { display: block; padding: 0; border: 0; background: #000000; cursor: zoom-in; }
.msg-media img { display: block; width: 100%; height: 100%; max-height: 300px; object-fit: cover; }
.msg-media:not(.n1) img { aspect-ratio: 1; }
.msg-media video { display: block; grid-column: 1 / -1; width: 100%; max-height: 320px; background: #000000; }
.msg.pending { opacity: .6; }

.chat-attachments { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chat-attachments:empty { display: none; }
.chat-att { position: relative; width: 62px; height: 62px; border-radius: 12px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.chat-att img, .chat-att video { width: 100%; height: 100%; object-fit: cover; }
.chat-att .att-x {
  position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: rgba(0, 0, 0, .72); color: #FFFFFF;
}
.chat-att .att-progress { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .55); color: #FFFFFF; font-size: 12px; font-weight: 600; }
.chat-compose { display: flex; align-items: flex-end; gap: 8px; }
.chat-compose .textarea { flex: 1; min-height: 46px; max-height: 140px; padding: 12px 14px; resize: none; }
.chat-compose .icon-btn { flex: none; width: 46px; height: 46px; border-radius: 14px; background: var(--surface-2); color: var(--accent); }
.chat-compose .send-btn { flex: none; width: 46px; height: 46px; padding: 0; border-radius: 14px; }
.chat-closed { padding: 14px; border-radius: 16px; background: var(--surface-2); text-align: center; color: var(--muted); font-size: 14px; }
.chat-closed .btn { margin-top: 10px; }
.chat-empty { margin: auto; padding: 24px 8px; text-align: center; color: var(--muted); font-size: 14px; }

/* шторка-чат в магазине: лента прокручивается, поле ввода всегда внизу */
.sheet.chat-sheet { height: min(90vh, calc(var(--tg-viewport-height, 100vh) - 16px)); }
.chat-sheet .sheet-body { flex: 1; display: flex; flex-direction: column; overflow: hidden; padding-bottom: 12px; }
.chat-sheet .chat-log { flex: 1; overflow-y: auto; margin: 0 -4px; padding: 4px 4px 10px; -webkit-overflow-scrolling: touch; }
.chat-sub { display: flex; align-items: center; gap: 8px; margin: -4px 0 6px; font-size: 13px; color: var(--muted); }
.linkish { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; cursor: pointer; }

/* чат в админке: поле ввода прилипает к низу над таббаром */
.chat-bar {
  position: sticky; z-index: 5; bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 6px);
  margin: 0 calc(-1 * var(--gutter)); padding: 8px var(--gutter);
  background: linear-gradient(to top, var(--bg) 70%, transparent);
}

.count-badge {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 10px; background: var(--accent-grad); color: #FFFFFF; font-size: 12px; font-weight: 600;
}
.ticket-row .title { display: flex; align-items: center; gap: 6px; }
.ticket-row .sub { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.lightbox { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .94); animation: fade .15s ease-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; }

/* ─────────── конкурсы-розыгрыши ─────────── */
.gv-card {
  position: relative; overflow: hidden; margin-bottom: 14px; padding: 18px 16px 16px; border-radius: 22px;
  background: radial-gradient(120% 90% at 100% 0%, rgba(158, 120, 130, .30) 0%, transparent 55%), var(--surface);
  box-shadow: var(--shadow);
}
.gv-card.done { background: radial-gradient(120% 90% at 100% 0%, rgba(94, 227, 161, .14) 0%, transparent 55%), var(--surface); }
.gv-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.gv-timer { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.gv-card.done .gv-timer { color: var(--muted); font-weight: 500; }
.gv-title { margin: 0 0 6px; font: 600 20px/1.25 var(--display); letter-spacing: -0.01em; }
.gv-desc { margin: 0 0 12px; color: var(--muted); font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.gv-prize { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; padding: 12px; border-radius: 16px; background: var(--accent-soft); }
.gv-prize-ico { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--accent-grad); color: #FFFFFF; box-shadow: var(--glow); }
.gv-prize .main { display: grid; gap: 2px; min-width: 0; }
.gv-prize .main span { font-size: 12px; color: var(--muted); }
.gv-prize .main b { font-size: 15px; font-weight: 600; }
.gv-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 14px; font-size: 13px; color: var(--muted); }
.gv-meta span { display: inline-flex; align-items: center; gap: 5px; }
.gv-winners { padding: 12px 12px 6px; border-radius: 16px; background: var(--surface-2); }
.gv-winners-title { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font-size: 14px; font-weight: 600; }
.gv-winner { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 15px; }
.gv-winner .medal { width: 28px; height: 28px; font-size: 13px; }
.gv-winner.me { color: var(--good); font-weight: 600; }
.gv-note { margin: 10px 0 0; text-align: center; font-size: 13px; color: var(--muted); }

.gv-admin { margin-bottom: 10px; padding: 14px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.gv-admin-head { display: flex; align-items: flex-start; gap: 10px; }
.gv-admin-head .main { flex: 1; display: grid; gap: 2px; min-width: 0; }
.gv-admin-head .title { font-weight: 600; }
.gv-admin-head .sub { font-size: 13px; color: var(--muted); }
.gv-admin-prize { display: flex; align-items: center; gap: 6px; margin: 8px 0 10px; font-size: 14px; }
.gv-admin-winners { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.gv-admin-winners .chip { margin: 0; }
.gv-warn { margin: -4px 0 10px; font-size: 13px; color: var(--bad); }
.gv-admin .btn-row { display: flex; gap: 8px; }
.gv-admin .btn-row .btn { flex: 1 1 auto; white-space: nowrap; padding-left: 10px; padding-right: 10px; }
.gv-admin .btn-row .btn.danger { flex: 0 0 44px; padding: 0; }

/* ─────────── платежи ─────────── */
.pay-check { display: grid; grid-template-columns: 88px 1fr; gap: 12px; margin-bottom: 10px; padding: 12px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.pay-photo { width: 88px; height: 116px; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: var(--surface-2); cursor: zoom-in; }
.pay-photo span, .pay-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pay-info { min-width: 0; display: grid; align-content: start; gap: 2px; }
.pay-kind { font-size: 12px; color: var(--muted); }
.pay-title { font-weight: 600; overflow-wrap: anywhere; }
.pay-amount { font: 600 20px/1.3 var(--display); }
.pay-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 13px; color: var(--muted); }
.pay-actions { grid-column: 1 / -1; }
.pay-check.no-photo { grid-template-columns: 1fr; }
.pay-totals { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.pay-totals .stat { padding: 12px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); display: grid; gap: 2px; }
.pay-totals .stat b { font: 600 18px/1.3 var(--display); }
.pay-totals .stat span { font-size: 12px; color: var(--muted); }
.pay-thumb { overflow: hidden; padding: 0; cursor: zoom-in; }
.pay-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ─────────── общий чат покупателей ─────────── */
.msg-author.c0 { color: #A4828A; } .msg-author.c1 { color: #D1BBC0; } .msg-author.c2 { color: #86EFAC; } .msg-author.c3 { color: #D1B9BF; }
.msg-author.c4 { color: #D4BEC4; } .msg-author.c5 { color: #A4828A; } .msg-author.c6 { color: #5EEAD4; } .msg-author.c7 { color: #A4828A; }
.msg-author.staff { display: inline-flex; align-items: center; gap: 4px; color: var(--good); }
.msg.staff:not(.mine) { box-shadow: inset 0 0 0 1px rgba(94, 227, 161, .35); background: linear-gradient(135deg, rgba(94, 227, 161, .10), transparent 70%), var(--surface-2); }
.msg .msg-meta { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.msg-mod { display: grid; place-items: center; width: 22px; height: 18px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--muted); }
.msg-mod:active { background: var(--surface); }
.msg-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.msg-actions[hidden] { display: none; }
.msg-actions .chip { margin: 0; padding: 5px 9px; font-size: 12px; display: inline-flex; align-items: center; gap: 3px; }
.chat-sub > span { min-width: 0; }
.chat-admin-row { align-items: flex-start; }
.chat-admin-text { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text) !important; margin: 2px 0; }
.chat-admin-actions { display: flex; gap: 6px; flex: none; }
.chat-admin-actions .btn { width: 36px; padding: 0; }

/* выбор статуса покупателя */
[data-level] .lv-check { color: var(--accent); opacity: 0; transition: opacity .15s; }
[data-level].is-picked { background: var(--accent-soft); }
[data-level].is-picked .lv-check { opacity: 1; }

/* ─────────── маркет ─────────── */
.mk-adm-tabs { margin: 0 0 14px; }
.mk-adm-tabs .count-badge { margin-left: 4px; }
.mk-adm-card { margin-bottom: 12px; }
.mk-adm-body { padding: 0 14px 12px; display: grid; gap: 10px; }
.mk-adm-desc { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.45; color: var(--text); max-height: 220px; overflow: auto; }
.mk-adm-gallery { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.mk-adm-gallery button { flex: none; padding: 0; border: 0; background: none; cursor: zoom-in; }
.mk-adm-gallery img, .mk-adm-gallery video { display: block; height: 120px; max-width: 220px; border-radius: 12px; object-fit: cover; background: #000000; }
.mk-adm-file { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 12px; background: var(--surface-2); color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.mk-adm-file span { display: grid; min-width: 0; }
.mk-adm-file b { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-adm-file small { font-size: 12px; color: var(--muted); }
.mk-adm-pre { display: block; width: 100%; margin: 0; padding: 10px 12px; border: 0; border-radius: 12px; background: var(--surface-2); color: var(--text);
  font: 12.5px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; text-align: left; }
.mk-adm-copy { position: relative; padding-right: 36px; cursor: pointer; }
.mk-adm-copy span { position: absolute; top: 9px; right: 10px; color: var(--muted); }
.mk-adm-actions { padding: 0 14px 14px; }
.mk-adm-form { padding: 14px 14px 4px; margin-bottom: 14px; }
.mk-adm-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mk-adm-log { max-height: 46vh; overflow-y: auto; margin-bottom: 12px; padding: 8px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.mk-adm-log .msg .mk-adm-file { margin: 4px 0; }
.msg.system { align-self: center; max-width: 92%; background: transparent; box-shadow: inset 0 0 0 1px var(--line); border-radius: 14px; color: var(--muted); font-size: 13px; text-align: center; }
.bad-text { color: var(--bad); font-weight: 600; }
.good-text { color: var(--good) !important; }
.mk-adm-dm { margin-bottom: 12px; }
.mk-adm-dm summary { cursor: pointer; padding: 10px 2px; color: var(--accent); font-weight: 600; font-size: 14px; }

/* общий чат: свои сообщения, правка, заметки автомодерации */
.msg-edited { margin-right: 6px; font-style: italic; opacity: .8; }
.msg.mine .msg-mod { color: rgba(255, 255, 255, .8); }
.msg.mine .msg-actions .chip { background: rgba(255, 255, 255, .16); color: #FFFFFF; box-shadow: none; }
.chat-editing { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; padding: 6px 6px 6px 12px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600; }
.chat-editing[hidden] { display: none; }
.chat-editing span { flex: 1; }
.chat-editing .icon-btn { width: 28px; height: 28px; }
.msg.system { font-size: 12.5px; padding: 6px 12px; }
.automod-rule .switch { flex: none; }
.automod-mute { display: block; margin-top: 6px; }
.automod-rule select { width: 100%; max-width: 190px; min-height: 40px; padding: 8px 12px; font-size: 14px; }
.automod-test { display: grid; gap: 8px; }
.automod-result { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 13.5px; }
.automod-result.bad { background: var(--bad-soft); color: var(--bad); }
.automod-result.good { background: var(--good-soft); color: var(--good); }

/* общий чат: профиль по нику и личные сообщения */
button.msg-author { display: block; padding: 0; border: 0; background: none; font-family: inherit; text-align: left; cursor: pointer; }
button.msg-author:active { opacity: .7; }
.pm-chip { position: relative; flex: none; display: inline-flex; align-items: center; gap: 5px; margin-left: auto; padding: 6px 11px;
  border: 0; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font: 600 13px/1 var(--font); }
.pm-chip i { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--bad); color: #FFFFFF;
  font: 700 11px/18px var(--font); font-style: normal; text-align: center; }
.pm-chip i[hidden] { display: none; }
.pm-chip[hidden] { display: none; }
.pm-chip.danger { margin-left: 0; background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.cp-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.cp-head h3 { margin: 0 0 6px; font: 600 18px/1.3 var(--display); overflow-wrap: anywhere; }
.cp-head p { margin: 0; }
.cp-avatar { flex: none; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%;
  background: var(--accent-grad); color: #FFFFFF; font: 600 26px/1 var(--display); box-shadow: var(--glow); }
.cp-avatar.staff { background: linear-gradient(135deg, #10B981, #047857); }
.cp-avatar.sm { width: 42px; height: 42px; font-size: 17px; box-shadow: none; }
.cp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.cp-stats div { padding: 12px 6px; border-radius: 16px; background: var(--surface-2); text-align: center; display: grid; gap: 2px; }
.cp-stats b { font: 600 20px/1.2 var(--display); font-variant-numeric: tabular-nums; }
.cp-stats span { font-size: 12px; color: var(--muted); }
.cp-actions { display: grid; gap: 8px; }
.pm-row { align-items: center; gap: 12px; text-align: left; }
.pm-row .main { display: grid; gap: 2px; min-width: 0; }
.pm-top { display: flex; justify-content: space-between; gap: 8px; }
.pm-top b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-top small { flex: none; font-size: 12px; color: var(--muted); }
.pm-last { font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-last i { font-style: normal; color: var(--faint); }
.pm-row.is-unread .pm-last { color: var(--text); }
.pm-row .count-badge { flex: none; }
.pm-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -6px 0 6px; font-size: 13px; }
.pm-bar .linkish { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }

/* аватарки: фото или первая буква ника */
.ava { position: relative; flex: none; width: 34px; height: 34px; display: grid; place-items: center; overflow: hidden; border-radius: 50%;
  background: linear-gradient(135deg, #9D7781, #8F6771); color: #FFFFFF; font: 600 14px/1 var(--display); }
.ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.ava.c1 { background: linear-gradient(135deg, #BF9FA7, #73535B); } .ava.c2 { background: linear-gradient(135deg, #4ADE80, #15803D); }
.ava.c3 { background: linear-gradient(135deg, #B8949D, #7B5962); } .ava.c4 { background: linear-gradient(135deg, #C0A0A8, #846069); }
.ava.c5 { background: linear-gradient(135deg, #A07C85, #89636D); } .ava.c6 { background: linear-gradient(135deg, #2DD4BF, #76565E); }
.ava.c7 { background: linear-gradient(135deg, #A07C85, #6F5158); }
.ava.staff { background: linear-gradient(135deg, #10B981, #047857); }
.ava.sm { width: 28px; height: 28px; font-size: 12px; }
.ava.md { width: 42px; height: 42px; font-size: 17px; }
.ava.lg { width: 56px; height: 56px; font-size: 22px; }
.ava.xl { width: 72px; height: 72px; font-size: 28px; box-shadow: var(--glow); }
.msg-row { display: flex; align-items: flex-end; gap: 8px; align-self: flex-start; max-width: 92%; }
.msg-row > .msg { max-width: none; min-width: 0; }
.ava-btn { flex: none; padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; }
.ava-btn:active { transform: scale(.94); }
.pf-avatar-btn { position: relative; flex: none; padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; }
.pf-cam { position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%;
  background: var(--accent-strong); color: #FFFFFF; box-shadow: 0 0 0 2px var(--surface); z-index: 2; }
.ava-edit { display: grid; place-items: center; margin: 4px 0 12px; }
.ava-edit .ava { width: 120px; height: 120px; font-size: 46px; }
.ava-progress { height: 6px; margin: -6px 0 14px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.ava-progress i { display: block; width: 0; height: 100%; background: var(--accent-grad); transition: width .15s; }
.pm-bar [data-pm-tg] { display: inline-flex; align-items: center; gap: 8px; }

/* жалоба в ЛС: красный флажок */
.pm-bar-actions { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.pm-report { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 12px;
  background: var(--bad-soft); color: var(--bad); cursor: pointer; }
.pm-report:active { transform: scale(.94); }
.report-head { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.report-head p { margin: 0; }
.report-ico { flex: none; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 16px; background: var(--bad-soft); color: var(--bad); }
.report-reasons { display: flex; flex-wrap: wrap; gap: 6px; }
.report-reasons .chip[aria-pressed="true"] { background: var(--bad-soft); color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad); }
.report-block { display: flex; gap: 10px; align-items: flex-start; margin: 0 2px 14px; font-size: 14px; color: var(--muted); }
.report-block input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--bad); flex: none; }
.msg.report-bad { box-shadow: inset 0 0 0 1px rgba(182, 146, 155, .45); }
.msg.report-bad .msg-author { color: var(--bad); }

/* удаление отзывов */
.rv-del { flex: none; width: 32px; height: 32px; display: grid; place-items: center; margin-left: 4px; padding: 0; border: 0; border-radius: 10px;
  background: var(--bad-soft); color: var(--bad); cursor: pointer; }
.rv-del:active { transform: scale(.94); }
.rv-admin-row { align-items: flex-start; }
.rv-admin-row .title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rv-admin-stars { color: #D4BEC4; font-size: 13px; letter-spacing: 1px; }
.rv-admin-stars i { font-style: normal; color: var(--faint); }
.rv-admin-text { margin: 2px 0; color: var(--text) !important; white-space: pre-wrap; }

/* распродажа в редакторе чита */
.sale-edit { margin: 0 0 14px; padding: 12px; border-radius: 16px; background: rgba(159, 123, 132, .08); box-shadow: inset 0 0 0 1px rgba(159, 123, 132, .28); }
.sale-edit-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: #B18B94; }
.sale-edit-head b { color: var(--text); font-weight: 600; flex: 1; }
.sale-edit-row { display: grid; grid-template-columns: 90px 1fr; gap: 10px; }
.sale-edit-row .field { margin-bottom: 10px; }
.badge svg { vertical-align: -2px; margin-right: 2px; }

/* ─────────── эмодзи: клавиатура в чатах и премиум-эмодзи в текстах ─────────── */
.ce-emoji { display: inline-block; width: 1.3em; height: 1.3em; vertical-align: -0.28em; object-fit: contain; }
.ekb-btn { flex: none; color: var(--muted); }
.ekb-btn[aria-pressed="true"] { color: var(--accent); }
.ekb-panel { height: 270px; display: flex; flex-direction: column; margin: 6px calc(-1 * var(--gutter, 12px)) 0; background: var(--surface);
  border-top: 1px solid var(--line); animation: ekb-in .18s ease-out; }
@keyframes ekb-in { from { transform: translateY(14px); opacity: 0; } }
.ekb-tabs { flex: none; display: flex; align-items: center; gap: 2px; padding: 6px 8px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.ekb-tabs::-webkit-scrollbar { display: none; }
.ekb-tab { flex: none; width: 38px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 10px;
  background: none; font-size: 20px; line-height: 1; cursor: pointer; opacity: .55; filter: grayscale(.4); }
.ekb-tab.on { opacity: 1; filter: none; background: var(--accent-soft); }
.ekb-back { margin-left: auto; color: var(--muted); opacity: 1; filter: none; }
.ekb-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 6px 10px; -webkit-overflow-scrolling: touch; }
.ekb-sec h4 { margin: 10px 6px 4px; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .02em; text-transform: uppercase; }
.ekb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); }
.ekb-e { height: 42px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 10px; background: none;
  font-size: 27px; line-height: 1; cursor: pointer; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.ekb-e:active { background: var(--accent-soft); transform: scale(.92); }

/* премиум-эмодзи: разделы паков */
.emoji-sec { display: flex; align-items: baseline; gap: 8px; margin: 18px 2px 8px; font-size: 15px; font-weight: 600; }
.emoji-sec small { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.field-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* онлайн в магазине */
.online-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.online-stat { display: grid; gap: 6px; padding: 14px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.online-stat span { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.online-stat b { font: 600 30px/1.1 var(--display); }
.online-stat.real b { color: #34D399; }
.online-range { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* бот поддержки */
.sb-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sb-stats .online-stat b { font-size: 26px; }
.sb-stats .online-stat em { font-style: normal; font-size: 12px; color: var(--muted); }
.sb-warn { margin-top: 8px; padding: 8px 10px; border-radius: 10px; font-size: 12.5px; color: #CDB3BA; background: rgba(158, 120, 130, .1); }
.sb-list { display: grid; gap: 6px; }
.sb-q { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 12px; text-align: left;
  font: inherit; color: var(--text); background: var(--surface-2); cursor: pointer; }
div.sb-q { cursor: default; }
.sb-q span { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
.sb-q em { flex: none; font-style: normal; font-size: 12px; color: var(--muted); }
.sb-result { margin-top: 12px; display: grid; gap: 10px; }
.sb-decision { justify-self: start; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--accent-soft); color: var(--accent); }
.sb-decision.sb-answer { background: rgba(16, 185, 129, .14); color: #6EE7B7; }
.sb-decision.sb-none, .sb-decision.sb-operator { background: rgba(158, 120, 130, .12); color: #CDB3BA; }
.sb-answer { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.sb-cands { display: grid; gap: 4px; }
.sb-cand { display: flex; gap: 10px; font-size: 13px; }
.sb-cand span { flex: 1; min-width: 0; }
.sb-cand em { font-style: normal; color: var(--muted); }
.sb-cand b { flex: none; color: var(--muted); font-weight: 600; }
.sb-guide { font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; min-height: 360px; white-space: pre-wrap; overflow-wrap: anywhere; }
.sb-save { margin-top: 10px; }
.sb-ph { margin-top: 14px; }
.sb-ph summary { cursor: pointer; font-size: 14px; color: var(--accent); }
.sb-ph-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 5px 0; font-size: 12.5px; border-bottom: 1px solid var(--line); }
.sb-ph-row code { color: var(--accent); }
.sb-ph-row span { color: var(--muted); }
.sb-ph-row b { font-weight: 600; text-align: right; overflow-wrap: anywhere; }

/* тикеты: сообщения бота */
.badge.sp-bot { background: rgba(209, 187, 192, .14); color: #D1BBC0; }
.msg.sp-botmsg { background: linear-gradient(135deg, rgba(209, 187, 192, .10), rgba(209, 187, 192, .04)), var(--surface-2);
  box-shadow: inset 0 0 0 1px rgba(209, 187, 192, .22); }
.msg.sp-botmsg .msg-author { display: inline-flex; align-items: center; gap: 4px; color: #D1BBC0; }
.sp-note { margin-top: 6px; font-size: 12px; color: var(--muted); }

/* пост после покупки */
.icon-btn.has-post { color: var(--accent); }
.post-off { color: #CDB3BA; }
.post-media { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.post-media:empty, .post-docs:empty { display: none; }
.post-thumb { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.post-thumb img, .post-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-play { position: absolute; inset: 0; display: grid; place-items: center; color: #FFFFFF; pointer-events: none; }
.post-thumb .att-x { position: absolute; top: 4px; right: 4px; }
.post-docs { display: grid; gap: 6px; margin-top: 10px; }
.post-doc { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); }
.post-doc .main { flex: 1; min-width: 0; display: grid; }
.post-doc .main b { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-doc .main span { font-size: 12px; color: var(--muted); }
.post-upload { position: relative; margin: 10px 0 0; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); font-size: 13px; overflow: hidden; }
.post-upload span { position: relative; z-index: 1; }
.post-upload i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent-soft); transition: width .15s; }
.card-body > .btn.block { margin-top: 12px; }
.post-preview { display: grid; gap: 6px; padding: 14px; border-radius: 18px; background: #25171A; }
.post-bubble { max-width: 92%; padding: 8px 11px; border-radius: 14px 14px 14px 4px; background: #2F1D21; color: #F7F3F4; font-size: 14.5px; line-height: 1.4; overflow: hidden; }
.post-bubble.muted { color: #A88890; }
.post-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.post-album { display: grid; gap: 2px; margin: -8px -11px 8px; }
.post-album.n2 { grid-template-columns: 1fr 1fr; }
.post-album.n3 { grid-template-columns: 1fr 1fr 1fr; }
.post-album img, .post-vid { width: 100%; aspect-ratio: 1; object-fit: cover; display: grid; place-items: center; background: #201417; color: #FFFFFF; }
.post-album.n1 img, .post-album.n1 .post-vid { aspect-ratio: 16 / 10; }
.post-docline { display: flex; align-items: center; gap: 10px; color: #BC9AA3; }
.post-docline span { display: grid; color: #F7F3F4; }
.post-docline small { color: #A88890; font-size: 12px; }
.post-warn { background: #2E1C21; }
.post-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* галочки у позиций товара */
.key-tools { display: flex; justify-content: flex-end; margin: -6px 0 8px; }
.key-check { flex: none; position: relative; width: 24px; height: 24px; cursor: pointer; }
.key-check input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.key-check i { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; box-shadow: inset 0 0 0 2px var(--faint, #63474E); color: transparent; transition: background .12s, box-shadow .12s; }
.key-check input:checked + i { background: var(--accent-grad, var(--accent)); box-shadow: none; color: #FFFFFF; }
.key-check input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.key-row.is-checked { background: var(--accent-soft); }
.key-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(76px + env(safe-area-inset-bottom, 0px)); z-index: 30;
  display: flex; align-items: center; gap: 8px; width: min(560px, calc(100% - 32px)); padding: 10px 12px; border-radius: 18px;
  background: var(--surface); box-shadow: 0 10px 30px rgba(0, 0, 0, .45), inset 0 0 0 1px var(--line); }
.key-bar[hidden] { display: none; }
.key-bar span { flex: 1; font-weight: 600; }

/* статусы предложений по улучшению */
.sg-st { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.sg-st-new { background: var(--accent-soft); color: var(--accent); }
.sg-st-review { background: rgba(209, 187, 192, .14); color: #D1BBC0; }
.sg-st-planned { background: rgba(164, 130, 138, .16); color: #A4828A; }
.sg-st-done { background: var(--good-soft); color: var(--good); }
.sg-st-rejected { background: var(--bad-soft); color: var(--bad); }
.sg-row { align-items: flex-start; }
.sg-row .sg-text { margin: 4px 0; color: var(--text) !important; white-space: pre-wrap; overflow-wrap: anywhere; }
.sg-row .sg-answer { margin-top: 2px; padding: 8px 10px; border-radius: 10px; background: var(--accent-soft); color: var(--text) !important; white-space: pre-wrap; }
.sg-statuses { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.sg-statuses .chip[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--accent); }

/* голосования за следующую игру */
.poll-adm-head { padding: 14px 16px; }
.poll-adm-head b { display: block; font: 600 17px/1.3 var(--display); }
.poll-adm-row .thumb { flex: none; width: 42px; height: 42px; border-radius: 12px; overflow: hidden; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.poll-adm-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.poll-adm-bar { display: block; height: 6px; margin: 5px 0 3px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.poll-adm-bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.poll-adm-row.is-lead .poll-adm-bar i { background: var(--good); }
.poll-adm-pct { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 42px; text-align: right; }
.poll-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 4px; }
.poll-actions .wide { grid-column: 1 / -1; }
.poll-actions .btn.soft { box-shadow: inset 0 0 0 1px rgba(159, 123, 132, .4); }

/* набор модераторов */
.rc-toggle { margin-bottom: 14px; }
.rc-answers { display: grid; gap: 10px; margin-bottom: 14px; }
.rc-answers div { padding: 10px 12px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.rc-answers b { display: block; margin-bottom: 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
.rc-answers p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.rc-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.rc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rc-actions .wide { grid-column: 1 / -1; }
.rc-st { display: inline-flex; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.rc-st-new { background: var(--accent-soft); color: var(--accent); }
.rc-st-accepted { background: var(--good-soft); color: var(--good); }
.rc-st-rejected { background: var(--bad-soft); color: var(--bad); }

/* пост после покупки: загрузка больших файлов через бота */
.post-bot-btn { margin-top: 8px; }
.post-tg { display: grid; place-items: center; align-content: center; gap: 2px; width: 100%; height: 100%; color: var(--accent); background: var(--accent-soft); }
.post-tg small { font-size: 10.5px; color: var(--muted); }

/* пост после покупки: возможные ошибки */
.post-errors { display: grid; gap: 10px; margin-bottom: 10px; }
.post-errors:empty { display: none; }
.post-err { display: grid; gap: 8px; padding: 10px; border-radius: 14px; background: var(--surface-2); }
.post-err-head { display: flex; align-items: center; gap: 8px; }
.post-err-head b { flex: 1; font-size: 14px; font-weight: 600; }
.post-err-label { margin: 2px 2px -2px; font-size: 12.5px; color: var(--muted); }
.post-err-n { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; font-size: 12px; font-weight: 700;
  background: var(--bad-soft); color: var(--bad); }
.post-err .textarea { width: 100%; resize: vertical; }
.post-err .post-err-title { min-height: 0; font-weight: 600; }
.post-err-line { margin-top: 8px; }
.post-quote { margin-top: 4px; padding: 4px 8px; border-left: 3px solid #BC9AA3; border-radius: 4px; background: rgba(188, 154, 163, .1); white-space: pre-wrap; font-size: 13.5px; }

/* пост после покупки: три раздела */
.post-sec .card-head { align-items: flex-start; }
.post-sec-ico { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; }
.post-sec-tutorial { background: rgba(209, 187, 192, .14); color: #D1BBC0; }
.post-sec-guide { background: var(--accent-soft); color: var(--accent); }
.post-sec-soft { background: var(--good-soft); color: var(--good); }
.post-sec-count { color: var(--muted); font-weight: 500; font-size: 13px; }
.post-sec-empty { margin: 0 2px 10px; font-size: 13px; color: var(--muted); }
.post-sec-empty[hidden] { display: none; }
.post-sec .post-media:not(:empty), .post-sec .post-docs:not(:empty) { margin-bottom: 10px; }
.post-sec-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.post-sec-btns .btn { flex-wrap: wrap; row-gap: 0; line-height: 1.2; }
.post-sec-btns .btn small { flex-basis: 100%; font-size: 11.5px; font-weight: 500; opacity: .75; }
.post-upd { margin: 0 0 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.post-docline-wrap { display: grid; }

/* пост после покупки: файлы к ошибкам */
.post-sec-errors { background: var(--bad-soft); color: var(--bad); }
.post-err-files { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.post-err-files-title { display: block; margin: 0 2px 8px; font-size: 14px; font-weight: 600; }

/* логи */
.log-seg { margin-bottom: 12px; }
.log-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; }
.log-bar .chip { display: inline-flex; align-items: center; gap: 5px; margin: 0; }
.log-live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 500; }
.log-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); animation: log-pulse 2s ease-in-out infinite; }
@keyframes log-pulse { 50% { opacity: .35; } }
.log-list { padding: 4px 0; }
.log-day { padding: 10px 14px 4px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.log-row { display: flex; gap: 10px; padding: 9px 14px; border-top: 1px solid var(--line); }
.log-day + .log-row { border-top: 0; }
.log-row.is-err { background: linear-gradient(90deg, var(--bad-soft), transparent 70%); }
.log-time { flex: none; width: 58px; padding-top: 1px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.log-row .main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.log-head { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.log-src { padding: 1px 6px; border-radius: 6px; font-size: 10.5px; font-weight: 600; background: rgba(209, 187, 192, .14); color: #D1BBC0; }
.log-action { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.log-details { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.log-error { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--bad); font-weight: 600; }
.srv-load { padding: 14px 16px; }
.srv-load-top { display: flex; align-items: baseline; justify-content: space-between; }
.srv-load-top span { font-weight: 600; }
.srv-load-top b { font: 600 28px/1 var(--display); font-variant-numeric: tabular-nums; }
.srv-bar { height: 10px; margin-top: 10px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.srv-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width .5s; }
.srv-bar i.good { background: var(--good); }
.srv-bar i.mid { background: #C0A0A8; }
.srv-bar i.bad { background: var(--bad); }
.srv-spark svg { display: block; width: 100%; height: 60px; }
.srv-line { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.srv-area { fill: var(--accent-soft); stroke: none; }
.srv-spark-axis { display: flex; justify-content: space-between; margin-top: 4px; font-size: 11px; color: var(--muted); }
.srv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 4px; }
.srv-tile { display: grid; gap: 2px; padding: 12px 14px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.srv-tile b { font: 600 20px/1.2 var(--display); font-variant-numeric: tabular-nums; }
.srv-tile b small { font: 500 12px var(--font, inherit); color: var(--muted); }
.srv-tile b.bad { color: var(--bad); }
.srv-tile span { font-size: 12px; color: var(--muted); }
.console { max-height: 60vh; overflow: auto; padding: 8px 10px; border-radius: 14px; background: #1B1113; box-shadow: inset 0 0 0 1px var(--line);
  font: 12px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; }
.con-line { padding: 4px 0; border-bottom: 1px solid rgba(255, 255, 255, .05); overflow-wrap: anywhere; }
.con-time { color: #A88890; margin-right: 6px; }
.con-lvl { margin-right: 6px; font-weight: 700; color: #A88890; }
.lvl-error .con-lvl, .lvl-critical .con-lvl { color: #B58F99; }
.lvl-warning .con-lvl { color: #A4828A; }
.con-msg { color: #ECE2E5; white-space: pre-wrap; }
.lvl-error .con-msg, .lvl-critical .con-msg { color: #CDB3BA; }
.con-src { display: block; color: #846069; font-size: 11px; }
.con-line details summary { cursor: pointer; color: #D1BBC0; margin-top: 2px; }
.con-line pre { margin: 4px 0 0; padding: 8px; border-radius: 8px; background: rgba(255, 255, 255, .04); white-space: pre-wrap; color: #DDCDD1; font: inherit; }
.con-empty { padding: 14px 4px; color: #A88890; text-align: center; }

/* скрытая кнопка не должна показываться из-за display у .btn */
.btn[hidden], .chip[hidden] { display: none !important; }

/* рассылка по расписанию */
.bs-plan { margin-top: 12px; padding: 14px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.bs-plan[hidden], .bs-custom[hidden], [data-end-field][hidden] { display: none; }
.bs-plan .field:last-of-type { margin-bottom: 8px; }
.bs-custom { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.bs-custom .input { width: auto; flex: 1; min-width: 0; }
.bs-custom span { color: var(--muted); font-size: 14px; }
.bs-summary { margin: 4px 2px 0; font-size: 13.5px; font-weight: 600; color: var(--accent); }
.bs-summary.is-bad { color: var(--bad); }
.bs-row { align-items: flex-start; }
.bs-actions { display: flex; align-items: center; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.bs-actions .btn.sm { gap: 4px; }
[data-when] button, [data-send-label] { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }

/* «Разослать всем в бота» в формах */
.announce-group { margin-bottom: 14px; box-shadow: inset 0 0 0 1px rgba(159, 123, 132, .35); }
.sale-edit .announce-group { margin: 12px 0 0; }

/* маркет: модерация изменённого товара — было → стало */
.mk-prev { display: grid; gap: 6px; margin-bottom: 10px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); }
.mk-prev > b { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--accent); }
.mk-prev-row { display: grid; grid-template-columns: 82px 1fr; gap: 2px 8px; font-size: 13px; }
.mk-prev-row > span:first-child { grid-row: span 2; color: var(--muted); }
.mk-prev-old { color: var(--muted); text-decoration: line-through; overflow-wrap: anywhere; white-space: pre-wrap; }
.mk-prev-new { color: var(--text); overflow-wrap: anywhere; white-space: pre-wrap; }

/* наборы в админке */
.rc-back { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 6px; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 14px; cursor: pointer; }
.rc-back svg { transform: rotate(180deg); }
.rc-camp-row .linkish-block { flex: 1; min-width: 0; display: grid; gap: 2px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.rc-adm-files { display: grid; gap: 6px; margin-bottom: 6px; }
.rc-adm-thumb { flex: none; width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }

/* ночная скидка: скрытые поля текста; метки статуса чита в дереве каталога */
.field[hidden] { display: none; }
.ns-times { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ns-times .field { margin-bottom: 10px; }
.badge.upd-updated { color: var(--good); background: var(--good-soft); }
.badge.upd-updating { color: #C0A0A8; background: rgba(192, 160, 168, .14); }

/* промокоды: выбор «на что действует» — 5 кнопок переносятся на узком экране */
.seg.seg-wrap { flex-wrap: wrap; }
.seg.seg-wrap button { flex: 1 0 auto; }

/* массовое создание промокодов: список созданных кодов */
.promo-created { max-height: 46vh; overflow: auto; margin: 0 0 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2);
  font: 13.5px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; user-select: all; }

/* «Обновить чит»: режим замены файлов с софтом */
.post-refresh-btn { margin-top: 10px; }
.post-refresh { display: grid; gap: 8px; margin: 0 0 12px; padding: 12px; border-radius: 16px; background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(163, 127, 136, .35); }
.post-refresh > b { display: flex; align-items: center; gap: 8px; color: var(--accent); }
.post-refresh > span { font-size: 13px; color: var(--muted); line-height: 1.45; }
.post-refresh-ann { padding: 8px 0 !important; }
/* ответ главного админа под отзывом */
.rv-admin-reply { display: block; margin-top: 4px; padding: 6px 10px; border-radius: 10px; background: var(--accent-soft); font-size: 13px; color: var(--text); overflow-wrap: anywhere; }
.rv-admin-reply b { color: var(--accent); font-weight: 600; }
.rv-admin-reply-btn { margin-top: 4px; font-size: 13px; color: var(--accent); }

/* «Для покупателей»: выключено — список скидок приглушён */
.perks-list.is-off { opacity: .45; }
/* «Для покупателей» → распродажи: чит и его скидка */
.perk-sale { display: grid; gap: 6px; margin-bottom: 12px; padding: 12px; border-radius: 16px; background: var(--surface-2); }
.perk-sale-head { display: flex; align-items: center; gap: 8px; }
.perk-sale-head b { flex: 1; min-width: 0; font-size: 14px; }
.perk-sale .sale-edit-row .field { margin-bottom: 4px; }
.perk-sale .btn { justify-self: start; }
.perk-sale .input { background: var(--surface); }

/* проверка Magic: статус и строки .env */
.row .ico.good { background: var(--good-soft); color: var(--good); }
.code-block { margin: 0; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line);
  font: 13px/1.5 ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; -webkit-user-select: text; user-select: text; }

/* видео-шапка каталога: превью в админке */
.hdr-preview { display: block; width: 100%; max-height: 240px; object-fit: cover; border-radius: 14px; background: #000000; }

/* ─────────── анимации интерфейса ─────────── */
/* Появление экрана: блоки поднимаются по очереди. Класс .intro ставится при первом показе и снимается сам */
@keyframes ui-rise { from { opacity: 0; transform: translate3d(0, 14px, 0) scale(.985); } }
.intro #app > * { animation: ui-rise .6s cubic-bezier(.2, .8, .2, 1) both; }
.intro #app > *:nth-child(2) { animation-delay: .05s; }
.intro #app > *:nth-child(3) { animation-delay: .1s; }
.intro #app > *:nth-child(4) { animation-delay: .15s; }
.intro #app > *:nth-child(5) { animation-delay: .2s; }
.intro #app > *:nth-child(6) { animation-delay: .25s; }
.intro #app > *:nth-child(7) { animation-delay: .3s; }
.intro #app > *:nth-child(n+8) { animation-delay: .35s; }

/* Кнопки: блик пробегает по главной кнопке, нажатие — пружинит */
.btn { position: relative; overflow: hidden; isolation: isolate; transition: opacity .15s, transform .18s cubic-bezier(.3, 1.6, .5, 1), box-shadow .2s; }
.btn:not(.soft):not(.danger)::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .28) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: ui-sheen 4.5s ease-in-out infinite;
}
@keyframes ui-sheen { 0%, 62% { transform: translateX(-120%); } 82%, 100% { transform: translateX(120%); } }
.btn:active { transform: scale(.96); }
@media (hover: hover) {
  .btn:not(.soft):not(.danger):hover { box-shadow: 0 10px 30px -8px rgba(158, 120, 130, .85); }
  .row:hover, .case-banner:hover { filter: brightness(1.08); }
}
.row, .case-banner, .pcard, .chip { transition: transform .18s cubic-bezier(.3, 1.4, .5, 1), filter .2s, box-shadow .2s; }
.row:active, .case-banner:active, .pcard:active { transform: scale(.98); }

/* Нижнее меню: активная вкладка светится и мягко «пульсирует» */
.tabbar { background: rgba(22, 12, 15, .88); border-top-color: rgba(161, 125, 134, .18); }
.tabbar button span.i { transition: background .25s, transform .25s cubic-bezier(.3, 1.6, .5, 1), box-shadow .25s; }
.tabbar button[aria-current="page"] span.i { transform: translateY(-1px) scale(1.06); animation: ui-tab-glow 2.8s ease-in-out infinite; }
@keyframes ui-tab-glow { 50% { box-shadow: 0 0 22px -2px rgba(158, 120, 130, .75); } }

/* Шторки и тосты — с пружинкой */
.sheet { animation: rise .42s cubic-bezier(.2, 1.15, .3, 1); }
.toast { animation: toast-in .35s cubic-bezier(.2, 1.3, .3, 1); }

@media (prefers-reduced-motion: reduce) {
  .intro #app > *, .btn::after, .tabbar button[aria-current="page"] span.i { animation: none !important; }
}

/* статусы в «Для покупателей»: по строке на статус — покупки, кэшбэк, скидка */
.lv-edit { margin-bottom: 6px; }
.lv-edit-name { display: block; margin: 0 2px 6px; font-size: 14px; }
.lv-edit-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.lv-edit-fields .field { margin-bottom: 8px; }
.lv-edit-fields .field > span { font-size: 12px; }

/* VIP-заявки */
.vip-app { margin-top: 12px; }
.vip-app-head { display: flex; align-items: flex-start; gap: 10px; }
.vip-app-head .main { flex: 1; min-width: 0; display: grid; }
.vip-app-head .main b { font-size: 16px; }
.vip-app-head .main span { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.vip-app-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.vip-app-stats span { display: grid; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); font-size: 12px; color: var(--muted); }
.vip-app-stats b { font-size: 15px; color: var(--text); }
.vip-app-bought { margin-top: 10px; font-size: 13.5px; }
.vip-app-bought summary { cursor: pointer; color: var(--accent); }
.vip-app-row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 2px; border-bottom: 1px solid var(--line); }

/* скам-база */
.scam-shots-edit { display: flex; flex-wrap: wrap; gap: 8px; }
.scam-shot { position: relative; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.scam-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.scam-shot button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .65); color: #FFFFFF; }
.kcg-select { width: auto; max-width: 46%; height: 38px; padding: 0 10px; font-size: 14px; }

/* тонкая настройка: сектора колеса */
.tn-sector { display: grid; grid-template-columns: 22px 1fr 1fr 46px 36px; align-items: end; gap: 8px; margin-bottom: 6px; }
.tn-sector .field { margin: 0; }
.tn-n { padding-bottom: 12px; color: var(--muted); font-weight: 700; text-align: center; }
.tn-pct { padding-bottom: 12px; font-size: 12.5px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.tn-sector .icon-btn { margin-bottom: 4px; }
.tn-sector + .tn-sector .field > span { display: none; }
/* чемпионат: призы по местам */
.ch-prize { display: grid; grid-template-columns: 18px minmax(0, 1.25fr) minmax(0, 1fr) 32px; align-items: center; gap: 8px; margin-bottom: 6px; }
.ch-prize .tn-n { padding: 0; }
/* фанат-статус: уровни */
.fan-lv { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, .8fr) minmax(0, .9fr) 32px; gap: 6px; margin-bottom: 10px; }
.fan-lv .fan-perk { grid-column: 1 / -1; height: 36px; font-size: 13px; }

/* покер: выбор лота */
.pk-pick-label { font-size: 12px; color: var(--muted); margin: 10px 0 0; text-transform: uppercase; letter-spacing: .04em; }
.pk-lots { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin: 12px 0 14px; }
.pk-lot { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface); color: inherit; font: inherit; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.pk-lot:hover { transform: translateY(-1px); }
.pk-lot[aria-pressed="true"] { border-color: transparent; box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft); }
.pk-lot-path { font-size: 12px; color: var(--muted); }
.pk-lot-title { font-weight: 700; font-size: 15px; }
.pk-lot-meta { font-size: 12px; color: var(--muted); }
.pk-lot[aria-pressed="true"] .pk-lot-title { color: var(--accent); }

/* cry4me: карточки ключей */
.cry-key { margin-bottom: 10px; }
.cry-code { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .02em; word-break: break-all; }
.cry-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cry-extend { display: grid; grid-template-columns: 1fr auto; gap: 6px; margin-top: 6px; }
.cry-extend .input { height: 36px; padding-top: 0; padding-bottom: 0; }
.cry-list { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font: 13px/1.6 ui-monospace, Menlo, monospace; white-space: pre-wrap; word-break: break-all; max-height: 260px; overflow: auto; }

/* автовыдача cry4me: плитки выбора срока ключа */
.cry-pick { margin-bottom: 14px; }
.cry-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 2px; }
.cry-tile {
  position: relative; display: grid; gap: 3px; align-content: center; min-height: 64px; padding: 10px 10px 9px;
  border: 0; border-radius: 14px; background: var(--surface-2); box-shadow: var(--shadow);
  color: var(--text); text-align: left; font: inherit; cursor: pointer;
  transition: background .18s, box-shadow .18s, transform .12s;
}
.cry-tile b { font-size: 14px; font-weight: 650; }
.cry-tile small { font-size: 11.5px; line-height: 1.3; color: var(--muted); }
.cry-tile.is-off b { color: var(--muted); }
.cry-tile:active { transform: scale(.97); }
.cry-tile[aria-checked="true"] { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent), 0 6px 18px -10px rgba(237, 196, 201, .6); }
.cry-tile[aria-checked="true"] small { color: var(--accent); }
.cry-tile[aria-checked="true"].is-off { box-shadow: inset 0 0 0 1.5px var(--muted); background: var(--surface-2); }
.cry-tile[aria-checked="true"].is-off small { color: var(--muted); }
.cry-tile:disabled { opacity: .45; cursor: default; }
.cry-tick {
  position: absolute; top: 7px; right: 7px; display: grid; place-items: center; width: 18px; height: 18px;
  border-radius: 999px; background: var(--accent); color: var(--bg); opacity: 0; transform: scale(.6);
  transition: opacity .18s, transform .18s;
}
.cry-tile.is-off .cry-tick { background: var(--muted); }
.cry-tile[aria-checked="true"] .cry-tick { opacity: 1; transform: none; }
.cry-dev { margin: 10px 0 0; }
.cry-pick .hint { margin: 8px 0 0; }

/* каталоги внутри игры */
.row.cat-section { padding-left: 30px; min-height: 50px; background: rgba(157, 119, 129, .06); }
.row.cat-section .title { font-weight: 600; }
.row.cat-section + .row::before { left: 30px; }
.row.cat-cheat.in-section { padding-left: 52px; }
.row.cat-version.in-section { padding-left: 74px; }
.row.cat-cheat.in-section + .row::before, .row.cat-version.in-section + .row::before { left: 52px; }

/* панель выбранных позиций: действия отдельной строкой, на телефоне в один ряд не помещаются */
.key-bar { flex-wrap: wrap; }
.key-bar-acts { flex: 1 0 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
