:root {
  --bg: #0d0d0f;
  --bg-2: #151518;
  --card: #1a1b1f;
  --card-2: #202127;
  --line: #2a2b32;
  --text: #f5f6f8;
  --mute: #9aa0ab;
  --faint: #6d7380;
  --blue: #2f6bff;
  --blue-2: #1d4ed8;
  --yes: #1fa971;
  --yes-bg: #163528;
  --no: #e14949;
  --no-bg: #3a1b1b;
  --warn: #f0b429;
  --radius: 12px;
}

[data-theme="light"] {
  --bg: #f3f4f6;
  --bg-2: #ffffff;
  --card: #ffffff;
  --card-2: #f7f8fa;
  --line: #e4e6eb;
  --text: #111318;
  --mute: #5c6370;
  --faint: #8b919c;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 Inter, system-ui, sans-serif; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
body { overflow-x: hidden; }

.top {
  height: 64px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
}
.top-inner {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 18px;
  height: 64px;
  display: grid;
  grid-template-columns: auto minmax(160px, 360px) auto;
  align-items: center;
  gap: 16px;
  box-sizing: border-box;
}
.logo { font-weight: 700; font-size: 20px; letter-spacing: -0.03em; }
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  width: 100%;
  max-width: 360px;
  justify-self: center;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  position: relative;
}
.search svg { width: 16px; height: 16px; color: var(--faint); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; }
.search input::placeholder { color: var(--faint); }
.search kbd {
  font-size: 11px;
  color: var(--faint);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
}
.top-actions { display: flex; align-items: center; gap: 8px; justify-self: end; }
.link, .icon {
  border: 0;
  background: transparent;
  color: var(--mute);
  padding: 8px 10px;
}
.link:hover, .icon:hover { color: var(--text); }
.icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; }
.icon svg { width: 18px; height: 18px; }
.icon.on { color: var(--blue); background: var(--card); }
.btn-blue {
  border: 0;
  background: var(--blue);
  color: #fff;
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.15;
  vertical-align: middle;
}
.btn-blue:hover { background: var(--blue-2); }
.btn-blue:disabled { opacity: .45; cursor: not-allowed; }
.btn-blue.wide { width: 100%; }
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #2f6bff, #7c5cff);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  padding: 0;
  overflow: hidden;
}
.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}
.avatar svg { width: 16px; height: 16px; }
.head-cash {
  border: 0;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 8px 8px;
}
.head-cash:hover { color: var(--blue); }
.user-wrap { position: relative; }
.user-pop, .search-drop {
  position: absolute;
  right: 0;
  top: 44px;
  width: 240px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px;
  z-index: 60;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
}
.search-drop {
  left: 0;
  right: auto;
  top: 46px;
  width: min(420px, 80vw);
  padding: 6px;
}
.search-hit {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 8px;
  border-radius: 10px;
}
.search-hit:hover { background: var(--bg-2); }
.search-hit img, .search-hit .thumb { width: 36px; height: 36px; border-radius: 8px; }
.search-hit b { display: block; font-size: 13px; line-height: 1.3; }
.search-hit small { color: var(--faint); }
.user-pop button, .user-pop a {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--mute);
  padding: 9px 10px;
  border-radius: 8px;
}
.user-pop button:hover, .user-pop a:hover { background: var(--bg-2); color: var(--text); }
.user-pop .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.user-pop .who b { display: block; color: var(--text); }
.user-pop .who small { color: var(--faint); }
.lang-wrap { position: relative; }
.lang-pop {
  position: absolute;
  right: 0;
  top: 44px;
  width: 220px;
  max-height: 360px;
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px;
  z-index: 60;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
}
.lang-pop button {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--mute);
  padding: 8px 10px;
  border-radius: 8px;
}
.lang-pop button.on, .lang-pop button:hover { background: var(--bg-2); color: var(--text); }

.cats {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 64px;
  z-index: 19;
}
.cats-wrap {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 18px;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
}
.cats-inner {
  display: flex;
  gap: 6px;
  padding: 10px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.cats-inner::-webkit-scrollbar { height: 0; }
.cats-arrow {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--card);
  color: var(--text);
  box-shadow: 0 0 0 1px var(--line);
  z-index: 2;
  flex: none;
}
.cats-arrow:hover { background: var(--card-2); }
.cats-arrow[hidden] { display: none !important; }
.cat {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: var(--mute);
  padding: 8px 10px;
  border-radius: 8px;
  white-space: nowrap;
}
.cat svg { width: 16px; height: 16px; flex: none; }
.cat.is-on, .cat:hover { color: var(--text); background: var(--card); }

.wrap { width: 100%; max-width: 1220px; margin: 0 auto; padding: 18px 18px 72px; box-sizing: border-box; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) 300px;
  gap: 12px;
  margin-bottom: 22px;
  align-items: stretch;
}
.hero-main { position: relative; }
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.feat-grid { display: grid; grid-template-columns: minmax(240px, .9fr) minmax(0, 1.25fr); gap: 16px; align-items: stretch; flex: 1; min-height: 0; }
.feat-left { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.feat-tag { color: var(--mute); font-size: 12px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.feat-tag i { font-style: normal; color: var(--faint); }
.live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #3dd68c;
  box-shadow: 0 0 0 0 rgba(61,214,140,.7);
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 7px rgba(61,214,140,0); }
  100% { box-shadow: 0 0 0 0 rgba(61,214,140,0); }
}
.feat { overflow: hidden; min-height: 420px; display: flex; flex-direction: column; }
.feat h2 { margin: 0 0 10px; font-size: 22px; letter-spacing: -0.03em; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.prob { font-size: 36px; font-weight: 700; letter-spacing: -0.04em; }
.prob small { display: block; font-size: 13px; font-weight: 500; color: var(--mute); margin-top: 2px; }
.yn { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 8px; }
.feat-outs { display: grid; gap: 2px; }
.feat-out {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 7px 2px;
  border-radius: 8px;
  text-align: left;
}
.feat-out:hover { background: var(--card-2); }
.feat-out span { color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feat-out b { font-variant-numeric: tabular-nums; }
.feat-comments {
  margin-top: auto;
  display: grid;
  gap: 8px;
  max-height: 168px;
  overflow: hidden;
  padding-top: 8px;
}
.feat-c { display: grid; grid-template-columns: 28px 1fr; gap: 8px; align-items: start; }
.feat-c img, .feat-c .av { width: 28px; height: 28px; border-radius: 50%; background: var(--card-2); object-fit: cover; }
.feat-c b { font-size: 12px; }
.feat-c p {
  margin: 2px 0 0;
  color: var(--mute);
  font-size: 12px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.feat-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--mute);
}
.feat-legend b { color: var(--text); margin-right: 4px; }
.feat-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--faint);
  font-size: 12px;
}
.feat-meta i { font-style: normal; }
.feat-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding-top: 8px;
}
.feat-bar button {
  border: 0;
  background: transparent;
  color: var(--mute);
  padding: 4px 0;
  font-size: 13px;
}
.feat-bar button:first-child { text-align: left; }
.feat-bar button:last-child { text-align: right; }
.feat-bar button:hover { color: var(--text); }
.feat-dots { display: flex; gap: 6px; justify-content: center; }
.feat-dots i { width: 6px; height: 6px; border-radius: 50%; background: #3a3b44; }
.feat-dots i.on { background: var(--text); }
.yes, .no {
  height: 44px;
  border: 0;
  border-radius: 10px;
  font-weight: 700;
}
.yes { background: var(--yes-bg); color: #3dd68c; }
.no { background: var(--no-bg); color: #ff7a7a; }
.yes:hover, .no:hover { filter: brightness(1.12); }
.mini { background: transparent; border: 1px solid var(--line); height: 28px; padding: 0 8px; border-radius: 8px; font-size: 12px; font-weight: 600; }
.mini.yes { color: #3dd68c; border-color: #24543c; }
.mini.no { color: #ff7a7a; border-color: #5a2a2a; }
.vol { color: var(--faint); font-size: 12px; }
.chart-box { position: relative; min-height: 260px; overflow: hidden; display: flex; flex-direction: column; }
canvas.chart { width: 100%; height: 240px; display: block; flex: 1; }
.feat .rows { max-height: none; overflow: hidden; }
.feat-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  background: rgba(13,13,15,.75);
  color: var(--text);
  border-radius: 50%;
  z-index: 3;
}
.feat-nav.prev { left: 8px; }
.feat-nav.next { right: 8px; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); }

.side { display: grid; gap: 10px; align-content: stretch; }
.side-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  text-align: left;
  min-height: 88px;
  cursor: pointer;
}
.side-card:hover { border-color: #3a3b44; background: var(--card-2); }
.side-card h4 { margin: 0 0 6px; font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.side-card .side-top { display: flex; gap: 8px; align-items: flex-start; }
.side-card .prob { font-size: 20px; }
.side-card .yes, .side-card .no { height: 34px; font-size: 13px; }
.hot ol { margin: 0; padding: 0 0 0 18px; }
.hot li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.hot li:last-child { border: 0; }
.hot button { border: 0; background: transparent; color: var(--text); text-align: left; padding: 0; }
.see { width: 100%; margin-top: 8px; height: 36px; border: 1px solid var(--line); background: var(--bg-2); border-radius: 10px; color: var(--mute); }
.tape { max-height: 160px; overflow: auto; }
.tape-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.tape-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--mute); }
.tape-row b.up { color: #3dd68c; }
.tape-row b.dn { color: #ff7a7a; }

.ud {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 22px;
}
.ud-card {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  text-align: left;
  min-height: 132px;
  cursor: pointer;
}
.ud-card:hover { border-color: #3a3b44; background: var(--card-2); }
.ud-card h4 { margin: 0 0 4px; font-size: 14px; }
.ud-card .clock { color: var(--faint); font-size: 12px; margin-bottom: 10px; }
.ud-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; position: relative; z-index: 1; }
.ud-float {
  position: absolute;
  top: 8px;
  font-size: 12px;
  font-weight: 700;
  pointer-events: none;
  animation: floatDown 2.3s linear forwards;
  z-index: 2;
  text-shadow: 0 1px 8px rgba(0,0,0,.55);
}
.ud-float.up { color: #3dd68c; }
.ud-float.dn { color: #ff7a7a; }
@keyframes floatDown {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(78px); opacity: 0; }
}

.block-head { display: flex; justify-content: space-between; align-items: center; margin: 8px 0 12px; }
.block-head h3 { margin: 0; font-size: 20px; }
.pills { display: flex; gap: 8px; flex-wrap: nowrap; overflow-x: auto; margin-bottom: 14px; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pill { border: 0; background: var(--card); color: var(--mute); height: 32px; padding: 0 12px; border-radius: 999px; flex: none; }
.pill.is-on { background: var(--blue); color: #fff; }
.tools { display: flex; gap: 8px; }

.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.grid-more { height: 1px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  min-height: 228px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-align: left;
  cursor: pointer;
}
.card:hover { border-color: #3a3b44; background: var(--card-2); }
.card-top { display: flex; gap: 10px; margin-bottom: 10px; min-width: 0; }
.thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: #2a2b32; flex: none; }
.card h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rows { display: grid; gap: 6px; margin-top: auto; min-width: 0; }
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px 40px 40px;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 28px;
}
.row span { color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.row b { text-align: right; font-variant-numeric: tabular-nums; font-size: 12px; }
.card .mini { width: 40px; padding: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ud-btns .mini { width: auto; height: 36px; }
.more-row { color: var(--faint); font-size: 12px; padding: 2px 0 0; }
.foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); color: var(--faint); font-size: 12px; }
.foot-right { display: inline-flex; align-items: center; gap: 8px; }
.bm {
  border: 0;
  background: transparent;
  color: var(--mute);
  width: 22px;
  height: 22px;
  padding: 0;
  display: grid;
  place-items: center;
}
.bm svg { width: 15px; height: 15px; }
.bm.on { color: var(--blue); }
.bm.on svg { fill: currentColor; }
.live-mini { display: inline-flex; align-items: center; gap: 6px; }
.bin { display: grid; grid-template-columns: 88px 1fr; gap: 12px; align-items: center; margin-top: auto; }
.ring {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: conic-gradient(#3dd68c calc(var(--p) * 1%), #2a2b32 0);
  display: grid;
  place-items: center;
  flex: none;
}
.ring span {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: var(--card);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 16px;
}
.bin-btns { display: grid; gap: 8px; }
.bin-btns .yes, .bin-btns .no { height: 38px; width: 100%; }
.vs-btns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-top: auto; }
.vs-btns button {
  min-height: 52px;
  border: 0;
  border-radius: 10px;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.25;
  padding: 6px 4px;
}
.vs-btns .draw { background: var(--bg-2); color: var(--text); border: 1px solid var(--line); }
.vs-btns b { display: block; font-size: 14px; }
.card-bin, .card-vs { min-height: 228px; }
.card-bin h4 { -webkit-line-clamp: 3; font-size: 15px; }

.trade {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(400px, 100%);
  background: #16171b;
  border-left: 1px solid var(--line);
  z-index: 45;
  display: flex;
  flex-direction: column;
}
.trade-head, .modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.trade-head .icon { position: relative; z-index: 2; }
.trade-body { padding: 16px; overflow: auto; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 12px 0; }
.tab { height: 36px; border: 0; border-radius: 8px; background: var(--bg-2); color: var(--mute); font-weight: 600; }
.tab.on { background: var(--card-2); color: var(--text); }
.field { display: grid; gap: 6px; color: var(--mute); font-size: 12px; margin: 10px 0; }
.field input, .field select { height: 42px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); padding: 0 12px; }
.field input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.field input[type="number"]::-webkit-outer-spin-button,
.field input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.line { display: flex; justify-content: space-between; color: var(--mute); font-size: 13px; padding: 5px 0; }
.line b { color: var(--text); }
.banner { padding: 10px 12px; border-radius: 10px; background: #33270d; color: var(--warn); font-size: 12px; margin: 10px 0; }
.veil { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40; }

.modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: grid; place-items: center; z-index: 55; padding: 12px; overflow-y: auto; }
.modal-card { width: min(440px, 100%); max-height: calc(100vh - 24px); overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px 16px 18px; }
.auth-modal .auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  margin: 4px 0 12px; padding: 4px; border-radius: 10px; background: var(--bg-2);
}
.auth-tab {
  height: 38px; border: 0; border-radius: 8px; background: transparent;
  color: var(--mute); font-weight: 600; cursor: pointer;
}
.auth-tab.on { background: var(--card); color: var(--text); box-shadow: 0 0 0 1px var(--line); }
.btn-auth-mobile { display: none; height: 34px; padding: 0 12px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.modal-card label { display: grid; gap: 6px; margin: 10px 0; color: var(--mute); font-size: 12px; }
.modal-card .field { display: grid; gap: 6px; margin: 12px 0; color: var(--mute); font-size: 12px; }
.modal.kyc-gate { z-index: 80; }
.modal.kyc-gate .modal-card { padding: 20px; }
body.kyc-locked #app,
body.kyc-locked .top,
body.kyc-locked .rail,
body.kyc-locked .chat-widget { pointer-events: none; user-select: none; filter: blur(2px); }
body.kyc-locked .modal.kyc-gate { pointer-events: auto; filter: none; }
.modal-card .field > span, .modal-card label > span, .field-label { color: var(--mute); font-size: 12px; font-weight: 500; }
.modal-card input, .modal-card select { height: 42px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); padding: 0 12px; }
.modal-card input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.modal-card input[type="number"]::-webkit-outer-spin-button,
.modal-card input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pay-currency-field { margin: 12px 0 14px; }
.pay-currency-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.pay-cur {
  display: grid; gap: 5px; justify-items: center; text-align: center;
  padding: 12px 8px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg-2); cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s;
}
.pay-cur:hover { border-color: color-mix(in srgb, var(--blue) 45%, var(--line)); }
.pay-cur.on {
  border-color: var(--blue);
  background: color-mix(in srgb, var(--blue) 12%, var(--bg-2));
  box-shadow: 0 0 0 1px var(--blue);
}
.pay-cur span { font-size: 13px; font-weight: 600; line-height: 1.2; }
.pay-cur small { font-size: 11px; color: var(--faint); letter-spacing: .02em; }
.pay-cur-icon { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.pay-cur-badge {
  width: 30px; height: 30px; border-radius: 50%; background: var(--line);
  display: grid; place-items: center; font-size: 10px; font-weight: 700; color: var(--mute);
}
.cash-modal .pay-box input { font-size: 13px; }
.pay-qr-card {
  position: relative; display: grid; place-items: center;
  margin: 8px auto 14px; padding: 16px; width: fit-content;
  border-radius: 18px; background: #fff; border: 1px solid var(--line);
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
}
.pay-qr-img { display: block; border-radius: 10px; }
.pay-qr-badge {
  position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px; background: var(--blue); color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
}
.pay-qr-badge .pay-cur-icon { width: 18px; height: 18px; border-radius: 50%; }
.pay-min-note {
  margin: 18px 0 8px; text-align: center; font-size: 18px; font-weight: 700; color: var(--text);
}
.pay-copy-row { display: flex; gap: 8px; align-items: stretch; }
.pay-copy-row input { flex: 1; min-width: 0; font-size: 13px; }
.pay-copy-row .btn-ghost { height: 42px; padding: 0 14px; white-space: nowrap; }
.pay-status {
  margin-top: 12px; padding: 10px 12px; border-radius: 10px;
  background: color-mix(in srgb, var(--blue) 10%, var(--bg-2));
  border: 1px solid color-mix(in srgb, var(--blue) 25%, var(--line));
  font-size: 13px; text-align: center; color: var(--mute);
}
.alert-modal { text-align: center; padding: 28px 22px 22px; max-width: 400px; }
.alert-icon {
  width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%;
  display: grid; place-items: center; font-size: 28px; font-weight: 800;
  color: #fbbf24; background: rgba(251, 191, 36, .12); border: 2px solid rgba(251, 191, 36, .35);
}
.alert-title { margin: 0 0 10px; font-size: 20px; letter-spacing: -.02em; }
.alert-body { margin: 0 0 20px; color: var(--mute); line-height: 1.55; font-size: 14px; }
.alert-actions { display: grid; gap: 8px; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.modal-card textarea { border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); padding: 10px; resize: vertical; }
.support-msgs {
  flex: 1 1 auto; min-height: 0; overflow: auto;
  display: flex; flex-direction: column; gap: 10px;
  padding: 12px 14px; background: var(--bg);
}
.support-line {
  max-width: 88%; display: flex; flex-direction: column;
}
.support-line.me { align-self: flex-end; }
.support-line.them { align-self: flex-start; }
.support-bubble {
  padding: 10px 12px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line);
}
.support-line.me .support-bubble {
  border-color: color-mix(in srgb, var(--blue) 35%, var(--line));
  background: color-mix(in srgb, var(--blue) 12%, var(--card));
}
.support-meta {
  display: flex; justify-content: space-between; gap: 10px;
  margin-bottom: 6px; font-size: 10px; color: var(--faint);
  text-transform: uppercase; letter-spacing: .04em;
}
.support-meta time { font-variant-numeric: tabular-nums; text-transform: none; letter-spacing: 0; }
.support-bubble p { margin: 0; line-height: 1.45; white-space: pre-wrap; word-break: break-word; font-size: 14px; }

.site-toast {
  position: fixed; left: 50%; bottom: 96px; z-index: 1200;
  transform: translateX(-50%) translateY(12px);
  max-width: min(92vw, 420px); padding: 12px 16px;
  border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); box-shadow: 0 12px 40px rgba(0,0,0,.35);
  font-size: 14px; line-height: 1.45; opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.site-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.site-toast-success { border-color: color-mix(in srgb, var(--yes) 50%, var(--line)); }
.site-toast-error { border-color: color-mix(in srgb, var(--no) 50%, var(--line)); }
.site-toast-info { border-color: color-mix(in srgb, var(--blue) 45%, var(--line)); }

.notif-list { max-height: min(60vh, 480px); overflow: auto; display: grid; gap: 10px; padding: 4px 0; }
.notif-empty { text-align: center; padding: 24px 12px; }
.notif-item {
  border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px;
  background: var(--bg-2); display: grid; gap: 6px;
}
.notif-item.unread { border-color: color-mix(in srgb, var(--blue) 55%, var(--line)); background: color-mix(in srgb, var(--blue) 8%, var(--card)); }
.notif-item-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.notif-type-pill {
  display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase;
  background: var(--card); border: 1px solid var(--line); color: var(--mute);
}
.notif-type-pill.type-support { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 40%, var(--line)); }
.notif-type-pill.type-deposit { color: var(--yes); border-color: color-mix(in srgb, var(--yes) 40%, var(--line)); }
.notif-type-pill.type-withdraw { color: #d97706; }
.notif-time { font-size: 11px; color: var(--faint); white-space: nowrap; }
.notif-title { margin: 0; font-size: 14px; line-height: 1.35; }
.notif-body { margin: 0; color: var(--mute); font-size: 13px; line-height: 1.45; }

.chat-widget-fab { position: relative; }
.chat-widget-badge {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--no); color: #fff; font-size: 11px; font-weight: 700;
  line-height: 18px; text-align: center; border: 2px solid var(--bg);
}

.support-page { max-width: 760px; padding-bottom: 48px; }
.support-page-head { margin-bottom: 18px; }
.support-page-head h1 { margin: 0 0 8px; font-size: 32px; letter-spacing: -0.04em; }
.support-chat {
  display: flex; flex-direction: column;
  min-height: min(68vh, 620px); max-height: calc(100vh - 180px);
  border: 1px solid var(--line); border-radius: 18px;
  background: var(--card); overflow: hidden;
}
.support-compose {
  display: grid; grid-template-columns: 1fr auto; gap: 10px;
  align-items: end; padding: 12px 14px; border-top: 1px solid var(--line);
  background: var(--card);
}
.support-compose textarea {
  min-height: 44px; max-height: 120px; resize: vertical;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg-2); color: var(--text); padding: 10px 12px;
}
.support-guest {
  padding: 24px; text-align: center; display: grid; gap: 12px;
  border-top: 1px solid var(--line);
}

.chat-widget {
  position: fixed; z-index: 48;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  pointer-events: none;
}
.chat-widget > * { pointer-events: auto; }
.chat-widget-fab {
  width: 56px; height: 56px; border-radius: 999px; border: 0;
  background: var(--blue); color: #fff; cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 8px 28px rgba(37, 99, 235, .45);
  transition: transform .15s ease, box-shadow .15s ease;
}
.chat-widget-fab svg { width: 26px; height: 26px; }
.chat-widget-fab:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(37, 99, 235, .5); }
.chat-widget-fab[hidden] { display: none !important; }

.chat-widget-panel {
  position: absolute; right: 0; bottom: 68px;
  width: min(380px, calc(100vw - 32px));
  height: min(520px, calc(100vh - 120px));
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: 18px;
  background: var(--card);
  box-shadow: 0 18px 48px rgba(0,0,0,.28);
  overflow: hidden;
}
.chat-widget-head {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 14px 14px 10px; border-bottom: 1px solid var(--line);
  background: var(--card);
}
.chat-widget-head b { display: block; font-size: 15px; }
.chat-widget-head small { display: block; color: var(--faint); font-size: 11px; margin-top: 2px; line-height: 1.35; }
.chat-widget-actions { display: flex; gap: 4px; flex-shrink: 0; }
.chat-widget-actions .icon { width: 34px; height: 34px; font-size: 15px; }
.chat-widget-msgs { max-height: none; flex: 1; }
.chat-widget-compose {
  display: grid; grid-template-columns: 1fr auto; gap: 8px;
  align-items: end; padding: 10px 12px; border-top: 1px solid var(--line);
}
.chat-widget-compose textarea {
  min-height: 40px; max-height: 96px; resize: none;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg-2); color: var(--text); padding: 8px 10px; font-size: 14px;
}
.chat-widget-compose .btn-blue { height: 40px; padding: 0 14px; white-space: nowrap; }
.chat-widget-guest { padding: 16px 14px; border-top: 1px solid var(--line); }
.chat-widget-err { padding: 0 14px 10px; margin: 0; }

body.page-support .chat-widget-fab,
body.page-support .chat-widget-panel { display: none !important; }

@media (max-width: 640px) {
  .chat-widget {
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    left: max(12px, env(safe-area-inset-left));
  }
  .chat-widget-panel {
    position: fixed;
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    width: auto; height: min(78vh, 640px);
    border-radius: 18px 18px 14px 14px;
  }
  .chat-widget-fab {
    position: fixed;
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
  }
  .support-chat {
    min-height: min(72vh, 640px);
    max-height: none;
  }
  .support-compose { grid-template-columns: 1fr; }
  .support-compose .btn-blue { width: 100%; }
}
.field-row { display: flex; gap: 8px; margin-top: 8px; }
.field-row input { flex: 1; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); padding: 0 10px; }
.hint, .empty { color: var(--faint); }
.empty { padding: 40px 0; text-align: center; }

.cabinet { display: grid; grid-template-columns: 220px 1fr; gap: 20px; }
.side-nav { display: grid; align-content: start; gap: 4px; }
.side-nav button { text-align: left; border: 0; background: transparent; color: var(--mute); padding: 10px 12px; border-radius: 10px; }
.side-nav button.on, .side-nav button:hover { background: var(--card); color: var(--text); }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.box h4 { margin: 0 0 12px; }

.port { display: grid; gap: 18px; }
.port-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.port-head h1 { margin: 0; font-size: 32px; letter-spacing: -0.04em; }
.port-actions { display: flex; gap: 8px; }
.btn-ghost {
  height: 38px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); color: var(--text); font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.15;
}
.port-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.port-stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.port-stat span { display: block; color: var(--mute); font-size: 13px; margin-bottom: 6px; }
.port-stat b { font-size: 28px; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.port-stat b.up { color: #3dd68c; }
.port-stat b.dn { color: #ff7a7a; }
.port-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.port-tabs button {
  border: 0; background: transparent; color: var(--mute);
  padding: 10px 14px; font-weight: 600;
}
.port-tabs button.on { color: var(--text); box-shadow: inset 0 -2px 0 var(--blue); }
.pos-row { display: grid; grid-template-columns: minmax(0, 1.6fr) 90px 80px 90px 90px; gap: 10px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.pos-row:hover { background: var(--card); }
.pos-mkt { display: flex; gap: 10px; align-items: center; min-width: 0; }
.pos-mkt img, .pos-mkt .thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.pos-mkt b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos-mkt small { color: var(--mute); }
.pos-num { text-align: right; font-variant-numeric: tabular-nums; }
.pos-head { color: var(--faint); font-size: 12px; }
.cab-gate { max-width: 520px; padding: 48px 0 80px; }
.cab-gate h1 { margin: 0 0 8px; font-size: 32px; letter-spacing: -0.04em; }
.profile-hero { display: flex; gap: 16px; align-items: center; margin-bottom: 22px; }
.profile-av, .profile-av-img {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, #2f6bff, #7c5cff);
  display: grid; place-items: center; font-size: 28px; font-weight: 700;
  object-fit: cover; flex-shrink: 0;
}
.avatar-upload { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.avatar-upload .profile-av-img { width: 64px; height: 64px; font-size: 24px; }
.avatar-upload-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.avatar-upload .hint { margin: 0; flex: 1 1 100%; }
.ud-ended { margin: 12px 0; padding: 14px 16px; border-radius: 12px; background: rgba(255, 180, 60, .08); border: 1px solid rgba(255, 180, 60, .22); }
.ud-ended .btn-blue { margin-top: 10px; }
.ud-result { font-weight: 600; color: var(--blue); }
.profile-hero p { margin: 4px 0 0; color: var(--mute); }
.reward-hero { padding: 28px; border-radius: 16px; background: linear-gradient(135deg, #15203a, #1a1528 70%); }
.reward-hero h1 { margin: 0 0 8px; font-size: 32px; }
.reward-progress-bar { height: 8px; border-radius: 999px; background: rgba(255,255,255,.12); overflow: hidden; }
.reward-progress-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3b82f6, #8b5cf6); transition: width .35s ease; }
table tr.you td { color: var(--blue); font-weight: 600; }
.cat-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 14px; }
.cat-tools { display: flex; gap: 8px; align-items: center; }
.cat-tools button, .chip {
  height: 32px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--mute);
}
.cat-tools button.on, .chip.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.faq { margin-top: 36px; max-width: 760px; }
.faq h2 { font-size: 22px; letter-spacing: -0.03em; }
.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { color: var(--mute); margin: 8px 0 0; }
.switch { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.switch:last-child { border: 0; }
.switch span { flex: 1; min-width: 0; color: var(--text); font-size: 14px; }
.switch input[type="checkbox"] {
  flex-shrink: 0;
  width: 44px;
  height: 26px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: var(--line);
  border: 1px solid color-mix(in srgb, var(--line) 80%, var(--text));
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.switch input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.22);
  transition: transform .2s ease;
}
.switch input[type="checkbox"]:checked {
  background: var(--blue);
  border-color: var(--blue);
}
.switch input[type="checkbox"]:checked::after { transform: translateX(18px); }
.switch input[type="checkbox"]:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--blue) 55%, transparent);
  outline-offset: 2px;
}

.kyc-block { display: grid; gap: 12px; }
.kyc-status-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kyc-status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: .02em;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--mute);
}
.kyc-status-pill::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor;
}
.kyc-status-pill[data-status="pending"] {
  color: var(--warn);
  background: color-mix(in srgb, var(--warn) 14%, var(--card));
  border-color: color-mix(in srgb, var(--warn) 35%, var(--line));
}
.kyc-status-pill[data-status="approved"] {
  color: var(--yes);
  background: var(--yes-bg);
  border-color: color-mix(in srgb, var(--yes) 35%, var(--line));
}
.kyc-status-pill[data-status="rejected"] {
  color: var(--no);
  background: var(--no-bg);
  border-color: color-mix(in srgb, var(--no) 35%, var(--line));
}
.kyc-lead { margin: 0; }

.kyc-drop {
  position: relative;
  display: grid; justify-items: center; gap: 6px;
  padding: 22px 16px;
  border: 1.5px dashed color-mix(in srgb, var(--blue) 35%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--blue) 6%, var(--bg-2));
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.kyc-drop:hover,
.kyc-drop:focus-within,
.kyc-drop.dragover {
  border-color: var(--blue);
  background: color-mix(in srgb, var(--blue) 10%, var(--bg-2));
}
.kyc-drop.has-file {
  border-style: solid;
  border-color: color-mix(in srgb, var(--yes) 45%, var(--line));
  background: color-mix(in srgb, var(--yes) 8%, var(--bg-2));
}
.kyc-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}
.kyc-drop-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--line);
  color: var(--blue); font-size: 22px; line-height: 1;
}
.kyc-drop-title { font-size: 14px; font-weight: 600; }
.kyc-drop-hint { margin: 0; max-width: 320px; }
.kyc-file-name {
  display: block; max-width: 100%;
  font-size: 12px; font-weight: 600; color: var(--text);
  word-break: break-all;
}
.kyc-file-name:empty { display: none; }
.kyc-pick-btn { margin-top: 2px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--faint); font-weight: 500; font-size: 12px; }

[hidden] { display: none !important; }

@media (min-width: 1500px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ud { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}
@media (max-width: 1280px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .hero, .feat-grid, .ev, .perps-page { grid-template-columns: 1fr; }
  .ud { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .perps-art { display: none; }
  .perps-page { min-height: auto; padding: 28px 0 40px; gap: 0; }
  .perps-copy h1 { font-size: 34px; max-width: none; }
}

@media (max-width: 980px) {
  .link { display: none; }
  .btn-auth-mobile { display: inline-flex !important; align-items: center; }
  #btn-login, #btn-signup { display: none !important; }
  .cabinet, .kv, .port-stats { grid-template-columns: 1fr; }
  .pos-row { grid-template-columns: minmax(0, 1fr) 70px 70px; }
  .top-inner {
    grid-template-columns: auto 1fr;
    gap: 10px;
  }
  .top-inner > .search { display: none; }
  #btn-search {
    display: grid !important;
    place-items: center;
  }
  body.search-open .top-inner > .search {
    display: flex;
    position: fixed;
    left: 10px;
    right: 10px;
    top: 56px;
    z-index: 52;
    width: auto;
    max-width: none;
    box-shadow: 0 10px 32px rgba(0, 0, 0, .35);
  }
  .search { max-width: none; }
  .search kbd { display: none; }
}

.page-event .wrap { width: 100%; max-width: 1180px; padding-left: 18px; padding-right: 18px; }
.ev {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
}
.ev-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.ev-head img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; background: var(--card); }
.ev-head h1 { margin: 0 0 4px; font-size: 26px; letter-spacing: -0.03em; line-height: 1.2; }
.ev-sub { color: var(--mute); }
.back { border: 0; background: transparent; color: var(--mute); padding: 0 0 12px; }
.back:hover { color: var(--text); }
.target { font-size: 32px; font-weight: 700; letter-spacing: -0.04em; margin: 8px 0 4px; }
.ev-chart { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.ev-chart canvas { width: 100%; height: 280px; display: block; }
.windows { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.windows button {
  height: 32px; padding: 0 10px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--mute);
}
.windows button.on, .windows button:hover { color: var(--text); background: var(--card); }
.ev-side {
  position: sticky;
  top: 80px;
  align-self: start;
  max-height: calc(100vh - 96px);
  overflow: auto;
}
.ticket { position: static; }
.quick { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 10px 0; }
.quick button { height: 52px; border: 1px solid var(--line); background: var(--bg-2); border-radius: 10px; }
.quick small { display: block; color: var(--faint); font-size: 11px; }
.rel { display: grid; gap: 8px; margin-top: 12px; }
.rel a, .rel button.rel-row {
  display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: center;
  width: 100%; text-align: left; border: 1px solid var(--line); background: var(--card);
  border-radius: 10px; padding: 8px; color: inherit;
}
.rel img { width: 28px; height: 28px; border-radius: 6px; }
.etabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 10px; }
.etabs button { border: 0; background: transparent; color: var(--mute); padding: 8px 4px; }
.etabs button.on { color: var(--text); border-bottom: 2px solid var(--blue); }
.comment { display: grid; grid-template-columns: 36px 1fr; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.comment img, .av { width: 36px; height: 36px; border-radius: 50%; background: var(--card-2); object-fit: cover; }
.comment b { display: inline; margin-right: 8px; }
.comment .meta { color: var(--faint); font-size: 12px; }
.comment p { margin: 6px 0 0; color: var(--text); line-height: 1.45; }
.composer {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 0 16px;
  border-bottom: 1px solid var(--line);
}
.composer input {
  height: 42px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  border-radius: 10px;
  padding: 0 12px;
}
.act-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.act-row .who { color: var(--text); }
.act-row .who b { margin-right: 6px; }
.act-row .det { color: var(--mute); font-size: 12px; }
.act-row .amt { font-weight: 700; text-align: right; }
.act-row .amt.up { color: #3dd68c; }
.act-row .amt.dn { color: #ff7a7a; }
.act-row time { display: block; color: var(--faint); font-size: 11px; }
.act-row.is-new { animation: flash 1.2s ease; }
@keyframes flash { from { background: rgba(47,107,255,.18); } to { background: transparent; } }
.rules { color: var(--mute); white-space: pre-wrap; line-height: 1.55; }

.combo-page {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 260px;
  gap: 20px;
  align-items: start;
}
.combo-side, .combo-build { position: sticky; top: 148px; }
.combo-side { display: grid; align-content: start; gap: 2px; }
.combo-side > button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--mute);
  padding: 9px 10px;
  border-radius: 10px;
}
.combo-side > button.on, .combo-side > button:hover { background: var(--card); color: var(--text); }
.combo-side i { font-style: normal; color: var(--faint); font-size: 12px; }
.combo-side .side-lab, .combo-league { display: flex; align-items: center; gap: 8px; }
.sport-ico, .combo-game-ico { width: 18px; height: 18px; object-fit: contain; border-radius: 4px; }
.combo-team img, .combo-team .letter { width: 28px; height: 28px; border-radius: 6px; object-fit: contain; background: var(--bg-2); }
.letter { display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--mute); background: var(--bg-2); }
.combo-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.combo-head h1 { margin: 0; font-size: 32px; letter-spacing: -0.04em; }
.combo-league { margin: 18px 0 10px; font-size: 18px; }
.combo-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 10px;
}
.combo-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--faint);
  font-size: 12px;
  margin-bottom: 10px;
}
.combo-top .live-mini { color: var(--mute); display: inline-flex; align-items: center; gap: 8px; }
.combo-top button { border: 0; background: transparent; color: var(--faint); }
.combo-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(72px, 1fr));
  gap: 8px;
  color: var(--faint);
  font-size: 11px;
  text-transform: uppercase;
  padding: 0 4px 6px;
}
.combo-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(72px, 1fr));
  gap: 8px;
  align-items: center;
  padding: 6px 0;
}
.combo-team { display: flex; align-items: center; gap: 8px; min-width: 0; }
.combo-team img { width: 28px; height: 28px; object-fit: contain; }
.combo-team b { display: block; font-size: 13px; }
.combo-team small { color: var(--faint); font-size: 11px; }
.combo-bet {
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  border-radius: 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 6px;
}
.combo-bet.on { border-color: var(--blue); background: #1a2744; }
.combo-bet:hover { border-color: #3a3b44; }
.combo-build {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.combo-build h3 { margin: 0 0 8px; }
.combo-pick { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.cat-hero { padding: 8px 0 18px; }
.cat-hero h1 { margin: 0; font-size: 32px; letter-spacing: -0.04em; }
#btn-search { display: none; }

.perps-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
  gap: 36px;
  align-items: center;
  min-height: 360px;
  padding: 36px 0 48px;
}
.perps-copy { min-width: 0; }
.perps-copy h1 {
  margin: 0 0 12px;
  font-size: 44px;
  letter-spacing: -0.05em;
  line-height: 1.12;
  max-width: 16ch;
}
.perps-copy .hint { margin: 0 0 8px; line-height: 1.55; }
.perps-note { margin-top: 14px; }
.perps-row { display: flex; gap: 10px; align-items: center; margin: 20px 0 0; flex-wrap: wrap; }
.perps-code { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); flex: 1 1 220px; min-width: 0; }
.perps-code svg { width: 16px; height: 16px; color: var(--faint); flex-shrink: 0; }
.perps-code input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; }
.perps-page .btn-blue { height: 48px; padding: 0 18px; border-radius: 12px; flex: 0 0 auto; }
.text-link { border: 0; background: transparent; color: var(--blue); padding: 0; cursor: pointer; }
.perps-art {
  height: 280px;
  border-radius: 16px;
  background: radial-gradient(circle at 30% 30%, #1b2a4a, #121318 70%);
  display: grid;
  place-items: center;
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -0.06em;
  color: #6d8cff;
}
.break-stack { display: grid; gap: 0; }
.break-mail-panel { margin-top: 28px; }
.break-news-panel { margin-top: 12px; }
.cat-topics .topic-lab,
.cat-topics .side-lab { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.cat-topics .sport-when {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.cat-topics .sport-when button {
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--mute);
  width: 100%;
  text-align: center;
}
.cat-topics .sport-when button.on {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.cat-page .combo-build {
  position: static;
  margin-top: 24px;
}
.break-hero { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 24px; border-radius: 16px; background: linear-gradient(135deg, #15203a, #1a1528 70%); margin-bottom: 16px; }
.break-hero h1 { margin: 0 0 6px; font-size: 32px; letter-spacing: -0.04em; }
.break-hero p { margin: 0; color: var(--mute); max-width: 46ch; }
.break-orbs { display: flex; gap: 10px; }
.break-orbs i { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 700; }
.break-orbs .dn { background: #3a1b1b; color: #ff7a7a; }
.break-orbs .up { background: #163528; color: #3dd68c; }
.break-list { list-style: none; margin: 0; padding: 0; }
.break-row { display: grid; grid-template-columns: 28px 40px minmax(0, 1fr) 80px 16px; gap: 10px; align-items: center; width: 100%; text-align: left; border: 0; background: transparent; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.break-row:hover { background: var(--card); }
.break-row .num { color: var(--faint); font-weight: 500; }
.break-row .thumb, .break-row img.thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--card-2); }
.break-row h4 { margin: 0; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.break-meta { display: flex; gap: 8px; font-size: 13px; margin-top: 4px; }
.break-meta .up { color: #3dd68c; }
.break-meta .dn { color: #ff7a7a; }
.spark { width: 72px; height: 28px; }
.chev { color: var(--faint); }
.news-item { display: grid; gap: 4px; width: 100%; text-align: left; border: 0; background: transparent; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--text); }
.news-item time { color: var(--faint); font-size: 12px; }

.combo-page.sports-page { grid-template-columns: 220px minmax(0, 1fr); }
.cat-page { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; align-items: start; }
.cat-page.solo { grid-template-columns: 1fr; }
.cat-topics { display: grid; align-content: start; gap: 2px; position: sticky; top: 148px; }
.cat-topics button {
  display: flex; justify-content: space-between; align-items: center;
  text-align: left; border: 0; background: transparent; color: var(--mute);
  padding: 9px 10px; border-radius: 10px;
}
.cat-topics button.on, .cat-topics button:hover { background: var(--card); color: var(--text); }
.cat-topics i { font-style: normal; color: var(--faint); font-size: 12px; }
.sport-when { display: flex; gap: 8px; margin-bottom: 10px; }
.sport-when button { height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--mute); }
.sport-when button.on { background: var(--blue); color: #fff; border-color: var(--blue); }

.site-foot { border-top: 1px solid var(--line); padding: 48px 0 28px; color: var(--mute); font-size: 13px; }
.foot-inner { width: 100%; max-width: 1220px; margin: 0 auto; padding: 0 18px; box-sizing: border-box; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; margin-bottom: 28px; }
.foot-grid h4 { margin: 0 0 12px; color: var(--text); font-size: 13px; }
.foot-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.foot-grid a, .foot-grid button {
  display: block; text-align: left; border: 0; background: transparent;
  color: var(--mute); padding: 0; line-height: 1.45;
}
.foot-grid a:hover, .foot-grid button:hover { color: var(--text); }
.foot-grid small { display: block; color: var(--faint); font-size: 12px; }
.foot-legal { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 0; padding: 16px 0; border-top: 1px solid var(--line); }
.foot-legal button { border: 0; background: transparent; color: var(--mute); padding: 0 4px; }
.foot-legal button:hover { color: var(--text); }
.foot-legal i { font-style: normal; color: var(--faint); margin: 0 8px; }
.foot-legal span { color: var(--text); }
.foot-note { color: var(--faint); font-size: 12px; line-height: 1.55; max-width: 92ch; }

.legal { max-width: 760px; padding-bottom: 80px; }
.legal h1 { margin: 0 0 16px; font-size: 32px; letter-spacing: -0.04em; }
.legal h2 { margin: 28px 0 10px; font-size: 18px; }
.legal p, .legal li { color: var(--mute); line-height: 1.6; }
.legal ul { padding-left: 18px; }

@media (max-width: 1100px) {
  .cat-page, .foot-grid, .sports-page { grid-template-columns: 1fr; }
  .cat-topics { position: static; display: flex; flex-wrap: wrap; gap: 6px; }
  .cat-topics > button { flex: 0 0 auto; }
  .cat-topics .sport-when {
    flex: 1 1 100%;
    display: flex;
    flex-direction: row;
    gap: 8px;
    margin: 0 0 4px;
    padding: 0 0 8px;
    border-bottom: 1px solid var(--line);
  }
  .cat-topics .sport-when button { width: auto; flex: 1; }
}

@media (max-width: 640px) {
  .top-inner {
    width: 100%;
    padding: 0 10px;
    grid-template-columns: auto 1fr;
    gap: 8px;
  }
  .top { height: 56px; width: 100%; }
  .top-inner { height: 56px; }
  .cats { top: 56px; width: 100%; }
  .cats-wrap { width: 100%; padding: 0 10px; }
  .logo { font-size: 17px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .top-actions { gap: 4px; flex-wrap: nowrap; align-items: center; }
  .top-actions .link { display: none; }
  #btn-signup { display: none !important; }
  .btn-auth-mobile { display: inline-flex !important; align-items: center; justify-content: center; }
  #btn-deposit {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    font-size: 12px;
    height: 34px;
    line-height: 1;
  }
  .head-cash { display: inline-flex !important; align-items: center; font-size: 12px; padding: 6px 4px; max-width: 72px; overflow: hidden; text-overflow: ellipsis; }
  .notif-btn { width: 34px; height: 34px; }
  .avatar { width: 32px; height: 32px; font-size: 12px; }
  .icon { width: 34px; height: 34px; }
  .btn-blue:not(#btn-deposit):not(.wide) { display: none; }
  .search { min-width: 0; height: 36px; padding: 0 10px; }
  .search input { font-size: 13px; }
  .wrap { width: 100%; padding: 18px 10px 88px; }
  .page-event .wrap { width: 100%; padding-left: 10px; padding-right: 10px; }

  .hero, .feat-grid { gap: 10px; }
  .feat { min-height: auto; }
  .feat h2 { font-size: 18px; }
  .prob { font-size: 28px; }
  .chart-box { min-height: 200px; }
  canvas.chart { height: 180px; }

  .grid, .ud { grid-template-columns: 1fr; gap: 10px; }
  .card { min-height: auto; padding: 12px; }
  .card h4 { font-size: 13px; }
  .row { grid-template-columns: minmax(0, 1fr) 32px 36px 36px; gap: 4px; }
  .card .mini { width: 36px; height: 26px; font-size: 11px; padding: 0 2px; }
  .bin { grid-template-columns: 72px 1fr; gap: 8px; }
  .ring { width: 72px; height: 72px; }
  .ring span { width: 54px; height: 54px; font-size: 14px; }
  .bin-btns .yes, .bin-btns .no { height: 34px; font-size: 12px; padding: 0 6px; }
  .vs-btns { gap: 4px; }
  .vs-btns button { min-height: 46px; font-size: 11px; }
  .vs-btns b { font-size: 12px; }
  .yn { gap: 6px; }
  .yes, .no { height: 40px; font-size: 13px; }

  .ev-head h1 { font-size: 20px; }
  .ev-head img { width: 40px; height: 40px; }
  .target { font-size: 24px; }
  .ev-chart canvas { height: 200px; }
  .ev { grid-template-columns: 1fr; gap: 12px; }
  .ev-side { position: static; max-height: none; order: -1; }
  .quick { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
  .quick button { height: 46px; font-size: 12px; padding: 4px; }
  .tabs { gap: 4px; }
  .tab { height: 34px; font-size: 12px; padding: 0 6px; }
  .etabs { gap: 4px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .etabs button { white-space: nowrap; flex: none; font-size: 13px; }
  .composer { grid-template-columns: 32px 1fr auto; gap: 8px; }
  .composer input { font-size: 14px; }

  .trade {
    top: auto; left: 0; right: 0; bottom: 0;
    width: 100%; max-height: 92vh;
    border-left: 0; border-top: 1px solid var(--line);
    border-radius: 16px 16px 0 0;
  }
  .trade-body { padding: 12px 14px 24px; }

  .cabinet { grid-template-columns: 1fr; gap: 12px; }
  .side-nav {
    display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
    padding-bottom: 4px; border-bottom: 1px solid var(--line);
  }
  .side-nav button { white-space: nowrap; flex: none; padding: 8px 12px; font-size: 13px; }
  .port-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .port-head h1 { font-size: 24px; }
  .port-actions { flex-wrap: wrap; }
  .port-actions .btn-blue, .port-actions .btn-ghost { flex: 1 1 auto; min-width: 120px; }
  .port-stats { grid-template-columns: 1fr; }
  .pos-row { grid-template-columns: minmax(0, 1fr) 64px 64px; gap: 6px; font-size: 12px; padding: 10px 2px; }
  .pos-mkt img, .pos-mkt .thumb { width: 32px; height: 32px; }

  .combo-page { grid-template-columns: 1fr; gap: 12px; }
  .combo-head h1 { font-size: 24px; }
  .combo-cols { font-size: 10px; grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(48px, 1fr)); }
  .combo-row { grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(48px, 1fr)); gap: 4px; }
  .combo-bet { font-size: 10px; padding: 6px 3px; min-height: 40px; }
  .combo-team b { font-size: 12px; }
  .combo-build { position: static; order: 3; }

  .perps-page {
    min-height: auto;
    padding: 20px 0 32px;
    gap: 0;
  }
  .perps-copy h1 { font-size: 28px; max-width: none; letter-spacing: -0.04em; }
  .perps-copy .hint { font-size: 14px; line-height: 1.5; }
  .perps-row { flex-direction: column; align-items: stretch; margin-top: 16px; }
  .perps-code { width: 100%; flex: 1 1 auto; height: 44px; }
  .perps-page .btn-blue { width: 100%; height: 44px; }
  .perps-art { display: none; }

  .break-hero { flex-direction: column; align-items: flex-start; padding: 18px 16px; margin-bottom: 12px; }
  .break-hero h1 { font-size: 24px; }
  .break-orbs { margin-top: 8px; }
  .break-row { grid-template-columns: 24px 36px minmax(0, 1fr) 56px; gap: 8px; padding: 10px 2px; }
  .break-row .spark { display: none; }
  .break-row .chev { display: none; }
  .break-mail-panel { margin-top: 20px; }

  .cat-hero { flex-direction: column; align-items: stretch; gap: 10px; }
  .cat-tools { flex-wrap: wrap; }
  .legal h1, .support-page-head h1, .cab-gate h1 { font-size: 24px; }

  .pay-currency-grid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }
  .modal-card { padding: 8px 14px 16px; }
  .auth-tab { font-size: 13px; }

  .site-toast { bottom: 80px; }
  .site-logo-img { max-height: 28px; vertical-align: middle; }
  .notif-btn { position: relative; }
  .notif-badge {
    position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px;
    border-radius: 999px; background: var(--no); color: #fff; font-size: 10px; line-height: 16px; text-align: center;
  }
}
