/* IbraBet · мини-апп · v0.3 «Фирменный синий IbraBet»
   Концепция: обложки канала IbraBet - королевский синий градиент, диагональные блики, белый логотип IBRA BET,
   золото = деньги, главная кнопка и Премиум; цифры - как на табло. Зелёный/красный только как смысл (заход/риск).
   Офлайн: системные шрифты, никаких внешних библиотек. Правило проекта: без длинных тире. */
:root {
  --night: #050c2a;
  --night-2: #0a1a52;
  --night-3: #11266e;
  --royal: #1f55e6;           /* фирменный синий обложек IbraBet */
  --glass: rgba(140, 175, 255, 0.08);
  --glass-2: rgba(140, 175, 255, 0.14);
  --edge: rgba(160, 190, 255, 0.16);
  --edge-2: rgba(160, 190, 255, 0.3);
  --ink: #f1f5ff;
  --mute: #9aabdb;
  --dim: #5f71a8;
  --flood: #8cc8ff;           /* холодный блик: AI и сканирование */
  --flood-glow: rgba(140, 200, 255, 0.5);
  --gold: #ffc53d;
  --gold-2: #ff9f1c;
  --gold-hi: #ffe39a;
  --gold-glow: rgba(255, 176, 46, 0.5);
  --win: #2ee59d;
  --warn: #ffb547;
  --loss: #ff4d6d;
  --r-xl: 24px;
  --r-lg: 18px;
  --r-md: 14px;
  --r-sm: 10px;
  --display: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --led: "SF Mono", ui-monospace, Menlo, "Roboto Mono", Consolas, monospace;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--night);
  color: var(--ink);
  font-family: var(--text);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
/* Фон как у обложек канала: королевский синий, диагональные блики слева сверху */
body::before {
  content: "";
  position: fixed; inset: 0;
  background:
    linear-gradient(118deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,0) 22%),
    repeating-linear-gradient(118deg, transparent 0 120px, rgba(255,255,255,.035) 120px 128px, transparent 128px 230px),
    radial-gradient(90% 50% at 0% 0%, rgba(47,107,255,.65), transparent 65%),
    radial-gradient(80% 45% at 100% 100%, rgba(31,85,230,.4), transparent 70%),
    linear-gradient(180deg, #0c2378 0%, #081750 40%, var(--night) 100%);
  pointer-events: none; z-index: 0;
}
body::after { content: none; }
.app { position: relative; z-index: 1; max-width: 480px; margin: 0 auto; padding: 14px max(16px, env(safe-area-inset-left, 0px)) calc(32px + var(--safe-b)) max(16px, env(safe-area-inset-right, 0px)); display: grid; gap: 14px; }
.app > * { min-width: 0; } /* иначе строка чипов раздвигает сетку шире экрана */
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--flood); outline-offset: 3px; }
a { color: inherit; }
.hidden { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.mute { color: var(--mute); }

/* ── Шапка ── */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
/* Медальон как на аватарке канала: золото с тёмным центром */
.logo {
  position: relative; width: 42px; height: 42px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #fff2b8, var(--gold) 45%, #b9780a 100%);
  box-shadow: 0 0 22px rgba(255,176,46,.45), inset 0 -2px 4px rgba(0,0,0,.35);
}
.logo::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #1b3a9e, #08154a); box-shadow: inset 0 0 0 1.5px rgba(255,220,130,.8); }
.logo svg { position: relative; z-index: 1; }
.brand-name { font-family: var(--display); font-weight: 900; font-style: italic; letter-spacing: .02em; font-size: 19px; line-height: 1; }
.brand-name span { color: var(--gold); }
.tier-chip {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 5px;
  font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 99px; background: var(--glass); border: 1px solid var(--edge); color: var(--mute);
}
.tier-chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.tier-chip.t1 { color: var(--flood); border-color: rgba(124,232,255,.4); }
.tier-chip.t2 { color: #d9e2ff; border-color: rgba(217,226,255,.45); }
.tier-chip.t3 { color: var(--gold); border-color: rgba(255,197,61,.55); background: rgba(255,197,61,.08); }

/* Табло лимита */
.board {
  flex: none; display: grid; justify-items: center; gap: 3px; padding: 8px 12px 7px; border-radius: 14px;
  background: linear-gradient(180deg, #0a0f24, #05081a); border: 1px solid var(--edge-2);
  box-shadow: inset 0 0 18px rgba(0,0,0,.6), 0 0 0 1px rgba(0,0,0,.4);
}
.board-digits { font-family: var(--led); font-weight: 800; font-size: 21px; line-height: 1; letter-spacing: .04em; color: var(--gold); text-shadow: 0 0 10px var(--gold-glow), 0 0 2px var(--gold); }
.board-digits small { font-size: 13px; color: rgba(255,197,61,.45); text-shadow: none; }
.board.low .board-digits { color: var(--warn); }
.board.out .board-digits { color: var(--loss); text-shadow: 0 0 10px rgba(255,77,109,.55); }
.board-lbl { font-size: 8.5px; font-weight: 800; letter-spacing: .16em; color: var(--dim); text-transform: uppercase; }

/* Пакет активен */
.pack-bar {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-lg);
  border: 1px solid rgba(255,197,61,.4); background: linear-gradient(100deg, rgba(255,197,61,.14), rgba(255,197,61,.03));
  box-shadow: 0 0 24px -8px var(--gold-glow);
}
.pack-bar b { color: var(--gold-hi); }
.pack-bar .mute { font-size: 12.5px; }

/* ── Герой ── */
.hero { position: relative; display: grid; gap: 8px; padding-top: 4px; isolation: isolate; }
.hero::before {
  content: "IBRA\A BET"; white-space: pre; position: absolute; right: -18px; top: -14px; z-index: -1;
  font-family: var(--display); font-weight: 900; font-size: 92px; line-height: .82; letter-spacing: -0.04em;
  color: transparent; -webkit-text-stroke: 1.5px rgba(255,255,255,.07); pointer-events: none;
}
.eyebrow { font-size: 10.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--flood); display: inline-flex; align-items: center; gap: 8px; }
.eyebrow::before { content: ""; width: 18px; height: 2px; background: var(--flood); box-shadow: 0 0 8px var(--flood); border-radius: 2px; }
.hero h1 {
  margin: 0; font-family: var(--display); font-weight: 900; font-style: italic; text-transform: uppercase;
  font-size: 31px; line-height: .98; letter-spacing: -0.01em; text-wrap: balance;
}
.hero h1 .gold { background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 14px rgba(255,176,46,.35)); }
.hero p { margin: 0; color: var(--mute); font-size: 14.5px; max-width: 34ch; }
.proof { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.proof span { font-size: 11.5px; font-weight: 650; color: #c3ccef; padding: 5px 9px; border-radius: 99px; background: var(--glass); border: 1px solid var(--edge); }

/* ── Анализатор: карточка с бегущей подсветкой по контуру ── */
.analyzer {
  position: relative; border-radius: var(--r-xl); padding: 14px; isolation: isolate;
  background: linear-gradient(180deg, rgba(20,44,130,.82), rgba(8,22,80,.92));
  box-shadow: 0 20px 50px -20px rgba(0,0,0,.8), 0 0 40px -14px rgba(124,232,255,.35);
}
.analyzer::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; z-index: -1;
  background: conic-gradient(from var(--spin, 0deg), rgba(124,232,255,0) 0deg, var(--flood) 60deg, rgba(124,232,255,0) 120deg, rgba(255,197,61,0) 180deg, var(--gold) 240deg, rgba(255,197,61,0) 300deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spinb 6s linear infinite;
}
.analyzer.busy::before { animation-duration: 1.4s; }
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spinb { to { --spin: 360deg; } }

.drop {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 168px; padding: 20px; text-align: center; cursor: pointer; border-radius: var(--r-lg);
  border: 1.5px dashed rgba(124,232,255,.35);
  background: radial-gradient(70% 80% at 50% 0%, rgba(124,232,255,.10), transparent 70%), rgba(5,9,23,.5);
  transition: border-color .2s, background-color .2s, transform .15s;
}
.drop:active { transform: scale(.99); }
.drop.drag { border-color: var(--flood); background-color: rgba(124,232,255,.08); }
.drop input { display: none; }
.drop-ico {
  width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; color: var(--flood);
  background: radial-gradient(circle at 50% 30%, rgba(124,232,255,.25), rgba(124,232,255,.05));
  border: 1px solid rgba(124,232,255,.4); box-shadow: 0 0 26px rgba(124,232,255,.3);
  animation: breathe 2.8s ease-in-out infinite;
}
@keyframes breathe { 50% { box-shadow: 0 0 40px rgba(124,232,255,.55); transform: translateY(-2px); } }
.drop-title { font-weight: 800; font-size: 17px; }
.drop-sub { font-size: 12.5px; color: var(--mute); }

.preview { position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--edge-2); background: #000; }
.preview img { display: block; width: 100%; max-height: 300px; object-fit: contain; }
.preview .swap { position: absolute; top: 10px; right: 10px; font-size: 12px; font-weight: 750; padding: 7px 11px; border-radius: 99px; background: rgba(5,9,23,.78); border: 1px solid var(--edge-2); backdrop-filter: blur(6px); }
.preview .ok-tag { position: absolute; left: 10px; top: 10px; font-size: 11px; font-weight: 800; padding: 6px 10px; border-radius: 99px; background: rgba(46,229,157,.16); color: var(--win); border: 1px solid rgba(46,229,157,.4); backdrop-filter: blur(6px); }
/* Сканирование лучом прожектора */
.scan { position: absolute; inset: 0; pointer-events: none; }
.scan::before {
  content: ""; position: absolute; left: -10%; right: -10%; height: 90px; top: -90px;
  background: linear-gradient(180deg, transparent, rgba(124,232,255,.22) 65%, rgba(220,250,255,.95) 97%, transparent);
  box-shadow: 0 0 30px rgba(124,232,255,.6);
  animation: scan 1.5s cubic-bezier(.5,0,.5,1) infinite;
}
.scan::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(124,232,255,.09) 1px, transparent 1px) 0 0 / 100% 12px, linear-gradient(90deg, rgba(124,232,255,.06) 1px, transparent 1px) 0 0 / 12px 100%, rgba(5,9,23,.3); }
@keyframes scan { to { top: 100%; } }

.label { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin: 14px 2px 8px; }
.chips { display: flex; gap: 7px; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; font-size: 13px; font-weight: 700; padding: 8px 13px; border-radius: 99px; background: var(--glass); border: 1px solid var(--edge); color: #b7c2ea; cursor: pointer; transition: .15s; }
.chip[aria-pressed="true"] { color: var(--night); background: var(--flood); border-color: var(--flood); box-shadow: 0 0 16px var(--flood-glow); }
.mode-hint { font-size: 12px; color: var(--mute); margin: 6px 2px 0; min-height: 17px; }

/* Кнопки */
.btn {
  position: relative; width: 100%; display: flex; align-items: center; justify-content: center; gap: 9px; overflow: hidden;
  min-height: 58px; padding: 0 18px; border-radius: var(--r-lg); font-family: var(--display); font-weight: 900; font-size: 16.5px; letter-spacing: .02em;
  transition: transform .12s, opacity .2s, box-shadow .25s, filter .2s;
}
.btn:active { transform: scale(.985); }
.btn-gold {
  color: #241500;
  background: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold) 38%, var(--gold-2) 100%);
  box-shadow: 0 14px 34px -10px var(--gold-glow), 0 0 0 1px rgba(255,220,140,.5) inset, 0 2px 0 rgba(255,255,255,.55) inset;
  text-transform: uppercase; font-style: italic;
}
.btn-gold::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.65) 50%, transparent 65%) -150% 0 / 200% 100% no-repeat;
  animation: shine 3s ease-in-out infinite;
}
@keyframes shine { 55%, 100% { background-position: 250% 0; } }
.btn-gold:disabled { filter: grayscale(.85) brightness(.55); box-shadow: none; cursor: default; }
.btn-gold:disabled::after { display: none; }
.btn-flood { color: var(--night); background: linear-gradient(180deg, #c5f6ff, var(--flood)); box-shadow: 0 12px 30px -10px var(--flood-glow); text-transform: uppercase; font-style: italic; }
.btn-ghost { background: var(--glass); border: 1px solid var(--edge-2); min-height: 50px; font-family: var(--text); font-size: 14.5px; font-weight: 750; }
.cta-wrap { margin-top: 12px; }

.quota-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; font-size: 13px; color: var(--mute); }
.quota-line b { color: var(--ink); }
.segs { display: flex; gap: 5px; }
.seg { width: 22px; height: 6px; border-radius: 3px; background: var(--edge-2); }
.seg.on { background: var(--gold); box-shadow: 0 0 10px var(--gold-glow); }
.bar { height: 6px; border-radius: 3px; background: var(--edge-2); overflow: hidden; width: 110px; flex: none; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-2), var(--gold)); border-radius: inherit; box-shadow: 0 0 10px var(--gold-glow); transition: width .6s; }

/* Шаги анализа — «крутяшки» */
.steps { list-style: none; padding: 0; margin: 14px 2px 0; display: grid; gap: 10px; }
.steps li { display: flex; align-items: center; gap: 11px; font-size: 14px; color: var(--dim); transition: color .3s; }
.steps li .st { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--edge-2); display: grid; place-items: center; flex: none; }
.steps li.run { color: var(--ink); }
.steps li.run .st { border-color: var(--flood); border-top-color: transparent; animation: spin .7s linear infinite; box-shadow: 0 0 12px var(--flood-glow); }
.steps li.ok { color: var(--mute); }
.steps li.ok .st { border-color: var(--flood); background: var(--flood); color: var(--night); box-shadow: 0 0 10px var(--flood-glow); }
@keyframes spin { to { transform: rotate(360deg); } }

.banner { font-size: 12.5px; padding: 10px 12px; border-radius: var(--r-md); background: rgba(255,181,71,.1); border: 1px solid rgba(255,181,71,.35); color: #ffd79a; }

/* ── Прогноз ── */
.result {
  position: relative; border-radius: var(--r-xl); padding: 16px; overflow: hidden;
  background: radial-gradient(90% 60% at 100% 0%, rgba(255,197,61,.16), transparent 60%), linear-gradient(180deg, #14307f, #0a1a55);
  border: 1px solid rgba(255,197,61,.35);
  box-shadow: 0 0 44px -14px var(--gold-glow), 0 24px 50px -24px rgba(0,0,0,.9);
  animation: rise .5s cubic-bezier(.2,.8,.2,1);
}
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.res-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.res-brand { font-family: var(--display); font-weight: 900; font-style: italic; letter-spacing: .1em; font-size: 12px; color: var(--gold); text-transform: uppercase; }
.sport { font-size: 11px; font-weight: 750; padding: 4px 9px; border-radius: 99px; background: var(--glass); border: 1px solid var(--edge); white-space: nowrap; }
.res-event { margin-top: 10px; font-weight: 800; font-size: 16px; line-height: 1.25; }
.res-league { font-size: 12.5px; color: var(--mute); margin-top: 2px; }
.res-mode { font-size: 12px; color: var(--flood); margin-top: 8px; font-weight: 650; }
.ticket {
  position: relative; margin: 14px 0; padding: 14px 14px 14px 16px; border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(5,9,23,.75), rgba(5,9,23,.45)); border: 1px solid var(--edge-2);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.ticket::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--gold); box-shadow: 0 0 12px var(--gold-glow); }
.ticket-lbl { font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.ticket-market { font-family: var(--display); font-weight: 900; font-size: 24px; line-height: 1.1; letter-spacing: -0.01em; margin-top: 3px; }
.odds-led { flex: none; text-align: center; padding: 8px 10px; border-radius: 12px; background: #04071a; border: 1px solid rgba(255,197,61,.35); box-shadow: inset 0 0 14px rgba(0,0,0,.7); }
.odds-led b { display: block; font-family: var(--led); font-size: 22px; font-weight: 800; color: var(--gold); text-shadow: 0 0 10px var(--gold-glow); line-height: 1; }
.odds-led span { font-size: 8.5px; letter-spacing: .16em; color: var(--dim); font-weight: 800; }

.verdict { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: .04em; font-size: 14px; padding: 8px 12px; border-radius: 12px; }
.verdict.bet { color: var(--win); background: rgba(46,229,157,.12); border: 1px solid rgba(46,229,157,.45); box-shadow: 0 0 18px -4px rgba(46,229,157,.5); }
.verdict.caution { color: var(--warn); background: rgba(255,181,71,.12); border: 1px solid rgba(255,181,71,.45); }
.verdict.skip { color: var(--loss); background: rgba(255,77,109,.12); border: 1px solid rgba(255,77,109,.45); }

.metrics { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: center; }
.gauge { position: relative; width: 100%; max-width: 168px; }
.gauge svg { display: block; width: 100%; height: auto; overflow: visible; }
.gauge .g-val { position: absolute; left: 0; right: 0; bottom: 2px; text-align: center; }
.gauge .g-num { font-family: var(--led); font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.gauge .g-lbl { font-size: 9.5px; color: var(--mute); letter-spacing: .12em; text-transform: uppercase; margin-top: 3px; font-weight: 750; }
.side { display: grid; gap: 8px; min-width: 0; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; padding: 5px 10px; border-radius: 99px; width: fit-content; }
.pill.low { color: var(--win); background: rgba(46,229,157,.12); }
.pill.mid { color: var(--warn); background: rgba(255,181,71,.13); }
.pill.high { color: var(--loss); background: rgba(255,77,109,.13); }
.stake { font-size: 12.5px; color: var(--mute); }
.stake b { color: var(--ink); }
.reasons { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.reasons li { display: flex; gap: 11px; font-size: 14px; color: #d3daf5; }
.reasons .ri { flex: none; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: rgba(124,232,255,.1); color: var(--flood); border: 1px solid rgba(124,232,255,.25); }
.alt { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--edge-2); font-size: 13px; color: var(--mute); }
.alt b { color: var(--ink); }
.disclaimer { font-size: 11px; color: var(--dim); margin-top: 10px; }
.res-actions { margin-top: 14px; }

/* ── Апселл ── */
.nudge {
  display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: var(--r-lg);
  background: linear-gradient(100deg, rgba(124,232,255,.12), rgba(124,232,255,.02)); border: 1px solid rgba(124,232,255,.35);
}
.nudge .n-ico { flex: none; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: rgba(124,232,255,.15); font-size: 20px; }
.nudge .n-txt { flex: 1; min-width: 0; font-size: 13px; color: var(--mute); }
.nudge .n-txt b { display: block; font-size: 14.5px; color: var(--ink); }
.nudge .n-go { flex: none; font-weight: 900; font-size: 13px; padding: 10px 13px; border-radius: 11px; color: #241500; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); box-shadow: 0 6px 18px -6px var(--gold-glow); }

/* ── Лимит ── */
.lock { position: relative; text-align: center; padding: 24px 18px 20px; border-radius: var(--r-xl); background: radial-gradient(80% 60% at 50% 0%, rgba(255,77,109,.16), transparent 70%), linear-gradient(180deg, #14307f, #0a1a55); border: 1px solid rgba(255,77,109,.35); }
.lock-ico { width: 58px; height: 58px; margin: 0 auto 12px; border-radius: 18px; display: grid; place-items: center; background: rgba(255,77,109,.12); color: var(--loss); border: 1px solid rgba(255,77,109,.4); box-shadow: 0 0 24px rgba(255,77,109,.3); }
.lock h2 { margin: 0 0 6px; font-family: var(--display); font-weight: 900; font-style: italic; text-transform: uppercase; font-size: 21px; line-height: 1.05; text-wrap: balance; }
.lock p { margin: 0 0 16px; color: var(--mute); font-size: 14px; }
.lock p b { color: var(--ink); }
.lock .stack { display: grid; gap: 10px; }
.timer { font-family: var(--led); font-size: 26px; font-weight: 800; color: var(--gold); text-shadow: 0 0 12px var(--gold-glow); margin: -4px 0 16px; letter-spacing: .04em; }

/* ── Экспрессы закрытого алгоритма ── */
.algo {
  position: relative; border-radius: var(--r-xl); padding: 16px; overflow: hidden;
  background: radial-gradient(80% 70% at 0% 0%, rgba(255,197,61,.14), transparent 60%), repeating-linear-gradient(118deg, transparent 0 70px, rgba(255,255,255,.03) 70px 76px, transparent 76px 140px), linear-gradient(180deg, #13307f, #0a1a55);
  border: 1px solid rgba(255,197,61,.28);
}
.algo h2 { margin: 6px 0 6px; font-family: var(--display); font-weight: 900; font-style: italic; text-transform: uppercase; font-size: 22px; line-height: 1.02; text-wrap: balance; }
.algo h2 .gold { color: var(--gold); text-shadow: 0 0 16px rgba(255,176,46,.35); }
.algo > p { margin: 0 0 12px; color: var(--mute); font-size: 13.5px; }
.algo-points { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 9px; }
.algo-points li { display: flex; gap: 10px; font-size: 13.5px; color: #d3daf5; }
.algo-points .ap { flex: none; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: rgba(255,197,61,.12); color: var(--gold); border: 1px solid rgba(255,197,61,.3); font-size: 12px; font-weight: 900; }
.slip { position: relative; border-radius: var(--r-lg); border: 1px solid var(--edge-2); background: rgba(4,7,26,.7); padding: 12px 14px; margin-bottom: 14px; }
.slip-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 6px 0; border-bottom: 1px dashed var(--edge); }
.slip-row:last-of-type { border-bottom: 0; }
.slip-row span:first-child { filter: blur(5px); user-select: none; color: #c3ccef; }
.slip-row .k { font-family: var(--led); color: var(--gold); font-weight: 800; }
.slip-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--edge-2); font-size: 12px; color: var(--mute); }
.slip-total b { font-family: var(--led); font-size: 20px; color: var(--gold); text-shadow: 0 0 10px var(--gold-glow); }
.slip-lock { position: absolute; inset: 0; display: grid; place-items: center; border-radius: inherit; background: linear-gradient(180deg, rgba(5,9,23,0) 0%, rgba(5,9,23,.35) 100%); }
.slip-lock span { font-size: 12px; font-weight: 800; padding: 7px 12px; border-radius: 99px; background: rgba(5,9,23,.85); border: 1px solid rgba(255,197,61,.45); color: var(--gold-hi); box-shadow: 0 0 20px -4px var(--gold-glow); }
.example { position: absolute; top: 10px; right: 12px; font-size: 9px; letter-spacing: .14em; font-weight: 800; color: var(--dim); text-transform: uppercase; }

/* ── Мои прогнозы (отыгрыш) ── */
.hist { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.hist li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-md); background: rgba(5,12,42,.45); border: 1px solid var(--edge); }
.hist .h-t { flex: 1; min-width: 0; font-size: 13px; }
.hist .h-t b { display: block; font-size: 14px; }
.hist .h-t span { color: var(--mute); }
.hist .h-act { flex: none; display: flex; gap: 6px; }
.hist .h-act button { font-size: 12px; font-weight: 800; padding: 7px 9px; border-radius: 9px; background: var(--glass-2); border: 1px solid var(--edge-2); }
.hist .h-res { flex: none; font-size: 12px; font-weight: 800; }
.hist .h-res.won { color: var(--win); } .hist .h-res.lost { color: var(--loss); }
.hint-line { font-size: 12.5px; color: var(--mute); margin-top: 8px; }
.algo-stat { display: inline-flex; align-items: center; gap: 8px; margin: 2px 0 12px; font-size: 12.5px; font-weight: 750; padding: 6px 10px; border-radius: 99px; color: var(--win); background: rgba(46,229,157,.1); border: 1px solid rgba(46,229,157,.35); }
.toggle.three { grid-template-columns: 1fr 1fr 1fr; }

/* ── Лестница ── */
.card { border-radius: var(--r-xl); padding: 16px; background: linear-gradient(180deg, rgba(20,44,130,.55), rgba(8,22,80,.55)); border: 1px solid var(--edge); }
.ladder { list-style: none; margin: 12px 0 0; padding: 0; position: relative; }
.ladder::before { content: ""; position: absolute; left: 17px; top: 20px; bottom: 20px; width: 2px; background: linear-gradient(180deg, var(--flood), var(--edge-2) 40%, rgba(255,197,61,.5)); opacity: .6; }
.rung { position: relative; display: flex; gap: 12px; padding: 9px 0; }
.rung .rb { position: relative; z-index: 1; flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-family: var(--led); font-weight: 800; font-size: 14px; background: var(--night-2); border: 1.5px solid var(--edge-2); color: var(--dim); }
.rung.done .rb { background: var(--flood); border-color: var(--flood); color: var(--night); }
.rung.cur .rb { border-color: var(--flood); color: var(--flood); box-shadow: 0 0 0 4px rgba(124,232,255,.12), 0 0 20px var(--flood-glow); }
.rung.vip .rb { border-color: rgba(255,197,61,.6); color: var(--gold); }
.rung.vip.cur .rb, .rung.vip.done .rb { background: var(--gold); color: #241500; border-color: var(--gold); box-shadow: 0 0 20px var(--gold-glow); }
.rung .rt { flex: 1; min-width: 0; }
.rung .rn { font-weight: 850; font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rung .rd { font-size: 13px; color: var(--mute); margin-top: 2px; }
.rung .rp { font-size: 12px; margin-top: 6px; display: flex; align-items: center; gap: 8px; color: var(--mute); }
.tag { font-size: 9.5px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; padding: 3px 7px; border-radius: 6px; }
.tag.flood { background: rgba(124,232,255,.14); color: var(--flood); }
.tag.gold { background: rgba(255,197,61,.15); color: var(--gold); }

/* Канал */
.channel { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.channel .c-ico { flex: none; width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; background: linear-gradient(140deg, #3db4ff, #1a6fd9); color: #fff; box-shadow: 0 0 22px -4px rgba(61,180,255,.6); }
.channel .c-txt { flex: 1; min-width: 0; font-size: 13px; color: var(--mute); }
.channel .c-txt b { display: block; color: var(--ink); font-size: 15px; }
.channel .c-bonus { flex: none; font-size: 11px; font-weight: 900; padding: 5px 8px; border-radius: 8px; background: rgba(255,197,61,.15); color: var(--gold); border: 1px solid rgba(255,197,61,.35); }

.foot { text-align: center; font-size: 11.5px; color: var(--dim); }
.foot .age { display: inline-block; font-weight: 900; border: 1px solid var(--edge-2); border-radius: 6px; padding: 1px 5px; margin-right: 6px; color: var(--mute); }

/* ── Лист апгрейда ── */
.scrim { position: fixed; inset: 0; background: rgba(2,4,12,.7); backdrop-filter: blur(4px); z-index: 20; opacity: 0; pointer-events: none; transition: opacity .25s; }
.scrim.on { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; max-width: 480px; margin: 0 auto; max-height: 92vh; overflow-y: auto; overscroll-behavior: contain;
  background: radial-gradient(80% 30% at 50% 0%, rgba(140,200,255,.16), transparent 70%), linear-gradient(180deg, #14307f, #071443);
  border: 1px solid var(--edge-2); border-bottom: 0; border-radius: 28px 28px 0 0;
  padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(18px + var(--safe-b)) max(16px, env(safe-area-inset-left, 0px));
  transform: translateY(105%); transition: transform .38s cubic-bezier(.2,.8,.2,1);
  box-shadow: 0 -20px 60px rgba(0,0,0,.6);
}
.sheet.on { transform: none; }
.grab { width: 40px; height: 5px; border-radius: 3px; background: var(--edge-2); margin: 0 auto 14px; }
.sheet h2 { margin: 0 0 4px; font-family: var(--display); font-weight: 900; font-style: italic; text-transform: uppercase; font-size: 23px; line-height: 1.05; padding-right: 40px; text-wrap: balance; }
.sheet .sub { color: var(--mute); font-size: 13.5px; margin: 0 0 14px; }
.close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; background: var(--glass-2); display: grid; place-items: center; color: var(--mute); }
.toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(0,0,0,.35); border: 1px solid var(--edge); margin-bottom: 16px; }
.toggle button { position: relative; padding: 10px 6px; border-radius: 10px; font-weight: 800; font-size: 13.5px; color: var(--mute); }
.toggle button[aria-pressed="true"] { background: var(--glass-2); color: var(--ink); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 0 1px var(--edge-2); }
.toggle .save { position: absolute; top: -9px; right: 6px; font-size: 9.5px; font-weight: 900; padding: 2px 6px; border-radius: 6px; background: var(--win); color: #03210f; }
.plans { display: grid; gap: 12px; margin-bottom: 14px; }
.plan { position: relative; text-align: left; width: 100%; padding: 14px; border-radius: var(--r-lg); background: var(--glass); border: 1.5px solid var(--edge); transition: border-color .2s, background .2s, box-shadow .2s; }
.plan[aria-checked="true"] { border-color: var(--flood); background: rgba(124,232,255,.07); box-shadow: 0 0 26px -10px var(--flood-glow); }
.plan.vip { background: linear-gradient(180deg, rgba(255,197,61,.08), rgba(255,197,61,.02)); }
.plan.vip[aria-checked="true"] { border-color: var(--gold); box-shadow: 0 0 30px -8px var(--gold-glow); }
.plan.off { opacity: .42; }
.plan .ph { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.plan .pn { font-family: var(--display); font-weight: 900; font-style: italic; text-transform: uppercase; font-size: 16px; letter-spacing: .01em; }
.plan .ptag { display: block; font-family: var(--text); font-style: normal; text-transform: none; font-size: 12px; color: var(--mute); font-weight: 600; margin-top: 2px; letter-spacing: 0; }
.plan .pp { text-align: right; white-space: nowrap; }
.plan .pp b { font-family: var(--led); font-size: 21px; font-weight: 800; }
.plan.vip .pp b { color: var(--gold); text-shadow: 0 0 10px var(--gold-glow); }
.plan .pp s { color: var(--dim); font-size: 12px; margin-right: 4px; }
.plan .pp small { display: block; font-size: 11px; color: var(--mute); }
.plan ul { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 5px; font-size: 13px; color: #cfd7f3; }
.plan ul li { display: flex; gap: 8px; }
.plan ul li::before { content: "✓"; color: var(--flood); font-weight: 900; }
.plan.vip ul li::before { color: var(--gold); }
.plan .ribbon { position: absolute; top: -10px; left: 14px; font-size: 9.5px; font-weight: 900; letter-spacing: .1em; padding: 3px 8px; border-radius: 6px; color: #241500; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); box-shadow: 0 0 14px -2px var(--gold-glow); }
.plan .cur-tag { position: absolute; top: -10px; right: 14px; font-size: 9.5px; font-weight: 900; padding: 3px 8px; border-radius: 6px; background: var(--night-3); color: var(--mute); border: 1px solid var(--edge-2); }
.flow { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.flow li { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: var(--r-md); background: rgba(0,0,0,.25); border: 1px solid var(--edge); font-size: 13.5px; }
.flow .fn { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-family: var(--led); font-weight: 800; font-size: 12px; background: var(--glass-2); color: var(--mute); }
.flow li.ok .fn { background: var(--win); color: #03210f; box-shadow: 0 0 10px rgba(46,229,157,.5); }
.flow li.wait .fn { border: 2px solid var(--flood); border-top-color: transparent; animation: spin .8s linear infinite; background: none; color: transparent; }
.flow .ft { flex: 1; min-width: 0; }
.flow .ft small { display: block; color: var(--mute); font-size: 12px; }
.promo { flex: none; font-family: var(--led); font-weight: 800; font-size: 13px; padding: 6px 9px; border-radius: 8px; background: rgba(255,197,61,.12); color: var(--gold); border: 1px dashed rgba(255,197,61,.5); white-space: nowrap; }
#sheetCta { position: sticky; bottom: calc(6px + var(--safe-b)); z-index: 2; }
.note { font-size: 12px; color: var(--mute); text-align: center; margin-top: 10px; }

.toast { position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translate(-50%, 30px); z-index: 40; background: #17318a; border: 1px solid var(--edge-2); padding: 10px 16px; border-radius: 12px; font-size: 13.5px; font-weight: 700; opacity: 0; transition: .25s; pointer-events: none; max-width: calc(100vw - 32px); text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.dev { position: fixed; right: 8px; bottom: 8px; z-index: 50; background: #0b1230ee; border: 1px solid var(--edge-2); border-radius: 12px; padding: 8px; font-size: 11px; display: grid; gap: 5px; }
.dev button { font-size: 11px; background: var(--night-3); color: var(--ink); border: 1px solid var(--edge-2); border-radius: 6px; padding: 4px 6px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
}
@media (max-width: 360px) {
  .hero h1 { font-size: 26px; }
  .ticket-market { font-size: 20px; }
  .metrics { grid-template-columns: 1fr; }
}

/* ── v0.4 · экраны «Новый аккаунт» и «Внеси депозит» как баннеры референса ── */
.gate-banner {
  margin: -8px -4px 14px; padding: 20px 12px; border-radius: var(--r-lg); text-align: center;
  background: linear-gradient(118deg, rgba(255,255,255,.22) 0%, rgba(255,255,255,0) 30%), linear-gradient(160deg, #2f6bff, #0c2378 75%);
  border: 1px solid rgba(255,255,255,.18); box-shadow: inset 0 0 40px rgba(0,0,0,.25);
  font-family: var(--display); font-weight: 900; text-transform: uppercase; line-height: .95; font-size: 34px; letter-spacing: -0.01em;
  display: grid; gap: 2px; text-shadow: 0 4px 18px rgba(0,0,0,.35);
}
.gate-banner.dep { background: linear-gradient(118deg, rgba(255,255,255,.22) 0%, rgba(255,255,255,0) 30%), linear-gradient(160deg, #2f6bff, #0c2378 60%, #3a2a05 130%); }
.gate-banner span:last-child { color: var(--gold); }
.promo.big { display: block; width: 100%; font-size: 15px; padding: 11px 12px; margin: 0 0 14px; text-align: center; }
.gate-note { font-size: 12.5px !important; color: var(--mute); margin: 12px 0 0 !important; }
.dep-steps { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 6px; text-align: left; }
.dep-steps li { display: flex; gap: 10px; align-items: baseline; padding: 8px 12px; border-radius: var(--r-sm); background: rgba(5,12,42,.45); border: 1px solid var(--edge); font-size: 13px; }
.dep-steps b { flex: none; min-width: 64px; font-family: var(--led); color: var(--gold); }
.dep-steps li.vip { border-color: rgba(255,197,61,.4); }

[hidden], #resultStatus:empty { display: none !important; }
.history-item { display: grid; min-height: 44px; text-align: left; width: 100%; padding: 0; }
.btn:disabled { opacity: .55; cursor: default; }
#go, #lockCard, #result, #operationStatus { scroll-margin-top: 12px; }
body { min-height: var(--tg-viewport-stable-height, 100dvh); }
.sheet { max-height: min(92dvh, var(--tg-viewport-stable-height, 92dvh)); }

@media (max-width: 420px) {
  .is-gated .hero { gap: 6px; }
  .is-gated .hero h1 { font-size: 25px; }
  .is-gated .proof { display: none; }
  .is-gated .gate-banner { padding-block: 11px; font-size: 26px; }
}
