:root {
  --bg: #1A1033; --bg2: #2A1458; --fg: #F4EFFF; --muted: #B9A9E0;
  --surface: rgba(255, 255, 255, 0.07); --border: rgba(180, 150, 255, 0.28);
  --cta: linear-gradient(135deg, #FFD43B, #FFA800);
}
* { box-sizing: border-box; }
body {
  margin: 0; color: var(--fg); min-height: 100vh; padding: 16px;
  font-family: system-ui, sans-serif;
  background: var(--bg) linear-gradient(160deg, #3B1A7A 0%, #241046 45%, #170B30 100%) fixed;
}
h1 { font-size: 20px; margin: 16px 0 12px; }
button {
  background: var(--cta); color: #2A1458; border: 0; border-radius: 10px;
  padding: 10px 14px; font-size: 14px; font-weight: 700; cursor: pointer;
  box-shadow: 0 4px 14px rgba(255, 184, 0, 0.35);
}
button:active { opacity: 0.85; }
/* кнопки не растягиваются на всю ширину контейнера: размер по тексту */
button { align-self: flex-start; }
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
#menu-toggle {
  font-size: 22px; padding: 6px 12px; line-height: 1; color: #fff;
  background: linear-gradient(135deg, #34D399, #059669); border: 0;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}
#current-title { font-size: 18px; font-weight: 600; }
.menu { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.menu.hidden { display: none; }
.menu button {
  align-self: stretch;
  background: var(--surface); color: var(--fg); border: 1px solid var(--border);
  box-shadow: none; text-align: left; padding: 12px 14px; font-size: 15px; font-weight: 500;
}
.menu button.active { background: #C9CBD3; color: #1E1B2E; border-color: transparent; font-weight: 700; }
.cards { display: flex; flex-direction: column; gap: 14px; width: 88%; max-width: 380px; margin: 0 auto; }
.card {
  border-radius: 14px; padding: 16px; color: #fff;
  display: flex; flex-direction: column; gap: 10px;
}
.card.test     { background: linear-gradient(150deg, #2FA67F, #17503F); }
.card.test .test-nm { font-size: 24px; font-weight: 800; }
.card.test .test-rate { font-size: 44px; font-weight: 800; line-height: 1; margin: 2px 0 4px; }
.card.test .test-rate small { font-size: 15px; font-weight: 600; opacity: .85; }
.card.test .row b { font-weight: 700; }
.card.bronze   { background: linear-gradient(150deg, #9C6B3C, #5E3B1C); }
.card.silver   { background: linear-gradient(150deg, #8C94A3, #4B515C); }
.card.gold     { background: linear-gradient(150deg, #C4982F, #6E5618); }
.card.platinum { background: linear-gradient(150deg, #7FA6BA, #3F5A68); }
.card.diamond  { background: linear-gradient(150deg, #5FC2E0, #246179); }
.card.black_diamond { background: linear-gradient(150deg, #5E5E78, #262633); border: 1px solid rgba(255, 255, 255, 0.85); }
.card .rate { font-size: 28px; font-weight: 600; }
.row {
  display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px;
  padding: 8px 10px; margin-bottom: 6px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
}
.pin-gate { display: flex; flex-direction: column; gap: 10px; max-width: 240px; }
.pin-gate input { font-size: 16px; padding: 10px; }
.pin-gate.web-auth { max-width: 360px; margin: 24px auto; }
#bell { position: relative; margin-left: auto; padding: 6px 10px; font-size: 18px; background: var(--surface); color: var(--fg); box-shadow: none; border: 1px solid var(--border); }
#bell-count { position: absolute; top: -6px; right: -6px; min-width: 18px; padding: 1px 4px; border-radius: 9px; font-size: 11px; background: #EF4444; color: #fff; }
.banner { background: rgba(255, 212, 59, 0.15); border: 1px solid #FFD43B; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; font-size: 14px; display: flex; flex-direction: column; gap: 8px; }
.notification { display: flex; gap: 10px; padding: 10px 12px; margin-bottom: 8px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); }
.notification.unread { border-color: #FFD43B; }
.notification-icon { font-size: 18px; }
#profile-btn { padding: 0; width: 38px; height: 38px; border-radius: 50%; overflow: hidden; font-size: 18px; background: var(--surface); color: var(--fg); box-shadow: none; border: 1px solid var(--border); }
#profile-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
#profile-btn.has-photo { border-color: #FFD43B; }
.avatar-block { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.avatar-preview { width: 84px; height: 84px; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 38px; background: var(--surface); border: 2px solid var(--border); flex: 0 0 auto; }
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
button.secondary { background: var(--surface); color: var(--fg); border: 1px solid var(--border); box-shadow: none; font-weight: 500; }
.layout { display: block; }
@media (min-width: 1000px) {
  body { padding: 24px 32px; }
  .layout { display: flex; align-items: flex-start; gap: 32px; }
  .sidebar, .sidebar.hidden { display: flex; flex: 0 0 220px; position: sticky; top: 16px; }
  #menu-toggle { display: none; }
  #tab-content { flex: 1; max-width: 960px; min-width: 0; }
  .topbar { max-width: 1240px; }
}
.auth-tabs { display: flex; gap: 8px; }
.auth-tab { flex: 1; background: var(--surface); color: var(--fg); border: 1px solid var(--border); box-shadow: none; font-weight: 500; }
.auth-tab.active { background: #C9CBD3; color: #1E1B2E; font-weight: 700; }
#wa-error { color: #FFB4B4; font-size: 14px; }
#wa-error.ok { color: #86EFAC; }
#pin-error, #nick-error { color: #FFB4D6; font-size: 13px; }

input {
  background: rgba(255, 255, 255, 0.09); border: 1px solid var(--border); color: var(--fg);
  border-radius: 10px; padding: 9px; font-size: 14px;
}
input::placeholder { color: var(--muted); }
input.pw-field { display: block; width: 100%; margin-bottom: 8px; }
/* автозаполнение браузера не должно красить поле в белый или голубой */
input:-webkit-autofill, input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #3B2A63 inset; -webkit-text-fill-color: var(--fg); caret-color: var(--fg);
  transition: background-color 9999s ease-out 0s;
}
input:focus { outline: 2px solid #A855F7; }

.deposit-form, .withdraw-form {
  display: flex; flex-direction: column; gap: 8px; margin-top: 8px;
}
.deposit-result, #withdraw-result { font-size: 12px; color: var(--muted); }

.wallets { margin-bottom: 16px; }
.wallet {
  display: flex; flex-direction: column; gap: 6px; padding: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; margin-top: 8px;
}
.wallet-address { word-break: break-all; font-size: 12px; }

.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 4px 16px 14px; margin-bottom: 14px; line-height: 1.5; font-size: 14px;
}
.panel p { margin: 0 0 8px; }
.note { color: var(--muted); font-size: 12.5px; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 10px 0; }
.stat { background: rgba(255, 255, 255, 0.07); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.stat span { font-size: 12px; color: var(--muted); }
.stat b { font-size: 22px; }
.pos { color: #4ADE80; }
.neg { color: #FB7185; }

.card-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 20px; }
.card-head .subtitle { font-size: 11px; letter-spacing: 1px; opacity: 0.75; }
.card .rate small { font-size: 14px; font-weight: 400; opacity: 0.8; }
.card .annual { font-size: 13px; opacity: 0.8; margin-top: -8px; }
.card-rows { border-top: 1px solid rgba(255, 255, 255, 0.2); padding-top: 10px; }
.card .row { background: none; border: 0; padding: 4px 0; margin: 0; font-size: 14px; opacity: 1; }
.card .row span:first-child { opacity: 0.75; }
.back-btn {
  background: var(--surface); color: var(--fg); border: 1px solid var(--border);
  box-shadow: none; font-weight: 500; margin-bottom: 4px;
}

.narrow { width: 88%; max-width: 380px; margin-left: auto; margin-right: auto; }

.more-btn { margin-top: 4px; }

.balance { font-size: 18px; margin: 4px 0 6px; }
.balance.ctr-total, .balance.ctr-total b { color: #FFC83D; }
.balance.ctr-total b { font-size: 1.25em; }
select {
  background: rgba(255, 255, 255, 0.09); border: 1px solid var(--border); color: var(--fg);
  border-radius: 10px; padding: 9px; font-size: 14px;
}
select option { color: #1E1B2E; }

/* поддержка: плавающая кнопка, чат и тикеты */
#support-fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 50; align-self: auto; padding: 12px 18px; border-radius: 24px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}
#support-fab-dot { position: absolute; top: -3px; right: -3px; width: 12px; height: 12px; border-radius: 50%; background: #EF4444; border: 2px solid #fff; }
#tab-content { padding-bottom: 72px; }
textarea {
  background: rgba(255, 255, 255, 0.09); border: 1px solid var(--border); color: var(--fg);
  border-radius: 10px; padding: 9px; font-size: 14px; font-family: inherit; resize: vertical; width: 100%;
}
textarea::placeholder { color: var(--muted); }
textarea:focus { outline: 2px solid #A855F7; }
.sp-tabs { display: flex; gap: 8px; margin-bottom: 4px; }
.sp-tabs button { background: var(--surface); color: var(--fg); border: 1px solid var(--border); box-shadow: none; font-weight: 500; }
.sp-tabs button.sp-on { background: #C9CBD3; color: #1E1B2E; border-color: transparent; font-weight: 700; }
.sp-msgs { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow-y: auto; padding: 4px 0; margin-bottom: 10px; }
.sp-msg { max-width: 88%; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.sp-user { align-self: flex-end; background: rgba(168, 85, 247, 0.22); }
.sp-admin { align-self: flex-start; }
.sp-who { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.sp-text { white-space: pre-wrap; word-break: break-word; font-size: 14px; }
.sp-img { display: block; max-width: 100%; max-height: 180px; margin-top: 6px; border-radius: 8px; cursor: zoom-in; }
.sp-composer { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
#sp-lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(10, 5, 25, 0.94); display: flex; flex-direction: column; }
.sp-lb-scroll { flex: 1; overflow: auto; display: flex; align-items: center; justify-content: center; padding: 48px 12px 40px; }
.sp-lb-scroll img { max-width: 100%; max-height: 100%; cursor: zoom-in; border-radius: 6px; }
#sp-lightbox.sp-lb-full .sp-lb-scroll { align-items: flex-start; justify-content: flex-start; }
#sp-lightbox.sp-lb-full .sp-lb-scroll img { max-width: none; max-height: none; cursor: zoom-out; margin: auto; }
#sp-lb-close { position: absolute; top: 10px; right: 12px; z-index: 2; align-self: auto; padding: 8px 12px; border-radius: 20px; }
.sp-lb-hint { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; font-size: 12px; color: var(--muted); }
.contact-btn { align-self: auto; padding: 2px 10px; margin-left: 6px; font-size: 12px; border-radius: 12px; box-shadow: none; }
#contact-card { position: fixed; inset: 0; z-index: 100; background: rgba(10, 5, 25, 0.8); display: flex; align-items: center; justify-content: center; padding: 16px; }
.contact-panel {
  position: relative; width: 100%; max-width: 380px; padding: 18px 16px 16px; border-radius: 14px;
  background: #2A1458; border: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px;
}
.contact-panel .row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 4px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.contact-panel .row span:first-child { color: var(--muted); }
.contact-panel .row span:last-child { text-align: right; word-break: break-word; }
.contact-head { display: flex; align-items: center; gap: 10px; font-size: 18px; margin-bottom: 6px; }
.mini-avatar.big { width: 48px; height: 48px; font-size: 26px; }
#contact-close { position: absolute; top: 8px; right: 8px; align-self: auto; padding: 4px 9px; border-radius: 14px; box-shadow: none; }
.contact-write {
  display: block; text-align: center; margin-top: 10px; padding: 11px; border-radius: 10px; text-decoration: none;
  background: var(--cta); color: #2A1458; font-weight: 700;
}
/* важное предупреждение: жёлтая рамка с красной полосой, чтобы бросалось в глаза */
.important-box {
  margin: 10px 0; padding: 12px 14px; border: 3px solid #FFD43B; border-left: 10px solid #EF4444; border-radius: 10px;
  background: rgba(239, 68, 68, 0.16); font-size: 15px; line-height: 1.45; color: #FFF;
}
.important-box b:first-child { color: #FFD43B; font-size: 18px; letter-spacing: 0.5px; }
.sp-row { cursor: pointer; }
.sp-attach {
  align-self: flex-start; padding: 9px 14px; border-radius: 10px; font-size: 14px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--fg);
}
.sp-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.sp-files { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-chip { background: rgba(168, 85, 247, 0.22); border: 1px solid var(--border); border-radius: 14px; padding: 3px 10px; font-size: 12.5px; }
.sp-chip b { cursor: pointer; margin-left: 4px; }
.sp-new { color: #4ADE80; font-size: 12px; font-weight: 700; }

.faq { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 15px; }
.faq p { margin: 10px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); }

[hidden] { display: none !important; }

.trade { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 3px; }
.trade-top { display: flex; justify-content: space-between; gap: 8px; font-size: 15px; }
.trade-link { color: #FFD43B; text-decoration: underline; text-underline-offset: 3px; }

.inline-link { color: #FFD43B; text-decoration: underline; text-underline-offset: 3px; }
.warn { color: #FFB4D6; }
.topup-box { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.badge { background: rgba(255, 255, 255, 0.14); border-radius: 999px; padding: 1px 9px; font-size: 13px; margin-left: 8px; }
.level { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; margin-bottom: 8px; }
.level > summary { display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-weight: 600; }
.level-empty { display: flex; justify-content: space-between; align-items: center; color: var(--muted); }
.member { padding: 6px 0 6px 4px; font-size: 14px; }
.member > summary { cursor: pointer; }
.member-children { margin-left: 14px; border-left: 1px solid var(--border); padding-left: 10px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #6B6B7F; margin-right: 8px; }
.dot.on { background: #4ADE80; }
.row-details > summary { list-style: none; cursor: pointer; }
.row.sub { margin-left: 14px; opacity: 0.9; }
.row.net { font-weight: 700; font-size: 15px; }
.feed { padding: 8px 2px; border-bottom: 1px solid var(--border); }
.feed-top { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }

.guide-video { width: 100%; max-height: 75vh; border-radius: 12px; background: #000; margin: 8px 0; }

.topbar-logo { margin-left: 0; width: 38px; height: 38px; }
.hero-logo { text-align: center; margin: 2px 0 10px; }
.hero-logo img { width: 92px; height: 92px; }
.gate-logo { width: 72px; height: 72px; margin-bottom: 4px; }

.level-right { display: flex; align-items: center; gap: 10px; }
.level-pct { color: #FFD43B; font-weight: 700; min-width: 44px; text-align: right; }
.level-closed { opacity: .55; }

.faq p { white-space: pre-line; }
.stars { display: inline-flex; gap: 3px; }
.star { width: 22px; height: 22px; fill: rgba(255, 255, 255, .16); }
.star.on { fill: #FFD43B; filter: drop-shadow(0 0 4px rgba(255, 212, 59, .5)); }
.web-auth .gate-logo { width: 96px; height: 96px; align-self: center; margin-bottom: 8px; }

.pkg-title { display: flex; align-items: center; gap: 10px; }
.pkg-check { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, #34D399, #059669); color: #fff; font-size: 16px; font-weight: 700; box-shadow: 0 2px 10px rgba(16, 185, 129, 0.5); }
.status-active { color: #4ADE80; font-weight: 700; }
.tx-plus { color: #4ADE80; font-weight: 600; }
.tx-minus { color: #FB7185; font-weight: 600; }

/* реферальные ссылки: строка со ссылкой и маленькой кнопкой «сохранить» */
.ref-row { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 6px 6px 6px 12px; }
.ref-url { flex: 1; min-width: 0; word-break: break-all; font-size: 12px; }
/* ссылка для приглашения на вебинар: мягкая пульсация бледно-жёлтым, чтобы её замечали */
.ref-pulse { border-color: rgba(255, 224, 130, .55); animation: refPulse 2.4s ease-in-out infinite; }
.ref-pulse .ref-url { color: #ffe9a8; font-weight: 600; }
@keyframes refPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 224, 130, 0), inset 0 0 0 0 rgba(255, 224, 130, 0); background-color: var(--surface); border-color: rgba(255, 224, 130, .35); }
  50% { box-shadow: 0 0 14px 2px rgba(255, 224, 130, .45), inset 0 0 18px 0 rgba(255, 224, 130, .14); background-color: rgba(255, 224, 130, .10); border-color: rgba(255, 224, 130, .9); }
}
@media (prefers-reduced-motion: reduce) { .ref-pulse { animation: none; box-shadow: 0 0 10px 1px rgba(255, 224, 130, .35); } }
button.ref-copy { flex: none; width: 36px; height: 36px; padding: 0; display: grid; place-items: center; background: transparent; color: var(--fg); border: 1px solid var(--border); border-radius: 8px; box-shadow: none; font-weight: 400; }
button.ref-copy.ok { color: #34D399; border-color: #34D399; }
.ref-done { min-height: 18px; margin: 2px 0 8px; font-size: 13px; color: #34D399; }
.ref-done.bad { color: #F59E0B; }

/* плашка «Привяжите Telegram»: текст и маленькая кнопка в одной строке */
.banner.banner-row { flex-direction: row; align-items: center; justify-content: space-between; gap: 14px; }
.banner.banner-row .banner-btn { flex: none; width: auto; padding: 7px 16px; font-size: 14px; }
@media (max-width: 600px) { .banner.banner-row { flex-direction: column; align-items: flex-start; } }

.pin-gate button { align-self: stretch; }

/* спонсор и приглашённые: фото-кружок и ссылка на Telegram */
.sponsor { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0 14px; }
.mini-avatar { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; display: inline-grid; place-items: center; background: var(--surface); border: 1px solid var(--border); font-size: 16px; vertical-align: middle; margin-right: 6px; flex: none; }
.mini-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.contact-tg { margin-left: 6px; font-size: 13px; }

/* ссылка на Telegram Mini App в браузерной версии */
.tg-app-link { margin-left: auto; padding: 7px 14px; border-radius: 10px; font-size: 14px; font-weight: 700; color: #fff; text-decoration: none; background: linear-gradient(135deg, #34D399, #059669); box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35); white-space: nowrap; }
.tg-app-link:hover { filter: brightness(1.08); }
.tg-app-link + #bell { margin-left: 0; }
@media (max-width: 520px) { .tg-app-link { padding: 6px 9px; font-size: 12px; } .topbar-logo { flex: none; } }

/* лидерский пакет */
.leader-card { border: 1px solid #FFD43B; }
.stage-row { margin: 10px 0; }
.progress { height: 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.12); overflow: hidden; margin: 6px 0 2px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, #34D399, #059669); }

.hero-logo a, .topbar-logo-link { display: inline-block; line-height: 0; cursor: pointer; }

/* шкалы прогресса по срокам */
.timeline { margin: 12px 0; }
.timeline-top { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 4px; }
.progress.progress-long { height: 12px; border-radius: 8px; }

/* стартовая акция */
.promo-banner { position: relative; overflow: hidden; margin: 6px 0 14px; padding: 16px; border-radius: 20px; color: #2A1458;
  background: linear-gradient(135deg, #FFE27A 0%, #FFC83D 45%, #FF9F1C 100%); box-shadow: 0 8px 30px rgba(255, 170, 0, .45); }
.promo-banner::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); transform: skewX(-20deg); animation: promo-shine 3.6s ease-in-out infinite; pointer-events: none; }
@keyframes promo-shine { 0% { left: -60%; } 55%, 100% { left: 130%; } }
.promo-kicker { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.promo-banner h2 { margin: 4px 0 6px; font-size: 24px; line-height: 1.15; font-weight: 900; }
.promo-text { margin: 0 0 10px; font-size: 14px; line-height: 1.4; }
.promo-timer-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: rgba(42, 20, 88, .9); color: #FFD43B;
  border-radius: 12px; padding: 8px 12px; font-size: 13px; font-weight: 700; }
.promo-timer { font-variant-numeric: tabular-nums; font-size: 20px; font-weight: 900; color: #fff; }
.promo-rates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0; }
.promo-rates div { background: rgba(255, 255, 255, .55); border-radius: 12px; padding: 6px 4px; text-align: center; }
.promo-rates span { display: block; font-size: 11px; font-weight: 700; } .promo-rates b { display: block; font-size: 18px; font-weight: 900; }
.promo-rates small { font-size: 10px; opacity: .75; }
.promo-btn { width: 100%; background: #2A1458; color: #FFD43B; border: 0; border-radius: 12px; padding: 12px; font-size: 15px; font-weight: 800; cursor: pointer; }
.promo-rate { color: #FFD43B; }
.promo-tag, .promo-chip { display: inline-block; font-size: 12px; font-weight: 800; color: #2A1458; background: linear-gradient(135deg, #FFE27A, #FFB300); border-radius: 999px; padding: 2px 10px; }
.promo-tag { margin: 2px 0 4px; }

.promo-note { color: #FFC83D; font-weight: 700; }

/* раздел «Реклама» */
.rk-task { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; padding: 10px 12px; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 12px; background: rgba(255, 255, 255, 0.05); }
.rk-task input[type="file"] { font-size: 12.5px; color: var(--muted); }

.rk-locked { opacity: 0.55; }
.rk-share-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.rk-share { padding: 10px 16px; font-size: 14px; border-radius: 12px; background: #ffc83d; color: #2a1500; font-weight: 700; }
.rk-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.rk-tab { padding: 6px 12px; font-size: 13px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); color: #e4dcff; box-shadow: none; }
.rk-tab.active { background: rgba(255, 200, 61, 0.22); color: #ffc83d; }
.rk-check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.rk-copy pre { white-space: pre-wrap; word-break: break-word; margin: 6px 0; font: inherit; font-size: 13.5px; line-height: 1.45; }
.rk-image { width: 100%; max-width: 360px; border-radius: 10px; }
.rk-watch { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.rk-watch-fill { height: 100%; width: 0; background: #ffc83d; transition: width 0.4s; }
#ad-yt-player { width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; border-radius: 10px; }
.btn-link { color: #ffc83d; text-decoration: underline; font-size: 14px; }
/* уведомления: пассивные бонусы за день одной строкой со стрелкой */
.notification-group { display: block; padding: 0; }
.notification-group > summary { display: flex; gap: 10px; padding: 10px 12px; cursor: pointer; list-style: none; position: relative; padding-right: 32px; }
.notification-group > summary::-webkit-details-marker { display: none; }
.notification-group > summary::after { content: "▸"; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); transition: transform 0.15s; }
.notification-group[open] > summary::after { transform: translateY(-50%) rotate(90deg); }
.notification-rows { padding: 0 12px 10px 40px; }

.rk-cond{margin:8px 0 12px}.rk-cond summary{cursor:pointer;font-weight:600;padding:6px 0}

.rk-done-card{display:flex;flex-direction:row;align-items:center;gap:14px}
.rk-check-big{flex:none;width:44px;height:44px;border-radius:50%;background:#22c55e;color:#fff;font-size:26px;font-weight:800;display:flex;align-items:center;justify-content:center;box-shadow:0 0 0 4px rgba(34,197,94,.25)}

.rk-after{margin:4px 0 10px;padding-left:20px;font-size:14px;opacity:.9}.rk-after li{margin:4px 0}
.topup-steps { margin: 6px 0 10px; padding-left: 20px; }
.topup-hash-details { margin-top: 16px; }
.topup-hash-details summary { cursor: pointer; opacity: .85; padding: 8px 0; }

.rk-wait-big{flex:none;width:44px;height:44px;border-radius:50%;background:rgba(255,200,61,.18);font-size:24px;display:flex;align-items:center;justify-content:center}

.rk-redo{margin:6px 0;padding:10px 12px;border-radius:10px;color:#fff3c4;font-size:14px;border:1px solid rgba(255,200,61,.6);background:rgba(255,200,61,.18);animation:rk-pulse 1.8s ease-in-out infinite}
@keyframes rk-pulse{0%,100%{background:rgba(255,200,61,.12);box-shadow:0 0 0 0 rgba(255,200,61,0)}50%{background:rgba(255,200,61,.36);box-shadow:0 0 14px 2px rgba(255,200,61,.45)}}
@media (prefers-reduced-motion: reduce){.rk-redo{animation:none}}

.rk-points{margin:8px 0;padding:12px 14px;border:1px solid rgba(255,255,255,.14);border-radius:12px;background:rgba(255,255,255,.05)}
.rk-points-head{display:flex;justify-content:space-between;align-items:baseline;font-size:15px}
.rk-bar{margin-top:10px;height:14px;border-radius:7px;background:rgba(255,255,255,.08);border:1px solid rgba(255,200,61,.35);overflow:hidden}
.rk-bar-fill{height:100%;min-width:0;border-radius:7px;background:linear-gradient(90deg,#ffb300,#ffd54f);box-shadow:0 0 10px rgba(255,200,61,.55);transition:width .6s ease}
.rk-bar-note{margin-top:6px;font-size:12.5px;opacity:.75}
.rk-plus{color:#ffd54f;font-weight:700}

.notification-group > summary::after { content: none; }
.more-link::before { content: "Подробнее ⋯"; }
details[open] > summary .more-link::before { content: "Свернуть ▲"; }
.more-link { display: inline-block; margin-top: 4px; font-size: 13px; font-weight: 600; color: #ffc83d; }
.tx-group > summary { list-style: none; cursor: pointer; }
.tx-group > summary::-webkit-details-marker { display: none; }
.tx-group { margin-bottom: 0; }

.rk-bar-days .rk-bar-fill{background:linear-gradient(90deg,#ffb300,#ffe14d);box-shadow:0 0 12px rgba(255,214,0,.7)}
.rk-scale{margin:12px 4px 18px}
.rk-scale-track{position:relative;padding:6px 0}
.rk-scale-track .rk-bar{margin-top:0}
.rk-mark{position:absolute;top:50%;width:16px;height:16px;border-radius:50%;transform:translate(-50%,-50%);background:#2b1d4f;border:2px solid rgba(255,200,61,.7)}
.rk-mark.done{background:#22c55e;border-color:#86efac;box-shadow:0 0 8px rgba(34,197,94,.7)}
.rk-scale-labels{position:relative;height:24px;margin-top:4px}
.rk-scale-label{position:absolute;top:0;transform:translateX(-50%);font-size:12px;font-weight:700;color:#ffd54f;white-space:nowrap}
.rk-scale-label.last{transform:translateX(-85%)}
.rk-scale-label.done{color:#4ade80}
.rk-bar-fill.full{background:linear-gradient(90deg,#16a34a,#4ade80);box-shadow:0 0 12px rgba(74,222,128,.7)}

.rk-bar-days + .rk-bar-note{margin-bottom:10px}
.rk-bar-days{margin-top:8px}

.row.sub.tier-done .level-pct{color:#4ade80}
.guide-steps { padding-left: 20px; display: flex; flex-direction: column; gap: 10px; line-height: 1.5; }

.guide-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* История начислений баллов и CTR: крупнее шрифт и выделенная область */
.ctr-history { background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 200, 61, 0.35); border-radius: 16px; padding: 8px 16px; }
.ctr-history .row { font-size: 18px; padding: 12px 0; }
.ctr-history .row small { font-size: 15px; opacity: 0.8; }
.ctr-history .row > span:last-child { font-weight: 700; color: #FFC83D; white-space: nowrap; }

/* Ссылка на Telegram-чат в истории баллов: привычный синий, читается на тёмном фоне */
.ctr-history a.tg-link { color: #5AB1FF; text-decoration: underline; text-underline-offset: 3px; }

/* Мои CTR: меню разделов со стрелкой вправо и раскрывающаяся расшифровка наград */
.ctr-menu button { display: flex; justify-content: space-between; align-items: center; }
.ctr-menu .chev { font-size: 22px; line-height: 1; opacity: 0.7; }
.ctr-detail > summary { list-style: none; cursor: pointer; }
.ctr-detail > summary::-webkit-details-marker { display: none; }
.ctr-details { padding: 4px 0 10px; }
.ctr-person { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.ctr-person-name { font-weight: 700; font-size: 16px; margin-bottom: 2px; }
.ctr-ok { color: #4ade80; }
.ctr-no { color: #ff6b6b; }

/* Вебинары: каждый вебинар свёрнут в одну строку со стрелкой, подробности открываются по нажатию */
.webinar-card, .fold { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; margin-bottom: 10px; padding: 0 16px; }
.webinar-card > summary, .fold > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 14px 0; font-weight: 700; font-size: 16px; }
.webinar-card > summary::-webkit-details-marker, .fold > summary::-webkit-details-marker { display: none; }
.webinar-card .chev, .fold .chev { font-size: 22px; line-height: 1; opacity: .7; transition: transform .2s; }
.webinar-card[open] .chev, .fold[open] .chev { transform: rotate(90deg); }
.webinar-body { padding: 0 0 12px; line-height: 1.5; font-size: 14px; }
.webinar-body p { margin: 0 0 8px; word-break: break-word; }

.fold-body { padding: 0 0 14px; line-height: 1.5; font-size: 14px; }
.fold-body .withdraw-form { margin: 0; }

/* Вывод CTR: подробности транзакции из блокчейна */
.ctr-wd-body { padding: 4px 0 12px; font-size: 14px; line-height: 1.45; }
.wd-line { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.wd-k { font-size: 12px; opacity: .65; }
.wd-v { word-break: break-all; }
.wd-hash { font-family: ui-monospace, Consolas, monospace; font-size: 12px; word-break: break-all; }
.ctr-wd-copy { margin-left: 6px; padding: 2px 10px; font-size: 12px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.25); background: transparent; color: inherit; cursor: pointer; }

/* история CTR: приход зелёным, расход красным (перебивает жёлтый цвет суммы в списке) */
.ctr-history .row > span.tx-plus, .ctr-history .tx-plus { color: #4ADE80; }
.ctr-history .row > span.tx-minus, .ctr-history .tx-minus { color: #FB7185; }

.page-size { display: flex; align-items: center; gap: 8px; margin: 10px 0 18px; }
.size-btn { min-width: 40px; padding: 6px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.25); background: transparent; color: inherit; cursor: pointer; }
.size-btn.active { background: #FFC83D; color: #1b1030; border-color: #FFC83D; font-weight: 700; }

.ctr-history .row > span.wrap-any { min-width: 0; word-break: break-all; }
.ctr-history .row > .ctr-wd-copy { flex-shrink: 0; margin-left: 8px; }

.calc-form label { display: block; margin: 0 0 12px; font-size: 14px; }
.calc-form input[type="number"], .calc-form select { display: block; width: 100%; margin-top: 4px; box-sizing: border-box; }
.calc-form .calc-check { display: flex; align-items: center; gap: 8px; }
.calc-form .calc-check input { width: auto; margin: 0; }
.calc-row > span { display: block; font-size: 14px; }
.calc-big { margin-top: 12px; }
.calc-kpi { text-align: center; margin: 4px 0 14px; }
.calc-kpi b { display: block; font-size: 34px; color: #FFC83D; line-height: 1.2; }
.calc-double { margin: 10px 0 0; text-align: center; color: #4ADE80; }
.calc-actions { display: flex; gap: 10px; margin: 12px 0; }
.calc-actions button { flex: 1; }

/* ИИ-ассистент «Виртуальный спонсор»: добрый робот над кнопкой «Поддержка» (без рамки, с подписью) и окно чата */
#ai-dock {
  position: fixed; right: 12px; bottom: 74px; z-index: 50; width: 150px; animation: ai-bob 3.4s ease-in-out infinite;
}
#ai-dock[hidden] { display: none; }
#ai-fab {
  width: 100%; padding: 0; border: none; border-radius: 0; background: none; box-shadow: none; align-self: auto; display: flex; flex-direction: column;
  align-items: center; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
#ai-fab-x {
  position: absolute; top: -4px; right: 4px; width: 26px; height: 26px; padding: 0; border-radius: 50%; align-self: auto; display: flex; align-items: center; justify-content: center;
  background: rgba(26, 16, 51, 0.92); color: #F4EFFF; border: 1px solid rgba(190, 160, 255, 0.55); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); font-size: 18px; line-height: 1; cursor: pointer;
}
#ai-fab-x::after { content: ""; position: absolute; inset: -9px; }      /* большая область нажатия для пальца */
.ai-bot-wrap { position: relative; display: block; width: 100%; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 12px rgba(125, 211, 252, 0.35)); pointer-events: none; }
.ai-bot { display: block; width: 100%; height: auto; }
.ai-bot-blink { position: absolute; left: 0; top: 0; opacity: 0; animation: ai-blink 5s ease-in-out infinite; }
@keyframes ai-blink { 0%, 91% { opacity: 0; } 92.5%, 94.5% { opacity: 1; } 96%, 100% { opacity: 0; } }
.ai-tag { margin-top: -6px; background: var(--cta); color: #2A1458; font-size: 12px; font-weight: 800; border-radius: 12px; padding: 3px 10px; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45); white-space: nowrap; }
@keyframes ai-bob { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-6px) rotate(1.5deg); } }
@media (prefers-reduced-motion: reduce) { #ai-dock, .ai-bot-blink { animation: none; } }
@media (max-width: 520px) { #ai-dock { width: 124px; right: 6px; } }

#ai-panel {
  position: fixed; right: 16px; bottom: 16px; z-index: 70; width: min(420px, calc(100vw - 24px)); height: min(640px, calc(100vh - 32px));
  display: flex; flex-direction: column; border-radius: 18px; border: 1px solid var(--border); overflow: hidden;
  background: linear-gradient(160deg, #2A1458 0%, #1A1033 70%); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}
#ai-panel[hidden] { display: none; }
.ai-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border); background: rgba(255, 255, 255, 0.05); }
.ai-head .ai-ava { width: 54px; height: 44px; object-fit: contain; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5)); }
.ai-head-t { flex: 1; min-width: 0; }
.ai-head-t b { display: block; color: #FFD43B; font-size: 15px; }
.ai-head-t span { font-size: 11.5px; color: var(--muted); }
#ai-close { align-self: auto; background: transparent; color: var(--fg); box-shadow: none; border: none; font-size: 22px; padding: 2px 8px; }
.ai-note { font-size: 11.5px; color: var(--muted); padding: 6px 12px; border-bottom: 1px solid var(--border); }
#ai-msgs { flex: 1; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.ai-prev { align-self: stretch; padding: 10px 12px; border-radius: 12px; color: #fff3c4; font-size: 14px; font-weight: 600; cursor: pointer; border: 1px solid rgba(255, 224, 130, .6); background: rgba(255, 200, 61, .18); animation: ai-prev-pulse 2s ease-in-out infinite; }
@keyframes ai-prev-pulse { 0%, 100% { background: rgba(255, 200, 61, .12); box-shadow: 0 0 0 0 rgba(255, 200, 61, 0); } 50% { background: rgba(255, 200, 61, .34); box-shadow: 0 0 14px 2px rgba(255, 200, 61, .45); } }
@media (prefers-reduced-motion: reduce) { .ai-prev { animation: none; box-shadow: 0 0 10px 1px rgba(255, 224, 130, .35); } }
.ai-m { max-width: 88%; padding: 8px 12px; border-radius: 14px; font-size: 14px; line-height: 1.4; word-break: break-word; }
.ai-m.bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); }
.ai-m.me { align-self: flex-end; background: rgba(168, 85, 247, 0.28); border: 1px solid var(--border); }
.ai-m.err { align-self: center; color: #FCA5A5; font-size: 12.5px; text-align: center; }
.ai-typing span { display: inline-block; width: 7px; height: 7px; margin: 0 2px; border-radius: 50%; background: var(--muted); animation: ai-dot 1.2s infinite; }
.ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes ai-dot { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.ai-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 12px 8px; }
.ai-quick button { align-self: auto; background: var(--surface); color: var(--fg); border: 1px solid var(--border); box-shadow: none; font-weight: 500; font-size: 12.5px; padding: 6px 10px; border-radius: 14px; }
.ai-files { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px; }
.ai-files:empty { display: none; }
.ai-compose { display: flex; gap: 6px; align-items: flex-end; padding: 8px 12px 12px; border-top: 1px solid var(--border); }
.ai-compose textarea { flex: 1; resize: none; min-height: 40px; max-height: 110px; margin: 0; }
.ai-compose button { align-self: auto; padding: 9px 12px; }
#ai-attach { background: var(--surface); color: var(--fg); border: 1px solid var(--border); box-shadow: none; font-size: 16px; }
@media (max-width: 520px) { #ai-panel { right: 8px; left: 8px; bottom: 8px; width: auto; height: calc(100vh - 16px); } }
.ai-quick[hidden] { display: none; }

.ai-rec { display: flex; align-items: center; gap: 8px; padding: 6px 12px; font-size: 13px; color: #FCA5A5; }
.ai-rec[hidden] { display: none; }
.ai-rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #EF4444; animation: ai-rec-pulse 1s ease-in-out infinite; }
.ai-rec button { margin-left: auto; align-self: auto; background: transparent; color: var(--muted); border: 1px solid var(--border); box-shadow: none; font-weight: 500; font-size: 12px; padding: 3px 10px; }
#ai-mic { background: var(--surface); color: var(--fg); border: 1px solid var(--border); box-shadow: none; font-size: 16px; padding: 9px 11px; }
#ai-mic[hidden] { display: none; }
#ai-mic.ai-mic-on { background: #EF4444; border-color: #EF4444; color: #fff; animation: ai-rec-pulse 1s ease-in-out infinite; }
@keyframes ai-rec-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

.ai-files-out { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 8px; }
.ai-dl { display: inline-block; max-width: 100%; background: var(--cta); color: #2A1458; font-weight: 700; font-size: 12px; padding: 6px 11px; border-radius: 10px; text-decoration: none; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); word-break: break-word; }
.ai-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.ai-link { color: #FFD43B; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; word-break: break-word; }
.ai-copy-link { color: #B9A9E0; font-size: 12px; text-decoration: none; border-bottom: 1px dotted #B9A9E0; }

/* автовебинар: страница сеанса */
.aw-card-live { border: 1px solid var(--accent, #f5c342); }
.aw-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; }
.aw-stage iframe, .aw-stage #aw-player { position: absolute; inset: 0; width: 100%; height: 100%; }
.aw-shield { position: absolute; inset: 0; z-index: 2; }
.aw-start { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: rgba(10, 8, 30, 0.86); color: #fff; text-align: center; padding: 16px; }
.aw-start[hidden] { display: none; }
.aw-codebar { margin-top: 12px; text-align: center; }
.aw-code-title { font-weight: 600; margin-bottom: 6px; }
.aw-code { font-size: 54px; font-weight: 800; letter-spacing: 0.18em; margin: 6px 0 10px; font-variant-numeric: tabular-nums; color: var(--accent, #f5c342); }
.aw-code-row { display: flex; gap: 8px; justify-content: center; align-items: center; }
.aw-code-row input { width: 9em; font-size: 22px; text-align: center; letter-spacing: 0.2em; }
.aw-alarm { border: 3px solid #ff4d4d; animation: awPulse 0.9s ease-in-out infinite; }
@keyframes awPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.7); transform: scale(1); } 50% { box-shadow: 0 0 0 14px rgba(255, 77, 77, 0); transform: scale(1.02); } }
