/* BlueBerry — «Ночная черника» */
:root {
  --bg: #0B0F1E;
  --surface: #141A2E;
  --surface-2: #0F1426;
  --line: #1E2640;
  --line-2: #2F3B63;
  --text: #E8ECF8;
  --muted: #B4BCD4;
  --dim: #9AA3BD;
  --white: #FFFFFF;
  --accent: #5B8CFF;
  --accent-ink: #0B0F1E;
  --code: #C4D4FF;
  --mint: #9BE7B5;
  --danger: #FF6B6B;
  --radius: 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: 'Manrope', system-ui, sans-serif; font-size: 16px; line-height: 1.6;
}
a { color: #8FB0FF; }
a:hover { color: #C4D4FF; }
img { max-width: 100%; }
code, .mono { font-family: 'JetBrains Mono', ui-monospace, monospace; color: var(--code); }
h1, h2, h3 { color: var(--white); margin: 0; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.display { font-family: 'Unbounded', sans-serif; font-weight: 700; letter-spacing: -0.02em; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; z-index: 10; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* --- кнопки --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 12px 20px; border-radius: 12px; border: 1px solid transparent;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn-lg { min-height: 52px; padding: 15px 28px; font-size: 17px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #7AA2FF; color: var(--accent-ink); }
.btn-ghost { border-color: var(--line-2); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--white); }
.btn-danger { background: transparent; border-color: var(--danger); color: #FF9B9B; }
.btn-danger:hover { background: var(--danger); color: var(--accent-ink); }
.btn-dark { background: var(--bg); color: var(--white); }
.btn-dark:hover { background: #1A2140; color: var(--white); }
.btn-outline-dark { border: 2px solid var(--bg); color: var(--bg); }
.btn-outline-dark:hover { background: rgba(11, 15, 30, .1); color: var(--bg); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 9px; }

/* --- шапка --- */
.site-header { border-bottom: 1px solid var(--line); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; padding-top: 16px; padding-bottom: 16px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--white); text-decoration: none; font-family: 'Unbounded', sans-serif; font-weight: 700; font-size: 20px; }
.logo:hover { color: var(--white); }
.nav-links { display: flex; flex-wrap: wrap; gap: 6px 24px; flex: 1 1 auto; }
.nav-links a { color: var(--muted); text-decoration: none; font-weight: 500; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--white); }
.nav-user { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--surface); }
.avatar-lg { width: 72px; height: 72px; }
.inline-form { display: inline; margin: 0; }

.banner { background: var(--accent); color: var(--accent-ink); font-weight: 700; text-align: center; padding: 10px 24px; }
.flash { margin: 20px auto 0; max-width: 1112px; padding: 14px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2); }

/* --- главная --- */
.hero { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; padding-top: 88px; padding-bottom: 72px; }
.hero-text { flex: 1 1 460px; min-width: 0; }
.hero-card { flex: 1 1 420px; min-width: 0; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border: 1px solid #2A3557; border-radius: 999px; color: var(--muted); font-size: 14px; font-weight: 500; margin: 0 0 20px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); }
.hero h1 { font-size: clamp(36px, 5.2vw, 56px); line-height: 1.08; margin-bottom: 24px; }
.lead { font-size: 19px; color: var(--muted); max-width: 540px; margin: 0 0 36px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 40px; }
.stats { display: flex; flex-wrap: wrap; gap: 32px; }
.stat-num { font-family: 'Unbounded', sans-serif; font-weight: 700; font-size: 28px; color: var(--white); }
.stat-label { color: var(--dim); font-size: 14px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; }
.mock { display: flex; flex-direction: column; gap: 18px; }
.mock-cmd { display: flex; gap: 12px; align-items: center; color: var(--dim); font-size: 14px; }
.chip { font-family: 'JetBrains Mono', monospace; background: var(--line); color: var(--code); padding: 4px 10px; border-radius: 6px; }
.msg { display: flex; gap: 14px; }
.msg-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); flex: none; }
.msg-body { flex: 1 1 auto; min-width: 0; }
.msg-name { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.tag-bot { background: #5865F2; color: #fff; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; }
.embed { background: var(--surface-2); border-left: 4px solid var(--mint); border-radius: 6px; padding: 14px 16px; color: #C9D0E4; font-size: 15px; }
.embed b { color: var(--white); }
.bank-card { background: #3A5FD0; border-radius: 16px; padding: 22px; color: #fff; display: flex; flex-direction: column; gap: 14px; }
.bank-top { display: flex; justify-content: space-between; font-family: 'Unbounded', sans-serif; font-weight: 700; font-size: 15px; }
.bank-chip { width: 44px; height: 32px; border-radius: 6px; background: #E6BE5A; }
.bank-num { font-family: 'JetBrains Mono', monospace; font-size: 20px; letter-spacing: .08em; }
.bank-row { display: flex; flex-wrap: wrap; gap: 28px; }
.bank-row small { display: block; font-size: 12px; opacity: .85; }
.bank-row strong { font-size: 20px; }

.section { padding-top: 72px; padding-bottom: 72px; }
.section-title { font-size: clamp(28px, 3.4vw, 36px); margin-bottom: 12px; }
.section-lead { color: var(--muted); font-size: 18px; max-width: 660px; margin: 0 0 40px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.card h3 { margin: 16px 0 8px; font-size: 20px; }
.card p { margin: 0; color: var(--muted); }
.icon { width: 28px; height: 28px; stroke: #8FB0FF; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.cmd-box { display: flex; flex-wrap: wrap; gap: 40px; padding: 40px; border-radius: 24px; }
.cmd-side { flex: 1 1 300px; min-width: 0; }
.cmd-list { flex: 2 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.cmd-row { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 14px 18px; background: var(--surface-2); border-radius: 12px; }
.cmd-row code { min-width: 210px; }
.cmd-row span { color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { border: 1px solid var(--line-2); color: #C9D0E4; padding: 8px 14px; border-radius: 999px; font-size: 14px; text-decoration: none; }
.tag:hover { border-color: var(--accent); color: var(--white); }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; list-style: none; padding: 0; margin: 0; }
.steps li { border-top: 2px solid var(--accent); padding-top: 24px; }
.step-num { font-family: 'Unbounded', sans-serif; font-weight: 700; color: #8FB0FF; font-size: 15px; margin-bottom: 10px; }
.steps h3 { font-size: 20px; margin-bottom: 8px; }
.steps p { margin: 0; color: var(--muted); }

.cta { background: var(--accent); border-radius: 28px; padding: 56px 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; }
.cta h2 { color: var(--bg); font-size: clamp(28px, 3.4vw, 36px); margin-bottom: 10px; }
.cta p { margin: 0; color: #13203F; font-size: 18px; }
.cta-text { flex: 1 1 420px; min-width: 0; }

/* --- подвал --- */
.site-footer { border-top: 1px solid var(--line); margin-top: 48px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-top: 28px; padding-bottom: 28px; color: var(--dim); font-size: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-links a { color: var(--dim); }

/* --- команды --- */
.page-head { padding-top: 56px; padding-bottom: 24px; }
.page-head h1 { font-size: clamp(32px, 4.4vw, 48px); margin-bottom: 12px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 8px; }
.cat { padding-top: 40px; }
.cat h2 { font-size: 26px; margin-bottom: 6px; }
.table-box { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; margin-top: 16px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--dim); font-weight: 500; font-size: 14px; background: var(--surface-2); }
tr:last-child td { border-bottom: none; }
td code { white-space: nowrap; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: #2A2140; color: #D7C6FF; margin-left: 6px; }

/* --- документы --- */
.doc { max-width: 820px; padding-top: 56px; padding-bottom: 40px; }
.doc h1 { font-size: clamp(30px, 4vw, 42px); margin-bottom: 8px; }
.doc h2 { font-size: 22px; margin: 40px 0 12px; }
.doc p, .doc li { color: #CDD3E6; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc-meta { color: var(--dim); margin-bottom: 32px; }
.note { background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; padding: 16px 20px; margin: 24px 0; }

/* --- кабинет и админка --- */
.profile-head { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; padding-top: 48px; padding-bottom: 24px; }
.profile-head h1 { font-size: 32px; }
.guild-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.guild { display: flex; flex-direction: column; gap: 14px; }
.guild-top { display: flex; align-items: center; gap: 12px; }
.guild-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--line); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--white); flex: none; overflow: hidden; }
.guild-icon img { width: 100%; height: 100%; }
.guild-name { font-weight: 700; color: var(--white); overflow-wrap: anywhere; }
.kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.kv div { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.kv small { display: block; color: var(--dim); font-size: 12px; }
.kv strong { color: var(--white); }
.danger-zone { border-color: #5A2A35; }

.admin { display: flex; flex-wrap: wrap; gap: 32px; padding-top: 40px; padding-bottom: 40px; align-items: flex-start; }
.admin-nav { flex: 1 1 200px; display: flex; flex-direction: column; gap: 4px; }
.admin-nav a { color: var(--muted); text-decoration: none; padding: 10px 14px; border-radius: 10px; font-weight: 500; }
.admin-nav a:hover { background: var(--surface); color: var(--white); }
.admin-nav a[aria-current="page"] { background: var(--surface); color: var(--white); border: 1px solid var(--line-2); }
.admin-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.admin-main h1 { font-size: 30px; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.metric small { color: var(--dim); display: block; font-size: 13px; }
.metric strong { font-family: 'Unbounded', sans-serif; font-size: 24px; color: var(--white); }

form.stack { display: flex; flex-direction: column; gap: 14px; }
.row-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
label.check { flex-direction: row; align-items: center; gap: 10px; color: var(--text); }
input[type=text], input[type=number], input[type=search], textarea {
  font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--line-2);
  border-radius: 10px; padding: 10px 12px; min-height: 44px; width: 100%;
}
input[type=number] { width: 120px; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); }
textarea { min-height: 96px; resize: vertical; }
.grow { flex: 1 1 260px; }

.error-page { text-align: center; padding-top: 120px; padding-bottom: 120px; }
.error-code { font-family: 'Unbounded', sans-serif; font-size: 96px; font-weight: 700; color: var(--accent); }

@media (max-width: 640px) {
  .hero { padding-top: 48px; }
  .cmd-box, .cta { padding: 28px 22px; }
  .kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cmd-row code { min-width: 0; }
}

/* --- маскот и понятная главная --- */
.avatar-sm { width: 24px; height: 24px; }
.hero h1 { max-width: 620px; }
.hero-facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 28px; color: var(--muted); }
.hero-facts strong { color: var(--white); font-family: 'Unbounded', sans-serif; font-size: 20px; margin-right: 4px; }
.mascot { flex: 1 1 380px; min-width: 0; max-width: 480px; margin: 0 auto; position: relative; }
.mascot img { display: block; width: 100%; height: auto; border-radius: 28px; border: 1px solid var(--line-2); }
.bubble { position: relative; background: var(--white); color: var(--accent-ink); font-weight: 700; padding: 14px 18px; border-radius: 18px; margin-bottom: 16px; max-width: 360px; line-height: 1.45; }
.bubble code { color: #2C46B8; background: #E6ECFF; padding: 1px 6px; border-radius: 6px; }
.bubble::after { content: ""; position: absolute; left: 48px; bottom: -10px; border: 10px solid transparent; border-top-color: var(--white); border-bottom: 0; }

.how { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; align-items: start; }
.how-step { display: flex; flex-direction: column; gap: 12px; }
.how-step > p { margin: 0; }
.how-label { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--white); }
.how-num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 14px; flex: none; }
.mock-input { font-family: 'JetBrains Mono', monospace; font-size: 20px; color: var(--white); padding: 18px 20px; }
.mock-input .mono { color: var(--accent); margin-right: 2px; }
img.msg-avatar { object-fit: cover; }

.card-link { display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.card-link:hover { border-color: var(--accent); transform: translateY(-2px); color: inherit; }
.card-link p { flex: 1 1 auto; }
.example { margin-top: 16px; color: var(--dim); font-size: 14px; }

.faq { display: flex; flex-direction: column; gap: 10px; max-width: 860px; }
.faq details, .explain { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 20px; }
.faq summary, .explain summary { cursor: pointer; padding: 18px 0; font-weight: 700; color: var(--white); list-style-position: outside; }
.faq details[open] summary, .explain[open] summary { border-bottom: 1px solid var(--line); }
.faq details p { margin: 14px 0 18px; color: var(--muted); }
.explain { margin-top: 20px; }
.explain ul { color: var(--muted); padding-left: 20px; margin: 14px 0 18px; }
.explain li { margin-bottom: 6px; }
kbd { font-family: 'JetBrains Mono', monospace; background: var(--line); border-radius: 5px; padding: 1px 6px; font-size: 13px; color: var(--white); }

.cta-mascot { width: 120px; height: 120px; border-radius: 24px; border: 3px solid var(--bg); flex: none; }

/* --- страница команд --- */
.guide { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; margin: 24px 0; }
.guide-step { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.legend .badge { margin-left: 0; }
.search { max-width: 520px; color: var(--white); font-weight: 700; font-size: 15px; }

/* --- кабинет --- */
.kv div[title] { cursor: help; }
.tips-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.tips-grid div { display: flex; flex-direction: column; gap: 2px; background: var(--surface-2); border-radius: 10px; padding: 12px 14px; }
.tips-grid span { color: var(--muted); font-size: 14px; }
.delete-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px 32px; color: var(--muted); margin-bottom: 16px; }
.delete-cols strong { color: var(--white); }
.delete-cols ul { margin: 8px 0 0; padding-left: 20px; }
.empty p { margin: 0 0 6px; }

.error-mascot { width: 160px; height: 160px; border-radius: 32px; border: 1px solid var(--line-2); margin-bottom: 12px; }
.error-code { line-height: 1; }
.error-text { margin: 16px auto 32px; }

/* ===== Цепляющий дизайн ===== */
.hero-bg {
  position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 75% 40%, rgba(91, 140, 255, .22), transparent 45%),
    radial-gradient(circle at 15% 85%, rgba(155, 231, 181, .08), transparent 40%),
    radial-gradient(rgba(143, 176, 255, .13) 1px, transparent 1px) 0 0 / 26px 26px;
  border-bottom: 1px solid var(--line);
}
.hero { padding-top: 72px; padding-bottom: 88px; }
.hero h1 { font-size: clamp(34px, 4.4vw, 52px); line-height: 1.1; letter-spacing: -0.03em; }
.grad {
  background: linear-gradient(90deg, #8FB0FF 0%, #B794F6 50%, #9BE7B5 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.btn-glow { box-shadow: 0 0 0 0 rgba(91, 140, 255, .6), 0 10px 30px rgba(91, 140, 255, .35); }
.btn-glow:hover { box-shadow: 0 0 0 6px rgba(91, 140, 255, .18), 0 14px 36px rgba(91, 140, 255, .45); transform: translateY(-1px); }

.mascot { position: relative; max-width: 500px; padding: 0 0 8px; }
.mascot picture { position: relative; z-index: 1; display: block; }
.mascot img { border-radius: 32px; border: 1px solid rgba(143, 176, 255, .35); box-shadow: 0 30px 80px rgba(0, 0, 0, .55); }
.mascot-glow { position: absolute; inset: 8% 6% 14%; background: radial-gradient(circle, rgba(91, 140, 255, .55), rgba(183, 148, 246, .25) 45%, transparent 70%); filter: blur(40px); z-index: 0; }
.mascot .bubble { position: relative; z-index: 2; margin: 18px 0 0; max-width: 100%; }
.mascot .bubble::after { top: -10px; bottom: auto; border-top: 0; border-bottom: 10px solid var(--white); left: 60px; }

.float-chip {
  position: absolute; z-index: 3; display: flex; align-items: center; gap: 10px;
  background: rgba(20, 26, 46, .92); border: 1px solid var(--line-2); border-radius: 14px;
  padding: 10px 14px; box-shadow: 0 12px 30px rgba(0, 0, 0, .45); backdrop-filter: blur(6px);
  animation: floaty 6s ease-in-out infinite;
}
.float-chip b { display: block; color: var(--white); font-size: 14px; line-height: 1.2; }
.float-chip small { color: var(--dim); font-size: 12px; }
.fc-icon { width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--accent-ink); flex: none; }
.fc-mint { background: var(--mint); }
.fc-gold { background: #FFD27A; }
.fc-pink { background: #FF9CC9; }
.fc-1 { top: 10%; left: -9%; }
.fc-2 { top: 40%; right: -8%; animation-delay: -2s; }
.fc-3 { top: 66%; left: -6%; animation-delay: -4s; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.marquee { overflow: hidden; border-bottom: 1px solid var(--line); background: var(--surface-2); padding: 14px 0; }
.marquee-track { display: flex; gap: 12px; width: max-content; animation: scroll 40s linear infinite; }
.marquee-track span { font-family: 'JetBrains Mono', monospace; color: var(--code); background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 16px; white-space: nowrap; font-size: 14px; }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.card-link { --c: #5B8CFF; position: relative; overflow: hidden; }
.card-link::before { content: ""; position: absolute; inset: auto -40% -60% auto; width: 220px; height: 220px; border-radius: 50%; background: var(--c); opacity: 0; filter: blur(70px); transition: opacity .25s; }
.card-link:hover { border-color: var(--c); box-shadow: 0 16px 40px rgba(0, 0, 0, .35); }
.card-link:hover::before { opacity: .35; }
.icon-tile { width: 48px; height: 48px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--c) 18%, transparent); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); }
.icon-tile .icon { stroke: var(--c); }
.c-blue { --c: #5B8CFF; } .c-mint { --c: #4FD18B; } .c-gold { --c: #F5B942; }
.c-pink { --c: #FF7AB6; } .c-violet { --c: #A98BFF; } .c-orange { --c: #FF8A5B; }

.how-num { box-shadow: 0 0 0 4px rgba(91, 140, 255, .18); }
.cta { position: relative; overflow: hidden; background: linear-gradient(120deg, #5B8CFF, #7F7BFF 55%, #A98BFF); }
.cta::after { content: ""; position: absolute; inset: 0; background: radial-gradient(rgba(255, 255, 255, .18) 1px, transparent 1px) 0 0 / 22px 22px; pointer-events: none; }
.cta > * { position: relative; z-index: 1; }

@media (max-width: 900px) {
  .fc-1 { left: 0; } .fc-2 { right: 0; } .fc-3 { left: 2%; }
}
@media (max-width: 520px) {
  .float-chip { padding: 8px 10px; } .float-chip small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .float-chip, .marquee-track { animation: none; }
  .card-link, .btn-glow { transition: none; }
}

/* ===== Новая админка ===== */
.admin { gap: 28px; }
.admin-nav { flex: 1 1 230px; max-width: 280px; gap: 6px; }
.admin-nav-title { margin: 0 0 8px 6px; color: var(--dim); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.admin-nav a { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; }
.admin-nav svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-top: 2px; }
.admin-nav span { display: flex; flex-direction: column; line-height: 1.3; }
.admin-nav small { color: var(--dim); font-size: 12px; font-weight: 400; margin-top: 2px; }
.admin-nav a[aria-current="page"] svg { stroke: var(--accent); }
.admin-main { gap: 20px; }
.admin-main h1 { font-size: 28px; }
.page-sub { margin: 8px 0 0; max-width: 720px; }
.hint { margin: -6px 0 0; color: var(--dim); font-size: 14px; }
.small { font-size: 14px; font-weight: 500; }

.admin-hello { display: flex; gap: 18px; align-items: center; }
.admin-hello img { width: 72px; height: 72px; border-radius: 20px; border: 1px solid var(--line-2); flex: none; }
.admin-hello h1 { margin-bottom: 6px; }
.admin-hello p { margin: 0; max-width: 760px; }

.notice { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between; background: #2A2410; border: 1px solid #6B5A1E; border-radius: 16px; padding: 18px 20px; }
.notice strong { color: #FFE2A0; }
.notice p { margin: 6px 0 0; color: #E9DDBF; max-width: 680px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.kpi { display: flex; flex-direction: column; gap: 6px; padding: 20px 22px; }
.kpi-label { color: var(--dim); font-size: 13px; }
.kpi-num { font-family: 'Manrope', sans-serif; font-weight: 700; font-size: 30px; line-height: 1.1; color: var(--white); font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 10px; }
.kpi-hint { color: var(--dim); font-size: 12px; }
.delta { font-size: 13px; font-weight: 700; }
.delta-up { color: #7EE2A8; }
.delta-down { color: #FF9B9B; }
.delta-flat { color: var(--muted); font-weight: 500; }
.status { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.status-good { background: #4FD18B; box-shadow: 0 0 0 4px rgba(79, 209, 139, .18); }
.status-ok { background: #F5B942; box-shadow: 0 0 0 4px rgba(245, 185, 66, .18); }
.status-bad { background: #FF6B6B; box-shadow: 0 0 0 4px rgba(255, 107, 107, .18); }

.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; }
.chart-card h2, .card-title { font-family: 'Manrope', sans-serif; font-size: 18px; font-weight: 700; color: var(--white); margin: 0; }
.chart-sub { margin: 4px 0 14px; color: var(--dim); font-size: 14px; }
.chart { display: block; width: 100%; height: auto; font-family: 'Manrope', sans-serif; }
.chart .pt:hover circle { r: 6; }
.chart .pt:hover path { fill: #7AA2FF; }
.chart-empty { display: flex; align-items: center; justify-content: center; text-align: center; padding: 0 24px; color: var(--dim); background: var(--surface-2); border-radius: 12px; border: 1px dashed var(--line-2); }
.chart-table { margin-top: 10px; }
.chart-table summary { cursor: pointer; color: #8FB0FF; font-size: 14px; }
.chart-table .table-box { max-height: 240px; overflow-y: auto; }

.hbars { display: flex; flex-direction: column; gap: 10px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 160px) 1fr auto; gap: 12px; align-items: center; font-size: 14px; }
.hbar-name { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.hbar-fill { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.hbar-val { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 60px; text-align: right; }

.eco { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 14px 0 20px; }
.eco div { background: var(--surface-2); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.eco strong { color: var(--white); font-size: 22px; font-variant-numeric: tabular-nums; }
.card-sub { font-family: 'Manrope', sans-serif; font-size: 15px; color: var(--muted); margin: 0 0 8px; }
.rich { list-style: none; counter-reset: r; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; }
.rich li { counter-increment: r; display: grid; grid-template-columns: 32px 1fr auto; gap: 4px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rich li:last-child { border-bottom: none; }
.rich li::before { content: counter(r); color: var(--dim); font-weight: 700; }
.rich li span { grid-column: 2; font-size: 13px; }
.rich li strong { grid-column: 3; grid-row: 1 / span 2; color: var(--white); font-variant-numeric: tabular-nums; }
.rich a { grid-column: 2; }

.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-top: 14px; }
.quick-btn { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); text-decoration: none; color: var(--white); }
.quick-btn span { color: var(--dim); font-size: 13px; }
.quick-btn:hover { border-color: var(--accent); color: var(--white); }
.timeline { list-style: none; padding: 0; margin: 14px 0; display: flex; flex-direction: column; gap: 10px; }
.timeline li { display: flex; flex-direction: column; gap: 2px; font-size: 14px; padding-left: 14px; border-left: 2px solid var(--line-2); }

.facts { margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.facts div { display: flex; justify-content: space-between; gap: 12px; }
.facts dt { color: var(--dim); }
.facts dd { margin: 0; color: var(--text); text-align: right; overflow-wrap: anywhere; }
.danger-details summary { cursor: pointer; color: #FF9B9B; font-size: 14px; font-weight: 700; }
.danger-details form { margin-top: 12px; }
.danger-details p { margin: 0; }

.user-head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.pill-bad { margin-left: auto; background: #3A1A22; color: #FF9B9B; border: 1px solid #6A2A35; border-radius: 999px; padding: 4px 12px; font-weight: 700; font-size: 13px; }
.edit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 14px 0; }
.edit-grid input[type=number] { width: 100%; }
.banner-preview { border-radius: 10px; margin: 8px 0 18px; }

@media (max-width: 760px) {
  .admin-nav { max-width: none; flex-direction: row; flex-wrap: wrap; }
  .admin-nav-title { width: 100%; }
  .admin-nav small { display: none; }
  .charts { grid-template-columns: 1fr; }
}

/* ===================== пользователь в шапке и роли ===================== */
.user-chip { display: inline-flex; align-items: center; gap: 10px; padding: 5px 14px 5px 6px; border-radius: 999px;
  border: 1px solid var(--line-2); text-decoration: none; color: var(--white); background: var(--surface-2); }
.user-chip:hover { border-color: var(--accent); color: var(--white); }
.user-chip .avatar-sm { width: 28px; height: 28px; }
.user-chip-text { display: flex; flex-direction: column; line-height: 1.15; }
.user-chip-name { font-weight: 700; font-size: 14px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip-owner { border-color: rgba(255, 200, 87, .45); }
.role-tag { display: inline-flex; align-items: center; gap: 5px; width: fit-content; font-size: 11px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.role-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.role-owner { color: #FFC857; }
.role-admin { color: #8FB0FF; }
.role-tag-lg { font-size: 12px; margin: 4px 0 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid currentColor; }
.role-tag-lg.role-owner { background: rgba(255, 200, 87, .08); }
.role-tag-lg.role-admin { background: rgba(143, 176, 255, .08); }

/* ===================== звания ===================== */
.rank-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 13px;
  font-weight: 700; white-space: nowrap; border: 1px solid; width: fit-content; }
.rank-chip-sm { font-size: 12px; padding: 1px 8px; }
.rank-novice  { --rank: #8FD19E; } .rank-student { --rank: #7FB2FF; } .rank-skilled { --rank: #B79CFF; }
.rank-pro     { --rank: #5ED6D6; } .rank-master  { --rank: #FF9AD5; } .rank-legend  { --rank: #FFD66B; }
.rank-chip { color: var(--rank); border-color: color-mix(in srgb, var(--rank) 45%, transparent); background: color-mix(in srgb, var(--rank) 10%, transparent); }
.rank-line { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; margin: 10px 0 6px; }
.rank-next { color: var(--dim); font-size: 13px; }
.rank-bar, .rank-share { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; margin-bottom: 14px; }
.rank-bar span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.rank-fill { display: block; height: 100%; border-radius: inherit; background: var(--rank); min-width: 0; }
.rank-ladder { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.rank-step { display: grid; grid-template-columns: 150px 1fr 56px 64px; align-items: center; gap: 12px; }
.rank-step strong { text-align: right; color: var(--white); font-variant-numeric: tabular-nums; }
.rank-track { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.ranks-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.rank-card-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.rank-emoji { font-size: 30px; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: var(--surface-2); }
.rank-count { margin-left: auto; font-size: 28px; color: var(--white); font-variant-numeric: tabular-nums; }
.rank-card { border-top: 3px solid var(--rank); }
.rank-card-novice { --rank: #8FD19E; } .rank-card-student { --rank: #7FB2FF; } .rank-card-skilled { --rank: #B79CFF; }
.rank-card-pro { --rank: #5ED6D6; } .rank-card-master { --rank: #FF9AD5; } .rank-card-legend { --rank: #FFD66B; }

/* ===================== админка ===================== */
.admin { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 32px; align-items: start; }
.admin-side { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 18px; }
.admin-me { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.admin-me .avatar { width: 44px; height: 44px; border-radius: 50%; }
.admin-me-name { font-weight: 700; color: var(--white); line-height: 1.2; }
.admin-nav { max-width: none; gap: 2px; }
.admin-nav-title { margin: 14px 0 6px 14px; }
.admin-nav-title:first-child { margin-top: 0; }
.admin-main { display: flex; flex-direction: column; gap: 22px; }
.admin-head h1 { font-size: 28px; margin-bottom: 8px; }
.admin-head p { margin: 0; max-width: 760px; }
.status-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; color: var(--muted); }
.status-line strong { color: var(--white); }
.status-line .sep { color: var(--line-2); }
.section-h { font-family: 'Manrope', sans-serif; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); margin: 0 0 10px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card-head a { font-size: 14px; text-decoration: none; }
.chart-card h3 { font-family: 'Manrope', sans-serif; font-size: 17px; }
.attention { padding: 18px 22px; }
.attention strong { font-size: 16px; }
.attention p { margin: 4px 0 0; color: var(--muted); }
.attention ul { margin: 8px 0 0; padding-left: 20px; color: var(--muted); }
.attention li + li { margin-top: 8px; }
.attention-ok { border-color: rgba(79, 209, 139, .35); }
.attention-ok strong { color: #7EE2A8; }
.attention-warn { border-color: #6B5A1E; background: #1F1B10; }
.attention-warn strong { color: #FFE2A0; }
.attention-form { margin-top: 8px; }
.cmp { font-size: 13px; color: var(--muted); }
.cmp-up { color: #7EE2A8; }
.cmp-down { color: #FFB38A; }
.people { list-style: none; counter-reset: r; padding: 0; margin: 10px 0 0; }
.people li { counter-increment: r; display: grid; grid-template-columns: 28px minmax(0, auto) auto 1fr auto; align-items: center;
  gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.people li:last-child { border-bottom: none; }
.people li::before { content: counter(r); color: var(--dim); font-weight: 700; }
.people-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people li strong { text-align: right; color: var(--white); font-variant-numeric: tabular-nums; white-space: nowrap; }
.people-compact li { grid-template-columns: 22px minmax(0, 1fr) auto auto; padding: 7px 0; font-size: 14px; }
.small { font-size: 13px; }
.search-bar { display: flex; gap: 10px; }
.search-bar input { flex: 1; min-height: 48px; font-size: 16px; }
.hint-box summary, .edit-box summary { cursor: pointer; color: #8FB0FF; font-size: 14px; }
.hint-box p { color: var(--dim); font-size: 14px; margin: 6px 0 0; }
.edit-box { margin-top: 6px; }
.edit-box form { margin-top: 12px; }
.chart-inline summary { margin-bottom: 10px; }
.grow { flex: 1; }

@media (max-width: 860px) {
  .admin { grid-template-columns: 1fr; }
  .admin-side { position: static; }
  .admin-nav { flex-direction: row; flex-wrap: wrap; }
  .admin-nav-title { display: none; }
  .admin-nav a small { display: none; }
  .rank-step { grid-template-columns: 130px 1fr 48px; }
  .rank-step .dim { display: none; }
  .people li { grid-template-columns: 24px minmax(0, 1fr) auto; }
  .people li .dim { grid-column: 2 / -1; }
  .user-chip-name { max-width: 110px; }
}
