/* NEROX — мини-приложение. Чёрный, шлифованная сталь и неоновый «вольт» из логотипа.
   Фирменный приём — срезанный под 45° угол (как у буквы N в логотипе). */

@font-face { font-family: "Unbounded"; src: url("fonts/unbounded.woff") format("woff"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-400.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-500.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-600.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-700.woff") format("woff"); font-weight: 700; font-display: swap; }

:root {
  --logo-s1: #f4f5f6;
  --logo-s2: #a7acb2;
  --logo-s3: #5f646a;
  --void: #000;
  --plate: #15171a;
  --plate-2: #1c1f23;
  --plate-3: #262a2f;
  --line: rgba(214, 220, 228, .09);
  --line-2: rgba(214, 220, 228, .16);
  --ink: #eceef0;
  --ink-2: #a9adb2;
  --ink-3: #6c7178;
  --volt: #8cdf12;
  --volt-ink: #0a1300;
  --volt-deep: #4c9a03;
  --volt-glow: rgba(140, 223, 18, .38);
  --volt-soft: rgba(140, 223, 18, .1);
  --steel: linear-gradient(180deg, #f4f5f6 0%, #c3c7cc 52%, #8e939a 100%);
  --danger: #ff6a55;
  --cut: 14px;
  --r: 10px;
  --gutter: 16px;
  --nav-h: 66px;
  --top: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
  --bottom: var(--tg-safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
  --display: "Unbounded", "Inter", system-ui, sans-serif;
  --text: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --void: #e9ebee;
  --plate: #fff;
  --plate-2: #f3f4f6;
  --plate-3: #e4e7eb;
  --line: rgba(20, 26, 34, .09);
  --line-2: rgba(20, 26, 34, .16);
  --ink: #0d1014;
  --ink-2: #4c535b;
  --ink-3: #8a9098;
  --volt: #92e01f;
  --volt-ink: #0b1400;
  --volt-deep: #3f8000;
  --volt-glow: rgba(110, 190, 10, .35);
  --volt-soft: rgba(110, 190, 10, .12);
  --steel: linear-gradient(180deg, #2b3036 0%, #555c64 60%, #2b3036 100%);
  --logo-s1: #8f959c;
  --logo-s2: #4d535a;
  --logo-s3: #22262b;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--void); color: var(--ink); }
body {
  font: 400 15px/1.45 var(--text);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  min-height: 100vh;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--volt); text-decoration: none; }
img, video { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--volt); outline-offset: 2px; }
::selection { background: var(--volt); color: var(--volt-ink); }
[hidden] { display: none !important; }

/* ------------------------------------------------------------------ каркас */
#app { min-height: 100vh; padding: var(--top) 0 calc(var(--nav-h) + var(--bottom) + 24px); }
.screen { padding: 0 var(--gutter); max-width: 560px; margin: 0 auto; }
.screen.wide { padding: 0; }
/* в полноэкранном режиме сверху лежат кнопки Telegram: под ними — сплошной фон, шапка прилипает ниже */
body::before { content: ""; position: fixed; left: 0; right: 0; top: 0; height: var(--top); background: var(--void); z-index: 21; pointer-events: none; }
.topbar {
  position: sticky; top: var(--top); z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: 12px var(--gutter) 10px; margin: 0 calc(var(--gutter) * -1) 6px;
  background: linear-gradient(var(--void) 70%, transparent);
}
.wordmark { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; }
.wordmark svg { width: 30px; height: 30px; flex: none; }
.wordmark b {
  font: 800 19px/1 var(--display); letter-spacing: .04em; text-transform: uppercase;
  background: var(--steel); -webkit-background-clip: text; background-clip: text; color: transparent;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wordmark b i { font-style: normal; color: var(--volt); -webkit-text-fill-color: var(--volt); }
.wordmark .crumb { font: 700 16px/1.2 var(--display); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.wordmark.inner svg { width: 26px; height: 26px; }
.balance {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 4px 0 12px;
  border-radius: 18px; background: var(--plate); box-shadow: inset 0 0 0 1px var(--line-2);
  font: 700 15px/1 var(--display);
}
.balance .hex { width: 14px; height: 14px; }
.balance .plus {
  width: 28px; height: 28px; border-radius: 14px; display: grid; place-items: center;
  background: var(--volt); color: var(--volt-ink);
}
.iconbtn {
  width: 36px; height: 36px; border-radius: 18px; display: grid; place-items: center;
  background: var(--plate); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2);
}
.iconbtn svg, .balance svg { width: 18px; height: 18px; }
.page-title { display: flex; align-items: center; gap: 10px; padding: 14px 0 8px; }
.page-title h1 { margin: 0; font: 700 24px/1.15 var(--display); letter-spacing: -.01em; }
.page-title p { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; }
.lead { color: var(--ink-2); margin: 0 0 14px; font-size: 14px; }
h2.sec {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin: 26px 0 12px; font: 700 18px/1.2 var(--display); letter-spacing: -.005em;
}
h2.sec a, h2.sec button { font: 600 13px/1 var(--text); color: var(--volt); }

/* ------------------------------------------------------------------ плиты со срезанным углом */
.plate {
  position: relative; background: var(--plate); border-radius: var(--r);
  box-shadow: inset 0 0 0 1px var(--line);
}
.cut { clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); }
.cut-2 { clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut))); }
.cut::after, .cut-2::after { /* световая грань на срезе */
  content: ""; position: absolute; top: 0; right: 0; width: calc(var(--cut) * 1.42); height: 1px;
  background: var(--line-2); transform-origin: right top; transform: rotate(45deg) translateX(1px);
  pointer-events: none;
}

/* ------------------------------------------------------------------ баннеры */
.banners { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin: 4px calc(var(--gutter) * -1) 0; padding: 0 var(--gutter); }
.banners::-webkit-scrollbar { display: none; }
.banner {
  flex: 0 0 100%; scroll-snap-align: center; min-height: 168px; padding: 18px 18px 16px;
  display: flex; flex-direction: column; justify-content: space-between; overflow: hidden;
  background:
    radial-gradient(120% 90% at 100% 0%, var(--volt-soft), transparent 60%),
    linear-gradient(160deg, var(--plate-2), var(--plate) 70%);
}
.banner h3 { margin: 0; font: 800 23px/1.1 var(--display); letter-spacing: -.015em; max-width: 78%; }
.banner p { margin: 8px 0 0; color: var(--ink-2); max-width: 70%; font-size: 14px; }
.banner .art { position: absolute; right: -10px; bottom: -14px; width: 132px; height: 132px; opacity: .95; pointer-events: none; }
.banner .go {
  align-self: flex-start; margin-top: 14px; height: 38px; padding: 0 16px; display: inline-flex; align-items: center; gap: 8px;
  background: var(--volt); color: var(--volt-ink); font-weight: 700; font-size: 14px;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}
.dots { display: flex; gap: 6px; justify-content: center; margin: 10px 0 0; }
.dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line-2); transition: width .25s, background .25s; }
.dots i.on { width: 18px; background: var(--volt); }

/* ------------------------------------------------------------------ плитки разделов */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile {
  min-height: 96px; padding: 14px; display: flex; flex-direction: column; justify-content: space-between;
  text-align: left; transition: transform .12s ease, box-shadow .2s;
}
.tile:active { transform: scale(.98); }
.tile .ico { width: 34px; height: 34px; color: var(--volt); }
.tile .ico svg { width: 26px; height: 26px; }
.tile b { display: block; font: 700 16px/1.2 var(--display); margin-top: 10px; }
.tile span { display: block; color: var(--ink-2); font-size: 13px; margin-top: 3px; }

.strip {
  display: flex; align-items: center; gap: 14px; padding: 16px; margin-top: 10px; width: 100%; text-align: left;
  background: linear-gradient(90deg, var(--plate-2), var(--plate));
}
.strip .mark { width: 46px; height: 46px; flex: none; display: grid; place-items: center; color: var(--volt);
  background: var(--void); border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line-2); }
.strip .mark svg { width: 24px; height: 24px; }
.strip b { display: block; font: 700 16px/1.2 var(--display); }
.strip span { display: block; color: var(--ink-2); font-size: 13px; margin-top: 3px; }
.strip .chev { margin-left: auto; color: var(--ink-3); width: 18px; height: 18px; flex: none; }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.btn-plate { display: flex; align-items: center; gap: 10px; padding: 14px; font-weight: 600; text-align: left; }
.btn-plate svg { width: 20px; height: 20px; color: var(--volt); flex: none; }

/* ------------------------------------------------------------------ бейджи и чипы */
.badge {
  display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 10px;
  font: 700 11px/1 var(--text); letter-spacing: .02em; white-space: nowrap;
  color: var(--volt); box-shadow: inset 0 0 0 1px var(--volt);
}
.badge.steel { color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.badge.solid { background: var(--volt); color: var(--volt-ink); box-shadow: none; }
/* бейдж внутри заголовка строки: не растягивается на всю ширину и не перекрашивается */
.strip b .badge, .option b .badge, .tile b .badge { display: inline-flex; width: auto; vertical-align: 2px; margin: 0 0 0 6px; height: 18px; font-size: 10.5px; color: var(--volt); }
.strip b .badge.steel, .option b .badge.steel { color: var(--ink-2); }
.strip b .badge.solid, .option b .badge.solid { color: var(--volt-ink); }

.seg { display: flex; padding: 3px; gap: 3px; border-radius: 12px; background: var(--plate); box-shadow: inset 0 0 0 1px var(--line); }
.seg button { flex: 1; height: 36px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.seg button.on { background: var(--plate-3); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.seg button .n { color: var(--ink-3); font-weight: 500; margin-left: 4px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 36px; padding: 0 14px; border-radius: 18px; display: inline-flex; align-items: center; gap: 6px;
  background: var(--plate); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-2);
  font-weight: 600; font-size: 14px; white-space: nowrap;
}
.chip.on { color: var(--ink); background: var(--volt-soft); box-shadow: inset 0 0 0 1.5px var(--volt); }
.chip small { color: var(--ink-3); font-weight: 500; }
.chip svg { width: 16px; height: 16px; flex: none; }
.chip.on svg { color: var(--volt); }
.chip:disabled { opacity: .4; }

/* ------------------------------------------------------------------ карточки трендов и работ */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tcard { position: relative; aspect-ratio: 3 / 4; overflow: hidden; text-align: left; background: var(--plate-2); }
.tcard img, .tcard video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tcard .shade { position: absolute; inset: 0; background: linear-gradient(transparent 45%, rgba(0, 0, 0, .82)); }
.tcard .meta { position: absolute; left: 12px; right: 12px; bottom: 11px; color: #fff; }
.tcard .meta b { display: block; font: 700 15px/1.2 var(--display); text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }
.tcard .meta span { display: block; font-size: 12px; color: rgba(255, 255, 255, .75); margin-top: 3px; }
.tcard .top { position: absolute; left: 10px; right: 10px; top: 10px; display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; }
.tcard .top .badge { background: rgba(0, 0, 0, .55); backdrop-filter: blur(6px); }
.tcard .fav { width: 34px; height: 34px; border-radius: 17px; display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, .45); backdrop-filter: blur(6px); }
.tcard .fav svg { width: 18px; height: 18px; }
.tcard .fav.on { color: var(--volt); }
.tcard .ph { position: absolute; inset: 0; display: grid; place-items: center;
  background: radial-gradient(90% 70% at 70% 20%, var(--volt-soft), transparent 70%), linear-gradient(160deg, var(--plate-3), var(--plate)); }
.tcard .ph svg { width: 54px; height: 54px; color: var(--ink-3); }

.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.work { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--plate-2); text-align: left; border-radius: var(--r); }
.work .del { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 15px; display: grid; place-items: center; background: rgba(0, 0, 0, .6); color: #fff; }
.work .del svg { width: 16px; height: 16px; }
.work img { width: 100%; height: 100%; object-fit: cover; }
.work .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); }
.work .ph svg { width: 36px; height: 36px; }
.work .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 8px; color: #fff;
  font-size: 12px; font-weight: 600; background: linear-gradient(transparent, rgba(0, 0, 0, .78)); }
.work .st { position: absolute; top: 8px; left: 8px; }
.work .st .badge { background: rgba(0, 0, 0, .6); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--volt); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ формы */
.field { margin-top: 18px; }
.field > label, .label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.field > label small, .label small { color: var(--ink-3); font-weight: 500; margin-left: 4px; }
.hint { color: var(--ink-3); font-size: 13px; margin-top: 6px; }
textarea, input.input {
  width: 100%; border: 0; border-radius: var(--r); padding: 12px 14px; background: var(--plate);
  box-shadow: inset 0 0 0 1px var(--line-2); resize: none; outline: none; font-size: 15px;
}
textarea { min-height: 96px; line-height: 1.45; }
textarea:focus, input.input:focus { box-shadow: inset 0 0 0 1.5px var(--volt); }
textarea:focus-visible, input:focus-visible { outline: none; }
textarea::placeholder, input::placeholder { color: var(--ink-3); }
.counter { text-align: right; color: var(--ink-3); font-size: 12px; margin-top: 4px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: var(--r);
  background: var(--plate); box-shadow: inset 0 0 0 1px var(--line); width: 100%; text-align: left; }
.switch .tog { width: 44px; height: 26px; border-radius: 13px; background: var(--plate-3); position: relative; flex: none; transition: background .2s; }
.switch .tog::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 10px; background: var(--ink-2); transition: transform .2s, background .2s; }
.switch.on .tog { background: var(--volt); }
.switch.on .tog::after { transform: translateX(18px); background: var(--volt-ink); }
.switch span small { display: block; color: var(--ink-3); font-size: 12px; }

.slots { display: flex; gap: 10px; flex-wrap: wrap; }
.slot {
  width: 96px; height: 120px; border-radius: var(--r); position: relative; overflow: hidden;
  background: var(--plate); box-shadow: inset 0 0 0 1px var(--line-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  color: var(--ink-2); font-size: 12px; font-weight: 600; text-align: center; padding: 6px;
}
.slot svg { width: 24px; height: 24px; color: var(--volt); }
.slot.filled { box-shadow: inset 0 0 0 1px var(--line); }
.slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slot .x { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 12px; display: grid; place-items: center; background: rgba(0, 0, 0, .65); color: #fff; z-index: 2; }
.slot .x svg { width: 14px; height: 14px; color: #fff; }
.slot .prog { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .55); color: #fff; font: 700 13px/1 var(--display); z-index: 2; }
.slot .role { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 11px; z-index: 2; }

.options { display: grid; gap: 8px; }
.option { display: flex; align-items: center; gap: 12px; padding: 13px 14px; text-align: left; width: 100%; border-radius: var(--r);
  background: var(--plate); box-shadow: inset 0 0 0 1px var(--line); }
.option.on { box-shadow: inset 0 0 0 1.5px var(--volt); background: var(--volt-soft); }
.option b { display: block; font-weight: 700; }
.option span { display: block; color: var(--ink-2); font-size: 13px; margin-top: 2px; }
.option .right { margin-left: auto; text-align: right; flex: none; font: 700 14px/1.2 var(--display); }
.option .right small { display: block; font: 500 11px/1.2 var(--text); color: var(--ink-3); }
.option .ico { width: 38px; height: 38px; border-radius: 10px; flex: none; display: grid; place-items: center; color: var(--volt); background: var(--void); box-shadow: inset 0 0 0 1px var(--line-2); }
.option .ico svg { width: 20px; height: 20px; }
.option .chev { width: 18px; height: 18px; margin-left: auto; color: var(--ink-3); flex: none; }
.option.pick .chev { transform: rotate(90deg); }
.voices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.voices .option { padding: 10px 12px; }
.voices .option b { font-size: 14px; }
.voices .option .voice-row span span { font-size: 12px; }

/* ------------------------------------------------------------------ главная кнопка снизу */
.cta-bar {
  position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--bottom)); z-index: 30;
  padding: 22px var(--gutter) 10px; background: linear-gradient(transparent 0, var(--void) 22px);
}
.cta-bar.solo { bottom: var(--bottom); padding-bottom: 14px; }
/* экраны с главной кнопкой или полем чата — без нижнего меню: больше места, назад — кнопкой Telegram */
body.focus #app { padding-bottom: calc(var(--bottom) + 16px); }
body.focus .cta-bar, body.focus .composer { bottom: 0; padding-bottom: calc(var(--bottom) + 12px); }
.cta-bar .inner { max-width: 528px; margin: 0 auto; }
.cta {
  width: 100%; height: 54px; display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--volt); color: var(--volt-ink); font: 700 16px/1 var(--text);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  box-shadow: 0 0 28px var(--volt-glow); transition: transform .1s, opacity .2s;
}
.cta:active { transform: scale(.985); }
.cta:disabled { background: var(--plate-3); color: var(--ink-3); box-shadow: none; }
.cta:disabled .price { border-left-color: var(--line-2); }
.cta .price { font: 800 15px/1 var(--display); padding-left: 10px; margin-left: 2px; border-left: 1px solid rgba(0, 0, 0, .25); }
.cta-sub { text-align: center; font-size: 12px; color: var(--ink-3); margin-top: 7px; }
.btn {
  height: 46px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 12px; background: var(--plate-2); box-shadow: inset 0 0 0 1px var(--line-2); font-weight: 600;
}
.btn.volt { background: var(--volt); color: var(--volt-ink); box-shadow: none; }
.btn.full { width: 100%; }
.btn svg { width: 18px; height: 18px; }
.btn:disabled { opacity: .45; }
.btn.danger { color: var(--danger); box-shadow: inset 0 0 0 1px rgba(255, 106, 85, .45); background: rgba(255, 106, 85, .08); }
.doc { padding-top: 8px; font-size: 14.5px; line-height: 1.55; }
.doc h3 { font: 700 17px/1.3 var(--display); margin: 22px 0 8px; }
.doc h3:first-child { font-size: 23px; margin-top: 10px; }
.doc p { margin: 0 0 10px; }
.doc li { margin: 4px 0; }
.spacer { height: 96px; }

/* ------------------------------------------------------------------ нижнее меню */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: calc(var(--nav-h) + var(--bottom));
  padding-bottom: var(--bottom); display: flex; align-items: stretch; justify-content: space-around;
  background: color-mix(in srgb, var(--plate) 88%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 var(--line);
}
.nav button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--ink-3); font-size: 11px; font-weight: 600; }
.nav button svg { width: 23px; height: 23px; }
.nav button.on { color: var(--ink); }
.nav button.on svg { color: var(--volt); }
.nav .make { flex: 0 0 76px; position: relative; }
.nav .make .hexbtn {
  width: 58px; height: 58px; margin-top: -22px; display: grid; place-items: center; color: var(--volt-ink);
  background: var(--volt); clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%);
  filter: drop-shadow(0 0 14px var(--volt-glow));
}
.nav .make .hexbtn svg { width: 26px; height: 26px; }
.nav .make span { margin-top: 2px; color: var(--ink-2); }

/* ------------------------------------------------------------------ выдвижная панель */
.sheet-wrap { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, .55); animation: fade .18s ease; }
.sheet {
  width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; background: var(--plate);
  border-radius: 20px 20px 0 0; padding: 10px var(--gutter) calc(20px + var(--bottom));
  box-shadow: 0 -1px 0 var(--line-2); animation: rise .24s cubic-bezier(.2, .9, .25, 1);
}
.sheet .grab { width: 38px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 0 auto 12px; }
.sheet h3 { margin: 4px 0 4px; font: 700 21px/1.2 var(--display); }
.sheet .sub { margin: 0 0 14px; color: var(--ink-2); font-size: 14px; }
.sheet .close { position: absolute; }
@keyframes rise { from { transform: translateY(40px); opacity: .4; } }
@keyframes fade { from { opacity: 0; } }

.toast {
  position: fixed; left: 50%; top: calc(var(--top) + 14px); transform: translate(-50%, -20px); z-index: 80;
  max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 12px; background: var(--plate-3);
  box-shadow: inset 0 0 0 1px var(--line-2), 0 10px 30px rgba(0, 0, 0, .35);
  font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.err { box-shadow: inset 0 0 0 1px var(--danger); }
.toast.ok { box-shadow: inset 0 0 0 1px var(--volt); }

/* ------------------------------------------------------------------ профиль и деньги */
.hero-user { display: flex; align-items: center; gap: 14px; padding: 14px 0 6px; }
.avatar { width: 62px; height: 62px; border-radius: 31px; flex: none; overflow: hidden; display: grid; place-items: center;
  background: var(--plate-3); font: 700 24px/1 var(--display); color: var(--volt); box-shadow: 0 0 0 2px var(--void), 0 0 0 3px var(--volt); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.hero-user b { display: block; font: 700 20px/1.2 var(--display); }
.hero-user span { color: var(--ink-2); font-size: 13px; }
.wallet { padding: 18px; margin-top: 12px; background: radial-gradient(100% 120% at 100% 0, var(--volt-soft), transparent 55%), var(--plate); }
.wallet .num { font: 800 42px/1 var(--display); letter-spacing: -.03em; display: flex; align-items: baseline; gap: 10px; margin: 6px 0 4px; }
.wallet .num small { font: 600 15px/1 var(--text); color: var(--ink-2); letter-spacing: 0; }
.wallet .sub { color: var(--ink-2); font-size: 13px; }
.wallet .acts { display: flex; gap: 10px; margin-top: 16px; }
.list { margin-top: 10px; border-radius: var(--r); overflow: hidden; background: var(--plate); box-shadow: inset 0 0 0 1px var(--line); }
.list .item { display: flex; align-items: center; gap: 12px; padding: 14px; width: 100%; text-align: left; box-shadow: inset 0 -1px 0 var(--line); }
.list .item:last-child { box-shadow: none; }
.list .item svg { width: 20px; height: 20px; color: var(--volt); flex: none; }
.list .item b { font-weight: 600; color: var(--ink); display: block; }
.list .item > span:first-of-type { flex: 1; min-width: 0; }
.list .item span { color: var(--ink-3); font-size: 13px; display: block; }
.list .item .right { margin-left: auto; color: var(--ink-2); font-size: 13px; text-align: right; flex: none; }
.list .item .chev { color: var(--ink-3); width: 16px; height: 16px; }
.pkg { display: flex; align-items: center; gap: 12px; padding: 16px; width: 100%; text-align: left; margin-top: 10px; }
.pkg .amt { font: 800 24px/1 var(--display); min-width: 64px; }
.pkg .amt small { display: block; font: 600 12px/1.3 var(--text); color: var(--ink-3); }
.pkg .pay { margin-left: auto; display: flex; gap: 8px; }
.pkg .pay .btn { height: 40px; padding: 0 12px; font-size: 14px; }
.pkg.best { box-shadow: inset 0 0 0 1.5px var(--volt); }
.led { display: flex; justify-content: space-between; gap: 10px; padding: 12px 0; box-shadow: inset 0 -1px 0 var(--line); font-size: 14px; }
.led b { font: 700 15px/1.3 var(--display); }
.led .plus { color: var(--volt); }
.led span { display: block; color: var(--ink-3); font-size: 12px; }

/* ------------------------------------------------------------------ колесо */
.wheel-box { position: relative; width: min(84vw, 340px); aspect-ratio: 1; margin: 18px auto 8px; }
.wheel-box svg.wheel { width: 100%; height: 100%; transition: transform 5.2s cubic-bezier(.12, .7, .14, 1); filter: drop-shadow(0 0 18px var(--volt-glow)); }
.wheel-box .pin { position: absolute; left: 50%; top: -6px; width: 26px; height: 30px; transform: translateX(-50%); z-index: 2; color: var(--volt); filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .6)); }
.prize { text-align: center; font: 800 30px/1.1 var(--display); margin: 10px 0 0; min-height: 8px; }
.odds { margin-top: 18px; padding: 4px 14px; }
.odds-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; box-shadow: inset 0 -1px 0 var(--line); font-size: 14px; }
.odds-row:last-child { box-shadow: none; }
.odds-row.head { color: var(--ink-2); font-weight: 600; justify-content: space-between; }
.odds-row b { font-weight: 600; }
.odds-row .pct { margin-left: auto; font: 600 13.5px/1 var(--text); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tier { flex: none; min-width: 96px; height: 24px; padding: 0 9px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }
.tier.common { background: var(--plate-3); color: var(--ink-2); }
.tier.rare { background: var(--volt-soft); color: var(--volt); box-shadow: inset 0 0 0 1px var(--volt-soft); }
.tier.legend { background: var(--volt); color: var(--volt-ink); }

/* ------------------------------------------------------------------ чат */
.chat-screen { display: flex; flex-direction: column; min-height: calc(100vh - var(--top) - var(--nav-h)); }
.msgs { flex: 1; padding: 8px 0 140px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 92%; font-size: 15px; line-height: 1.5; word-wrap: break-word; overflow-wrap: anywhere; }
.msg.user { align-self: flex-end; background: var(--plate-3); padding: 10px 14px; border-radius: 16px 16px 4px 16px; white-space: pre-wrap; }
.msg.bot { align-self: flex-start; padding: 0 2px; }
.msg.bot .who { display: flex; align-items: center; gap: 8px; font: 700 13px/1 var(--display); color: var(--ink-2); margin-bottom: 6px; }
.msg.bot .who svg { width: 18px; height: 18px; }
.msg .note { color: var(--ink-3); font-size: 12px; margin-top: 6px; }
.md p { margin: 0 0 10px; }
.md p:last-child { margin-bottom: 0; }
.md h1, .md h2, .md h3, .md h4 { font: 700 16px/1.3 var(--display); margin: 14px 0 8px; }
.md ul, .md ol { margin: 0 0 10px; padding-left: 22px; }
.md li { margin: 3px 0; }
.md code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; background: var(--plate-3); padding: 1px 5px; border-radius: 5px; }
.md pre { background: var(--plate); box-shadow: inset 0 0 0 1px var(--line); padding: 12px; border-radius: 10px; overflow-x: auto; margin: 0 0 10px; }
.md pre code { background: none; padding: 0; font-size: 12.5px; line-height: 1.5; }
.md blockquote { margin: 0 0 10px; padding: 2px 0 2px 12px; border-left: 3px solid var(--volt); color: var(--ink-2); }
.md table { border-collapse: collapse; font-size: 13px; margin: 0 0 10px; display: block; overflow-x: auto; max-width: 100%; }
.md th, .md td { padding: 6px 10px; box-shadow: inset 0 -1px 0 var(--line); text-align: left; white-space: nowrap; }
.md th { color: var(--ink-2); font-weight: 600; }
.md hr { border: 0; height: 1px; background: var(--line-2); margin: 14px 0; }
.md a { word-break: break-all; }
.cursor::after { content: ""; display: inline-block; width: 8px; height: 15px; margin-left: 3px; vertical-align: -2px; background: var(--volt); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.composer {
  position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--bottom)); z-index: 30;
  padding: 8px var(--gutter) 10px; background: linear-gradient(transparent, var(--void) 30%);
}
.composer .box { max-width: 528px; margin: 0 auto; display: flex; align-items: flex-end; gap: 8px; padding: 6px;
  border-radius: 18px; background: var(--plate); box-shadow: inset 0 0 0 1px var(--line-2); }
.composer textarea { min-height: 40px; max-height: 140px; padding: 9px 6px; background: none; box-shadow: none; }
.composer .attach, .composer .send { width: 40px; height: 40px; border-radius: 13px; flex: none; display: grid; place-items: center; color: var(--ink-2); }
.composer .send { background: var(--volt); color: var(--volt-ink); }
.composer .send:disabled { opacity: .4; }
.composer svg { width: 20px; height: 20px; }
.composer .thumbs { display: flex; gap: 6px; max-width: 528px; margin: 0 auto 6px; }
.composer .thumbs .slot { width: 54px; height: 54px; }
.modelbar { display: flex; align-items: center; gap: 8px; padding: 2px 0 8px; position: sticky; top: calc(var(--top) + 58px); z-index: 19; background: var(--void); }
.modelbar .chip { height: 32px; font-size: 13px; }

/* ------------------------------------------------------------------ прочее */
.empty { text-align: center; padding: 40px 20px; color: var(--ink-2); }
.empty svg { width: 54px; height: 54px; color: var(--ink-3); margin: 0 auto 12px; }
.empty b { display: block; font: 700 18px/1.3 var(--display); color: var(--ink); margin-bottom: 6px; }
.empty .btn { margin-top: 16px; }
.preview-big { position: relative; border-radius: var(--r); overflow: hidden; background: var(--plate-2); aspect-ratio: 3 / 4; max-height: 52vh; margin: 0 auto; }
.preview-big img, .preview-big video { width: 100%; height: 100%; object-fit: cover; }
.kv { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--ink-2); font-size: 13px; margin-top: 8px; }
.note-box { padding: 12px 14px; border-radius: var(--r); background: var(--volt-soft); color: var(--ink); font-size: 13.5px; margin-top: 14px; }
.note-box.warn { background: rgba(255, 106, 85, .1); }
.skeleton { background: linear-gradient(90deg, var(--plate) 0%, var(--plate-2) 50%, var(--plate) 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: var(--r); }
@keyframes shimmer { to { background-position: -200% 0; } }
.voice-row { display: flex; align-items: center; gap: 10px; }
.voice-row .play { width: 34px; height: 34px; border-radius: 17px; display: grid; place-items: center; background: var(--plate-3); color: var(--volt); flex: none; }
.voice-row .play svg { width: 16px; height: 16px; }
.boot { min-height: 80vh; display: grid; place-items: center; text-align: center; padding: 30px; }
.boot svg { width: 86px; height: 86px; margin: 0 auto 16px; }
.boot .ring { stroke-dasharray: 260; stroke-dashoffset: 260; animation: ignite 1.1s ease forwards .1s; }
@keyframes ignite { to { stroke-dashoffset: 0; } }
.boot p { color: var(--ink-2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .wheel-box svg.wheel { transition-duration: 1.2s !important; }
}
@media (min-width: 600px) { .banner { flex-basis: 520px; } }
