:root {
  color-scheme: dark;
  --bg: #070807;
  --panel: #101210;
  --line: #242824;
  --text: #f4f7f4;
  --muted: #8b958c;
  --green: #b6ff3c;
  --poly: #d7e4ff;
  font-family: "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

.gate {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 6vw 72px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 18% 0%, rgba(182, 255, 60, 0.07), transparent 42%),
    radial-gradient(ellipse at 88% 90%, #141814, transparent 46%),
    #070807;
}
.gate::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 78%);
  pointer-events: none;
}
.gate[hidden],
.gate form[hidden],
.sheet[hidden],
#gate-out[hidden],
.phone[hidden],
.stage-cards[hidden],
.spark[hidden] { display: none; }
#gate-out { margin-top: 12px; }
.gate-frame {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 64px;
  position: relative;
  z-index: 1;
}
.gate-inner, .gate-stage { position: relative; z-index: 1; }
.gate-inner { flex: 0 1 520px; min-width: 0; width: 100%; }
.scan-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 0;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 102, 0.4), transparent);
  box-shadow: 0 0 8px rgba(0, 255, 102, 0.3);
  animation: scan-sweep 5s ease-in-out infinite alternate;
}
@keyframes scan-sweep {
  from { top: 0; }
  to { top: calc(100% - 2px); }
}
.gate .eyebrow,
.gate h1,
.gate .lead,
.gate-points,
.gate form {
  animation: rise 0.75s ease both;
}
.gate h1 { animation-delay: 0.08s; }
.gate .lead { animation-delay: 0.16s; }
.gate-points { animation-delay: 0.24s; }
.gate form { animation-delay: 0.32s; }
.gate .eyebrow {
  margin: 0 0 16px;
  color: var(--green);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 12px;
  text-shadow: 0 0 14px rgba(182, 255, 60, 0.75);
}
.gate h1 {
  margin: 0;
  font-size: clamp(48px, 5.4vw, 76px);
  line-height: 0.9;
  letter-spacing: -0.045em;
  font-weight: 650;
  text-transform: uppercase;
  text-shadow: 0 0 28px rgba(182, 255, 60, 0.22);
}
.gate .lead {
  max-width: 28em;
  color: #c5cdc6;
  font-size: 21px;
  line-height: 1.4;
}
.gate-points { display: flex; gap: 8px; flex-wrap: wrap; margin: 26px 0 22px; align-items: center; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #2c332c;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 11px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.pill svg { width: 13px; height: 13px; }
.pill.telegram { margin-left: 6px; }
.pill:hover {
  transform: translateY(-2px) scale(1.04);
  border-color: var(--green);
  color: var(--text);
  box-shadow: 0 0 16px rgba(182, 255, 60, 0.22);
}
.pill.on {
  background: var(--green);
  color: #10140c;
  border-color: var(--green);
  box-shadow: 0 0 18px rgba(182, 255, 60, 0.32);
}
.gate form { display: grid; gap: 10px; max-width: 420px; margin-top: 28px; }
.field {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  padding: 0 8px 0 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.field input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 14px 0;
  outline: none;
}
.field input::placeholder { color: #6d766e; }
.field:focus-within {
  border-color: #b6ff3c;
  box-shadow: 0 0 0 1px #b6ff3c, 0 0 22px rgba(182, 255, 60, 0.45);
}
#gate-peek {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
#gate-peek svg { width: 18px; height: 18px; }
#gate-peek .peek-slash { opacity: 0; }
#gate-peek.on { color: var(--green); }
#gate-peek.on .peek-slash { opacity: 1; }
.sheet input {
  background: transparent;
  border: 1px solid var(--line);
  padding: 12px 14px;
}
.gate-actions, .sheet form { display: flex; gap: 10px; flex-wrap: wrap; }
.sheet button, .go, #gate-out, .gate-actions button[type="submit"] {
  background: var(--text);
  color: #070807;
  border: 0;
  padding: 12px 18px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
}
.gate-actions button {
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.gate-actions button[type="submit"]:hover,
#gate-out:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 0 18px rgba(182, 255, 60, 0.35);
}
#gate-register {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(244, 247, 244, 0.72);
  padding: 12px 18px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12px;
  cursor: pointer;
}
#gate-register:hover {
  transform: translateY(-1px) scale(1.03);
  border-color: var(--green);
  color: var(--green);
  box-shadow: 0 0 16px rgba(182, 255, 60, 0.2);
}
.gate-stage {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex: 0 1 440px;
  width: min(440px, 100%);
  min-height: 420px;
  padding: 32px;
  border: 1px solid rgba(182, 255, 60, 0.72);
  border-radius: 14px;
  background: rgba(8, 10, 8, 0.55);
  animation: stage-in 0.85s ease 0.22s both;
}
.stage-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  color: var(--muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 11px;
  margin-bottom: 22px;
}
.stage-live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(182, 255, 60, 0.7); }
  50% { transform: scale(0.8); box-shadow: 0 0 0 7px rgba(182, 255, 60, 0); }
}
@keyframes stage-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.spark {
  display: block;
  width: 148px;
  height: 34px;
  margin: 0 auto 14px;
  overflow: hidden;
}
.spark.is-off { display: none; }
.spark polyline {
  fill: none;
  stroke: var(--green);
  stroke-width: 1.6;
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
  filter: drop-shadow(0 0 3px rgba(182, 255, 60, 0.45));
  animation: draw 1.6s ease-out 0.35s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
.odds-card {
  width: 100%;
  border: 0;
  background: none;
  padding: 0;
}
.odds-mid {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 8px;
  padding-bottom: 18px;
}
.odds-mid b { font-size: 18px; font-weight: 600; letter-spacing: 0.01em; }
.odds-mid .roi {
  color: #b6ff3c;
  font-size: 34px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 16px rgba(182, 255, 60, 0.45);
}
.odds-table {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  justify-items: center;
  text-align: center;
  gap: 12px 0;
  padding-top: 16px;
  border-top: 1px solid rgba(182, 255, 60, 0.22);
  font-variant-numeric: tabular-nums;
}
.odds-table span {
  display: block;
  width: 100%;
  text-align: center;
}
.odds-table span:nth-child(3n+2) { text-align: center; }
.odds-table span:nth-child(-n+3) {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.odds-table span:nth-child(n+4) { font-size: 15px; }
.phone {
  width: min(280px, 100%);
  margin-top: 8px;
  padding: 14px 12px 18px;
  border: 1px solid #2a312a;
  border-radius: 28px;
  background: #0c0e0c;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(182, 255, 60, 0.08);
}
.phone-top { display: grid; place-items: center; height: 18px; }
.phone-top i { width: 72px; height: 6px; border-radius: 99px; background: #1c221c; }
.phone-note {
  margin-top: 12px;
  padding: 12px;
  background: #141814;
  border-left: 2px solid var(--green);
  animation: rise 0.45s ease both;
}
.phone-note header { display: flex; align-items: center; gap: 8px; }
.phone-note svg { width: 16px; height: 16px; color: var(--green); }
.phone-note header span { margin-left: auto; color: var(--muted); font-size: 11px; }
.phone-note p { display: grid; gap: 3px; margin: 8px 0 0; font-size: 13px; line-height: 1.35; }
.phone-note p small { color: var(--muted); margin-top: 6px; }
.gate-error, .sheet-label { color: var(--muted); font-size: 13px; }
.gate-error { max-width: 420px; line-height: 1.45; }
.gate-foot {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 16px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.gate-note {
  margin: 0;
  max-width: 42ch;
  color: #667066;
  font-size: 11px;
  letter-spacing: 0.02em;
  line-height: 1.4;
}
.age-mark {
  flex: none;
  border: 1px solid #3a423a;
  color: #c5cdc6;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.08em;
  padding: 5px 7px;
}

.sheet {
  margin: 18px 24px 0;
  padding: 16px;
  border: 1px solid var(--line);
  display: grid;
  gap: 10px;
  animation: rise 0.35s ease both;
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.sheet-head .sheet-label { margin: 0; }
.sheet .sheet-x {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #e10600;
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(225, 6, 0, 0.4);
}
.sheet .sheet-x:hover { background: #ff241c; }
.hit-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px 4px;
  border-top: 1px solid var(--line);
}
.hit-pct {
  display: grid;
  place-items: center;
  min-width: 168px;
  min-height: 84px;
  padding: 16px 20px;
  border-radius: 12px;
  background: var(--green);
  color: #10140c;
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 0 22px rgba(182, 255, 60, 0.32);
}
.hit-body { display: grid; gap: 4px; min-width: 0; }
.hit-body strong { font-size: 18px; font-weight: 650; }
.sheet .go { justify-self: start; }
.tg-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tg-say { margin: 14px 0; font-size: 18px; }
.tg-say b { color: var(--green); }
.tg-bot {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 650;
  letter-spacing: 0.02em;
}
.tg-state {
  border: 1px solid #6e6558;
  color: #c4924a;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 7px;
}
.tg-state.on { border-color: rgba(182, 255, 60, 0.7); color: var(--green); }
.tg-floor {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 16px;
  font-weight: 650;
  cursor: pointer;
}
.tg-floor input {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--green);
  cursor: pointer;
}
.tg-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(200px, 280px);
  gap: 22px;
  align-items: start;
}
.tg-steps {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.tg-steps li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  color: #d5dcd6;
  font-size: 14px;
  line-height: 1.4;
}
.tg-steps b { color: var(--green); font-weight: 650; }
.tg-sample {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  padding: 14px 16px;
  color: #c5cdc6;
  font-size: 13px;
  line-height: 1.45;
}
.tg-sample .tg-plus { color: var(--green); font-size: 22px; }
.tg-sample b { color: var(--text); }
.tg-sample pre {
  margin: 8px 0 4px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #172033;
  color: #d7e2ea;
  font: 12px/1.45 ui-monospace, Consolas, monospace;
  white-space: pre;
}
.tg-books { color: #6ab3f3; font-size: 13px; }
.tg-site { color: #6ab3f3; font-size: 14px; }
.tg-sample strong {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.hit-body span, .hit-body small { color: var(--muted); font-size: 13px; }
.hit-card .lasted { font-style: normal; }

.row.in { animation: rise 0.45s ease both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

button, input { font: inherit; color: inherit; }

header {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--line);
}

.top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.top-tools { display: contents; }
.brand { display: flex; align-items: center; gap: 12px; }
#brand-home {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}
#brand-home:hover h1 { color: var(--green); }
h1 { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: 0.14em; text-transform: uppercase; }
#scan-time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; letter-spacing: 0.08em; }
.stake-box {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  padding: 4px 12px;
  border: 1px solid rgba(182, 255, 60, 0.55);
  box-shadow: 0 0 16px rgba(182, 255, 60, 0.14);
  color: var(--green);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.stake-box b {
  color: var(--text);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  text-transform: none;
}
.nav-tabs {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.nav-tabs .ghost {
  border: 0;
  border-radius: 0;
  border-right: 1px solid var(--line);
}
.nav-tabs .ghost:last-child { border-right: 0; }
.nav-tabs .ghost.on { background: var(--text); color: #070807; }
.icon-tools { margin-left: auto; display: flex; align-items: center; gap: 2px; }
#telegram-toggle { position: relative; }
.tg-badge {
  position: absolute;
  top: 1px;
  right: 1px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 999px;
  background: #e10600;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 0 0 2px #070807;
}
.iconbtn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.iconbtn svg { width: 16px; height: 16px; }
.iconbtn:hover, .iconbtn.on { color: var(--text); border-color: var(--line); }
#sound .slash { opacity: 0; }
#sound.muted .slash { opacity: 1; }
#sound.muted .waves { opacity: 0.2; }

.dot {
  width: 8px;
  height: 8px;
  background: var(--muted);
}
.dot.live, .dot.hit { background: var(--green); }

.tools label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.tools input {
  width: 112px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 8px 10px;
  font-variant-numeric: tabular-nums;
}

.seg { display: flex; border: 1px solid var(--line); }

.corner { position: relative; }
.corner > button.on { color: var(--text); border-color: var(--line); }
.pop {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 6;
  width: 168px;
  padding: 12px 10px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.pop.show { display: block; }
.volrow { display: flex; align-items: center; }
.muted-icon {
  width: 0;
  height: 18px;
  flex: none;
  overflow: hidden;
  color: var(--text);
  opacity: 0;
}
.muted-icon svg { display: block; width: 18px; height: 18px; }
.muted-icon .slash { stroke-dasharray: 12; stroke-dashoffset: 12; }
.muted-icon.show {
  width: 18px;
  margin-left: 8px;
  opacity: 1;
  animation: mute-pop 0.34s cubic-bezier(.2, 1.35, .32, 1);
}
.muted-icon.show .slash { animation: slash-draw 0.28s ease forwards; }
@keyframes mute-pop {
  0% { opacity: 0; transform: scale(0.35) rotate(-18deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}
@keyframes slash-draw { to { stroke-dashoffset: 0; } }
.slider {
  flex: 1;
  position: relative;
  height: 18px;
  cursor: pointer;
  touch-action: none;
}
.slider::before,
.slider span {
  position: absolute;
  left: 0;
  top: 7px;
  height: 4px;
}
.slider::before {
  content: "";
  right: 0;
  background: #3a3f3a;
}
.slider span {
  width: 0;
  background: var(--green);
}
.slider i {
  position: absolute;
  top: 1px;
  left: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--green);
}
.seg.wide {
  width: fit-content;
  gap: 8px;
  border: 0;
}
.seg.wide button {
  border: 1px solid #2c332c;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  padding: 7px 16px;
}
.seg.wide button.on {
  background: var(--green);
  color: #10140c;
  border-color: var(--green);
  box-shadow: 0 0 14px rgba(182, 255, 60, 0.28);
}
.seg button, .ghost {
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  padding: 8px 14px;
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.seg button:last-child, .ghost { border-right: 0; }
.ghost { border: 1px solid var(--line); }
.seg button.on, .ghost.on { background: var(--text); color: #070807; }

main { padding: 0 0 28px; }

.books {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  border-bottom: 1px solid var(--line);
}
.books[hidden] { display: none; }
.book {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  padding: 12px 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.book strong { font-size: 14px; font-weight: 650; }
.book span, .book em { color: var(--muted); font-style: normal; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.book em { text-align: right; }
.book.on em { color: var(--green); }
.tag {
  margin-left: 8px;
  color: var(--poly);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.board { width: 100%; }
.filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
}
.desk {
  display: flex;
  align-items: center;
  gap: 16px;
  width: fit-content;
  margin-left: auto;
}
.desk[hidden] { display: none; }
.desk-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  width: fit-content;
  flex: none;
  padding: 10px 18px;
  border: 1px solid rgba(182, 255, 60, 0.62);
  border-radius: 6px;
  background: #1a1f1a;
}
.desk-label {
  color: #d5ddd6;
  font-size: 13px;
  line-height: 1.15;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.desk-short { display: none; }
.desk-card > b,
.cycle-item > b {
  color: var(--green);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.cycle-mask { display: grid; }
.cycle-item {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.cycle-item.on { opacity: 1; transform: none; }
.desk-card small {
  color: #e8efe9;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
}
.desk-card.algo { position: relative; cursor: default; outline: none; }
.algo-pop {
  display: none;
  position: absolute;
  top: calc(100% - 1px);
  right: 0;
  z-index: 20;
  padding-top: 6px;
}
.desk-card.algo:hover .algo-pop,
.desk-card.algo:focus-within .algo-pop { display: block; }
.algo-pop ul {
  list-style: none;
  margin: 0;
  min-width: 250px;
  padding: 4px 10px;
  background: rgba(7, 8, 7, 0.96);
  border: 1px solid rgba(182, 255, 60, 0.28);
}
.algo-pop li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  border-top: 1px solid var(--line);
  font-size: 11px;
}
.algo-pop li:first-child { border-top: 0; }
.algo-pop li i { color: var(--green); font-style: normal; text-align: right; }
.empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 78px 24px 56px;
  text-align: center;
}
.empty-mark {
  width: 34px;
  height: 34px;
  border: 1px solid #2c332c;
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 1.1s linear infinite;
}
.empty p { margin: 10px 0 0; color: #c5cdc6; font-size: 16px; }
.near { margin-top: 6px; }
.near-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 22px 24px 8px;
}
.near-head h2 {
  margin: 0;
  color: #9aa196;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.near-tip {
  position: relative;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 1px solid #6e6558;
  border-radius: 50%;
  background: transparent;
  color: #c4b39a;
  font-size: 10px;
  line-height: 14px;
  cursor: help;
}
.near-pop {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 5;
  width: 280px;
  padding: 10px 12px;
  background: #141614;
  border: 1px solid #3a342c;
  color: #d8d2c8;
  font-size: 12px;
  font-weight: 450;
  letter-spacing: 0;
  line-height: 1.45;
  text-align: left;
  text-transform: none;
}
.near-tip:hover .near-pop,
.near-tip:focus .near-pop { display: block; }
.near-row {
  opacity: 0.7;
  padding-top: 8px;
  padding-bottom: 8px;
  background: transparent;
}
.near-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 6px;
  border: 1px solid rgba(196, 146, 74, 0.75);
  color: #c4924a;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: 2px;
}
.near-row .match button { font-size: 13px; font-weight: 560; }
.near-row .meta,
.near-row .leg,
.near-row .when .day,
.near-row .when .kick { font-size: 12px; }
.near-row .leg { margin-bottom: 4px; }
.near-row .leg b { font-size: 12px; }
.near-row .profit { color: #c4924a; font-size: 13px; font-weight: 650; }
.near-row .profit small,
.near-row .stake { color: #a89880; }
.near-row .when .age { color: #8d867a; }
.empty small { color: var(--muted); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; }
.empty .empty-peak {
  display: grid;
  gap: 4px;
  margin: 18px 0 0;
  padding: 10px 16px;
  border: 1px solid rgba(182, 255, 60, 0.35);
  border-radius: 6px;
  color: #d5ddd6;
  font-size: 14px;
  text-align: center;
}
.empty-peak b { color: var(--green); font-variant-numeric: tabular-nums; }
.empty-peak span { color: var(--muted); font-size: 11px; }
@keyframes spin { to { transform: rotate(360deg); } }
.more,
.more-in { display: contents; }
.fold,
.cash { display: none; }
.row {
  display: grid;
  grid-template-columns: 112px minmax(220px, 1.4fr) 88px minmax(220px, 1fr) minmax(220px, 1fr) 128px;
  gap: 16px;
  align-items: start;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
}
.row.head {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-top: 16px;
  padding-bottom: 10px;
}
.row.hit { background: #10160c; }
.row.stale { background: #1a160c; }
.row.dead { background: transparent; }
.row.dead .match button,
.row.dead .profit,
.row.dead .stake,
.row.dead a,
.row.dead .day { color: var(--muted); }
.gone {
  color: #e0a35a;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.qage {
  margin-left: 4px;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.match button {
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
}
.match button:hover { color: var(--green); }
.meta { color: var(--muted); font-size: 12px; margin-top: 4px; }
.when { display: flex; flex-direction: column; gap: 2px; font-variant-numeric: tabular-nums; padding-top: 2px; }
.when .day { color: var(--text); font-size: 13px; }
.when .kick { color: var(--muted); font-size: 13px; }
.when .age { color: var(--green); font-size: 12px; margin-top: 4px; }

.leg { margin: 0 0 8px; font-size: 13px; line-height: 1.35; }
.leg a { color: var(--text); text-decoration: none; }
.leg a:hover { color: var(--green); }
.leg b { font-variant-numeric: tabular-nums; font-size: 14px; }
.vol { color: var(--poly); font-size: 11px; margin-left: 4px; }
.stake {
  display: inline-flex;
  flex-direction: column;
  margin-left: 6px;
  color: var(--green);
  vertical-align: top;
  line-height: 1.15;
}
.stake small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}
.code { color: var(--muted); font-size: 11px; }

.profit {
  color: var(--green);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-size: 16px;
}
.profit small { display: block; font-size: 12px; font-weight: 600; margin-top: 4px; color: var(--text); }

.note {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 16px 24px 0;
}

.admin { display: none; }
body.is-admin .top-tools,
body.is-admin .filter-row,
body.is-admin #telegram-toggle,
body.is-admin #corner,
body.is-admin .board,
body.is-admin .note,
body.is-admin #books,
body.is-admin #history,
body.is-admin #telegram-box,
body.is-admin #tape { display: none; }
body.is-admin .admin {
  display: grid;
  gap: 12px;
  width: min(420px, 100%);
  margin: 18px auto 40px;
  padding: 0 16px;
}
.admin h2 {
  margin: 4px 0 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.admin form { display: grid; gap: 8px; }
.admin input {
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101210;
  color: var(--text);
  font-size: 16px;
}
.admin button[type="submit"] {
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #10140c;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}
.admin button[type="submit"]:disabled { opacity: 0.6; }
.admin-note { margin: 0; min-height: 1.2em; color: var(--green); font-size: 14px; }
.admin-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.admin-row strong { font-size: 16px; font-weight: 650; }
.admin-row span {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .filter-row { flex-wrap: wrap; }
  .desk { margin-left: 0; }
  .row { grid-template-columns: 1fr 1fr; }
  .row.head { display: none; }
  .profit { text-align: left; }
  .gate { padding: 28px 18px 108px; }
  .gate-frame { flex-direction: column; align-items: stretch; gap: 28px; }
  .gate-inner, .gate-stage { flex: none; width: 100%; max-width: none; }
  .gate-stage {
    min-height: 0;
    padding: 32px;
  }
  .gate-foot { left: 16px; right: 16px; }
  .tg-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }
  body { font-size: 13px; }
  input,
  textarea,
  select { font-size: 16px; }
  header {
    display: grid;
    grid-template-columns: minmax(0, auto) minmax(0, auto) minmax(0, 1fr) auto;
    grid-template-areas:
      "logo primer gap icons"
      "filters tabs tabs tabs"
      "stats stats stats stats";
    gap: 4px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 4px 6px;
    margin: 0;
    overflow: hidden;
    align-items: center;
  }
  .top,
  .top-tools,
  .filter-row { display: contents; }
  .brand { grid-area: logo; min-width: 0; gap: 6px; }
  h1 { font-size: 13px; letter-spacing: 0.02em; }
  #scan-time { display: none; }
  .stake-box {
    grid-area: primer;
    margin: 0;
    padding: 3px 6px;
    gap: 3px;
    font-size: 11px;
    box-shadow: none;
  }
  .icon-tools { grid-area: icons; margin: 0; justify-self: end; gap: 0; }
  .iconbtn { width: 36px; height: 36px; color: var(--text); }
  .iconbtn svg { width: 22px; height: 22px; }
  .tg-badge {
    top: 2px;
    right: 0;
    min-width: 16px;
    height: 16px;
    font-size: 11px;
    line-height: 16px;
  }
  #book-filter { grid-area: filters; gap: 4px; min-width: 0; }
  .nav-tabs {
    grid-area: tabs;
    justify-self: end;
    margin: 0;
    gap: 4px;
    border: 0;
    min-width: 0;
    overflow: hidden;
  }
  .nav-tabs .ghost,
  .seg.wide button {
    padding: 4px 8px;
    font-size: 11px;
    letter-spacing: 0;
    line-height: 1.2;
  }
  .nav-tabs .ghost {
    border: 1px solid var(--line);
    border-radius: 999px;
  }
  .desk {
    grid-area: stats;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: auto;
    margin: 0;
    gap: 6px;
    overflow: hidden;
    white-space: normal;
    padding: 2px 0 4px;
    border-bottom: 0;
  }
  .desk-card {
    flex-direction: row;
    align-items: center;
    gap: 4px;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    height: auto;
    flex: none;
    padding: 5px 8px;
    background: #1a1f1a;
    border: 1px solid rgba(182, 255, 60, 0.62);
    border-radius: 6px;
    box-shadow: none;
    overflow: hidden;
    justify-content: flex-start;
  }
  .desk-card:nth-child(n+3) { display: none; }
  .desk-top {
    cursor: pointer;
    flex-direction: column;
    align-items: flex-start;
  }
  .desk-top .desk-short {
    white-space: normal;
    font-size: 11px;
    line-height: 1.25;
    text-transform: none;
  }
  .desk-top > small { display: none; }
  .desk-top.open .desk-short,
  .desk-top.open > b { display: none; }
  .desk-top.open > small {
    display: block;
    width: 100%;
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
  }
  .desk-label { display: none; }
  .desk-short {
    display: inline;
    flex: 0 0 auto;
    color: #d5ddd6;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0;
    text-transform: uppercase;
    white-space: nowrap;
  }
  .desk-card > b,
  .cycle-item > b {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    font-variant-numeric: tabular-nums;
  }
  .desk-card small,
  .cycle-item small {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
  }
  .desk > .desk-card:first-child > small,
  .desk > .desk-card:last-child > small { display: none; }
  .cycle-mask { display: flex; align-items: center; min-width: 0; flex: 1 1 auto; }
  .cycle-item {
    flex-direction: row;
    align-items: center;
    gap: 4px;
    width: 100%;
    min-width: 0;
    height: auto;
    padding: 0;
    transform: none;
  }
  .board { padding: 0 8px; }
  .row.head { display: none; }
  .row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "match pct fold"
      "when when when"
      "market market market"
      "home home home"
      "away away away"
      "cash cash cash";
    gap: 0 8px;
    align-items: start;
    max-height: 60px;
    overflow: hidden;
    background: #111;
    border: 1px solid #222;
    border-radius: 8px;
    padding: 0 8px;
    margin: 0 0 6px;
    cursor: pointer;
    transition: max-height 0.28s ease;
  }
  .row.open {
    grid-template-areas:
      "match match match"
      "pct pct fold"
      "when when when"
      "market market market"
      "home home home"
      "away away away"
      "cash cash cash";
    gap: 4px 8px;
    max-height: 720px;
    padding-bottom: 8px;
    cursor: default;
  }
  .row > .when {
    grid-area: when;
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
    height: auto;
    padding: 2px 0 0;
    text-align: left;
  }
  .row > .teams {
    grid-area: match;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    height: 60px;
    overflow: hidden;
  }
  .row > .market-name,
  .market-name { grid-area: market; color: var(--muted); font-size: 12px; }
  .legs { grid-area: home; min-width: 0; }
  .legs.poly { grid-area: away; }
  .legs.is-empty { display: none; }
  .row > .profit {
    grid-area: pct;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 60px;
    font-size: 16px;
    font-weight: 800;
    white-space: nowrap;
  }
  .row > .profit small { display: none; }
  .cash {
    display: flex;
    grid-area: cash;
    justify-content: flex-end;
    align-items: baseline;
    gap: 8px;
    color: var(--green);
    font-size: 14px;
    font-weight: 700;
  }
  .fold {
    display: inline-flex;
    grid-area: fold;
    align-items: center;
    align-self: center;
    height: 32px;
    margin: 0;
    padding: 0 8px;
    border: 1px solid rgba(182, 255, 60, 0.45);
    border-radius: 6px;
    background: #1a1f1a;
    color: var(--green);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
  }
  .fold .fold-open { display: none; }
  .row.open .fold .fold-shut { display: none; }
  .row.open .fold .fold-open { display: inline; }
  .row.open > .teams {
    height: auto;
    align-items: flex-start;
    padding: 10px 0 2px;
  }
  .row.open > .profit { height: auto; padding-top: 0; justify-content: flex-start; }
  .row.open > .fold { align-self: center; margin-top: 0; justify-self: end; }
  .row.open .match button {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }
  .fold::after { content: "▾"; margin-left: 4px; }
  .row.open .fold::after { content: "▴"; }
  .match { min-width: 0; flex: 1 1 auto; overflow: hidden; }
  .match button {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 700;
  }
  .meta { display: none; }
  .when .day, .when .kick, .when .age { font-size: 12px; }
  .when .age { margin-top: 0; }
  .leg, .leg a {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 1.3;
    white-space: normal;
  }
  .leg-top, .leg-bot {
    display: flex;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
  }
  .leg-top { justify-content: flex-start; }
  .leg-bot { justify-content: space-between; }
  .leg-book { font-weight: 650; }
  .leg b { font-size: 16px; }
  .qage { margin-left: 0; }
  .stake { flex-direction: row; align-items: baseline; gap: 4px; }
  .row.hit .profit { font-size: 16px; font-weight: 800; }
  .row.near-row .profit { font-size: 15px; }
  .near-head { padding: 8px 0 4px; }
  .note { padding: 8px 8px 0; }
  .books { grid-template-columns: 1fr; }
  .book {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 12px;
    border-right: 0;
  }
  .book > span { display: none; }
  .book strong { font-size: 16px; }
  .book em { font-size: 0; letter-spacing: 0; text-transform: none; }
  .book em::after {
    font-size: 13px;
    font-weight: 650;
    content: "ne radi";
    color: var(--muted);
  }
  .book.on em::after { content: "radi"; color: var(--green); }
  .book.wait em::after { content: "čeka"; color: var(--muted); }
  .sheet { margin: 0; padding: 8px 12px 16px; border-left: 0; border-right: 0; }
  .hit-card {
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: start;
    padding: 12px 0;
  }
  .hit-pct {
    min-width: 0;
    min-height: 0;
    width: fit-content;
    padding: 8px 14px;
    font-size: 28px;
  }
  .hit-body strong { font-size: 16px; }
  .hit-body small { white-space: normal; line-height: 1.4; }
  .empty { padding: 24px 8px 16px; }
  .gate {
    height: 100dvh;
    min-height: 0;
    justify-content: center;
    padding: 16px 12px 10px;
    overflow: hidden;
  }
  .gate-frame { gap: 12px; }
  .gate .eyebrow {
    margin: 0 0 4px;
    font-size: 11px;
    letter-spacing: 0.18em;
  }
  .gate h1 {
    font-size: 30px;
    line-height: 0.95;
    letter-spacing: -0.03em;
  }
  .gate .lead {
    margin: 6px 0 0;
    max-width: none;
    font-size: 13px;
    line-height: 1.4;
  }
  .gate form {
    width: 100%;
    max-width: none;
    margin: 10px auto 0;
    gap: 8px;
    justify-items: stretch;
  }
  .gate .field {
    height: 40px;
    padding: 0 8px 0 12px;
  }
  .gate .field input { padding: 0; height: 100%; }
  .gate-actions { width: 100%; }
  .gate-actions button[type="submit"] {
    width: 100%;
    height: 40px;
    padding: 0 16px;
    background: var(--green);
    color: #10140c;
    font-weight: 800;
  }
  .gate-error { margin: 0; }
  .gate-stage {
    min-height: 0;
    padding: 16px 12px;
    border-radius: 12px;
  }
  .stage-head { margin-bottom: 6px; font-size: 10px; letter-spacing: 0.12em; }
  .spark { width: min(168px, 72%); height: 24px; margin: 0 auto 6px; }
  .odds-mid { gap: 2px; padding-bottom: 8px; }
  .odds-mid b { font-size: 15px; }
  .odds-mid .roi {
    font-size: 26px;
    font-weight: 800;
    text-shadow: 0 0 18px rgba(182, 255, 60, 0.55);
  }
  .odds-table { gap: 5px 0; padding-top: 8px; }
  .odds-table span:nth-child(-n+3),
  .odds-table span:nth-child(n+4) { font-size: 12px; }
  .gate-foot {
    position: static;
    margin-top: 8px;
    left: auto;
    right: auto;
    bottom: auto;
  }
  .gate-note { font-size: 10px; line-height: 1.3; }
}

@media (prefers-reduced-motion: reduce) {
  .gate .eyebrow, .gate h1, .gate .lead, .gate-points, .gate form,
  .odds-card, .phone-note, .spark polyline, .stage-live, .empty-mark, .gate-stage { animation: none; }
  .spark polyline { stroke-dashoffset: 0; }
  .scan-line { animation: none; opacity: 0; }
  .row { transition: none; }
}
